Skip to content
Snippets Groups Projects
Commit 24a2161f authored by Christoph Alt's avatar Christoph Alt
Browse files

fixed the query for the commit annotation

parent d36547a6
Branches
No related merge requests found
...@@ -28,7 +28,7 @@ def get_annotation(*args, **kwargs): ...@@ -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"): def get_commit_annotation(datasource: str, color: str, name: str, measurment_name: str, *, commit_key: str = "commit"):
query = (f"SELECT first(\"{commit_key}\") FROM " query = (f"SELECT first(\"{commit_key}\") FROM "
f"( SELECT * FROM \"{measurment_name}\" " 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) return get_annotation(datasource, color, name, query)
...@@ -125,7 +125,8 @@ def build_dashboard(options: DashboardOptions, ...@@ -125,7 +125,8 @@ def build_dashboard(options: DashboardOptions,
**asdict(options), **asdict(options),
**kwargs, **kwargs,
templating=Templating(templating), templating=Templating(templating),
time=Time('now-7d', 'now'), time=Time('now-14d', 'now'),
refresh='5m',
) )
return dashboard.auto_panel_ids() return dashboard.auto_panel_ids()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment