Project

General

Profile

Actions

Bug #15373

closed

Firewall Logs Dashboard widget update interval does not behave as expected

Added by Jim Pingle 8 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Dashboard
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
24.11
Release Notes:
Default
Affected Version:
Affected Architecture:

Description

The update interval on the dashboard widget does not behave as expected. It appears to have a problem with any interval which is not a multiple of 5 seconds. This is because the user input interval is divided by 5 and set as the frequency, and then that value is run through a mod operation and only fires if the result is 0.

From log.widget.php:

logsObject.freq = <?=$nentriesinterval?>/5;

From index.php:

                if (((ajaxcntr % freq) === 0) && (typeof ajaxspecs[ajaxidx].callback === "function" )) {
                    make_ajax_call(ajaxspecs[ajaxidx]);
                }

Unless I'm misreading that code, it looks like unless the interval is a multiple of 5 the result of ajaxcntr % freq could never be 0.

So we either need to lock the input to multiples of 5, or fix that calculation so it sets a compatible value for freq.


Files

firewall_log.png (52.1 KB) firewall_log.png GChuf 6, 09/16/2024 08:29 PM

Related issues

Related to Bug #12673: Firewall Logs Dashboard Widget is slow and may fail to updateResolvedJim Pingle

Actions
Related to Bug #15725: Dashboard widgets refresh at unintended intervalsResolvedMarcos M

Actions
Actions

Also available in: Atom PDF