[icinga-checkins] icinga.org: icinga-web/cdoebler/default: * Fixed cookie writing failures

git at icinga.org git at icinga.org
Thu Jan 28 15:06:08 CET 2010


Module: icinga-web
Branch: cdoebler/default
Commit: 8c5dbeb32aa22213417e6248194fa99be8fc1353
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=8c5dbeb32aa22213417e6248194fa99be8fc1353

Author: Marius Hein <mhein at sasquatch.local.itsocks.de>
Date:   Thu Jan 28 12:24:51 2010 +0100

* Fixed cookie writing failures
* Fixed bug restoring the filter elements

---

 .../System/ViewProc/js/IcingaGridFilterHandler.js  |    8 ++++++--
 lib/appkit/js/ext/ExtJs.js                         |    9 +++++++++
 res/xml/icinga-notification-template.xml           |   20 +++++++++++++++++---
 3 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/app/modules/Cronks/templates/System/ViewProc/js/IcingaGridFilterHandler.js b/app/modules/Cronks/templates/System/ViewProc/js/IcingaGridFilterHandler.js
index 3f8c342..cf1796e 100644
--- a/app/modules/Cronks/templates/System/ViewProc/js/IcingaGridFilterHandler.js
+++ b/app/modules/Cronks/templates/System/ViewProc/js/IcingaGridFilterHandler.js
@@ -82,10 +82,12 @@ var IcingaGridFilterWindow = function() {
 							})
 						}
 						
-						if (oGrid.filter_params) {
+						if (oGrid.filter_params && oCoPanel) {
 							Ext.iterate(oGrid.filter_params, function (key, val) {
+//								console.log(key + ": " + val);
 								key = key.replace(/^f\[|\]$/g, "");
 								var c = oCoPanel.findBy(function(ti) {
+									
 									if (ti.hiddenName == key || ti.name == key) {
 										return true;
 									}
@@ -269,7 +271,9 @@ var IcingaGridFilterWindow = function() {
 			oOrgBaseParams = oGrid.getStore().baseParams;
 			
 			oGrid.on('activate', function() {
-				oGrid.filter_params = getFormValues(false);
+				if (oCoPanel) {
+					oGrid.filter_params = getFormValues(false);
+				}
 				return true;
 			});
 			
diff --git a/lib/appkit/js/ext/ExtJs.js b/lib/appkit/js/ext/ExtJs.js
index b246dec..900399a 100644
--- a/lib/appkit/js/ext/ExtJs.js
+++ b/lib/appkit/js/ext/ExtJs.js
@@ -29,6 +29,12 @@ AppKit.Ext = function() {
 		'isready' : true
 	};
 	
+	var domainData = {
+		domain: document.location.host || document.domain,
+		path: document.location.pathname,
+		issecure: (document.location.protocol.indexOf('https') == 0) ? true : false
+	};
+	
 	var initEnvironment = function() {
 		// Default image for ExtJS
 		Ext.BLANK_IMAGE_URL = 'images/ajax/s.gif';
@@ -39,6 +45,9 @@ AppKit.Ext = function() {
 		// Try to restore the application state
 		if (appStateData) {
 			Ext.state.Manager.setProvider(new Ext.state.SessionProvider({
+				domain: domainData.domain,
+				path: domainData.path,
+				secure: domainData.issecure,
 				state: appStateData || {} 
 			}));
 		}
diff --git a/res/xml/icinga-notification-template.xml b/res/xml/icinga-notification-template.xml
index 585a370..1e14f5a 100644
--- a/res/xml/icinga-notification-template.xml
+++ b/res/xml/icinga-notification-template.xml
@@ -158,7 +158,11 @@
             </display>
             
             <filter>
-                <parameter name="enabled">false</parameter>    
+                <parameter name="enabled">true</parameter>
+                
+                <!-- Filter configuration -->
+                <parameter name="type">extjs</parameter>
+				<parameter name="subtype">appkit.ext.filter.text</parameter>
             </filter>
             
             <order>
@@ -184,7 +188,11 @@
             </display>
             
             <filter>
-                <parameter name="enabled">false</parameter>    
+                <parameter name="enabled">true</parameter>
+                
+                <!-- Filter configuration -->
+                <parameter name="type">extjs</parameter>
+				<parameter name="subtype">appkit.ext.filter.text</parameter>
             </filter>
             
             <order>
@@ -216,7 +224,13 @@
             </display>
         	
             <filter>
-                <parameter name="enabled">false</parameter>    
+                <parameter name="enabled">true</parameter>
+                
+                <!-- Filter configuration -->
+                <parameter name="type">extjs</parameter>
+                <parameter name="subtype">appkit.ext.filter.servicestatus</parameter>
+                
+                <parameter name="no_operator">false</parameter>
             </filter>
             
             <order>





More information about the icinga-checkins mailing list