You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For local host Grafana, can install the plugin using a terminal command:
grafana-cli plugins install pr0ps-trackmap-panel
For remote-host Grafana, create instructions for how to add the plugin.
Detect from the sensor that this is a GPS sensor when the sensor is created in the UI
Build special SQL query for the TrackMap plugin:
SELECT timestamp as "time",
cast(value->'result'->'latitude' AS float) AS lat,
cast(value->'result'->'longitude' AS float) AS lon
FROM ag_data_agmeasurement
WHERE $__timeFilter("timestamp")
AND sensor_id_id=1
AND "event_uuid_id"='f64d1e21-22f7-4245-8a2d-dcbb7fef8df9'
ORDER BY timestamp
Definition of Done
tbd
The text was updated successfully, but these errors were encountered:
1. Add an attribute to the AGSensorType model: graph_type. Graph type stores a string representing the graph type. Current options are: graph (simple line graph), map (for GPS sensors), and gauge (for single-value readings, e.g. speed). Add migrations file for the model change.
2. Update the Grafana class to support creating 3 panel types: regular graph (type that was made previously), map (using the TrackMap plugin), and gauge.
a. Update Grafana.create_panel_query to create a special type of query if panel_type=="map". The TrackMap plugin requires specific field names, while graph and gauge types can be built using the previous approach.
b. Update Grafana.create_panel_dict to take a new parameter, panel_type, and create a panel JSON object with the required attributes for that panel type.
c. Update Grafana.update_panel_sensor to update the graph type when the sensor is updated.
3. Update sensor.html, sensor.py, and sensor.js to support choosing graph type:
a. Allow the user to choose their graph type when creating a new sensor.
b. Allow the user to update their graph type when updating a new sensor.
c. When the user changes the select option, a picture illustrating the graph type is displayed. This works both when adding a new sensor and when updating an existing sensor.
d. If the user tries to create a map panel without exactly 2 fields, the sensor will not be created/updated and a warning will be shown.
4. Update gf_config.py. Grafana.update_dashboard_panels may throw a ValueError, which should be caught and passed to the user.
Other
1. Update the refresh rate to 1s when the dashboard is updated (previously when the dashboard was reset, the refresh time was being reset to 0.5 s.
2. Warn before deleting sensor - warn the user before a sensor is deleted that measurements will be deleted. Improved the previous warning implementation for updating a sensor.
User story
tbd
Acceptance criteria
Definition of Done
tbd
The text was updated successfully, but these errors were encountered: