Skip to content

Commit

Permalink
add stat for selected duration (#3667)
Browse files Browse the repository at this point in the history
  • Loading branch information
oivindoh authored Feb 13, 2024
1 parent 07670fa commit f929657
Showing 1 changed file with 80 additions and 14 deletions.
94 changes: 80 additions & 14 deletions grafana/dashboards/internal/drive-details.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@
"sort": "none"
}
},
"pluginVersion": "8.5.4",
"targets": [
{
"alias": "",
Expand Down Expand Up @@ -450,7 +449,6 @@
},
"textMode": "auto"
},
"pluginVersion": "8.5.6",
"targets": [
{
"format": "table",
Expand Down Expand Up @@ -483,13 +481,87 @@
],
"type": "stat"
},
{
"datasource": "TeslaMate",
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 1,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "semi-dark-blue",
"value": null
}
]
},
"unit": "dtdurations"
},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 3,
"x": 18,
"y": 0
},
"id": 34,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto",
"wideLayout": true
},
"targets": [
{
"datasource": "TeslaMate",
"editorMode": "code",
"format": "table",
"rawQuery": true,
"rawSql": "SELECT ${__to:date:seconds} - ${__from:date:seconds}",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
}
],
"title": "Selected duration",
"type": "stat"
},
{
"datasource": "TeslaMate",
"description": "",
"fieldConfig": {
"defaults": {
"decimals": 1,
"displayName": "Duration",
"mappings": [
{
"options": {
Expand All @@ -516,8 +588,8 @@
},
"gridPos": {
"h": 2,
"w": 6,
"x": 18,
"w": 3,
"x": 21,
"y": 0
},
"id": 14,
Expand All @@ -535,9 +607,9 @@
"fields": "",
"values": false
},
"textMode": "auto"
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "8.5.6",
"targets": [
{
"format": "table",
Expand Down Expand Up @@ -568,6 +640,7 @@
]
}
],
"title": "Drive duration",
"type": "stat"
},
{
Expand Down Expand Up @@ -623,7 +696,6 @@
},
"textMode": "auto"
},
"pluginVersion": "8.5.6",
"targets": [
{
"format": "table",
Expand Down Expand Up @@ -729,7 +801,6 @@
},
"textMode": "auto"
},
"pluginVersion": "8.5.6",
"targets": [
{
"format": "table",
Expand Down Expand Up @@ -1173,7 +1244,6 @@
"sort": "none"
}
},
"pluginVersion": "8.5.4",
"targets": [
{
"alias": "",
Expand Down Expand Up @@ -1327,7 +1397,6 @@
"sort": "none"
}
},
"pluginVersion": "8.5.4",
"targets": [
{
"datasource": "TeslaMate",
Expand Down Expand Up @@ -1587,7 +1656,6 @@
"sort": "none"
}
},
"pluginVersion": "8.5.4",
"targets": [
{
"datasource": "TeslaMate",
Expand Down Expand Up @@ -1673,7 +1741,6 @@
},
"textMode": "value_and_name"
},
"pluginVersion": "8.5.6",
"targets": [
{
"format": "table",
Expand Down Expand Up @@ -1749,7 +1816,6 @@
"text": {},
"textMode": "value_and_name"
},
"pluginVersion": "8.5.6",
"targets": [
{
"datasource": "TeslaMate",
Expand Down

0 comments on commit f929657

Please sign in to comment.