mirror of https://github.com/MISP/misp-dashboard
Prevent double display of org in line chart
parent
b0a83a9ebd
commit
cb53be4253
|
@ -446,7 +446,16 @@ function updateProgressHeader(org) {
|
||||||
|
|
||||||
//update overtake points
|
//update overtake points
|
||||||
updateOvertakePnts();
|
updateOvertakePnts();
|
||||||
|
|
||||||
//Add new data to linechart
|
//Add new data to linechart
|
||||||
|
var flag_already_displayed = false;
|
||||||
|
for(obj of dataTop5Overtime) { //check if already displayed
|
||||||
|
if (obj.label == currOrg) {
|
||||||
|
flag_already_displayed = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!flag_already_displayed) {
|
||||||
$.getJSON( url_getOrgOvertime+'?org='+org, function( data ) {
|
$.getJSON( url_getOrgOvertime+'?org='+org, function( data ) {
|
||||||
var toPlot = dataTop5Overtime.slice(0); //cloning data
|
var toPlot = dataTop5Overtime.slice(0); //cloning data
|
||||||
// transform secs into date
|
// transform secs into date
|
||||||
|
@ -462,6 +471,7 @@ function updateProgressHeader(org) {
|
||||||
plotLineChart.draw();
|
plotLineChart.draw();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function showOnlyOrg() {
|
function showOnlyOrg() {
|
||||||
datatableCateg.search( $('#orgText').text() ).draw();
|
datatableCateg.search( $('#orgText').text() ).draw();
|
||||||
|
|
Loading…
Reference in New Issue