diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-09-20 22:45:23 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-09-20 22:45:23 +0200 |
commit | eadac6465d83ec6e26a45fd90d96ec5e081ce7b2 (patch) | |
tree | 7e81fffbe86bdcecb2208e3f7d72a2bdd8a04125 /templates/dashboard.html | |
parent | ad30bb7aedf6b2e959a0ed90e90e2b991a69f6dc (diff) | |
download | odr-dabmux-gui-eadac6465d83ec6e26a45fd90d96ec5e081ce7b2.tar.gz odr-dabmux-gui-eadac6465d83ec6e26a45fd90d96ec5e081ce7b2.tar.bz2 odr-dabmux-gui-eadac6465d83ec6e26a45fd90d96ec5e081ce7b2.zip |
Get stats working
Diffstat (limited to 'templates/dashboard.html')
-rw-r--r-- | templates/dashboard.html | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/templates/dashboard.html b/templates/dashboard.html index a60d6a1..4c4f7f6 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -2,12 +2,52 @@ <div class="content"> <h1>ODR-DabMux Dashboard</h1> <div class="section"> - <h2>Remote control</h2> + <h2>Input Stats</h2> - {% if let Some(e) = errors %} + {% 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 %} |