yesoreyeram / yesoreyeram-boomtheme-panel

Grafana Panel for adding styles
http://yesoreyeram.github.io/yesoreyeram-boomtheme-panel
Apache License 2.0
88 stars 14 forks source link

[Bug] Dark\Light switch doesn't work #65

Open Dante4 opened 1 year ago

Dante4 commented 1 year ago

Describe the bug

No difference between clicking Light Grafana and Dark Grafana

Version Details

Panel JSON

``` { "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "target": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" }, "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "links": [], "liveNow": false, "panels": [ { "datasource": { "type": "alexanderzobnin-zabbix-datasource", "uid": "iiyi3YR7z" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 }, "id": 4, "options": { "themes": [ { "name": "test", "styles": [ { "type": "basetheme", "props": { "theme": "light" } }, { "type": "bgimage", "props": { "url": "/public/NightSky.png" } }, { "type": "url", "props": { "url": "" } }, { "type": "style", "props": { "text": "" } } ] } ] }, "pluginVersion": "0.2.1", "targets": [ { "application": { "filter": "" }, "datasource": { "type": "alexanderzobnin-zabbix-datasource", "uid": "iiyi3YR7z" }, "functions": [], "group": { "filter": "" }, "host": { "filter": "" }, "item": { "filter": "" }, "itemTag": { "filter": "" }, "options": { "disableDataAlignment": false, "showDisabledItems": false, "skipEmptyValues": false, "useZabbixValueMapping": false }, "proxy": { "filter": "" }, "queryType": "0", "refId": "A", "resultFormat": "time_series", "table": { "skipEmptyValues": false }, "tags": { "filter": "" }, "trigger": { "filter": "" }, "triggers": { "acknowledged": 2, "count": true, "minSeverity": 3 } } ], "title": "Panel Title", "type": "yesoreyeram-boomtheme-panel" }, { "datasource": { "type": "alexanderzobnin-zabbix-datasource", "uid": "iiyi3YR7z" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 9, "w": 12, "x": 0, "y": 8 }, "id": 2, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "application": { "filter": "" }, "datasource": { "type": "alexanderzobnin-zabbix-datasource", "uid": "iiyi3YR7z" }, "functions": [], "group": { "filter": "" }, "host": { "filter": "" }, "item": { "filter": "VMware: Used memory" }, "itemTag": { "filter": "" }, "options": { "disableDataAlignment": false, "showDisabledItems": false, "skipEmptyValues": false, "useZabbixValueMapping": false }, "proxy": { "filter": "" }, "queryType": "0", "refId": "A", "resultFormat": "time_series", "table": { "skipEmptyValues": false }, "tags": { "filter": "" }, "trigger": { "filter": "" }, "triggers": { "acknowledged": 2, "count": true, "minSeverity": 3 } } ], "title": "Panel Title", "type": "timeseries" } ], "schemaVersion": 37, "style": "dark", "tags": [], "templating": { "list": [] }, "time": { "from": "now-6h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "New dashboard", "version": 0, "weekStart": "" } ```

Screenshots

2022-11-05_18-08-56

Dante4 commented 1 year ago

And the problem is with hash in name of grafana.light.*.css and grafana.dark.**.css image

Dirty fix is to use @import url('http://zabbix.*.ru:3000/public/build/grafana.light.58c1084dc3a81cc4e10d.css'); in Additional css style image

Not the best result, since it's doesn't change the font color in graphs, but at least something image