Skip to content

Commit

Permalink
Add date to summary template
Browse files Browse the repository at this point in the history
* Also update dashboard
  • Loading branch information
Wason1797 committed Dec 24, 2024
1 parent 30fcd77 commit b82b785
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 13 additions & 4 deletions dashboard/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.2.3"
"version": "11.2.0"
},
{
"type": "datasource",
Expand Down Expand Up @@ -76,6 +76,7 @@
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
Expand Down Expand Up @@ -303,6 +304,7 @@
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
Expand Down Expand Up @@ -532,6 +534,7 @@
"axisSoftMax": 1250,
"axisSoftMin": 200,
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
Expand Down Expand Up @@ -741,6 +744,7 @@
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
Expand Down Expand Up @@ -950,6 +954,7 @@
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
Expand Down Expand Up @@ -1159,6 +1164,7 @@
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
Expand Down Expand Up @@ -1388,6 +1394,7 @@
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
Expand Down Expand Up @@ -1617,6 +1624,7 @@
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
Expand Down Expand Up @@ -1822,6 +1830,7 @@
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
Expand Down Expand Up @@ -2043,7 +2052,7 @@
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "10.2.3",
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -2154,7 +2163,7 @@
"type": "gauge"
}
],
"refresh": "",
"refresh": "1m",
"schemaVersion": 39,
"tags": [],
"templating": {
Expand Down Expand Up @@ -2211,6 +2220,6 @@
"timezone": "",
"title": "AIQ Data Dashboard",
"uid": "c5fa12e4-5d12-4cb0-8abb-342a0db016fd",
"version": 9,
"version": 2,
"weekStart": ""
}
2 changes: 2 additions & 0 deletions server/app/managers/aiq_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

SUMMARY_TEMPLATE = """
Row Count: {}
Last Date: {}
{}
{}
{}
Expand Down Expand Up @@ -93,6 +94,7 @@ def _render_summary_template(data: StationData, count: int) -> str:

return SUMMARY_TEMPLATE.format(
count,
datetime.fromtimestamp(float(data.timestamp), timezone.utc).strftime(r"%d/%m/%Y, %H:%M:%S"),
scd41_summary,
ens160_summary,
svm41_summary,
Expand Down

0 comments on commit b82b785

Please sign in to comment.