Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions python/ray/dashboard/modules/metrics/dashboards/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class Target:
"datasource": r"${datasource}",
"description": "<Description>",
"fieldConfig": {"defaults": {}, "overrides": []},
# Setting height and width is important here to ensure the default panel has some size to it.
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
"fill": 10,
"fillGradient": 0,
Expand Down Expand Up @@ -143,6 +144,31 @@ class Target:
"pointradius": 2,
"points": False,
"renderer": "flot",
# These series overrides are necessary to make the "MAX" and "MAX + PENDING" dotted lines
# instead of stacked filled areas.
"seriesOverrides": [
{
"$$hashKey": "object:2987",
"alias": "MAX",
"dashes": True,
"color": "#1F60C4",
"fill": 0,
"stack": False,
},
{
"$$hashKey": "object:78",
"alias": "/FINISHED|FAILED|DEAD|REMOVED|Failed Nodes:/",
"hiddenSeries": True,
},
{
"$$hashKey": "object:2987",
"alias": "MAX + PENDING",
"dashes": True,
"color": "#777777",
"fill": 0,
"stack": False,
},
],
"spaceLength": 10,
"stack": True,
"steppedLine": False,
Expand Down
15 changes: 15 additions & 0 deletions python/ray/tests/test_metrics_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,21 @@ def test_metrics_folder_with_dashboard_override(
for panel in contents["panels"]:
assert panel["gridPos"]["h"] > 0
assert panel["gridPos"]["w"] > 0
# Check for series overrides for MAX and MAX + PENDING
found_max = False
found_max_pending = False
for panel in contents["panels"]:
for override in panel.get("seriesOverrides", []):
if override.get("alias") == "MAX":
assert override["fill"] == 0
assert override["stack"] is False
found_max = True
if override.get("alias") == "MAX + PENDING":
assert override["fill"] == 0
assert override["stack"] is False
found_max_pending = True
assert found_max
assert found_max_pending

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