prototype: dashed lineStyle against real InfluxDB time series #33
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: spike / prototype
Depends on: none
Estimate: S (½ day)
Slice — layers touched
InfluxDB write → Grafana panel override → visual confirmation.
Context
PRD Open Question O-2. Two open Grafana bugs (#75259, #86546) affect
fieldConfig.custom.lineStyle. Need to confirm the dashed-bounds pattern actually renders before committing the dependent dashed-bounds issue.Scope
flow,flow.min,flow.max) for ~5 minutes into the existingtelemetrybucket via a Node-RED inject + influxdb-out (no EVOLV code change).fieldConfig.overrides[]matchingbyName: "flow.min"and"flow.max"tocustom.lineStyle = {fill: "dash", dash: [10,10]}.Out of scope
Acceptance criteria
lineStyleper F-10" OR "fallback to ."Spike findings: confirmed —
custom.lineStyleworks for dynamic dashed boundsVerdict: confirmed.
What I did
Wrote 5 minutes (300 points @ 1 Hz) of
spike_boundsmeasurement with three Influx fields (flow,flow.min,flow.max) viaPOST /api/v2/writewith line protocol. Authored a Grafana time-series panel JSON withfieldConfig.overrides[].matcher = byNamematchingflow.minandflow.maxtocustom.lineStyle = {fill: "dash", dash: [10, 10]}, plus distinct colors per series. POSTed viaPOST /api/dashboards/dbwithoverwrite: true. Rendered headless via Playwright + Chromium.Evidence
Visual outcome:
flow(actual oscillating ~30..70)flow.max(upper bound, time-varying with cosine)flow.min(lower bound, time-varying with sine)Screenshot lives in repo at
.prototypes/spike-dashed-bounds/screenshot.png(gitignored).Decision points worth recording in issue #38
Influx field names with dots work.
flow,flow.min,flow.maxround-trip cleanly through line protocol → Flux query → Grafana. No pivot needed when using|> keep(columns: ["_time","_value","_field"])— Grafana renders each_fieldvalue as a separate series andbyNamematches on the field name.Use
byRegexpfor a generic rule, not per-fieldbyNameoverrides. Production EVOLV fields are 4-segmenttype.variant.position.childId(e.g.flow.predicted.downstream.default). The per-field-name override pattern would balloon to one override per quantity. Better: one regexp override matching\.min$and one matching\.max$:This rule lives once in the template fragment for any panel that supports bounds, regardless of how many quantities are plotted.
Field-name collision risk. If any real EVOLV field already ends in
.minor.maxfor unrelated reasons, the generic regexp would dash them too. Quick scan againstnodes/generalFunctions/src/helper/outputUtils.jsand the MeasurementContainer keys is recommended before committing to the.min/.maxsuffix convention. If collisions exist, fall back to_min/_maxsuffix or a dedicated tag.Single-bucket Influx works fine. No need for a separate bucket for bounds — same
_measurement = nodeName, same tags, just additional_fieldentries. Existing Influx schema in PRD is unaffected.Recommendation for issue #38
Use
lineStyleper F-10. Adopt thebyRegexp\.min$/\.max$matcher pattern inrotatingMachine.jsontemplate so the rule is generic across quantities. Before merging: grep the field-name convention to rule out collisions.Prototype location (do not import)
.prototypes/spike-dashed-bounds/— dashboard.json, screenshot.png