Repository navigation
Description
Update 2026-11-26 (infra move): most dashboards of this list are now in dan-petty/homelab.
default_themeand the cluster dashboards (llm-stack, ingress-tunnel, service dashboards and others) are a follow-up issue there.- This issue keeps the builder defaults, the linter color rule, the contrast test and the dashboards in
k8s/devops/dashboards/.
Follow-up: dan-petty/homelab#279.
Problem or Motivation
The Grafana dashboards do not follow the design spec of #4735:
- The own dashboards hold 21 hex or rgb literals (llm-stack 9, ingress-tunnel 7, sre-service 5). A hex value does not follow the Grafana theme.
- The dashboards have 196
palette-classiccolor modes and 70 default red thresholds at 80. - Grafana green and red are 5.0 (light) and 6.8 (dark) apart in CIEDE2000 under simulated deuteranopia, so a reader with deuteranopia cannot tell "ok" from "error".
- The builder defaults to
palette-classicand the unitshort(grafana/schema.py:82-84,builders.py:60and89). - Grafana 13.2.4 runs with
default_theme = darkonly. - 195 panel titles are in Title Case, 25 in sentence case and 43 mixed.
Proposed Solution & Architectural Design
- (dan-petty/homelab follow-up) Set
[users] default_theme = systemink8s/monitoring/grafana-values.yaml(owner decision 5 of feat(design): track the project design spec #4735). - Change the builder defaults: one series uses the Grafana color
text; series 1 and 2 use the hex values ofsrc/devops_cli/design/tokens-base.json(#a463f2,#e7298a, which pass 3:1 on all four Grafana backgrounds); a third entity usestextas baseline or "Other"; more series use theshadesmode oftextor a table. Status uses the Grafana color names ofroles.ini [grafana](oktext, warnsemi-dark-orange, errorred), which resolve for each theme (owner decision 6).fillOpacity0. Series 2 uses the line style dash[10,10]. Reference lines are named constant queries (for examplevector(14.4)) with a role color name and the line style dots. Heatmaps usecontinuous-cividis. Legends are a list for 3 series or fewer, else a table with last, mean and max. - Add a color rule to
grafana/linter.py: a hex value must be a series value oftokens-base.json, and a color name must be inroles.ini [grafana]. - Use sentence-case panel titles, and give every panel a description.
- Migrate the 10 own dashboards after the panel children of fix(monitoring): track readable project dashboards #4675 merge. fix(monitoring): track readable project dashboards #4675 keeps the default Grafana colors until then (its owner decision 5).
- Keep the 5 gnetId-derived copies (k8s-views-*, nvidia-dcgm) and Node Exporter Full as published (owner decision 7).
Target Subsystem
Monitoring (src/devops_cli/grafana/, k8s/monitoring/).
Existing Tool Considered
Grafana's built-in color names, which resolve for each theme, the shades mode, continuous-cividis and the built-in colorblind themes (deut_prot, tritanopia) for readers who need them. The existing dashboard linter takes the new rule. No new dependency. Custom code: two linter rules of about 60 lines. Cost: about 60,000 tokens and 3 hours for the rules, plus the dashboard migration.
Acceptance Criteria
- The linter reports 0 hex values outside the allowlist and 0 color names outside
roles.ini [grafana]in the 10 own dashboards. - A test asserts that every allowed hex value is 3:1 or more on
#ffffff,#f4f5f5,#181b1fand#111217. grafana-values.yamlsetsdefault_theme = system.
Dependencies
- feat(design): add the design tokens and their build #4738 (the token JSON).
- feat(output): add one Rich theme of status roles and marks #4748 (
roles.iniwith its[grafana]section). - The panel children of fix(monitoring): track readable project dashboards #4675.
Source: #4735
Alternatives check of 2026-11-24: partly.
Tool: grafana/dashboard-linter (https://github.com/grafana/dashboard-linter), Apache-2.0, last activity 2026-11-20, maintained.
Reason: Searches found grafana/dashboard-linter, an active Apache-2.0 CLI that lints Grafana dashboards for best practices, including panel title, description and unit checks, but it has no color rule, so it covers only part of the issue.
Covers:
- Panel title and description best-practice checks
- Panel unit checks on Prometheus dashboards
- CLI, Docker image and GitHub Action over dashboard JSON
Lacks:
- Hex or rgb literal allowlist from tokens-base.json
- Color names checked against roles.ini [grafana]
- palette-classic and field color-mode detection
- Colorblind contrast, sentence-case rule, builder defaults and dashboard migration
Proposed design
Problem statement
The five product Grafana dashboards under k8s/devops/dashboards/ still use palette-classic, nonzero fills and colors outside the design tokens, and the typed dashboard schema still defaults to palette-classic and the short unit. The Grafana linter has no color or unit rule, so a new dashboard can reintroduce the same colors. This issue fixes the schema defaults, adds the color and unit rules and the contrast test, and migrates the five dashboards. The service dashboard template already follows the design; the default theme and the cluster dashboards are the homelab follow-up.
Acceptance criteria
Requirement: The dashboard schema defaults to text
The dashboard schema SHALL default a field color to the fixed Grafana color text and SHALL NOT default the color mode to palette-classic.
Scenario: A default field config uses text
- WHEN the test builds
FieldDefaults()fromsrc/devops_cli/grafana/schema.py - THEN its color is
{'mode': 'fixed', 'fixedColor': 'text'}, and no field config has the modepalette-classic.
Requirement: A panel with no unit is reported
The dashboard schema SHALL keep an absent unit as None and SHALL NOT fall back to short, and the Grafana linter SHALL report a timeseries or stat panel with no unit.
Scenario: A panel with no unit is reported
- WHEN the test lints a dashboard whose
timeseriespanel has no unit - THEN the report holds a finding that names the panel and the missing unit.
Requirement: The linter reports a foreign color
The Grafana linter SHALL report a hex or rgb color outside the two series values of tokens-base.json, a color name outside text, semi-dark-orange and red, and a field color mode outside fixed, thresholds, shades and continuous-cividis.
Scenario: A dashboard holds a foreign hex, an unknown name and palette-classic
- WHEN the test lints a dashboard with
#ff0000,super-light-greenand the modepalette-classic - THEN it reports three findings, each naming the value and the panel.
Requirement: Allowed hex values pass 3:1 on the four backgrounds
A test MUST assert that each hex value that the linter allows has a contrast of 3:1 or more on #ffffff, #f4f5f5, #181b1f and #111217.
Scenario: Each allowed hex passes on each background
- WHEN the contrast test reads the linter's allowed hex values and computes each ratio with coloraide
- THEN each value has a ratio of 3.0 or more on each of the four backgrounds.
Requirement: The five product dashboards follow the design colors
Each of the five dashboard JSON files under k8s/devops/dashboards/ MUST hold no color outside the allowlist, no color mode outside the four, no fillOpacity other than 0, and one unit on each timeseries and stat panel.
Scenario: The k8s row lints the five product dashboards
- WHEN
uv run devops ci --check --only k8sruns on the branch - THEN the row reports no color, color-mode, fill or unit finding for the five dashboards.
Existing Tool Considered
grafana/dashboard-linter (Apache-2.0, maintained) is the open tool that the alternatives check names; its block states what it lacks. The project keeps one linter, src/devops_cli/grafana/linter.py, because it already runs on the product dashboards in the k8s gate, and the color rule reads src/devops_cli/design/tokens-base.json and holds the Grafana names that docs/DESIGN.md records. Written cost: about 60,000 tokens and 3 hours to build, keep and fix the color and unit rules, plus the migration of the five dashboards. No package dependency is added.
Key questions
- Which dashboards does this issue migrate?: The five JSON files listed in
k8s/devops/dashboards/kustomization.yaml:ai-spend.json,devops-ai-rag.json,devops-cli.json,project-metrics.jsonandroadmap-service-telemetry.json. The ten cluster dashboards and the five gnetId copies are not in this repository at this commit; the cluster dashboards are the homelab follow-up. [sources: k8s/devops/dashboards/kustomization.yaml:30, k8s/devops/dashboards/kustomization.yaml:31, k8s/devops/dashboards/kustomization.yaml:32, k8s/devops/dashboards/kustomization.yaml:33, k8s/devops/dashboards/kustomization.yaml:34, tests/gate/k8s_checks/dashboards.py:16] - Which file holds the builder defaults that still emit palette-classic and short?:
src/devops_cli/grafana/schema.py:FieldDefaults.colordefaults to{'mode': 'palette-classic'}at line 86 andunitdefaults toshortat line 88.src/devops_cli/grafana/builders.pydoes not exist at this commit; the service dashboard builder issrc/devops_cli/grafana/service_dashboard.py. [sources: src/devops_cli/grafana/schema.py:86, src/devops_cli/grafana/schema.py:88, src/devops_cli/grafana/service_dashboard.py:18] - Does the service dashboard builder already follow the design colors?: Yes.
service_dashboard.pyreadscolor-data-cat-1andcolor-data-cat-2for series 1 and 2, usestextfor a single series and the third series, draws a reference line asvector(<value>)with thedotsstyle, setsfillOpacity0 and requires a unit on each chart and tile. Its tests assert the colors and the 3:1 contrast. [sources: src/devops_cli/grafana/service_dashboard.py:174, src/devops_cli/grafana/service_dashboard.py:183, src/devops_cli/grafana/service_dashboard.py:191, src/devops_cli/grafana/service_dashboard.py:326, src/devops_cli/grafana/service_dashboard.py:338, tests/grafana/test_service_dashboard.py:478] - Which color names does the linter allow, and does
roles.iniexist?: The allowed names aretext,semi-dark-orangeandred, the names of the### Grafanaparagraph ofdocs/DESIGN.mdand the constants ofservice_dashboard.py. Noroles.iniexists in the repository at this commit, so the linter holds the names as a constant and a test compares them with the design paragraph. (best practice) [sources: docs/DESIGN.md:163, src/devops_cli/grafana/service_dashboard.py:61, src/devops_cli/grafana/service_dashboard.py:64, tests/grafana/test_service_dashboard.py:513]- Chosen: Use the design names as a constant in the linter. The names are in docs/DESIGN.md and service_dashboard.py, and no roles.ini exists at this commit.
- Rejected: Read roles.ini [grafana]. No roles.ini is in the repository at this commit, so feat(output): add one Rich theme of status roles and marks #4748 is not a dependency.
- Which color rule does the linter apply?: A hex or rgb value must be one of the two series values of
tokens-base.json(#a463f2and#e7298a). A color name must betext,semi-dark-orangeorred. A field color mode must befixed,thresholds,shadesorcontinuous-cividis. The linter also reports atimeseriesorstatpanel with no unit. (best practice) [sources: docs/DESIGN.md:258, src/devops_cli/grafana/linter.py:132, tests/gate/k8s_checks/dashboards.py:30, tests/grafana/test_service_dashboard.py:184]- Chosen: Add the rule to the project linter. The linter already runs on the product dashboards in the k8s gate, and the rule reads the token file.
- Rejected: Adopt grafana/dashboard-linter for the color rule. The alternatives check records that it has no color rule.
- Rejected: Check colors only in a test. A test does not stop a new foreign color in a later dashboard.
- Which theme does Grafana use after the change?: The design records
default_theme = system, but this repository holds no Grafana values file:k8s/devops/kustomization.yamllists no monitoring values, and the product dashboards are applied from the environment tree (dan-petty/homelab). The theme and the cluster dashboards are the follow-up indan-petty/homelab#279, so this issue changes no values file. [sources: docs/DESIGN.md:258, k8s/devops/kustomization.yaml:3, k8s/devops/dashboards/kustomization.yaml:4] - Which unit does a panel with no unit keep?:
None, so the linter reports it; noshortfallback. Arowortextpanel has no unit and still loads. (best practice) [sources: src/devops_cli/grafana/schema.py:88, docs/DESIGN.md:258]- Chosen: Keep an absent unit as None and report it. The linter can report a timeseries or stat panel with no unit, and a row panel still loads.
- Rejected: Keep short as the default. The issue names the silent short fallback as a problem.
- Rejected: Make unit a required field. A row or text panel has no unit and would fail to load.
- Which title style and description do the panels use?: Sentence case, and every panel has a non-empty description. This part is deferred to a new issue so that the color rule and the color migration land in one pull request. (best practice) [sources: docs/DESIGN.md:191, docs/DESIGN.md:258]
- Chosen: Sentence case with a description. docs/DESIGN.md asks for sentence case and a description.
- Rejected: Keep Title Case. The design uses sentence case.
- Which dashboards are exempt from the color rule?: None in this repository. The five gnetId copies and Node Exporter Full are not in
k8s/devops/dashboards/; the upstream copies stay as published in the environment tree. The linter runs on the five product dashboards. [sources: k8s/devops/dashboards/kustomization.yaml:30, docs/DESIGN.md:258] - Which dependencies does this issue still have?: None. The token JSON of feat(design): add the design tokens and their build #4738 is in
src/devops_cli/design/tokens-base.json; the panel children of fix(monitoring): track readable project dashboards #4675 are present as the five dashboards and their query fixtures; the color names of feat(output): add one Rich theme of status roles and marks #4748 are indocs/DESIGN.mdandservice_dashboard.py, so noroles.iniis needed. [sources: src/devops_cli/design/tokens-base.json:50, k8s/devops/dashboards/kustomization.yaml:30, tests/fixtures/dashboard_queries/devops-cli.yaml:5, docs/DESIGN.md:163]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.grafana, and .github/labels.yml declares no scope/grafana label. Add the label to the file to give the scope to this item.It fixes an accessibility gap for colorblind readers but does not break existing functionality.It makes dashboards readable for deuteranopia users and enforces a consistent design system.It needs two linter rules of about 60 lines plus migration of 10 dashboards.Both add rules to grafana/linter.py, but #4743 lints range, window and legend errors while this candidate lints color values and names.devops-cli-service commentedon Nov 14, 2026
Alternatives check: partly
Reason: Searches found
grafana/dashboard-linter, a maintained Apache-2.0 CLI linter for Grafana dashboards, and Grafana's newergcxlinter (custom Rego rules).dashboard-lintercovers only the panel title/description and unit parts of the issue's asks; it has no rule for color values, design tokens, palette modes or colorblind contrast, which is the core of this issue, so it covers the need only in part.Tool: grafana/dashboard-linter (https://github.com/grafana/dashboard-linter)
Covers:
.lintconfig, plus a--fixand--strictmodeLacks:
palette-classiccolor modestokens-base.json) orroles.ini [grafana]color-name ruledefault_theme, or the migration of the 10 own dashboardsgcxlinter could hold custom Rego color rules, but it is a new dependency and still needs the rules writtenTools considered:
Searches run:
Sources:
Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 15, 2026
Refine cannot set this item to Ready at e5dfddb while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 26, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
devops-cli-service commentedon Nov 26, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.
devops-cli-service commentedon Nov 28, 2026
Released in v0.240.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.240.0
devops-cli-service commentedon Nov 28, 2026
Live since 2026-11-28 20:38 UTC