rendered paste body<html>
<head>
<link href="http://64.104.195.120/sodc//j/ext-1.0-beta2/resources/css/ext-all.css" rel="stylesheet" type="text/css"/>
<link href="http://64.104.195.120/sodc//css/doug.css" rel="stylesheet" type="text/css"/>
<script src="http://64.104.195.120/sodc//j/ext-1.0-beta2/adapter/yui/yui-utilities.js"></script>
<script src="http://64.104.195.120/sodc//j/ext-1.0-beta2/adapter/yui/ext-yui-adapter.js"></script>
<script src="http://64.104.195.120/sodc//j/ext-1.0-beta2/ext-all-debug.js"></script>
</head>
<body>
<script type="text/javascript">
var ExternalContent = function(){
// Private member methods.
var myFarmRowSelect = function(sm, rowIndex) {
var savedCursor = document.body.style.cursor;
document.body.style.cursor = "wait";
// Get our farm's individual hosts detail.
var ds = new Ext.data.Store({
proxy: new Ext.data.MemoryProxy(sm.getSelections()[0].data.hostRef),
reader: new Ext.data.ArrayReader({id: 0}, [
{name: 'host'},
{name: 'cpuusage'},
{name: 'cputotal'},
{name: 'memtotal'},
{name: 'memusage'},
{name: 'vmcnt'},
{name: 'alocmem'}
]
)
}
);
ds.setDefaultSort('host', 'asc');
ds.load();
//Create a column model for our data detail grid.
var colModel = new Ext.grid.ColumnModel([
{header: "Host", sortable: true, locked:false, dataIndex: 'host'},
{header: "VM Count", sortable: true, locked:false, dataIndex: 'vmcnt'},
{header: "CPU Usage", sortable: true, locked:false, dataIndex: 'cpuusage'},
{header: "CPU Total", sortable: true, locked:false, dataIndex: 'cputotal'},
{header: "Memory Usage", sortable: true, locked:false, dataIndex: 'memusage'},
{header: "Memory Total", sortable: true, locked:false, dataIndex: 'memtotal'},
{header: "Allocated Memory", sortable: true, locked:false, dataIndex: 'alocmem'}
]);
// create the detail grid.
this.detailGrid = new Ext.grid.Grid('myDetail', {
ds: ds,
cm: colModel,
autoSizeColumns: true,
autoSizeHeaders: true,
autoExpandColumn: true,
autoHeight: true,
autoWidth: true
});
this.layout.beginUpdate();
this.layout.remove('south', 'myDetail');
var record = sm.getSelected();
var gridPanel = new Ext.GridPanel(this.detailGrid,
{title: 'Details for ' +
sm.getSelections()[0].id,
fitToFrame:true,
// fitContainer: true,
autoScroll: true,
closable:false
}
);
this.layout.add('south', gridPanel);
this.layout.getRegion("south").showPanel(gridPanel.getId());
this.detailGrid.render();
this.layout.endUpdate();
document.body.style.cursor = savedCursor;
};
return {
init : function(){
this.farms = eval('({"farms":[["sjc-vif2(2.5.4)",52,83,174,37,194,[["sjc-vif2-06",7971,18287,31799,25224,13,37352],["sjc-vif2-08",6167,18287,31799,23131,19,38944],["sjc-vif2-03",7221,18287,31799,26111,20,43040],["sjc-vif2-11",3925,18287,31799,15493,10,19712],["sjc-vif2-07",10295,18287,31799,24618,18,39232],["sjc-vif2-05",5693,18287,31799,27718,21,47052],["sjc-vif2-04",8256,18287,31799,21292,21,43008],["sjc-vif2-01",10742,18310,31799,11792,9,21024],["sjc-vif2-09",6202,18310,31799,18014,13,33280],["sjc-vif2-12",5920,18287,31799,12182,12,24064],["sjc-vif2-02",12067,18287,31799,26494,21,42640],["sjc-vif2-10",5569,18287,31799,17618,17,32768]]],["rtp-stp1(3.0.1)",26,120,121,-7,44,[["rtp-stp1-02",2169,18309,32599,17600,23,23552],["rtp-stp1-01",1957,18286,32599,15792,21,20736]]],["hupen.cisco.com(3.0.1)",6,46,119,10,9,[["hupen",587,9890,15935,6320,9,6348]]],["sjc-vdc1-vif1(3.0.1)",9,16,168,83,17,[["sjc-vdc1-022",33,9940,16215,61,1,2048],["sjc-vdc1-054",3742,19835,32599,16852,6,17724],["sjc-vdc1-021",2017,9940,16215,55,1,1024],["sjc-vdc1-053",4049,19835,32599,9281,5,9728],["sjc-vdc1-038",29,9940,16215,0,0,0],["sjc-vdc1-017",144,9940,16215,874,2,1536],["sjc-vdc1-037",28,9940,16215,0,0,0],["sjc-vdc1-018",175,9940,16215,3584,1,3584],["sjc-vdc1-036",32,9940,16215,0,0,0],["sjc-vdc1-020",90,9940,16215,2048,1,2048],["sjc-vdc1-034",48,9940,16215,0,0,0],["sjc-vdc1-035",28,9940,16215,0,0,0],["sjc-vdc1-023",29,9940,16215,0,0,0],["sjc-vdc1-033",31,4970,16215,0,0,0]]],["sj5-vif1(3.0.1)",104,153,-3,-23,69,[["sj5-vif1-02",5996,9917,32599,32537,15,34132],["sj5-vif1-01",6979,9917,32599,25250,19,45456],["sj5-vif1-03",6990,9917,32599,34386,17,41352],["sj5-vif1-04",6572,9905,32599,35262,18,45040]]],["cna-app-dev(2.5.4)",29,109,54,-2,23,[["cna-server-3",2206,9918,31799,23800,10,25136],["cna-server-7",1330,9918,31799,16074,6,16416],["cna-server-6",1437,9918,31799,19571,7,20544]]],["cna-aux-dev(2.5.4)",6,31,88,12,6,[["cna-server-10",0,9918,31799,0,3,9248],["cna-server-12",538,9906,31799,8577,3,9248]]],["csi-vif1(3.0.1)",32,143,117,-17,57,[["csi-vif1-03",4815,18309,32599,23910,14,28200],["csi-vif1-01",2769,18309,32599,31126,22,35844],["csi-vif1-02",2565,18309,32599,24741,21,34816]]],["rtp-poc(3.0.1)",36,74,54,10,31,[["palomino",1552,5829,12031,6044,11,20188],["northwood",849,5829,12031,4875,7,16400],["thunderbird",1047,5829,12031,4575,5,12196],["prescott",1932,5829,12031,7515,8,17440]]],["sjc-vif1(2.5.4)",113,76,-23,58,191,[["sjc-vif1-12",8510,9918,31799,12635,6,16256],["sjc-vif1-01",9285,9906,31799,29007,22,44112],["sjc-vif1-04",6641,9918,31799,13807,13,18304],["sjc-vif1-11",7487,9918,31799,6698,5,11584],["sjc-vif1-05",8261,9918,31799,19780,15,31720],["sjc-vif1-09",8778,9918,31799,27139,24,38752],["sjc-vif1-03",8361,9918,31799,15054,16,18448],["sjc-vif1-10",8759,9918,31799,20196,13,24080],["sjc-vif1-06",9785,9918,31799,29568,26,40880],["sjc-vif1-02",9681,9918,31799,26636,27,39744],["sjc-vif1-08",9879,9918,31799,13309,8,16400],["sjc-vif1-07",10040,9918,31799,14168,16,18176]]],["vif-sandbox(3.0.1)",1,0,-1,-1,0,[["sjc-vdc1-032",55,9940,16215,0,0,0],["sjc-vdc1-031",53,9940,16215,0,0,0]]],["test-cluster(3.0.1)",0,0,-1,-1,0,[["sjc-vdc1-047",54,9940,16215,0,0,0]]],["cna-app-prod(2.5.4)",0,0,-1,-1,25,[["sjc-naa-05",0,9918,31799,0,2,7200],["sjc-naa-06",0,9918,31799,0,8,28800],["sjc-naa-02",0,9906,31799,0,7,22624],["sjc-naa-04",0,9918,31799,0,2,7200],["sjc-naa-03",0,9918,31799,0,3,10800],["sjc-naa-01",0,9906,31799,0,3,10800]]],["cna-aux-prod(2.5.4)",25,49,17,6,6,[["cna-server-11",636,9906,31799,6427,3,8208],["cna-server-13",1476,9918,31799,6839,3,6696]]],["cna-web-prod(2.5.4)",0,0,-1,-1,11,[["sjc-naw-01",0,9918,31799,0,4,4096],["sjc-naw-04",0,9918,31799,0,2,2048],["sjc-naw-02",0,9918,31799,0,2,2048],["sjc-naw-03",0,9906,31799,0,3,3072]]],["sjc-vdc1-vif2(3.0.1)",20,73,343,32,88,[["sjc-vdc1-042",930,9940,16215,9488,6,12288],["sjc-vdc1-028",909,9940,16215,11631,6,12288],["sjc-vdc1-045",503,9940,16215,7665,5,13312],["sjc-vdc1-044",590,9940,16215,7382,4,10240],["sjc-vdc1-043",1970,9940,16215,5596,4,10752],["sjc-vdc1-027",691,9940,16215,8650,5,13824],["sjc-vdc1-030",719,9940,16215,7954,5,10752],["sjc-vdc1-025",563,9940,16215,9868,6,15872],["sjc-vdc1-026",2076,9940,16215,6261,4,9728],["sjc-vdc1-024",942,9940,16215,9227,8,12288],["sjc-vdc1-056",11985,19835,65367,23407,15,40352],["sjc-vdc1-040",597,9940,16215,7664,5,13312],["sjc-vdc1-046",594,9940,16215,9465,5,12288],["sjc-vdc1-041",454,9940,16215,9783,5,11776],["sjc-vdc1-029",601,9940,16215,7070,5,13312]]],["rtp-vif3(3.0.1)",20,39,423,169,112,[["rtp-vif3-04",2629,18395,65534,20135,12,50112],["rtp-vif3-08",2066,18395,65534,20580,11,48064],["rtp-vif3-01",3307,18395,65534,14898,15,40768],["rtp-vif3-05",2843,18395,65534,20811,14,51848],["rtp-vif3-07",2223,18395,65534,22922,15,57792],["rtp-vif3-03",3663,18395,65534,20028,15,63216],["rtp-vif3-06",1883,18395,65534,19176,17,53984],["rtp-vif3-02",4287,18395,65534,16323,13,50352]]],["ams-vif1(3.0.1)",89,126,7,-12,62,[["ams-vif1-01",6572,9905,32599,21921,12,21504],["ams-vif1-03",5318,9905,32599,25029,18,24064],["ams-vif1-02",5789,9905,32599,29160,16,40704],["ams-vif1-04",4934,9905,32599,28745,16,31088]]],["cna-web-dev(2.5.4)",16,35,80,29,16,[["cna-server-5",1372,9918,31799,7330,6,7168],["cna-server-4",814,9918,31799,6141,5,6144],["cna-server-8",609,9918,31799,5708,5,6144]]],["rtp-vif1(2.5.4)",106,90,-9,14,141,[["rtp-vif1-01",9165,9906,31799,22460,16,30668],["rtp-vif1-06",9165,9906,31799,24286,18,32848],["rtp-vif1-07",9137,9906,31799,20260,19,30720],["rtp-vif1-08",9514,9906,31799,20456,18,34416],["rtp-vif1-04",9538,9906,31799,26170,18,38544],["rtp-vif1-03",9173,9906,31799,15821,17,22016],["rtp-vif1-02",2734,9906,31799,13218,12,22248],["rtp-vif1-05",4586,9906,31799,28496,23,45824]]],["bxb-vif1(3.0.1)",17,92,273,4,58,[["bxb-vif1-01",1716,18309,32599,17489,16,28124],["bxb-vif1-03",1675,18309,32599,19180,15,32700],["bxb-vif1-02",3382,18309,32599,22463,15,24880],["bxb-vif1-04",1397,18309,32599,18062,12,24496]]],["rtp-vif2(2.5.4)",56,62,141,106,180,[["rtp-vif2-10",5085,19836,64567,21069,17,38464],["rtp-vif2-11",15289,19836,64567,28338,21,39008],["rtp-vif2-05",6853,18310,31799,22150,11,34028],["rtp-vif2-04",12941,19836,31799,19029,14,33440],["rtp-vif2-02",11599,19836,64567,29295,15,44720],["rtp-vif2-09",4431,19836,64567,28582,17,41040],["rtp-vif2-01",9416,19836,64567,24787,16,37424],["rtp-vif2-08",4122,18310,31799,16257,13,22016],["rtp-vif2-03",4683,19836,31799,20543,12,40000],["rtp-vif2-07",8602,18310,31799,22412,14,31264],["rtp-vif2-12",6125,19836,64567,27664,18,41840],["rtp-vif2-06",11914,18310,31799,14607,12,27216]]],["rtp-vif1(3.0.1)",58,59,21,20,30,[["rtp-vif1-12",3285,9917,32599,11073,9,35840],["rtp-vif1-09",3215,9917,32599,11000,8,40448],["rtp-vif1-11",3886,9917,32599,18558,7,26624],["rtp-vif1-10",4305,9917,32599,9003,6,17408]]]]})');
var ds = new Ext.data.Store({
proxy: new Ext.data.MemoryProxy(this.farms.farms),
reader: new Ext.data.ArrayReader({id: 0}, [
{name: 'host'},
{name: 'cpupcnt'},
{name: 'mempcnt'},
{name: 'addl_vm_cpu'},
{name: 'addl_vm_mem'},
{name: 'vmcnt'},
{name: 'hostRef'}
]
)
}
);
ds.setDefaultSort('host', 'asc');
ds.load();
// the DefaultColumnModel expects this blob to define columns.
//It can be extended to provide custom or reusable ColumnModels.
var colModel = new Ext.grid.ColumnModel([
{header: "VM Farm", sortable: true, locked:false, dataIndex: 'host'},
{header: "CPU Usage", sortable: true, locked:false, dataIndex: 'cpupcnt'},
{header: "Mem Usage", sortable: true, locked:false, dataIndex: 'mempcnt'},
{header: "Additional VMs based on CPU", sortable: true, locked:false, dataIndex: 'addl_vm_cpu'},
{header: "Additional VMs based on Memory", sortable: true, locked:false, dataIndex: 'addl_vm_mem'},
{header: "VM Count", sortable: true, locked:false, dataIndex: 'vmcnt'}
]);
// create the Grid
this.farmGrid = new Ext.grid.Grid('farms', {
ds: ds,
cm: colModel,
autoSizeColumns: true,
autoSizeHeaders: true
});
this.farmGrid.getSelectionModel().singleSelect = true;
this.farmGrid.getSelectionModel().on("rowselect",
myFarmRowSelect,
this,
true);
this.farmGrid.render();
this.layout = new Ext.BorderLayout(YAHOO.util.Dom.get("container"),
{
// hideOnLayout:true,
center: {
split:true,
titlebar: true,
height: 200,
minSize: 25,
collapsible: true,
animate: true
},
south: {
split: true,
hideWhenEmpty: true,
height: 200,
minSize: 14,
titlebar: true,
collapsible: true,
animate: true
}
}
);
this.layout.beginUpdate();
this.layout.add('center', new Ext.GridPanel(this.farmGrid,
{title: 'VMware Farms',
fitFrame: true,
autoScroll: false,
closable:false
}
)
);
this.layout.endUpdate();
}
}
}();
Ext.onReady(ExternalContent.init, ExternalContent, true);
</script>
<div id="container" style="height:400px;position:relative;">
<div id="farms" class="ylayout-inactive-content">
</div>
<div id="myDetail">
</div>
</div>
</body>
</html>