Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
Fix pending state handling in ColumnRenderer for IcingaStatus (refs #…
Browse files Browse the repository at this point in the history
…3843)

the problem was caused by an string to int comparsion using ===
  • Loading branch information
lazyfrosch committed Mar 17, 2013
1 parent a49f9d4 commit 78b36c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -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;
}
}
Expand Down
10 changes: 5 additions & 5 deletions app/modules/Cronks/lib/js/Cronk/grid/renderer/ColumnRenderer.js
Expand Up @@ -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;
}
}
Expand All @@ -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;
}
}
Expand Down Expand Up @@ -312,4 +312,4 @@ Ext.ns('Cronk.grid');
}
};

})();
})();

0 comments on commit 78b36c3

Please sign in to comment.