var CCUsersCertCheck=true;var x1=100,x2=100;Ext.define("License.view.LicenseInfo",{extend:"Ext.form.Panel",alias:"widget.licenseinfo",cls:"outerpanel",requires:["Ext.ux.layout.Center","utilities.CustomGrid","Ext.ux.grid.FiltersFeature"],title:pageTitle,margin:"8 8 0 8",layout:{type:"vbox",align:"stretch"},tools:[{xtype:"button",text:back,cls:"backbutton",id:"backBtnMain",iconCls:"iconBack",hidden:true}],items:[{xtype:"component",cls:"adminHeadInfoText",html:'<center><img src="/final/images/spacer.gif" class="iconAdminInfo" valign="middle" style="margin-right:2px"/>&nbsp'+pageDesc+".</center>",width:"100%",height:25,padding:3},{xtype:"tabpanel",cls:"tablayout border_alt",style:{"box-shadow":"none","-webkit-box-shadow":"none","-moz-box-shadow":"none"},plain:true,tabPosition:"top",flex:1,defaults:{autoScroll:true},id:"certInfoTab",margin:10,listeners:{"tabchange":function(f,b,e,d){selectedTab=f.getActiveTab().id;
ctrler.tabchange(b.itemId);var a=Ext.getCmp("managerInfo");var c=!Ext.isEmpty(a);if(c){a.destroy();}}},items:[{title:certInfo,itemId:"tab1",id:"certInfoTab1",items:[{xtype:"container",layout:"ux.center",margin:20,items:[{xtype:"fieldset",title:"<b>"+heading+"</b>",width:900,margin:"10 10 10 10",items:[{xtype:"container",layout:"column",defaultType:"displayfield",defaults:{labelAlign:"top",labelSeparator:"",columnWidth:0.25},items:[{fieldLabel:"<b>"+product+"</b>",value:"",id:"product",margin:"5 0 30 0"},{fieldLabel:"<b>"+version+"</b>",value:"",margin:"5 0 30 10",id:"version"},{fieldLabel:"<b>"+ipAddr+"</b>",value:"",margin:"5 0 30 10",id:"ipAddr"},{fieldLabel:"<b>"+hostID+"</b>",value:"",margin:"5 0 30 10",id:"hostID"},{fieldLabel:"<b>"+expDate+"</b>",value:"",margin:"0 0 30 0",id:"expDate"},{fieldLabel:"<b>"+certValid+"</b>",value:"",margin:"0 0 30 10",id:"certValid"},{fieldLabel:"<b>"+mailId+"</b>",value:"",margin:"0 0 30 10",id:"mailSender"},{fieldLabel:"<b>"+companyName+"</b>",value:"",margin:"0 0 30 10",id:"companyName"},{fieldLabel:"<b>"+clusType+"</b>",value:"",id:"clusType",renderer:function(c){var d=c;
if(d!=undefined&&d!="Not supported"){d=c+'&nbsp;&nbsp;<a id="mouse" onclick="ctrler.showManagerInfo()"><img src="/final/images/spacer.gif" style="cursor:hand;vertical-align:text-bottom;" class="iconInformationSmall" title="Click here to know the cluster details"/></a>';}return d;}},{fieldLabel:"<b>"+ic+"</b>",value:"",margin:"0 0 30 10",id:"ic"},{fieldLabel:"<b>"+ttMgr+"</b>",value:"",margin:"0 0 30 10",id:"ttMgr"},{fieldLabel:"<b>"+dd+"</b>",value:"",margin:"0 0 30 10",id:"dd"},{fieldLabel:"<b>"+extSuperMgr+"</b>",value:"",margin:"0 0 30 0",id:"extSuperMgr"},{fieldLabel:"<b>"+egSuperMgr+"</b>",value:"",margin:"0 0 30 10",id:"egSuperMgr"},{fieldLabel:"<b>"+egReporter+"</b>",value:"",margin:"0 0 30 10",id:"egReporter"},{fieldLabel:"<b>"+remCtrlActs+"</b>",value:"",margin:"0 0 30 10",id:"remCtrlActs"},{fieldLabel:"<b>"+smsAlerts+"</b>",value:"",margin:"0 0 30 0",id:"smsAlerts"},{fieldLabel:"<b>"+configMgmt+"</b>",value:"",margin:"0 0 30 10",id:"configMgmt"},{fieldLabel:"<b>"+metricAgg+"</b>",value:"",margin:"0 0 30 10",id:"metricAgg"},{fieldLabel:"<b>"+agentPerSys+"</b>",value:"",margin:"0 0 30 10",id:"agentPerSys"},{fieldLabel:"<b>"+clntEmul+"</b>",value:"",margin:"0 0 30 0",id:"clntEmul"},{fieldLabel:"<b>"+advAnalytics+"</b>",value:"",margin:"0 0 30 10",id:"advAnalytics"},{fieldLabel:"<b>"+LicenseID+"</b>",value:"",margin:"0 0 30 10",id:"licenseId",hidden:true}]}]}]}]},{id:"certUsage",title:certUsage,itemId:"tab2",items:[{xtype:"customgrid",ui:"newGridPanel whiteHeader",border:true,id:"grid1",layout:{type:"vbox",align:"stretch"},flex:1,store:new Ext.data.Store({fields:["Attribute","Allowed","Used","Available","Usage","Running","NotRunning"],data:[]}),columns:{defaults:{sortable:false,hideable:false,menuDisabled:true,draggable:false,resizable:false},items:[{text:attribute,dataIndex:"Attribute",width:250},{text:allowed,dataIndex:"Allowed",flex:1},{text:used,dataIndex:"Used",flex:1,renderer:function(e){var b=e.indexOf("@#@");
var c=e;var d="";if(b!=-1){c=e.substring(0,b);d=e.substring(b+3);}var a=c;if(c!=0){a='<a id="mouse" onClick="ctrler.showDetails(\''+d+"')\">"+c+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}return a;}},{text:available,dataIndex:"Available",flex:1},{text:usage+"(%)",dataIndex:"Usage",flex:1},{text:run,dataIndex:"Running",flex:1},{text:notRun,dataIndex:"NotRunning",flex:1}]},margin:"15 10 5 10",dockedItems:[{xtype:"toolbar",dock:"top",padding:10,ui:"toolbarBgWithBottomBorder",layout:{pack:"center"},items:[{xtype:"tbfill",},{xtype:"container",margin:0,padding:0,items:[{xtype:"button",id:"saveCSVLicUsage",iconCls:"iconCsv",margin:0,padding:0,style:{background:"none",border:"0px"},listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"CSV"});
}}}]},{xtype:"button",ui:"newButtonSmall",text:agentStatus,id:"agentStatus",margin:"0 0 0 10"}]}]},{xtype:"customgrid",ui:"newGridPanel",border:true,id:"grid2",layout:{type:"vbox",align:"stretch"},flex:1,store:new Ext.data.Store({fields:["Attribute","AttValue","Allowed","Used","Available","Usage"],data:[]}),features:[{ftype:"rowbody",getAdditionalData:function(c,a,b,f){var d=this.view.headerCt,e=d.getColumnCount();
if(c.AttValue=="ConcurrentUsers"){if(peakUsgCnt!=""){return{rowBody:"&nbsp;&nbsp;&nbsp;&nbsp;"+peakUsageCaption+' <a id="mouse" onClick="javascript:showHourlyGraph(\''+graphPeakDate+'\');"><style="cursor:hand;vertical-align:text-bottom;" title="Peak usage graph"/>'+peakUsgDate+"</a>"+peakUsageCaption2+'<a id="mouse" onClick="ctrler.showPeakUserNames()"><style="cursor:hand;vertical-align:text-bottom;" title="Concurrent Users"/>'+peakUsgCnt+"&nbsp;</a>"+usersCert+"."+peakUsageCaption3,rowBodyCls:this.rowBodyCls,rowBodyColspan:e};
}}else{if(c.AttValue=="NamedUsers"){if(peakUsgCnt!=""){return{rowBody:"&nbsp;&nbsp;&nbsp;&nbsp;"+peakUsageCaption+' <style="cursor:hand;vertical-align:text-bottom;"/>'+peakUsgDate+peakUsageCaption2+'<a id="mouse" onClick="ctrler.showPeakUserNames()"><style="cursor:hand;vertical-align:text-bottom;" title="Named Users"/>'+peakUsgCnt+"&nbsp;</a>"+usersCert+"."+peakUsageCaption3,rowBodyCls:this.rowBodyCls,rowBodyColspan:e};
}}}}},{ftype:"rowwrap"}],columns:{defaults:{sortable:false,hideable:false,menuDisabled:true,draggable:false,resizable:false},items:[{text:attribute,dataIndex:"Attribute",width:250,renderer:function(b){var a=b;if(b==usersCert){a=b+'&nbsp;&nbsp;&nbsp;&nbsp;<a id="mouse" onClick="ctrler.showGraph()"><img src="/final/images/spacer.gif" style="cursor:hand;vertical-align:text-bottom;" class="iconLineChart" title="Graph"/></a>';
if(isNamedUsers=="true"){a+='<a id="mouse" onClick="ctrler.showUserNames()">&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand;vertical-align:text-bottom;" class="iconUser" title="Named Users"/></a>';}else{if(CCUsersCertCheck!=null&&CCUsersCertCheck==true){a+='<a id="mouse" onClick="ctrler.showUserNames()">&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand;vertical-align:text-bottom;" class="iconUser" title="Concurrent Users"/></a>';
}}}return a;}},{text:allowed,dataIndex:"Allowed",flex:1},{text:"Used",dataIndex:"Used",flex:1,renderer:function(e){var b=e.indexOf("@#@");var c=e;var d="";if(b!=-1){c=e.substring(0,b);d=e.substring(b+3);}var a=c;if(c!=0&&d!=""){a='<a id="mouse" onClick="ctrler.showDetails(\''+d+"')\">"+c+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';
}if(c!=0&&d=="User"){a=c+' (used yesterday)&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}if(c!=0&&d==""){a=c+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}return a;}},{text:available,dataIndex:"Available",flex:1},{text:"USAGE"+" (%)",dataIndex:"Usage",flex:1}]},margin:"15 10 5 10",}]},{title:"License Usage",itemId:"tab5",id:"usrWiseTabNew",hidden:true,items:[{xtype:"customgrid",ui:"newGridPanel",border:true,id:"UserWiseNewGrid",flex:1,requires:"Ext.ux.grid.FiltersFeature",store:new Ext.data.Store({fields:["detailsName","allowedCount","currentlyUsed","availCount","currentUsage"],data:[]}),columns:{defaults:{sortable:false,hideable:false,menuDisabled:true,draggable:false,resizable:false},items:[{text:"Attribute",dataIndex:"detailsName",flex:1},{text:"Allowed",flex:1,dataIndex:"allowedCount",defaults:{cls:"groupHeaderLeftAlign"}},{text:used,flex:1,dataIndex:"currentlyUsed",defaults:{cls:"groupHeaderLeftAlign"},renderer:function(e){var b=e.indexOf("@#@");
var c=e;var d="";if(b!=-1){c=e.substring(0,b);d=e.substring(b+3);}var a=c;if(c!=0){a='<a id="mouse" onClick="ctrler.showOrgLicenseDetails(\''+d+"')\">"+c+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}return a;}},{text:"Available",flex:1,dataIndex:"availCount",defaults:{cls:"groupHeaderLeftAlign"}},{text:usage+" (%)",flex:1,dataIndex:"currentUsage",defaults:{cls:"groupHeaderLeftAlign"},renderer:function(c){var b=c.substring(c.indexOf("."));
c=c.substring(0,c.indexOf("."));var a="<center><div align='left' class='cell_border1 cell_border2'><span style='float:left;text-align:right;width:50%'>"+c+"</span><span style='float:right;text-align:left;width:50%'>"+b+"</span></div></center>";return a;}}]},margin:"15 10 5 10",viewConfig:{deferEmptyText:false,emptyText:'<div class="egFlexCenterByColumnWise" style="height:98%"><div class="iconInformation"></div><div class="commonErrorMsgText" id="noUsersAlrtDiv">'+noUsersFound+".</div></div>"},dockedItems:[{xtype:"toolbar",dock:"top",padding:10,ui:"toolbarBgWithBottomBorder",layout:{pack:"center"},items:[{xtype:"tbfill",},{xtype:"button",id:"saveCSVUserNew",iconCls:"iconCsv",margin:2,style:{background:"none",border:"0px"},listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"CSV"});
}}}]}]}]},{title:tab6Label,itemId:"tab6",id:"orgWiseTabNew",flex:1,layout:{type:"vbox",align:"stretch"},items:[{xtype:"treepanel",id:"unameTree",name:"unameTree",flex:1,frame:false,ui:"newGridPanel whiteHeader",border:true,autoScroll:true,scroll:true,margin:10,store:Ext.create("Ext.data.TreeStore",{fields:[{name:"UserID",sortType:Ext.data.SortTypes.asUCString},"totMons_TotalCnt","totMons_UsedCnt","totMons_AvailCnt","premMons_TotalCnt","premMons_UsedCnt","premMons_AvailCnt","basMons_TotalCnt","basMons_UsedCnt","basMons_AvailCnt","nwDev_TotalCnt","nwDev_UsedCnt","nwDev_AvailCnt","userBased_TotalCnt","userBased_UsedCnt","userBased_PeakCnt","userBased_PeakDate","userCnt_TotalCnt","userCnt_UsedCnt","userCnt_AvailCnt"],sorters:[{property:"UserID",direction:"ASC"}]}),rootVisible:false,columns:[{xtype:"treecolumn",dataIndex:"UserID",width:300,text:orgUnitName,renderer:function(l,h,i,j,n,o,k){var m=i.data["UserID"];
h.tdAttr="data-qtip='"+m+"' data-qclass='yellowTip'";return m;}},{text:totMons,flex:1,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:allowed,id:"totMons_TotalCnt",dataIndex:"totMons_TotalCnt"},{text:used,id:"user_totMons_UsedCnt",dataIndex:"totMons_UsedCnt",renderer:function(e){var b=e.indexOf("@#@");
var c=e;var d="";if(b!=-1){c=e.substring(0,b);d=e.substring(b+3);}var a=c;if(c!=0){a='<a id="mouse" onClick="ctrler.showOrgLicenseDetails(\''+d+"')\">"+c+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}return a;}},{text:available,id:"user_totMons_AvailCnt",dataIndex:"totMons_AvailCnt"}]},{text:basMons,flex:1,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:allowed,id:"basMons_TotalCnt",dataIndex:"basMons_TotalCnt"},{text:used,id:"user_basMons_UsedCnt",dataIndex:"basMons_UsedCnt",renderer:function(e){var b=e.indexOf("@#@");
var c=e;var d="";if(b!=-1){c=e.substring(0,b);d=e.substring(b+3);}var a=c;if(c!=0){a='<a id="mouse" onClick="ctrler.showOrgLicenseDetails(\''+d+"')\">"+c+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}return a;}},{text:available,id:"user_basMons_AvailCnt",dataIndex:"basMons_AvailCnt"}]},{text:preMons,flex:1,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:allowed,id:"user_premMons_TotalCnt",dataIndex:"premMons_TotalCnt"},{text:used,id:"user_premMons_UsedCnt",dataIndex:"premMons_UsedCnt",renderer:function(e){var b=e.indexOf("@#@");
var c=e;var d="";if(b!=-1){c=e.substring(0,b);d=e.substring(b+3);}var a=c;if(c!=0){a='<a id="mouse" onClick="ctrler.showOrgLicenseDetails(\''+d+"')\">"+c+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}return a;}},{text:available,id:"user_premMons_AvailCnt",dataIndex:"premMons_AvailCnt"}]},{text:nwDevs,flex:1,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:allowed,id:"user_nwDev_TotalCnt",dataIndex:"nwDev_TotalCnt"},{text:used,id:"user_nwDev_UsedCnt",dataIndex:"nwDev_UsedCnt",renderer:function(e){var b=e.indexOf("@#@");
var c=e;var d="";if(b!=-1){c=e.substring(0,b);d=e.substring(b+3);}var a=c;if(c!=0){a='<a id="mouse" onClick="ctrler.showOrgLicenseDetails(\''+d+"')\">"+c+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}return a;}},{text:available,id:"user_nwDev_AvailCnt",dataIndex:"nwDev_AvailCnt"}]},{text:usersCert,flex:1,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:allowed,id:"user_userBased_TotalCnt",dataIndex:"userBased_TotalCnt"},{text:used,id:"user_userBased_UsedCnt",dataIndex:"userBased_UsedCnt"},{text:"Peak usage last month",id:"user_userBased_PeakCnt",dataIndex:"userBased_PeakCnt"},{text:"Peak usage date",id:"user_userBased_PeakDate",dataIndex:"userBased_PeakDate"}]},{text:monUser,flex:1,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:allowed,id:"user_userCnt_TotalCnt",dataIndex:"userCnt_TotalCnt"},{text:used,id:"user_userCnt_UsedCnt",dataIndex:"userCnt_UsedCnt",renderer:function(e){var b=e.indexOf("@#@");
var c=e;var d="";if(b!=-1){c=e.substring(0,b);d=e.substring(b+3);}var a=c;if(c!=0){a='<a id="mouse" onClick="ctrler.showOrgLicenseDetails(\''+d+"')\">"+c+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}return a;}},{text:available,id:"user_userCnt_AvailCnt",dataIndex:"userCnt_AvailCnt"}]}],dockedItems:[{xtype:"toolbar",dock:"top",padding:10,ui:"toolbarBgWithBottomBorder",layout:{pack:"center"},items:[{xtype:"tbfill"},{xtype:"button",id:"saveCSVOrg",iconCls:"iconCsv",margin:2,style:{background:"none",border:"0px"},listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"CSV"});
}}},{xtype:"trigger",name:"searchbox",id:"searchbox",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",cls:"whitedropdown_search",emptyText:searchLbl,onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){egTitleSearch();},margin:"0 10 0 10",listeners:{change:function(b,a){egTitleSearch();
},specialkey:function(b,a){if(a.getKey()==a.ENTER){egTitleSearch();}}},getTriggerMarkup:function(){var e=this,c=0,h=(e.readOnly||e.hideTrigger),a,f=e.triggerBaseCls,g=[],d=Ext.dom.Element.unselectableCls,b="width:"+e.triggerWidth-20+"px;"+(h?"display:none;":""),j=e.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+d;
if(!e.trigger1Cls){e.trigger1Cls=e.triggerCls;}for(c=0;(a=e["trigger"+(c+1)+"Cls"])||c<1;c++){if(c==0){g.push({tag:"td",role:"presentation",valign:"top",cls:j,id:"MyTrigger_"+e.id+"_"+c,style:b+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+c,f,a].join(" "),role:"presentation"}});}else{g.push({tag:"td",role:"presentation",valign:"top",cls:j,id:"MyTrigger_"+e.id+"_"+c,style:b,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+c,f,a].join(" "),role:"presentation"}});
}}g[0].cn.cls+=" "+f+"-first";return Ext.DomHelper.markup(g);},disabled:false},{xtype:"button",id:"nodeExpand",iconCls:"iconExpandAll",hidden:true,tooltip:"Expand all",style:{background:"none",border:"0px"},listeners:{"click":function(a){this.hide();Ext.getCmp("nodeCollapse").show();Ext.getCmp("unameTree").expandAll();
}}},{xtype:"button",id:"nodeCollapse",iconCls:"iconCollapseAll",hidden:false,tooltip:"Collapse all",style:{background:"none",border:"0px"},listeners:{"click":function(a){this.hide();Ext.getCmp("nodeExpand").show();Ext.getCmp("unameTree").collapseAll();}}}]}],listeners:{afterrender:function(){var a=this.getView();
var b=publicJSON["isUsersCreated"];if(b!=null&&b!==undefined&&!b){Ext.DomHelper.append(Ext.get(a.id),{tag:"div",style:{"height":"9 0%","width":"100%","textAlign":"center","display":"table"},cls:"new-div-cls",id:"noUserFound",html:LoadAlert1});}}},clearFilter:function(){var a=this.getView();if(this.getRootNode()){this.getRootNode().cascadeBy(function(c,e){var d=e.getNodeByRecord(this);
if(d){Ext.get(d).setDisplayed("table-row");}},null,[this,a]);var b=Ext.getElementById("noDataFound");if(b){b.style.display="none";}}},filterBy:function(f,e){this.clearFilter();var a=this.getView(),c=this,d=[];if(this.getRootNode()){this.getRootNode().cascadeBy(function(h,i){var g=this;if(g&&g.data[e]&&g.data[e].toString().toLowerCase().indexOf(f.toLowerCase())>-1){c.expandPath(g.getPath());
while(g.parentNode){d.push(g.id);g=g.parentNode;}}},null,[c,a]);this.getRootNode().cascadeBy(function(g,i){var h=i.getNodeByRecord(this);if(h&&!Ext.Array.contains(d,this.id)&&this.data.id!=-1){Ext.get(h).setDisplayed("none");}},null,[c,a]);if(Ext.isEmpty(d)){var b=Ext.getElementById("noDataFound");if(b==null||b===undefined){Ext.DomHelper.append(Ext.get(a.id),{tag:"div",style:{"height":"100%","width":"100%","textAlign":"center","display":"table"},cls:"new-div-cls",id:"noDataFound",html:LoadSearchAlert});
}else{b.style.display="table";}}}}}]},{title:usrWiseUsg,itemId:"tab3",id:"usrWiseTab",hidden:true,layout:{type:"vbox",align:"stretch"},flex:1,listeners:{afterrender:function(h){var f=[];var m=["user_totMons","user_basMons","user_preMons","user_extAgns","user_usersCert","user_monTrgs","user_apps","user_nwDevs","user_servcs","user_segmns"];
var g=["_TotalCnt","_TotalUsg"];var b=Ext.getCmp("certInfoTab");var l=Ext.getCmp("userName");var e=b.getWidth();var c=l.getWidth();if(user_colCount<=5){e=e-(c);var a=e/user_colCount;x2=(a/2);for(var k=0;k<m.length;k++){for(var j=0;j<g.length;j++){f.push(m[k]+g[j]);}}for(var d=0;d<f.length;d++){Ext.getCmp(f[d]).setWidth(x2);
}}}},items:[{xtype:"customgrid",id:"UserWiseGrid",ui:"newGridPanel whiteHeader",border:true,flex:1,lockedViewConfig:{emptyText:""},requires:"Ext.ux.grid.FiltersFeature",store:new Ext.data.Store({fields:["Name","TotalCnt","TotalUsg","PremiumCnt","PremiumUsg","BasicCnt","BasicUsg","ExtAgentCnt","ExtAgentUsg","UserCnt","UserUsg","MonTrgtCnt","MonTrgtUsg","AppsCnt","AppsUsg","NWDevicesCnt","NWDevicesUsg","ServicesCnt","ServicesUsg","SegmentsCnt","SegmentsUsg"],data:[]}),columns:{defaults:{sortable:false,hideable:false,menuDisabled:true,draggable:false,resizable:false},items:[{text:users,dataIndex:"Name",id:"userName",width:305,locked:true},{text:totMons,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,id:"user_totMons_TotalCnt",dataIndex:"TotalCnt"},{text:usage+" (%)",id:"user_totMons_TotalUsg",dataIndex:"TotalUsg"}]},{text:basMons,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,id:"user_basMons_TotalCnt",dataIndex:"BasicCnt"},{text:usage+" (%)",id:"user_basMons_TotalUsg",dataIndex:"BasicUsg"}]},{text:preMons,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,id:"user_preMons_TotalCnt",dataIndex:"PremiumCnt"},{text:usage+" (%)",id:"user_preMons_TotalUsg",dataIndex:"PremiumUsg"}]},{text:extAgns,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,id:"user_extAgns_TotalCnt",dataIndex:"ExtAgentCnt"},{text:usage+" (%)",id:"user_extAgns_TotalUsg",dataIndex:"ExtAgentUsg"}]},{text:usersCert,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:user4VDIUsrs,id:"user_usersCert_TotalCnt",dataIndex:"UserCnt"},{text:usage+" (%)",id:"user_usersCert_TotalUsg",dataIndex:"UserUsg"}]},{text:monTrgs,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,id:"user_monTrgs_TotalCnt",dataIndex:"MonTrgtCnt"},{text:usage+" (%)",id:"user_monTrgs_TotalUsg",dataIndex:"MonTrgtUsg"}]},{text:apps,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,id:"user_apps_TotalCnt",dataIndex:"AppsCnt"},{text:usage+" (%)",id:"user_apps_TotalUsg",dataIndex:"AppsUsg"}]},{text:nwDevs,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,id:"user_nwDevs_TotalCnt",dataIndex:"NWDevicesCnt"},{text:usage+" (%)",id:"user_nwDevs_TotalUsg",dataIndex:"NWDevicesUsg"}]},{text:servcs,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,id:"user_servcs_TotalCnt",dataIndex:"ServicesCnt"},{text:usage+" (%)",id:"user_servcs_TotalUsg",dataIndex:"ServicesUsg"}]},{text:segmns,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,id:"user_segmns_TotalCnt",dataIndex:"SegmentsCnt"},{text:usage+" (%)",id:"user_segmns_TotalUsg",dataIndex:"SegmentsUsg"}]}]},margin:"15 10 5 10",viewConfig:{deferEmptyText:false,emptyText:'<div class="egFlexCenterByColumnWise" style="height:98%"><div class="iconInformation"></div><div class="commonErrorMsgText" id="noUsersAlrtDiv">'+noUsersFound+".</div></div>"},dockedItems:[{xtype:"toolbar",dock:"top",padding:10,ui:"toolbarBgWithBottomBorder",layout:{pack:"center"},items:[{xtype:"tbfill",},{xtype:"button",id:"saveCSVUser",iconCls:"iconCsv",margin:0,style:{background:"none",border:"0px"},listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"CSV"});
}}},{xtype:"trigger",cls:"whitedropdown_search",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",emptyText:"Search",disabled:true,margin:"0 0 0 10",onTrigger1Click:function(){this.reset();},onTrigger2Click:function(){ctrler.searchUser();},id:"searchBox",getTriggerMarkup:function(){var e=this,c=0,h=(e.readOnly||e.hideTrigger),a,f=e.triggerBaseCls,g=[],d=Ext.dom.Element.unselectableCls,b="width:"+e.triggerWidth+"px;"+(h?"display:none;":""),j=e.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+d;
if(!e.trigger1Cls){e.trigger1Cls=e.triggerCls;}for(c=0;(a=e["trigger"+(c+1)+"Cls"])||c<1;c++){if(c==0){g.push({tag:"td",role:"presentation",valign:"top",cls:j,id:"UserTrigger_"+c,style:b+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+c,f,a].join(" "),role:"presentation"}});}else{g.push({tag:"td",role:"presentation",valign:"top",cls:j,id:"UserTrigger_"+c,style:b,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+c,f,a].join(" "),role:"presentation"}});
}}g[0].cn.cls+=" "+f+"-first";return Ext.DomHelper.markup(g);}}]}]}]},{title:zonWiseUsg,itemId:"tab4",id:"zoneWiseTab",hidden:true,layout:{type:"vbox",align:"stretch"},flex:1,listeners:{afterrender:function(g){var e=[];var n=["totMons","basMons","preMons","extAgns","usersCert","monTrgs","apps","nwDevs","servcs","segmns"];
var f=["_TotalCnt","_TotalUsg"];var k=["_UserCnt","_UserUsg","_peakUsg","_peakDate"];var d=Ext.getCmp("certInfoTab");var j=Ext.getCmp("zoneName");var m=d.getWidth();var b=j.getWidth();if(colCount==4||colCount==5){m=m-(b);var a=(m)/colCount;x1=(a/2);for(var l=0;l<n.length;l++){if(n[l]=="usersCert"){for(var h=0;
h<k.length;h++){e.push(n[l]+k[h]);}}else{for(var h=0;h<f.length;h++){e.push(n[l]+f[h]);}}}for(var c=0;c<e.length;c++){Ext.getCmp(e[c]).setWidth(x1);}}}},items:[{xtype:"customgrid",id:"ZoneWiseGrid",flex:1,ui:"newGridPanel whiteHeader",border:true,lockedViewConfig:{emptyText:""},requires:"Ext.ux.grid.FiltersFeature",store:new Ext.data.Store({fields:["Name","TotalCnt","TotalUsg","PremiumCnt","PremiumUsg","BasicCnt","BasicUsg","ExtAgentCnt","ExtAgentUsg","UserCnt","UserUsg","peakUsg","peakDate","MonTrgtCnt","MonTrgtUsg","AppsCnt","AppsUsg","NWDevicesCnt","NWDevicesUsg","ServicesCnt","ServicesUsg","SegmentsCnt","SegmentsUsg"],data:[]}),columns:{defaults:{sortable:false,hideable:false,menuDisabled:true,draggable:false,resizable:false},items:[{text:zones,dataIndex:"Name",id:"zoneName",width:305,locked:true},{text:totMons,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,dataIndex:"TotalCnt",id:"totMons_TotalCnt",renderer:function(g,e,f,h,d,b){var c=f.data["Name"];
var a=g;if(a!="0"){result='<a id="mouse" onClick="ctrler.showZoneDetails(\''+totMons+","+c+"')\">"+a+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}else{result='<a id="mouse">'+g+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" /></a>';}return result;
}},{text:usage+" (%)",id:"totMons_TotalUsg",dataIndex:"TotalUsg"}]},{text:basMons,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,dataIndex:"BasicCnt",id:"basMons_TotalCnt",renderer:function(g,e,f,h,d,b){var c=f.data["Name"];var a=g;if(a!="0"){result='<a id="mouse" onClick="ctrler.showZoneDetails(\''+basMons+","+c+"')\">"+a+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';
}else{result='<a id="mouse">'+g+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" /></a>';}return result;}},{text:usage+" (%)",id:"basMons_TotalUsg",dataIndex:"BasicUsg"}]},{text:preMons,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,dataIndex:"PremiumCnt",id:"preMons_TotalCnt",renderer:function(g,e,f,h,d,b){var c=f.data["Name"];
var a=g;if(a!="0"){result='<a id="mouse" onClick="ctrler.showZoneDetails(\''+preMons+","+c+"')\">"+a+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}else{result='<a id="mouse">'+g+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" /></a>';}return result;
}},{text:usage+" (%)",id:"preMons_TotalUsg",dataIndex:"PremiumUsg"}]},{text:extAgns,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,dataIndex:"ExtAgentCnt",id:"extAgns_TotalCnt",renderer:function(g,e,f,h,d,b){var c=f.data["Name"];var a=g;if(a!="0"){result='<a id="mouse" onClick="ctrler.showZoneDetails(\''+extAgns+","+c+"')\">"+a+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';
}else{result='<a id="mouse" >'+g+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif"/></a>';}return result;}},{text:usage+" (%)",id:"extAgns_TotalUsg",dataIndex:"ExtAgentUsg"}]},{text:usersCert,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:user4VDIUsrs,id:"usersCert_UserCnt",dataIndex:"UserCnt"},{text:usage+" (%)",id:"usersCert_UserUsg",dataIndex:"UserUsg"},{text:"Peak usage <br> last month",id:"usersCert_peakUsg",dataIndex:"peakUsg"},{text:"Peak usage date",id:"usersCert_peakDate",dataIndex:"peakDate"}]},{text:monTrgs,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,dataIndex:"MonTrgtCnt",id:"monTrgs_TotalCnt",renderer:function(g,e,f,h,d,b){var c=f.data["Name"];
var a=g;if(a!="0"){result='<a id="mouse" onClick="ctrler.showZoneDetails(\''+monTrgs+","+c+"')\">"+a+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}else{result='<a id="mouse">'+g+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';
}return result;}},{text:usage+" (%)",id:"monTrgs_TotalUsg",dataIndex:"MonTrgtUsg"}]},{text:apps,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,dataIndex:"AppsCnt",id:"apps_TotalCnt",renderer:function(g,e,f,h,d,b){var c=f.data["Name"];var a=g;if(a!="0"){result='<a id="mouse" onClick="ctrler.showZoneDetails(\''+apps+","+c+"')\">"+a+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';
}else{result='<a id="mouse" >'+g+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif"/></a>';}return result;}},{text:usage+" (%)",id:"apps_TotalUsg",dataIndex:"AppsUsg"}]},{text:nwDevs,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,dataIndex:"NWDevicesCnt",id:"nwDevs_TotalCnt",renderer:function(g,e,f,h,d,b){var c=f.data["Name"];
var a=g;if(a!="0"){result='<a id="mouse" onClick="ctrler.showZoneDetails(\''+nwDevs+","+c+"')\">"+a+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}else{result='<a id="mouse">'+g+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif"/></a>';}return result;
}},{text:usage+" (%)",id:"nwDevs_TotalUsg",dataIndex:"NWDevicesUsg"}]},{text:servcs,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,dataIndex:"ServicesCnt",id:"servcs_TotalCnt",renderer:function(g,e,f,h,d,b){var c=f.data["Name"];var a=g;if(a!="0"){result='<a id="mouse" onClick="ctrler.showZoneDetails(\''+servcs+","+c+"')\">&nbsp;"+a+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';
}else{result='<a id="mouse">&nbsp;'+g+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif"/></a>';}return result;}},{text:usage+" (%)",id:"servcs_TotalUsg",dataIndex:"ServicesUsg"}]},{text:segmns,defaults:{cls:"groupHeaderLeftAlign"},columns:[{text:used,dataIndex:"SegmentsCnt",id:"segmns_TotalCnt",renderer:function(g,e,f,h,d,b){var c=f.data["Name"];
var a=g;if(a!="0"){result='<a id="mouse"onClick="ctrler.showZoneDetails(\''+segmns+","+c+"')\">&nbsp;"+a+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';}else{result='<a id="mouse">&nbsp;'+g+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="/final/images/spacer.gif" style="cursor:hand"/></a>';
}return result;}},{text:usage+" (%)",id:"segmns_TotalUsg",dataIndex:"SegmentsUsg"}]}]},margin:"15 10 5 10",viewConfig:{deferEmptyText:false,emptyText:'<div class="egFlexCenterByColumnWise" style="height:98%"><div class="iconInformation"></div><div class="commonErrorMsgText" id="noZonesAlrtDiv">'+noZonesFound+".</div></div>"},dockedItems:[{xtype:"toolbar",dock:"top",padding:10,ui:"toolbarBgWithBottomBorder",layout:{pack:"center"},items:[{xtype:"tbfill",},{xtype:"button",id:"saveCSVZone",iconCls:"iconCsv",margin:0,style:{background:"none",border:"0px"},listeners:{afterrender:function(){Ext.create("Ext.tip.ToolTip",{target:this.id,anchor:"top",cls:"yellowTip",trackMouse:true,html:"CSV"});
}}},{xtype:"trigger",cls:"whitedropdown_search",trigger1Cls:"x-form-clear-trigger",trigger2Cls:"x-form-search-trigger",emptyText:"Search",disabled:true,onTrigger1Click:function(){this.reset();},margin:"0 0 0 10",onTrigger2Click:function(){ctrler.searchUser();},id:"searchBoxZone",getTriggerMarkup:function(){var e=this,c=0,h=(e.readOnly||e.hideTrigger),a,f=e.triggerBaseCls,g=[],d=Ext.dom.Element.unselectableCls,b="width:"+e.triggerWidth+"px;"+(h?"display:none;":""),j=e.extraTriggerCls+" "+Ext.baseCSSPrefix+"trigger-cell "+d;
if(!e.trigger1Cls){e.trigger1Cls=e.triggerCls;}for(c=0;(a=e["trigger"+(c+1)+"Cls"])||c<1;c++){if(c==0){g.push({tag:"td",role:"presentation",valign:"top",cls:j,id:"ZoneTrigger_"+c,style:b+"display:none;",cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+c,f,a].join(" "),role:"presentation"}});}else{g.push({tag:"td",role:"presentation",valign:"top",cls:j,id:"ZoneTrigger_"+c,style:b,cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+c,f,a].join(" "),role:"presentation"}});
}}g[0].cn.cls+=" "+f+"-first";return Ext.DomHelper.markup(g);}}]}]}]},]}]});Ext.define("Ext.ux.fix.Ext.grid.column.Column",{override:"Ext.grid.column.Column",isOnLeftEdge:function(a){return this.el&&this.callParent(arguments);}});Ext.define("Ext.ux.fix.Ext.grid.column.Column",{override:"Ext.grid.column.Column",isOnRightEdge:function(a){return this.el&&this.callParent(arguments);
}});Ext.define("Ext.ux.fix.Ext.grid.plugin.HeaderResizer",{override:"Ext.grid.plugin.HeaderResizer",onHeaderCtMouseMove:function(b,a){if(!this.headerCt.dragging){var c=b.getTarget("."+this.colHeaderCls,3,true);if(c){overHeader=Ext.getCmp(c.id);if(!overHeader.el){return;}}}this.callParent(arguments);}});
