var normal=0;var refresh=0;function isHyphen(a){if(a!=null&&a!=undefined&&a=="-"){return -2;}else{return -1;}}Ext.define("microsoftDashboard.view.CommonGrid",{extend:"Ext.panel.Panel",alias:"widget.commongrid",autoDestroy:true,header:false,bodyPadding:"0 0 0 0",layout:"fit",margin:"0 5 5 5",alignR:"",overriderRenderer:function(d,e,c,a){var b=this;
return function(f){return f;};b.callParent();},config:{data:{},storeData:[],storefileds:[],gridColumns:[]},constructor:function(a){var b=this;b.initConfig(a);b.callParent(arguments);},loadData:function(g){var e=this;e.storefileds=[];e.storeData=[];e.gridColumns=[];if(!Ext.isEmpty(g)){if(g.title){Ext.getCmp(e.id).setTitle(g.title);
}if(e.data.columns){var a=e.data.title;for(var d=0;d<g.columns.length;d++){if(g.dataSet&&g.dataSet.items!=null){g.columns[d].renderer=e.overriderRenderer(g.columns[d],g.dataSet.items[d],g.fields,d);g.columns[d].renderer=function(p,h,l,o,r){var i,k,m;var q;try{i=e.data.dataSet.items[o].subjectVariable;
k=e.data.dataSet.items[o].test+"~!~"+e.data.dataSet.items[o].measure;m=e.data.dataSet.items[o].DESCRIPTION;if(m.indexOf("'")>0){m=m.replace("'","$quote$");}q=e.data.columns[r].dataIndex;}catch(n){}if(!Ext.isEmpty(i)&&p!="-"){var s;if(q=="HIGH"){s=q;}if(q=="INTERMEDIATE"){s=q;}if(q=="LOW"){s=q;}if(p=="HIGH"){p='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="margin-top: -1px;" class="x-action-col-icon x-action-col-0   state_HIGH">';
}else{if(p=="INTERMEDIATE"){p='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="margin-top: -1px;" class="x-action-col-icon x-action-col-0   state_INTERMEDIATE"';}else{if(p=="LOW"){p='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="style="margin-top: -1px;" class="x-action-col-icon x-action-col-0   state_LOW"';
}}}if(r!=0&&(e.alignR!=undefined&&e.alignR!=null&&e.alignR)){p='<div style="text-align:center">'+p+"</div>";}var j="javascript:openAlarmPopup('"+a+"','"+i+"','"+s+"','"+k+"','"+m+"')";p='<a href="'+j+'">'+p+"</a>";}else{if(p=="HIGH"){p='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="margin-top: -1px;" class="x-action-col-icon x-action-col-0   state_HIGH">';
}else{if(p=="INTERMEDIATE"){p='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="margin-top: -1px;" class="x-action-col-icon x-action-col-0   state_INTERMEDIATE"';}else{if(p=="LOW"){p='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="style="margin-top: -1px;" class="x-action-col-icon x-action-col-0   state_LOW"';
}}}if(r!=0&&(e.alignR!=undefined&&e.alignR!=null&&e.alignR)){p='<div style="text-align:center">'+p+"</div>";}if(requestParams.activeView=="Applications_View"&&!Ext.isEmpty(e.data)&&!Ext.isEmpty(e.data.dataSet)&&!Ext.isEmpty(e.data.dataSet.items[o])&&!Ext.isEmpty(e.data.dataSet.items[o].layerURL)&&e.data.dataSet.items[o].layerURL!=undefined&&e.data.dataSet.items[o].layerURL!=null){p="<a href='"+e.data.dataSet.items[o].layerURL+"'>"+p+"</a>";
}}return p;};g.columns[d].menuDisabled=true;g.columns[d].draggable=false;}else{if(g.data&&g.data.items!=null){if(g.columns[d].dataIndex=="site collection"){g.columns[d].renderer=e.overriderRenderer(g.columns[d],g.data.items[d],g.fields,d);g.columns[d].renderer=function(k,i,h,n,j){var m="";try{m=h.raw["stateValue"];
}catch(l){}if(!Ext.isEmpty(m)){k='<img src="/final/images/clear.png" class="state_'+m+'" style="float:left;margin-right:8px;margin-top:0px;">'+k;}return k;};}else{if(g.columns[d].dataIndex=="SUCCESS"||g.columns[d].dataIndex=="PENDING PROVISIONINGS"||g.columns[d].dataIndex=="PENDING ACTIVATIONS"||g.columns[d].dataIndex=="DAYS TO EXPIRE"||g.columns[d].dataIndex=="LICENSE USAGE (%)"){g.columns[d].renderer=e.overriderRenderer(g.columns[d],g.data.items[d],g.fields,d);
g.columns[d].renderer=function(l,i,h,o,j){var n="";var k="";try{if(!Ext.isEmpty(h.raw[g.columns[j].dataIndex+"_stateValue"])){n=h.raw[g.columns[j].dataIndex+"_stateValue"];}if(!Ext.isEmpty(h.raw[g.columns[j].dataIndex+"_layerLink"])){k=h.raw[g.columns[j].dataIndex+"_layerLink"];}}catch(m){}if(!Ext.isEmpty(n)&&l!="<span style='cursor:default;'>-</span>"){if(!Ext.isEmpty(k)&&k.trim().length>-1&&l!="<span style='cursor:default;'>-</span>"){k="'"+k+"'";
l='<div style="display:flex;"><div style="width:50%"><img src="/final/images/clear.png" onClick="loadPopup('+k+')" class="state_'+n+'" style="cursor:pointer;float:right;margin-top:-2px;"></div><div onClick="loadPopup('+k+')" style="width:50%;text-align: left;margin-left: 10px;">'+l+"</div></div>";}else{l='<div style="display:flex;"><div style="width:50%"><img src="/final/images/clear.png" class="state_'+n+'" style="float:right;margin-top:-2px;"></div><div style="width:50%;text-align: left;margin-left: 10px;">'+l+"</div></div>";
}}else{if(!Ext.isEmpty(k)&&k.trim().length>-1&&l!="<span style='cursor:default;'>-</span>"){k="'"+k+"'";l='<div onClick="loadPopup('+k+')">'+l+"</div>";}}return l;};}else{if(g.columns[d].dataIndex=="Licenses"){g.columns[d].renderer=e.overriderRenderer(g.columns[d],g.data.items[d],g.fields,d);g.columns[d].renderer=function(o,h,k,m,p){var q=k.get("LICENSE USAGE (%)");
q=$(q).text();var j=k.get("color");if(j==undefined||j==null){j="red";}if(q!=undefined&&q!=null){var l=o;if(o.indexOf("!")>-1){var n=o.substring(0,o.indexOf("!"));var i=o.substring(o.indexOf("!")+1);l='<table cellspacing="0" cellpadding="0" border="0" style="table-layout:auto;width:100%;"><tbody><tr><td align="left" style="width:45px"><span class="decimal-align" style="width:px"><div class="f12-normal" style="white-space:nowrap;">'+n+'</div><div class="f12-normal" style="white-space:nowrap;">'+i+'</div></span><span class="decimal-align2" style="width:20px"><img src="/final/images/spacer.gif" style="width: 20px;height:1px;"> </span></td><td align="right"><table class="progressBarBg" width="250" cellpadding="0" cellspacing="0" border="0" height="6" style="margin-right:15px;"><tbody><tr><td align="left" width="100%" height="6"><table width="'+q+'%" height="6" cellpadding="0" cellspacing="0" border="0"><tbody><tr><td style="background:'+j+';border-radius:16px;" width="100%"></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>';
}else{l='<table cellspacing="0" cellpadding="0" border="0" style="table-layout:auto;width:100%;"><tbody><tr><td align="left" style="width:45px"><span class="decimal-align" style="width:px"><div class="f12-normal" style="white-space:nowrap;">'+o+'</div></span><span class="decimal-align2" style="width:20px"><img src="/final/images/spacer.gif" style="width: 20px;height:1px;"> </span></td><td align="right"><table class="progressBarBg"  width="250" cellpadding="0" cellspacing="0" border="0" height="6" style="margin-right:15px;"><tbody><tr><td align="left" width="100%" height="6"><table width="'+q+'%" height="6" cellpadding="0" cellspacing="0" border="0"><tbody><tr><td style="background:'+j+';border-radius:16px;" width="100%"></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>';
}return l;}else{return o;}};}else{if(g.columns[d].dataIndex=="StatusIcon"){g.columns[d].width=50;g.columns[d].flex=null;g.columns[d].renderer=e.overriderRenderer(g.columns[d],g.data.items[d],g.fields,d);g.columns[d].renderer=function(m,i,h,n,k){var l=m;if(l!=undefined&&l!=null){var j="";j='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="height:17px !important;margin-top:-0.3em;" class="x-action-col-icon x-action-col-0   '+l+'">';
return j;}};}else{if(g.columns[d].dataIndex=="ddUrl"){g.columns[d]={xtype:"actioncolumn",align:"center",width:50,sortable:false,menuDisabled:true,items:[{iconcls:"iconDiagnosis",getClass:function(j,i,h){var k=h.get("ddUrl");if(Ext.isEmpty(k)||k==null||k=="-"){return"iconSpacer actionIcon mouseOverRemove";
}else{return"iconDiagnosis actioncolumngap";}},tooltip:"Diagnosis",handler:function(i,l,h){var k=i.getStore().getAt(l);var j=k.get("ddUrl");if(!Ext.isEmpty(j)&&j!=null&&j!="-"){j=decodeURIComponent(j);this.fireEvent("itemClick",loadPopup(j));}}}]};}else{if(g.columns[d].dataIndex=="measureGrpUrl"){g.columns[d]={xtype:"actioncolumn",align:"center",width:50,sortable:false,menuDisabled:true,items:[{iconcls:"iconLineChart",getClass:function(j,i,h){var k=h.get("measureGrpUrl");
if(Ext.isEmpty(k)||k==null||k=="-"){return"iconSpacer actionIcon mouseOverRemove";}else{return"iconLineChart actioncolumngap";}},tooltip:"Chart ",handler:function(i,l,h){var k=i.getStore().getAt(l);var j=k.get("measureGrpUrl");if(!Ext.isEmpty(j)&&j!=null&&j!="-"){j=decodeURIComponent(j);this.fireEvent("itemClick",loadPopup(j));
}}}]};}else{g.columns[d].renderer=e.overriderRenderer(g.columns[d],g.data.items[d],g.fields,d);g.columns[d].renderer=function(k,i,h,l,j){if(h.raw.hasOwnProperty("layerModelUrl")){i.tdAttr='style="cursor:pointer;"';}return k;};}}}}}}}}if(e.alignR!=undefined&&e.alignR!=null&&e.alignR){var f=g.columns[d].text;
if(f!=undefined&&f!=null){if(f=="alarmCritical"){g.columns[d].text='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="height:17px !important;margin-top: -0.23em;" class="x-action-col-icon x-action-col-0   state_HIGH">';}else{if(f=="alarmMajor"){g.columns[d].text='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="height:17px !important;margin-top: -0.23em;" class="x-action-col-icon x-action-col-0   state_INTERMEDIATE">';
}else{if(f=="alarmMinor"){g.columns[d].text='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="height:17px !important;margin-top: -0.23em;" class="x-action-col-icon x-action-col-0   state_LOW">';}}}}}}var b=e.data.columns;for(var c=0;c<b.length;
c++){if(b[c].dataIndex=="USER"||b[c].dataIndex=="APPLICATION"||b[c].dataIndex=="SERVER"||b[c].dataIndex=="PROBLEM"){b[c]["align"]="center";}if(b[c].dataIndex!="USER"||b[c].dataIndex!="APPLICATION"||b[c].dataIndex!="SERVER"||b[c].dataIndex!="PROBLEM"){b[c].doSort=function(i){var h=this.up("grid").store;
var j=this.getSortParam();h.sort({property:j,direction:i,sorterFn:function(l,k){l=l.get(j);k=k.get(j);if(isNaN(l)&&isNaN(k)){if(l.indexOf("<span")>-1||l.indexOf("<div")>-1){l=$(l).text();}if(k.indexOf("<span")>-1||k.indexOf("<div")>-1){k=$(k).text();}if(!isNaN(l)&&!isNaN(k)){l=isNaN(l)?isHyphen(l):l;
l=Ext.isNumber(l)?l:parseFloat(String(l),10);k=isNaN(k)?isHyphen(k):k;k=Ext.isNumber(k)?k:parseFloat(String(k),10);}return l>k?1:(l<k?-1:0);}else{l=isNaN(l)?isHyphen(l):l;l=Ext.isNumber(l)?l:parseFloat(String(l),10);k=isNaN(k)?isHyphen(k):k;k=Ext.isNumber(k)?k:parseFloat(String(k),10);return(l>k)?1:((l<k)?-1:0);
}}});};}}e.gridColumns=b;}if(g.fields){e.storefileds=g.fields;}if((!Ext.isEmpty(this.iSBrro)&&this.iSBrro)||(!Ext.isEmpty(this.ifSessions)&&this.ifSessions)||(!Ext.isEmpty(this.iSLogon)&&this.iSLogon)){if(g.DataSet&&g.DataSet[0].data!=undefined&&g.DataSet[0].data!=null&&Ext.isEmpty(g.DataSet[0].data[0].Error)){e.storeData=g.DataSet[0].data;
}}else{if(g.data&&g.data.items!=undefined&&g.data.items!=null){e.storeData=g.data.items;}}}Ext.getCmp(e.id+"_grid").getStore().loadData(e.storeData);Ext.defer(function(){Ext.getCmp(e.id+"_grid").reconfigure(Ext.getCmp(e.id+"_grid").getStore(),e.gridColumns);Ext.getCmp(e.id+"_grid").getView().refresh();
},10);},initComponent:function(){var e=this;if(!Ext.isEmpty(e.data)){if(e.data.title){e.title="";if(Ext.getCmp("grid_id")!=undefined&&Ext.getCmp("grid_id")!=null){Ext.getCmp("grid_id").setTitle(e.data.title);}}if(e.data.columns){var a=e.data.title;for(var d=0;d<e.data.columns.length;d++){if(e.data.dataSet&&e.data.dataSet.items!=undefined&&e.data.dataSet.items!=null){e.data.columns[d].renderer=e.overriderRenderer(e.data.columns[d],e.data.dataSet.items[d],e.data.fields,d);
e.data.columns[d].renderer=function(o,g,k,n,q){var h,j,l;var p;try{h=e.data.dataSet.items[n].subjectVariable;j=e.data.dataSet.items[n].test+"~!~"+e.data.dataSet.items[n].measure;l=e.data.dataSet.items[n].DESCRIPTION;if(l.indexOf("'")>0){l=l.replace("'","$quote$");}p=e.data.columns[q].dataIndex;}catch(m){}if(!Ext.isEmpty(h)&&o!="-"){var r;
if(p=="HIGH"){r=p;}if(p=="INTERMEDIATE"){r=p;}if(p=="LOW"){r=p;}if(o=="HIGH"){o='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="margin-top: -1px;" class="x-action-col-icon x-action-col-0   state_HIGH">';}else{if(o=="INTERMEDIATE"){o='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="margin-top: -1px;" class="x-action-col-icon x-action-col-0   state_INTERMEDIATE"';
}else{if(o=="LOW"){o='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="style="margin-top: -1px;" class="x-action-col-icon x-action-col-0   state_LOW"';}}}if(q!=0&&(e.alignR!=undefined&&e.alignR!=null&&e.alignR)){o='<div style="text-align:center">'+o+"</div>";
}var i="javascript:openAlarmPopup('"+a+"','"+h+"','"+r+"','"+j+"','"+l+"')";o='<a href="'+i+'">'+o+"</a>";}else{if(o=="HIGH"){o='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="margin-top: -1px;" class="x-action-col-icon x-action-col-0   state_HIGH">';
}else{if(o=="INTERMEDIATE"){o='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="margin-top: -1px;" class="x-action-col-icon x-action-col-0   state_INTERMEDIATE"';}else{if(o=="LOW"){o='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="style="margin-top: -1px;" class="x-action-col-icon x-action-col-0   state_LOW"';
}}}if(q!=0&&(e.alignR!=undefined&&e.alignR!=null&&e.alignR)){o='<div style="text-align:center">'+o+"</div>";}if(requestParams.activeView=="Applications_View"&&!Ext.isEmpty(e.data)&&!Ext.isEmpty(e.data.dataSet)&&!Ext.isEmpty(e.data.dataSet.items[n])&&!Ext.isEmpty(e.data.dataSet.items[n].layerURL)&&e.data.dataSet.items[n].layerURL!=undefined&&e.data.dataSet.items[n].layerURL!=null){o="<a href='"+e.data.dataSet.items[n].layerURL+"'>"+o+"</a>";
}}return o;};e.data.columns[d].menuDisabled=true;e.data.columns[d].draggable=false;}else{if(e.data.data&&e.data.data.items!=null){if(e.data.columns[d].dataIndex=="site collection"){e.data.columns[d].renderer=e.overriderRenderer(e.data.columns[d],e.data.data.items[d],e.data.fields,d);e.data.columns[d].renderer=function(j,h,g,m,i){var l="";
try{l=g.raw["stateValue"];}catch(k){}if(!Ext.isEmpty(l)){j='<img src="/final/images/clear.png" class="state_'+l+'" style="float:left;margin-right:8px;margin-top:0px;">'+j;}return j;};}else{if(e.data.columns[d].dataIndex=="SUCCESS"||e.data.columns[d].dataIndex=="PENDING PROVISIONINGS"||e.data.columns[d].dataIndex=="PENDING ACTIVATIONS"||e.data.columns[d].dataIndex=="DAYS TO EXPIRE"||e.data.columns[d].dataIndex=="LICENSE USAGE (%)"){e.data.columns[d].renderer=e.overriderRenderer(e.data.columns[d],e.data.data.items[d],e.data.fields,d);
e.data.columns[d].renderer=function(k,h,g,n,i){var m="";var j="";try{if(!Ext.isEmpty(g.raw[e.data.columns[i].dataIndex+"_stateValue"])){m=g.raw[e.data.columns[i].dataIndex+"_stateValue"];}if(!Ext.isEmpty(g.raw[e.data.columns[i].dataIndex+"_layerLink"])){j=g.raw[e.data.columns[i].dataIndex+"_layerLink"];
}}catch(l){}if(!Ext.isEmpty(m)&&k!="<span style='cursor:default;'>-</span>"){if(!Ext.isEmpty(j)&&j.trim().length>-1&&k!="<span style='cursor:default;'>-</span>"){j="'"+j+"'";k='<div style="display:flex;"><div style="width:50%"><img src="/final/images/clear.png" onClick="loadPopup('+j+')" class="state_'+m+'" style="cursor:pointer;float:right;margin-top:-2px;"></div><div onClick="loadPopup('+j+')" style="width:50%;text-align: left;margin-left: 10px;">'+k+"</div></div>";
}else{k='<div style="display:flex;"><div style="width:50%"><img src="/final/images/clear.png" class="state_'+m+'" style="float:right;margin-top:-2px;"></div><div style="width:50%;text-align: left;margin-left: 10px;">'+k+"</div></div>";}}else{if(!Ext.isEmpty(j)&&j.trim().length>-1&&k!="<span style='cursor:default;'>-</span>"){j="'"+j+"'";
k='<div onClick="loadPopup('+j+')">'+k+"</div>";}}return k;};}else{if(e.data.columns[d].dataIndex=="Licenses"){e.data.columns[d].renderer=e.overriderRenderer(e.data.columns[d],e.data.data.items[d],e.data.fields,d);e.data.columns[d].renderer=function(n,g,j,l,o){var p=j.get("LICENSE USAGE (%)");p=$(p).text();
var i=j.get("color");if(i==undefined||i==null){i="red";}if(p!=undefined&&p!=null){var k=n;if(n.indexOf("!")>-1){var m=n.substring(0,n.indexOf("!"));var h=n.substring(n.indexOf("!")+1);k='<table cellspacing="0" cellpadding="0" border="0" style="table-layout:auto;width:100%;"><tbody><tr><td align="left" style="width:45px"><span class="decimal-align" style="width:px"><div class="f12-normal" style="white-space:nowrap;">'+m+'</div><div class="f12-normal" style="white-space:nowrap;">'+h+'</div></span><span class="decimal-align2" style="width:20px"><img src="/final/images/spacer.gif" style="width: 20px;height:1px;"> </span></td><td align="right"><table class="progressBarBg"  width="250" cellpadding="0" cellspacing="0" border="0" height="6" style="margin-right:15px;"><tbody><tr><td align="left" width="100%" height="6"><table width="'+p+'%" height="6" cellpadding="0" cellspacing="0" border="0"><tbody><tr><td style="background:'+i+';border-radius:16px;" width="100%"></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>';
}else{k='<table cellspacing="0" cellpadding="0" border="0" style="table-layout:auto;width:100%;"><tbody><tr><td align="left" style="width:45px"><span class="decimal-align" style="width:px"><div class="f12-normal" style="white-space:nowrap;">'+n+'</div></span><span class="decimal-align2" style="width:20px"><img src="/final/images/spacer.gif" style="width: 20px;height:1px;"> </span></td><td align="right"><table class="progressBarBg"  width="250" cellpadding="0" cellspacing="0" border="0" height="6" style="margin-right:15px;"><tbody><tr><td align="left" width="100%" height="6"><table width="'+p+'%" height="6" cellpadding="0" cellspacing="0" border="0"><tbody><tr><td style="background:'+i+';border-radius:16px;" width="100%"></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>';
}return k;}else{return n;}};}else{if(e.data.columns[d].dataIndex=="StatusIcon"){e.data.columns[d].width=50;e.data.columns[d].flex=null;e.data.columns[d].renderer=e.overriderRenderer(e.data.columns[d],e.data.data.items[d],e.data.fields,d);e.data.columns[d].renderer=function(l,h,g,m,j){var k=l;if(k!=undefined&&k!=null){var i="";
i='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="height:17px !important;margin-top:-0.3em;" class="x-action-col-icon x-action-col-0   '+k+'">';return i;}};}else{if(e.data.columns[d].dataIndex=="ddUrl"){e.data.columns[d]={xtype:"actioncolumn",align:"center",width:50,sortable:false,menuDisabled:true,items:[{iconcls:"iconDiagnosis",getClass:function(i,h,g){var j=g.get("ddUrl");
if(Ext.isEmpty(j)||j==null||j=="-"){return"iconSpacer actionIcon mouseOverRemove";}else{return"iconDiagnosis actioncolumngap";}},tooltip:"Diagnosis",handler:function(h,k,g){var j=h.getStore().getAt(k);var i=j.get("ddUrl");if(!Ext.isEmpty(i)&&i!=null&&i!="-"){i=decodeURIComponent(i);this.fireEvent("itemClick",loadPopup(i));
}}}]};}else{if(e.data.columns[d].dataIndex=="measureGrpUrl"){e.data.columns[d]={xtype:"actioncolumn",align:"center",width:50,sortable:false,menuDisabled:true,items:[{iconcls:"iconLineChart",getClass:function(i,h,g){var j=g.get("measureGrpUrl");if(Ext.isEmpty(j)||j==null||j=="-"){return"iconSpacer actionIcon mouseOverRemove";
}else{return"iconLineChart actioncolumngap";}},tooltip:"Chart ",handler:function(h,k,g){var j=h.getStore().getAt(k);var i=j.get("measureGrpUrl");if(!Ext.isEmpty(i)&&i!=null&&i!="-"){i=decodeURIComponent(i);this.fireEvent("itemClick",loadPopup(i));}}}]};}else{e.data.columns[d].renderer=e.overriderRenderer(e.data.columns[d],e.data.data.items[d],e.data.fields,d);
e.data.columns[d].renderer=function(j,h,g,k,i){if(g.raw.hasOwnProperty("layerModelUrl")){h.tdAttr='style="cursor:pointer;"';}return j;};}}}}}}}}if(e.alignR!=undefined&&e.alignR!=null&&e.alignR){var f=e.data.columns[d].text;if(f!=undefined&&f!=null){if(f=="alarmCritical"){e.data.columns[d].text='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="height:17px !important;margin-top:-0.3em;" class="x-action-col-icon x-action-col-0   state_HIGH">';
}else{if(f=="alarmMajor"){e.data.columns[d].text='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="height:17px !important;margin-top:-0.3em;" class="x-action-col-icon x-action-col-0   state_INTERMEDIATE">';}else{if(f=="alarmMinor"){e.data.columns[d].text='<img alt="" src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" style="height:17px !important;margin-top:-0.3em;" class="x-action-col-icon x-action-col-0   state_LOW">';
}}}}}}var b=e.data.columns;for(var c=0;c<b.length;c++){if(b[c].dataIndex=="USER"||b[c].dataIndex=="APPLICATION"||b[c].dataIndex=="SERVER"||b[c].dataIndex=="PROBLEM"){b[c]["align"]="center";}if(b[c].dataIndex!="USER"||b[c].dataIndex!="APPLICATION"||b[c].dataIndex!="SERVER"||b[c].dataIndex!="PROBLEM"){b[c].doSort=function(h){var g=this.up("grid").store;
var i=this.getSortParam();g.sort({property:i,direction:h,sorterFn:function(k,j){k=k.get(i);j=j.get(i);if(isNaN(k)&&isNaN(j)){if(k.indexOf("<span")>-1||k.indexOf("<div")>-1){k=$(k).text();}if(j.indexOf("<span")>-1||j.indexOf("<div")>-1){j=$(j).text();}if(!isNaN(k)&&!isNaN(j)){k=isNaN(k)?isHyphen(k):k;
k=Ext.isNumber(k)?k:parseFloat(String(k),10);j=isNaN(j)?isHyphen(j):j;j=Ext.isNumber(j)?j:parseFloat(String(j),10);}return k>j?1:(k<j?-1:0);}else{k=isNaN(k)?isHyphen(k):k;k=Ext.isNumber(k)?k:parseFloat(String(k),10);j=isNaN(j)?isHyphen(j):j;j=Ext.isNumber(j)?j:parseFloat(String(j),10);return(k>j)?1:((k<j)?-1:0);
}}});};}}e.gridColumns=b;}if(e.data.fields){e.storefileds=e.data.fields;}if((!Ext.isEmpty(this.iSBrro)&&this.iSBrro)||(!Ext.isEmpty(this.ifSessions)&&this.ifSessions)||(!Ext.isEmpty(this.iSLogon)&&this.iSLogon)){if(e.data.DataSet&&e.data.DataSet[0].data!=undefined&&e.data.DataSet[0].data!=null&&Ext.isEmpty(e.data.DataSet[0].data[0].Error)){e.storeData=e.data.DataSet[0].data;
}}else{if(e.data.data&&e.data.data.items!=undefined&&e.data.data.items!=null){e.storeData=e.data.data.items;}}}e.items=e.loadGrid();e.callParent();},loadGrid:function(){var e=this;var f=true;var c='<div style="display:table;height:98%;width:100%" ><div style="display:table-cell;vertical-align:middle;text-align:center;"><div style="margin:auto;" class="iconInformation"></div><div>No Data Found!</div></div></div>';
if(!Ext.isEmpty(e.iSAlerts)&&e.iSAlerts){c='<div style="display:table;height:98%;width:100%" ><div style="display:table-cell;vertical-align:middle;text-align:center;"><div style="margin:auto;" class="iconNoalarms"></div><div>No Alerts Found!</div></div></div>';}if(!Ext.isEmpty(e.data)&&e.data.hasOwnProperty("showPositiveMessage")&&e.data.showPositiveMessage){c='<div style="display:table;height:98%;width:100%" ><div style="display:table-cell;vertical-align:middle;text-align:center;"><div style="margin:auto;" class="iconNoalarms"></div><div>'+e.data.positiveMessage+"</div></div></div>";
}var b=new Ext.create("Ext.data.Store",{fields:e.storefileds,data:e.storeData});var a=[];if(!Ext.isEmpty(e.storeData)&&e.storeData[0].hasOwnProperty("groupingIndex")&&!Ext.isEmpty(e.storeData[0].groupingIndex)){b=new Ext.create("Ext.data.Store",{fields:e.storefileds,data:e.storeData,groupField:"groupingIndex"});
a=[{ftype:"grouping",collapsible:false,groupHeaderTpl:"<span>{name}</span>"}];}if(e.data.hasOwnProperty("OrderByMeasure")&&e.data.hasOwnProperty("OrderBySortState")){b=new Ext.create("Ext.data.Store",{fields:e.storefileds,data:e.storeData,sorters:{property:e.data.OrderByMeasure,direction:e.data.OrderBySortState.toUpperCase()}});
}var d=Ext.create("Ext.grid.Panel",{flex:1,ui:"newGridPanel medium",border:true,id:e.id+"_grid",height:170,header:false,scroll:true,autoScroll:true,features:a,dockedItems:[{xtype:"label",hidden:f,html:'<span class="f11-normal" style="float:right">Last '+e.data.timeline+"</span>",height:"15px"}],columnLines:true,store:b,viewConfig:{emptyText:c,deferEmptyText:false,},columns:e.gridColumns,listeners:{cellclick:function(i,g,j,h,m,n,l){if(e.storefileds[j].name=="ddUrl"||e.storefileds[j].name=="measureGrpUrl"){return;
}var k=h.raw.layerModelUrl;if(k!=undefined&&k!="undefined"&&!Ext.isEmpty(k)){gotoLayerModelLinksPage(k);}}}});return d;}});