diff --git a/app/provider/view.py b/app/provider/view.py index 51edfe3..7bd7367 100644 --- a/app/provider/view.py +++ b/app/provider/view.py @@ -21,6 +21,7 @@ class ProviderView(FlaskView): proxy = [] catchups = [] events = [] + tests = [] for stream in streams: front = stream.to_dict() type = stream.get_type() @@ -34,13 +35,15 @@ class ProviderView(FlaskView): catchups.append(front) elif type == constants.StreamType.EVENT: events.append(front) + elif type == constants.StreamType.TEST_LIFE: + tests.append(front) else: streams_relay_encoder_timeshifts.append(front) role = server.get_user_role_by_id(current_user.id) return render_template('provider/dashboard.html', streams=streams_relay_encoder_timeshifts, vods=vods, - cods=cods, proxies=proxy, catchups=catchups, events=events, service=server, - servers=current_user.servers, role=role) + cods=cods, proxies=proxy, catchups=catchups, events=events, tests=tests, + service=server, servers=current_user.servers, role=role) return redirect(url_for('ProviderView:settings')) diff --git a/app/templates/provider/dashboard.html b/app/templates/provider/dashboard.html index 5240eb3..b3a388c 100644 --- a/app/templates/provider/dashboard.html +++ b/app/templates/provider/dashboard.html @@ -54,6 +54,7 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }} + {{super()}} {% endblock %} @@ -293,6 +294,7 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }}
  • Catchups
  • Events (Pay per view)
  • Series
  • +
  • Tests
  • @@ -427,23 +429,20 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }}
    - - - - -
    @@ -992,6 +991,142 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }}
    +
    +
    + + + + + + + + + + + + + + + + + + + + + {% for test in tests %} + + + + + + + + + + + + + + + + + {% endfor %} + +
    #NameTypeStatusRestartsCPU (%)RSS (MB)In (Mbps)Out (Mbps)TTL (sec)RTL (sec)Quality (%)Price ($)Actions
    {{ loop.index }} + + {{ test.name }} + + {{ ['PROXY','VOD_PROXY','RELAY', 'ENCODE', 'TIMESHIFT_PLAYER', + 'TIMESHIFT_RECORDER', + 'CATCHUP', 'TEST_LIFE', 'VOD_RELAY', 'VOD_ENCODE', 'COD_RELAY', + 'COD_ENCODE', 'EVENT'][test.type] }} + {{ ['NEW', 'INIT', 'STARTED', 'READY', 'PLAYING', 'FROZEN', + 'WAITING'][test.status] }} + {{ test.restarts }}{{ test.cpu | round(2, 'floor') }}{{ (test.rss / (1024 * 1024)) | round(4, 'floor') }}{{ (test.input_streams|sum(attribute='bps') / (1024 * 1024 / 8)) | round(4, + 'floor') }} + {{ (test.output_streams|sum(attribute='bps') / (1024 * 1024 / 8))| round(4, + 'floor') }} + {{ (test.timestamp - test.start_time)/1000 }}{{ (test.timestamp - test.loop_start_time)/1000 }}{{ test.quality | round(2, 'floor') }} + {{ test.price }} + + + + + Play + + + + {% if (role == 2) %} + + + View log + + + + VPL + + {% endif %} +
    +
    +
    + +
    +
    + @@ -1491,7 +1626,5 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }} }); } - - {% endblock %}