mirror of https://github.com/MISP/misp-dashboard
Fix: fixed bug displaying data from another source
parent
8daa9e4364
commit
1ca2a48262
|
@ -101,13 +101,13 @@ function updateDateOvertime() {
|
||||||
for (item of data) {
|
for (item of data) {
|
||||||
temp.push([new Date(item[0]*1000), item[1]]);
|
temp.push([new Date(item[0]*1000), item[1]]);
|
||||||
}
|
}
|
||||||
data = {label: 'Login overtime', data: temp}
|
toPlot = [{label: 'Login overtime', data: temp}];
|
||||||
if (!(overtimeWidget === undefined)) {
|
if (!(overtimeWidget === undefined)) {
|
||||||
overtimeWidget.setData(toPlot);
|
overtimeWidget.setData(toPlot);
|
||||||
overtimeWidget.setupGrid();
|
overtimeWidget.setupGrid();
|
||||||
overtimeWidget.draw();
|
overtimeWidget.draw();
|
||||||
} else {
|
} else {
|
||||||
overtimeWidget = $.plot('#lineChart', [data], {
|
overtimeWidget = $.plot('#lineChart', toPlot, {
|
||||||
lines: {
|
lines: {
|
||||||
show: true,
|
show: true,
|
||||||
steps: true,
|
steps: true,
|
||||||
|
|
Loading…
Reference in New Issue