[icinga-checkins] icinga.org: icinga-web/master: Changed row selection behaviour, expiration tiume has now +5 days as default

git at icinga.org git at icinga.org
Thu Aug 30 17:34:52 CEST 2012


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

Author: Jannis Moßhammer <jannis.mosshammer at netways.de>
Date:   Thu Aug 30 17:20:24 2012 +0200

Changed row selection behaviour, expiration tiume has now +5 days as default

---

 app/modules/Api/config/icingaCommands.xml          |   34 +++++++++++---------
 .../Api/lib/xml/xsd/parts/icingaCommands.xsd       |    2 +-
 .../lib/js/Cronk/grid/plugins/RowActionPanel.js    |    5 ++-
 3 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/app/modules/Api/config/icingaCommands.xml b/app/modules/Api/config/icingaCommands.xml
index f5e7af9..150e615 100644
--- a/app/modules/Api/config/icingaCommands.xml
+++ b/app/modules/Api/config/icingaCommands.xml
@@ -1,8 +1,12 @@
+# 1 "modules/Api/config/icingaCommands.xml"
+# 1 "<eingebaut>"
+# 1 "<Kommandozeile>"
+# 1 "modules/Api/config/icingaCommands.xml"
 <?xml version="1.0" encoding="UTF-8"?>
 <ae:configurations xmlns:ic="http://icinga.org/api/config/parts/icingacommands/1.0" xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0" >
     <ae:configuration>
-        <!-- 
-            Global parameter definition, can be referenced to by <ic:parameter ref="COMMAND_INSTANCE"/> for example 
+        <!--
+            Global parameter definition, can be referenced to by <ic:parameter ref="COMMAND_INSTANCE"/> for example
         -->
         <ic:parameters>
             <ic:parameter name="COMMAND_INSTANCE" alias="instance" type="ro" required="true" />
@@ -12,15 +16,15 @@
             <ic:parameter name="COMMAND_SERVICE" alias="service" type="ro" required="true"/>
             <ic:parameter name="COMMAND_ID" alias="id" type="ro" required="true"/>
             <ic:parameter name="COMMAND_COMMENT_ID" alias="comment_id" type="ro" required="true" />
-            
+
             <ic:parameter name="COMMAND_AUTHOR" alias="author" type="ro" required="true"/>
             <ic:parameter name="COMMAND_COMMENT" alias="comment" type="textarea" required="true"/>
             <ic:parameter name="COMMAND_STARTTIME" alias="starttime" type="date" required="true"/>
             <ic:parameter name="COMMAND_ENDTIME" alias="endtime" type="date" required="true"/>
-            <ic:parameter name="COMMAND_EXPIRETIME" alias="expiretime" type="date" required="true"/>
-            <ic:parameter name="COMMAND_STICKY" alias="sticky" type="checkbox" required="false"/>
-            <ic:parameter name="COMMAND_PERSISTENT" alias="persistent" type="checkbox" required="false"/>
-            <ic:parameter name="COMMAND_NOTIFY" alias="notify" type="checkbox" required="false"/>
+            <ic:parameter name="COMMAND_EXPIRETIME" alias="expiretime" type="date" defaultValue="now+432000" required="true"/>
+            <ic:parameter name="COMMAND_STICKY" alias="sticky" type="hidden" defaultValue="false" required="false"/>
+            <ic:parameter name="COMMAND_PERSISTENT" alias="persistent" type="hidden" defaultValue="true" required="false"/>
+            <ic:parameter name="COMMAND_NOTIFY" alias="notify" type="hidden" defaultValue="false" required="false"/>
             <ic:parameter name="COMMAND_RETURN_CODE_HOST" alias="return code" type="return_code_host"/>
             <ic:parameter name="COMMAND_RETURN_CODE_SERVICE" alias="return code" type="return_code_service"/>
             <ic:parameter name="COMMAND_CHECKTIME" alias="checktime" type="date" required="true"/>
@@ -34,34 +38,34 @@
         </ic:parameters>
 
         <ic:commands>
-            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 
+            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
                 href="commands/host.xml"
                 xpointer="xmlns(ic=http://icinga.org/api/config/parts/icingacommands/1.0) xpointer(//ic:commands/node())"
             />
-            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 
+            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
                 href="commands/service.xml"
                 xpointer="xmlns(ic=http://icinga.org/api/config/parts/icingacommands/1.0) xpointer(//ic:commands/node())"
             />
-            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 
+            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
                 href="commands/servicegroup.xml"
                 xpointer="xmlns(ic=http://icinga.org/api/config/parts/icingacommands/1.0) xpointer(//ic:commands/node())"
             />
-            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 
+            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
                 href="commands/hostgroup.xml"
                 xpointer="xmlns(ic=http://icinga.org/api/config/parts/icingacommands/1.0) xpointer(//ic:commands/node())"
             />
-            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 
+            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
                 href="commands/instance.xml"
                 xpointer="xmlns(ic=http://icinga.org/api/config/parts/icingacommands/1.0) xpointer(//ic:commands/node())"
             />
-            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 
+            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
                 href="commands/downtime.xml"
                 xpointer="xmlns(ic=http://icinga.org/api/config/parts/icingacommands/1.0) xpointer(//ic:commands/node())"
             />
-            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 
+            <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
                 href="commands/notification.xml"
                 xpointer="xmlns(ic=http://icinga.org/api/config/parts/icingacommands/1.0) xpointer(//ic:commands/node())"
             />
         </ic:commands>
     </ae:configuration>
-</ae:configurations> 
+</ae:configurations>
diff --git a/app/modules/Api/lib/xml/xsd/parts/icingaCommands.xsd b/app/modules/Api/lib/xml/xsd/parts/icingaCommands.xsd
index 3f62637..c8aa8e0 100644
--- a/app/modules/Api/lib/xml/xsd/parts/icingaCommands.xsd
+++ b/app/modules/Api/lib/xml/xsd/parts/icingaCommands.xsd
@@ -18,7 +18,7 @@
         <xs:attribute name="alias" use="optional" type="xs:string" />
         <xs:attribute name="ref" use="optional" type="xs:string" />
         <xs:attribute name="required" use="optional" type="xs:boolean" />  
-        <xs:attribute name="defaultValue" use="optional" type="xs:boolean" />  
+        <xs:attribute name="defaultValue" use="optional" type="xs:string" />  
     </xs:attributeGroup> 
     
     <xs:complexType name="parameter">
diff --git a/app/modules/Cronks/lib/js/Cronk/grid/plugins/RowActionPanel.js b/app/modules/Cronks/lib/js/Cronk/grid/plugins/RowActionPanel.js
index fba28e4..8427ce1 100644
--- a/app/modules/Cronks/lib/js/Cronk/grid/plugins/RowActionPanel.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/plugins/RowActionPanel.js
@@ -168,8 +168,9 @@ Ext.ns("Cronk.grid.plugins");
             });
             
             // Also show the panel on selection
-            this.grid.getSelectionModel().on("rowselect", function(sm, rowIndex, record) {
-                this.toggleHandler(rowIndex);
+            this.grid.on("cellclick", function(sm, rowIndex,cellIndex, record) {
+                if(cellIndex == 1)
+                    this.toggleHandler(rowIndex);
             }, this);
             
             this.grid.getSelectionModel().on("rowdeselect", function(sm, rowIndex, record) {





More information about the icinga-checkins mailing list