Ext.define("OpenAlertWidgetModel",{extend:"Ext.data.Model",fields:[{name:"icon",type:"string"},{name:"value",type:"number"},{name:"label",type:"string"},{name:"subjectVariable",type:"string"},{name:"name",type:"string"},]});var OpenAlertwidgetTpl=new Ext.XTemplate('<div class="widgetholders">','<div class="b_box">','<div style="margin-top:24px !important">','<table border="0" style="margin-right:0px;width:100%;table-layout: fixed;"><tr>','<tpl for=".">','<td ><table style="margin:auto"><tr style="display: flex;vertical-align: middle;justify-content: center;"><td style="width:37px;"><img src="/final/images/clear.png" style="margin-top: 4px;" class="{icon}"/></td><td class="font_bold28 session_value">','<tpl if="value ==&quot;0&quot;">',"<a>{value}</a>","<tpl else>","<a href=\"javascript:openAlarmPopup('{name}','{subjectVariable}')\">{value}</a>","</tpl>",'</td></tr><tr><td colspan="2" class="font_normal13 " style="text-align:center;padding:5px 0 0 0">{name}</td></tr></table></td>',"</tpl>","</table>","</div>","</div>","</div>");
Ext.define("citrixDashboard.view.OpenAlerts",{extend:"Ext.container.Container",alias:"widget.openalerts",cls:"widgetcon",ui:"uniqueSessions",autoDestroy:true,data:"",id:"",items:[],updateData:function(c){var b=this;var d=Ext.getCmp(b.id+"_heading");d.setTitle(c.heading);var a=Ext.getCmp(b.id+"_dataview");
a.store.loadRawData(c.data);},listeners:{"afterrender":function(b){var a=this;a.add({xtype:"header",height:25,id:a.id+"_heading",title:"<span class='f12-bold'>"+a.data.heading+"</span>",},{xtype:"dataview",padding:"5 0 0 0",id:a.id+"_dataview",store:Ext.create("Ext.data.Store",{model:"OpenAlertWidgetModel",autoLoad:true,data:a.data.data}),tpl:OpenAlertwidgetTpl,});
}}});