[icinga-checkins] icinga.org: icinga-web/jmosshammer/default: * Fixed wrong filter in openproblems, fixed statusmap in portal

git at icinga.org git at icinga.org
Sun Mar 20 11:26:10 CET 2011


Module: icinga-web
Branch: jmosshammer/default
Commit: 3afc188a77055ac3aaea8c6e6a5c687686e7a9a7
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=3afc188a77055ac3aaea8c6e6a5c687686e7a9a7

Author: jmosshammer <jannis.mosshammer at netways.de>
Date:   Tue Mar  1 13:44:17 2011 +0100

* Fixed wrong filter in openproblems, fixed statusmap in portal

---

 .../xml/grid/icinga-open-problems-template.xml     |    2 +-
 app/modules/Cronks/lib/js/CronkUtil.js             |    2 +-
 .../Cronks/templates/System/js/JitStatusMap.js     |   17 +++++++++++++++--
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/app/modules/Cronks/data/xml/grid/icinga-open-problems-template.xml b/app/modules/Cronks/data/xml/grid/icinga-open-problems-template.xml
index 81d9f44..7f6a07c 100644
--- a/app/modules/Cronks/data/xml/grid/icinga-open-problems-template.xml
+++ b/app/modules/Cronks/data/xml/grid/icinga-open-problems-template.xml
@@ -513,7 +513,7 @@
 
                 <!-- Filter configuration -->
                 <parameter name="type">extjs</parameter>
-                <parameter name="subtype">appkit.ext.filter.hoststatus</parameter>
+                <parameter name="subtype">appkit.ext.filter.servicestatus</parameter>
 
                 <parameter name="no_operator">false</parameter>
             </filter>
diff --git a/app/modules/Cronks/lib/js/CronkUtil.js b/app/modules/Cronks/lib/js/CronkUtil.js
index dba9535..dabbe56 100755
--- a/app/modules/Cronks/lib/js/CronkUtil.js
+++ b/app/modules/Cronks/lib/js/CronkUtil.js
@@ -48,7 +48,7 @@ Cronk.util.scriptInterface = Ext.extend(Object, function () {
 			
 			if (r) {
 				parentCmp = Ext.getCmp(parentid);
-				this.parentd = parentid;
+				this.parentid = parentid;
 				Ext.apply(this, r);
 				
 				Ext.apply(this, {
diff --git a/app/modules/Cronks/templates/System/js/JitStatusMap.js b/app/modules/Cronks/templates/System/js/JitStatusMap.js
index 3b93ecd..ce97b9c 100755
--- a/app/modules/Cronks/templates/System/js/JitStatusMap.js
+++ b/app/modules/Cronks/templates/System/js/JitStatusMap.js
@@ -50,8 +50,17 @@ function JitStatusMap (config) {
 
 	function jitInit (json, elementIds) {
 		var infovis = document.getElementById(elementIds.jitMap);
-		var w = infovis.offsetWidth, h = infovis.offsetHeight;
+		
+		var panel = Ext.DomQuery.selectNode('.x-panel-body',infovis);	
+		
+		if(panel) {
+			var pElem = Ext.get(panel);
+			pElem.setHeight(infovis.offsetHeight);
+			pElem.setWidth(infovis.offsetWidth);
+			infovis = panel;
+		}
 
+		var w = infovis.offsetWidth, h = infovis.offsetHeight;
 		var rgraph = new $jit.RGraph({
 			Node: {
 				overridable: true,
@@ -60,7 +69,7 @@ function JitStatusMap (config) {
 			Edge: {
 				color: "#56a5ec"
 			},
-			"injectInto": elementIds.jitMap,
+			"injectInto": infovis.id,
 			"width": w,
 			"height": h,
 			"background": {
@@ -94,6 +103,7 @@ function JitStatusMap (config) {
 				JitLog.write(elementIds.jitLog, "done");
 			},
 			onBeforePlotNode:function(node) {
+				
 				switch (node.data.status) {
 					case "0":
 						node.data.$color = "#00cc00";
@@ -130,8 +140,10 @@ function JitStatusMap (config) {
 				style.left = (left - w / 2) + "px";
 			}
 		});
+
 		rgraph.loadJSON(json);
 		rgraph.refresh();
+	
 		document.getElementById(elementIds.jitDetails).innerHTML = rgraph.graph.getNode(rgraph.root).data.relation;
 	}
 
@@ -200,6 +212,7 @@ function JitStatusMap (config) {
 				cls: "jitLog"
 			}]
 		});
+	
 		this.cmp.add(container);
 		this.cmp.doLayout();
 	}





More information about the icinga-checkins mailing list