Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladislav Rykov
THSO.server
Commits
d4e1cbd0
Commit
d4e1cbd0
authored
Jun 01, 2020
by
Vladislav Rykov
Browse files
administration view stats added
parent
f0f24d7a
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/app/__pycache__/views_admin.cpython-37.pyc
View file @
d4e1cbd0
No preview for this file type
app/app/templates/new/admin/administration.html
View file @
d4e1cbd0
...
...
@@ -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"
>
...
...
@@ -30,13 +73,7 @@
<div
class=
"col-lg-3"
>
<button
type=
"submit"
form=
"administration"
class=
"btn btn-primary btn-block"
>
Save
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
app/app/templates/new/public/applications.html
View file @
d4e1cbd0
...
...
@@ -37,10 +37,10 @@
<div
class=
"row"
style=
"margin-top: 30px;"
>
<div
class=
"col-lg-4"
>
<a
href=
"../new-application"
><button
type=
"submit"
class=
"btn btn-primary btn-block"
>
New application
</button></a>
</div>
<a
href=
"../new-application"
><button
type=
"submit"
class=
"btn btn-primary btn-block"
>
New application
</button></a>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
app/app/views_admin.py
View file @
d4e1cbd0
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment