aboutsummaryrefslogtreecommitdiffstats
path: root/templates/dashboard.html
blob: 4c4f7f6e4ed46160c75380d384fa01821c6fae6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{% include "head.html" %}
<div class="content">
  <h1>ODR-DabMux Dashboard</h1>
  <div class="section">
    <h2>Input Stats</h2>

    {% if let Some(e) = stats_errors %}
    <p>Error!: {{ e }}</p>
    {% endif %}

    {% if let Some(s) = stats %}
    <p>ODR-DabMux version {{ s.version }}</p>
    <table>
      <tr>
      <th>ident</th><th>maxfill</th><th>minfill</th>
      <th>under</th><th>over</th><th>audioleft</th>
      <th>audioright</th><th>peakleft</th><th>peakright</th>
      <th>state</th><th>version</th><th>uptime</th><th>offset</th>
      </tr>
      {% for (ident, is) in s.input_stats %}
      <tr>
        <td>{{ ident }}</td>
        <td>{{ is.max_fill }}</td>
        <td>{{ is.min_fill }}</td>
        <td>{{ is.num_underruns }}</td>
        <td>{{ is.num_overruns }}</td>
        <td>{{ is.peak_left }}</td>
        <td>{{ is.peak_right }}</td>
        <td>{{ is.peak_left_slow }}</td>
        <td>{{ is.peak_right_slow }}</td>
        <td>{{ is.state.clone().or(Some("?".to_owned())).unwrap() }}</td>
        <td>{{ is.version.clone().or(Some("?".to_owned())).unwrap() }}</td>
        <td>
        {% if let Some(u) = is.uptime %}
        {{ u }}
        {% else %}
        N/A
        {% endif %}
        </td>
        <td>{{ is.last_tist_offset }}</td>
      </tr>
      {% endfor %}
    </table>
    {% endif %}
  </div>
  <div class="section">
    <h2>Remote Control</h2>
    {% if let Some(e) = params_errors %}
    <p>Error!: {{ e }}</p>
    {% endif %}
    <table>
      <tr><th>Module</th><th>Parameter</th><th>Value</th></tr>
      {% for p in params %}
      <tr><td>{{ p.module }}</td><td>{{ p.param }}</td>
        <td>
          <input class="textinput" type="text" value="{{ p.value }}">
          <button class="btn" type="button" onclick="btn_dash_update(this, '{{ p.module }}', '{{ p.param }}')">Update</button>
        </td></tr>
      {% endfor %}
    </table>
  </div>
</div>
{% include "foot.html" %}
{# vi:set et sw=2 ts=2: #}