[icinga-checkins] icinga.org: icinga-web/cdoebler/default: * fixed refresh handling of status map

git at icinga.org git at icinga.org
Wed Oct 7 14:09:00 CEST 2009


Module: icinga-web
Branch: cdoebler/default
Commit: 06c29bdc4bf3303c14bb99ab657b567b2af93587
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=06c29bdc4bf3303c14bb99ab657b567b2af93587

Author: Christian Doebler <christian.doebler at netways.de>
Date:   Wed Oct  7 14:08:31 2009 +0200

* fixed refresh handling of status map

---

 .../Cronks/templates/System/js/JitStatusMap.js     |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/app/modules/Cronks/templates/System/js/JitStatusMap.js b/app/modules/Cronks/templates/System/js/JitStatusMap.js
index 5d96e72..de98130 100644
--- a/app/modules/Cronks/templates/System/js/JitStatusMap.js
+++ b/app/modules/Cronks/templates/System/js/JitStatusMap.js
@@ -32,6 +32,7 @@ function JitStatusMap (config) {
 	this.configWritable = ["url", "params", "method", "timeout", "disableCaching", "parentId"];
 
 	this.elementIds = {
+		set: false,
 		jitContainer: "jitContainer",
 		jitContainerCenter: "jitContainerCenter",
 		jitMap: "jitMap",
@@ -136,9 +137,12 @@ function JitStatusMap (config) {
 	}
 
 	this.setElementIds = function () {
-		var numElements = this.elementIdsWrite.length;
-		for (var x = 0; x < numElements; x++) {
-			this.elementIds[this.elementIdsWrite[x]] += AppKit.Ext.genRandomId('cronk');
+		if (!this.elementIds.set) {
+			var numElements = this.elementIdsWrite.length;
+			for (var x = 0; x < numElements; x++) {
+				this.elementIds[this.elementIdsWrite[x]] = this.config.parentId + this.elementIds[this.elementIdsWrite[x]];
+			}
+			this.elementIds.set = true;
 		}
 	}
 





More information about the icinga-checkins mailing list