[pve-devel] [PATCH manager v2 1/4] Add a new property afterTaskProgress to Edit Window

Dietmar Maurer dietmar at proxmox.com
Tue Jan 3 10:07:34 CET 2017


I thought we want to reload after the API call?

> On December 22, 2016 at 12:15 PM Emmanuel Kasper <e.kasper at proxmox.com> wrote:
> 
> 
> The main aim of this new parameter is to allow
> a refresh of a GridPanel *after* the task window
> has been closed, and not after Edit Window is closed
> which is often two early.
> ---
>  www/manager6/window/Edit.js | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/www/manager6/window/Edit.js b/www/manager6/window/Edit.js
> index 0f9c611..36ef7b6 100644
> --- a/www/manager6/window/Edit.js
> +++ b/www/manager6/window/Edit.js
> @@ -24,6 +24,10 @@ Ext.define('PVE.window.Edit', {
>  
>      showProgress: false,
>  
> +    // if background or showProcess are set,
> +    // set an optional hook to be executed when the TaskProcess window closes
> +    afterTaskProgress: undefined,
> +
>      isValid: function() {
>  	var me = this;
>  
> @@ -118,6 +122,9 @@ Ext.define('PVE.window.Edit', {
>  		    var win = Ext.create('PVE.window.TaskProgress', { 
>  			upid: upid
>  		    });
> +		    if (Ext.isFunction(me.afterTaskProgress)) {
> +			win.on('destroy', me.afterTaskProgress);
> +		    }
>  		    win.show();
>  		}
>  	    }
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list