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

added dashboard list to overview dashboard

parent cf8c6699
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ from typing import List, Union ...@@ -3,7 +3,7 @@ from typing import List, Union
from grafanalib.core import (Annotations, Dashboard, GridPos, Panel, Repeat, from grafanalib.core import (Annotations, Dashboard, GridPos, Panel, Repeat,
RowPanel, Stat, Template, Templating, Time, RowPanel, Stat, Template, Templating, Time,
TimeSeries, Threshold) TimeSeries, Threshold, DashboardList)
from grafanalib.influxdb import InfluxDBTarget from grafanalib.influxdb import InfluxDBTarget
from dashboards.annotations import Annotation from dashboards.annotations import Annotation
...@@ -39,6 +39,17 @@ def get_dashboard_variable_query(name: str, template_query: str, ...@@ -39,6 +39,17 @@ def get_dashboard_variable_query(name: str, template_query: str,
**kwargs) **kwargs)
def get_dashboard_list(title: str, tags: List[str], **kwargs) -> DashboardList:
return DashboardList(
title=title,
showHeadings=False,
showSearch=True,
showStarred=False,
searchTags=tags,
**kwargs
)
@dataclass @dataclass
class DashboardOptions: class DashboardOptions:
title: str title: str
......
...@@ -5,7 +5,8 @@ from dashboards.dashboard_base import (DashboardOptions, build_dashboard, ...@@ -5,7 +5,8 @@ from dashboards.dashboard_base import (DashboardOptions, build_dashboard,
get_commit_annotation, get_commit_annotation,
get_dashboard_variable_query, get_dashboard_variable_query,
get_grid_pos, get_stat_panel, get_grid_pos, get_stat_panel,
pack_in_row) pack_in_row,
get_dashboard_list)
from dashboards.influx_queries import (Query, get_variable_condition, from dashboards.influx_queries import (Query, get_variable_condition,
join_conditions, join_variable_and, join_conditions, join_variable_and,
show_tag_values) show_tag_values)
...@@ -230,19 +231,21 @@ def dashboard_general_infos(): ...@@ -230,19 +231,21 @@ def dashboard_general_infos():
], ],
timezone="browser", timezone="browser",
) )
cpu_list = get_dashboard_list('CPU Benchmarks', ['walberla', 'CPU'], gridPos=get_grid_pos(10, 12, 0, 0))
gpu_list = get_dashboard_list('GPU Benchmarks', ['walberla', 'GPU'], gridPos=get_grid_pos(10, 12, 13, 0))
panel_build = get_stat_panel("Build Times", panel_build = get_stat_panel("Build Times",
dataSource, dataSource,
get_query("build"), get_query("build"),
gridPos=get_grid_pos(12, 24, 0, 0), gridPos=get_grid_pos(12, 24, 0, 13),
format='s', format='s',
alias="$tag_name") alias="$tag_name")
panel_benchmark = get_stat_panel("Benchmark Runtime", panel_benchmark = get_stat_panel("Benchmark Runtime",
dataSource, dataSource,
get_query("benchmark"), get_query("benchmark"),
gridPos=get_grid_pos(30, 24, 0, 13), gridPos=get_grid_pos(30, 24, 0, 26),
format='s', format='s',
alias="$tag_name") alias="$tag_name")
return build_dashboard(options, return build_dashboard(options,
panels=[panel_build, panel_benchmark], panels=[cpu_list, gpu_list, panel_build, panel_benchmark],
templating=[host_var]) templating=[host_var])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment