diff --git a/src/WebAppDIRAC/Lib/Conf.py b/src/WebAppDIRAC/Lib/Conf.py index c349bf5f..7bddcb0d 100644 --- a/src/WebAppDIRAC/Lib/Conf.py +++ b/src/WebAppDIRAC/Lib/Conf.py @@ -238,13 +238,12 @@ def getAuthSectionForHandler(route): return f"{BASECS}/Access/{route}" -@deprecated("This funtion is deprecated, use 'tabs' instead.") def getTheme(): - """Get theme + """Get theme from config or return default :return: str """ - return "tabs" + return getCSValue("Theme", "crisp") def getIcon(): diff --git a/src/WebAppDIRAC/WebApp/handler/RootHandler.py b/src/WebAppDIRAC/WebApp/handler/RootHandler.py index c31b5637..300e5df0 100644 --- a/src/WebAppDIRAC/WebApp/handler/RootHandler.py +++ b/src/WebAppDIRAC/WebApp/handler/RootHandler.py @@ -159,7 +159,7 @@ def web_loginComplete(self, code: str, state: str, **kwargs): ) return resp - def web_index(self, *, url_state="", theme="crisp", open_app="", **kwargs): + def web_index(self, *, url_state="", theme="", open_app="", **kwargs): """Index method :param str url_state: url state @@ -179,6 +179,9 @@ def web_index(self, *, url_state="", theme="crisp", open_app="", **kwargs): except Exception: gLogger.warn(f"Welcome page not found here: {welcomeFile}") + if not theme: + theme = Conf.getTheme() + # pylint: disable=no-member return TornadoResponse().render( "root.tpl",