It is required to change the favicon icon of the analytics-dashboard app when customizing the theme of the dashboard application. This PR adds that capability.
Goals
Ability to white label dashboard application
Approach
A react library called react-helmet is used. And the default path to the favicon icon is retrieved from the DefaultDashboardThemeConfigProvider class and if its needed to be changed a config needs to be added to the deployment.yaml of the respective product.
Example:
In APIM Analytics deployment.yaml file of dashboard profile we have to add the below config. This CustomDashboardThemeConfigProvider will read the themeConfigResourcesPath from config and append tenant domain to its path at the end.
And in the above case the custom images needs to be saved at a HOME/wso2/dashboard/deployment/web-ui-apps/analytics-dashboard/public/images/{tenant_deirectory}
Purpose
It is required to change the favicon icon of the analytics-dashboard app when customizing the theme of the dashboard application. This PR adds that capability.
Goals
Ability to white label dashboard application
Approach
A react library called react-helmet is used. And the default path to the favicon icon is retrieved from the DefaultDashboardThemeConfigProvider class and if its needed to be changed a config needs to be added to the deployment.yaml of the respective product.
Example: In APIM Analytics deployment.yaml file of dashboard profile we have to add the below config. This CustomDashboardThemeConfigProvider will read the themeConfigResourcesPath from config and append tenant domain to its path at the end.
themeConfigProviderClass: org.wso2.analytics.apim.dashboards.theme.config.provider.CustomDashboardThemeConfigProvider
themeConfigResourcesPath: https://localhost:9643/analytics-dashboard/public/app/images
And in the above case the custom images needs to be saved at a HOME/wso2/dashboard/deployment/web-ui-apps/analytics-dashboard/public/images/{tenant_deirectory}