Skip to content

Commit

Permalink
Fix: dublications on the STATUS page (#407)
Browse files Browse the repository at this point in the history
- fixed duplicates on STATUS page due to incorrect data cleaning before sysinfo request
  • Loading branch information
dnzbk authored Oct 18, 2024
1 parent ffd5766 commit d2f5245
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions webui/system-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function DiskSpeedTestsForm()
var $diskSpeedTestInputLabel;
var $diskSpeedTestInput;
var $diskSpeedTestBtn;
var $diskSpeedTestErrorTxt
var $diskSpeedTestErrorTxt;

var SPINNER = '<i class="material-icon spinner">progress_activity</i>';
var TEST_BTN_DEFAULT_TEXT = 'Run test';
Expand Down Expand Up @@ -191,6 +191,8 @@ var SystemInfo = (new function($)
var $SpeedTest_StatsTime;
var $SpeedTest_StatsDate;

var sysInfoLoading = false;

var nzbFileTestPrefix = 'NZBGet Speed Test ';
var testNZBUrl = 'https://nzbget.com/nzb/';
var testNZBFiles = [
Expand Down Expand Up @@ -283,21 +285,30 @@ var SystemInfo = (new function($)

this.loadSystemInfo = function()
{
cleanUp();
if (sysInfoLoading) return;
sysInfoLoading = true;

hideError();
hideMainContent();
showSpinner();

RPC.call('sysinfo', [],
function (sysInfo)
{
cleanUp();
hideSpinner();
showMainContent();
render(sysInfo);
renderLastTestBtns(allStats);
renderSpinners(downloads);
sysInfoLoading = false;
},
errorHandler
function(err)
{
hideSpinner();
errorHandler(err);
sysInfoLoading = false;
}
);
}

Expand Down

0 comments on commit d2f5245

Please sign in to comment.