mirror of
https://github.com/teslamate-org/teslamate.git
synced 2026-01-24 21:06:08 +08:00
* Add display_priority column to cars table * Respect display_priority in grafana, falling back to name * Use smallint for priority rather than int * Update missed dashboards to respect car priorities Co-authored-by: Lee Willis <lee@ademti-software.co.uk>
294 lines
6.4 KiB
JSON
294 lines
6.4 KiB
JSON
{
|
|
"annotations": {
|
|
"list": [
|
|
{
|
|
"builtIn": 1,
|
|
"datasource": "-- Grafana --",
|
|
"enable": true,
|
|
"hide": true,
|
|
"iconColor": "rgba(0, 211, 255, 1)",
|
|
"name": "Annotations & Alerts",
|
|
"type": "dashboard"
|
|
}
|
|
]
|
|
},
|
|
"editable": true,
|
|
"gnetId": null,
|
|
"graphTooltip": 0,
|
|
"iteration": 1598012324627,
|
|
"links": [
|
|
{
|
|
"icon": "dashboard",
|
|
"tags": [],
|
|
"title": "TeslaMate",
|
|
"tooltip": "",
|
|
"type": "link",
|
|
"url": "[[base_url:raw]]"
|
|
},
|
|
{
|
|
"asDropdown": true,
|
|
"icon": "external link",
|
|
"tags": ["tesla"],
|
|
"title": "Dashboards",
|
|
"type": "dashboards"
|
|
}
|
|
],
|
|
"panels": [
|
|
{
|
|
"collapsed": false,
|
|
"datasource": "TeslaMate",
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"id": 4,
|
|
"panels": [],
|
|
"repeat": "car_id",
|
|
"scopedVars": {
|
|
"car_id": {
|
|
"selected": true,
|
|
"text": "1",
|
|
"value": "1"
|
|
}
|
|
},
|
|
"title": "$car_id",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"aliasColors": {},
|
|
"bars": false,
|
|
"dashLength": 10,
|
|
"dashes": false,
|
|
"datasource": "TeslaMate",
|
|
"decimals": 2,
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {},
|
|
"links": []
|
|
},
|
|
"overrides": []
|
|
},
|
|
"fill": 1,
|
|
"fillGradient": 3,
|
|
"gridPos": {
|
|
"h": 21,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 1
|
|
},
|
|
"hiddenSeries": false,
|
|
"id": 2,
|
|
"legend": {
|
|
"alignAsTable": true,
|
|
"avg": true,
|
|
"current": false,
|
|
"max": true,
|
|
"min": true,
|
|
"rightSide": false,
|
|
"show": true,
|
|
"total": false,
|
|
"values": true
|
|
},
|
|
"lines": true,
|
|
"linewidth": 1,
|
|
"links": [],
|
|
"nullPointMode": "connected",
|
|
"options": {
|
|
"alertThreshold": true
|
|
},
|
|
"percentage": false,
|
|
"pluginVersion": "7.4.1",
|
|
"pointradius": 5,
|
|
"points": false,
|
|
"renderer": "flot",
|
|
"scopedVars": {
|
|
"car_id": {
|
|
"selected": true,
|
|
"text": "1",
|
|
"value": "1"
|
|
}
|
|
},
|
|
"seriesOverrides": [],
|
|
"spaceLength": 10,
|
|
"stack": false,
|
|
"steppedLine": true,
|
|
"targets": [
|
|
{
|
|
"alias": "",
|
|
"format": "time_series",
|
|
"group": [],
|
|
"hide": false,
|
|
"metricColumn": "none",
|
|
"rawQuery": true,
|
|
"rawSql": "SELECT\n\t$__time(date),\n\tbattery_level AS \"Battery Level [%]\",\n\tusable_battery_level AS \"Usable Battery Level [%]\"\nfrom positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n\tORDER BY Time ASC\n;",
|
|
"refId": "A",
|
|
"select": [
|
|
[
|
|
{
|
|
"params": ["value"],
|
|
"type": "column"
|
|
}
|
|
]
|
|
],
|
|
"timeColumn": "time",
|
|
"where": [
|
|
{
|
|
"name": "$__timeFilter",
|
|
"params": [],
|
|
"type": "macro"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"thresholds": [
|
|
{
|
|
"colorMode": "ok",
|
|
"fill": false,
|
|
"line": true,
|
|
"op": "gt",
|
|
"value": 80,
|
|
"yaxis": "left"
|
|
},
|
|
{
|
|
"colorMode": "ok",
|
|
"fill": false,
|
|
"line": true,
|
|
"op": "lt",
|
|
"value": 20,
|
|
"yaxis": "left"
|
|
}
|
|
],
|
|
"timeFrom": null,
|
|
"timeRegions": [],
|
|
"timeShift": null,
|
|
"title": "Charge Level",
|
|
"tooltip": {
|
|
"shared": true,
|
|
"sort": 0,
|
|
"value_type": "individual"
|
|
},
|
|
"type": "graph",
|
|
"xaxis": {
|
|
"buckets": null,
|
|
"mode": "time",
|
|
"name": null,
|
|
"show": true,
|
|
"values": []
|
|
},
|
|
"yaxes": [
|
|
{
|
|
"decimals": 0,
|
|
"format": "percent",
|
|
"label": "Charge Level",
|
|
"logBase": 1,
|
|
"max": "100",
|
|
"min": "0",
|
|
"show": true
|
|
},
|
|
{
|
|
"decimals": null,
|
|
"format": "percent",
|
|
"label": "Battery Level",
|
|
"logBase": 1,
|
|
"max": "200",
|
|
"min": null,
|
|
"show": false
|
|
}
|
|
],
|
|
"yaxis": {
|
|
"align": false,
|
|
"alignLevel": null
|
|
}
|
|
}
|
|
],
|
|
"refresh": false,
|
|
"schemaVersion": 27,
|
|
"style": "dark",
|
|
"tags": ["tesla"],
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"allValue": null,
|
|
"current": {
|
|
"selected": false,
|
|
"text": "1",
|
|
"value": "1"
|
|
},
|
|
"datasource": "TeslaMate",
|
|
"definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;",
|
|
"description": null,
|
|
"error": null,
|
|
"hide": 2,
|
|
"includeAll": true,
|
|
"label": "Car",
|
|
"multi": false,
|
|
"name": "car_id",
|
|
"options": [],
|
|
"query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"skipUrlSync": false,
|
|
"sort": 0,
|
|
"tagValuesQuery": "",
|
|
"tags": [],
|
|
"tagsQuery": "",
|
|
"type": "query",
|
|
"useTags": false
|
|
},
|
|
{
|
|
"allValue": null,
|
|
"current": {
|
|
"selected": false,
|
|
"text": "http://localhost:4000",
|
|
"value": "http://localhost:4000"
|
|
},
|
|
"datasource": "TeslaMate",
|
|
"definition": "select base_url from settings limit 1;",
|
|
"description": null,
|
|
"error": null,
|
|
"hide": 2,
|
|
"includeAll": false,
|
|
"label": "",
|
|
"multi": false,
|
|
"name": "base_url",
|
|
"options": [],
|
|
"query": "select base_url from settings limit 1;",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"skipUrlSync": false,
|
|
"sort": 0,
|
|
"tagValuesQuery": "",
|
|
"tags": [],
|
|
"tagsQuery": "",
|
|
"type": "query",
|
|
"useTags": false
|
|
}
|
|
]
|
|
},
|
|
"time": {
|
|
"from": "now-7d",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {
|
|
"refresh_intervals": [
|
|
"5s",
|
|
"10s",
|
|
"30s",
|
|
"1m",
|
|
"5m",
|
|
"15m",
|
|
"30m",
|
|
"1h",
|
|
"2h",
|
|
"1d"
|
|
],
|
|
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
|
|
},
|
|
"timezone": "",
|
|
"title": "Charge Level",
|
|
"uid": "WopVO_mgz",
|
|
"version": 1
|
|
}
|