var brdColor="#f6f6f6";if(strSkin=="Dark"){brdColor="#444";}Ext.define("componentDashboard.controller.SystemController",{extend:"Ext.app.Controller",requires:["componentDashboard.view.system.SystemTimeLine","componentDashboard.view.system.systemLowerPanel","componentDashboard.view.system.systemUpperPanel","componentDashboard.view.system.sysFullViewPanel","utilities.CustomGrid"],refs:[{ref:"systemlowerpanel",selector:"systemlowerpanel"},{ref:"compdashdetailsMaintab",selector:"compdashdetailsMaintab"},{ref:"systemupperpanel",selector:"systemupperpanel"},{ref:"systemtimeline",selector:"systemtimeline"},{ref:"sysfullviewpanel",selector:"sysfullviewpanel"}],init:function(){systemController=this;
this.control({"compdashdetailsMaintab":{"beforeshow":this.afterSystemPanelRendered},'systemupperpanel combo[id="systemsubsystem"]':{"select":this.selectSubSystem},"sysfullviewpanel":{"boxready":this.loadFullViewPanel}});},selectSubSystem:function(d){var a=this;var c=d.getValue();sysLastLoadedURL="";sysCurrentTabId="";
sysLastGraphTypeLoaded="";if(c!=undefined){if(c.toLowerCase()=="overview"){Ext.getCmp("systemOverviewpanel").show();Ext.getCmp("systemupperpanelId").setHeight(140);}else{Ext.getCmp("systemupperpanelId").setHeight(35);Ext.getCmp("systemOverviewpanel").hide();}var b=Ext.getCmp("systemsubsystem").getValue();
if(Ext.isEmpty(b)||b.length==0){b="Overview";}a.afterSystemPanelRendered(Ext.getCmp("compdashdetailsMaintab"));}},systemDefaultLoad:function(m){if(Ext.getCmp("systemupperpanelId")==null||Ext.getCmp("systemupperpanelId")==undefined){this.getCompdashdetailsMaintab().add({xtype:"systemupperpanel",id:"systemupperpanelId",},{xtype:"systemlowerpanel",id:"systemlowerpanelId",margin:"10 0 10 0",flex:1,});
}var h=Ext.getCmp("sys-fullviewId");if(h!=null){h.destroy();Ext.getCmp("systemupperpanelId").show();Ext.getCmp("systemlowerpanelId").show();}var c="default";k=this;Ext.getCmp("compdashdetailsMaintab").suspendEvents(true);var j=new Array();var k=this;if(m!=""&&m!=null&&!Ext.isEmpty(m)){var l=m["screenLabels"];
j["systemsubsystem"]=l["subsystemTitle"];k.loadScreenLabels(j);var e=m["subsystemCombo"];var n=m["selectedValues"];k.setValueWithOptionInList("systemsubsystem",e,n["subsystemSelected"]);var b=m["SUBSYSTEM"];if(b!=undefined){if(b.toLowerCase()=="overview"){Ext.getCmp("systemOverviewpanel").show();var f=m["OVERVIEW"];
k.showOverview(f);var o=m["TAB_URL"];var i=m["selectedGraphType"];if(i!=null&&i!=""&&i.toLowerCase()!="null"){if(i=="System_summaryGraph"||i=="System_trendGraph"){sysCurrentTabId="System_measureGraph";}else{sysCurrentTabId=i;}}else{i=Ext.getCmp("systabpanel").getActiveTab().getId();}k.showTabs(o);var g=m["INNER_TAB_URL"];
g=encodeURI(g);if(!Ext.isEmpty(sysCurrentTabId)){k.loadInnerTab(sysCurrentTabId,g,c);}else{k.loadInnerTab(i,g,c);}var d=Ext.getCmp(Ext.getCmp("systabpanel").getActiveTab().getId()).tabName;if(d.toLowerCase()=="history"&&isDisableTrendComputation==false){Ext.getCmp("sys-history-tool").show();Ext.getCmp("sys-calendar-tool").show();
Ext.getCmp("sys-history-tool").show();Ext.getCmp("sys-summary-tool").show();Ext.getCmp("sys-area-tool").show();}else{Ext.getCmp("sys-history-tool").hide();Ext.getCmp("sys-calendar-tool").hide();Ext.getCmp("sys-history-tool").hide();Ext.getCmp("sys-summary-tool").hide();Ext.getCmp("sys-area-tool").hide();
}}else{Ext.getCmp("systemOverviewpanel").hide();Ext.getCmp("systemupperpanelId").setHeight(35);var o=m["TAB_URL"];var i=m["selectedGraphType"];if(i!=null&&i!=""&&i.toLowerCase()!="null"){if(i=="System_summaryGraph"||i=="System_trendGraph"){sysCurrentTabId="System_measureGraph";}else{sysCurrentTabId=i;
}}else{i=Ext.getCmp("systabpanel").getActiveTab().getId();}k.showTabs(o);var g=m["INNER_TAB_URL"];g=encodeURI(g);if(!Ext.isEmpty(sysCurrentTabId)){k.loadInnerTab(sysCurrentTabId,g,c);}else{k.loadInnerTab(i,g,c);}var d=Ext.getCmp(Ext.getCmp("systabpanel").getActiveTab().getId()).tabName;if(d.toLowerCase()=="history"&&isDisableTrendComputation==false){Ext.getCmp("sys-history-tool").show();
Ext.getCmp("sys-calendar-tool").show();Ext.getCmp("sys-history-tool").show();Ext.getCmp("sys-summary-tool").show();Ext.getCmp("sys-area-tool").show();}else{Ext.getCmp("sys-history-tool").hide();Ext.getCmp("sys-calendar-tool").hide();Ext.getCmp("sys-history-tool").hide();Ext.getCmp("sys-summary-tool").hide();
Ext.getCmp("sys-area-tool").hide();}}}}Ext.getCmp("compdashdetailsMaintab").resumeEvents();var p=null;var a=document.getElementsByTagName("body")[0];if(!Ext.isEmpty(Ext.get(a))){p=new Ext.LoadMask(Ext.get(a),{msg:loadingLbl+"...",cls:"maskDash"});p.hide();}},afterSystemPanelRendered:function(e){h=this;
if(Ext.getCmp("systemupperpanelId")==null||Ext.getCmp("systemupperpanelId")==undefined){this.getCompdashdetailsMaintab().add({xtype:"systemupperpanel",id:"systemupperpanelId",},{xtype:"systemlowerpanel",id:"systemlowerpanelId",margin:"10 0 10 0",flex:1,});}if(Ext.getCmp("componentsDropDown")!=undefined&&Ext.getCmp("componentsDropDown")!=null){var f=Ext.getCmp("componentsDropDown").getValue();
if(!Ext.isEmpty(f)){componentType=f.substring(0,f.indexOf(":"));componentName=f.substring(f.indexOf(":")+1);}}Ext.getCmp("compdashdetailsMaintab").suspendEvents(true);var b=Ext.getCmp(e.getId());var d=Ext.getCmp(e.getId()).getEl();d.mask(loadingLbl+"...","maskCenter");var g=new Array();var h=this;var c=null;
if(Ext.getCmp("systemsubsystem")!=null&&Ext.getCmp("systemsubsystem")!=undefined){c=Ext.getCmp("systemsubsystem").getValue();}var i=componentType;if(Ext.isEmpty(c)||c.length==0){c="Overview";}sysLastLoadedURL="/final/monitor/egSysDashBoardJSON.jsp?tab=System&hostName="+encodeURIComponent(requestParams.hostName)+"&compType="+encodeURIComponent(componentType)+"&subsystem="+encodeURIComponent(c)+"&screenWidth=1012&screenHeight=570&host="+encodeURIComponent(requestParams.compname)+"&time_line=&starttime=&endtime=&starthr=&endhr=&format="+encodeURIComponent(dateFormatForTimeline);
if(sysLastGraphTypeLoaded!=null&&sysLastGraphTypeLoaded!=null&&!Ext.isEmpty(sysLastGraphTypeLoaded)&&sysLastGraphTypeLoaded!=undefined){if(sysLastLoadedURL.indexOf("graphType")>-1){sysLastLoadedURL=sysLastLoadedURL.replace(/(graphType=)[^\&]+/,"$1"+sysLastGraphTypeLoaded);}else{sysLastLoadedURL+="&graphType="+sysLastGraphTypeLoaded;
}}Ext.Ajax.request({url:sysLastLoadedURL,method:"POST",scope:this,success:function(k){if(k.status==200&&!Ext.isEmpty(k.responseText)){d.unmask();var m=k.responseText;var l=Ext.decode(m);h.systemDefaultLoad(l);}}});Ext.getCmp("compdashdetailsMaintab").resumeEvents();var j=null;var a=document.getElementsByTagName("body")[0];
if(!Ext.isEmpty(Ext.get(a))){j=new Ext.LoadMask(Ext.get(a),{msg:loadingLbl+"...",cls:"maskDash"});j.hide();}},SystemRefreshFunc:function(b){var a="refresh";var c=this;if(b!=""&&b!=null&&!Ext.isEmpty(b)){var d=Ext.getCmp("systemsubsystem").getValue();if(d.toLowerCase()=="overview"){Ext.getCmp("systemOverviewpanel").show();
var g=b["OVERVIEW"];c.showOverview(g);var f=Ext.getCmp(Ext.getCmp("systabpanel").getActiveTab().getId()).tabName;var e=b["INNER_TAB_URL"];e=encodeURI(e);c.loadInnerTab("System_"+sysLastGraphTypeLoaded,e,a);}else{Ext.getCmp("systemOverviewpanel").hide();Ext.getCmp("systemupperpanelId").setHeight(35);var f=Ext.getCmp(Ext.getCmp("systabpanel").getActiveTab().getId()).tabName;
var e=b["INNER_TAB_URL"];e=encodeURI(e);c.loadInnerTab("System_"+sysLastGraphTypeLoaded,e,a);}}},showOverview:function(C){var B=Ext.getCmp("systemCurrentAlerts");var j=Ext.getCmp("systemUptimeEvent");var H=C["SYSTEM_UPTIME"];var G=C["DATE_DIFF"];var x=C["alertTitle"];var v=new Array();var J=new Array();
var s=new Array();v.push({xtype:"container",id:"alertTitleId",padding:"0px 0px 0px 35%",html:'<div class="title"><b>'+x+"</b></div>"});if(G!=undefined&&G!="-"){J.push({xtype:"container",id:"sysUptimeDataId",flex:1,padding:"41px 10px 0px 10px",html:'<div class="title"><b>'+H+'</b></div><div style="text-align:center;" class="font_bold12">'+G+"</div>"});
}else{if(G=="-"){J.push({xtype:"container",id:"sysUptimeDataId",flex:1,padding:10,padding:"0px 10px 0px 10px",html:'<div class="title"><b>'+H+'</b></div><div style="text-align:center;"><div class="iconInformation" style="margin:11px auto 0px auto;"></div><div style="text-align:center;">'+noMeasureExcl+"</div></div>"});
}}var u=C["ALERTS"];if(u!=undefined){if(u=="-"){var M=C["NO_ALERTS"];v.push({xtype:"container",id:"noAletrsID",width:"100%",flex:1,padding:"12px 10px 0px 10px",html:'<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"><div class="iconNoalarms" style="margin:0px auto"></div><div style="text-align:center;">'+M+"</div></div></div>"});
if(G==undefined||G==" "){J.push({xtype:"container",id:"sysUptimeId",width:"100%",padding:10,flex:1,html:'<div class="title"><b>'+H+'</b></div><div style="text-align:center;"><div class="iconInformation" style="margin:11px auto 0px auto;"></div><div style="text-align:center;">'+noMeasureExcl+"</div></div>"});
}}else{var t=u["OPEN_ALERT_TITLE"];var i=u["OPEN_ALERTS"];var l=u["DISTRIBUTION_TITLE"];var q="";if(u["DISTRIBUTION_CRITICAL_VALUE"]!=undefined&&u["DISTRIBUTION_CRITICAL_VALUE"]>0){var K=u["DISTRIBUTION_CRITICAL_DESC"];var h="";if(u["DISTRIBUTION_CRITICAL_LINK"]!=undefined){var a=u["DISTRIBUTION_CRITICAL_LINK"];
var g=a["METHOD_NAME"];var c=a["PARAMS"];var w=c.split("|");var k='<div style="width:100%;text-align:center;" >'+u["DISTRIBUTION_CRITICAL_VALUE"]+"</div>";q+='<td><div class="bar12_high" style="width:100%;text-align:center;height:12px !important">'+k+"</div></td>";}else{q+='<td><div class="bar12_high" style="float:left;text-align:center;display:none;height:12px !important">'+u["DISTRIBUTION_CRITICAL_VALUE"]+"</div></td>";
}}if(u["DISTRIBUTION_MAJOR_VALUE"]!=undefined&&u["DISTRIBUTION_MAJOR_VALUE"]>0){var K=u["DISTRIBUTION_MAJOR_DESC"];var h="";if(u["DISTRIBUTION_MAJOR_LINK"]!=undefined){var a=u["DISTRIBUTION_MAJOR_LINK"];var g=a["METHOD_NAME"];var c=a["PARAMS"];var w=c.split("|");var k='<div style="text-align:center;" >'+u["DISTRIBUTION_MAJOR_VALUE"]+"</div>";
q+='<td><div class="bar12_intermediate" style="float:left;width:100%;text-align:center;height:12px !important">'+k+"</div></td>";}else{q+='<td><div class="bar12_intermediate" style="display:none;float:left;width:100%;text-align:center;height:12px !important">'+u["DISTRIBUTION_MAJOR_VALUE"]+"</div></td>";
}}if(u["DISTRIBUTION_MINOR_VALUE"]!=undefined&&u["DISTRIBUTION_MINOR_VALUE"]>0){var K=u["DISTRIBUTION_MINOR_DESC"];var h="";if(u["DISTRIBUTION_MINOR_LINK"]!=undefined){var a=u["DISTRIBUTION_MINOR_LINK"];var g=a["METHOD_NAME"];var c=a["PARAMS"];var w=c.split("|");var k='<div style=text-align:center;" >'+u["DISTRIBUTION_MINOR_VALUE"]+"</div>";
q+='<td><div class="bar12_low" style="width:100%;float:left;text-align:center;height: 12px !important">'+k+"</div></div></td>";}else{q+='<td><div class="bar12_low" style="display:none;float:left;text-align:center;height:12px !important">'+u["DISTRIBUTION_MINOR_VALUE"]+"</div></td>";}}q='<table width="100%"><tr>'+q+"</tr></table>";
v.push({xtype:"container",layout:{type:"vbox",align:"stretch"},width:"100%",flex:1,padding:10,items:[{xtype:"container",id:"openalertTitleId",width:"100%",padding:"15 0 0 0",flex:1,html:'<table width="100%" ><tr><td rowspan="2"><div class="summaryOpenProblems" style="top:25px;"></td><td width="90%"><div style="float:right;margin-right:5px;" class="font_no">'+i+'</div></td></tr><tr><td><div class="font_bold12" style="float: right;margin-right:5px;" id="system-openAlerts">'+t+'</div></td></tr><tr><td colspan="2"><div class="outer_round" style="margin-top: 5px;">'+q+"</div></td></tr></table>"}]});
}}if(Ext.getCmp("alertTitleId")!=null){Ext.getCmp("alertTitleId").update('<div class="title"><b>'+x+"</b></div>");if(u=="-"){if(Ext.getCmp("noAletrsID")!=null){Ext.getCmp("noAletrsID").update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"><div class="iconNoalarms" style="margin:0px auto"></div><div style="text-align:center;">'+M+"</div></div></div>");
}else{B.removeAll();B.add(v);B.doComponentLayout();}}else{if(Ext.getCmp("openalertTitleId")!=null){Ext.getCmp("openalertTitleId").update('<table width="100%" height="100%" style="margin-top:0px;"><tr><td rowspan="2"><div class="summaryOpenProblems" style="top:25px;"></td><td width="90%"><div style="float: right;margin-right:5px;" class="font_no">'+i+'</div></td></tr><tr><td><div class="font_bold12" style="float:right;margin-right:5px;" id="system-openAlerts">'+t+'</div></td></tr><tr><td colspan="2"><div class="outer_round" style="margin-top:5px;">'+q+"</div></td></tr></table>");
}else{B.removeAll();B.add(v);B.doComponentLayout();}}}else{B.removeAll();B.add(v);B.doComponentLayout();}if(Ext.getCmp("sysUptimeDataId")!=null||Ext.getCmp("sysUptimeId")!=null){if(G!=undefined&&G!="-"){if(Ext.getCmp("sysUptimeDataId")!=null){Ext.getCmp("sysUptimeDataId").update('<div class="title"><b>'+H+'</b></div><div style="text-align:center" class="font_bold12">'+G+"</div>");
}else{j.removeAll();j.add(J);j.doComponentLayout();}}else{if(G=="-"){J.push({xtype:"container",flex:1,id:"sysUptimeDataId",padding:10,html:'<div class="title"><b>'+H+'</b></div><div style="text-align:center;"><div class="iconInformation" style="margin:11px auto 0px auto;"></div><div style="text-align:center;">'+noMeasureExcl+"</div></div>"});
}else{if(Ext.getCmp("sysUptimeId")!=null){Ext.getCmp("sysUptimeId").update('<div class="title"><b>'+H+'</b></div><div style="text-align:center;"><div class="iconInformation" style="margin:5% auto 0px auto;"></div><div style="text-align:center;">No data Found</div></div>');}else{j.removeAll();j.add(J);
j.doComponentLayout();}}}}else{j.removeAll();j.add(J);j.doComponentLayout();}var F=C["EVENTS"];var d=C["eventUrl1"];var E=C["eventUrl2"];var f=C["eventUrl3"];var o=F["eventsTitle"];if(o==undefined&&F=="-"){o=C["eventsTitle"];}var e=Ext.getCmp("systemCurrentEvents");var b=new Array();b.push({xtype:"container",id:"eventsTitleId",width:"100%",html:'<div class="title"><b>'+o+"</b></div>"});
if(F!=undefined){if(F=="-"){var z=C["NO_EVENTS"];b.push({xtype:"container",id:"NO_EVENTS_Id",width:"100%",padding:"21 10 10 10",html:'<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"><div class="iconNoalarms" style="margin:0px auto"></div><div style="text-align:center;">'+z+"</div></div></div>"});
}else{var n="";var I=F["criticalEvtCount"];var y=F["majorEvtCount"];var D=F["minorEvtCount"];if(I!=undefined&&I>0){if(d!=undefined){var k="<div onclick=\"javascript:goToAlarmHistory('"+d+'\');" style="text-align:center;cursor:pointer" >'+I+"</div>";n+='<td><div class="bar12_high" style="text-align:center;color:#ffffff;height:12px !important">'+k+"</div></td>";
}else{n+='<td><div class="bar12_high" style="float:left;width:24px;text-align:center;display:none;height:12px !important">'+I+"</div></td>";}}if(y!=undefined&&y>0){if(E!=undefined){var k="<div onclick=\"javascript:goToAlarmHistory('"+E+'\');" style="text-align:center;cursor:pointer" >'+y+"</div>";n+='<td><div class="bar12_intermediate" style="text-align:center;color:#ffffff;height: 12px !important">'+k+"</div></td>";
}else{n+='<td><div class="bar12_intermediate" style="float:left;width:24px;text-align:center;display:none;height:12px !important">'+y+"</div></td>";}}if(D!=undefined&&D>0){if(f!=undefined){var k="<div onclick=\"javascript:goToAlarmHistory('"+f+'\');" style="text-align:center;cursor:pointer" >'+D+"</div>";
n+='<td><div class="bar12_low" style="text-align:center;color:#ffffff;height:12px !important">'+k+"</div></td>";}else{n+='<td><div class="bar12_low" style="float:left;width:24px;text-align:center;display:none;height:12px !important">'+D+"</div></td>";}}n='<table width="100%"><tr>'+n+"</tr></table>";var r=F["monitor.dashboard.Total Events"];
var N=F["TOTAL_EVENTS"];var m=F["monitor.dashboard.Avg Duration"];var A=F["AVG_DURATION"];var p=F["monitor.dashboard.Max Duration"];var L=F["MAX_DURATION"];b.push({xtype:"container",id:"currentEventsId",flex:1,layout:{type:"hbox",align:"middle",pack:"center"},padding:"10 10",width:"100%",defaults:{height:65,style:{"overflow":"visible"}},items:[{xtype:"container",flex:0.5,cls:"fancy_border",layout:{type:"vbox",align:"stretch"},items:[{xtype:"container",id:"distribEvtsHTMLId",padding:"15 0 0 0",margin:"0 10 0 0",html:'<table width="100%"  style="margin-bottom:3px;"><tr><td rowspan="2"><div class="totalEvents"></td><td width="90%"><div style="float:right;margin-right:5px;" class="font_no">'+N+'</div></td></tr><tr><td><div  class="font_bold12" style="float:right;margin-right:5px">'+r+'</div></td></tr><tr><td colspan="2"><div class="outer_round" style="margin-top:5px;">'+n+"</div></td></tr></table>"}]},{xtype:"container",cls:"fancy_border",layout:{type:"vbox",align:"stretch"},flex:0.25,items:[{xtype:"container",id:"avgDurationId",padding:"15 10 0 10",flex:1,style:{"text-align":"right","padding":"5 12px 5 12px"},html:'<div><div class="summaryAverageDuration" style="position:absolute;top:17px;"></div><div class="font_no">'+A+'</div><div class="font_bold">'+m+"</div></div>"}]},{xtype:"container",cls:"fancy_border last",layout:{type:"vbox",align:"stretch"},flex:0.25,items:[{xtype:"container",id:"maxDurationId",padding:"15 10 0 10",flex:1,style:{"text-align":"right","padding":"5 12px 5 12px"},html:'<div><div class="summaryMaximumDuration" style="position:absolute;top:16px"></div><div class="font_no">'+L+'</div><div class="font_bold">'+p+"</div></div>"}]}]});
}}if(Ext.getCmp("eventsTitleId")!=null){Ext.getCmp("eventsTitleId").update('<div class="title"><b>'+o+"</b></div>");if(F=="-"){if(Ext.getCmp("NO_EVENTS_Id")!=null){Ext.getCmp("NO_EVENTS_Id").update('<div class="iconNoalarms" style="margin:2% auto 0px auto"></div><div style="text-align:center;">'+z+"</div>");
}else{b.push({xtype:"container",id:"NO_EVENTS_Id",width:"100%",html:'<div class="iconNoalarms" style="margin:2% auto 0px auto"></div><div style="text-align:center;">'+z+"</div>"});e.removeAll();e.add(b);e.doComponentLayout();}}else{if(Ext.getCmp("distribEvtsHTMLId")!=null&&Ext.getCmp("avgDurationId")!=null&&Ext.getCmp("maxDurationId")!=null){Ext.getCmp("distribEvtsHTMLId").update('<table width="100%"  style="margin-bottom:3px;"><tr><td rowspan="2"><div class="totalEvents"></td><td width="90%"><div style="float:right;margin-right:5px;" class="font_no">'+N+'</div></td></tr><tr><td><div  class="font_bold12" style="float:right;margin-right:5px">'+r+'</div></td></tr><tr><td colspan="2"><div class="outer_round" style="margin-top:5px;">'+n+"</div></td></tr></table>");
Ext.getCmp("avgDurationId").update('<div><div class="summaryAverageDuration" style="position:absolute;top:17px;"></div><div class="font_no">'+A+'</div><div class="font_bold">'+m+"</div></div>");Ext.getCmp("maxDurationId").update('<div><div class="summaryMaximumDuration" style="position:absolute;top:16px;"></div><div class="font_no">'+L+'</div><div class="font_bold">'+p+"</div></div>");
}else{e.removeAll();e.add(b);e.doComponentLayout();}}}else{e.removeAll();e.add(b);e.doComponentLayout();}},setValueWithOptionInList:function(c,b,a){if(Ext.getCmp(c)!=null&&Ext.getCmp(c)!=undefined){if(!Ext.isEmpty(b)){Ext.getCmp(c).getStore().loadRawData(b);}Ext.getCmp(c).suspendEvents(false);if(!Ext.isEmpty(a)){Ext.getCmp(c).setValue(a);
}else{Ext.getCmp(c).setValue(b[0].valueField);}Ext.getCmp(c).resumeEvents();}},loadScreenLabels:function(a){for(var b in a){if(Ext.getCmp(b)!=undefined){Ext.getCmp(b).setFieldLabel(a[b]);}}},showTabs:function(h){var o="default";var f=Ext.getCmp("systemsubsystem").getValue();var t=this;var c=this.getSystemlowerpanel();
var k=c.getEl();k.mask(loadingLbl+"...","maskCenter");c.removeAll();var m="",e="";var p=new Array();Ext.Ajax.request({url:h,method:"GET",async:false,success:function(i){if(i.status==200&&!Ext.isEmpty(i.responseText)){k.unmask();m=i.responseText;e=Ext.decode(m);p=e["tabs"];}},failure:function(){alert("Failure...");
}});var b=new Array();if(!Ext.isEmpty(p)){for(var n=0;n<p.length;n++){var l=p[n];var a=l["TAB_NAME"];var q=l["TAB_MAPPING_NAME"];var j=l["METHOD_NAME"];var r=l["PARAMS"];var d=r.split("|");var s=l["TAB_ID"];var d=r.split("|");var g=e["TimelineWindow"];timelineVals["timeline"]=g[0]["selected"];timelineVals["starttime"]=g[1]["value"];
timelineVals["starthour"]=g[2]["selected"];timelineVals["endtime"]=g[3]["value"];timelineVals["endhour"]=g[4]["selected"];b.push({title:q,id:s,tabName:a,dataArray:l,xtype:"panel",layout:"vbox",listeners:{"beforeshow":function(){if(Ext.get("sys-configModApp")!=undefined){Ext.get("sys-configModApp").destroy();
}var v=this.dataArray;var x="";if(v["TAB_NAME"].toLowerCase()=="at-a-glance"){if(f.toLowerCase()=="overview"){x="/final/monitor/egDashboardOverviewJSON.jsp";x+="?"+"hostName="+encodeURIComponent(componentName)+"&compType="+encodeURIComponent(componentType)+"&tab=System";}t.loadInnerTab(v["TAB_ID"],x,o);
}else{if(v["TAB_NAME"].toLowerCase()=="details"||v["TAB_NAME"].toLowerCase()=="comparison"){var B=e["TimelineWindow"];var z=B[0]["selected"];var y=B[1]["value"];var A=B[2]["selected"];var i=B[3]["value"];var u=B[4]["selected"];x="/final/monitor/egDashboardHistoryJSON.jsp";var w=v["PARAMS"].split("|");
t.loadInnerTab(v["TAB_ID"],x+"?tab=System&hostName="+encodeURIComponent(componentName)+"&compType="+encodeURIComponent(componentType)+"&subsystem="+encodeURIComponent(Ext.getCmp("systemsubsystem").getValue())+"&graphType="+encodeURIComponent(w[2])+"&showGraph="+encodeURIComponent(w[2])+"&time_line=&starttime="+encodeURIComponent(y)+"&endtime="+encodeURIComponent(i)+"&starthr="+encodeURIComponent(A)+"&endhr="+encodeURIComponent(u)+"&format="+encodeURIComponent(dateFormatForTimeline)+"&host="+encodeURIComponent(componentName),o);
}else{if(v["TAB_NAME"].toLowerCase()=="history"){var B=e["TimelineWindow"];var z=B[0]["selected"];var y=B[1]["value"];var A=B[2]["selected"];var i=B[3]["value"];var u=B[4]["selected"];x="/final/monitor/egDashboardHistoryJSON.jsp";var w=v["PARAMS"].split("|");t.loadInnerTab(v["TAB_ID"],x+"?tab=System&hostName="+encodeURIComponent(componentName)+"&compType="+encodeURIComponent(componentType)+"&subsystem="+encodeURIComponent(Ext.getCmp("systemsubsystem").getValue())+"&graphType="+encodeURIComponent(w[2])+"&showGraph="+encodeURIComponent(w[2])+"&time_line=&starttime="+encodeURIComponent(y)+"&endtime="+encodeURIComponent(i)+"&starthr="+encodeURIComponent(A)+"&endhr="+encodeURIComponent(u)+"&format="+encodeURIComponent(dateFormatForTimeline)+"&host="+encodeURIComponent(componentName),o);
}}}}}});}}if(!Ext.isEmpty(b)){c.add({xtype:"scrolltabPanel",id:"systabpanel",dataArray:h,ui:"newTabPanelBasic",border:true,plain:false,frame:false,margin:"0 10 0 10",name:"systabpanel",flex:1,layout:{type:"fit",},defaults:{border:true,frame:false},activeTab:sysCurrentTabId,listeners:{render:function(){var i="";
this.items.each(function(u){u.tab.on("click",function(){i=u.id;sysCurrentTabId=i;if(u.tabName.toLowerCase()=="history"&&isDisableTrendComputation==false){Ext.getCmp("sys-history-tool").show();Ext.getCmp("sys-calendar-tool").show();Ext.getCmp("sys-history-tool").show();Ext.getCmp("sys-summary-tool").show();
Ext.getCmp("sys-area-tool").show();}else{Ext.getCmp("sys-history-tool").hide();Ext.getCmp("sys-calendar-tool").hide();Ext.getCmp("sys-history-tool").hide();Ext.getCmp("sys-summary-tool").hide();Ext.getCmp("sys-area-tool").hide();}});});this.tabBar.add({xtype:"tbfill",id:"sys-tab-seperator"},{xtype:"toolbar",width:27,hidden:true,layout:"hbox",ui:"footer",id:"sys-calendar-tool",cls:"iconBg",height:21,margin:"0 50 0 0",dock:"right",items:[{xtype:"button",iconCls:"iconCalendar",id:"sys-calendar-btn",hidden:true,handler:function(){Ext.get("sys-configModApp").animate({to:{"top":11},listeners:{afteranimate:function(){Ext.get("sys-configModApp").setStyle("left","");
}}}).show();},listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"Calendar"});},"click":function(){var u=Ext.get("sys-configModApp");if(Ext.isEmpty(u)){var v=new Ext.XTemplate('<div style="float:left;margin:4px 0px 0px 4px"><b>'+defSettingsLbl+'</b></div><div style="text-align:right;float:right;"><div class="iconClose3" id="sys-closeSettingsApp"></div></div>');
Ext.create("Ext.container.Container",{width:530,id:"sys-configModApp",cls:"configMode_popup",closeAction:"hide",padding:5,style:{"position":"absolute"},items:[{xtype:"container",cls:"configMode_popupArrow",style:{"top":"-14px","left":"400px"}},{xtype:"container",html:v.apply(),style:{"top":"0px","margin":"2px"}},{xtype:"systemtimeline",height:60}],renderTo:"systabpanel-body"});
}else{u.show();}Ext.getBody().on("click",function(){var w=Ext.get("sys-configModApp");if(w!=null&&w!=undefined){w.hide();}w.animate({duration:500,to:{y:-500}});},null,{delegate:"#sys-closeSettingsApp"});Ext.Ajax.request({url:h,method:"GET",async:false,success:function(w){if(w.status==200&&!Ext.isEmpty(w.responseText)){var F=w.responseText;
var M=Ext.decode(F);var E=M["TimelineWindow"];var z=E[0]["selected"];var B=E[1]["value"];var A=E[2]["selected"];var O=E[3]["value"];var N=E[4]["selected"];var I=Ext.getCmp("sys_er_timeline");I.getStore().loadRawData(E[0]["items"]);var G=I.getValue();var D=Ext.getCmp("sys_er_stdate");var H=Ext.getCmp("sys_er_enddate");
var K=Ext.getCmp("sys_er_sthr");var J=Ext.getCmp("sys_er_endhr");if(G!=null&&G!=""){I.setValue(G);var L=D.getValue();var x=H.getValue();var C=K.getValue();var y=J.getValue();D.setValue(L);H.setValue(x);K.setValue(C);J.setValue(y);}else{I.setValue(z);D.setValue(B);H.setValue(O);K.setValue(A);J.setValue(N);
}}}});},"afterrender":function(u){u.addListener("loadTime");Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"Calendar"});}}}]},{xtype:"toolbar",id:"sys-history-tool",hidden:true,ui:"footer",layout:"hbox",cls:"iconBg",height:21,dock:"right",items:[{xtype:"button",id:"sys-history-bar",iconCls:"iconLineChart",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:historyViewText});
}},handler:function(){t.callView("measureGraph");}},{xtype:"tbseparator",margin:"0 3 0 3"}]},{xtype:"toolbar",layout:"hbox",ui:"footer",cls:"iconBg",hidden:true,id:"sys-summary-tool",height:21,dock:"right",items:[{xtype:"button",iconCls:"iconBarChart",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:summaryViewText});
}},handler:function(){t.callView("summaryGraph");}},{xtype:"tbseparator",margin:"0 3 0 3"}]},{xtype:"toolbar",ui:"footer",hidden:true,id:"sys-area-tool",cls:"iconBg",height:21,margin:"0 0 0 0",dock:"right",items:[{xtype:"button",iconCls:"iconAreaChart",listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:trendViewText});
}},handler:function(){t.callView("trendGraph");}}]});},"click":function(){alert("I am clicking...");}},items:b});}c.show();},loadInnerTab:function(c,j,e){if(c=="System_trendGraph"||c=="System_summaryGraph"){c="System_measureGraph";}var b=Ext.getCmp("systemsubsystem").getValue();var k=this;var f=Ext.getCmp(c).getEl();
var h=Ext.getCmp(c);h.setAutoScroll(true);if(e=="default"){h.removeAll();}var a=0;if(!Ext.isEmpty(b)&&b.toLowerCase()!="overview"){}var g=h.dataArray;var i=g["TAB_NAME"];var d="",l="";if(!Ext.isEmpty(f)){f.mask(loadingLbl+"...","maskCenter");}Ext.Ajax.request({url:j+"&screenWidth="+(Ext.getBody().getViewSize().width)+"&screenHeight="+(Ext.getBody().getViewSize().height),method:"POST",success:function(m){if(m.status==200&&!Ext.isEmpty(m.responseText)){d=m.responseText;
f.unmask();l=Ext.decode(d);sysgraphUrl=l["hiddens"];if(i.toLowerCase()=="at-a-glance"){if(b.toLowerCase()=="overview"){k.showAtAGlance(c,l,e);}}else{if(i.toLowerCase()=="details"||i.toLowerCase()=="comparison"){k.showDetailsTab(c,l,e);}else{if(i.toLowerCase()=="history"){k.showHistoryTab(c,l,e);}}}}}});
},showDetailsTab:function(ab,Y,o){var r=0.333;var P=Ext.getCmp(ab);P.setAutoScroll(true);if(o=="default"){P.removeAll();P.add({xtype:"container",id:"sys_details-outer-panel",width:"100%",autoScroll:false,margin:"5 0 0 5",layout:{type:"column",},defaults:{columnWidth:r,height:250}});P.doComponentLayout();
}var w=0;var R=Ext.getCmp("systemsubsystem").getValue();if(!Ext.isEmpty(R)&&R.toLowerCase()!="overview"){}var f=new Array();var U=Ext.getCmp("sys_details-outer-panel");U.removeAll();var aj=Y["CHARTS"];var p=Y["DISK_SUMMARY"];var L=Y["DISK_HISTORY"];var ae=Y["DISK_ESX"];var M=Y["detailHopArr"];if(!Ext.isEmpty(aj)){if(aj["NO_CHARTS"]!=undefined&&aj["NO_CHARTS"]=="true"){if(R=="Overview"){var u=Ext.getBody().getViewSize().height-260;
}else{var u=Ext.getBody().getViewSize().height-150;}var J=aj["NO_CHARTS_MSG"];f.push({xtype:"container",height:u,width:"100%",border:true,frame:false,width:"100%",columnWidth:1,style:{"text-align":"center"},html:'<table width="100%" height="100%"><tr><td align="center"><div class="iconInformation"></div>'+J+" </td></tr></table>"});
}else{var G=new Array();for(var ag=0;ag<aj.length;ag++){var D=aj[ag];var c=aj[ag]["ddGraphUrlLarge"];var T=D["HEIGHT"];var ai=D["WIDTH"];f.push({xtype:"container",cls:"datapanel optionalListPanel",margin:"8 5 8 5",id:"sys_bar-container-"+ag,dataArray:D,max:c,chartCnt:ag,width:ai,height:parseInt(T),autoScroll:false,scroll:false,html:'<div id="sys-barChart'+ag+'" style="margin:5px 0px 5px 0px;cursor:pointer;width:'+ai+"px;height:"+T+'px"></div>',listeners:{"afterrender":function(){try{Ext.get("sys-barChart"+this.chartCnt).setHeight(T-3);
var am=Ext.get("sys-barChart"+this.chartCnt).getHeight();var i=Ext.get("sys-barChart"+this.chartCnt).getWidth();var an={};an=jQuery.extend(true,{},getHighChartsBarInstance("sys-barChart"+this.chartCnt,am,i),an);var j=this.dataArray["ddGraphUrlLarge"];an.setData(this.dataArray["XML_DATA"],currentDateFormat,j,"bar");
an.drawChart();}catch(ao){console.log(ao);}},"resize":function(){try{Ext.get("sys-barChart"+this.chartCnt).setHeight(T-3);var am=Ext.get("sys-barChart"+this.chartCnt).getHeight();var i=Ext.get("sys-barChart"+this.chartCnt).getWidth();var an={};an=jQuery.extend(true,{},getHighChartsBarInstance("sys-barChart"+this.chartCnt,am,i),an);
var j=this.dataArray["ddGraphUrlLarge"];an.setData(this.dataArray["XML_DATA"],currentDateFormat,j,"bar");an.drawChart();}catch(ao){console.log(ao);}}}});}}}var O=new Array();if(!Ext.isEmpty(M)){var Z=M[0];var K=Z["TABLETITLE"];var al=Z["TYPE"];var y=Z["Msg"];if(y!="true"){var q={xtype:"container",width:"100%",html:"<div>"+K+'<table border="1"><tr><th>'+Z["COLUMN_0"]+"</th><th>"+Z["COLUMN_1"]+"</th><th>"+Z["COLUMN_2"]+"</th><th>"+Z["COLUMN_3"]+"</th><th>"+Z["COLUMN_4"]+'</th></tr><tr><td align="center">'+Z["COLUMN_0_val"]+'</td><td align="center">'+Z["COLUMN_1_val"]+'</td><td align="center">'+Z["COLUMN_2_val"]+'</td><td align="center">'+Z["COLUMN_3_val"]+'</td><td style="width:300px;padding:0px; height:24px" align="center"><table  cellpadding="1" cellpadding="0" border="0"  style="table-layout:fixed;width:150px;height:20px" class="hop"><tr><td align="center">'+Z["COLUMN_4_val_0"]+'</td><td align="center">'+Z["COLUMN_4_val_1"]+'</td><td align="center">'+Z["COLUMN_4_val_2"]+"</td></tr>	</table></td>			</table></div>"};
}U.add(q);}if(!Ext.isEmpty(p)){var K=p["TITLE"];var A=p["SUMMARY"];var S=p["NO_CHARTS_MSG"];var z=p["COULUMN_NAME"];var X=p["COULUMN_VALUE"];var J=S;var m=" ";if(S!=undefined){m='<div style="height:100%;width:100%;display:table;border:0px solid green"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconInformation" style="margin:0px auto"></div><div style="text-align:center">'+J+"</div></div></div>";
f.push({xtype:"commonPanel",frame:false,layout:"anchor",height:Ext.getBody().getViewSize().height-145,columnWidth:1,padding:"0px 0px 0px 0px",margin:"8 5 10 5",id:"Sys-configS-"+ag,html:m});}else{var l=z["COLUMNNAM_0"];var af=z["COLUMNNAM_1"];var I=z["COLUMNNAM_2"];var x=z["COLUMNNAM_3"];m='<div class="x-table" style="height:100%;overflow:auto;padding:10px;"><table cellspacing="0" cellpadding="0" border="0" class="x-grid-table x-grid-table-resizer" width="100%"><thead>';
m+='<tr class="x-grid-row">';m+='<td class="x-grid-cell x-grid-cell-first" width="800px"><div class="x-grid-cell-inner"  style="text-align:left">'+l+"</div></td>";m+='<td class="x-grid-cell"><div class="x-grid-cell-inner" style="text-align:center">'+af+"</div></td>";m+='<td class="x-grid-cell"><div class="x-grid-cell-inner"  style="text-align:center">'+I+"</div></td>";
m+='<td class="x-grid-cell"><div class="x-grid-cell-inner"  style="text-align:center">'+x+"</div></td>";m+="</tr></thead>";for(var ad=0;ad<X.length;ad++){var N=X[ad]["COLUMN_0"];var C=X[ad]["COLUMN_1"];var g=X[ad]["COLUMN_2"];var ac=X[ad]["COLUMN_3"];var e="1px";if(strSkin=="Dark"){e="0px";}m+='<tbody style="border: '+e+' solid #D9D9D9 !important;"><tr class="x-grid-row">';
var B="";B+='<td class="x-grid-cell" ><div class="x-grid-cell-inner"  style="text-align:left">'+N+"</div></td>";B+='<td class="x-grid-cell"><div class="x-grid-cell-inner"  style="text-align:center">'+C+"</div></td>";B+='<td class="x-grid-cell"><div class="x-grid-cell-inner"  style="text-align:center">'+g+"</div></td>";
B+='<td class="x-grid-cell"><div class="x-grid-cell-inner"  style="text-align:center">'+ac+"</div></td>";m+=B+"</tr>";}m+="</tbody></table></div>";f.push({xtype:"commonPanel",cls:"datapanel",frame:false,scroll:false,autoScroll:false,height:"auto",layout:"anchor",columnWidth:1,padding:"0px 0px 0px 0px",title:K,margin:"8 5 10 5",id:"Sys-configS-"+ag,html:m});
}}if(!Ext.isEmpty(L)){var m="";for(var ag=0;ag<L.length;ag++){var S=L[ag]["NO_CHARTS_MSG"];var K=L[ag]["TITLE"];var aa=L[ag];var s=L[ag]["HISTORY"];var W=L[ag]["IMAGE_URL"];var ai=L[ag]["WIDTH"];var J=S;}f.push({xtype:"panel",cls:"datapanel",height:330,columnWidth:1,padding:"0px 0px 0px 0px",margin:"0 5 10 5",title:K,items:[{xtype:"panel",margin:10,id:"sys-config1-"+ag,height:330,padding:"0px 0px 0px 0px",listeners:{"afterrender":function(){if(W!=null&&W!=""&&!Ext.isEmpty(W)){Ext.Ajax.request({url:W,method:"post",success:function(j){if(j.status==200&&!Ext.isEmpty(j.responseText)){var ao=j.responseText;
if(ao.indexOf("png")==-1&&ao.indexOf("PNG")==-1&&ao.indexOf("gif")==-1&&ao.indexOf("GIF")==-1){var am=Ext.decode(ao);try{var i={};i=jQuery.extend(true,{},getHighCharts("sys-config1-"+ag,260,1150,""),i);i.setData(am,currentDateFormat,"",false,"right");i.drawChart();}catch(an){console.log("e::"+an);}}}else{m='<div class="x-table"><table cellspacing="0" cellpadding="0" border="0" class="x-grid-table x-grid-table-resizer" width="100%"><tbody>'+'<tr class="x-grid-row"><td width="100%" height="170px" valign="middle" align="center"><div class="iconInformation" width="100%" style="text-align:center;"></div><div>'+J+"</div></td></tr></tbody></table></div>";
Ext.get("sys-config1-"+ag).update(m);}}});}}}}]});}if(!Ext.isEmpty(ae)){var K=ae["TITLE"];var k=ae["FULLVIEW_URL"];var S=ae["NO_CHARTS_MSG"];var ak=ae["NO_CHARTS"];var z=ae["Disk_ESX_COLUMNNAME"];var X=ae["Disk_ESX_COLUMNVAL"];var J=S;var m=" ";if(S!=undefined){m='<div class="x-table"><table cellspacing="0" cellpadding="0" border="0" class="x-grid-table x-grid-table-resizer" width="100%"><tbody>'+'<tr class="x-grid-row"><td width="100%" height="170px" valign="middle" align="center"><div class="iconInformation" width="100%" style="text-align:center;"></div><div>'+J+"</div></td></tr></tbody></table></div>";
}else{var l=z["COLUMNNAM_0"];var af=z["COLUMNNAM_1"];var I=z["COLUMNNAM_2"];var x=z["COLUMNNAM_3"];var d=z["COLUMNNAM_3"];var V=z["COLUMNNAM_3"];m='<div class="x-table"><table cellspacing="0" cellpadding="0" border="0" class="x-grid-table x-grid-table-resizer" width="100%"><thead>';m+='<tr class="x-grid-row">';
for(var ad=0;ad<z.length;ad++){var F=z[ad]["COLUMNNAM_0"];var t=z[ad]["COLUMNNAM_1"];var a=z[ad]["COLUMNNAM_2"];var Q=z[ad]["COLUMNNAM_3"];var E=z[ad]["COLUMNNAM_4"];var n=z[ad]["COLUMNNAM_5"];var ah=z[ad]["COLUMNNAM_6"];var B="";B+='<td class="x-grid-cell x-grid-cell-first" ><div class="x-grid-cell-inner">'+F+"</div></td>";
B+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+t+"</div></td>";B+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+a+"</div></td>";B+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+Q+"</div></td>";B+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+E+"</div></td>";
B+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+n+"</div></td>";B+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+ah+"</div></td>";m+=B+"</tr>";m+="</thead>";}for(var ad=0;ad<X.length;ad++){var N=X[ad]["COLUMN_0"];var h=X[ad]["COLUMN_0_STATE"];var C=X[ad]["COLUMN_1"];var g=X[ad]["COLUMN_2"];
var ac=X[ad]["COLUMN_3"];var H=X[ad]["COLUMN_4"];var v=X[ad]["COLUMN_5"];var b=X[ad]["COLUMN_6"];m+='<tbody><tr class="x-grid-row">';var B="";B+='<td class="x-grid-cell x-grid-cell-first" ><div class="x-grid-cell-inner"><span class="state_'+h+'"  style="width: 20px;float:left;position:relative;top: 1.5px;"></span>'+N+"</div></td>";
B+='<td class="x-grid-cell"><div class="x-grid-cell-inner"><img class='+C+' src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="/></div></td>';B+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+g+"</div></td>";B+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+ac+"</div></td>";
B+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+H+"</div></td>";B+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+v+"</div></td>";B+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+b+"</div></td>";m+=B+"</tr>";}m+="</tbody></table></div>";}f.push({xtype:"commonPanel",cls:"block1",frame:false,height:250,columnWidth:1,padding:"0px 0px 0px 0px",title:K,header:{style:{"border-bottom":"1px solid "+brdColor+" !important"}},id:"Sys-configS-"+ag,html:m});
}U.add(f);U.doLayout();sysLastGraphTypeLoaded="DDgraph";},showAtAGlance:function(A,aJ,aQ){var aV=Ext.getCmp(A);aV.setAutoScroll(true);var ay=new Array();if(aQ=="default"){aV.removeAll();aV.add({xtype:"panel",id:"sysHealthDialPanel",cls:"block1",width:"100%",margin:"10 5 5 10",padding:"0 0 0 0",layout:"hbox"});
aV.add({xtype:"panel",id:"sysDigitalPanel",cls:"block1",width:"100%",margin:"5 5 5 10",padding:"8 0 8 0",layout:"hbox",});aV.add({xtype:"panel",id:"sysConfigPanel",margin:"0 0 10 0",width:"100%",frame:false,layout:{type:"column",align:"stretch"},defaults:{margin:"5 5 5 10",columnWidth:0.5,cls:"block1",}});
aV.doComponentLayout();}var c=Ext.getCmp("sysHealthDialPanel");var aE=Ext.getCmp("sysDigitalPanel");var ah=Ext.getCmp("sysConfigPanel");aE.removeAll();ah.removeAll();if(!Ext.isEmpty(aJ)){ay=new Array();var z=aJ["HEALTH"];if(!Ext.isEmpty(z)){var o=new Array();var e=z["TITLE"];var ap=z["XML_DATA"];var ad=z["SWF_PATH"];
var J=Math.round(z["HEIGHT"]);var a3=Math.round(z["WIDTH"]);if(ap=="-"){var b=z["MSG"];o.push({xtype:"container",cls:"componentnetworkseperator",padding:0,margin:"8 0 8 0",layout:{type:"vbox",align:"stretch"},items:[{xtype:"label",id:"healthTitleLabel",align:"center",html:'<div class="font_bold12"  style="text-align:center">'+e+"</div>"},{xtype:"container",id:"HealthData",height:200,width:a3,html:'<table width="100%" height="100%" style="text-align:center"><tr><td><div class="iconInformation" style="margin:0px auto"></div><div>'+b+"</div></td></tr></table>"}]});
}else{o.push({xtype:"container",cls:"componentnetworkseperator",height:205,margin:"8 0 8 0",width:262,items:[{xtype:"container",id:"healthTitleLbl",margin:"0 0 0 0",align:"center",style:{"position":"relative","z-index":"9999"},html:'<div style="text-align:center;" class="font_bold">'+e+"</div>"},{xtype:"container",height:J,id:"sys-tmpChartq",width:"100%",html:'<div id="sysHealthChart" style="margin-top:25px"></div>'}]});
}c.removeAll();c.add(o);c.doComponentLayout();if(ap!="-"){try{var r={};r=jQuery.extend(true,{},getHighChartsBarInstance("sysHealthChart",145,225),r);r.setData(ap,currentDateFormat,"","pie");r.drawChart();}catch(aW){console.log(aW);}}}var t=aJ["DIAL"];layerModelURL=aJ["hiddens"];if(!Ext.isEmpty(t)&&t!="-"){ay.splice(0,ay.length);
for(var ae=0;ae<t.length;ae++){var w=t[ae]["TITLE"];var a4=t[ae]["TOOL_TIP_TITLE"];var E=t[ae]["Dial_Fullview"];var aI=t[ae]["METHOD_NAME"];var aN=t[ae]["PARAMS"];var J=Math.round(t[ae]["HEIGHT"]);var a3=Math.round(t[ae]["WIDTH"]);var ap=t[ae]["XML_DATA"];var ad=t[ae]["SWF_PATH"];var aA=t[ae]["subTitle_Dial"];
var at=t[ae]["DialPARAMS"];var G=ap["layerModelUrl"];var az=parseInt(J)-35;if(E!=""&&E=="true"&&E!=undefined){var U="iconMaximize";}else{var U="";}if(aA==undefined||aA==""){aA=" ";}ay.push({xtype:"container",flex:0.2,cls:"componentnetworkseperator",height:205,margin:"8 0 8 0",layout:{type:"vbox",width:a3,align:"stretch"},items:[{xtype:"container",margin:"0 0 0 0",style:{"text-align":"center"},align:"center",html:'<div style="text-align:center;" title="'+a4+'" class="font_bold"><span >'+w+"</span><span class="+U+' style="float:right;cursor:pointer;margin-right: 10px;" onclick="javascript:'+aI+"('"+aN+"');\"></span></div>"},{xtype:"label",padding:"0 0 0 0",height:15,html:'<div style="text-align:center;cursor:pointer;margin-top:5px;height:15px;overflow: hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;padding:0px 4px" data-qtip="'+aA+'" onclick="javascript:wayToLayerModel(\''+G+'\');" class="font_text"><b>'+aA+"</b></div>"},{xtype:"container",id:"sysDialChartCont-"+ae,dataArray:t[ae],align:"center",html:'<div id="sysDialchart'+ae+'" style="margin:25px auto;width:'+a3+"px;height:"+az+'px;"></div>'}]});
}var aC=new Array();aC.push({xtype:"container",id:"sysDialpanel",flex:1,layout:{type:"hbox",padding:"0px 0px 0px 0px",align:"stretch"},dialData:t,items:ay,listeners:{"afterrender":function(k){for(var l=0;l<this.dialData.length;l++){var a6=Ext.getCmp("sysDialChartCont-"+l);var a7=a6.dataArray;var a5=a7["XML_DATA"];
var j=t[l]["SWF_PATH"];if(a5!="-"){getHighChartsGuage("sysDialchart"+l,a5);}else{Ext.get("sysDialchart"+l).update('<div style="border:0px solid blue;margin:0px auto"><div class="iconInformation" width="100%" style="text-align:center;margin:0px auto;margin-top: 30px;"></div><div style="text-align:center;margin:0px auto;">'+noMeasureExcl+"</div></div>");
}}}}});c.add(aC);c.doComponentLayout();}else{c.add({xtype:"container",width:"100%",id:"sysDialpanel",margin:"0 10 0 10",padding:"0 0 8 0",height:207,flex:0.25,layout:{type:"hbox",align:"stretch"}});}c.doComponentLayout();var L=aJ["hopObj"];if(!Ext.isEmpty(L)){var m=L["WIDTH"];var aM=L["HEIGHT"];var af=L["TITLE"];
var am=new Array();ay.splice(0,ay.length);var T=L["NoMess"];if(T=="true"){var ab=L["HopMsg"];var aq=["HopMsg"];am.push({xtype:"container",id:"hopDelay",cls:"fancy_border",height:aM,width:m,html:'<div class="title"><b>'+af+'</b></div><div style="border:0px solid blue;text-align:center;"><div class="iconInformation"></div></div><div style="border:0px solid green;text-align:center;">'+ab+"</div>"});
}else{am.push({xtype:"container",id:"hopDelayCon",height:aM,width:m,html:'<div class="title"><b>'+af+'</b><table cellspacing="0" cellpadding="2px" border="0"><tr><td class="eg_75bold tdborder2_jvm" align="center">'+L["COLUMN_0"]+'</td><td class="eg_75bold tdborder2_jvm" align="center">'+L["COLUMN_1"]+'</td></tr><tr><td class="tdborder_jvm" >'+L["COLUMN_0_val"]+'</td><td class="tdborder_jvm" style="width:300px;padding:0px; height:24px" align="center" ><table cellpadding="1" cellpadding="0" border="0" style="table-layout:fixed;width:150px;height:20px" class="hop"><tr><td align="center"> '+L["COLUMN_1_val_0"]+' </td><td align="center">'+L["COLUMN_1_val_1"]+'</td><td align="center">'+L["COLUMN_1_val_2"]+"</td>	</tr></table></td></tr></table></div>"});
}if(Ext.getCmp("hopDelay")!=null){Ext.getCmp("hopDelay").update('<div class="title"><b>'+af+'</b></div><div style="border:0px solid blue;text-align:center;"><div class="iconInformation"></div></div><div style="border:0px solid green;text-align:center;">'+ab+"</div>");}else{if(Ext.getCmp("hopDelayCon")!=null){Ext.getCmp("hopDelayCon").update('<div class="title"><b>'+af+'</b><table cellspacing="0" cellpadding="2px" border="0"><tr><td class="eg_75bold tdborder2_jvm" align="center">'+L["COLUMN_0"]+'</td><td class="eg_75bold tdborder2_jvm" align="center">'+L["COLUMN_1"]+'</td></tr><tr><td class="tdborder_jvm" >'+L["COLUMN_0_val"]+'</td><td class="tdborder_jvm" style="width:300px;padding:0px; height:24px" align="center" ><table cellpadding="1" cellpadding="0" border="0" style="table-layout:fixed;width:150px;height:20px" class="hop"><tr><td align="center"> '+L["COLUMN_1_val_0"]+' </td><td align="center">'+L["COLUMN_1_val_1"]+'</td><td align="center">'+L["COLUMN_1_val_2"]+"</td>	</tr></table></td></tr></table></div>");
}else{c.add(am);}}}var aB=aJ["DIGITAL"];if(!Ext.isEmpty(aB)){ay.splice(0,ay.length);for(var ae=0;ae<aB.length;ae++){var aK=aB[ae]["IMG_HEADING"];var I=aB[ae]["IMG_SRC"];var x=aB[ae]["HEIGHT"];var aF=aB[ae]["WIDTH"];var aZ=aB[ae]["UNIT"];var aU=Math.round(aB[ae]["CONTAINER_WIDTH"]);if(I!="-"){ay.push({xtype:"container",padding:"0 0 5 0",flex:1,id:"digitalContainer"+ae,cls:"componentnetworkseperator",width:aU,margin:"10 0 0 0",layout:{type:"vbox",align:"stretch"},items:[{xtype:"label",padding:"0 0 0 0",html:'<div style="text-align:center;" class="font_bold">'+aK+"</div>"},{xtype:"container",id:"Sys_digitalChartId"+ae,width:"100%",height:30,style:{"text-align":"center"},padding:"3px 0px 0px 0px",dataArray:aB[ae],listeners:{"afterrender":function(j){var k=this.dataArray;
var a9=k["IMG_SRC"];var a7=k["HEIGHT"];var a6=k["WIDTH"];var a5=k["IMG_TITLE"];var a8=k["METHOD_NAME"];var l=k["PARAMS"];var i='<img style="vertical-align:middle;cursor:pointer" src="'+a9+'" title="'+a5+'" style="cursor:pointer" onclick="javascript:'+a8+"('"+l+"');\"/>";a7=Math.round(a7);this.setHeight(a7);
this.update(i);}}},{xtype:"label",html:'<div style="text-align:center;font-size:11px;">'+aZ+"</div>"}]});}else{ay.push({xtype:"container",flex:1,id:"digitalContainer"+ae,cls:"componentnetworkseperator",width:aU,height:80,layout:{type:"vbox",align:"stretch"},items:[{xtype:"label",padding:"5 0 5 0",html:'<div style="text-align:center;" class="font_bold">'+aK+"</div>"},{xtype:"container",id:"Sys_digitalChartId"+ae,width:"100%",style:{"text-align":"center"},padding:"0px 0px 0px 0px",listeners:{"afterrender":function(j){var i=this.id;
Ext.get(j.id).update('<div style="border:0px solid blue;margin:0px auto"><div class="iconInformation" width="100%" style="text-align:center;margin:0px auto;margin-top: 0px;"></div><div style="text-align:center;margin:0px auto;">'+noMeasureExcl+"</div></div>");}}}]});}}}if((t==undefined||Ext.isEmpty(t))&&(aB==undefined||Ext.isEmpty(aB))){var aP=aJ["SYS_TAB_NoGraphTitle"];
var p=aJ["DIAL_DIGITAL_MSG"];var ax=testExcludedorDisabledMsg;if(p==undefined||Ext.isEmpty(p)){ax=noMeasure;}Ext.getCmp("sysDialpanel").flex=1;Ext.getCmp("sysDialpanel").removeAll();var y={xtype:"container",height:200,margin:"1px 0px 0px 0",width:"100%",html:'<div class="noGraphTitle" style="padding-top:5px;">'+aP+'</div><table width="100%" height="100%" style="text-align:center"><tr><td><div class="iconInformation" style="margin:0px auto"></div><div>'+ax+"</div></td></tr></table>"};
var v=Ext.getCmp("sysDialpanel");v.removeAll();v.add(y);v.doComponentLayout();aE.hide();}else{if(Ext.isEmpty(t)){var aP=aJ["SYS_TAB_NoGraphTitle"];var aj=aJ["DIAL_MSG"];var ax=testExcludedorDisabledMsg;if(aj==undefined||Ext.isEmpty(aj)){ax=noMeasure;}Ext.getCmp("sysDialpanel").flex=1;Ext.getCmp("sysDialpanel").removeAll();
var y={xtype:"container",margin:"1px 0px 0px 0",width:"100%",html:'<div class="noGraphTitle" style="padding-top:15px;">'+aP+'</div><table width="100%" height="94%" style="text-align:center"><tr><td><div class="iconInformation" style="margin:0px auto"></div><div>'+ax+"</div></td></tr></table>"};var v=Ext.getCmp("sysDialpanel");
v.removeAll();v.add(y);v.doComponentLayout();}else{if(Ext.isEmpty(aB)){aE.hide();}}}aE.add(ay);aE.doComponentLayout();}var aX=aJ["CONFIG_DATAS"];if(!Ext.isEmpty(aX)){ay.splice(0,ay.length);var Y=0;for(var ae=0;ae<aX.length;ae++){var aS=aX[ae];var aG=aS["TITLE"];var al=aS["TYPE"];al=al.toLowerCase();var av=aS["ADMIN_PERMISSION"];
var u=new Array();if(al=="table"){var a0=aS["CONFIGURATION"];var f="";if(a0!="-"){f='<div class="x-table"><table cellspacing="0" width="100%" cellpadding="0" border="0" class="x-grid-table x-grid-table-resizer"><tbody>';for(var ac=0;ac<a0.length;ac++){var h="";if(a0[ac]["TITLE"]!=undefined){f+='<tr class="x-grid-row"><td colspan="2" class=" x-grid-cell x-grid-cell-first"><div class="x-grid-cell-inner">'+a0[ac]["TITLE"]+"</div></td></tr>";
}else{var a2="",a1="";if(a0[ac]["VALUE_1"]!=undefined){a2=a0[ac]["VALUE_1"];}if(a0[ac]["VALUE_2"]!=undefined){a1=a0[ac]["VALUE_2"];}f+='<tr class="x-grid-row"><td class=" x-grid-cell x-grid-cell-first"><div class="x-grid-cell-inner">'+a2+'</div></td><td class=" x-grid-cell x-grid-cell-first"><div class="x-grid-cell-inner">'+a1+"</div></td></tr>";
}}f+="</tbody></table></div>";}else{var S=aS["MSG"];f='<table width="100%" height="150px" style="text-align:center"><tr><td><div class="iconInformation" style="margin:0px auto 0px auto"></div><div>'+S+"</div></td></tr></table>";}ay.push({xtype:"panel",cls:"block1",height:200,frame:false,padding:0,scroll:true,autoScroll:true,title:aG,id:"sysConfig-"+ae,tools:u,html:f});
}else{if(al=="spark"){var a0=aS["CONFIGURATION"];var f="";if(a0!="-"){f='<div class="x-table"><table cellspacing="0" cellpadding="0" border="0" class="x-grid-table x-grid-table-resizer" width="100%"><tbody>';for(var ac=0;ac<a0.length;ac++){var M=a0[ac];f+='<tr class="x-grid-row" height="20px">';var aD="";
for(var n in M){var ar=M[n];if(n.toLowerCase()=="state"){aD+='<td class="x-grid-cell x-grid-cell-first" width="27"><div class="x-grid-cell-inner"><img src="/final/images/clear.png" class="state_'+ar+'" style="vertical-align:middle;display:inline-block"/></div></td>';}else{if(n.toLowerCase()=="link"){var aT=ar;
var N=aT["MEASURE"];var aY=aT["STATE"];if(aY!=undefined){aD+='<td class="x-grid-cell" width="27px" ><div class="x-grid-cell-inner" ><div class="state_'+aY+'"></div></div></td>';}if(aT["METHOD_NAME"]!=undefined&&aT["PARAMS"]!=undefined){var aI=aT["METHOD_NAME"];var aN=aT["PARAMS"];aD+='<td class="x-grid-cell x-grid-cell-first"><div class="x-grid-cell-inner"><a href="javascript:void(0);" onclick="javascript:'+aI+"('"+aN+'\');" title="'+N+'">'+N+"</a></div></td>";
}else{aD+='<td class="x-grid-cell x-grid-cell-first"><div class="x-grid-cell-inner">'+N+"</div></td>";}}else{if(n.toLowerCase()=="xml_data"){var ap=ar;if(ap!="-"){aD+='<td class="x-grid-cell x-grid-cell-first" width="70px"><div class="x-grid-cell-inner"><div id="system-chartSparkContainer'+Y+'" style="border:0px solid red;height:20px;cursor:pointer"></div></div></td>';
}else{aD+='<td class="x-grid-cell x-grid-cell-first" width="70px"><div class="x-grid-cell-inner"><div id="system-chartSparkContainer'+Y+'" style="border:0px solid red;height:20px;">'+ap+"</div></div></td>";}Y++;}else{if(n.toLowerCase()=="value"){if(ar!=undefined&&ar>0&&ar!=""&&!isNaN(ar)){aD+='<td class="x-grid-cell x-grid-cell-first" width="70px"><div class="x-grid-cell-inner">'+Number(ar).toFixed(2)+"</div></td>";
}else{aD+='<td class="x-grid-cell x-grid-cell-first" width="70px"><div class="x-grid-cell-inner">'+ar+"</div></td>";}}}}}}f+=aD+"</tr>";}f+="</tbody></table></div>";}else{var S=aS["MSG"];f='<table width="100%" height="150px" style="text-align:center"><tr><td><div class="iconInformation" style="margin:0px auto 0px auto"></div><div>'+S+"</div></td></tr></table>";
}ay.push({xtype:"panel",frame:true,autoScroll:true,padding:0,height:200,title:aG,dataArray:a0,id:"sysConfig-"+ae,tools:u,html:f});}else{if(al=="grid"){var q="";var ao=0.5;if(aS["COLUMN_WIDTH"]!=undefined){ao=aS["COLUMN_WIDTH"];}if(aS["GRID_COLUMNS"]!=undefined&&aS["GRID_VALUES"]!=undefined){var Q=aS["GRID_COLUMNS"];
var K=aS["GRID_VALUES"];var O=new Array();var D=new Array();if(!Ext.isEmpty(Q)){for(var Z=0;Z<Q.length;Z++){if(Z==0){D.push({name:"COLUMN_"+Z,type:"FLOATORSTRING"});D.push({name:"COLUMN_"+Z+"_STATE",type:"FLOATORSTRING"});}else{D.push({name:"COLUMN_"+Z,type:"FLOATORSTRING"});}O.push({header:Q[Z],flex:0.2,dataIndex:"COLUMN_"+Z,renderer:function(a7,k,a5,a9,l,a8,i){if(l==0){var j=i.getHeaderAtIndex(l);
var a6=a5.get(j.dataIndex+"_STATE");if(!Ext.isEmpty(a6)){a7='<div style="position:relative;"><span class="state_'+a6+'" style="width: 16px;display:inline-block;float:left;position:relative;top: 1.5px;"></span><span style="margin-left:9px;">'+a7+"</span></div>";}}return a7;}});}}q={xtype:"customgrid",width:"100%",height:174,cls:"gridSkin",autoScroll:false,scroll:true,store:new Ext.data.Store({fields:D,data:K}),columns:O};
}else{var S=aS["MSG"];q={xtype:"container",width:"100%",height:200,html:'<div style="text-align:center;margin:8% auto 0px auto"><div class="iconInformation" style="margin:0px auto" ></div><div>'+S+"</div></div>"};}if(q!=""){ay.push({xtype:"panel",frame:false,height:200,columnWidth:ao,title:aG,id:"sysConfig-"+ae,tools:u,items:[q]});
}}else{if(al=="linear"){var a0=aS["SUMMARY"];var S=aS["MSG"];var a=aS["COLUMN_0"];var an=aS["COLUMN_1"];var f="";var au=[];if(a0!="-"){for(var ac=0;ac<a0.length;ac++){var aa=ac+1;if(ac%3==0){if(ac>1){au.push({xtype:"container",flex:1,columnWidth:1,height:1,});}}au.push({xtype:"container",id:"sysLinearguage-"+ac,cls:aa%3==0?"":"componentnetworkseperator",height:150,style:{marginTop:"10px !important",marginBottom:"10px !important",},layout:"column",columnWidth:1/3,flex:1,listeners:{resize:function(k,a5,i,j,a6,l){if(!Ext.isEmpty(j)){if(a5<i){a5=a5+(i-a5);
}else{i=i+(a5-i);}$("#"+k.id).highcharts().setSize(a5,i,false);}}}});}}else{var S=aS["MSG"];f='<div style="text-align:center;margin:8% auto 0px auto"><div class="iconInformation" width="100%" style="text-align:center;margin:0px auto"></div><div>'+S+"</div></div>";}if(au.length>0){ay.push({xtype:"panel",scroll:true,autoScroll:true,frame:false,height:200,flex:1,title:aG,dataArray:a0,id:"sysConfig-"+ae,ui:"sysConfigPanel",tools:u,layout:{type:"column"},items:au});
}else{ay.push({xtype:"panel",scroll:true,autoScroll:true,frame:false,height:200,flex:1,title:aG,id:"sysConfig-"+ae,ui:"sysConfigPanel",tools:u,html:'<table cellspacing="0" cellpadding="0" border="0" class="x-grid-table x-grid-table-resizer" width="100%"><tbody><tr class="x-grid-row"><td width="100%" height="170px" valign="middle" align="center"><div class="iconInformation" width="100%" style="text-align:center;margin:0px auto"></div><div>'+noMeasureExcl+"</div></td></tr></tbody></table>"});
}}else{if(al=="fusion_chart"){var d=aS["XML_DATA"];var H=aS["SWF_PATH"];var aO=aS["HEIGHT"];var R=aS["WIDTH"];ay.push({xtype:"panel",frame:false,height:200,title:aG,id:"sysConfigLayerHealth"+ae,chartCnt:ae,tools:u,html:'<div id="sys-LayerwiseHealth" style="margin:0px auto 0px auto"></div>',listeners:{"afterrender":function(i){if(d!="-"){try{var j={};
j=jQuery.extend(true,{},getHighChartsBarInstance("sys-LayerwiseHealth",130,450),j);j.setData(d,currentDateFormat,"","stackedBar");j.drawChart();}catch(k){console.log(k);}}else{Ext.get("sys-LayerwiseHealth").update('<div style="border:0px solid blue;margin:0px auto"><div class="iconInformation" width="100%" style="text-align:center;margin:0px auto;margin-top: 20px;"></div><div style="text-align:center;margin:0px auto;">'+noMeasureExcl+"</div></div>");
}}}});}else{ay.push({xtype:"panel",frame:false,height:200,title:aG,id:"sysConfig-"+ae,tools:u,html:'<table cellspacing="0" cellpadding="0" border="0" class="x-grid-table x-grid-table-resizer" width="100%"><tbody><tr class="x-grid-row"><td width="100%" height="170px" valign="middle" align="center"><div class="iconInformation" width="100%" style="text-align:center;margin:0px auto"></div><div>'+noMeasureExcl+"</div></td></tr></tbody></table>"});
}}}}}}ah.removeAll();ah.add(ay);ah.doComponentLayout();var aL=0;for(var V=0;V<ah.items.length;V++){var F=aS["TYPE"];var aH=Ext.getCmp("sysConfig-"+V);if(aH!=undefined&&aH.dataArray!=null){var C=aH.dataArray;var g=0;for(var B=aL;B<Y;B++){var X=aH.getEl().dom.innerHTML;if(X.indexOf("system-chartSparkContainer"+B)>-1){var ai=new Date();
var aw="system-chartSparkContainer"+ae+"_"+ai.getMinutes()+"_"+ai.getSeconds();var s=C[g]["XML_DATA"];if(s!="-"){var ad=C[g]["SPARK_PATH"];var aR=getSparkCharts("system-chartSparkContainer"+B,"90","20",s,ad);}}g++;}aL+=aH.dataArray.length;}}for(var V=0;V<aX.length;V++){var aS=aX[V];if(aS["TYPE"].toLowerCase()=="linear"){var ak=Ext.getCmp("sysConfig-"+V);
if(ak!=undefined&&ak.dataArray!=undefined){var P=ak.dataArray;for(var ac=0;ac<P.length;ac++){var W=P[ac]["COLUMN_1"];var ag="sysLinearguage-"+ac;getHighChartsGuage(ag,W);}}}}}sysLastGraphTypeLoaded="SummaryAtGlance";},showHistoryTab:function(G,j,D){var x=j["uptimeURL"];var o=Ext.getCmp(G);o.setAutoScroll(true);
if(D=="default"){o.removeAll();}var v=false;if(x!=null&&!Ext.isEmpty(x)&&x!=undefined){this.loadUptimeSummary(G,x,D);v=true;}var m=Ext.getCmp("systemsubsystem").getValue();if(!Ext.isEmpty(m)&&m.toLowerCase()!="overview"){}if(o.getEl()!=undefined){o.getEl().mask(loadingLbl+"...","maskCenter");}var s=o.getHeight();
var a=j["CHARTS"];var g=j["hiddens"];var b=Ext.getCmp("systemsubsystem").getValue();sysLastGraphTypeLoaded=g["graphType"];if(!Ext.isEmpty(a)){if(a["NO_CHARTS"]!=undefined&&a["NO_CHARTS"]=="true"){var z=a["NO_CHARTS_MSG"];if(b=="Overview"){var k="margin:11% auto 0px auto";}else{var k="margin:16% auto 0px auto";
}if(D=="default"){o.add({xtype:"container",id:"noCharts_Measure",width:"100%",html:'<div align="center" style="'+k+'"><div class="iconInformation" style="margin:0px auto"></div><div>'+z+"</div></div>"});}else{if(Ext.getCmp("noCharts_Measure")!=null){Ext.getCmp("noCharts_Measure").update('<div align="center" style="'+k+'"><div class="iconInformation" style="margin:0px auto"></div><div>'+z+"</div></div>");
}else{o.add({xtype:"container",id:"noCharts_Measure",width:"100%",html:'<div align="center" style="'+k+'"><div class="iconInformation" style="margin:0px auto"></div><div>'+z+"</div></div>"});}}}}else{if(!Ext.isEmpty(j["MEASURE_GRAPHS"])&&g["graphType"]=="measureGraph"){var t=new Array();var C=j["MEASURE_GRAPHS"];
if(D=="default"){o.add({xtype:"panel",id:"sys-chart-container",width:"100%",margin:"10 0 10 10",layout:"column",defaults:{columnWidth:0.333}});o.doComponentLayout();}for(var A=0;A<C.length;A++){var f=C[A];var s=f["HEIGHT"];var e=f["WIDTH"];var h=f["TITLE"];var l=f["TOOLTIP_TITLE"];var d=f["IMG_SRC"];
var w=f["HIGH_CHART"];var p="";if(w=="false"){var c=C[A]["PARAMS"];p="<img onClick=\"javascript:MeasureGraphOnClick('"+c+'\');" src="'+d+'" height="'+s+'" width="'+e+'" />';}else{p='<div id="sys-high-chart-'+A+'" style="border:0px solid yellow;height:'+s+"px;width:"+e+'px;margin:0px auto"></div>';}t.push({xtype:"panel",cls:"datapanel optionalListPanel cursor",margin:"0 10 10 0",id:"sys-measure-graph-"+A,width:"100%",dataArray:f,items:[{xtype:"label",style:{"text-align":"center"},html:'<div title="'+l+'" class="font_bold" style="padding:15px 5px 0px 5px">'+h+"</div>"},{xtype:"container",width:"100%",html:"<div>"+p+"</div></div>"}]});
}Ext.getCmp("sys-chart-container").removeAll();Ext.getCmp("sys-chart-container").add(t);for(var A=0;A<C.length;A++){var d=C[A]["IMG_SRC"];if(C[A]["HIGH_CHART"]=="true"){var c=C[A]["PARAMS"];if(Ext.get("sys-high-chart-"+A)!=null&&Ext.get("sys-high-chart-"+A)!="null"&&Ext.get("sys-high-chart-"+A)!=undefined){Ext.Ajax.request({url:d,method:"GET",async:false,success:function(I){if(I.status==200&&!Ext.isEmpty(I.responseText)){var L=I.responseText;
if(L.indexOf("png")==-1&&L.indexOf("PNG")==-1&&L.indexOf("gif")==-1&&L.indexOf("GIF")==-1){var J=Ext.decode(L);try{var i={};i=jQuery.extend(true,{},getHighCharts("sys-high-chart-"+A,C[A]["HEIGHT"],C[A]["WIDTH"],c),i);if(J.hasOwnProperty("title")){J.title="";}J["legVerAlignWBottom"]=true;i.setData(J,currentDateFormat,c,false,"bottom");
i.drawChart();}catch(K){alert("e::"+K);}}else{Ext.get("sys-high-chart-"+A).update('<table width="100%" height="100%" style="text-align:center"><tr><td><div class="iconInformation" style="margin:-16px auto 0px auto"></div><div>'+noMeasureExcl+"</div></td></tr></table>");}}else{Ext.get("sys-high-chart-"+A).update('<table width="100%" height="100%" style="text-align:center"><tr><td><div class="iconInformation" style="margin:-16px auto 0px auto"></div><div>'+noMeasureExcl+"</div></td></tr></table>");
}}});}}}}else{if(!Ext.isEmpty(j["SUMMARY_GRAPHS"])&&g["graphType"]=="summaryGraph"){var t=new Array();var C=j["SUMMARY_GRAPHS"];if(D=="default"){o.add({xtype:"panel",id:"sys-chart-container",width:"100%",layout:"column",defaults:{columnWidth:0.5}});o.doLayout();}for(var A=0;A<C.length;A++){var f=C[A];
var e=f["WIDTH"];var s=f["HEIGHT"];var h=f["TITLE"];var l=f["TOOLTIP_TITLE"];var u=f["summryFullviewGraphUrl"];t.push({xtype:"container",margin:10,cls:"containerShadow",items:[{xtype:"label",style:{"text-align":"center"},html:'<div title="'+l+'" class="font_bold" style="padding:15px 5px 0px 5px">'+h+"</div>"},{xtype:"container",margin:"10",width:"100%",id:"sys-summary-graph-"+A,dataArray:f,MaxURL:u,style:{cursor:"pointer"},html:'<div style="text-align:center;padding:0px 0px" ><div id="sys-summaryChart-'+A+'" style="width:'+e+"px;height:"+s+'px;margin:0px auto"></div></div>',listeners:{"afterrender":function(){var I=this.dataArray["XML_DATA"];
if(I!="-"){try{var i={};i=jQuery.extend(true,{},getHighChartsBarInstance(this.id,250,e),i);i.setData(I,currentDateFormat,this.MaxURL,"stackedColumn");i.drawChart();}catch(J){console.log(J);}}}}}]});}Ext.getCmp("sys-chart-container").removeAll();Ext.getCmp("sys-chart-container").add(t);o.doLayout();}else{if(!Ext.isEmpty(j["TREND_GRAPHS"])&&g["graphType"]=="trendGraph"){var t=new Array();
var C=j["TREND_GRAPHS"];if(D=="default"){o.add({xtype:"panel",id:"sys-chart-container",width:"100%",layout:"column",defaults:{columnWidth:0.33}});o.doLayout();}for(var A=0;A<C.length;A++){var f=C[A];var e=f["WIDTH"];var s=f["HEIGHT"];var h=f["TITLE"];t.push({xtype:"panel",cls:"datapanel optionalListPanel cursor",margin:"10 0 10 10",id:"sys-trend-graph-"+A,width:"100%",dataArray:f,items:[{xtype:"label",style:{"text-align":"center"},html:'<div title="'+l+'" style="margin-top:7px;text-align:center" class="font_bold">'+h+"</div>"},{xtype:"container",id:"sys-trendChart-"+A,width:"100%",height:parseInt(s)}]});
}Ext.getCmp("sys-chart-container").removeAll();Ext.getCmp("sys-chart-container").add(t);o.doComponentLayout();for(var A=0;A<C.length;A++){var H=Ext.getCmp("sys-trend-graph-"+A);var y=H.dataArray;var F=H.getWidth();var q=y["XML_DATA"];if(q!="-"){try{var B=y["WIDTH"];var n=y["HEIGHT"];var u=y["minMaxtrendFullView"];
var E={};E=jQuery.extend(true,{},createLineChart("sys-trendChart-"+A,n,F-10,false),E);E.setData(q,currentDateFormat,u,"line",true);E.drawChart();}catch(r){console.log(r);}}}}}}}if(Ext.getCmp("sys-calendar-btn")!=undefined){}if(o.getEl()!=undefined){o.getEl().unmask();}},callView:function(a){var c="default";
var d=Ext.getCmp(Ext.getCmp("systabpanel").getActiveTab().getId());d.getEl().mask(loadingLbl+"...","maskCenter");var i=this;var e=(Ext.getCmp("sys_er_timeline")!=undefined)?Ext.getCmp("sys_er_timeline").getValue():timelineVals["timeline"];var f="";var h="";if((Ext.getCmp("sys_er_stdate")!=undefined)){f=formatDate(Ext.getCmp("sys_er_stdate").getValue(),mgrDisplayDateFormat);
}else{f=timelineVals["starttime"];}if((Ext.getCmp("sys_er_enddate")!=undefined)){h=formatDate(Ext.getCmp("sys_er_enddate").getValue(),mgrDisplayDateFormat);}else{h=timelineVals["endtime"];}var j=(Ext.getCmp("sys_er_sthr")!=undefined)?Ext.getCmp("sys_er_sthr").getValue():timelineVals["starthour"];var b=(Ext.getCmp("sys_er_endhr")!=undefined)?Ext.getCmp("sys_er_endhr").getValue():timelineVals["endhour"];
var g="";if(a=="summaryGraph"||a=="trendGraph"){g="tab=System&hostName="+encodeURIComponent(requestParams.hostName)+"&compType="+encodeURIComponent(componentType)+"&subsystem="+encodeURIComponent(Ext.getCmp("systemsubsystem").getValue())+"&graphType="+encodeURIComponent(a)+"&showGraph="+encodeURIComponent(a)+"&time_line=24 hours&starttime="+encodeURIComponent(f)+"&endtime="+encodeURIComponent(h)+"&starthr="+encodeURIComponent(j)+"&endhr="+encodeURIComponent(b)+"&format="+encodeURIComponent(dateFormatForTimeline)+"&host="+encodeURIComponent(requestParams.hostName);
}else{g="tab=System&hostName="+encodeURIComponent(requestParams.hostName)+"&compType="+encodeURIComponent(componentType)+"&subsystem="+encodeURIComponent(Ext.getCmp("systemsubsystem").getValue())+"&graphType="+encodeURIComponent(a)+"&showGraph="+encodeURIComponent(a)+"&time_line=1 hour&starttime="+encodeURIComponent(f)+"&endtime="+encodeURIComponent(h)+"&starthr="+encodeURIComponent(j)+"&endhr="+encodeURIComponent(b)+"&format="+encodeURIComponent(dateFormatForTimeline)+"&host="+encodeURIComponent(requestParams.hostName);
}sysLastLoadedURL="/final/monitor/egSysDashBoardJSON.jsp?"+g;i.loadInnerTab(Ext.getCmp("systabpanel").getActiveTab().getId(),"/final/monitor/egDashboardHistoryJSON.jsp?"+g,c);sysLastGraphTypeLoaded=a;},loadUptimeSummary:function(c,b,a){var e="";var d=new Array();Ext.Ajax.request({url:b,method:"POST",async:false,success:function(l){if(l.status==200&&!Ext.isEmpty(l.responseText)){var i=l.responseText;
var o=Ext.decode(i);e=o["uptimeArr"];var r=e[0];var h=e[1];var k=r["tableTitle"];var j=r["data"];var m=Ext.getCmp(c);if(a=="default"){m.removeAll();m.add({xtype:"container",columnWidth:3,layout:"column",width:"100%",defaults:{columnWidth:0.5},padding:4,id:"sys-uptime-container"});m.doComponentLayout();
}var g=Ext.getCmp("sys-uptime-container");var q=h["RebootTitle"];var f=h["Msg"];var n="";var p="";if(k!=null&&!Ext.isEmpty(k)&&j=="true"){n='<div class="x-table"><table cellspacing="0" cellpadding="0" border="0" class="x-grid-table x-grid-table-resizer" width="100%"><tbody>';n+='<tr class="x-grid-row">';
n+='<td class="x-grid-cell" ><div class="x-grid-cell-inner">'+r["COLUMN_0"]+"</div></td>";n+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+r["COLUMN_0_val"]+"</div></td>";n+="</tr>";n+='<tr class="x-grid-row">';n+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+r["COLUMN_1"]+"</div></td>";
n+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+r["COLUMN_1_val"]+"</div></td>";n+="</tr>";n+='<tr class="x-grid-row">';n+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+r["COLUMN_2"]+"</div></td>";n+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+r["COLUMN_2_val"]+"</div></td>";
n+="</tr>";n+='<tr class="x-grid-row">';n+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+r["COLUMN_3"]+"</div></td>";n+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+r["COLUMN_3_val"]+"</div></td>";n+="</tr>";n+='<tr class="x-grid-row">';n+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+r["COLUMN_4"]+"</div></td>";
n+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+r["COLUMN_4_val"]+"</div></td>";n+="</tr>";n+="</tbody></table></div>";}else{n+='<div style="text-align:center;margin:5% 0px 0px 0px"><div class="iconInformation"  style="text-align:center;margin:0px auto"></div><div>'+noMeasureExcl+"!</div></div>";
}if(f!=null&&f=="true"){p+='<div style="text-align:center;margin:5% 0px 0px 0px"><div class="iconInformation"  style="text-align:center;margin:0px auto"></div><div>'+h["EmptyMsg"]+"!</div></div>";}else{p='<div class="x-table"><table class="x-grid-table x-grid-table-resizer" cellspacing="0" cellpadding="0" border="0" class="x-grid-table x-grid-table-resizer" width="100%"><tbody>';
p+='<tr class="x-grid-row" >';p+='<td class="x-grid-cell" ><div class="x-grid-cell-inner">'+h["COLUMN_0"]+"</div></td>";p+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+h["COLUMN_1_val"]+"</div></td>";p+="</tr>";p+='<tr class="x-grid-row">';p+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+h["COLUMN_1"]+"</div></td>";
p+='<td class="x-grid-cell"><div class="x-grid-cell-inner">'+h["COLUMN_2_val"]+"</div></td>";p+="</tr>";p+="</tbody></table></div>";}d.push({xtype:"commonPanel",id:"sys-uptimeSum",cls:"datapanel",frame:true,padding:"0px 0px 0px 0px",height:140,title:k,html:n});d.push({xtype:"commonPanel",id:"sys-rebootSum",height:140,cls:"datapanel",frame:true,padding:"0px 0px 0px 0px",title:q,html:p});
g.removeAll();g.add(d);g.doComponentLayout();}}});},ddOnclick:function(b){Ext.getCmp("systemupperpanelId").hide();Ext.getCmp("systemlowerpanelId").hide();comboChangeURL="/final/monitor/egDashTimelineJSON.jsp?"+b+"&graphType=DDgraph";var c=this.getCompdashdetailsMaintab();c.remove("sysfullviewpanel");
var a={xtype:"sysfullviewpanel",Dataurl:"/final/monitor/egDashTimelineJSON.jsp?"+b+"&graphType=DDgraph",viewType:"barGraph",gtype:"bar"};c.add(a);c.doLayout();},comparisionBarOnclick:function(b){Ext.getCmp("systemupperpanelId").hide();Ext.getCmp("systemlowerpanelId").hide();b=b.split("?");var d=b[1];
comboChangeURL="/final/monitor/egDashTimelineJSON.jsp?"+d+"&graphType=comparisionBargraph";var c=this.getCompdashdetailsMaintab();c.remove("sysfullviewpanel");var a={xtype:"sysfullviewpanel",width:(Ext.getBody().getViewSize().width),height:(Ext.getBody().getViewSize().height-60),Dataurl:"/final/monitor/egDashTimelineJSON.jsp?"+d+"&graphType=comparisionBargraph",viewType:"barGraph",gtype:"bar"};
c.add(a);c.doLayout();},trendGraphOnclick:function(b){Ext.getCmp("systemupperpanelId").hide();Ext.getCmp("systemlowerpanelId").hide();b=b.split("?");var d=b[1];comboChangeURL="/final/monitor/egDashTimelineJSON.jsp?"+d+"&graphType=Trendgraph";var c=this.getCompdashdetailsMaintab();c.remove("sysfullviewpanel");
var a={xtype:"sysfullviewpanel",width:(Ext.getBody().getViewSize().width),height:(Ext.getBody().getViewSize().height-60),Dataurl:"/final/monitor/egDashTimelineJSON.jsp?"+d+"&graphType=Trendgraph",viewType:"trendGraph",gtype:"trend"};c.add(a);c.doLayout();},summaryGraphOnclick:function(b){Ext.getCmp("systemupperpanelId").hide();
Ext.getCmp("systemlowerpanelId").hide();b=b.split("?");var d=b[1];comboChangeURL="/final/monitor/egDashTimelineJSON.jsp?"+d+"&graphType=Summarygraph";var c=this.getCompdashdetailsMaintab();c.remove("sysfullviewpanel");var a={xtype:"sysfullviewpanel",width:(Ext.getBody().getViewSize().width),height:(Ext.getBody().getViewSize().height-60),Dataurl:"/final/monitor/egDashTimelineJSON.jsp?"+d+"&graphType=Summarygraph",viewType:"Summarygraph",gtype:"summary"};
c.add(a);c.doLayout();},ComparisonGraphGraphOnClick:function(b){Ext.getCmp("systemupperpanelId").hide();Ext.getCmp("systemlowerpanelId").hide();b=b.split("?");var d=b[1];comboChangeURL="/final/monitor/egDashTimelineJSON.jsp?"+d+"&graphType=comparisionBargraph";var c=this.getCompdashdetailsMaintab();c.remove("sysfullviewpanel");
var a={xtype:"sysfullviewpanel",width:"100%",height:(Ext.getBody().getViewSize().height-60),Dataurl:"/final/monitor/egDashTimelineJSON.jsp?"+d+"&graphType=comparisionBargraph",viewType:"barGraph",gtype:"bar"};c.add(a);c.doLayout();},DDGraphOnClick:function(b){Ext.getCmp("systemupperpanelId").hide();Ext.getCmp("systemlowerpanelId").hide();
b=b.split("?");var d=b[1];comboChangeURL="/final/monitor/egDashTimelineJSON.jsp?"+d+"&graphType=DDgraph";var c=this.getCompdashdetailsMaintab();c.remove("sysfullviewpanel");var a={xtype:"sysfullviewpanel",width:"100%",height:(Ext.getBody().getViewSize().height-60),Dataurl:"/final/monitor/egDashTimelineJSON.jsp?"+d+"&graphType=DDgraph",viewType:"barGraph",gtype:"bar"};
c.add(a);c.doLayout();},MeasureGraphOnClick:function(b){Ext.getCmp("systemupperpanelId").hide();Ext.getCmp("systemlowerpanelId").hide();b=b.split("?");var d=b[1];comboChangeURL="/final/monitor/egDashTimelineJSON.jsp?"+d+"&graphType=measureGraph";var c=this.getCompdashdetailsMaintab();c.remove("sysfullviewpanel");
var a={xtype:"sysfullviewpanel",width:"100%",height:(Ext.getBody().getViewSize().height-60),Dataurl:"/final/monitor/egDashTimelineJSON.jsp?"+d+"&graphType=measureGraph",viewType:"measureGraph",gtype:"measure"};c.add(a);c.doLayout();},loadFullViewPanel:function(){var e=this;var b=Ext.getCmp("sys-fullviewId");
var d=b.Dataurl;var c=b.up("panel");b.setLoading(true,true);b.setWidth(c.getWidth());b.doComponentLayout();d+="&screenWidth="+(c.getWidth())+"&screenHeight="+(c.getHeight());var a=Ext.getCmp("sys-fullviewId").viewType;if(a=="barGraph"){Ext.getCmp("sys-period").hide();Ext.getCmp("sys-graphID").hide();
Ext.getCmp("sys-Show").show();}else{if(a=="trendGraph"){Ext.getCmp("sys-period").show();Ext.getCmp("sys-graphID").show();Ext.getCmp("sys-Show").hide();}else{if(a=="Summarygraph"){Ext.getCmp("sys-period").show();Ext.getCmp("sys-Show").hide();}else{if(a=="measureGraph"){Ext.getCmp("sys-period").hide();
Ext.getCmp("sys-Show").hide();}}}}Ext.Ajax.request({url:d,scope:this,method:"POST",success:function(h){if(h.status==200&&!Ext.isEmpty(h.responseText)){var m=h.responseText;var T=Ext.decode(m);var K=T["dateArrayValues"];var s=T["trendGrpDuration"];if(s!=null&&s!=""&&!Ext.isEmpty(s)){var B=s["monitor.dashboard.Duration"];
var E=s["selectedDuration"];var aj=s["trendGrpDurationArr"];var j=Ext.getCmp("sys-period");j.setFieldLabel(B);j.getStore().loadRawData(aj);j.setValue(E);}var ab=T["BARGRAPH"];if(ab!=null&&ab!=""&!Ext.isEmpty(ab)){var G=ab["monitor.common.Show"];var ao=ab["selectedShowCombo"];var an=ab["barGraphShowCombo"];
var F=Ext.getCmp("sys-Show");F.setFieldLabel(G);F.getStore().loadRawData(an);F.setValue(ao);}var O=T["timelineCombo"];if(O!=null&&O!=""&!Ext.isEmpty(O)){var Z=O["monitor.dashboard.TimeLine"];var at=O["selectedTimelineCombo"];var ap=O["timelineCombo"];var D=Ext.getCmp("sys-high_er_timeline");D.setFieldLabel(Z);
D.getStore().loadRawData(ap);D.setValue(at);}var P=T["fromValues"];if(P!=null&&P!=""&!Ext.isEmpty(P)){var ad=P["monitor.VirtualDashboard.From"];var v=P["from"];var H=P["value"];var p=Ext.getCmp("sys-high_er_stdate");p.setFieldLabel(ad);p.setDisabled(v);p.dataArray=K[0];p.setValue(K[6]);}var x=T["startHr"];
if(x!=null&&x!=""&!Ext.isEmpty(x)){var aa=x["monitor.VirtualDashboard.Hr"];var aq=x["isStartHrEnabled"];var L=x["selectedStartHr"];var N=x["startHrArray"];var am=Ext.getCmp("sys-high_er_sthr");am.setFieldLabel(aa);am.getStore().loadRawData(N);am.setDisabled(aq);am.dataArray=K[2];am.setValue(K[7]);}var ai=T["toValues"];
if(ai!=null&&ai!=""&!Ext.isEmpty(ai)){var k=ai["monitor.VirtualDashboard.To"];var Y=ai["to"];var ah=ai["value"];var S=Ext.getCmp("sys-high_er_enddate");S.setDisabled(Y);S.setFieldLabel(k);S.dataArray=K[1];S.setValue(K[9]);}var t=T["endHr"];if(t!=null&&t!=""&!Ext.isEmpty(t)){var aa=t["monitor.VirtualDashboard.Hr"];
var al=t["isEndHrEnabled"];var u=t["selectedEndHr"];var R=t["endHrArray"];var W=Ext.getCmp("sys-high_er_endhr");W.setFieldLabel(aa);W.getStore().loadRawData(R);W.setDisabled(al);W.dataArray=K[3];W.setValue(K[10]);}var A="2D";var y=T["GraphCombo"];if(y!=null&&y!=undefined&&y!=""){var g=y["monitor.dashboard.Graph"];
var z=y["trendGraph"];var ag=y["selectedGraph"];var r=Ext.getCmp("sys-graphID");r.setFieldLabel(g);r.getStore().loadRawData(z);r.setValue(ag);}var o=T["ddGraphObj"];if(o!=null&&o!=""&!Ext.isEmpty(o)){var q=o["DetailsLink"];var Q=o["DetailsLabel"];if(q=="true"){Ext.getCmp("sys_detailsID").show();}}var f=Ext.getCmp("sys-fullViewBarId");
f.removeAll();f.update("");if(a=="measureGraph"){var n=T["MeasureGraphImage"];if(n!=null&&n!=""&!Ext.isEmpty(n)&&n!=undefined){var w=n["DATA"];var C=n["TITLE"];var ak=n["HIGH_CHART"];var M="";if(ak=="highcharts"){M=true;}else{M=false;}var X=T["minMaxTable"];var l="";var ac="";if(X!=null&&X!=""&!Ext.isEmpty(X)&&X!=undefined){l=X["minMaxTableHeadersArray"];
}var U=T["measuresTable"];if(U!=null&&U!=""&!Ext.isEmpty(U)&&U!=undefined){ac=U["measuresTableDataArray"];}if(w=="true"){var ae=n["iframeSrc"];b.setTitle(C);e.loadMeasureGraph(ae,M);}else{var I=n["Msg"];f.update(I);b.setLoading(false);}}}else{var J=T["FullViewXmlData"];if(J!=null&&J!=""&!Ext.isEmpty(J)){var ar=J["DATA"];
if(ar=="true"){var i=J["WIDTH"];var V=J["HEIGHT"];V=parseInt(V);f.add({xtype:"container",id:"sys-fullViewPanelBigId",style:{"text-align":"center","margin":"20px auto"},xmlData:J,width:i,height:V,listeners:{"afterrender":function(ay){var av=ay.xmlData["XMLDATA"];try{if(a=="Summarygraph"){var aw={};aw=jQuery.extend(true,{},getHighChartsBarInstance(ay.id,V,i),aw);
aw.setData(av,currentDateFormat,"","stackedColumn");aw.drawChart();}else{if(a=="trendGraph"){var au={};au=jQuery.extend(true,{},createLineChart(ay.id,V,i),au);au.setData(av,currentDateFormat,"","line",true);au.drawChart();}else{var aw={};aw=jQuery.extend(true,{},getHighChartsBarInstance(ay.id,V,i),aw);
aw.setData(av,currentDateFormat,"","bar");aw.drawChart();}}b.setLoading(false);}catch(ax){console.log(ax);}}}});}else{var af=J["MSG"];f.update(af);}}}}}});},loadFullViewGraph:function(d){var b=Ext.getCmp("sys-fullviewId");var c=b.up("panel");b.setLoading(true,true);d+="&screenWidth="+(c.getWidth()-10)+"&screenHeight="+(c.getHeight());
var f=Ext.getCmp("sys-fullViewBarId");f.removeAll();f.update("");var e=this;var a=Ext.getCmp("sys-fullviewId").viewType;Ext.Ajax.request({url:d,scope:this,method:"POST",success:function(g){if(g.status==200&&!Ext.isEmpty(g.responseText)){var x=g.responseText;var i=Ext.decode(x);if(a=="measureGraph"){var p=i["MeasureGraphImage"];
if(p!=null&&p!=""&!Ext.isEmpty(p)&&p!=undefined){var n=p["DATA"];var m=p["TITLE"];var u=p["HIGH_CHART"];var r="";if(u=="highcharts"){r=true;}else{r=false;}var o=i["minMaxTable"];var v="";var t="";if(o!=null&&o!=""&!Ext.isEmpty(o)&&o!=undefined){v=o["minMaxTableHeadersArray"];}var q=i["measuresTable"];
if(q!=null&&q!=""&!Ext.isEmpty(q)&&q!=undefined){t=q["measuresTableDataArray"];}if(n=="true"){var h=p["iframeSrc"];b.setTitle(m);e.loadMeasureGraph(h,r);}else{var s=p["Msg"];y.update(s);b.setLoading(false);}}}else{var j=i["FullViewXmlData"];if(j!=null&&j!=""&!Ext.isEmpty(j)){var z=j["DATA"];var y=Ext.getCmp("sys-fullViewBarId");
if(z=="true"){var k=j["WIDTH"];var w=j["HEIGHT"];w=parseInt(w);y.add({xtype:"container",id:"sys-fullViewPanelBigId",xmlData:j,width:k,height:w,listeners:{"afterrender":function(D){var C=D.xmlData["XMLDATA"];var H=D.xmlData["WIDTH"];var G=D.xmlData["HEIGHT"];try{if(a=="Summarygraph"){var F={};F=jQuery.extend(true,{},getHighChartsBarInstance(D.id,G,H),F);
F.setData(C,currentDateFormat,"","stackedColumn");F.drawChart();}else{if(a=="trendGraph"){var B={};B=jQuery.extend(true,{},createLineChart(D.id,parseInt(G),(parseInt(H)-20)),B);B.setData(C,currentDateFormat,"","line",true);B.drawChart();}else{var F={};var A=Ext.getCmp("sys-Show").getValue();if(A=="ALL"){chartcontainerHeight=580;
}else{chartcontainerHeight=490;}var E=parseInt(b.getWidth())-100;F=jQuery.extend(true,{},getHighChartsBarInstance(D.id,chartcontainerHeight,E),F);F.setData(C,currentDateFormat,"","bar");F.drawChart();}}b.setLoading(false);}catch(I){console.log(I);}}}});}else{var l=j["MSG"];y.update('<table width="100%" height="300"><tr><td valign="middle" align="center"><div class="iconInformation" style="margin-top:5%"></div><div style="font-size:12px">'+l+"</div></td></tr></table>");
b.setLoading(false);}}}}}});},dateDiff:function(c,a){var b=24*60*60*1000;var c=new Date(c);var a=new Date(a);var d=Math.round(Math.abs(c.getTime()-a.getTime())/(b));return d;},goBtnOnClick:function(){var h=Ext.getCmp("sys-Show").getValue();var n=Ext.getCmp("sys-high_er_timeline").getValue();var a=Ext.getCmp("sys-high_er_stdate").getValue();
a=formatDate(Ext.getCmp("sys-high_er_stdate").getValue(),mgrDisplayDateFormat);var o=Ext.getCmp("sys-high_er_sthr");var g=Ext.getCmp("sys-high_er_endhr");var c=o.getValue();var d=Ext.getCmp("sys-high_er_enddate").getValue();d=formatDate(Ext.getCmp("sys-high_er_enddate").getValue(),mgrDisplayDateFormat);
var m=g.getValue();var k=new Date();var i=this.dateDiff(new Date(a),new Date(d));var b=k.getMonth()+"/"+k.getDay()+"/"+k.getYear();if(n!=null&&n.toLowerCase()=="any"){if(new Date(a)>new Date(d)){Ext.MessageBox.show({title:alertLbl,msg:_stDateLessThanEndDateMsg,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}if(new Date(a).valueOf()==new Date(d).valueOf()){if(c>m){Ext.MessageBox.show({title:alertLbl,msg:_stDateLessThanEndDateMsg,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}}if(k<new Date(a)){Ext.MessageBox.show({title:alertLbl,msg:_fromdatelesserThanMsg,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});
return false;}}if(f=="measureGraph"){if(i>14){Ext.MessageBox.show({title:alertLbl,msg:_timelineTwoWeeksMsg,buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.WARNING});return false;}}var e="2D";var l=Ext.getCmp("sys-period").getValue();var j=Ext.getCmp("sys-graphID").getValue();var f=Ext.getCmp("sys-fullviewId").viewType;
if(f=="barGraph"){comboChangeURL=comboChangeURL.replace(/(priority=)[^\&]+/,"$1"+h);}else{if(f=="trendGraph"){comboChangeURL=comboChangeURL.replace(/(mode=)[^\&]+/,"$1"+e);if(comboChangeURL.indexOf("duration")>0){comboChangeURL=comboChangeURL.replace(/(duration=)[^\&]+/,"$1"+l);}else{comboChangeURL+="&duration="+l;
}if(comboChangeURL.indexOf("trendType")>0){comboChangeURL=comboChangeURL.replace(/(trendType=)[^\&]+/,"$1"+j);}else{comboChangeURL+="&trendType="+j;}}else{if(f=="Summarygraph"){comboChangeURL=comboChangeURL.replace(/(mode=)[^\&]+/,"$1"+e);if(comboChangeURL.indexOf("duration")>0){comboChangeURL=comboChangeURL.replace(/(duration=)[^\&]+/,"$1"+encodeURIComponent(l));
}else{comboChangeURL+="&duration="+encodeURIComponent(l);}}else{if(f=="measureGraph"){comboChangeURL=comboChangeURL.replace(/(mode=)[^\&]+/,"$1"+e);}}}}comboChangeURL=comboChangeURL.replace(/(timeline_compare=)[^\&]+/,"$1"+encodeURIComponent(n));comboChangeURL=comboChangeURL.replace(/(starttime=)[^\&]+/,"$1"+encodeURIComponent(a));
comboChangeURL=comboChangeURL.replace(/(starthr=)[^\&]+/,"$1"+o.dataArray);comboChangeURL=comboChangeURL.replace(/(endtime=)[^\&]+/,"$1"+encodeURIComponent(d));comboChangeURL=comboChangeURL.replace(/(endhr=)[^\&]+/,"$1"+g.dataArray);if(comboChangeURL.indexOf("durationChanged")>0){comboChangeURL=comboChangeURL.replace(/(durationChanged=)[^\&]+/,"$1"+"false");
}else{comboChangeURL+="&durationChanged=false";}this.loadFullViewGraph(comboChangeURL);Ext.get("sys_configMod").animate({duration:500,to:{y:-350}});},durationComboChange:function(a){var b=a.getValue();if(comboChangeURL.indexOf("duration")>0){comboChangeURL=comboChangeURL.replace(/(duration=)[^\&]+/,"$1"+b);
}else{comboChangeURL+="&duration="+b;}if(comboChangeURL.indexOf("durationChanged")>0){comboChangeURL=comboChangeURL.replace(/(durationChanged=)[^\&]+/,"$1"+"true");}else{comboChangeURL+="&durationChanged=true";}Ext.Ajax.request({url:comboChangeURL,method:"POST",success:function(c){if(c.status==200&&!Ext.isEmpty(c.responseText)){var g=c.responseText;
var e=Ext.decode(g);var d=e["timelineCombo"];if(d!=null&&d!=""&!Ext.isEmpty(d)){var f=d["monitor.dashboard.TimeLine"];var j=d["selectedTimelineCombo"];var h=d["timelineCombo"];var i=Ext.getCmp("sys-high_er_timeline");i.setFieldLabel(f);i.getStore().loadRawData(h);i.setValue(j);}Ext.getCmp("sys-high_er_timeline").fireEvent("select",Ext.getCmp("sys-high_er_timeline"));
}}});},loadMeasureGraph:function(d,b){var g="";var e="";var c="";var f=Ext.getCmp("sys-fullViewBarId");var a=Ext.getCmp("sys-fullviewId");f.removeAll();f.update("");if(b){Ext.Ajax.request({url:d,method:"POST",success:function(h){if(h.status==200&&!Ext.isEmpty(h.responseText)){var m=h.responseText;var k=Ext.decode(m);
var j=k["ERROR"];if(j!=null&&j!=undefined&&!Ext.isEmpty(j)&&j=="NO_DATA_FOUND"){Ext.getCmp("sys-measureTableID").update("");f.update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconInformation" style="margin:0px auto"></div><div style="text-align:center">'+noMeasure+"</div></div></div>");
a.setLoading(false);}else{g=k["MeasurementTable_Highcharts"];var i=g["minMaxTable"];if(i!=null&&i!=""&!Ext.isEmpty(i)&&i!=undefined){e=i["minMaxTableHeadersArray"];}var l=g["measuresTable"];if(l!=null&&l!=""&!Ext.isEmpty(l)&&l!=undefined){c=l["measuresTableDataArray"];}if(m.indexOf("png")==-1&&m.indexOf("PNG")==-1&&m.indexOf("gif")==-1&&m.indexOf("GIF")==-1){f.add({xtype:"container",id:"sys-fullViewPanelHighChatrBigId",html:'<div id="sys-high-chart-measuregraph" style="border:0px solid yellow;height:300px;"></div>',listeners:{"afterrender":function(t){try{var n={};
n=jQuery.extend(true,{},getHighCharts("sys-high-chart-measuregraph",345,900,""),n);n.setData(k,currentDateFormat,"",true,"bottom");n.drawChart();a.setLoading(false);}catch(r){alert("e::"+r);}if(!Ext.isEmpty(e)&&e!=undefined&&e!=null&&e!=""&&c!=undefined&&c!=null&&c!=""&&!Ext.isEmpty(c)){var s="";s+='<div class="x-table" style="width:600px;margin:20px auto 0px auto;padding-bottom:0px"> '+'<table cellspacing="0" cellpadding="0" border="0"  class="gridSkin x-grid-table x-grid-table-resizer">'+"<thead>"+'<tr class="x-grid-row">'+'<th class=" x-grid-cell" style="width:50px">'+'<div class="x-grid-cell-inner" style="margin-left: 12px;">'+e[0]["name"]+"</div>"+"</th>"+'<th class=" x-grid-cell x-grid-cell-first" style="width: 210px;">'+'<div class="x-grid-cell-inner">'+e[1]["name"]+"</div>"+"</th>"+'<th class=" x-grid-cell" style="width: 50px;">'+'<div class="x-grid-cell-inner">'+e[2]["name"]+"</div>"+"</th>"+'<th class=" x-grid-cell" style="width: 50px;">'+'<div class="x-grid-cell-inner" >'+e[3]["name"]+"</div>"+"</th>"+'<th class=" x-grid-cell" style="width: 50px;">'+'<div class="x-grid-cell-inner">'+e[4]["name"]+"</div>"+"</th>"+"</tr>"+"</thead>"+"<tbody>";
for(var q=0;q<c.length;q++){var p=c[q];s+='<tr class="x-grid-row">';for(var o in p){if(o=="value0"){s+='<td class=" x-grid-cell x-grid-cell-first" style="vertical-align:middle" width="50px">'+'<div class="x-grid-cell-inner"  ><span id="id_colorcheck" style="display: inline-block;background:'+p[o]+';height: 10px;width: 10px;margin-left: 22px;"><span></div>'+"</td>";
}else{s+='<td class=" x-grid-cell x-grid-cell-first">'+'<div class="x-grid-cell-inner" >'+p[o]+"</div>"+"</td>";}}s+="</tr>";}s+="</tbody>"+"</table>"+"</div>";Ext.getCmp("sys-measureTableID").update(s);}}}});}else{f.update(m);a.setLoading(false);}}}else{f.update("<table border='0' height='100%' width='100%'><tr><td align='center'><img src='/final/monitor/eg_images/gray/graph_error_message.gif'></td></tr></table>");
a.setLoading(false);}}});}else{f.update('<table width="100%" height="360px"><tr><td align="center" valign="middle"><img src="'+d+'" border="0" /></td></tr></table>');a.setLoading(false);}},DialChartFullView:function(a){Ext.Ajax.request({url:a,method:"GET",async:false,success:function(e){if(e.status==200&&!Ext.isEmpty(e.responseText)){var f=e.responseText;
f=Ext.decode(e.responseText);var d=f["dialChartTable"];var h=f["MOREINFOS_DIAL_Table"];if(h!=null&&h!=""&&h!=undefined){var b=h["dialHeader"];var c=new Ext.Window({title:b,width:"50%",height:500,padding:"5 10 10 10",id:"dialChart",name:"dialChart",resizable:"true",modal:true,ghost:false,closeAction:"destroy",scroll:true,autoScroll:true,bodyStyle:{"overflow-y":"auto"},listeners:{hide:function(j){if(this.modal){var k=Ext.dom.Query.select(".x-mask");
var i=Ext.fly(k[0]);i.removeCls("windowModal");}},"show":function(p){if(this.modal){var q=Ext.dom.Query.select(".x-mask");var n=Ext.fly(q[0]);n.addCls("windowModal");}var j=h["tableDataArray"];var m=h["tableHeadersArray"];var o=new Array();var l=new Array();if(j!=null&&!Ext.isEmpty(j)){genHTML='<div class="x-table"><table cellspacing="0" cellpadding="0" border="0" class="x-grid-table x-grid-table-resizer testDetailsPopup" width="100%">';
genHTML+="<thead>";genHTML+='<tr class="x-grid-row">';genHTML+='<th class="x-grid-cell" ><div class="x-grid-cell-inner">'+m[0]["COLUMN_1"]+"</div></th>";genHTML+='<th class="x-grid-cell" ><div class="x-grid-cell-inner">'+m[1]["COLUMN_2"]+"</div></th>";genHTML+="</tr>";genHTML+="</thead>";genHTML+="<tbody>";
for(var k=0;k<j.length;k++){genHTML+='<tr class="x-grid-row">';genHTML+='<td class="x-grid-cell" ><div class="x-grid-cell-inner">'+j[k]["COLUMN_0"]+"</div></td>";genHTML+='<td class="x-grid-cell" ><div class="x-grid-cell-inner">'+j[k]["COLUMN_1"]+"</div></td>";genHTML+="</tr>";}genHTML+="</tbody></table></div>";
}l.push({xtype:"container",margin:"10 10 10 10",padding:"0 0 10 0",html:genHTML});this.removeAll();this.add(l);this.doComponentLayout();}}}).show().center();}else{var g="67%";if(navigator.userAgent.search("Firefox")>=0||navigator.userAgent.toLowerCase().lastIndexOf("rv:11")>-1){g="68%";}var b=d["dialHeader"];
var c=new Ext.Window({title:b,width:g,height:500,padding:"5 10 10 10",bodyPadding:10,id:"dialChart",name:"dialChart",resizable:"false",modal:true,ghost:false,closeAction:"destroy",scroll:true,autoScroll:true,layout:{type:"column"},bodyStyle:{"overflow-y":"auto"},listeners:{hide:function(j){if(this.modal){var k=Ext.dom.Query.select(".x-mask");
var i=Ext.fly(k[0]);i.removeCls("windowModal");}},"show":function(s){if(this.modal){var q=Ext.dom.Query.select(".x-mask");var l=Ext.fly(q[0]);l.addCls("windowModal");}var x=d["tableDataArray"];layerModelURL=f["hiddens"];var n=new Array();var w=new Array();s.setWidth(890);for(var t=0;t<x.length;t++){var m=x[t]["fcId"];
var o=115;var v=191;var p="0 0 0 0";var j=x[t]["chartXMLData"];var y=x[t]["divId"];var r=x[t]["chartInd"];var k=x[t]["chartTitle"];var u=x[t]["movie"];if(t%2==0){p="5 5 5 5";}else{p="5 5 5 5";}w.push({xtype:"container",width:200,height:180,cls:"containerShadow",margin:p,layout:{type:"vbox",align:"stretch"},items:[{xtype:"label",margin:10,align:"center",html:'<div style="text-align:center;overflow: hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;" class="font_bold12" data-qtip="'+k+'">'+k+"</div>"},{xtype:"container",id:"dialChart-"+t,dataArray:x[t],cnt:t,flex:1,margin:"0 10 10 10",layout:{align:"center"},width:v,height:o,html:'<div id="dialFullviewchart-'+t+'" style="border:0px solid blue;width:100%;height:100%;margin:0px auto"></div>',listeners:{"afterrender":function(z){var A=this.dataArray["chartXMLData"];
var i=this.dataArray["movie"];if(A!="-"){getHighChartsGuage("dialFullviewchart-"+this.cnt,A);}}}}]});}this.removeAll();this.add(w);this.doComponentLayout();}}}).show().center();}}else{alert("Failure Dial fullview request");}}});}});