[pve-devel] applied: [PATCH] window/Edit: allow showing TaskViewer instead of TaskProgress

Dominik Csapak d.csapak at proxmox.com
Tue Mar 27 11:58:11 CEST 2018


applied

On 03/27/2018 07:27 AM, Thomas Lamprecht wrote:
> let our users decide if the want to show a TaskProgress window or a
> TaskViewer window, so that they do not always must create the Viewer
> their self
> 
> Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
> ---
>   window/Edit.js | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/window/Edit.js b/window/Edit.js
> index 0d51944..75fce39 100644
> --- a/window/Edit.js
> +++ b/window/Edit.js
> @@ -38,6 +38,8 @@ Ext.define('Proxmox.window.Edit', {
>   
>       showProgress: false,
>   
> +    showTaskViewer: false,
> +
>       // assign a reference from docs, to add a help button docked to the
>       // bottom of the window. If undefined we magically fall back to the
>       // onlineHelp of our first item, if set.
> @@ -130,7 +132,7 @@ Ext.define('Proxmox.window.Edit', {
>   		Ext.Msg.alert(gettext('Error'), response.htmlStatus);
>   	    },
>   	    success: function(response, options) {
> -		var hasProgressBar = (me.backgroundDelay || me.showProgress) &&
> +		var hasProgressBar = (me.backgroundDelay || me.showProgress || me.showTaskViewer) &&
>   		    response.result.data ? true : false;
>   
>   		if (hasProgressBar) {
> @@ -139,7 +141,8 @@ Ext.define('Proxmox.window.Edit', {
>   		    me.hide();
>   
>   		    var upid = response.result.data;
> -		    var win = Ext.create('Proxmox.window.TaskProgress', {
> +		    var viewerClass = me.showTaskViewer ? 'Viewer' : 'Progress';
> +		    var win = Ext.create('Proxmox.window.Task' + viewerClass, {
>   			upid: upid,
>   			listeners: {
>   			    destroy: function () {
> 





More information about the pve-devel mailing list