Module: check_mk
Branch: master
Commit: 1474e7fa7d8a10c2c5d4c0612cfafa595ae1f393
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1474e7fa7d8a10…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 18 17:59:54 2018 +0200
New sites use the new UI theme by default now
Change-Id: Id6e6e26e0a6eee607a706274afadbed041effc1c
---
cmk/gui/wato/__init__.py | 1 +
omd/packages/omd/omd | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/cmk/gui/wato/__init__.py b/cmk/gui/wato/__init__.py
index b051f92..e366f11 100644
--- a/cmk/gui/wato/__init__.py
+++ b/cmk/gui/wato/__init__.py
@@ -14208,6 +14208,7 @@ def create_sample_config():
"mssql_versions",
],
"enable_rulebased_notifications": True,
+ "ui_theme": "facelift",
}
)
diff --git a/omd/packages/omd/omd b/omd/packages/omd/omd
index b01701b..ef63be0 100644
--- a/omd/packages/omd/omd
+++ b/omd/packages/omd/omd
@@ -2754,6 +2754,24 @@ def init_site(config_settings=None, options=False):
admin_password = calculate_admin_password(options)
set_admin_password(admin_password)
+ # Special hack for 1.5: Requirement is to activate the new facelift theme
+ # for new sites. Normally we use the "WATO sample configuration" for
setting
+ # specific options for sites created with the new version. But this sample
+ # configuration is not set too late to affect the first login.
+ # It is set when a user accesses WATO for the first time, which happens
+ # after the first login.
+ # It is a open task to move this initial configuration step to an earlier
+ # stage for the 1.6. But this is nothing we can change now for the 1.5
+ # because it would involve some bigger changes.
+ # We decided to reach this goal using hard coded specific hack here for the
+ # 1.5 and solve the issue completely (also for the other sample config) in
+ # the future.
+ with open(os.path.join(g_sitedir,
"etc/check_mk/multisite.d/wato/global.mk"), "w") as f:
+ f.write(
+ "# Created by 'omd create'\n"
+ "ui_theme = 'facelift'\n"
+ )
+
# Change ownership of all files and dirs to site user
chown_tree(g_sitedir, g_sitename)