get graphs back up

master
michael mead 7 years ago
parent ad8e0f011e
commit 591dd5f48f

@ -20,19 +20,27 @@ dashboard = {
getData.done(function(results) {
var data = JSON.parse(results)
var app = data['Chrome'];
var node = data['apps@michaels-MBP'];
var app = node['chrome'];
var cpu = app['cpu'];
var memory_used = app['memory_used'];
console.log('data...',data)
console.log('node...',node)
console.log('app...',app)
console.log('cpu...',cpu)
console.log('memory_used...', memory_used)
// monitoring apps chart
var dataChart = {
labels: ['9:00AM', '12:00AM', '3:00PM', '6:00PM', '9:00PM', '12:00PM', '3:00AM', '6:00AM'],
series: [app.memory_used, app.cpu, ] // TODO: Check the order, the graph is by index not name.
labels: ['24','23','22','21','20','19','18','17','16','15','14','13','12','11','10','9','8','7','6','5','4','3','2','1' ],
series: [cpu, memory_used, [1,2,3,50], ] // TODO: Check the order, the graph is by index not name.
};
var optionsChart = {
lineSmooth: false,
low: 0,
high: 100,
high: 10,
showArea: true,
height: "245px",
axisX: {
@ -60,7 +68,7 @@ dashboard = {
// cpu and memory --------------------------
var data = {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
series: [app.cpu, app.memory_used]
series: [cpu, memory_used]
};

@ -79,7 +79,7 @@
]
jx.utils.patterns.observer(lobservers,"init")
//dashboard.initChartist();
dashboard.initChartist();
});
</script>
@ -303,8 +303,8 @@
<div class="chart-legend">
<!-- confirm these three are right with new API. -->
<i class="fa fa-circle text-info"></i> cpu usage
<i class="fa fa-circle text-danger"></i> memory usage
<i class="fa fa-circle text-warning"></i> memory available
<i class="fa fa-circle text-warning"></i> memory used
<i class="fa fa-circle text-danger"></i> available line
</div>
<hr>
<div class="stats">

Loading…
Cancel
Save