Javascript Error in DisplayUI.pm during Search System Logs
Posted: 31 Aug 2019, 07:56
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.
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!
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:csf.cgi:2284 Uncaught TypeError: Cannot set property 'innerHTML' of null
at CSFpausetimer (csf.cgi:2284)
at csf.cgi:2480
Code: Select all
...
<button class='btn btn-default' onClick="CSFgrep()">Search</button>
<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>
...
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!