|
|
|
@ -45,8 +45,8 @@ monitor.processes.init = function (x) {
|
|
|
|
|
//
|
|
|
|
|
jx.dom.hide('apps')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setTimeout(monitor.sandbox.init,3000)
|
|
|
|
|
monitor.sandbox.init()
|
|
|
|
|
// setTimeout(monitor.sandbox.init,1000)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -231,23 +231,29 @@ monitor.processes.summary.init = function(logs){
|
|
|
|
|
}
|
|
|
|
|
var data = {labels:['Running','Crash','Idle'],datasets:[{data:[xr,xc,xi],backgroundColor:[RUNNING_COLOR,CRASH_COLOR,IDLE_COLOR/**COLORS[11],COLORS[2],COLORS[100]*/]}]}
|
|
|
|
|
var context = jx.dom.get.instance('CANVAS')
|
|
|
|
|
jx.dom.set.value('total-running', xr)
|
|
|
|
|
jx.dom.set.value('total-crash', xc)
|
|
|
|
|
jx.dom.set.value('total-idle', xi)
|
|
|
|
|
// jx.dom.set.value('total-running', xr)
|
|
|
|
|
// jx.dom.set.value('total-crash', xc)
|
|
|
|
|
// jx.dom.set.value('total-idle', xi)
|
|
|
|
|
jx.dom.set.value('total-apps', xr + xi + xc)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jx.dom.set.value('app-summary-date', date)
|
|
|
|
|
jx.dom.set.value('summary_chart','')
|
|
|
|
|
jx.dom.append('summary_chart',context)
|
|
|
|
|
var conf = {}//width:50,height:40}
|
|
|
|
|
var conf = {}//width:'auto',height:$('#process_summary').height}
|
|
|
|
|
|
|
|
|
|
conf.type = 'doughnut'
|
|
|
|
|
conf.responsive = true
|
|
|
|
|
conf.data = data
|
|
|
|
|
conf.options = { legend: { position: 'right' }, repsonsive: true }
|
|
|
|
|
var chart = new Chart(context,conf)
|
|
|
|
|
var _chart = new Chart(context,conf)
|
|
|
|
|
|
|
|
|
|
$('#summary_chart').click(function (evt) {
|
|
|
|
|
console.log(_chart)
|
|
|
|
|
console.log($(_chart))
|
|
|
|
|
var activePoints = $(_chart).getSegmentsAtEvent(evt);
|
|
|
|
|
console.log(activePoints)
|
|
|
|
|
})
|
|
|
|
|
jx.dom.set.value('summary_ranking','')
|
|
|
|
|
context = jx.dom.get.instance('CANVAS')
|
|
|
|
|
jx.dom.append('summary_ranking',context)
|
|
|
|
@ -405,13 +411,15 @@ monitor.folders.search.init = function(){
|
|
|
|
|
var term = jx.dom.get.value('folder_search')
|
|
|
|
|
var data = jx.dom.get.attribute('folder_search', 'data')
|
|
|
|
|
|
|
|
|
|
term = term.replace(/\x32/g,'')
|
|
|
|
|
term = term.replace(/ /g,'')
|
|
|
|
|
if (term.length == 0) {
|
|
|
|
|
monitor.folders.render.summary(data)
|
|
|
|
|
} else if (term.length > 0) {
|
|
|
|
|
|
|
|
|
|
data = jx.utils.patterns.visitor(data, function (row) {
|
|
|
|
|
if (row.id.match(term)) {
|
|
|
|
|
pattern = "(.*" + term + ".*)"
|
|
|
|
|
|
|
|
|
|
if (row.id.match(pattern)) {
|
|
|
|
|
return row
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -513,11 +521,11 @@ monitor.folders.render.summary = function (data) {
|
|
|
|
|
|
|
|
|
|
jx.dom.set.value('gridfolders', '')
|
|
|
|
|
var options = {
|
|
|
|
|
width: $('#gridfolders').width(), height:'auto'
|
|
|
|
|
width: $('#gfolderframe').width()-8, height:'auto'
|
|
|
|
|
}
|
|
|
|
|
options.paging = true
|
|
|
|
|
options.pageSize = 4
|
|
|
|
|
options.pageIndex = 2
|
|
|
|
|
options.pageIndex = 1
|
|
|
|
|
options.pageButtonCount = 4
|
|
|
|
|
options.pagerContainer = '#folderspager'
|
|
|
|
|
options.pagerFormat= "{prev} Page {pageIndex} of {pageCount} {next}"
|
|
|
|
|