From 3a423b0ff21cc11b37a409c1ac86c6abfcd72f00 Mon Sep 17 00:00:00 2001 From: topilski Date: Thu, 6 Jun 2019 02:51:42 -0400 Subject: [PATCH] Review --- app/templates/user/dashboard.html | 40 +++++++++++++++++++------------ 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/app/templates/user/dashboard.html b/app/templates/user/dashboard.html index 58d50b2..e01203b 100644 --- a/app/templates/user/dashboard.html +++ b/app/templates/user/dashboard.html @@ -15,7 +15,7 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }} width: 20%; } th.stream_type { - width: 8%; + width: 5%; } th.stream_status { width: 5%; @@ -27,13 +27,13 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }} width: 5%; } th.stream_rss { - width: 5%; + width: 6%; } th.stream_inbps { - width: 5%; + width: 6%; } th.stream_outbps { - width: 5%; + width: 6%; } th.stream_work_time { width: 10%; @@ -44,6 +44,7 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }} th.stream_actions { width: 25%; } + {{super()}} {% endblock %} @@ -262,8 +263,8 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }} {% trans %}Restarts{% endtrans %} {% trans %}CPU{% endtrans %} {% trans %}RSS (MB){% endtrans %} - {% trans %}In BPS{% endtrans %} - {% trans %}Out BPS{% endtrans %} + {% trans %}In (Mbps){% endtrans %} + {% trans %}Out (Mbps){% endtrans %} {% trans %}In work time{% endtrans %} {% trans %}Live time{% endtrans %} {% trans %}Actions{% endtrans %} @@ -286,8 +287,12 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }} {{ rev.restarts }} {{ rev.cpu }} {{ (rev.rss / (1024 * 1024)) | round(4, 'floor') }} - {{ rev.input_streams|sum(attribute='bps') }} - {{ rev.output_streams|sum(attribute='bps') }} + {{ rev.input_streams|sum(attribute='bps') / (1024 * 1024 / 8) | round(4, + 'floor') }} + + {{ rev.output_streams|sum(attribute='bps') / (1024 * 1024 / 8) | round(4, + 'floor') }} + {{ rev.timestamp - rev.start_time }} {{ rev.timestamp - rev.loop_start_time }} @@ -398,8 +403,8 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }} {% trans %}Restarts{% endtrans %} {% trans %}CPU{% endtrans %} {% trans %}RSS (MB){% endtrans %} - {% trans %}In BPS{% endtrans %} - {% trans %}Out BPS{% endtrans %} + {% trans %}In (Mbps){% endtrans %} + {% trans %}Out (Mbps){% endtrans %} {% trans %}In work time{% endtrans %} {% trans %}Live time{% endtrans %} {% trans %}Actions{% endtrans %} @@ -421,9 +426,13 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }} {{ vod.restarts }} {{ vod.cpu }} - {{ vod.rss }} - {{ vod.input_streams|sum(attribute='bps') }} - {{ vod.output_streams|sum(attribute='bps') }} + {{ (rev.rss / (1024 * 1024)) | round(4, 'floor') }} + {{ vod.input_streams|sum(attribute='bps') / (1024 * 1024 / 8) | round(4, + 'floor')}} + + {{ vod.output_streams|sum(attribute='bps') / (1024 * 1024 / 8) | round(4, + 'floor') }} + {{ vod.timestamp - vod.start_time }} {{ vod.timestamp - vod.loop_start_time }} @@ -517,12 +526,12 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }} for(var i in stream.input_streams) { in_bps += stream.input_streams[i].bps; } - row.eq(7).text(in_bps); + row.eq(7).text(in_bps / (1024 * 1024 / 8)); var out_bps = 0; for(var i in stream.output_streams) { out_bps += stream.output_streams[i].bps; } - row.eq(8).text(out_bps); + row.eq(8).text(out_bps / (1024 * 1024 / 8)); row.eq(9).text(stream.timestamp - stream.start_time); row.eq(10).text(stream.timestamp - stream.loop_start_time); }); @@ -805,5 +814,6 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }} + {% endblock %}