[pve-devel] [PATCH manager] Reload the BackupView after the BackupTask has been closed

Emmanuel Kasper e.kasper at proxmox.com
Mon Jan 2 15:04:41 CET 2017


The reload() function of the Backup View is passed with
its context to the Backup Window, which passes it further
to a listener in the Backup Task.
---
 www/manager6/grid/BackupView.js |  3 ++-
 www/manager6/window/Backup.js   | 11 +++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/www/manager6/grid/BackupView.js b/www/manager6/grid/BackupView.js
index a924c0a..f133e64 100644
--- a/www/manager6/grid/BackupView.js
+++ b/www/manager6/grid/BackupView.js
@@ -123,7 +123,8 @@ Ext.define('PVE.grid.BackupView', {
 		    nodename: nodename,
 		    vmid: vmid,
 		    vmtype: vmtype,
-		    storage: storagesel.getValue()
+		    storage: storagesel.getValue(),
+		    reload: reload
 		});
 		win.show();
 	    }
diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js
index 033c199..0ed5d39 100644
--- a/www/manager6/window/Backup.js
+++ b/www/manager6/window/Backup.js
@@ -78,10 +78,13 @@ Ext.define('PVE.window.Backup', {
 		    success: function(response, options) {
 			var upid = response.result.data;
 			
-			var win = Ext.create('PVE.window.TaskViewer', { 
-			    upid: upid
-			});
-			win.show();
+			Ext.create('PVE.window.TaskViewer', {
+			    upid: upid,
+			    listeners: {
+				destroy: me.reload // will reload the BackupView when
+						// TaskViewer is closed
+			    }
+			}).show();
 			me.close();
 		    }
 		});
-- 
2.1.4




More information about the pve-devel mailing list