From 24a2161f3693cae5940af9d611ca057f8ad81d1f Mon Sep 17 00:00:00 2001 From: Christoph Alt <christoph.alt@fau.de> Date: Thu, 22 Feb 2024 17:43:46 +0100 Subject: [PATCH] fixed the query for the commit annotation --- dashboards/dashboard_base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dashboards/dashboard_base.py b/dashboards/dashboard_base.py index 847e64b..f95efd8 100644 --- a/dashboards/dashboard_base.py +++ b/dashboards/dashboard_base.py @@ -28,7 +28,7 @@ def get_annotation(*args, **kwargs): def get_commit_annotation(datasource: str, color: str, name: str, measurment_name: str, *, commit_key: str = "commit"): query = (f"SELECT first(\"{commit_key}\") FROM " f"( SELECT * FROM \"{measurment_name}\" " - f"WHERE host =~ /^$host$/ AND $timeFilter) GROUP BY \"${commit_key}\"") + f"WHERE host =~ /^$host$/ AND $timeFilter) GROUP BY \"{commit_key}\"") return get_annotation(datasource, color, name, query) @@ -125,7 +125,8 @@ def build_dashboard(options: DashboardOptions, **asdict(options), **kwargs, templating=Templating(templating), - time=Time('now-7d', 'now'), + time=Time('now-14d', 'now'), + refresh='5m', ) return dashboard.auto_panel_ids() -- GitLab