[icinga-checkins] icinga.org: icinga-web/master: Portal fixes for statusmap

git at icinga.org git at icinga.org
Thu Oct 11 13:50:11 CEST 2012


Module: icinga-web
Branch: master
Commit: 8de9e73dff93df10b51f3a553903672bb166a6df
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=8de9e73dff93df10b51f3a553903672bb166a6df

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Thu Oct 11 13:49:51 2012 +0200

Portal fixes for statusmap

---

 .../js/Icinga/Cronks/StatusMap/StatusMapPanel.js   |    4 +++-
 .../Cronks/templates/System/StatusMapSuccess.php   |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Icinga/Cronks/StatusMap/StatusMapPanel.js b/app/modules/Cronks/lib/js/Icinga/Cronks/StatusMap/StatusMapPanel.js
index 53a880e..334fefb 100755
--- a/app/modules/Cronks/lib/js/Icinga/Cronks/StatusMap/StatusMapPanel.js
+++ b/app/modules/Cronks/lib/js/Icinga/Cronks/StatusMap/StatusMapPanel.js
@@ -212,7 +212,9 @@
                     this.centeredNode = node.data.relation.HOST_OBJECT_ID;
                 this.rgraph.onClick(node.id, {  
                     onComplete: function() {
-                        that.detailPanel.getPanel().expand();
+                        // only expand automatically if there is enough room
+                        if(that.parentCmp.getWidth() > 500)
+                            that.detailPanel.getPanel().expand();
                         if(that.centerIsRoot)
                             that.sync();
                     }
diff --git a/app/modules/Cronks/templates/System/StatusMapSuccess.php b/app/modules/Cronks/templates/System/StatusMapSuccess.php
index 8baa3ec..0cf9684 100755
--- a/app/modules/Cronks/templates/System/StatusMapSuccess.php
+++ b/app/modules/Cronks/templates/System/StatusMapSuccess.php
@@ -36,7 +36,9 @@ Cronk.util.initEnvironment(<?php CronksRequestUtil::echoJsonString($rd); ?>, fun
     // Link some object to the cronk registry object
     
     map.on("afterrender",function() {
-        this.registry.local.statusmap = map;
+        if(this.registry.local)
+            this.registry.local.statusmap = map;
+    
     },this);
    
 





More information about the icinga-checkins mailing list