<!--Card content-->
<div class="card-body grid">
    <div class="row col-12 mb-5">
        <div class="col-6">
            <p class="card-text col-md">
                Current version :
                {% if bot_local_version == None %}
                <span class="badge badge-danger">NOT FOUND</span>
                {% elif is_up_to_date %}
                <span class="badge badge-success">{{ bot_local_version }}</span>
                {% else %}
                <span class="badge badge-warning">{{ bot_local_version }}</span>
                {% endif %}
            </p>
            <p class="card-text col-md">
                Latest version : <span class="badge badge-primary">{{ bot_server_version }}</span>
            </p>
            <p class="card-text col-md">
                Bot status :
                {% if not bot_status %}
                <span class="badge badge-warning">stopped</span>
                {% else %}
                <span class="badge badge-success">running</span>
                {% endif %}
            </p>
        </div>
        <div class="col-6">
            <button route="{{ url_for('install') }}" type="button" class="btn btn-primary waves-effect {% if bot_server_version != '0' and is_up_to_date %}disabled{% endif %}">{{ 'Update Octobot' if bot_local_version != 'not installed' else 'Install OctoBot'}}</button>
            <button route="{{ url_for('tentacles') }}" type="button" class="btn btn-outline-info waves-effect {% if bot_local_version == 'not installed' %}disabled{% endif %}">Update tentacles</button>
        </div>
    </div>
    <div class="row col-12">
        <div class="col-4">
            <button route="{{ url_for('stop') }}" type="button" class="btn btn-danger waves-effect {% if not bot_status %}disabled{% endif %}">Stop Octobot</button>
        </div>
        <div class="col-4">
            <button route="{{ url_for('start') }}" type="button" class="btn btn-success waves-effect {% if bot_status or bot_local_version == 'not installed' %}disabled{% endif %}">Start Octobot</button>
        </div>
        <div class="col-4">
            <a href="{{ bot_url }}" target="_blank" rel="noopener noreferrer" role="button" class="btn btn-primary waves-effect {% if not bot_status %}disabled{% endif %}">Open OctoBot</a>
        </div>
    </div>
    <div class="mt-4">
        <div class="progress" style="display: none">
          <div class="progress-bar progress-bar-striped bg-success progress-bar-animated" role="progressbar" style="width: 100%;" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
        </div>
    </div>
</div>
