[pve-devel] r5766 - in pve-manager/pve2/www/new: . data window

svn-commits at proxmox.com svn-commits at proxmox.com
Tue Mar 29 13:47:09 CEST 2011


Author: dietmar
Date: 2011-03-29 13:47:09 +0200 (Tue, 29 Mar 2011)
New Revision: 5766

Added:
   pve-manager/pve2/www/new/data/
   pve-manager/pve2/www/new/data/PVEProxy.js
Modified:
   pve-manager/pve2/www/new/Makefile.am
   pve-manager/pve2/www/new/window/LoginWindow.js
Log:
we define our own proxy


Modified: pve-manager/pve2/www/new/Makefile.am
===================================================================
--- pve-manager/pve2/www/new/Makefile.am	2011-03-29 11:29:11 UTC (rev 5765)
+++ pve-manager/pve2/www/new/Makefile.am	2011-03-29 11:47:09 UTC (rev 5766)
@@ -1,6 +1,7 @@
 include $(top_builddir)/common.mk
 
 JSSRC= 				                 	\
+	data/PVEProxy.js				\
 	window/LoginWindow.js				\
 	PVEUtils.js					\
 	Workspace.js

Added: pve-manager/pve2/www/new/data/PVEProxy.js
===================================================================
--- pve-manager/pve2/www/new/data/PVEProxy.js	                        (rev 0)
+++ pve-manager/pve2/www/new/data/PVEProxy.js	2011-03-29 11:47:09 UTC (rev 5766)
@@ -0,0 +1,23 @@
+Ext.define('PVE.RestProxy', {
+    extend: 'Ext.data.RestProxy',
+    alias : 'proxy.pve',
+
+    constructor: function() {
+	Ext.apply(this, {
+	    pageParam : null,
+	    startParam: null,
+	    limitParam: null,
+	    groupParam: null,
+	    sortParam: null,
+	    filterParam: null,
+	    noCache : false,
+	    reader: {
+		type: 'json',
+		root: 'data'
+	    }
+	});
+
+        PVE.RestProxy.superclass.constructor.apply(this, arguments);    
+    }
+
+});

Modified: pve-manager/pve2/www/new/window/LoginWindow.js
===================================================================
--- pve-manager/pve2/www/new/window/LoginWindow.js	2011-03-29 11:29:11 UTC (rev 5765)
+++ pve-manager/pve2/www/new/window/LoginWindow.js	2011-03-29 11:47:09 UTC (rev 5766)
@@ -10,7 +10,7 @@
 	    form.submit({
 		failure: function(f, resp){
 		    self.el.unmask();
-		    Ext.MessageBox.alert('Failure', "Login faailed. Please try again", function() {
+		    Ext.MessageBox.alert('Failure', "Login failed. Please try again", function() {
 			var uf = form.findField('username');
 			uf.focus(true);
 		    });
@@ -31,7 +31,7 @@
 
     return {
 	extend: 'Ext.window.Window',
-	requires: ['Ext.data.Store', 'Ext.form.ComboBox'],
+	requires: ['Ext.data.Store', 'Ext.form.ComboBox', 'PVE.RestProxy'],
 
 	initComponent: function() {
 	    var self = this;
@@ -40,21 +40,9 @@
 		fields: [ 'realm', 'comment', 'default' ],
 		idProperty: 'realm',
 		proxy: {
-		    type: 'rest',
+		    type: 'pve',
 		    url: "/api2/json/access/domains",
 
-		    pageParam : null,
-		    startParam: null,
-		    limitParam: null,
-		    groupParam: null,
-		    sortParam: null,
-		    filterParam: null,
-		    noCache : false,
-
-		    reader: {
-			type: 'json',
-			root: 'data'
-		    }
 		}
 	    });
  




More information about the pve-devel mailing list