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