|
|
|
@ -1,5 +1,12 @@
|
|
|
|
|
type = ['','info','success','warning','danger'];
|
|
|
|
|
|
|
|
|
|
function getNode(name){
|
|
|
|
|
var nodeName = {}
|
|
|
|
|
nodeName.name = name
|
|
|
|
|
console.log('nodename...', nodeName.name)
|
|
|
|
|
// dashboard.initChartist(nodeName)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dashboard = {
|
|
|
|
|
initPickColor: function(){
|
|
|
|
|
$('.pick-class-label').click(function(){
|
|
|
|
@ -17,11 +24,14 @@ dashboard = {
|
|
|
|
|
|
|
|
|
|
initChartist: function(){
|
|
|
|
|
var getData = $.get('/1/app/usage/trend');
|
|
|
|
|
function loadDashboard(name){
|
|
|
|
|
console.log('loadDashboard...', name);
|
|
|
|
|
}
|
|
|
|
|
getData.done(function(results) {
|
|
|
|
|
var data = JSON.parse(results)
|
|
|
|
|
// if (typeof nodeName === 'undefined'){
|
|
|
|
|
// console.log("undefined nodename.........")
|
|
|
|
|
// } else {
|
|
|
|
|
// var node = data[nodeName.name]
|
|
|
|
|
// console.log('data.name..', data[name])
|
|
|
|
|
// }
|
|
|
|
|
var node = data['apps@michaels-MBP'];
|
|
|
|
|
var app = node['chrome'];
|
|
|
|
|
var cpu = app['cpu'];
|
|
|
|
|