[pve-devel] [PATCH widget-toolkit 1/3] ui: logpanel: fix glitching on fast task logs

Dominik Csapak d.csapak at proxmox.com
Tue Nov 23 08:49:33 CET 2021


when we follow (scrollToEnd === true) a task log that produces many lines
per second, we often get a 'total' back that exceeds our start+limit.

in that case we do not want to pad the bottom of the task log with empty
lines, we only want that for finished task logs to preserve the scroll
bar position+size.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/panel/LogView.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/panel/LogView.js b/src/panel/LogView.js
index 1772737..bbf38ee 100644
--- a/src/panel/LogView.js
+++ b/src/panel/LogView.js
@@ -97,7 +97,9 @@ Ext.define('Proxmox.panel.LogView', {
 			lines[line.n - 1] = Ext.htmlEncode(line.t);
 		    });
 
-		    lines.length = total;
+		    if (!view.scrollToEnd) {
+			lines.length = total;
+		    }
 		    me.updateView(lines.join('<br>'), first - 1, total);
 		    me.running = false;
 		    if (me.requested) {
-- 
2.30.2





More information about the pve-devel mailing list