Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grafana 11.2.3, welcome dashboard, performance improvements, quality / consistency improvements, (re)allow dashboard editing #4338

Merged
merged 12 commits into from
Nov 5, 2024
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

### Improvements and bug fixes

- feat: use Grafana 11.2.3

#### Build, CI, internal

- ci: remove unknown flag --ref for gh cache delete in cleanup_caches workflow ([3a515df](https://github.com/teslamate-org/teslamate/commit/3a515df5aa400139acf8ef638e5ae37339c553cf) - @JakobLichterfeld)
Expand All @@ -15,6 +17,11 @@

#### Dashboards

- fix: allow editing of dashboards - [changes will be overwritten on update](https://grafana.com/docs/grafana/latest/administration/provisioning/#making-changes-to-a-provisioned-dashboard)
- fix: ensure max speed panels are converted according to length unit setting in drive stats dashboard
- perf: speed up queries used to calculate max speed in drive stats dashboard
- feat: add a welcome dashboard

#### Translations

#### Documentation
Expand Down
3 changes: 2 additions & 1 deletion grafana/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure selecting a tag that is available for arm/v7, arm64, and amd64
# https://hub.docker.com/r/grafana/grafana/tags
FROM grafana/grafana:11.0.6-security-01
FROM grafana/grafana:11.2.3

ENV GF_ANALYTICS_REPORTING_ENABLED=false \
GF_AUTH_ANONYMOUS_ENABLED=false \
Expand All @@ -12,6 +12,7 @@ ENV GF_ANALYTICS_REPORTING_ENABLED=false \
GF_USERS_ALLOW_SIGN_UP=false \
GF_USERS_DEFAULT_LANGUAGE=detect \
GF_DATE_FORMATS_USE_BROWSER_LOCALE=true \
GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/dashboards_internal/home.json \
DATABASE_PORT=5432 \
DATABASE_SSL_MODE=disable

Expand Down
6 changes: 3 additions & 3 deletions grafana/dashboards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ providers:
folderUid: Nr4ofiDZk
type: file
disableDeletion: false
editable: true
allowUiUpdates: true
updateIntervalSeconds: 86400
options:
path: /dashboards
Expand All @@ -17,7 +17,7 @@ providers:
folderUid: Nr5ofiDZk
type: file
disableDeletion: false
editable: true
allowUiUpdates: true
updateIntervalSeconds: 86400
options:
path: /dashboards_internal
Expand All @@ -27,7 +27,7 @@ providers:
folderUid: Nr6ofiDZk
type: file
disableDeletion: false
editable: true
allowUiUpdates: true
updateIntervalSeconds: 86400
options:
path: /dashboards_reports
114 changes: 84 additions & 30 deletions grafana/dashboards/battery-health.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "11.1.0"
"version": "11.2.3"
},
{
"type": "datasource",
Expand Down Expand Up @@ -150,7 +150,7 @@
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "11.1.0",
"pluginVersion": "11.2.3",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -298,7 +298,7 @@
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "11.1.0",
"pluginVersion": "11.2.3",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -402,7 +402,7 @@
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "11.1.0",
"pluginVersion": "11.2.3",
"targets": [
{
"datasource": {
Expand All @@ -414,7 +414,7 @@
"hide": false,
"rawQuery": true,
"rawSql": "select ROUND(convert_km(sum(distance)::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\r\nfrom drives \r\nwhere car_id = $car_id;\r\n",
"refId": "Looged",
"refId": "Logged",
"sql": {
"columns": [
{
Expand Down Expand Up @@ -658,7 +658,6 @@
"sort": "none"
}
},
"pluginVersion": "8.5.6",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -774,7 +773,7 @@
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.1.0",
"pluginVersion": "11.2.3",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -873,7 +872,7 @@
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.1.0",
"pluginVersion": "11.2.3",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -999,7 +998,7 @@
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "11.1.0",
"pluginVersion": "11.2.3",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -1246,7 +1245,7 @@
"text": {},
"valueMode": "color"
},
"pluginVersion": "11.1.0",
"pluginVersion": "11.2.3",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -1441,7 +1440,7 @@
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "11.1.0",
"pluginVersion": "11.2.3",
"targets": [
{
"datasource": {
Expand All @@ -1453,7 +1452,7 @@
"hide": false,
"rawQuery": true,
"rawSql": "SELECT ('$aux'::json -> 'RatedEfficiency')::text::float * \r\n CASE \r\n WHEN '$length_unit' = 'km' THEN 10\r\n WHEN '$length_unit' = 'mi' THEN 16.0934 \r\n END AS efficiency_$length_unit",
"refId": "Looged",
"refId": "Logged",
"sql": {
"columns": [
{
Expand Down Expand Up @@ -1541,7 +1540,7 @@
"text": {},
"valueMode": "color"
},
"pluginVersion": "11.1.0",
"pluginVersion": "11.2.3",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -1631,14 +1630,17 @@
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"fillOpacity": 50,
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"pointShape": "circle",
"pointSize": {
"fixed": 6
},
"pointStrokeWidth": 1,
"scaleDistribution": {
"type": "linear"
},
Expand Down Expand Up @@ -1675,6 +1677,33 @@
"value": "lines"
}
]
},
{
"matcher": {
"id": "byName",
"options": "kWh"
},
"properties": [
{
"id": "custom.pointSize.fixed",
"value": 5
}
]
},
{
"matcher": {
"id": "byName",
"options": "M-kWh"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-red",
"mode": "fixed"
}
}
]
}
]
},
Expand All @@ -1692,37 +1721,62 @@
"placement": "bottom",
"showLegend": false
},
"mapping": "manual",
"series": [
{
"name": "Odometer",
"pointColor": {
"field": "kWh"
"color": {
"matcher": {
"id": "byName",
"options": "kWh"
}
},
"pointSize": {
"fixed": 5,
"max": 100,
"min": 1
"frame": {
"matcher": {
"id": "byIndex",
"options": 0
}
},
"x": "Odometer",
"y": "kWh"
"x": {
"matcher": {
"id": "byName",
"options": "Odometer"
}
},
"y": {
"matcher": {
"id": "byName",
"options": "kWh"
}
}
},
{
"name": "Median Odometer",
"pointColor": {
"fixed": "dark-red"
"frame": {
"matcher": {
"id": "byIndex",
"options": 1
}
},
"x": "M-Odometer",
"y": "M-kWh"
"x": {
"matcher": {
"id": "byName",
"options": "M-Odometer"
}
},
"y": {
"matcher": {
"id": "byName",
"options": "M-kWh"
}
}
}
],
"seriesMapping": "manual",
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "8.5.6",
"pluginVersion": "11.2.3",
"targets": [
{
"alias": "",
Expand Down Expand Up @@ -1999,6 +2053,6 @@
"timezone": "browser",
"title": "Battery Health",
"uid": "jchmRiqUfXgTM",
"version": 11,
"version": 1,
"weekStart": ""
}
12 changes: 6 additions & 6 deletions grafana/dashboards/charge-level.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "11.1.0"
"version": "11.2.3"
},
{
"type": "datasource",
Expand Down Expand Up @@ -96,6 +96,7 @@
"axisLabel": "Charge Level",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "opacity",
Expand Down Expand Up @@ -163,7 +164,6 @@
"sort": "none"
}
},
"pluginVersion": "8.5.4",
"targets": [
{
"alias": "",
Expand Down Expand Up @@ -365,7 +365,7 @@
},
{
"current": {
"selected": true,
"selected": false,
"text": "2h",
"value": "7200"
},
Expand Down Expand Up @@ -399,7 +399,7 @@
},
{
"current": {
"selected": true,
"selected": false,
"text": "yes",
"value": "1"
},
Expand Down Expand Up @@ -427,7 +427,7 @@
},
{
"current": {
"selected": true,
"selected": false,
"text": "1/6 of interval",
"value": "6"
},
Expand Down Expand Up @@ -507,6 +507,6 @@
"timezone": "",
"title": "Charge Level",
"uid": "WopVO_mgz",
"version": 22,
"version": 1,
"weekStart": ""
}
Loading
Loading