Skip to content

Commit

Permalink
fix dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharkboy-j committed Dec 3, 2024
1 parent 79cd034 commit 343659b
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 7 deletions.
133 changes: 126 additions & 7 deletions dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
"type": "special"
}
],
"max": 41.2,
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
Expand Down Expand Up @@ -456,7 +456,7 @@
"gridPos": {
"h": 4,
"w": 2,
"x": 17,
"x": 16,
"y": 0
},
"id": 18,
Expand Down Expand Up @@ -571,7 +571,7 @@
"gridPos": {
"h": 4,
"w": 2,
"x": 19,
"x": 18,
"y": 0
},
"id": 9,
Expand Down Expand Up @@ -636,7 +636,7 @@
"tags": []
}
],
"title": "UPS Battery Volts",
"title": "Battery Volts",
"type": "gauge"
},
{
Expand All @@ -660,7 +660,126 @@
"type": "special"
}
],
"max": 41.2,
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#d44a3a",
"value": null
},
{
"color": "dark-red",
"value": 0
},
{
"color": "orange",
"value": 30
},
{
"color": "dark-green",
"value": 70
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 2,
"x": 20,
"y": 0
},
"id": 22,
"maxDataPoints": 100,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "/^upsEBatteryEstimatedChargeRemaining$/",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.0.0",
"targets": [
{
"alias": "$col",
"datasource": {
"type": "influxdb",
"uid": "ddp38pe3t92wwc"
},
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "synoSystem",
"orderByTime": "ASC",
"policy": "default",
"query": "from(bucket: \"ups\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"ups_data\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"upsEBatteryEstimatedChargeRemaining\" ) \r\n |> map(fn: (r) => ({\r\n _time: r._time,\r\n _value: \r\n if r[\"_field\"] == \"upsEBatteryEstimatedChargeRemaining\" then float(v: r._value) \r\n else float(v: r._value),\r\n _field: r._field,\r\n _measurement: r._measurement\r\n }))\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> yield(name: \"mean\")\r\n",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"upsBatteryCharge"
],
"type": "field"
},
{
"params": [],
"type": "last"
}
]
],
"tags": []
}
],
"title": "Battery Charge",
"type": "gauge"
},
{
"datasource": {
"type": "influxdb",
"uid": "ddp38pe3t92wwc"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
Expand Down Expand Up @@ -690,7 +809,7 @@
"gridPos": {
"h": 4,
"w": 2,
"x": 21,
"x": 22,
"y": 0
},
"id": 21,
Expand Down Expand Up @@ -1285,6 +1404,6 @@
"timezone": "browser",
"title": "UPS",
"uid": "be5qevsfuwc8we",
"version": 28,
"version": 32,
"weekStart": ""
}
Binary file modified img/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 343659b

Please sign in to comment.