mirror of https://git.48k.eu/ogcp
Add ogServer uptime to the dashboard
ogServer GET /stats returns ogServer uptime in seconds. Transform seconds to days, hours and minutes and print them in the dashboard.multi-ogserver
parent
6b617bd448
commit
1356145026
|
@ -21,6 +21,14 @@
|
|||
<p class="card-text">{{ time_dict['boot'] }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="list-group list-group-horizontal">
|
||||
<li class="list-group-item w-50">
|
||||
{{ _('ogServer uptime') }}
|
||||
</li>
|
||||
<li class="list-group-item w-50">
|
||||
<p class="card-text">{{ time_dict['start'] }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="list-group list-group-horizontal">
|
||||
<li class="list-group-item w-50">
|
||||
{{ _('Connected clients (ogClient)') }}
|
||||
|
|
|
@ -242,7 +242,8 @@ def index():
|
|||
timestamp = datetime.datetime.fromtimestamp(stats.get('time').get('now'))
|
||||
now = timestamp.strftime('%Y-%m-%d %H:%M:%S')
|
||||
boot = display_time(stats.get('time').get('boot'))
|
||||
time_dict = {'now': now, 'boot': boot}
|
||||
start = display_time(stats.get('time').get('start'))
|
||||
time_dict = {'now': now, 'boot': boot, 'start': start}
|
||||
return render_template('dashboard.html', clients=clients,
|
||||
images=images, disk=disk, colsize="6",
|
||||
oglive_list=oglive_list, stats=stats,
|
||||
|
|
Loading…
Reference in New Issue