[icinga-checkins] icinga.org: icinga-web/master: Changed PNP contribution condition

git at icinga.org git at icinga.org
Thu Oct 11 17:18:56 CEST 2012


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Thu Oct 11 17:18:19 2012 +0200

Changed PNP contribution condition

Changed to activation instead of show event

---

 .../Cronks/lib/js/Cronk/grid/events/EventMixin.js  |   11 ++++++++++-
 .../templateExtensions/pnp-host-extension.xml      |    4 ++--
 .../templateExtensions/pnp-service-extension.xml   |    4 ++--
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Cronk/grid/events/EventMixin.js b/app/modules/Cronks/lib/js/Cronk/grid/events/EventMixin.js
index 6684a06..d1076ca 100644
--- a/app/modules/Cronks/lib/js/Cronk/grid/events/EventMixin.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/events/EventMixin.js
@@ -118,7 +118,8 @@ Ext.ns("Cronk.grid.events");
          */
         conditionEvents: {
             showcondition: true,
-            hidecondition: false
+            hidecondition: false,
+            activationcondition: true
         },
         
         /**
@@ -411,6 +412,14 @@ Ext.ns("Cronk.grid.events");
         },
         
         /**
+         * Test condition results against activation
+         * @param {Boolean} val
+         */
+        testActivationcondition: function(val) {
+            this.setDisabled(!val);
+        },
+        
+        /**
          * Setter for store
          * @param {Ext.data.Store} record
          */
diff --git a/contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml b/contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml
index bcfdb94..7c885f6 100644
--- a/contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml
+++ b/contrib/PNP_Integration/templateExtensions/pnp-host-extension.xml
@@ -26,7 +26,7 @@
                             
                             <parameter name="conditions">
                                 <parameter>
-                                    <parameter name="condition">show</parameter>
+                                    <parameter name="condition">activation</parameter>
                                     <parameter name="fn"><![CDATA[
                                         function() {
                                             if (this.getRecord().get("process_performance_data") === "1") {
@@ -63,7 +63,7 @@
                             
                             <parameter name="conditions">
                                 <parameter>
-                                    <parameter name="condition">show</parameter>
+                                    <parameter name="condition">activation</parameter>
                                     <parameter name="fn"><![CDATA[
                                         function() {
                                             if (this.getRecord().get("process_performance_data") === "1") {
diff --git a/contrib/PNP_Integration/templateExtensions/pnp-service-extension.xml b/contrib/PNP_Integration/templateExtensions/pnp-service-extension.xml
index 8a3d6b1..0e2fc9c 100644
--- a/contrib/PNP_Integration/templateExtensions/pnp-service-extension.xml
+++ b/contrib/PNP_Integration/templateExtensions/pnp-service-extension.xml
@@ -26,7 +26,7 @@
                             
                             <parameter name="conditions">
                                 <parameter>
-                                    <parameter name="condition">show</parameter>
+                                    <parameter name="condition">activation</parameter>
                                     <parameter name="fn"><![CDATA[
                                         function() {
                                             if (this.getRecord().get("process_performance_data") === "1") {
@@ -63,7 +63,7 @@
                             
                             <parameter name="conditions">
                                 <parameter>
-                                    <parameter name="condition">show</parameter>
+                                    <parameter name="condition">activation</parameter>
                                     <parameter name="fn"><![CDATA[
                                         function() {
                                             if (this.getRecord().get("process_performance_data") === "1") {





More information about the icinga-checkins mailing list