public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit] fix #3919: show first task output line correctly
Date: Thu,  3 Mar 2022 15:11:45 +0100	[thread overview]
Message-ID: <20220303141145.352761-1-d.csapak@proxmox.com> (raw)

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





             reply	other threads:[~2022-03-03 14:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03 14:11 Dominik Csapak [this message]
2022-03-04 13:55 ` [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=20220303141145.352761-1-d.csapak@proxmox.com \
    --to=d.csapak@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