[pve-devel] r6344 - in pve-manager/pve2/www/manager: . dc qemu

svn-commits at proxmox.com svn-commits at proxmox.com
Thu Jul 21 12:39:48 CEST 2011


Author: dietmar
Date: 2011-07-21 12:39:48 +0200 (Thu, 21 Jul 2011)
New Revision: 6344

Modified:
   pve-manager/pve2/www/manager/Utils.js
   pve-manager/pve2/www/manager/dc/StorageView.js
   pve-manager/pve2/www/manager/qemu/CreateWizard.js
   pve-manager/pve2/www/manager/qemu/HardwareView.js
   pve-manager/pve2/www/manager/qemu/NotesView.js
   pve-manager/pve2/www/manager/qemu/Summary.js
Log:
use waitMsgTarget


Modified: pve-manager/pve2/www/manager/Utils.js
===================================================================
--- pve-manager/pve2/www/manager/Utils.js	2011-07-21 10:29:20 UTC (rev 6343)
+++ pve-manager/pve2/www/manager/Utils.js	2011-07-21 10:39:48 UTC (rev 6344)
@@ -258,7 +258,7 @@
 	}
 	delete newopts.callback;
 
- 	var createWrapper = function(successFn, callbackFn, failureFn) {
+	var createWrapper = function(successFn, callbackFn, failureFn) {
 	    Ext.apply(newopts, {
 		success: function(response, options) {
 		    if (options.waitMsgTarget) {

Modified: pve-manager/pve2/www/manager/dc/StorageView.js
===================================================================
--- pve-manager/pve2/www/manager/dc/StorageView.js	2011-07-21 10:29:20 UTC (rev 6343)
+++ pve-manager/pve2/www/manager/dc/StorageView.js	2011-07-21 10:39:48 UTC (rev 6344)
@@ -20,7 +20,7 @@
 
 	var reload = function() {
 	    store.load();
-	}
+	};
 
 	var run_editor = function() {
 	    var sm = me.getSelectionModel();
@@ -39,7 +39,7 @@
 		return;
 	    }
 	    var win = Ext.create(editor, {
-		storageId: rec.data.storage,
+		storageId: rec.data.storage
 	    });
 
 	    win.show();

Modified: pve-manager/pve2/www/manager/qemu/CreateWizard.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/CreateWizard.js	2011-07-21 10:29:20 UTC (rev 6343)
+++ pve-manager/pve2/www/manager/qemu/CreateWizard.js	2011-07-21 10:39:48 UTC (rev 6344)
@@ -148,14 +148,11 @@
 			var nodename = kv.nodename;
 			delete kv.nodename;
 
-			me.down('form').setLoading(true, true);
 			PVE.Utils.API2Request({
 			    url: '/nodes/' + nodename + '/qemu',
+			    waitMsgTarget: me.getTargetEl(),
 			    method: 'POST',
 			    params: kv,
-			    callback: function() {
-				me.down('form').setLoading(false);
-			    },
 			    success: function(response){
 				me.close();
 			    },

Modified: pve-manager/pve2/www/manager/qemu/HardwareView.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/HardwareView.js	2011-07-21 10:29:20 UTC (rev 6343)
+++ pve-manager/pve2/www/manager/qemu/HardwareView.js	2011-07-21 10:39:48 UTC (rev 6344)
@@ -207,15 +207,14 @@
 		    if (btn !== 'yes') {
 			return;
 		    }
-		    me.setLoading(true, true);
 		    PVE.Utils.API2Request({
 			url: '/api2/extjs/' + baseurl,
+			waitMsgTarget: me.getTargetEl(),
 			method: 'PUT',
 			params: {
 			    'delete': rec.data.key
 			},
 			callback: function() {
-			    me.setLoading(false);
 			    reload();
 			},
 			failure: function (response, opts) {

Modified: pve-manager/pve2/www/manager/qemu/NotesView.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/NotesView.js	2011-07-21 10:29:20 UTC (rev 6343)
+++ pve-manager/pve2/www/manager/qemu/NotesView.js	2011-07-21 10:39:48 UTC (rev 6344)
@@ -6,6 +6,7 @@
 	
 	PVE.Utils.API2Request({
 	    url: me.url,
+	    waitMsgTarget: me.getTargetEl(),
 	    failure: function(response, opts) {
 		me.update("Error " + response.htmlStatus);
 	    },

Modified: pve-manager/pve2/www/manager/qemu/Summary.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/Summary.js	2011-07-21 10:29:20 UTC (rev 6343)
+++ pve-manager/pve2/www/manager/qemu/Summary.js	2011-07-21 10:39:48 UTC (rev 6344)
@@ -26,14 +26,11 @@
 	var rrdurl = "/api2/png/nodes/" + nodename + "/qemu/" + vmid + "/rrd";
 
 	var vm_command = function(cmd) {
-	    me.setLoading(true, true);
 	    PVE.Utils.API2Request({
 		params: { command: cmd },
 		url: '/nodes/' + nodename + '/qemu/' + vmid + "/status",
+		waitMsgTarget: me.getTargetEl(),
 		method: 'PUT',
-		callback: function() {
-		    me.setLoading(false);
-		},
 		failure: function(response, opts) {
 		    Ext.Msg.alert('Error', response.htmlStatus);
 		}
@@ -98,13 +95,10 @@
 			    if (btn !== 'yes') {
 				return;
 			    }
-			    me.setLoading(true, true);
 			    PVE.Utils.API2Request({
 				url: '/nodes/' + nodename + '/qemu/' + vmid,
 				method: 'DELETE',
-				callback: function() {
-				    me.setLoading(false);
-				},
+				waitMsgTarget: me.getTargetEl(),
 				failure: function(response, opts) {
 				    Ext.Msg.alert('Error', response.htmlStatus);
 				}




More information about the pve-devel mailing list