sns: report both used & supported units to the webui

Generic way to find out which units the magnitude type supports.
Clean-up UI related to temperature, energy and power units.
Resolves #2482

Also apply some refactoring to the 'schema'-generated
payloads by using the EnumerableConfig helper class.
Class received some new features:
- optional callback, verifying that index should be used at all
  specific use-case is magnitudes list that needs only 'counted' ones
- std::iota / ranges::iota_view -like helper object for sequences
  starting with something other than 0

Reordered payloads, prefer queueing over sending everything at once.
This commit is contained in:
Maxim Prokhorov
2021-10-24 14:10:14 +03:00
parent a2c02a38e5
commit eb59726b4f
9 changed files with 662 additions and 361 deletions

View File

@@ -64,7 +64,6 @@ h2 {
color:inherit;
}
legend.module,
.module {
display: none;
}