|
|
@ -24,7 +24,7 @@ angular.module('stats', [])
|
|
|
|
var networkLabels = [];
|
|
|
|
var networkLabels = [];
|
|
|
|
var networkTxData = [];
|
|
|
|
var networkTxData = [];
|
|
|
|
var networkRxData = [];
|
|
|
|
var networkRxData = [];
|
|
|
|
for (var i = 0; i < 40; i++) {
|
|
|
|
for (var i = 0; i < 20; i++) {
|
|
|
|
cpuLabels.push('');
|
|
|
|
cpuLabels.push('');
|
|
|
|
cpuData.push(0);
|
|
|
|
cpuData.push(0);
|
|
|
|
memoryLabels.push('');
|
|
|
|
memoryLabels.push('');
|
|
|
@ -76,7 +76,7 @@ angular.module('stats', [])
|
|
|
|
}];
|
|
|
|
}];
|
|
|
|
legend($('#network-legend').get(0), networkLegendData);
|
|
|
|
legend($('#network-legend').get(0), networkLegendData);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Chart.defaults.global.animationSteps = 30; // Lower from 60 to ease CPU load.
|
|
|
|
var cpuChart = new Chart($('#cpu-stats-chart').get(0).getContext("2d")).Line({
|
|
|
|
var cpuChart = new Chart($('#cpu-stats-chart').get(0).getContext("2d")).Line({
|
|
|
|
labels: cpuLabels,
|
|
|
|
labels: cpuLabels,
|
|
|
|
datasets: [cpuDataset]
|
|
|
|
datasets: [cpuDataset]
|
|
|
@ -124,7 +124,7 @@ angular.module('stats', [])
|
|
|
|
updateCpuChart(d);
|
|
|
|
updateCpuChart(d);
|
|
|
|
updateMemoryChart(d);
|
|
|
|
updateMemoryChart(d);
|
|
|
|
updateNetworkChart(d);
|
|
|
|
updateNetworkChart(d);
|
|
|
|
timeout = $timeout(updateStats, 1000);
|
|
|
|
timeout = $timeout(updateStats, 2000);
|
|
|
|
}, function () {
|
|
|
|
}, function () {
|
|
|
|
Messages.error('Unable to retrieve stats', 'Is this container running?');
|
|
|
|
Messages.error('Unable to retrieve stats', 'Is this container running?');
|
|
|
|
});
|
|
|
|
});
|
|
|
|