Ext.define("SoftwareAvailability.view.Main",{extend:"utilities.OuterPanel",alias:"widget.main",requires:["SoftwareAvailability.view.FormItems","SoftwareAvailability.view.ErrorContainer","configutilities.Tools","Ext.ux.data.PagingMemoryProxy"],id:"main",title:config.title.mainPageTitle,layout:{align:"stretch",type:"vbox"},margin:"8 8 0 8",tools:[{xtype:"button",text:config.title.backTitle,cls:"backbutton",id:"backBtnMain",iconCls:"iconBack",hidden:true},{xtype:"tbseparator",id:"bkSeperator",hidden:true},{xtype:"tools"}],items:[{xtype:"formitems",margin:"8 8 0 8"},{xtype:"panel",id:"hiddenPanel",cls:"containerShadow config_containerShadow",hidden:true,flex:1,scroll:true,autoScroll:true,margin:8,items:[{xtype:"softwareavailabilitychart",id:"chartPlaceHolder",margin:"10 10 0 10"},{xtype:"grid",cls:"gridSkin",id:"softwareNameCountGrid",margin:"0 10 10 10",store:new Ext.data.Store({fields:["SoftwareName","availableCount","unavailableCount"],data:[],sortOnLoad:false}),dockedItems:[{xtype:"toolbar",padding:"5 0",items:[{xtype:"pagingtoolbar",id:"pagingtoolbartopid",store:this.store,cls:"pagingtoolbar",displayInfo:true,width:"98%",hidden:true},{xtype:"tbfill"},{xtype:"tbseparator",id:"tbseparatorId",hidden:true},{xtype:"button",id:"tc",name:"tc",iconCls:"iconCollapseAll",pressedCls:"iconExpandAll",enableToggle:true,style:{background:"none",border:"0px"},}]},{xtype:"pagingtoolbar",id:"pagingtoolbarbottomid",store:this.store,dock:"bottom",cls:"pagingtoolbar",displayInfo:true,hidden:true}],queryMode:"local",viewConfig:{deferEmptyText:true,cls:"gridSkin",},emptyText:"<table border='0' height='350px' width='100%'><tr><td align=center vlaign=top><img src='/final/admin/eg_images/exclamation-icon.gif'><div>Software not available in systems of the selected OS</div></td></tr></table>",columns:{defaults:{sortable:true,hideable:false,menuDisabled:true,draggable:false,resizable:false,flex:1},items:[{text:config.title.sftwrNm,dataIndex:"SoftwareName",width:280,height:40,renderer:function(a){if(a!=""){return a;
}}},{text:config.title.nmbrOfCmpntsHvngSftwrs,dataIndex:"availableCount",width:280,height:40,menuDisabled:true,renderer:function(h,a,c,e,j,i,f){if(h==0){return h;}else{var b=i.data.items[e].raw.SoftwareName;var g="";var d=b.lastIndexOf("(");if(b.lastIndexOf("(")!=-1){g=b.substring(0,d);}return'<a id="mouse" style="vertical-align:text-bottom" href='+config.urls.configServletURL+"?cmd=FilterBySftwrHtfx&ec_criteria="+encodeURIComponent(publicJSON.selectedEcOpt)+"&viewBy="+encodeURIComponent(publicJSON.selectedEcOpt)+"&ec_userOption="+encodeURIComponent(publicJSON.selectedUserOption)+"&softwareOrHotfix=Software&filterBy="+encodeURIComponent("Available Components")+"&osName="+encodeURIComponent(publicJSON.selectedOS)+"&filterByReqFrom=SoftwareAndHotfixDashboardJson&info="+encodeURIComponent(filterEncode(g))+"&cmpntType=All&showBackButton=true&softwareName="+encodeURIComponent(filterEncode(publicJSON.selectedSoftwareName))+"&reqFromPage=AvailabilityUnAvailabilityPage&com.eg.CSRF_NONCE="+publicJSON.CSRF_NONCE+">"+h+"</a>";
}}},{text:config.title.nmbrOfCmpntsNotHvngSftwrs,dataIndex:"unavailableCount",width:280,height:40,renderer:function(h,a,c,e,j,i,f){if(h==0){return h;}else{var b=i.data.items[e].raw.SoftwareName;var g="";var d=b.lastIndexOf("(");if(b.lastIndexOf("(")!=-1){g=b.substring(0,d);}return'<a id="mouse" style="vertical-align:text-bottom" href='+config.urls.configServletURL+"?cmd=FilterBySftwrHtfx&ec_criteria="+encodeURIComponent(publicJSON.selectedEcOpt)+"&viewBy="+encodeURIComponent(publicJSON.selectedEcOpt)+"&ec_userOption="+encodeURIComponent(publicJSON.selectedUserOption)+"&softwareOrHotfix=Software&filterBy="+encodeURIComponent("Unavailable Components")+"&osName="+encodeURIComponent(publicJSON.selectedOS)+"&filterByReqFrom=SoftwareAndHotfixDashboardJson&info="+encodeURIComponent(filterEncode(g))+"&cmpntType=All&showBackButton=true&reqFromPage=AvailabilityUnAvailabilityPage&softwareName="+encodeURIComponent(filterEncode(publicJSON.selectedSoftwareName))+"&com.eg.CSRF_NONCE="+publicJSON.CSRF_NONCE+">"+h+"</a>";
}}},]}},]},{xtype:"errorcontainer",hidden:true,margin:"10 10 10 10",}]});