From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <a.lauterer@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 7DA9D8D1C4
 for <pve-devel@lists.proxmox.com>; Mon,  7 Nov 2022 13:57:36 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 669752B4EE
 for <pve-devel@lists.proxmox.com>; Mon,  7 Nov 2022 13:57:36 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Mon,  7 Nov 2022 13:57:35 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 02F614169D
 for <pve-devel@lists.proxmox.com>; Mon,  7 Nov 2022 13:57:35 +0100 (CET)
Message-ID: <0f9aba0d-18e9-1033-8cad-9c5214bc45bb@proxmox.com>
Date: Mon, 7 Nov 2022 13:57:34 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.4.1
To: pve-devel@lists.proxmox.com
References: <20220722121524.1738001-1-a.lauterer@proxmox.com>
Content-Language: en-US
From: Aaron Lauterer <a.lauterer@proxmox.com>
In-Reply-To: <20220722121524.1738001-1-a.lauterer@proxmox.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.044 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 NICE_REPLY_A           -0.001 Looks like a legit reply (A)
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: Re: [pve-devel] [PATCH widget-toolkit] TaskProgress: show text
 instead of percentage
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Mon, 07 Nov 2022 12:57:36 -0000

ping

Recently ran into a situation where, on a slower system, the 100% were reached, 
and it started again at 0%.

On 7/22/22 14:15, Aaron Lauterer wrote:
> The text needs to be defined in the wait() call as otherwise the
> Ext.Progressbar will show a percentage that is not correct anyway but
> just reflects where the animated progress bar itself is.
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
> This wasn't much of a problem in most cases where the task finished very
> fast. It was most notable in the "Move Disk" situation where the task
> could take a very long time, but we switch over to the detailed task log
> view there anyway.
> 
> I am not sure if showing 'running..." did work at some point in the
> past, but now it definitely needs to be defined when calling pbar.wait()
> 
>   src/window/TaskViewer.js | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/window/TaskViewer.js b/src/window/TaskViewer.js
> index 9293d95..5d8bb84 100644
> --- a/src/window/TaskViewer.js
> +++ b/src/window/TaskViewer.js
> @@ -37,7 +37,7 @@ Ext.define('Proxmox.window.TaskProgress', {
>   	    return defaultValue;
>   	};
>   
> -	let pbar = Ext.create('Ext.ProgressBar', { text: 'running...' });
> +	let pbar = Ext.create('Ext.ProgressBar');
>   
>   	me.mon(statstore, 'load', function() {
>   	    let status = getObjectValue('status');
> @@ -79,7 +79,7 @@ Ext.define('Proxmox.window.TaskProgress', {
>   
>   	statstore.startUpdate();
>   
> -	pbar.wait();
> +	pbar.wait({ text: gettext('running...') });
>       },
>   });
>