Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Deploying Custom Themes for Dashboard

Adriana Dimitrova edited this page Feb 13, 2018 · 3 revisions

The steps below describe the procedure for providing Custom Themes in Dashboard during deployment and at runtime using the user interface.

During Deployment:

  1. Go to src/webapp/resources folder of the dashboard. Update themeMapping.json with details as shown below:

    // Sample data
    {
     "baseDir": "webapp/resources/customTheme",
     "themes": [{
       "displayname": "theme1",
       "filename": "theme1.css",
       "subdir": "dir1"
     },
     {
       "displayname": "theme2",
       "filename": "theme2.css",
       "subdir": "dir2"
     }]
    }

    The JSON mentioned above requires two new directories to be created, namely dir1 and dir2(You can provide any user-friendly names). Place the theme files in their respective directories.

  2. Append manifest.yml file to the dashboard with the following keys:

    PRE_PROVIDED_DEFAULT_THEME_NAME: theme1
    ENABLE_UPLOAD_THEME_FEATURE: true
    

    The PRE_PROVIDED_DEFAULT_THEME_NAME key sets the theme1 as the default theme for the Dashboard application. The ENABLE_UPLOAD_THEME_FEATURE keys enable the user to upload files through Dashboard's User Interface at runtime. If you don't want the upload feature you can set key as false.

Through User Interface[At runtime]:

  1. If ENABLE_UPLOAD_THEME_FEATURE is set to true in the manifest.yml, then themes can be uploaded/applied through the dashboard's User Interface. The uploaded/applied themes will be saved in the profile of the logged user.
Clone this wiki locally