Can I custom appearance of the Superset using Cairn plugin?

How can I create a plugin to change the logo, the style and custom the language of my http(s)://data.<YOUR_LMS_HOST> page?

For custom Language, set CAIRN_SUPERSET_LANGUAGE_CODE (2-letter code of the default language for the Superset frontend). View the list of all supported languages here. When different than en, users will have the opportunity to switch from English to this language via a flag icon in the top-right corner.
For Appearance, we need to add following code in tutor-cairn/templates/cairn/apps/superset/superset_config.py file

# Visual Customizations
APP_NAME = "App Name"
APP_ICON = "App Icon"
APP_ICON_WIDTH = 200
FAVICONS = [{"href": "URL"}]

# THEME_OVERRIDES is used for adding custom theme to superset
# THEME_OVERRIDES = {
#   "borderRadius": 4,
#   "colors": {
#    "primary": {
#       "base": '#1C355E',
#       "dark1": "#000000",
#       "dark2": '#FFFFFF',
#       "light4": '#ea6852'
#    },
#     "greyscale": {
#       "base": '#1C355E',
#       "dark1": '#1C355E',
#       "light1": '#1C355E',
#       "light2": '#ea6852',
#       "light3": '#ea6852',
#       "light4": '#1C355E'
#     },
#     "text": {
#       "label": '#FF1493',
#     }
#   }
# }
1 Like

I try to locate " tutor-cairn/templates/cairn/apps/superset/superset_config.py" but I failed, can you help me
give me more detail how to edit this superset_config.py file?

Follow these steps for customizations:

  • Git clone tutor-cairn to local directory
  • Edit the mentioned file according to your requirements
  • Save the changes and install it
  • Enable the plugin, re-generate the environment and restart the platform.
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.