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

use lfp_battery setting in dashboards & speed up updates dashboard #4051

Merged
merged 2 commits into from
Jul 7, 2024
Merged
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
30 changes: 17 additions & 13 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.0.0"
"version": "11.1.0"
},
{
"type": "datasource",
Expand Down Expand Up @@ -138,6 +138,7 @@
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
Expand All @@ -149,7 +150,7 @@
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "11.0.0",
"pluginVersion": "11.1.0",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -285,6 +286,7 @@
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
Expand All @@ -296,7 +298,7 @@
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "11.0.0",
"pluginVersion": "11.1.0",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -370,6 +372,7 @@
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
Expand All @@ -381,7 +384,7 @@
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "11.0.0",
"pluginVersion": "11.1.0",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -753,7 +756,7 @@
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.0.0",
"pluginVersion": "11.1.0",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -852,7 +855,7 @@
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.0.0",
"pluginVersion": "11.1.0",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -966,6 +969,7 @@
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"mean"
Expand All @@ -977,7 +981,7 @@
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "11.0.0",
"pluginVersion": "11.1.0",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -1224,7 +1228,7 @@
"text": {},
"valueMode": "color"
},
"pluginVersion": "11.0.0",
"pluginVersion": "11.1.0",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -1285,7 +1289,7 @@
"format": "table",
"hide": false,
"rawQuery": true,
"rawSql": "SELECT\r\n 0 as lowest,\r\n 20 as lower,\r\n CASE\r\n WHEN substring(vin, 7, 1) = 'F' or (substring(vin, 0, 3) != 'LRW' and substring(vin, 8, 1) = 'S' and substring(vin, 7, 1) = 'E')\r\n THEN 100\r\n ELSE 81\r\n END as upper\r\nfrom cars ",
"rawSql": "SELECT\r\n 0 as lowest,\r\n 20 as lower,\r\n CASE WHEN lfp_battery THEN 100 ELSE 81 END as upper\r\nfrom cars inner join car_settings on cars.settings_id = car_settings.id\r\nwhere cars.id = $car_id",
"refId": "A",
"sql": {
"columns": [
Expand Down Expand Up @@ -1407,6 +1411,7 @@
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
Expand All @@ -1418,7 +1423,7 @@
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "11.0.0",
"pluginVersion": "11.1.0",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -1518,7 +1523,7 @@
"text": {},
"valueMode": "color"
},
"pluginVersion": "11.0.0",
"pluginVersion": "11.1.0",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -1970,13 +1975,12 @@
"from": "now-6h",
"to": "now"
},
"timeRangeUpdatedDuringEditOrView": false,
"timepicker": {
"hidden": true
},
"timezone": "browser",
"title": "Battery Health",
"uid": "jchmRiqUfXgTM",
"version": 7,
"version": 9,
"weekStart": ""
}
7 changes: 3 additions & 4 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.0.0"
"version": "11.1.0"
},
{
"type": "datasource",
Expand Down Expand Up @@ -206,7 +206,7 @@
"format": "table",
"hide": false,
"rawQuery": true,
"rawSql": "SELECT\r\n 20 as lower,\r\n CASE\r\n WHEN substring(vin, 7, 1) = 'F' or (substring(vin, 0, 3) != 'LRW' and substring(vin, 8, 1) = 'S' and substring(vin, 7, 1) = 'E')\r\n THEN 100\r\n ELSE 80\r\n END as upper\r\nfrom cars ",
"rawSql": "SELECT\r\n 20 as lower,\r\n CASE WHEN lfp_battery THEN 100 ELSE 80 END as upper\r\nfrom cars inner join car_settings on cars.settings_id = car_settings.id\r\nwhere cars.id = $car_id",
"refId": "B",
"sql": {
"columns": [
Expand Down Expand Up @@ -322,7 +322,6 @@
"from": "now-7d",
"to": "now"
},
"timeRangeUpdatedDuringEditOrView": false,
"timepicker": {
"refresh_intervals": [
"5s",
Expand Down Expand Up @@ -351,6 +350,6 @@
"timezone": "",
"title": "Charge Level",
"uid": "WopVO_mgz",
"version": 2,
"version": 5,
"weekStart": ""
}
Loading
Loading