Module: check_mk
Branch: master
Commit: 8461df43820f66ef0805f732a220a21fa3c6e9e4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8461df43820f66…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 26 08:26:54 2016 +0200
3722 FIX Mobile GUI: Prevent it from being opened with regular sidebar
---
.werks/3722 | 10 ++++++++++
ChangeLog | 2 ++
web/htdocs/mobile.py | 6 ++++++
3 files changed, 18 insertions(+)
diff --git a/.werks/3722 b/.werks/3722
new file mode 100644
index 0000000..344504c
--- /dev/null
+++ b/.werks/3722
@@ -0,0 +1,10 @@
+Title: Mobile GUI: Prevent it from being opened with regular sidebar
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i1
+Date: 1469514403
+
+
diff --git a/ChangeLog b/ChangeLog
index 394914a..789f3ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -406,6 +406,7 @@
* 3669 FIX: LDAP: Fixed very long running LDAP sync when using group based sync
plugins
* 3670 FIX: Fixed empty AV PDF report when exporting it from a quicksearch result
view
* 3622 FIX: Fix labelling of V-Achsis on graphs with very large numbers...
+ * 3722 FIX: Mobile GUI: Prevent it from being opened with regular sidebar
WATO:
* 3244 WATO BI Module: swap order of aggregation function and child node
selection...
@@ -497,6 +498,7 @@
* 3583 FIX: Fixed loosing some services after saving services in WATO...
* 3588 FIX: BI aggregation: Fixed folding of tag groups in aggregation rules using
host/service searches
* 3620 FIX: Do not longer put SNMP MIB files into WATO snapshots...
+ * 3542 FIX: WATO Web API: fixed exception when WATO Git is activated...
* 3547 FIX: Deleting a subfolder now generates a correct audit message...
* 3661 FIX: Service discovery is now possible with only "modify services"
permission...
* 3152 FIX: lvm_vgs: fixed exception in host-specific settings if rule for LVM groups
is set
diff --git a/web/htdocs/mobile.py b/web/htdocs/mobile.py
index 083aeaa..6f435e7 100644
--- a/web/htdocs/mobile.py
+++ b/web/htdocs/mobile.py
@@ -63,6 +63,12 @@ def mobile_html_head(title, ready_code=""):
if metrics.cmk_graphs_possible():
html.write(" <script type='text/javascript'
src='js/graphs.js'></script>\n")
+ # Never allow the mobile page to be opened in a frameset. Redirect top page to the
current content page.
+ # This will result in a full screen mobile interface page.
+ html.javascript('''if(top != self) {
+ window.top.location.href = location;
+}''')
+
html.write("""<script type='text/javascript'>
$(document).ready(function() { %s });
$(document).ready(function() {