mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-06 18:33:18 +03:00
Fix status page when EDDN receive no message...
This commit is contained in:
parent
5eebf820b0
commit
09779528fe
@ -88,9 +88,16 @@ var doUpdateSoftwares = function()
|
|||||||
softwareName[softwareSplit[0]] = [0,0, parseInt(hits)];
|
softwareName[softwareSplit[0]] = [0,0, parseInt(hits)];
|
||||||
else
|
else
|
||||||
softwareName[softwareSplit[0]][2] += parseInt(hits);
|
softwareName[softwareSplit[0]][2] += parseInt(hits);
|
||||||
|
|
||||||
|
// Might happen when nothing is received...
|
||||||
|
if(softwares[yesterday] == undefined)
|
||||||
|
softwares[yesterday] = [];
|
||||||
|
if(softwares[today] == undefined)
|
||||||
|
softwares[today] = [];
|
||||||
|
|
||||||
softwareName[softwareSplit[0]][0] += parseInt(softwares[today][software] || 0);
|
softwareName[softwareSplit[0]][0] += parseInt(softwares[today][software] || 0);
|
||||||
softwareName[softwareSplit[0]][1] += parseInt(softwares[yesterday][software] || 0);
|
softwareName[softwareSplit[0]][1] += parseInt(softwares[yesterday][software] || 0);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Sort by total DESC
|
// Sort by total DESC
|
||||||
@ -283,6 +290,12 @@ var doUpdateUploaders = function()
|
|||||||
else
|
else
|
||||||
truncateUploader = uploader
|
truncateUploader = uploader
|
||||||
|
|
||||||
|
// Might happen when nothing is received...
|
||||||
|
if(uploaders[yesterday] == undefined)
|
||||||
|
uploaders[yesterday] = [];
|
||||||
|
if(uploaders[today] == undefined)
|
||||||
|
uploaders[today] = [];
|
||||||
|
|
||||||
$('#uploaders .table tbody').append(
|
$('#uploaders .table tbody').append(
|
||||||
newTr = $('<tr>').attr('data-name', uploader).on('mouseover', function(){
|
newTr = $('<tr>').attr('data-name', uploader).on('mouseover', function(){
|
||||||
chart.get('uploader-' + makeSlug(uploader)).setState('hover');
|
chart.get('uploader-' + makeSlug(uploader)).setState('hover');
|
||||||
@ -351,6 +364,12 @@ var doUpdateSchemas = function()
|
|||||||
$('#schemas .table tbody').empty();
|
$('#schemas .table tbody').empty();
|
||||||
|
|
||||||
$.each(schemasTotal, function(schema, hits){
|
$.each(schemasTotal, function(schema, hits){
|
||||||
|
// Might happen when nothing is received...
|
||||||
|
if(schemas[yesterday] == undefined)
|
||||||
|
schemas[yesterday] = [];
|
||||||
|
if(schemas[today] == undefined)
|
||||||
|
schemas[today] = [];
|
||||||
|
|
||||||
$('#schemas .table tbody').append(
|
$('#schemas .table tbody').append(
|
||||||
newTr = $('<tr>').attr('data-name', schema).on('mouseover', function(){
|
newTr = $('<tr>').attr('data-name', schema).on('mouseover', function(){
|
||||||
chart.get('schema-' + makeSlug(schema)).setState('hover');
|
chart.get('schema-' + makeSlug(schema)).setState('hover');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user