Browse Source

sns: the rest of magnitude settings

As mentioned in the #2491
Hides parent element when these groups are empty
pull/2516/head
Maxim Prokhorov 2 years ago
parent
commit
3275f4921f
23 changed files with 13677 additions and 13603 deletions
  1. BIN
      code/espurna/data/index.all.html.gz
  2. BIN
      code/espurna/data/index.curtain.html.gz
  3. BIN
      code/espurna/data/index.garland.html.gz
  4. BIN
      code/espurna/data/index.light.html.gz
  5. BIN
      code/espurna/data/index.lightfox.html.gz
  6. BIN
      code/espurna/data/index.rfbridge.html.gz
  7. BIN
      code/espurna/data/index.rfm69.html.gz
  8. BIN
      code/espurna/data/index.sensor.html.gz
  9. BIN
      code/espurna/data/index.small.html.gz
  10. BIN
      code/espurna/data/index.thermostat.html.gz
  11. +1950
    -1936
      code/espurna/static/index.all.html.gz.h
  12. +1432
    -1432
      code/espurna/static/index.curtain.html.gz.h
  13. +1063
    -1063
      code/espurna/static/index.garland.html.gz.h
  14. +1648
    -1647
      code/espurna/static/index.light.html.gz.h
  15. +1354
    -1354
      code/espurna/static/index.lightfox.html.gz.h
  16. +1100
    -1099
      code/espurna/static/index.rfbridge.html.gz.h
  17. +1104
    -1103
      code/espurna/static/index.rfm69.html.gz.h
  18. +1505
    -1492
      code/espurna/static/index.sensor.html.gz.h
  19. +1376
    -1376
      code/espurna/static/index.small.html.gz.h
  20. +1087
    -1087
      code/espurna/static/index.thermostat.html.gz.h
  21. +4
    -0
      code/html/custom.css
  22. +21
    -2
      code/html/custom.js
  23. +33
    -12
      code/html/index.html

BIN
code/espurna/data/index.all.html.gz View File


BIN
code/espurna/data/index.curtain.html.gz View File


BIN
code/espurna/data/index.garland.html.gz View File


BIN
code/espurna/data/index.light.html.gz View File


BIN
code/espurna/data/index.lightfox.html.gz View File


BIN
code/espurna/data/index.rfbridge.html.gz View File


BIN
code/espurna/data/index.rfm69.html.gz View File


BIN
code/espurna/data/index.sensor.html.gz View File


BIN
code/espurna/data/index.small.html.gz View File


BIN
code/espurna/data/index.thermostat.html.gz View File


+ 1950
- 1936
code/espurna/static/index.all.html.gz.h
File diff suppressed because it is too large
View File


+ 1432
- 1432
code/espurna/static/index.curtain.html.gz.h
File diff suppressed because it is too large
View File


+ 1063
- 1063
code/espurna/static/index.garland.html.gz.h
File diff suppressed because it is too large
View File


+ 1648
- 1647
code/espurna/static/index.light.html.gz.h
File diff suppressed because it is too large
View File


+ 1354
- 1354
code/espurna/static/index.lightfox.html.gz.h
File diff suppressed because it is too large
View File


+ 1100
- 1099
code/espurna/static/index.rfbridge.html.gz.h
File diff suppressed because it is too large
View File


+ 1104
- 1103
code/espurna/static/index.rfm69.html.gz.h
File diff suppressed because it is too large
View File


+ 1505
- 1492
code/espurna/static/index.sensor.html.gz.h
File diff suppressed because it is too large
View File


+ 1376
- 1376
code/espurna/static/index.small.html.gz.h
File diff suppressed because it is too large
View File


+ 1087
- 1087
code/espurna/static/index.thermostat.html.gz.h
File diff suppressed because it is too large
View File


+ 4
- 0
code/html/custom.css View File

@ -73,6 +73,10 @@ h2 {
display: none;
}
.maybe-hidden {
display: none;
}
input[name=upgrade] {
display: none;
}


+ 21
- 2
code/html/custom.js View File

@ -1792,7 +1792,7 @@ function createMagnitudeUnitSelector(id, magnitude) {
setOriginalsFromValuesForNode(line, [select]);
const container = document.getElementById("magnitude-units");
container.style.display = "block";
container.parentElement.classList.remove("maybe-hidden");
mergeTemplate(container, line);
}
}
@ -1827,7 +1827,9 @@ function initMagnitudeTextSetting(containerId, id, keySuffix, value) {
label.textContent = info.name;
label.htmlFor = input.id;
mergeTemplate(document.getElementById(containerId), template);
const container = document.getElementById(containerId);
container.parentElement.classList.remove("maybe-hidden");
mergeTemplate(container, template);
}
function initMagnitudesRatio(id, value) {
@ -1917,6 +1919,23 @@ function initMagnitudesSettings(data) {
if (settings.Correction !== null) {
initMagnitudesCorrection(id, settings.Correction);
}
let threshold = settings.ZeroThreshold;
if (threshold === null) {
threshold = NaN;
}
initMagnitudeTextSetting(
"magnitude-zero-thresholds", id,
"ZeroThreshold", threshold);
initMagnitudeTextSetting(
"magnitude-min-deltas", id,
"MinDelta", settings.MinDelta);
initMagnitudeTextSetting(
"magnitude-max-deltas", id,
"MaxDelta", settings.MaxDelta);
});
}


+ 33
- 12
code/html/index.html View File

@ -1900,12 +1900,6 @@
</div>
</fieldset>
<fieldset>
<legend>Corrections</legend>
<div id="magnitude-corrections" class="pure-form-aligned settings-group">
</div>
</fieldset>
<fieldset class="module module-emon">
<legend>Ratios</legend>
<div id="emon-ratios" class="pure-form-aligned settings-group">
@ -1916,12 +1910,6 @@
</div>
</fieldset>
<fieldset>
<legend>Units</legend>
<div id="magnitude-units" class="pure-form-aligned settings-group">
</div>
</fieldset>
<fieldset class="module module-emon">
<legend>Energy monitor</legend>
@ -1935,6 +1923,39 @@
</fieldset>
<fieldset class="maybe-hidden">
<legend>Units</legend>
<div id="magnitude-units" class="pure-form-aligned settings-group">
</div>
</fieldset>
<fieldset class="maybe-hidden">
<legend>Corrections</legend>
<div id="magnitude-corrections" class="pure-form-aligned settings-group">
</div>
</fieldset>
<fieldset>
<legend>Zero threshold</legend>
<span class="pure-form-message">Report only when the value is above this threshold. Set to <code>NaN</code> (default) to disable.</span>
<div id="magnitude-zero-thresholds" class="pure-form-aligned settings-group">
</div>
</fieldset>
<fieldset>
<legend>Report - minimum delta</legend>
<span class="pure-form-message">Report only when the value changed at least this much (absolute difference)</span>
<div id="magnitude-min-deltas" class="pure-form-aligned settings-group">
</div>
</fieldset>
<fieldset>
<legend>Report - reading maximum delta</legend>
<span class="pure-form-message">Try to report on every reading, when the value changes at least this much (absolute difference)</span>
<div id="magnitude-max-deltas" class="pure-form-aligned settings-group">
</div>
</fieldset>
</div>
</div>


Loading…
Cancel
Save