Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: theme light/dark default config option #55

Open
SonenPHP opened this issue Feb 17, 2025 · 3 comments
Open

[Feature]: theme light/dark default config option #55

SonenPHP opened this issue Feb 17, 2025 · 3 comments
Labels
feature New feature or request
Milestone

Comments

@SonenPHP
Copy link

Describe the feature request

Please bring back the configuration option for "theme" to set default/fallback.
Automatic dark/light mode is fine, but you force the "dark" option as default.

Why? Every user have to set his active theme manual to "light" - otherwise the graph will be dark because it's forced in library/Grafana/Helpers/Util.php

I guess it's a issue because you can not set the default "System Theme Modus" in icingaweb2!?

@SonenPHP SonenPHP added the feature New feature or request label Feb 17, 2025
@martialblog
Copy link
Member

Hi,

Icinga Web is using dark mode by default so we decided to have similar behavior.

Problem with the "System Theme Mode" is that the browser then holds the information about which mode is set, thus we don't have it in the PHP code. But we need it for the request to Grafana.

@martialblog
Copy link
Member

Thought about it some more. It's tricky, because if we have a "default" option, that would be global and thus override the individual settings a user might have.

We could maybe have a check for "is the user's current theme is different from the default", then use the theme the users wants.

I'll do some experiments when I got some spare time.

@martialblog martialblog added this to the v3.1.0 milestone Feb 28, 2025
@SonenPHP
Copy link
Author

Thanks for you thoughts.
Guess i have a problem with Icinga Web using dark mode by default too.

Im using a Theme without dark mode (Classic Icinga), changed it so it supports setting in to light mode manually.
But that wont help much because default dark mode.

Right now my only solution was to change the grafana module source code to default light mode.

Maybe you can provide a better solution in the future :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants