eclipse-basyx / basyx-aas-web-ui

Web-based user interface for managing and interacting with Asset Administration Shells (AAS)
MIT License
9 stars 7 forks source link

[FEATURE] Time Series Data Plugin dynamic time Settings #99

Open aaronzi opened 1 week ago

aaronzi commented 1 week ago

When using the Time Series Data SMT together with InfluxDB (LinkedSegment) with the following query

from(bucket: "basyx")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "float_metric")
  |> filter(fn: (r) => r["_field"] == "value")
  |> filter(fn: (r) => r["host"] == "basyx_host")
  |> filter(fn: (r) => r["topic"] == "EnvironmentalSensor/AirQuality" or r["topic"] == "EnvironmentalSensor/Humidity" or r["topic"] == "EnvironmentalSensor/Temperature")

an error is thrown because the range variables don't exist.

Describe the solution you'd like

When v.timeRangeStart and v.timeRangeStop are recognized in the query, they should be replaced by the LinkedSegment's StartTime and EndTime properties.