diff --git a/dashboards/dashboard_walberla.py b/dashboards/dashboard_walberla.py index ad5c0753aa64a35b13cff9cd8f702c1a21f0a5e6..b40c005c8c815e39871c11ae0ed5278999cdfde2 100644 --- a/dashboards/dashboard_walberla.py +++ b/dashboards/dashboard_walberla.py @@ -8,6 +8,7 @@ from dashboards.dashboard_base import (DashboardOptions, from dashboards.panels import PanelInfos, get_time_series_panel from dashboards.variables import get_dashboard_variable, Filter +from dashboards.overrides import get_color_regex_override from dashboards.influx_queries import join_variable_and from dashboards.legends import Units @@ -272,6 +273,12 @@ def dashboard_fslbmgravitywave(): where = join_variable_and([f.name for f in filters]) annotations = get_commit_annotation(data_source, "red", "commits", measurment_name) + groups = ["Communication", "Sweep", "MPI Barrier"] + colors = ["red", "green", "blue"] + overrides = [ + get_color_regex_override(f".*{group}:.*", color, mode="fixed") + for group, color in zip(groups, colors) + ] panels = [ get_time_series_panel( @@ -296,6 +303,7 @@ def dashboard_fslbmgravitywave(): fillOpacity=70, gradientMode="Opacity", tooltipMode="single", + overrides=overrides, )) panels.append( diff --git a/dashboards/overrides.py b/dashboards/overrides.py index d5d9755712940b4f699671ac550701e708882a68..2a4f3194c6d469c34be94597302686e7b8ad7f5c 100644 --- a/dashboards/overrides.py +++ b/dashboards/overrides.py @@ -1,4 +1,4 @@ -def get_color_regex_override(regex: str, color: str): +def get_color_regex_override(regex: str, color: str, *, mode: str = "fixed"): return { "matcher": { "id": "byRegexp", @@ -9,7 +9,7 @@ def get_color_regex_override(regex: str, color: str): "id": "color", "value": { "fixedColor": color, - "mode": "fixed" + "mode": mode } } ]