Module: check_mk
Branch: master
Commit: f66943f9fab5b74e77c906e76c94d84c2aa1c223
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f66943f9fab5b7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Oct 31 10:58:57 2014 +0100
#1166 FIX Also prevting stylesheet update issues during version updates (just like for JS
files)
---
.werks/1166 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/htmllib.py | 16 +++++++++++-----
3 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/.werks/1166 b/.werks/1166
new file mode 100644
index 0000000..16fbc83
--- /dev/null
+++ b/.werks/1166
@@ -0,0 +1,10 @@
+Title: Also prevting stylesheet update issues during version updates (just like for JS
files)
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.5i7
+Date: 1414749505
+
+
diff --git a/ChangeLog b/ChangeLog
index 5ba04bae..2da460d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
Multisite:
* 1164 FIX: Fixed links from servicegroup overviews to single servicegroups
+ * 1166 FIX: Also prevting stylesheet update issues during version updates (just like
for JS files)
WATO:
* 1165 FIX: Fixed exception in service discovery of logwatch event console forwarding
checks...
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index fe528c9..c6e7574 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -705,11 +705,17 @@ class html:
self.write('<base target="%s">\n' %
self.attrencode(self.link_target))
# Load all specified style sheets and all user style sheets in htdocs/css
- for css in [ "check_mk" ] + stylesheets:
- self.write('<link rel="stylesheet"
type="text/css" href="%s.css" />\n' % css)
- self.write('<!--[if IE]>\n'
- '<link rel="stylesheet" href="ie.css"
type="text/css" />\n'
- '<![endif]-->\n')
+ for css in [ "check_mk" ] + stylesheets + [ 'ie' ]:
+ if defaults.omd_root:
+ fname = '%s-%s.css' % (css, defaults.check_mk_version)
+ else:
+ fname = '%s.css' % css
+
+ if css == 'ie':
+ self.write('<!--[if IE]>\n')
+ self.write('<link rel="stylesheet"
type="text/css" href="%s" />\n' % fname)
+ if css == 'ie':
+ self.write('<![endif]-->\n')
self.add_custom_style_sheet()