Support custom UI branding#731
Merged
Merged
Conversation
736cb8c to
0a894e2
Compare
This allows to change Slurm-web frontend colors and logos for custom branding.
This introduces SlurmwebFrontend class to handle the frontend UI application in the gateway. When UI is enabled in configuration, an instance of this class is attached of SlurmwebAppGateway object with frontend attribute. The class is responsible of validating UI configuration settings, preparing the assets (ie. copy UI files, set base prefix, copy custom favicon, logos files) and define UI custom colors and logos exported in UI JSON configuration file loaded by frontend application. This class also supports some development oriented environment variables to control its behavior. These environment variables are not documented, they are designed for special handling of UI files for development environment specific needs. The gateway mount prefix is now saved as an attribute of SlurmwebAppGateway object. This allows reuse in OIDC authentication routes, in replacement of oidc_ui_prefix attribute. fix #287
New branding plugin is introduced to change user interface colors in CSS variables based on optional runtime configuration parameters. New branding composable is introduced to provide paths to paths to logos and main colors for javascript and Vue templates.
When frontend application is started in development mode, the configuration, logos and favicon are now proxied to development environment gateway instead of loading files in frontend/static/ directly. This allows loading of development environment dynamic configuration instead of static flat config which requires manual modifications to test some use-cases.
Replace indigo-100 background color on filters badge in light mode by slurmweb-light, so it follow branding themes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #287