如何在Grafana中更改背景颜色? [英] How do you change the background colour in Grafana?
问题描述
我想修改Grafana中的深色主题,以使其使用#000000
作为背景色.
I want to modify the dark theme in Grafana so that it uses #000000
as the background colour.
我看过"如何更改Grafana的默认黑色",但是这些答案只会告诉您如何在浅色和深色主题之间进行选择.
I have seen "How to change default black color of Grafana", however those answers only tell you how to choose between the light and the dark themes.
我还看到如何自定义您的Grafana主题建议编辑_variables.dark.scss
文件,但是我看不到该文件的位置,因为该文件未显示在public/sass
目录中.
I also see that How to Customize Your Grafana Theme recommends editing the _variables.dark.scss
file, however I cannot see where this is located, as it is not in the public/sass
directory as the post suggests.
最后,我还看到_variables.dark.generated.scss
告诉您编辑grafana-ui/src/themes/_variables.dark.scss.tmpl.ts以更新模板,但是我找不到该文件要么.
Finally, I also see that _variables.dark.generated.scss
tells you to Edit grafana-ui/src/themes/_variables.dark.scss.tmpl.ts to update template, however I cannot find that file either.
能给我指出正确的方向吗?
Could you point me in the right direction, please?
推荐答案
Boom主题插件可用于Grafana 6.7.1
Boom Theme plugin worked for me with Grafana 6.7.1
安装:
grafana-cli plugins install yesoreyeram-boomtheme-panel
service grafana-server restart
转到某些仪表板并添加新的面板.选择"Boom插件".
Go to certain Dashboard and add new Panel. Select "Boom Plugin".
在自定义样式/CSS覆盖"下输入此内容
Enter this under "Custom Style / CSS Override"
.panel-container {
background-color: #000000;
}
.dashboard-container {
background-color: #000000;
}
.navbar {
background-color: #000000;
}
Boom Theme插件文档在此处: https://github .com/yesoreyeram/yesoreyeram-boomtheme-panel/tree/master/docs
The Boom Theme plugin documentation is here: https://github.com/yesoreyeram/yesoreyeram-boomtheme-panel/tree/master/docs
P.S.如果您要嵌入Grafana的仪表板/面板,请检查grafana.ini中"[security]"部分下的"allow_embedding = true",并在URL中使用& kiosk参数以避免菜单
P.S. In case you are embedding Grafana's dashboard/panel, check for "allow_embedding = true" under "[security]" section in grafana.ini and use &kiosk parameter in a URL to avoid menus
这篇关于如何在Grafana中更改背景颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!