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
Branches
No related merge requests found
......@@ -3,7 +3,7 @@ from typing import List, Union
from grafanalib.core import (Annotations, Dashboard, GridPos, Panel, Repeat,
RowPanel, Stat, Template, Templating, Time,
TimeSeries, Threshold)
TimeSeries, Threshold, DashboardList)
from grafanalib.influxdb import InfluxDBTarget
from dashboards.annotations import Annotation
......@@ -39,6 +39,17 @@ def get_dashboard_variable_query(name: str, template_query: str,
**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
class DashboardOptions:
title: str
......
......@@ -5,7 +5,8 @@ from dashboards.dashboard_base import (DashboardOptions, build_dashboard,
get_commit_annotation,
get_dashboard_variable_query,
get_grid_pos, get_stat_panel,
pack_in_row)
pack_in_row,
get_dashboard_list)
from dashboards.influx_queries import (Query, get_variable_condition,
join_conditions, join_variable_and,
show_tag_values)
......@@ -230,19 +231,21 @@ def dashboard_general_infos():
],
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",
dataSource,
get_query("build"),
gridPos=get_grid_pos(12, 24, 0, 0),
gridPos=get_grid_pos(12, 24, 0, 13),
format='s',
alias="$tag_name")
panel_benchmark = get_stat_panel("Benchmark Runtime",
dataSource,
get_query("benchmark"),
gridPos=get_grid_pos(30, 24, 0, 13),
gridPos=get_grid_pos(30, 24, 0, 26),
format='s',
alias="$tag_name")
return build_dashboard(options,
panels=[panel_build, panel_benchmark],
panels=[cpu_list, gpu_list, panel_build, panel_benchmark],
templating=[host_var])
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