aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-09-19 23:33:17 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-09-19 23:33:17 +0200
commit7208269be13d0ee27fd696fcae31330e2a78b969 (patch)
tree97ceed90bb472fbeab9b0dbc135fb418d64f253d /templates
parenteec01c9b72feff9533477014881b982124ca7b6d (diff)
downloadodr-dabmux-gui-7208269be13d0ee27fd696fcae31330e2a78b969.tar.gz
odr-dabmux-gui-7208269be13d0ee27fd696fcae31330e2a78b969.tar.bz2
odr-dabmux-gui-7208269be13d0ee27fd696fcae31330e2a78b969.zip
Add content to settings page
Diffstat (limited to 'templates')
-rw-r--r--templates/head.html2
-rw-r--r--templates/settings.html76
2 files changed, 69 insertions, 9 deletions
diff --git a/templates/head.html b/templates/head.html
index 47b314f..7a2e5bb 100644
--- a/templates/head.html
+++ b/templates/head.html
@@ -16,7 +16,7 @@
<div class="head-nav-topdiv">
<div class="nav-title">
<p class="text-lg">ODR-DabMux</p>
- <p class="text-lg"><b>{{ conf.name }}</b></p>
+ <p class="text-lg"><b>{{ conf.instance_name }}</b></p>
</div>
<div class="div-menu">
diff --git a/templates/settings.html b/templates/settings.html
index 8a7d56e..dfe71cf 100644
--- a/templates/settings.html
+++ b/templates/settings.html
@@ -1,15 +1,75 @@
{% include "head.html" %}
<div class="content">
<h1>ODR-DabMux Settings</h1>
-
<div class="section">
- <form action="/settings" method="post">
- <fieldset>
- <legend>General</legend>
- <div><label for="name">Name of this instance:</label><input class="textinput" type="text" name="name" value="{{ conf.name }}"></div>
- </fieldset>
- <div><input class="btn" type="submit" value="Update"></div>
- </form>
+ <h2>General</h2>
+ <div><label for="instance_name">Name of this instance:</label><input class="textinput" type="text" id="instance_name" value="{{ conf.instance_name }}"></div>
+ <div>
+ <label for="tist">Enable TIST:</label>
+ <input type="checkbox" id="tist" value="Enable TIST"
+ {% if conf.tist %} checked {% endif %} >
+ </div>
+ <div>
+ <label for="tist_offset">TIST offset:</label>
+ <input class="textinput" type="text" id="tist_offset" placeholder="TIST offset in seconds" value="{{ conf.tist_offset }}">
+ </div>
+ <div>
+ <label for="ensemble_id">EId:</label>
+ <input class="textinput" type="text" id="ensemble_id" placeholder="Ensemble ID in hex" value="{{ conf.ensemble_id_hex() }}">
+ </div>
+ <div>
+ <label for="ensemble_ecc">ECC:</label>
+ <input class="textinput" type="text" id="ensemble_ecc" placeholder="Ensemble ECC in hex" value="{{ conf.ensemble_ecc_hex() }}">
+ </div>
+ <div>
+ <label for="ensemble_label">Label and shortlabel:</label>
+ <input class="textinput" type="text" id="ensemble_label" placeholder="Ensemble Label" value="{{ conf.ensemble_label }}">
+ <input class="textinput" type="text" id="ensemble_shortlabel" placeholder="Ensemble Short Label" value="{{ conf.ensemble_shortlabel }}">
+ </div>
+ <div>
+ <label for="output_edi_port">EDI TCP Listen Port</label>
+ <input class="textinput" type="text" id="output_edi_port" placeholder="TCP Listen Port for EDI Output" value="{{ conf.output_edi_port }}">
+ </div>
+ </div>
+ <div class="section">
+ <template id="service_template">
+ <p class="service">
+ <input class="textinput srv_sid" type="text" placeholder="Service ID in hex">
+ <input class="textinput srv_ecc" type="text" placeholder="Service ECC in hex">
+ <input class="textinput srv_label" type="text" placeholder="Service Label">
+ <input class="textinput srv_shortlabel" type="text" placeholder="Service Short Label">
+ <input class="textinput srv_input_port" type="text" placeholder="EDI TCP Input Port">
+ <input class="textinput srv_bitrate" type="text" placeholder="Bitrate in kbps">
+ <input class="textinput srv_protection" type="text" placeholder="Protection 1 to 4">
+ <button class="btn" type="button" onclick="btn_settings_remove_service(this)">Remove</button>
+ </p>
+ </template>
+ <div id="services">
+ {% for srv in conf.services %}
+ <p class="service">
+ <input class="textinput srv_sid" type="text" placeholder="Service ID in hex"
+ value="{{ srv.sid_hex() }}">
+ <input class="textinput srv_ecc" type="text" placeholder="Service ECC in hex"
+ value="{{ srv.ecc_hex() }}">
+ <input class="textinput srv_label" type="text" placeholder="Service Label"
+ value="{{ srv.label }}">
+ <input class="textinput srv_shortlabel" type="text" placeholder="Service Short Label"
+ value="{{ srv.shortlabel }}">
+ <input class="textinput srv_input_port" type="text" placeholder="EDI TCP Input Port"
+ value="{{ srv.input_port }}">
+ <input class="textinput srv_bitrate" type="text" placeholder="Bitrate in kbps"
+ value="{{ srv.bitrate }}">
+ <input class="textinput srv_protection" type="text" placeholder="Protection 1 to 4"
+ value="{{ srv.protection }}">
+ <button class="btn" type="button" onclick="btn_settings_remove_service(this)">Remove</button>
+ </p>
+ {% endfor %}
+ </div>
+ <button class="btn" type="button" onclick="btn_settings_add_service()">Add service</button>
+ </div>
+ <div class="section">
+ <button class="btn" type="button" onclick="btn_settings_send()">Send</button>
+ </div>
</div>
{% include "foot.html" %}
{# vi:set et sw=2 ts=2: #}