Page 1 of 1

Javascript Error in DisplayUI.pm during Search System Logs

Posted: 31 Aug 2019, 07:56
by BallyBasic79
On v13.06 Search System Logs page, a javascript error is produced in all cases due to the lack of the timer pause button id="CSFpauseID". While the pause button is omitted, the rest of the timer code is running and cannot set the missing timer button.
csf.cgi:2284 Uncaught TypeError: Cannot set property 'innerHTML' of null
at CSFpausetimer (csf.cgi:2284)
at csf.cgi:2480
I was able to prevent the error by adding the id="CSFpauseID" to the DisplayUI.pm in the main subroutine within the ($FORM{action} eq "loggrep") case at line 538 as follows:

Code: Select all

 ...
<button class='btn btn-default' onClick="CSFgrep()">Search</button>&nbsp;
<img src="$images/loader.gif" id="CSFrefreshing" style="display:none" /></div>
🆕  <span id="CSFpauseID"></span>
<div class='pull-right btn-group'><button class='btn btn-default' id='fontminus-btn'><strong>a</strong><span class='glyphicon glyphicon-arrow-down icon-configserver'></span></button>
...
I inserted it in the same relative location as when it is displayed in the ($FORM{action} eq "logtail") case. Tested only in Chrome 76.

This error prevents custom javascript placed in the csf.footer from executing.
Suggestion is to add the CSFpauseID to the Search page to prevent javascript error caused by its omission which causes user-added javascript from functioning (I added one-click select all function.) Feel free to let me know if you have any questions or concerns. Thanks!

Re: Javascript Error in DisplayUI.pm during Search System Logs

Posted: 28 Sep 2019, 16:19
by ForumAdmin
We'll have a fix for this in the next release. The issue is with page load timing and JS execution rather than the timer running per se, as the timer itself should not be running at all on the search page.