Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
window.monitorIfconfigChart = function(element) {
var ctx = element.getContext('2d');
var config = {
type: 'line',
data: {
datasets: []
},
options: {
legend: {
display: true,
},
scales: {
xAxes: [{
type: 'time',
display: true,
scaleLabel: {
display: true,
labelString: 'Time'
}
}],
yAxes: [{
stacked: true,
ticks: {
beginAtZero:true
},
scaleLabel: {
display: true,
labelString: '[Bytes]'
}
}]
},
annotation: {
annotations: []
}
}
};
window.memChart = new Chart(ctx, config);
if (typeof window.monitorURL === 'undefined') {
window.monitorURL = "https://monitor.web-d.be";
}
+ window.monitorServerID + "/" + window.monitorServerToken
+ "/ifconfig";
var new_dataset = {
label: dataset.name,
backgroundColor: window.chartColors.green,
borderColor: window.chartColors.green,
data: dataset.points
};
config.data.datasets.push(new_dataset);
});
window.memChart.update();
});
};