public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH widget-toolkit] TaskProgress: show text instead of percentage
@ 2022-07-22 12:15 Aaron Lauterer
  2022-11-07 12:57 ` Aaron Lauterer
  2022-11-07 13:57 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Aaron Lauterer @ 2022-07-22 12:15 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pve-devel] [PATCH widget-toolkit] TaskProgress: show text instead of percentage
  2022-07-22 12:15 [pve-devel] [PATCH widget-toolkit] TaskProgress: show text instead of percentage Aaron Lauterer
@ 2022-11-07 12:57 ` Aaron Lauterer
  2022-11-07 13:57 ` [pve-devel] applied: " Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Aaron Lauterer @ 2022-11-07 12:57 UTC (permalink / raw)
  To: pve-devel

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] applied: [PATCH widget-toolkit] TaskProgress: show text instead of percentage
  2022-07-22 12:15 [pve-devel] [PATCH widget-toolkit] TaskProgress: show text instead of percentage Aaron Lauterer
  2022-11-07 12:57 ` Aaron Lauterer
@ 2022-11-07 13:57 ` Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2022-11-07 13:57 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

Am 22/07/2022 um 14:15 schrieb Aaron Lauterer:
> 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(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-07 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22 12:15 [pve-devel] [PATCH widget-toolkit] TaskProgress: show text instead of percentage Aaron Lauterer
2022-11-07 12:57 ` Aaron Lauterer
2022-11-07 13:57 ` [pve-devel] applied: " Thomas Lamprecht

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