public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit] TaskProgress: show text instead of percentage
Date: Fri, 22 Jul 2022 14:15:24 +0200	[thread overview]
Message-ID: <20220722121524.1738001-1-a.lauterer@proxmox.com> (raw)

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





             reply	other threads:[~2022-07-22 12:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22 12:15 Aaron Lauterer [this message]
2022-11-07 12:57 ` Aaron Lauterer
2022-11-07 13:57 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220722121524.1738001-1-a.lauterer@proxmox.com \
    --to=a.lauterer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal