+14
−2
+72
−121
File changed.
Preview size limit exceeded, changes collapsed.
Loading
Introduce a two-axis per-element telemetry configuration system:
data-display="pill|plain|raw"
pill — colored Bootstrap badge (default for inline status badges)
plain — plain monospace text with semantic color (default for info_list)
raw — no-op (SVG elements, special cases)
data-map="bool_yesno|bool_onoff|open_state|camera_state|..."
Translates raw API values to display strings before styling.
Mirrors noctua.config.constants. Resolves the 0/1 ASCOM integer
ambiguity (e.g. dome shutter: 0=Open, 1=Closed via open_state map).
ui-core.js:
- Add noctuaMaps, applyMap(), resolveValue() (shared resolution
algorithm, eliminates copy-paste between status-stream and status-view)
- applyVarStatusStyles() now owns the full class (pill vs plain mode)
- UI_CONFIG.COLORS gains text_pill / text_plain per state
status-stream.js: use resolveValue(); apply map then transform pipeline
status-view.js: use resolveValue(); add data-transform support;
dynamically created <var> elements get data-display="plain"
widgets.html: emit data-display and data-map from config/item dicts
init.html: annotate boolean fields (bool_yesno), focuser (plain),
dome shutter (open_state)
control.html: same for focus, dome shutter, stage position
Co-Authored-By:
Claude Sonnet 4.6 <noreply@anthropic.com>
File changed.
Preview size limit exceeded, changes collapsed.