diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-01-02 17:58:28 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-01-02 17:58:28 +0100 |
commit | 454f78a7bb29e19ab0e505f84ee82163cb01d489 (patch) | |
tree | 5ce44d902b34610d5bc65abb0d03056afeeb896f /templates | |
parent | 4ba802d0c73a1a1664b4d3e17757e54aeefd81f7 (diff) | |
download | cats-radio-node-454f78a7bb29e19ab0e505f84ee82163cb01d489.tar.gz cats-radio-node-454f78a7bb29e19ab0e505f84ee82163cb01d489.tar.bz2 cats-radio-node-454f78a7bb29e19ab0e505f84ee82163cb01d489.zip |
Get config dialog to work
Diffstat (limited to 'templates')
-rw-r--r-- | templates/head.html | 2 | ||||
-rw-r--r-- | templates/settings.html | 54 |
2 files changed, 52 insertions, 4 deletions
diff --git a/templates/head.html b/templates/head.html index f1c4a8a..063cb8e 100644 --- a/templates/head.html +++ b/templates/head.html @@ -14,7 +14,7 @@ <div class="h-full min-h-screen p-3 space-y-2 w-60 bg-sky-100 text-sky-800"> <div class="p-3 rounded-lg space-y-2 bg-sky-300 text-sky-900"> <p class="text-lg">CATS Radio Node</p> - <p class="text-lg font-semibold">{{ callsign }}</p> + <p class="text-lg font-semibold">{{ conf.callsign }}</p> </div> <div class="divide-y divide-sky-300"> diff --git a/templates/settings.html b/templates/settings.html index f86c43b..545a199 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -3,9 +3,57 @@ <h1>Node Settings</h1> <form action="/settings" method="post"> - <div><label for="callsign">Callsign: <input class="textinput" type="text" name="callsign" value="{{ conf.callsign }}"></label></div> - <div><label for="ssid">SSID: <input class="textinput" type="number" name="ssid" value="{{ conf.ssid }}"></label></div> - <div><label for="icon">Icon: <input class="textinput" type="number" name="icon" value="{{ conf.icon }}"></label></div> + <fieldset> + <legend>General</legend> + <div><label for="callsign">Callsign:</label><input class="textinput" type="text" name="callsign" value="{{ conf.callsign }}"></div> + <div><label for="ssid">SSID:</label><input class="textinput" type="number" name="ssid" value="{{ conf.ssid }}"></div> + <div><label for="icon">Icon:</label><input class="textinput" type="number" name="icon" value="{{ conf.icon }}"></div> + </fieldset> + <fieldset> + <legend>FELINET</legend> + <div><label for="felinet_enabled">Enabled:</label><input type="checkbox" name="felinet_enabled" {% if conf.felinet.enabled %} checked {% endif %}></div> + <div><label for="address">Address:</label><input class="textinput" type="text" name="address" value="{{ conf.felinet.address }}"></div> + </fieldset> + <fieldset> + <legend>IGate Beacon</legend> + <div><label for="period_seconds">Period [s]:</label><input class="textinput" type="number" name="period_seconds" value="{{ conf.beacon.period_seconds }}"></div> + <div><label for="max_hops">Max hops:</label><input class="textinput" type="number" name="max_hops" value="{{ conf.beacon.max_hops }}"></div> + <div><label for="latitude">Latitude:</label> + <input class="textinput" type="text" name="latitude" + value="{% match conf.beacon.latitude %}{% when Some with (val) %}{{ val }}{% when None %}{% endmatch %}"> + </div> + <div><label for="longitude">Longitude:</label> + <input class="textinput" type="text" name="longitude" + value="{% match conf.beacon.longitude %}{% when Some with (val) %}{{ val }}{% when None %}{% endmatch %}"> + </div> + <div><label for="altitude">Altitude:</label> + <input class="textinput" type="text" name="altitude" + value="{% match conf.beacon.altitude %}{% when Some with (val) %}{{ val }}{% when None %}{% endmatch %}"> + </div> + <div><label for="comment">Comment:</label> + <input class="textinput" type="text" name="comment" + value="{% match conf.beacon.comment %}{% when Some with (val) %}{{ val }}{% when None %}{% endmatch %}"> + </div> + <div><label for="antenna_height">Ant height:</label> + <input class="textinput" type="text" name="antenna_height" + value="{% match conf.beacon.antenna_height %}{% when Some with (val) %}{{ val }}{% when None %}{% endmatch %}"> + </div> + <div><label for="antenna_gain">Ant gain:</label> + <input class="textinput" type="text" name="antenna_gain" + value="{% match conf.beacon.antenna_gain %}{% when Some with (val) %}{{ val }}{% when None %}{% endmatch %}"> + </div> + <div><label for="tx_power">TX power [dBm]:</label> + <input class="textinput" type="text" name="tx_power" + value="{% match conf.beacon.tx_power %}{% when Some with (val) %}{{ val }}{% when None %}{% endmatch %}"> + </div> + </fieldset> + <fieldset> + <legend>IP Tunnel</legend> + <div><label for="tunnel_enabled">Enabled:</label><input type="checkbox" name="tunnel_enabled" {% if conf.tunnel.enabled %} checked {% endif %}></div> + <div><label for="local_ip">Local IP:</label><input class="textinput" type="text" name="local_ip" value="{{ conf.tunnel.local_ip }}"></div> + <div><label for="netmask">Netmask:</label><input class="textinput" type="text" name="netmask" value="{{ conf.tunnel.netmask }}"></div> + </fieldset> + <div><input class="btn" type="submit" value="Update"></div> </form> </div> |