Module: check_mk
Branch: master
Commit: 0914c8365cf0b44c64c9c38856d49619d27335fc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0914c8365cf0b4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 18 10:37:56 2016 +0100
3293 FIX Fixed graphs in IE with enabled compatibility mode (for IE < 8)
---
.werks/3293 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/metrics.py | 15 ++++++++++++++-
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/.werks/3293 b/.werks/3293
new file mode 100644
index 0000000..8b34124
--- /dev/null
+++ b/.werks/3293
@@ -0,0 +1,10 @@
+Title: Fixed graphs in IE with enabled compatibility mode (for IE < 8)
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1458293845
+
+
diff --git a/ChangeLog b/ChangeLog
index 2b9b397..927c5a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -112,6 +112,7 @@
* 3287 FIX: Fixed broken crash reporting (Submission of crashes did not work)
* 3290 FIX: Fixed broken event quick delete icon when used in dashlets
* 3236 FIX: Fixed host page of pnp4nagios...
+ * 3293 FIX: Fixed graphs in IE with enabled compatibility mode (for IE < 8)
WATO:
* 3244 WATO BI Module: swap order of aggregation function and child node
selection...
diff --git a/web/htdocs/metrics.py b/web/htdocs/metrics.py
index 42bcc2b..2403fc0 100644
--- a/web/htdocs/metrics.py
+++ b/web/htdocs/metrics.py
@@ -1286,9 +1286,22 @@ def site_is_running_cmc(site_id):
def browser_supports_canvas():
user_agent = html.get_user_agent()
+
if 'MSIE' in user_agent:
matches = regex('MSIE ([0-9]{1,}[\.0-9]{0,})').search(user_agent)
- return not matches or float(matches.group(1)) >= 9.0
+ if matches:
+ ie_version = float(matches.group(1))
+ if ie_version >= 9.0:
+ return True
+
+ # Trying to deal with the IE compatiblity mode to detect the real IE version
+ matches = regex('Trident/([0-9]{1,}[\.0-9]{0,})').search(user_agent)
+ if matches:
+ trident_version = float(matches.group(1))+4
+ if trident_version >= 9.0:
+ return True
+
+ return False
else:
return True