Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 91 additions & 11 deletions grafana/dashboards/trip.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"overrides": []
},
"gridPos": {
"h": 13,
"h": 15,
"w": 13,
"x": 0,
"y": 1
Expand Down Expand Up @@ -474,7 +474,7 @@
]
},
"gridPos": {
"h": 8,
"h": 10,
"w": 5,
"x": 19,
"y": 1
Expand Down Expand Up @@ -1150,9 +1150,9 @@
},
"gridPos": {
"h": 2,
"w": 5,
"x": 19,
"y": 9
"w": 6,
"x": 13,
"y": 11
},
"id": 22,
"maxDataPoints": 100,
Expand Down Expand Up @@ -1234,6 +1234,86 @@
"title": "",
"type": "stat"
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
"defaults": {
"decimals": 2,
"displayName": "",
"mappings": [],
"noValue": "0",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "light-orange"
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 5,
"x": 19,
"y": 11
},
"id": 43,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "11.6.1",
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"rawQuery": true,
"rawSql": "SELECT \n(SELECT sum(cost) FROM charging_processes WHERE $__timeFilter(end_date) AND car_id = $car_id) /\n(SELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit')\nFROM positions\nWHERE car_id = $car_id AND $__timeFilter(date) AND ideal_battery_range_km IS NOT NULL\nORDER BY 1) * 100 AS \"Ø Cost per 100 $length_unit\"",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
}
],
"title": "",
"type": "stat"
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
Expand Down Expand Up @@ -1270,7 +1350,7 @@
"h": 3,
"w": 11,
"x": 13,
"y": 11
"y": 13
},
"id": 40,
"options": {
Expand Down Expand Up @@ -1488,7 +1568,7 @@
"h": 2,
"w": 24,
"x": 0,
"y": 14
"y": 16
},
"id": 20,
"options": {
Expand Down Expand Up @@ -1871,7 +1951,7 @@
"h": 11,
"w": 24,
"x": 0,
"y": 16
"y": 18
},
"id": 2,
"options": {
Expand Down Expand Up @@ -2335,7 +2415,7 @@
"h": 8,
"w": 24,
"x": 0,
"y": 27
"y": 29
},
"id": 36,
"options": {
Expand Down Expand Up @@ -2548,7 +2628,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 35
"y": 37
},
"id": 42,
"options": {
Expand Down Expand Up @@ -2714,7 +2794,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 35
"y": 37
},
"id": 8,
"options": {
Expand Down
Binary file modified website/static/screenshots/trip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading