{ "kind": "Dashboard", "apiVersion": "dashboard.grafana.app/v2alpha1", "metadata": { "name": "bom-in-links-test", "namespace": "org-1", "labels": { "test": "bom-stripping" } }, "spec": { "annotations": [], "cursorSync": "Off", "description": "Testing that BOM characters are stripped from URLs during conversion", "editable": true, "elements": { "panel-1": { "kind": "Panel", "spec": { "id": 1, "title": "Panel with BOM in field config override links", "description": "", "links": [ { "title": "Panel data link with BOM", "url": "http://example.com/${__data.fields.cluster}\u0026var=value", "targetBlank": true } ], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "prometheus", "spec": {} }, "datasource": { "type": "prometheus", "uid": "test-ds" }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "table", "spec": { "pluginVersion": "", "options": {}, "fieldConfig": { "defaults": { "thresholds": { "mode": "absolute", "steps": [ { "value": null, "color": "green" }, { "value": 80, "color": "red" } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "server" }, "properties": [ { "id": "links", "value": [ { "title": "Override link with BOM", "url": "http://localhost:3000/d/test?var-datacenter=${__data.fields[datacenter]}\u0026var-server=${__value.raw}" } ] } ] } ] } } } } }, "panel-2": { "kind": "Panel", "spec": { "id": 2, "title": "Panel with BOM in options dataLinks", "description": "", "links": [], "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "query": { "kind": "prometheus", "spec": {} }, "datasource": { "type": "prometheus", "uid": "test-ds" }, "refId": "A", "hidden": false } } ], "transformations": [], "queryOptions": {} } }, "vizConfig": { "kind": "timeseries", "spec": { "pluginVersion": "", "options": { "dataLinks": [ { "targetBlank": true, "title": "Options data link with BOM", "url": "http://example.com?series=${__series.name}\u0026time=${__value.time}" } ], "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true } }, "fieldConfig": { "defaults": { "links": [ { "targetBlank": false, "title": "Field config default link with BOM", "url": "http://example.com?field=${__field.name}\u0026value=${__value.raw}" } ] }, "overrides": [] } } } } } }, "layout": { "kind": "GridLayout", "spec": { "items": [ { "kind": "GridLayoutItem", "spec": { "x": 0, "y": 0, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-1" } } }, { "kind": "GridLayoutItem", "spec": { "x": 12, "y": 0, "width": 12, "height": 8, "element": { "kind": "ElementReference", "name": "panel-2" } } } ] } }, "links": [ { "title": "Dashboard link with BOM", "type": "link", "icon": "external link", "tooltip": "", "url": "http://example.com?var=${datasource}\u0026other=value", "tags": [], "asDropdown": false, "targetBlank": true, "includeVars": false, "keepTime": false } ], "liveNow": false, "preload": false, "tags": [ "test", "bom" ], "timeSettings": { "timezone": "browser", "from": "now-6h", "to": "now", "autoRefresh": "", "autoRefreshIntervals": [ "5s", "10s", "30s", "1m", "5m" ], "hideTimepicker": false, "fiscalYearStartMonth": 0 }, "title": "BOM Stripping Test Dashboard", "variables": [] }, "status": { "conversion": { "failed": false, "storedVersion": "v1beta1" } } }