[icinga-checkins] icinga.org: icinga-web/master: * Added missing command schedule downtime for host and all services ( resolves #818), removed console.log

git at icinga.org git at icinga.org
Fri Sep 24 11:15:24 CEST 2010


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

Author: jmosshammer <jmosshammer at ws-jmosshammer.(none)>
Date:   Fri Sep 24 11:14:34 2010 +0200

* Added missing command schedule downtime for host and all services (resolves #818), removed console.log

---

 .../Cronks/data/xml/grid/icinga-host-template.xml  |    6 +++++-
 app/modules/Cronks/lib/js/grid/ColumnRenderer.js   |   10 ++++++----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/app/modules/Cronks/data/xml/grid/icinga-host-template.xml b/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
index 88e5c73..2ab9c9f 100644
--- a/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
+++ b/app/modules/Cronks/data/xml/grid/icinga-host-template.xml
@@ -86,7 +86,11 @@
         			<parameter name="title">Schedule a host downtime</parameter>
         			<parameter name="icon_class">icinga-icon-downtime</parameter>
         		</parameter>
-        		<parameter name="ADD_HOST_COMMENT">
+        		<parameter name="SCHEDULE_HOST_SVC_DOWNTIME">
+        			<parameter name="title">Schedule a downtime for this host and it's services</parameter>
+        			<parameter name="icon_class">icinga-icon-downtime</parameter>
+        		</parameter>
+				<parameter name="ADD_HOST_COMMENT">
         			<parameter name="title">Add a host comment</parameter>
         			<parameter name="icon_class">icinga-icon-comment</parameter>
         		</parameter>
diff --git a/app/modules/Cronks/lib/js/grid/ColumnRenderer.js b/app/modules/Cronks/lib/js/grid/ColumnRenderer.js
index d46ce8c..88d7789 100755
--- a/app/modules/Cronks/lib/js/grid/ColumnRenderer.js
+++ b/app/modules/Cronks/lib/js/grid/ColumnRenderer.js
@@ -113,10 +113,11 @@ Cronk.grid.ColumnRenderer = {
 	serviceStatus : function(cfg) {
 		return function(value, metaData, record, rowIndex, colIndex, store) {
 		
-			if(Ext.isDefined(record.json.service_is_pending))
+			if(Ext.isDefined(record.json.service_is_pending)) {
 				if(record.json.service_is_pending == 1)
 					value=99;
-			if(!value)
+			}
+			if(!Ext.isDefined(value))
 				return "";
 			return Icinga.StatusData.wrapElement('service', value);
 		}
@@ -124,10 +125,11 @@ Cronk.grid.ColumnRenderer = {
 	
 	hostStatus : function(cfg) {
 		return function(value, metaData, record, rowIndex, colIndex, store) {
-			if(Ext.isDefined(record.json.host_is_pending))
+			if(Ext.isDefined(record.json.host_is_pending)) {
 				if(record.json.host_is_pending == 1)
 					value=99;
-			if(!value)
+			}
+			if(!Ext.isDefined(value))
 				return "";
 			return Icinga.StatusData.wrapElement('host', value);
 		}





More information about the icinga-checkins mailing list