|
|
|
@ -150,8 +150,6 @@ monitor.processes.trend.render = function (logs, key,label) {
|
|
|
|
|
conf.options.scales.xAxes = [
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
type: 'timeline',
|
|
|
|
|
unit:'hour',
|
|
|
|
|
gridLines: {display:false},
|
|
|
|
|
|
|
|
|
|
time: {
|
|
|
|
@ -168,8 +166,12 @@ monitor.processes.trend.render = function (logs, key,label) {
|
|
|
|
|
var cpu = {yAxisID:'0', label: 'CPU Usage (%)', data: [] ,backgroundColor:'transparent',borderColor:COLORS[187],fill:false,borderWidth:1}
|
|
|
|
|
var mem = {yAxisID:'0',label : 'Memory Usage(%)',data:[],backgroundColor:'transparent',borderColor:COLORS[32],fill:false,borderWidth:1}
|
|
|
|
|
var proc= {yAxisID:'1',label : 'Proc Count',data:[],backgroundColor:'transparent',borderColor:COLORS[542],fill:false,borderWidth:1}
|
|
|
|
|
var months={1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"}
|
|
|
|
|
jx.utils.patterns.visitor(logs,function(item){
|
|
|
|
|
x = new Date(item.year,item.month-1,item.day,item.hour,item.minute)
|
|
|
|
|
//x = new Date(item.year,item.month-1,item.day,item.hour,item.minute)
|
|
|
|
|
day = item.day > 9? (['0',item.day]).join(''): item.day
|
|
|
|
|
month = months[item.month]
|
|
|
|
|
x = ([month,day,item.hour+':'+item.minute]).join(' ')
|
|
|
|
|
y = item[key]
|
|
|
|
|
if (_x[x] == null ){//||(_x[x] == null && _y[y] == null)) {
|
|
|
|
|
_x[x] = 1
|
|
|
|
@ -238,9 +240,10 @@ monitor.processes.summary.init = function(logs){
|
|
|
|
|
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:50}
|
|
|
|
|
var conf = {}//width:50,height:40}
|
|
|
|
|
|
|
|
|
|
conf.type = 'doughnut'
|
|
|
|
|
conf.responsive = true
|
|
|
|
|
conf.data = data
|
|
|
|
|
conf.options = {legend:{ position:'right'},repsonsive:true}
|
|
|
|
|
var chart = new Chart(context,conf)
|
|
|
|
|