aboutsummaryrefslogtreecommitdiffstats
path: root/templates/settings.html
blob: 71f31452731735bc92de32f99e754fedc8e0563b (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{% include "head.html" %}
<div class="content">
  <h1>ODR-DabMux Settings</h1>
  <div class="section">
    <h2>General</h2>
    <div class="setting-entry">
      <label for="instance_name">Name of this instance:</label>
      <input class="textinput" type="text" id="instance_name" value="{{ conf.instance_name }}">
    </div>
    <div class="setting-entry">
      <label for="dabmux_config_location">ODR-DabMux JSON config to write:</label>
      <input class="textinput" type="text" id="dabmux_config_location" value="{{ conf.dabmux_config_location }}">
    </div>
    <div class="setting-entry">
      <label for="tist">Enable TIST:</label>
      <input type="checkbox" id="tist" value="Enable TIST"
             {% if conf.tist %} checked {% endif %} >
    </div>
    <div class="setting-entry">
      <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 class="setting-entry">
      <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 class="setting-entry">
      <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 class="setting-entry">
      <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 class="setting-entry">
      <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"><h2>Services:</h2></div>
  <div class="section">
    <template id="service_template">
      <p class="service">
      <input class="textinput srv_unique_id" type="text" placeholder="Service Unique ID">
      <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_unique_id" type="text" placeholder="Service Unique ID"
                                                         value="{{ srv.unique_id }}">
      <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()">Save Configuration</button>
  </div>
  <div class="section">
    <p id="settings_send_confirmation"></p>
  </div>
</div>
{% include "foot.html" %}
{# vi:set et sw=2 ts=2: #}