Hide LQM advanced options when LQM is off (#1510)

This commit is contained in:
Tim Wilkinson 2024-09-14 20:08:40 -07:00 committed by GitHub
parent 4b8aea0bc1
commit 60be6b812a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 86 additions and 82 deletions

View File

@ -473,89 +473,93 @@ if (request.env.REQUEST_METHOD === "DELETE") {
{{_R("dialog-advanced")}} {{_R("dialog-advanced")}}
<div> <div>
{% if (includeAdvanced) { %} {% if (includeAdvanced) { %}
<div class="cols"> <div class="hideable" data-hideable='{{uciMesh.get("aredn", "@lqm[0]", "enable") === "1" ? "on" : "off"}}'>
<div> <div class="cols">
<div class="o">LQM enable</div> <div>
<div class="m">Enable Link Quality Management</div> <div class="o">LQM enable</div>
<div class="m">Enable Link Quality Management</div>
</div>
<div style="flex:0">
{{_R("hideable-switch", { name: "radio_lqm_enable", value: uciMesh.get("aredn", "@lqm[0]", "enable") !== "0" })}}
</div>
</div> </div>
<div style="flex:0"> {{_H("Link Quality Management (LQM) is an automatic management system which monitors the efficiency of each neighbor link
{{_R("switch", { name: "radio_lqm_enable", value: uciMesh.get("aredn", "@lqm[0]", "enable") !== "0" })}} and optimizes their use for best performance. When disabled, it still gathers data on each link, but this information is
</div> not used to effect operation.")}}
</div> <div class="hideable0">
{{_H("Link Quality Management (LQM) is an automatic management system which monitors the efficiency of each neighbor link {% if (hasradios) { %}
and optimizes their use for best performance. When disabled, it still gathers data on each link, but this information is <div class="cols">
not used to effect operation.")}} <div>
{% if (hasradios) { %} <div class="o">Minimum Distance</div>
<div class="cols"> <div class="m">Minimum distance to other nodes in {{units.distanceUnit()}}</div>
<div> </div>
<div class="o">Minimum Distance</div> <div style="flex:0">
<div class="m">Minimum distance to other nodes in {{units.distanceUnit()}}</div> <input hx-put="{{request.env.REQUEST_URI}}" name="radio_mindistance" type="text" size="3" pattern="\d+" value="{{int(0.5 + units.meters2distance(uciMesh.get("aredn", "@lqm[0]", "min_distance")))}}">
</div> </div>
<div style="flex:0"> </div>
<input hx-put="{{request.env.REQUEST_URI}}" name="radio_mindistance" type="text" size="3" pattern="\d+" value="{{int(0.5 + units.meters2distance(uciMesh.get("aredn", "@lqm[0]", "min_distance")))}}"> {{_H("Exclude nodes which are too close to this node.")}}
</div> <div class="cols">
</div> <div>
{{_H("Exclude nodes which are too close to this node.")}} <div class="o">RTS Threshold</div>
<div class="cols"> <div class="m">RTS Threshold in bytes before using RTS/CTS when hidden nodes are detected</div>
<div> </div>
<div class="o">RTS Threshold</div> <div style="flex:0">
<div class="m">RTS Threshold in bytes before using RTS/CTS when hidden nodes are detected</div> <input hx-put="{{request.env.REQUEST_URI}}" name="radio_rts_threshold" type="text" size="4" pattern="([1-9]|[1-9]\d{1,2}|1\d{3}|2[0-2]\d{2}|23[0-3]\d|234[0-7])" value="{{uciMesh.get("aredn", "@lqm[0]", "rts_threshold")}}">
</div> </div>
<div style="flex:0"> </div>
<input hx-put="{{request.env.REQUEST_URI}}" name="radio_rts_threshold" type="text" size="4" pattern="([1-9]|[1-9]\d{1,2}|1\d{3}|2[0-2]\d{2}|23[0-3]\d|234[0-7])" value="{{uciMesh.get("aredn", "@lqm[0]", "rts_threshold")}}"> {{_H("When hidden nodes are detected, the RTS/CTS protocol is automatically enabled to improve performance. By default this is used for all packets
</div> being sent, but this can be optimized to only packets over a specific size (between 1 and 2347 bytes). Setting the value to
</div> 2347 disables the protocol.")}}
{{_H("When hidden nodes are detected, the RTS/CTS protocol is automatically enabled to improve performance. By default this is used for all packets <div class="cols">
being sent, but this can be optimized to only packets over a specific size (between 1 and 2347 bytes). Setting the value to <div>
2347 disables the protocol.")}} <div class="o">Max Packet Size</div>
<div class="cols"> <div class="m">Maximum packet size in bytes sent over WiFi</div>
<div> </div>
<div class="o">Max Packet Size</div> <div style="flex:0">
<div class="m">Maximum packet size in bytes sent over WiFi</div> <input hx-put="{{request.env.REQUEST_URI}}" name="radio_mtu" type="text" size="4" pattern="(25[6-9]|2[6-9]\d|[3-9]\d{2}|1[0-4]\d{2}|1500)" placeholder="1500" value="{{uciMesh.get("aredn", "@lqm[0]", "mtu")}}">
</div> </div>
<div style="flex:0"> </div>
<input hx-put="{{request.env.REQUEST_URI}}" name="radio_mtu" type="text" size="4" pattern="(25[6-9]|2[6-9]\d|[3-9]\d{2}|1[0-4]\d{2}|1500)" placeholder="1500" value="{{uciMesh.get("aredn", "@lqm[0]", "mtu")}}"> {{_H("By default, WiFi uses the same packet size (1500 bytes) as Ethernet. However, in some noisy environment performance can be
</div> improved by reducing the packet size. A value must be between 256 and 1500.")}}
</div> <div class="cols">
{{_H("By default, WiFi uses the same packet size (1500 bytes) as Ethernet. However, in some noisy environment performance can be <div>
improved by reducing the packet size. A value must be between 256 and 1500.")}} <div class="o">SNR Margin</div>
<div class="cols"> <div class="m">SNR Margin in dB above Min SNR a signal must reach to be re-activated</div>
<div> </div>
<div class="o">SNR Margin</div> <div style="flex:0">
<div class="m">SNR Margin in dB above Min SNR a signal must reach to be re-activated</div> <input hx-put="{{request.env.REQUEST_URI}}" name="radio_margin_snr" type="text" size="1" pattern="\d" value="{{uciMesh.get("aredn", "@lqm[0]", "margin_snr")}}">
</div> </div>
<div style="flex:0"> </div>
<input hx-put="{{request.env.REQUEST_URI}}" name="radio_margin_snr" type="text" size="1" pattern="\d" value="{{uciMesh.get("aredn", "@lqm[0]", "margin_snr")}}"> {{_H("The SNR margin avoids a link switching quickly between blocked and unblocked when the SNR is the same as the minimum SNR. Once
</div> a link falls below the minimum SNR, it must move above minimum SNR + SNR margin to become active again.")}}
</div> {% } %}
{{_H("The SNR margin avoids a link switching quickly between blocked and unblocked when the SNR is the same as the minimum SNR. Once <div class="cols">
a link falls below the minimum SNR, it must move above minimum SNR + SNR margin to become active again.")}} <div>
{% } %} <div class="o">Quality Margin</div>
<div class="cols"> <div class="m">Quality Margin percentage increase before neighbor can be re-activated</div>
<div> </div>
<div class="o">Quality Margin</div> <div style="flex:0">
<div class="m">Quality Margin percentage increase before neighbor can be re-activated</div> <input hx-put="{{request.env.REQUEST_URI}}" name="radio_margin_quality" type="text" size="2" pattern="\d\d?" value="{{uciMesh.get("aredn", "@lqm[0]", "margin_quality")}}">
</div> </div>
<div style="flex:0"> </div>
<input hx-put="{{request.env.REQUEST_URI}}" name="radio_margin_quality" type="text" size="2" pattern="\d\d?" value="{{uciMesh.get("aredn", "@lqm[0]", "margin_quality")}}"> <div class="cols">
</div> <div>
</div> <div class="o">Ping Penalty</div>
<div class="cols"> <div class="m">Ping Penalty quality percentage to add when neighbor cannot be pinged</div>
<div> </div>
<div class="o">Ping Penalty</div> <div style="flex:0">
<div class="m">Ping Penalty quality percentage to add when neighbor cannot be pinged</div> <input hx-put="{{request.env.REQUEST_URI}}" name="radio_ping_penalty" type="text" size="2" pattern="\d\d?" value="{{uciMesh.get("aredn", "@lqm[0]", "ping_penalty")}}">
</div> </div>
<div style="flex:0"> </div>
<input hx-put="{{request.env.REQUEST_URI}}" name="radio_ping_penalty" type="text" size="2" pattern="\d\d?" value="{{uciMesh.get("aredn", "@lqm[0]", "ping_penalty")}}"> <div class="cols">
</div> <div>
</div> <div class="o">Minimum Routes</div>
<div class="cols"> <div class="m">Minimum number of routes on a link required to disable blocking</div>
<div> </div>
<div class="o">Minimum Routes</div> <div style="flex:0">
<div class="m">Minimum number of routes on a link required to disable blocking</div> <input hx-put="{{request.env.REQUEST_URI}}" name="radio_min_routes" type="text" size="2" pattern="\d\d?" value="{{uciMesh.get("aredn", "@lqm[0]", "min_routes")}}">
</div> </div>
<div style="flex:0"> </div>
<input hx-put="{{request.env.REQUEST_URI}}" name="radio_min_routes" type="text" size="2" pattern="\d\d?" value="{{uciMesh.get("aredn", "@lqm[0]", "min_routes")}}">
</div> </div>
</div> </div>
{% } %} {% } %}