diff --git a/Changelog9.html b/Changelog9.html index c25506343a6..15932246cb4 100644 --- a/Changelog9.html +++ b/Changelog9.html @@ -25,6 +25,7 @@

Version 9.0.2

  • #1193 - Don't throw error when fulltext search is being used before the end of a scan.
  • #1288 - Update Carp::Assert to latest to fix compatibility with recent Perl versions.
  • #1303 - Fix an issue where browsing releases would sometimes create thousands of parameters (and more - thanks @darrel-k!).
  • +
  • #1307 - Fix scanner progress information in the web UI.

  • diff --git a/HTML/EN/html/SqueezeJS/UI.js b/HTML/EN/html/SqueezeJS/UI.js index a27de34bb88..51772638fa9 100644 --- a/HTML/EN/html/SqueezeJS/UI.js +++ b/HTML/EN/html/SqueezeJS/UI.js @@ -2234,9 +2234,13 @@ SqueezeJS.UI.ScannerInfoExtended = function(){ Ext.get('abortscanlink').hide(); } - else + else { Ext.get('message').update(decodeURIComponent(result.message)); + if (Ext.get('abortscanlink')) + Ext.get('abortscanlink').show(); + } + progressTimer.delay(5000) } }; diff --git a/HTML/EN/html/global.js b/HTML/EN/html/global.js index 06026912cfa..4da7b71e58c 100644 --- a/HTML/EN/html/global.js +++ b/HTML/EN/html/global.js @@ -89,7 +89,6 @@ function showElements(myAry,style) { var div = myAry[i]; if ($(div)) { - //document.getElementByID(div).style.display = 'block'; $(div).style.display = style; } } @@ -119,16 +118,14 @@ function refreshElement(element, value, truncate) { // this function parses the response into a hash object used in all update functions function parseData(thisData) { var lines = thisData.split("\n"); - var returnData = new Array(); + var returnData = {}; for (i=0; i/; - var commentLine = lines[i].match(comment); - var blankLine = lines[i].match(blank); + var preTag = lines[i].match(/<\/*pre>/); + var commentLine = lines[i].match(/^#/); + var blankLine = lines[i].match(/^\s*$/); - if (!commentLine && !blankLine && preTag) { + if (!commentLine && !blankLine && !preTag) { var keyValue = lines[i].split('|'); var key = keyValue[0]; var value = keyValue[1]; diff --git a/HTML/EN/html/progress.js b/HTML/EN/html/progress.js index ff022625d29..801b0e16690 100644 --- a/HTML/EN/html/progress.js +++ b/HTML/EN/html/progress.js @@ -1,3 +1,5 @@ +const pollingInterval = 2000; + function ajaxProgressCallback(theData) { var parsedData = fillDataHash(theData); @@ -30,15 +32,17 @@ function ajaxProgressCallback(theData) { if (parsedData['message']) { if (parsedData['total_time']) { - refreshElement('message',parsedData['message']+ timestring + parsedData['total_time']); + refreshElement('message',parsedData['message']+ '
    ' + timestring + ' ' + parsedData['total_time']); } else { refreshElement('message',parsedData['message']); } hideElements(['abortscanlink']); + setTimeout( "ajaxProgressRefresh()", pollingInterval); } else { + refreshElement('message',''); showElements(['abortscanlink']); - setTimeout( "ajaxProgressRefresh()", 5000); + setTimeout( "ajaxProgressRefresh()", pollingInterval); } } diff --git a/HTML/EN/progress.html b/HTML/EN/progress.html index f992aa549f6..b4f09893c4e 100644 --- a/HTML/EN/progress.html +++ b/HTML/EN/progress.html @@ -4,9 +4,9 @@ [%- ELSE -%] [% pagetitle = (type || "SCANNER") _ "_PROGRESS" | string %] - + [% pageHeaderMenu = pagetitle %] - + [%- IF !abortScan -%] [% pageHeaderScripts = BLOCK %] @@ -32,14 +32,19 @@ [% END %] - [% bodyscript = 'onload="ajaxProgressRefresh();"' %] - [% END %] - + + [% bodyscript = 'onload="ajaxProgressRefresh();"' %] + [% IF !ajaxUpdate; PROCESS pageheader.html; END %] [%- IF abortScan -%]
    [% "SCAN_ABORTED" | string %]
    + [% END %] [% IF desc && type && !ajaxUpdate %]

    [% type _ "_PROGRESS_DESC" | string %]
     
    [% END %] @@ -52,8 +57,8 @@
      -  ( [% "OF" | string %]  [% "OF" | string %] )     @@ -72,7 +77,7 @@ [% odd = (not odd) %] [% END %] - [% IF scanning && !ajaxUpdate %]

    [% "ABORT_SCAN" | string %]
    [% END %] + [% IF !ajaxUpdate %][% END %]
    [% IF message %][% message %][% END %][% IF total_time %] [% "TOTAL_TIME" | string %][% total_time %][% END %]
    [% IF !ajaxUpdate; PROCESS pagefooter.html; END %] diff --git a/HTML/EN/settings/server/status.html b/HTML/EN/settings/server/status.html index 244955c6381..6bb1a708dd9 100644 --- a/HTML/EN/settings/server/status.html +++ b/HTML/EN/settings/server/status.html @@ -62,14 +62,12 @@ [% END %] [% END %] -[% IF progress AND NOT simple %] +[% IF NOT simple %] [% WRAPPER setting title="SCANNER_PROGRESS" %] [% progress %] - [% IF scanning && !abortScan %] -