{% extends "layout.html" %}
{% block content %}
<input type="hidden" value="{{url_for('redisboard.dashboard_api')}}" id="dashboard_api">
<section class="section">
    <div class="row">
        <div class="col-lg-4 col-md-6 col-sm-6 col-12">
            <div class="card card-statistic-1">
                <div class="card-icon bg-primary">
                    <i class="fas fa-circle"></i>
                </div>
                <div class="card-wrap">
                    <div class="card-header">
                        <h4>Total Keys</h4>
                    </div>
                    <div class="card-body">
                        {{total_keys}}
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-4 col-md-6 col-sm-6 col-12">
            <div class="card card-statistic-1">
                <div class="card-icon bg-danger">
                    <i class="far fa-newspaper"></i>
                </div>
                <div class="card-wrap">
                    <div class="card-header">
                        <h4>Total Memory</h4>
                    </div>
                    <div class="card-body">
                        {{used_memory}}
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-4 col-md-6 col-sm-6 col-12">
            <div class="card card-statistic-1">
                <div class="card-icon bg-warning">
                    <i class="far fa-user"></i>
                </div>
                <div class="card-wrap">
                    <div class="card-header">
                        <h4>Connected Clients</h4>
                    </div>
                    <div class="card-body">
                        {{connected_clients}}
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-12 col-md-6 col-lg-6">
            <div class="card">
                <div class="card-header">
                    <h4>Commands/SEC</h4>
                </div>
                <div class="card-body">
                    <canvas id="commands"></canvas>
                </div>
            </div>
        </div>
        <div class="col-12 col-md-6 col-lg-6">
            <div class="card">
                <div class="card-header">
                    <h4>Memory Usage(MB)</h4>
                </div>
                <div class="card-body">
                    <canvas id="memory"></canvas>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12 col-12 col-sm-12">
            <div class="card">
                <div class="card-header">
                    <h4>NetWork</h4>
                </div>
                <div class="card-body">
                    <canvas id="network" height="100"></canvas>
                </div>
            </div>
        </div>
    </div>
    </div>
</section>

{% endblock %}

{% block js %}
<script src="{{ url_for('redisboard.static', filename='dist/pages/dashboard.js') }}"></script>
{% endblock %}