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 1F2D27064D
 for <pve-devel@lists.proxmox.com>; Fri, 22 Jul 2022 14:15:32 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 12EC2308B
 for <pve-devel@lists.proxmox.com>; Fri, 22 Jul 2022 14:15:32 +0200 (CEST)
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) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Fri, 22 Jul 2022 14:15:31 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 5C06143683
 for <pve-devel@lists.proxmox.com>; Fri, 22 Jul 2022 14:15:25 +0200 (CEST)
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Date: Fri, 22 Jul 2022 14:15:24 +0200
Message-Id: <20220722121524.1738001-1-a.lauterer@proxmox.com>
X-Mailer: git-send-email 2.30.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.021 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
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: [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: Fri, 22 Jul 2022 12:15:32 -0000

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...') });
     },
 });
 
-- 
2.30.2