Ext.require([
'Ext.form.field.ComboBox',
'Ext.window.MessageBox',
'Ext.form.FieldSet',
'Ext.tip.QuickTipManager',
'Ext.data.*'
]);
// Define the model for a State
/*Ext.define('State', {
extend: 'Ext.data.Model',
fields: [
{type: 'string', name: 'abbr'},
{type: 'string', name: 'name'},
{type: 'string', name: 'slogan'}
]
});*/
// The data for all states
/*var states = [
{"abbr":"AL","name":"张一","slogan":"The Heart of Dixie"},
{"abbr":"AL","name":"张二","slogan":"The Heart of Dixie"},
{"abbr":"AK","name":"张三","slogan":"The Land of the Midnight Sun"},
{"abbr":"AK","name":"张四","slogan":"The Land of the Midnight Sun"},
{"abbr":"AZ","name":"张五","slogan":"The Grand Canyon State"},
{"abbr":"AZ","name":"张七","slogan":"The Grand Canyon State"},
{"abbr":"AZ","name":"张八","slogan":"The Grand Canyon State"},
{"abbr":"AZ","name":"王止","slogan":"The Grand Canyon State"},
{"abbr":"AZ","name":"张三","slogan":"The Grand Canyon State"},
{"abbr":"AZ","name":"志荣","slogan":"The Grand Canyon State"},
{"abbr":"AZ","name":"卢强","slogan":"The Grand Canyon State"},
{"abbr":"AZ","name":"林九根","slogan":"The Grand Canyon State"},
{"abbr":"AZ","name":"九根","slogan":"The Grand Canyon State"}
];*/
//test
/*var states = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({ url: '/forpeople/viewname', method: 'POST' }),
remoteSort: false,
reader: new Ext.data.JsonReader({
// totalProperty: "totalPorperty",
// root: "list",
// id: 'ID',
// fields: [
{ name: 'membername' },
{ name: 'membername' },
{ name: 'membername' },
{ name: 'membername' }
]
})
});
*/
//test
//test
/*var states = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: '/forpeople/nameview' //这个是url,就是你要取的值到下拉框中的
}),
autoLoad:true,
reader: new Ext.data.JsonReader({
// root: 'root',
fields: ['membername','membername'] //跟后面的ComboBox的displayField和valueField对于
}), //这个是加监听事件,就提供一下,可以不用的
listeners: {
load: function() {
var combo = Ext.getCmp('ruleid');
combo.setValue(combo.getValue());
}
}
});
states.load({params:{act:'listfolder'}}); //一加载的时候 就显示数据
*/
//test
Ext.define('User', {
extend: 'Ext.data.Model',
fields: [
{name: 'membername', type: 'string'}
]
});
/*var states = Ext.create('Ext.data.Store', {
model: 'User',
proxy: {
type: 'ajax',
url : '/forpeople/nameview',
reader: {
type: 'json'
}
},
autoLoad: true
});*/
var states = Ext.create('Ext.data.Store', {
model: 'User',
proxy: {
type: 'ajax',
url : '/forpeople/nameview',
reader: {
type: 'json',
root: 'idendata'
}
},
autoLoad: true
});
/*
function createStore() {
// The data store holding the states; shared by each of the ComboBox examples below
return Ext.create('Ext.data.Store', {
autoDestroy: true,
model: 'State',
data: states
// data: store
});
}
*/
Ext.onReady(function() {
Ext.tip.QuickTipManager.init();
//test
var simpleCombo = new Ext.form.ComboBox({
emptyText:'请选择姓名', //这个是下拉框为空的时候 显示的文字
// id:'combo1', //如果一个页面中有多个combobox的话,这个id不能取成一样,刚开始取成一样的了,结果点下拉框的时候,现在在另一个下拉框中。
// triggerAction:"all",
store:states, //这个很重要的,设置数据源
displayField:'membername', //这个是设置下拉框中显示的值
valueField:'membername', //这个可以传到后台的值
// editable: false, //可以编辑不
// forceSelection: true,
renderTo: 'simpleCombo',
queryMode: 'local',
// mode:'local',//数据来源本地local,远程就是remote
/* listeners:{//添加一个监听事件
'select':function() { //选择的时候的事件
var va = Ext.getCmp('simpleCombo').getValue(); //这个是取到valueField的值
//通过ajax传递到后台的
Ext.Ajax.request({
url:'/forpeople/view',
//传到后台的URL
success:function(response,opts){ //成功了干些什么
/// alert(tarvalue);
//request.setCharacterEncoding("UTF-8");
var result=Ext.JSON.decode(response.responseText);
// request.setCharacterEncoding("UTF-8");
// alert('3w');
//alert("request.....");
// alert(result);
// Ext.Msg.alert('ok');
cateTrip(result);
msgInfo('移动成功!');
},
failure:function(response,opts){ //失败了干些什么
msgError('移动失败!');
},
params:{foid:va,selectid:selectItemId,act:'movefolder'} //传到后台的参数
});
}
} */
listeners:{
change:{
fn:function(){
//
alert('2w');
var tarvalue=this.getValue();
//alert(tarvalue);
// alert('3w');
// //从这里起有错误:
Ext.Ajax.request({
url:'/forpeople/view',
//jsonData:Ext.util.JSON.encode(info),
method : 'post',
params:{tagv:tarvalue},
success:function(response){
/// alert(tarvalue);
//request.setCharacterEncoding("UTF-8");
var result=Ext.JSON.decode(response.responseText);
// request.setCharacterEncoding("UTF-8");
// alert('3w');
//alert("request.....");
// alert(result);
// Ext.Msg.alert('ok');
cateTrip(result);
}
});
//错误结束
}
}
},
typeAhead: true,
})
//test
/*
// Simple ComboBox using the data store
var simpleCombo = Ext.create('Ext.form.field.ComboBox', {
fieldLabel: '查询',
renderTo: 'simpleCombo',
displayField: 'name',
width: 520,
labelWidth: 130,
store: createStore(),
queryMode: 'local',
listeners:{
change:{
fn:function(){
//
alert('2w');
var tarvalue=this.getValue();
//alert(tarvalue);
// alert('3w');
// //从这里起有错误:
Ext.Ajax.request({
url:'/forpeople/view',
//jsonData:Ext.util.JSON.encode(info),
method : 'post',
params:{tagv:tarvalue},
success:function(response){
/// alert(tarvalue);
//request.setCharacterEncoding("UTF-8");
var result=Ext.JSON.decode(response.responseText);
// request.setCharacterEncoding("UTF-8");
// alert('3w');
//alert("request.....");
// alert(result);
// Ext.Msg.alert('ok');
cateTrip(result);
}
});
//错误结束
}
}
},
typeAhead: true,
});
*/
////// Collapsible code panels; ignore: /////
Ext.select('pre.code').each(function(pre) {
Ext.create('Ext.form.FieldSet', {
contentEl: pre,
renderTo: pre.parent(),
title: 'View code for this example',
collapsible: true,
collapsed: true
});
});
});
function cateTrip(data){
//var hlArray = data["hl"];
//var hostArray = data["host"];
//var serviceArray = data["service"];
var idendataArray = data["idendata"];
//alert("ok");
//alert(idendataArray.length);
//alert(serviceArray.length);
// data=hlArray;
//alert('in cateTrip');
// alert(idendataArray);
var length = data.length;
//alert(length);
// alert('aftore len');
var dataArray = new Array();
var dateArray = new Array();
//alert("test1............");
//testscen 取数据
//alert("test1............");
var lengthts = idendataArray.length;
//Ralert(lengthts);
//alert('中文');
var table = document.getElementById("contactTable");
for(var i=0; i<=lengthts-1; i++){
//if(null != testscenArray)
{
//alert("testifin............");
//alert(idendataArray[i]);
var jsonObj = idendataArray[i]; //获取json对象
//alert('okokok');
var tr = table.insertRow(table.rows.length);
//alert("testjsonhou............");
var td1 = tr.insertCell(0);
td1.align = "center";
var td2 = tr.insertCell(1);
td2.align = "center";
var td3 = tr.insertCell(2);
td3.align = "center";
var td4 = tr.insertCell(3);
td4.align = "center";
var td5 = tr.insertCell(4);
td5.align = "center";
var td6 = tr.insertCell(5);
td6.align = "center";
var td7 = tr.insertCell(6);
td7.align = "center";
//var td8 = tr.insertCell(8);
//td8.align = "center";
//alert(jsonObj.testdescribe);
//alert(jsonObj.testdescribe);
td1.innerHTML = jsonObj.membername;
td2.innerHTML = jsonObj.addtime;
td3.innerHTML = jsonObj.cianum;
td4.innerHTML = jsonObj.skilled;
td5.innerHTML = jsonObj.scalecompany;
td6.innerHTML = jsonObj.company;
td7.innerHTML = jsonObj.contactnum;
//td8.innerHTML = jsonObj.membernum;
}
}
//alert("test2............");
//host172.18.17.20 httpload shell
//alert("test2............");
/*
var hostlength20 = hostArray.length;
var dataArrayhostcpu20 = new Array();
var dataArrayhostmem20 = new Array();
var dateArrayhost20 = new Array();
for(var i=0; i
//if((hostArray[i].hostname)=='172.18.5.17'){
if(("172.18.17.20")==(hostArray[i].hostname)){
//
{ "a".equals(strID)
//alert("data[i.......]");
//alert(hostArray[i].recordtime);
dataArrayhostcpu20.push(parseInt(hostArray[i].userdata));
dataArrayhostmem20.push(parseInt(hostArray[i].freedata));
//alert(data[1].fetches);
//alert(data[2].fetches);
dateArrayhost20.push(hostArray[i].recordtime);
//alert("data[i.......over]");
}
}
//host5.17
//
alert("test2............");
var hostlength = hostArray.length;
var dataArrayhostcpu = new Array();
var dataArrayhostmem = new Array();
var dateArrayhost = new Array();
var dataArrayhostdread = new Array();
var dataArrayhostdwrite = new Array();
var dataArrayhosteth1rb = new Array();
var dataArrayhosteth1sb = new Array();
var dataArrayhosteth3rb = new Array();
var dataArrayhosteth3sb = new Array();
//172.18.17.6 host hm
for(var i=0; i
//if((hostArray[i].hostname)=='172.18.5.17'){
if(("172.18.18.6")==(hostArray[i].hostname)){
//
{ "a".equals(strID)
alert("data[i.......]");
alert(hostArray[i].userdata);
dataArrayhostcpu.push(parseInt(hostArray[i].userdata));
dataArrayhostmem.push(parseInt(hostArray[i].freedata));
dataArrayhostdread.push(parseInt(hostArray[i].dread));
dataArrayhostdwrite.push(parseInt(hostArray[i].dwrite));
dataArrayhosteth1rb.push(parseInt(hostArray[i].eth1rb));
dataArrayhosteth1sb.push(parseInt(hostArray[i].eth1sb));
dataArrayhosteth3rb.push(parseInt(hostArray[i].eth3rb));
dataArrayhosteth3sb.push(parseInt(hostArray[i].eth3sb));
//alert(data[1].fetches);
//alert(data[2].fetches);
dateArrayhost.push(hostArray[i].recordtime);
alert("data[i.......over]");
}
}
//alert("test3............");
//host172.18.17.7 hosthm
//alert("test2............");
var hostlength7 = hostArray.length;
var dataArrayhostcpu7 = new Array();
var dataArrayhostmem7 = new Array();
var dateArrayhost7 = new Array();
for(var i=0; i
//if((hostArray[i].hostname)=='172.18.5.17'){
if(("172.18.17.7")==(hostArray[i].hostname)){
//
{ "a".equals(strID)
//alert("data[i.......]");
//alert(hostArray[i].recordtime);
dataArrayhostcpu7.push(parseInt(hostArray[i].userdata));
dataArrayhostmem7.push(parseInt(hostArray[i].freedata));
//alert(data[1].fetches);
//alert(data[2].fetches);
dateArrayhost7.push(hostArray[i].recordtime);
//alert("data[i.......over]");
}
}
//host172.18.17.16 dea
alert("test2............");
var hostlength16 = hostArray.length;
var dataArrayhostcpu16 = new Array();
var dataArrayhostmem16 = new Array();
var dataArrayhostdread16 = new Array();
var dataArrayhostdwrite16 = new Array();
var dataArrayhosteth1rb16 = new Array();
var dataArrayhosteth1sb16 = new Array();
var dataArrayhosteth3rb16 = new Array();
var dataArrayhosteth3sb16 = new Array();
var dateArrayhost16 = new Array();
for(var i=0; i
//if((hostArray[i].hostname)=='172.18.5.17'){
if(("172.18.17.16")==(hostArray[i].hostname)){
//
{ "a".equals(strID)
//alert("data[i.......]");
//alert(hostArray[i].recordtime);
dataArrayhostcpu16.push(parseInt(hostArray[i].userdata));
dataArrayhostmem16.push(parseInt(hostArray[i].freedata));
dataArrayhostdread16.push(parseInt(hostArray[i].dread));
dataArrayhostdwrite16.push(parseInt(hostArray[i].dwrite));
dataArrayhosteth1rb16.push(parseInt(hostArray[i].eth1rb));
dataArrayhosteth1sb16.push(parseInt(hostArray[i].eth1sb));
dataArrayhosteth3rb16.push(parseInt(hostArray[i].eth3rb));
dataArrayhosteth3sb16.push(parseInt(hostArray[i].eth3sb));
//alert(parseInt(hostArray[i].eth3sb));
//alert(data[2].fetches);
dateArrayhost16.push(hostArray[i].recordtime);
//alert("data[i.......over]");
}
}
//host172.18.15.26 cc and nats
//alert("test2............");
var hostlength26 = hostArray.length;
var dataArrayhostcpu26 = new Array();
var dataArrayhostmem26 = new Array();
var dateArrayhost26 = new Array();
var dataArrayhostdread26 = new Array();
var dataArrayhostdwrite26 = new Array();
var dataArrayhosteth1rb26 = new Array();
var dataArrayhosteth1sb26 = new Array();
var dataArrayhosteth3rb26 = new Array();
var dataArrayhosteth3sb26 = new Array();
for(var i=0; i
//if((hostArray[i].hostname)=='172.18.5.17'){
if(("172.18.15.26")==(hostArray[i].hostname)){
//
{ "a".equals(strID)
//alert("data[i.......]");
//alert(hostArray[i].recordtime);
dataArrayhostcpu26.push(parseInt(hostArray[i].userdata));
dataArrayhostmem26.push(parseInt(hostArray[i].freedata));
dataArrayhostdread16.push(parseInt(hostArray[i].dread));
dataArrayhostdwrite26.push(parseInt(hostArray[i].dwrite));
dataArrayhosteth1rb26.push(parseInt(hostArray[i].eth1rb));
dataArrayhosteth1sb26.push(parseInt(hostArray[i].eth1sb));
dataArrayhosteth3rb26.push(parseInt(hostArray[i].eth3rb));
dataArrayhosteth3sb26.push(parseInt(hostArray[i].eth3sb));
//alert(data[1].fetches);
//alert(data[2].fetches);
dateArrayhost26.push(hostArray[i].recordtime);
//alert("data[i.......over]");
}
}
//host172.18.17.8 router
//alert("test2............");
var hostlength8 = hostArray.length;
var dataArrayhostcpu8 = new Array();
var dataArrayhostmem8 = new Array();
var dateArrayhost8 = new Array();
for(var i=0; i
//if((hostArray[i].hostname)=='172.18.5.17'){
if(("172.18.17.8")==(hostArray[i].hostname)){
//
{ "a".equals(strID)
//alert("data[i.......]");
//alert(hostArray[i].recordtime);
dataArrayhostcpu8.push(parseInt(hostArray[i].userdata));
dataArrayhostmem8.push(parseInt(hostArray[i].freedata));
//alert(data[1].fetches);
//alert(data[2].fetches);
dateArrayhost8.push(hostArray[i].recordtime);
//alert("data[i.......over]");
}
}
//alert("test3............");
//hmservice
//alert("test2............");
var servicelength = serviceArray.length;
var dataArrayhmrun = new Array();
var dataArrayhmmiss = new Array();
var dataArrayhmflapp = new Array();
var dataArraydrop = new Array();
var dataArrayconn = new Array();
var dataArraydeacpu = new Array();
var dataArraydeamem= new Array();
var dataArraynatscpu = new Array();
var dataArraynatsmem= new Array();
var dataArraycccpu = new Array();
var dataArrayccmem= new Array();
var dataArrayhmtime = new Array();
var dataArrayhmcpu = new Array();
var dataArrayhmmem= new Array();
var dataArrayroutercpu = new Array();
var dataArrayroutermem= new Array();
//var dateArrayhmdate = new Array();
//alert(servicelength);
//alert("test2lengthbefore............");
for(var i=0; i
if(null!= serviceArray)
{
//alert("data[i.......]");
//alert(serviceArray[i].runninginstances);
//alert(serviceArray[i].natsmem);
//alert(serviceArray[i].missinginstances);
//alert("data[i.......]");
//alert(serviceArray[i].flappinginstances);
dataArrayhmrun.push(parseInt(serviceArray[i].runninginstances));
dataArrayhmmiss.push(parseInt(serviceArray[i].missinginstances));
dataArrayhmflapp.push(parseInt(serviceArray[i].flappinginstances));
dataArraydrop.push(parseInt(serviceArray[i].droplets));
dataArrayconn.push(parseInt(serviceArray[i].connections));
dataArraydeacpu.push(parseInt(serviceArray[i].deacpu));
dataArraydeamem.push(parseInt(serviceArray[i].deamem));
dataArraynatscpu.push(parseInt(serviceArray[i].natscpu));
dataArraynatsmem.push(parseInt(serviceArray[i].natsmem));
dataArraycccpu.push(parseInt(serviceArray[i].cccpu));
dataArrayccmem.push(parseInt(serviceArray[i].ccmem));
dataArrayhmcpu.push(parseInt(serviceArray[i].hmcpu));
dataArrayhmmem.push(parseInt(serviceArray[i].hmmem));
dataArrayroutercpu.push(parseInt(serviceArray[i].routercpu));
dataArrayroutermem.push(parseInt(serviceArray[i].routermem));
dataArrayhmtime.push(serviceArray[i].recordtime);
//alert(dataArrayhmrun.push(serviceArray[i].runninginstances));
//alert(dataArrayhmrun.push(serviceArray[i].missinginstances));
//alert("dataArrayhmrun[i.......]");
//alert(dataArrayhmrun.valueOf(runninginstances))
//alert(dataArrayhmrun.valueOf(missinginstances))
//alert(data[1].fetches);
//alert(data[2].fetches);
//dateArrayhost.push(hostArray[i].recordtime);
//alert("data[i.......over]");
}
}
//alert("test3............");
//var length1 = dataArray.length;
//alert(length1);
//alert('zhangdu');
//alert(dateArray);
//alert('zhangdu2');
//alert(dataArray);
//var length2 = dateArray.length;
//alert(length2);
var dataResult = {};
dataResult.name = "fetches";
dataResult.data = dataArray;
var inputDataResult = new Array();
inputDataResult.push(dataResult);
// alert('before cateTrip');
//drawhighcharts("httpload",dateArray,inputDataResult);
//alert(dataArray[0]);
//alert('after draw');
//host_mem17.6
var dataResultmem = {};
dataResultmem.name = "mem";
dataResultmem.data = dataArrayhostmem;
var inputDataResultmem = new Array();
inputDataResultmem.push(dataResultmem);
//host_cpu17.6
var dataResultcpu = {};
dataResultcpu.name = "cpu";
dataResultcpu.data = dataArrayhostcpu;
var dataResultdread = {};
dataResultdread.name = "dread";
dataResultdread.data = dataArrayhostdread;
var dataResultdwrite = {};
dataResultdwrite.name = "dwrite";
dataResultdwrite.data = dataArrayhostdwrite;
var dataResulteth1rb = {};
dataResulteth1rb.name = "eth1rb";
dataResulteth1rb.data = dataArrayhosteth1rb;
var dataResulteth1sb = {};
dataResulteth1sb.name = "eth1sb";
dataResulteth1sb.data = dataArrayhosteth1sb;
var dataResulteth3rb = {};
dataResulteth3rb.name = "eth3rb";
dataResulteth3rb.data = dataArrayhosteth3rb;
var dataResulteth3sb = {};
dataResulteth3sb.name = "eth3sb";
dataResulteth3sb.data = dataArrayhosteth3sb;
//alert(dataResultcpu.name);
//alert(dataResultcpu.data);
//alert(dateArrayhost);
var inputDataResultcpu = new Array();
inputDataResultcpu.push(dataResultcpu);
inputDataResultcpu.push(dataResultmem);
inputDataResultcpu.push(dataResultdread);
inputDataResultcpu.push(dataResultdwrite);
inputDataResultcpu.push(dataResulteth1rb);
inputDataResultcpu.push(dataResulteth1sb);
inputDataResultcpu.push(dataResulteth3rb);
inputDataResultcpu.push(dataResulteth3sb);
//alert('before cateTrip');
//host_20 httpload
var dataResultmem20 = {};
dataResultmem20.name = "mem20";
dataResultmem20.data = dataArrayhostmem20;
var dataResultcpu20 = {};
dataResultcpu20.name = "cpu20";
dataResultcpu20.data = dataArrayhostcpu20;
var inputDataResultmem20 = new Array();
inputDataResultmem20.push(dataResultmem20);
inputDataResultmem20.push(dataResultcpu20);
//host_16
var dataResultmem16 = {};
dataResultmem16.name = "mem16";
dataResultmem16.data = dataArrayhostmem16;
var dataResultcpu16 = {};
dataResultcpu16.name = "cpu16";
dataResultcpu16.data = dataArrayhostcpu16;
var dataResultdread16 = {};
dataResultdread16.name = "dread";
dataResultdread16.data = dataArrayhostdread16;
var dataResultdwrite16 = {};
dataResultdwrite16.name = "dwrite";
dataResultdwrite16.data = dataArrayhostdwrite16;
var dataResulteth1rb16 = {};
dataResulteth1rb16.name = "eth1rb";
dataResulteth1rb16.data = dataArrayhosteth1rb16;
var dataResulteth1sb16 = {};
dataResulteth1sb16.name = "eth1sb";
dataResulteth1sb16.data = dataArrayhosteth1sb16;
var dataResulteth3rb16 = {};
dataResulteth3rb16.name = "eth3rb";
dataResulteth3rb16.data = dataArrayhosteth3rb16;
var dataResulteth3sb16 = {};
dataResulteth3sb16.name = "eth3sb";
dataResulteth3sb16.data = dataArrayhosteth3sb16;
var inputDataResultmem16 = new Array();
inputDataResultmem16.push(dataResultmem16);
inputDataResultmem16.push(dataResultcpu16);
inputDataResultmem16.push(dataResultdread16);
inputDataResultmem16.push(dataResultdwrite16);
inputDataResultmem16.push(dataResulteth1rb16);
inputDataResultmem16.push(dataResulteth1sb16);
inputDataResultmem16.push(dataResulteth3rb16);
inputDataResultmem16.push(dataResulteth3sb16);
//host_7 17.7
var dataResultmem7 = {};
dataResultmem7.name = "mem7";
dataResultmem7.data = dataArrayhostmem7;
var dataResultcpu7 = {};
dataResultcpu7.name = "cpu17";
dataResultcpu7.data = dataArrayhostcpu7;
var inputDataResultmem7 = new Array();
inputDataResultmem7.push(dataResultmem7);
inputDataResultmem7.push(dataResultcpu7);
//host_15.26
var dataResultmem26 = {};
dataResultmem26.name = "mem7";
dataResultmem26.data = dataArrayhostmem26;
var dataResultcpu26 = {};
dataResultcpu26.name = "cpu26";
dataResultcpu26.data = dataArrayhostcpu26;
var dataResultdread26 = {};
dataResultdread26.name = "dread";
dataResultdread26.data = dataArrayhostdread26;
var dataResultdwrite26 = {};
dataResultdwrite26.name = "dwrite";
dataResultdwrite26.data = dataArrayhostdwrite26;
var dataResulteth1rb26 = {};
dataResulteth1rb26.name = "eth1rb";
dataResulteth1rb26.data = dataArrayhosteth1rb26;
var dataResulteth1sb26 = {};
dataResulteth1sb26.name = "eth1sb";
dataResulteth1sb26.data = dataArrayhosteth1sb26;
var dataResulteth3rb26 = {};
dataResulteth3rb26.name = "eth3rb";
dataResulteth3rb26.data = dataArrayhosteth3rb26;
var dataResulteth3sb26 = {};
dataResulteth3sb26.name = "eth3sb";
dataResulteth3sb26.data = dataArrayhosteth3sb26;
var inputDataResultmem26 = new Array();
inputDataResultmem26.push(dataResultmem26);
inputDataResultmem26.push(dataResultcpu26);
inputDataResultmem26.push(dataResultdread26);
inputDataResultmem26.push(dataResultdwrite26);
inputDataResultmem26.push(dataResulteth1rb26);
inputDataResultmem26.push(dataResulteth1sb26);
inputDataResultmem26.push(dataResulteth3rb26);
inputDataResultmem26.push(dataResulteth3sb26);
//host_17.8 router
var dataResultmem8 = {};
dataResultmem8.name = "mem7";
dataResultmem8.data = dataArrayhostmem8;
var dataResultcpu8 = {};
dataResultcpu8.name = "cpu26";
dataResultcpu8.data = dataArrayhostcpu8;
var inputDataResultmem8 = new Array();
inputDataResultmem8.push(dataResultmem8);
inputDataResultmem8.push(dataResultcpu8);
//servicerun
var dataResultrun = {};
dataResultrun.name = "run";
dataResultrun.data = dataArrayhmrun;
//alert(dataResultrun)
var inputDataResultrun = new Array();
inputDataResultrun.push(dataResultrun);
//servicemiss
var dataResultmiss = {};
dataResultmiss.name = "miss";
dataResultmiss.data = dataArrayhmmiss;
var inputDataResultmiss = new Array();
inputDataResultmiss.push(dataResultmiss);
//serviceflapp
var dataResultflapp = {};
dataResultflapp.name = "flapp";
dataResultflapp.data = dataArrayhmflapp;
var inputDataResultflapp = new Array();
inputDataResultflapp.push(dataResultflapp);
//serviceconnanddrop
var dataResultdrop = {};
dataResultdrop.name = "drop";
dataResultdrop.data = dataArraydrop;
var dataResultconn = {};
dataResultconn.name = "conn";
dataResultconn.data = dataArrayconn;
//servicnatsdeacpu and mem
var dataResultdeacpu = {};
dataResultdeacpu.name = "deacpu";
dataResultdeacpu.data = dataArraydeacpu;
var dataResultdeamem = {};
dataResultdeamem.name = "deacpu";
dataResultdeamem.data = dataArraydeamem;
var dataResultnatscpu = {};
dataResultnatscpu.name = "natscpu";
dataResultnatscpu.data = dataArraynatscpu;
var dataResultnatsmem = {};
dataResultnatsmem.name = "natscpu";
dataResultnatsmem.data = dataArraynatsmem;
var dataResultccmem = {};
dataResultccmem.name = "ccmem";
dataResultccmem.data = dataArrayccmem;
var dataResultcccpu = {};
dataResultcccpu.name = "cccpu";
dataResultcccpu.data = dataArraycccpu;
var dataResulthmmem = {};
dataResulthmmem.name = "hmmem";
dataResulthmmem.data = dataArrayhmmem;
var dataResulthmcpu = {};
dataResulthmcpu.name = "hmcpu";
dataResulthmcpu.data = dataArrayhmcpu;
var dataResultroutermem = {};
dataResultroutermem.name = "routermem";
dataResultroutermem.data = dataArrayroutermem;
var dataResultroutercpu = {};
dataResultroutercpu.name = "routercpu";
dataResultroutercpu.data = dataArrayroutercpu;
var inputDataResultdeacpu = new Array();
inputDataResultdeacpu.push(dataResultdeacpu);
//inputDataResultdeacpu.push(dataResultrun);
inputDataResultdeacpu.push(dataResultdeamem);
inputDataResultdeacpu.push(dataResultnatscpu);
inputDataResultdeacpu.push(dataResultnatsmem);
inputDataResultdeacpu.push(dataResultccmem);
inputDataResultdeacpu.push(dataResultcccpu);
inputDataResultdeacpu.push(dataResulthmmem);
inputDataResultdeacpu.push(dataResulthmcpu);
inputDataResultdeacpu.push(dataResultroutermem);
inputDataResultdeacpu.push(dataResultroutercpu);
//servicehm
var inputDataResultrun = new Array();
inputDataResultrun.push(dataResultrun);
inputDataResultrun.push(dataResultmiss);
inputDataResultrun.push(dataResultflapp);
inputDataResultrun.push(dataResultdrop);
inputDataResultrun.push(dataResultconn);
var inputDataResult = new Array();
inputDataResult.push(dataResult);*/
//inputDataResult.push(dataResultcpu);
//inputDataResult.push(dataResultrun);
//inputDataResult.push(dataArrayhmmiss);
// alert('before cateTrip');
//alert(inputDataResultrun);
//alert(inputDataResultdeacpu);
//alert(dataResult);
///drawhighcharts("httpload",dateArray,inputDataResult);
//drawhighcharts("httpload",dateArray,inputDataResult);
//
drawhighchartsdea16pre("dea16pre",dateArrayhost16,inputDataResultmem16);
//httpload pre
//drawhighchartshl20pre("hl20pre",dateArrayhost20,inputDataResultmem20);
// drawhighchartscpu("hm17.6pre",dateArrayhost,inputDataResultcpu);
//drawhighchartsmem("mem",dateArrayhost,inputDataResultmem);
//inputDataResultrun.push(dataResultmiss);
//drawhighchartshmrunok("hm nats router instances type",dataArrayhmtime,inputDataResultrun);
//allservice cpu and mem
//drawhighchartshmrun("all service pre",dataArrayhmtime,inputDataResultdeacpu);
//drawhighchartshmmiss("hmmiss",dataArrayhmtime,inputDataResultmiss);
//
drawhighchartshm7pre("hm7pre",dateArrayhost7,inputDataResultmem7);
//drawhighchartscc26pre("ccnats26pre",dateArrayhost26,inputDataResultmem26);
//drawhighchartsrouter8pre("router8pre",dateArrayhost8,inputDataResultmem8);
//drawhighchartsservicepre("allservicepre",dataArrayhmtime,inputDataResultdeacpu);
//drawhighchartsservicepre("hmrun",dataArrayhmtime,inputDataResultrun);
//drawhighchartshmrun("hmrun",dataArrayhmtime,inputDataResultdeacpu);
}
function drawhighcharts(title,categories,series) {
//alert("in draw");
//alert(categories);
// alert(series);
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
//
defaultSeriesType: 'spline'
},
title: {
text: title,
x: -20 //center
},
credits: {
enabled: true,
text: "time",
href: "http://www.chanjet.com",
},
xAxis: {
categories:categories
},
yAxis: {
title: {
text: 'fetches'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
crosshairs: true,
shared: true
},
plotOptions: {
spline: {
marker: {
radius: 4,
lineColor: '#666666',
lineWidth: 1
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series:series
//
series:[{
//
name: 'Tokyo',
//
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
//
}, {
//
name: 'New York',
//
data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
//
}, {
//
name: 'Berlin',
//
data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
//
}, {
//
name: 'London',
//
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
//
}]
});
//alert("over draw");
};
//draw cpu
function drawhighchartscpu(title,categories,series) {
//alert("in draw");
//alert(categories);
// alert(series);
chart = new Highcharts.Chart({
chart: {
renderTo: 'containercpu',
//
defaultSeriesType: 'spline'
},
title: {
text: title,
x: -20 //center
},
credits: {
enabled: true,
text: "time",
href: "http://www.chanjet.com",
},
xAxis: {
categories:categories
},
yAxis: {
title: {
text: 'num'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
crosshairs: true,
shared: true
},
plotOptions: {
spline: {
marker: {
radius: 4,
lineColor: '#666666',
lineWidth: 1
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series:series
});
//alert("over draw");
};
//mem
function drawhighchartsmem(title,categories,series) {
//alert("in draw");
//alert(categories);
// alert(series);
chart = new Highcharts.Chart({
chart: {
renderTo: 'containermem',
//
defaultSeriesType: 'spline'
},
title: {
text: title,
x: -20 //center
},
credits: {
enabled: true,
text: "time",
href: "http://www.chanjet.com",
},
xAxis: {
categories:categories
},
yAxis: {
title: {
text: 'fetches'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
crosshairs: true,
shared: true
},
plotOptions: {
spline: {
marker: {
radius: 4,
lineColor: '#666666',
lineWidth: 1
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series:series
});
//alert("over draw");
};
//not hmservicerun ,is drawhighchartsallservicecpumempre
function drawhighchartshmrun(title,categories,series) {
//alert("in draw");
//alert(categories);
// alert(series);
chart = new Highcharts.Chart({
chart: {
renderTo: 'containerservicepre',
//
defaultSeriesType: 'spline'
},
title: {
text: title,
x: -20 //center
},
credits: {
enabled: true,
text: "time",
href: "http://www.chanjet.com",
},
xAxis: {
categories:categories
},
yAxis: {
title: {
text: 'num'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
crosshairs: true,
shared: true
},
plotOptions: {
spline: {
marker: {
radius: 4,
lineColor: '#666666',
lineWidth: 1
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series:series
//
series:[{
//
name: 'Tokyo',
//
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
//
}, {
//
name: 'New York',
//
data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
//
}, {
//
name: 'Berlin',
//
data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
//
}, {
//
name: 'London',
//
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
//
}]
});
//alert("over draw");
};
//not hmservicerun ,is drawhighchartsallservicecpumempre
function drawhighchartshmrunok(title,categories,series) {
//alert("in draw");
//alert(categories);
// alert(series);
chart = new Highcharts.Chart({
chart: {
renderTo: 'containerhmrun',
//
defaultSeriesType: 'spline'
},
title: {
text: title,
x: -20 //center
},
credits: {
enabled: true,
text: "time",
href: "http://www.chanjet.com",
},
xAxis: {
categories:categories
},
yAxis: {
title: {
text: 'num'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
crosshairs: true,
shared: true
},
plotOptions: {
spline: {
marker: {
radius: 4,
lineColor: '#666666',
lineWidth: 1
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series:series
//
series:[{
//
name: 'Tokyo',
//
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
//
}, {
//
name: 'New York',
//
data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
//
}, {
//
name: 'Berlin',
//
data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
//
}, {
//
name: 'London',
//
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
//
}]
});
//alert("over draw");
};
//drawhighchartsallservicecpumempre
//
function drawhighchartsservicepre(title,categories,series) {
//alert("in draw");
//alert(categories);
// alert(series);
chart = new Highcharts.Chart({
chart: {
renderTo: 'containerhmrun',
//
defaultSeriesType: 'spline'
},
title: {
text: title,
x: -20 //center
},
credits: {
enabled: true,
text: "time",
href: "http://www.chanjet.com",
},
xAxis: {
categories:categories
},
yAxis: {
title: {
text: 'instancenum'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
crosshairs: true,
shared: true
},
plotOptions: {
spline: {
marker: {
radius: 4,
lineColor: '#666666',
lineWidth: 1
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series:series
//
series:[{
//
name: 'Tokyo',
//
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
//
}, {
//
name: 'New York',
//
data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]
//
}, {
//
name: 'Berlin',
//
data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
//
}, {
//
name: 'London',
//
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
//
}]
});
//alert("over draw");
};
//hmservicemiss
function drawhighchartshmmiss(title,categories,series) {
//alert("in draw");
//alert(categories);
// alert(series);
chart = new Highcharts.Chart({
chart: {
renderTo: 'containerhmmiss',
//
defaultSeriesType: 'spline'
},
title: {
text: title,
x: -20 //center
},
credits: {
enabled: true,
text: "time",
href: "http://www.chanjet.com",
},
xAxis: {
categories:categories
},
yAxis: {
title: {
text: 'instancenum'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
crosshairs: true,
shared: true
},
plotOptions: {
spline: {
marker: {
radius: 4,
lineColor: '#666666',
lineWidth: 1
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series:series
});
//alert("over draw");
};
//drawhighchartsdea16pre
function drawhighchartsdea16pre(title,categories,series) {
//alert("in draw");
//alert(categories);
// alert(series);
chart = new Highcharts.Chart({
chart: {
renderTo: 'containerdea16pre',
//
defaultSeriesType: 'spline'
},
title: {
text: title,
x: -20 //center
},
credits: {
enabled: true,
text: "time",
href: "http://www.chanjet.com",
},
xAxis: {
categories:categories
},
yAxis: {
title: {
text: 'baifenbi'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
crosshairs: true,
shared: true
},
plotOptions: {
spline: {
marker: {
radius: 4,
lineColor: '#666666',
lineWidth: 1
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series:series
});
//alert("over draw");
};
//drawhighchartshl20pre
function drawhighchartshl20pre(title,categories,series) {
//alert("in draw");
//alert(categories);
// alert(series);
chart = new Highcharts.Chart({
chart: {
renderTo: 'containerhl20pre',
//
defaultSeriesType: 'spline'
},
title: {
text: title,
x: -20 //center
},
credits: {
enabled: true,
text: "time",
href: "http://www.chanjet.com",
},
xAxis: {
categories:categories
},
yAxis: {
title: {
text: 'baifenbi'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
crosshairs: true,
shared: true
},
plotOptions: {
spline: {
marker: {
radius: 4,
lineColor: '#666666',
lineWidth: 1
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series:series
});
//alert("over draw");
};
//drawhighchartsdea16pre
function drawhighchartscc26pre(title,categories,series) {
//alert("in draw");
//alert(categories);
// alert(series);
chart = new Highcharts.Chart({
chart: {
renderTo: 'containercc26pre',
//
defaultSeriesType: 'spline'
},
title: {
text: title,
x: -20 //center
},
credits: {
enabled: true,
text: "time",
href: "http://www.chanjet.com",
},
xAxis: {
categories:categories
},
yAxis: {
title: {
text: 'baifenbi'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
crosshairs: true,
shared: true
},
plotOptions: {
spline: {
marker: {
radius: 4,
lineColor: '#666666',
lineWidth: 1
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series:series
});
//alert("over draw");
};
//drawhighchartsdea16pre
function drawhighchartsrouter8pre(title,categories,series) {
//alert("in draw");
//alert(categories);
// alert(series);
chart = new Highcharts.Chart({
chart: {
renderTo: 'containerrouter8pre',
//
defaultSeriesType: 'spline'
},
title: {
text: title,
x: -20 //center
},
credits: {
enabled: true,
text: "time",
href: "http://www.chanjet.com",
},
xAxis: {
categories:categories
},
yAxis: {
title: {
text: 'baifenbi'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
crosshairs: true,
shared: true
},
plotOptions: {
spline: {
marker: {
radius: 4,
lineColor: '#666666',
lineWidth: 1
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series:series
});
//alert("over draw");
};