* [pve-devel] [PATCH widget-toolkit] fix #3919: show first task output line correctly
@ 2022-03-03 14:11 Dominik Csapak
2022-03-04 13:55 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2022-03-03 14:11 UTC (permalink / raw)
To: pve-devel
if a task did not produce output yet, we always get a single line
with "no output". our heuristic in the gui counts the total lines +
the current position. so to update the first output correctly, we
have to update every time in case we only have one line.
Otherwise, we only update on the second line, which is bad
in case the only line we ever get is the result.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/panel/LogView.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/panel/LogView.js b/src/panel/LogView.js
index 22029a1..412b26e 100644
--- a/src/panel/LogView.js
+++ b/src/panel/LogView.js
@@ -53,7 +53,12 @@ Ext.define('Proxmox.panel.LogView', {
let data = viewModel.get('data');
if (first === data.first && total === data.total && lines.length === data.lines) {
- return; // same content, skip setting and scrolling
+ // before there is any real output, we get 'no output' as a single line.
+ // so always update if we only have one to be sure to catch
+ // the first real line of output
+ if (total !== 1) {
+ return; // same content, skip setting and scrolling
+ }
}
viewModel.set('data', {
first: first,
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: Re: [PATCH widget-toolkit] fix #3919: show first task output line correctly
2022-03-03 14:11 [pve-devel] [PATCH widget-toolkit] fix #3919: show first task output line correctly Dominik Csapak
@ 2022-03-04 13:55 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2022-03-04 13:55 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
On 03/03/2022 15:11, Dominik Csapak wrote:
> if a task did not produce output yet, we always get a single line
> with "no output". our heuristic in the gui counts the total lines +
> the current position. so to update the first output correctly, we
> have to update every time in case we only have one line.
>
> Otherwise, we only update on the second line, which is bad
> in case the only line we ever get is the result.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> src/panel/LogView.js | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-04 13:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 14:11 [pve-devel] [PATCH widget-toolkit] fix #3919: show first task output line correctly Dominik Csapak
2022-03-04 13:55 ` [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