Skip to content

Commit bc87b73

Browse files
authored
fix MAX chart not being a dotted line (#53184)
Adding back some default panel configurations that were accidentally removed in a prior PR #52719 Signed-off-by: Alan Guo <aguo@anyscale.com>
1 parent 7d2dd77 commit bc87b73

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

python/ray/dashboard/modules/metrics/dashboards/common.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ class Target:
114114
"datasource": r"${datasource}",
115115
"description": "<Description>",
116116
"fieldConfig": {"defaults": {}, "overrides": []},
117+
# Setting height and width is important here to ensure the default panel has some size to it.
117118
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
118119
"fill": 10,
119120
"fillGradient": 0,
@@ -143,6 +144,31 @@ class Target:
143144
"pointradius": 2,
144145
"points": False,
145146
"renderer": "flot",
147+
# These series overrides are necessary to make the "MAX" and "MAX + PENDING" dotted lines
148+
# instead of stacked filled areas.
149+
"seriesOverrides": [
150+
{
151+
"$$hashKey": "object:2987",
152+
"alias": "MAX",
153+
"dashes": True,
154+
"color": "#1F60C4",
155+
"fill": 0,
156+
"stack": False,
157+
},
158+
{
159+
"$$hashKey": "object:78",
160+
"alias": "/FINISHED|FAILED|DEAD|REMOVED|Failed Nodes:/",
161+
"hiddenSeries": True,
162+
},
163+
{
164+
"$$hashKey": "object:2987",
165+
"alias": "MAX + PENDING",
166+
"dashes": True,
167+
"color": "#777777",
168+
"fill": 0,
169+
"stack": False,
170+
},
171+
],
146172
"spaceLength": 10,
147173
"stack": True,
148174
"steppedLine": False,

python/ray/tests/test_metrics_head.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,21 @@ def test_metrics_folder_with_dashboard_override(
147147
for panel in contents["panels"]:
148148
assert panel["gridPos"]["h"] > 0
149149
assert panel["gridPos"]["w"] > 0
150+
# Check for series overrides for MAX and MAX + PENDING
151+
found_max = False
152+
found_max_pending = False
153+
for panel in contents["panels"]:
154+
for override in panel.get("seriesOverrides", []):
155+
if override.get("alias") == "MAX":
156+
assert override["fill"] == 0
157+
assert override["stack"] is False
158+
found_max = True
159+
if override.get("alias") == "MAX + PENDING":
160+
assert override["fill"] == 0
161+
assert override["stack"] is False
162+
found_max_pending = True
163+
assert found_max
164+
assert found_max_pending
150165

151166
# Serve Dashboard
152167
with open(f"{override_dashboard_dir}/serve_grafana_dashboard.json") as f:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy