Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cb-util
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christoph Alt
cb-util
Commits
cac799ba
Commit
cac799ba
authored
2 years ago
by
Christoph Alt
Browse files
Options
Downloads
Patches
Plain Diff
added dashboard list to overview dashboard
parent
cf8c6699
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dashboards/dashboard_base.py
+12
-1
12 additions, 1 deletion
dashboards/dashboard_base.py
dashboards/dashboard_list.py
+7
-4
7 additions, 4 deletions
dashboards/dashboard_list.py
with
19 additions
and
5 deletions
dashboards/dashboard_base.py
+
12
−
1
View file @
cac799ba
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
dashboards/dashboard_list.py
+
7
−
4
View file @
cac799ba
...
@@ -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
])
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment