Commit d4e1cbd0 authored by Vladislav Rykov's avatar Vladislav Rykov
Browse files

administration view stats added

parent f0f24d7a
......@@ -6,6 +6,49 @@
<a class="h4 mb-0 text-white text-uppercase d-none d-lg-inline-block" href="/administration">Administration</a>
{% endblock %}
{% block stats %}
<!-- Header -->
<div class="row">
<div class="col-xl-4 col-lg-6">
<div class="card card-stats mb-4 mb-xl-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="card-title text-uppercase text-muted mb-0">Users</h5>
<span class="h2 font-weight-bold mb-0">{{ info[0] }}</span>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-4 col-lg-6">
<div class="card card-stats mb-4 mb-xl-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="card-title text-uppercase text-muted mb-0">Applications</h5>
<span class="h2 font-weight-bold mb-0">{{ info[1] }}</span>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-4 col-lg-6">
<div class="card card-stats mb-4 mb-xl-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="card-title text-uppercase text-muted mb-0">Devices</h5>
<span class="h2 font-weight-bold mb-0">{{ info[2] }}</span>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block body %}
<!-- Page content -->
<div class="container-fluid mt--7">
......@@ -34,11 +77,5 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
......@@ -39,8 +39,8 @@
<div class="col-lg-4">
<a href="../new-application"><button type="submit" class="btn btn-primary btn-block">New application</button></a>
</div>
</div>
</div>
</div>
</div>
......
......@@ -29,7 +29,7 @@ def administration():
if request.method == 'GET':
user_cnt = ud.get_count()[1][0]
apps_cnt = ad.get_count()[1][0]
devs_cnt = dd.get_count_all()
devs_cnt = dd.get_count_all()[1][0]
info = [user_cnt, apps_cnt, devs_cnt]
return render_template('new/admin/administration.html', info=info)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment