]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
fix #3919: log view: show first task output line correctly
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 3 Mar 2022 14:11:45 +0000 (15:11 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 4 Mar 2022 13:54:21 +0000 (14:54 +0100)
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

index 22029a16807d0ffec1b6f7e1cb03601b7da9d15b..412b26e7e77df4ec34c472ced39fc6bd488ede21 100644 (file)
@@ -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,