From d5cb2c652ff39e1f828be30fcf6d09c2be42b464 Mon Sep 17 00:00:00 2001 From: Matthias Wirtz Date: Mon, 21 Oct 2024 13:24:28 +0200 Subject: [PATCH] perf: exclude streaming date when getting battery level (#4286) --- grafana/dashboards/overview.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grafana/dashboards/overview.json b/grafana/dashboards/overview.json index b4360e88ba..c5b8c199f4 100644 --- a/grafana/dashboards/overview.json +++ b/grafana/dashboards/overview.json @@ -160,7 +160,7 @@ "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", + "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id and ideal_battery_range_km is not null\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", "refId": "A", "select": [ [ @@ -2167,6 +2167,6 @@ "timezone": "", "title": "Overview", "uid": "kOuP_Fggz", - "version": 10, + "version": 13, "weekStart": "" -} +} \ No newline at end of file