From f5e171ee87f956c36d18cc6388f758a119e3eb39 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Fri, 26 Jun 2026 17:30:29 +0300 Subject: [PATCH] Fix: Display the log page refresh status as "stopped" only while processing selected lines, not when a new request occurs. (log.js) First, this will speed up the display of the actual status. Second, it will prevent incorrect status indication if rows were selected while executing the next AJAX request. Also, update the status to "awaiting" only if the previous status was "stopped." This will ensure the status is displayed correctly on the first page refresh. --- web/skins/classic/views/js/log.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/skins/classic/views/js/log.js b/web/skins/classic/views/js/log.js index b398901ac..4ddf0b662 100644 --- a/web/skins/classic/views/js/log.js +++ b/web/skins/classic/views/js/log.js @@ -40,7 +40,6 @@ function ajaxRequest(params) { // We won't automatically refresh to avoid disturbing the user who has selected rows. console.debug("The user selected rows in the table, and the AJAX request was rejected."); requestMissed = true; - updateHeaderRequestStatus("stopped"); return; } if (ajax && (ajax.readyState !== 4 && ajax.readyState !== 0)) { @@ -423,10 +422,12 @@ function manageClearButtonAvailability(enable = null) { if (selections.length) { allowRequest = false; // We'll prevent table updates from interfering with the user who has selected rows. + updateHeaderRequestStatus("stopped"); if (ajax && (ajax.readyState !== 4 && ajax.readyState !== 0)) { ajax.abort("plannedAbort"); // There may already be a previous request that hasn't completed. } } else { + if (readHeaderRequestStatus() === "stopped") updateHeaderRequestStatus("awaiting"); if (requestMissed === true) { // A scheduled AJAX update was missed. We'll execute it out of order. allowRequest = true; @@ -438,6 +439,10 @@ function manageClearButtonAvailability(enable = null) { } } +function readHeaderRequestStatus() { + return $j('#requestStatus').text().replace(/(\[|\])/g, '').trim(); +} + function updateHeaderRequestStatus(text) { $j('#requestStatus').text(" ["+text+"]"); }