[icinga-checkins] icinga.org: icinga-web/r1.8: Fix pending state handling in ColumnRenderer for IcingaStatus (refs #3843)

git at icinga.org git at icinga.org
Sun Mar 17 11:42:47 CET 2013


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

Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Tue Mar 12 17:09:48 2013 +0100

Fix pending state handling in ColumnRenderer for IcingaStatus (refs #3843)

the problem was caused by an string to int comparsion using ===

---

 .../renderer/AdvancedHostStatusColumnRenderer.js   |    2 +-
 .../lib/js/Cronk/grid/renderer/ColumnRenderer.js   |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Cronk/grid/renderer/AdvancedHostStatusColumnRenderer.js b/app/modules/Cronks/lib/js/Cronk/grid/renderer/AdvancedHostStatusColumnRenderer.js
index c9ea257..12760e6 100644
--- a/app/modules/Cronks/lib/js/Cronk/grid/renderer/AdvancedHostStatusColumnRenderer.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/renderer/AdvancedHostStatusColumnRenderer.js
@@ -138,7 +138,7 @@ Ext.ns('Cronk.grid');
         this.hostStatus = function () {
             return function (value, metaData, record, rowIndex, colIndex, store) {
                 if (Ext.isDefined(record.json.host_has_been_checked)) {
-                    if (record.json.host_has_been_checked === 0) {
+                    if (record.json.host_has_been_checked == 0) {
                         value = 99;
                     }
                 }
diff --git a/app/modules/Cronks/lib/js/Cronk/grid/renderer/ColumnRenderer.js b/app/modules/Cronks/lib/js/Cronk/grid/renderer/ColumnRenderer.js
index c96833b..8a4943e 100755
--- a/app/modules/Cronks/lib/js/Cronk/grid/renderer/ColumnRenderer.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/renderer/ColumnRenderer.js
@@ -252,11 +252,11 @@ Ext.ns('Cronk.grid');
                 return function (value, metaData, record, rowIndex, colIndex, store) {
 
                     if (Ext.isDefined(record.json.service_is_pending)) {
-                        if (record.json.service_is_pending > 0) {
+                        if (record.json.service_is_pending == 1) {
                             value = 99;
                         }
                     } else if (Ext.isDefined(record.json.service_has_been_checked)) {
-                        if (record.json.service_has_been_checked === 0) {
+                        if (record.json.service_has_been_checked == 0) {
                             value = 99;
                         }
                     }
@@ -270,11 +270,11 @@ Ext.ns('Cronk.grid');
             hostStatus: function (cfg) {
                 return function (value, metaData, record, rowIndex, colIndex, store) {
                     if (Ext.isDefined(record.json.host_is_pending)) {
-                        if (record.json.host_is_pending > 0) {
+                        if (record.json.host_is_pending == 1) {
                             value = 99;
                         }
                     } else if (Ext.isDefined(record.json.host_has_been_checked)) {
-                        if (record.json.host_has_been_checked === 0) {
+                        if (record.json.host_has_been_checked == 0) {
                             value = 99;
                         }
                     }
@@ -312,4 +312,4 @@ Ext.ns('Cronk.grid');
             }
     };
 
-})();
\ No newline at end of file
+})();





More information about the icinga-checkins mailing list