Ext.define("DonutAlertModel",{extend:"Ext.data.Model",fields:[{name:"state",type:"string"},{name:"heading",type:"string"},{name:"noData",type:"boolean"},{name:"value",type:"number"},{name:"totalVal",type:"number"},{name:"legend",type:"string"},{name:"valCount",type:"string"},{name:"sessions"},{name:"DataSet"},{name:"graphID",type:"string"}]});
Ext.define("widgets.DonutAlert",{extend:"Ext.container.Container",alias:"widget.donutalert",autoDestroy:true,config:{data:null},num:"",id:"",store:null,items:[],updateData:function(c){var b=this;b.items.items[0].store.loadRawData(c);var a=getHighChartsJSON(c,b.num,this.id,this);$("#donutalert-graph_"+b.num).highcharts(a,function(g){var e=g.plotLeft+(g.series[0].center[0]);
var d=g.plotTop+(g.series[0].center[1]);var f='<span data-qtip="'+c.value+'" id="pieChartInfoText" style="font-family:Roboto;font-size:22px;z-index:9999999 !important;"><span>'+nFormatter(c.value)+"</span></span>";$("#addText_"+b.num).append(f);f=$("#pieChartInfoText");f.css("position","absolute");f.css("left",e+(f.width()*-0.5));
f.css("top",d+(f.height()*-0.3));});},listeners:{"afterrender":function(g){var h=this;var b="";var a=(strSkin=="Dark")?"#6a6a6a":"#cdcdcd";if(h.ifGeo||h.ifOv||h.ifXtra){var b="font_normal15 fontStyleRobot";}else{b="font_bold12";}var f="c_box";var c="e_box";var j="display:none";if(!Ext.isEmpty(h.ifSbox)&&h.ifSbox){f="b_box";
c="s_box";j="";}var i=this.data.showAlarm;if(h.ifUx){DonutAlertTpl=new Ext.XTemplate('<tpl for=".">','<div class="widgetholders" style="border:0px solid yellow">',"<div class="+c+" style="+j+">",'<div class="fontStyleRobotRegular font_bold12 div_center trim_text" style="float:left;width:65%">','<tpl if="state">','<img style="position: absolute;top: 0;bottom: 0;margin: auto;vertical-align:sub" src="/final/images/clear.png" class="stateSymbol_{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:5px;padding-top:2px;" data-qtip="{heading}">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;white-space:normal;" data-qtip="{heading}">{heading}</ span></div>',"</tpl>",'<div style="float:right;width:35%;text-align:right" class="div_center"><div  class="font_bold20" style="margin-right:3px;text-align:right;display:inline-block;line-height:18px">{value}</div><div class="font_normal10" style="line-height:18px;display:inline-block;text-align:left;vertical-align:top;padding-right:15px">{footer}</div></div>','<div style="clear:both"></div>',"</div>","<div class="+f+">",'<div class="fontStyleRobotRegular font_bold13 title">','<tpl if="state">','<img style="vertical-align:sub" src="/final/images/clear.png" class="stateIconRumAppFlow{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:5px;padding-top:2px;" data-qtip="{heading}" class="'+b+'">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;white-space:normal;" data-qtip="{heading}" class="'+b+'">{heading}</ span></div>',"</tpl>","<div >",'<tpl  if="noData != undefined && noData">','<td style="text-align:center;"><div style="float:left;border:0px solid blue;margin-left:-10px;margin-top:-5px;width:100px;height:110px" id="donutalert-graph_'+this.num+'"></div>','</td><td style="vertical-align:middle;padding-left:12px">',"<div>",'<table style="text-align:center;vertical-align:middle" cellspacing="0" cellpadding="0"><tr><td style="font-size:14px;">',"No Alerts <br>Found","</td></tr></table>","</div>","<tpl else>",'<div style="float:left;border:0px solid blue;margin-top:-5px;width:100px;height:110px" id="donutalert-graph_'+this.num+'"></div>','<div class="sessions_legends" style="margin-top:0px">','<table style="float:right;margin-right:0px" cellspacing="0" cellpadding="0"><tr>','<tpl for="DataSet">','<tpl for="data">','<tpl if="color !=&quot;#cdcdcd&quot;">','<td ><h3 style="color:{color};">.</h3></td><td class="fontStyleRobotRegular font_normal11" style="padding-right:20px">','<tpl if="value ==&quot;0&quot;">',"<a>{text}&nbsp;({value})</a>","<tpl else>",'<tpl if="subjectVariable !=&quot;&quot;">',"<a href=\"javascript:openAlarmPopup('{text}','{subjectVariable}')\">{text}&nbsp;({value})</a>","<tpl else>","<a href=\"javascript:openAlarmPopup(' ','"+i+"','{name}')\">{text}&nbsp;({value})</a>","</tpl>","</tpl>","</td>",'<tpl if="value ==&quot;-&quot;">','<tpl if="xindex % 2 != 0">',"</tr>","</tpl>","<tpl else>",'<tpl if="xindex % 2 === 0">',"</tr>","</tpl>","</tpl>","</tpl>","</tpl>","</tpl>","</table>","</div>","</tpl>","</div>","</div>","</tpl>");
}else{if(h.ifXtra){DonutAlertTpl=new Ext.XTemplate('<tpl for=".">','<div class="widgetholders" style="border:0px solid yellow">',"<div class="+c+" style="+j+">",'<div class="fontStyleRobotRegular font_bold12 div_center trim_text" style="float:left;width:65%">','<tpl if="state">','<img style="position: absolute;top: 0;bottom: 0;margin: auto;vertical-align:sub" src="/final/images/clear.png" class="stateSymbol_{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:5px;padding-top:2px;" data-qtip="{heading}">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;white-space:normal;" data-qtip="{heading}">{heading}</ span></div>',"</tpl>",'<div style="float:right;width:35%;text-align:right" class="div_center"><div  class="font_bold20" style="margin-right:3px;text-align:right;display:inline-block;line-height:18px">{value}</div><div class="font_normal10" style="line-height:18px;display:inline-block;text-align:left;vertical-align:top;padding-right:15px">{footer}</div></div>','<div style="clear:both"></div>',"</div>","<div class="+f+">",'<div class="font_normal15 fontStyleRobot">','<tpl if="state">','<img style="vertical-align:sub" src="/final/images/clear.png" class="stateIconRumAppFlow{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:5px;padding-top:2px;" data-qtip="{heading}" class="'+b+'">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;white-space:normal;" data-qtip="{heading}" class="'+b+'">{heading}</ span></div>',"</tpl>",'<div class="" style="margin-top:5px;padding-bottom:20px;">','<table style="margin:auto;margin-left:85px;" cellspacing="0" cellpadding="0"><tr><td  style="text-align:center;" >','<tpl  if="noData != undefined && noData">','<div style="float:left;border:0px solid blue;margin-left:-10px;margin-top:-5px;width:120px;height:140px" id="donutalert-graph_'+this.num+'"></div>','</td><td style="vertical-align:middle;padding-left:12px">',"<div>",'<table style="text-align:center;vertical-align:middle" cellspacing="0" cellpadding="0"><tr><td style="font-size:14px;">',"No Alerts Found","</td></tr></table>","</div>","<tpl else>",'<div style="margin-left:25px;float:left;border:0px solid red;width:120px;height:130px" id="donutalert-graph_'+this.num+'"></div>','</td><td style="vertical-align:middle;width:70%">','<div class="sessions_legends">','<table style="float:right;margin-right:0px" cellspacing="0" cellpadding="0"><tr>','<tpl for="DataSet">','<tpl for="data">','<tpl if="color !=&quot;#cdcdcd&quot;">','<td><h3 style="color:{color};">.</h3></td>','<td class="fontStyleRobotRegular font_normal11" style="padding-right:60px !important">','<tpl if="name ==&quot;Total&quot;">',"<a>{text} ({valCount})</a>",'<tpl elseif="value ==&quot;0&quot;">',"<a>{text} ({valCount})</a>","<tpl else>",'<tpl if="color ==&quot;#0c9a12&quot;">',"<span>{text} ({valCount})</span>",'<tpl elseif="color ==&quot;#30a1d9&quot;">',"<span>{text} ({valCount})</span>",'<tpl elseif="subjectVariable !=&quot;&quot;">',"<a href=\"javascript:openAlarmPopup('{text}','{subjectVariable}')\">{text}</a>","<tpl else>","<a href=\"javascript:openAlarmPopup(' ','"+i+"','{name}')\">{text} ({valCount})</a>","</tpl>","</tpl>","</td>",'<tpl if="value ==&quot;-&quot;">','<tpl if="xindex % 2 != 0">',"</tr>","</tpl>","<tpl else>","</tr>","</tpl>","</tpl>","</tpl>","</tpl>","</table>","</div>","</tpl>","</td></tr></table>","</div>","</div>","</tpl>");
}else{if(h.ifOv){DonutAlertTpl=new Ext.XTemplate('<tpl for=".">','<div class="widgetholders" style="border:0px solid yellow">',"<div class="+c+" style="+j+">",'<div class="fontStyleRobotRegular font_bold12 div_center trim_text" style="float:left;width:65%">','<tpl if="state">','<img style="position: absolute;top: 0;bottom: 0;margin: auto;vertical-align:sub" src="/final/images/clear.png" class="stateSymbol_{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:5px;padding-top:2px;" data-qtip="{heading}">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;white-space:normal;" data-qtip="{heading}">{heading}</ span></div>',"</tpl>",'<div style="float:right;width:35%;text-align:right" class="div_center"><div  class="font_bold20" style="margin-right:3px;text-align:right;display:inline-block;line-height:18px">{value}</div><div class="font_normal10" style="line-height:18px;display:inline-block;text-align:left;vertical-align:top;padding-right:15px">{footer}</div></div>','<div style="clear:both"></div>',"</div>","<div class="+f+">",'<div class="font_normal15 fontStyleRobot">','<tpl if="state">','<img style="vertical-align:sub" src="/final/images/clear.png" class="stateIconRumAppFlow{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:5px;padding-top:2px;" data-qtip="{heading}" class="'+b+'">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;white-space:normal;" data-qtip="{heading}" class="'+b+'">{heading}</ span></div>',"</tpl>",'<div class="widgetBottomBorder" style="margin-top:15px;padding-bottom:25px;">','<table style="margin:auto" cellspacing="0" cellpadding="0"><tr><td  style="text-align:center;" >','<tpl  if="noData != undefined && noData">','<div style="float:left;border:0px solid blue;margin-left:-10px;margin-top:-5px;width:120px;height:140px" id="donutalert-graph_'+this.num+'"></div>','</td><td style="vertical-align:middle;padding-left:12px">',"<div>",'<table style="text-align:center;vertical-align:middle" cellspacing="0" cellpadding="0"><tr><td style="font-size:14px;">',"No Alerts Found","</td></tr></table>","</div>","<tpl else>",'<div style="float:left;border:0px solid red;margin-top:-5px;width:120px;height:130px" id="donutalert-graph_'+this.num+'"></div>','</td><td style="padding-left:10px;vertical-align:middle;">','<div class="sessions_legends">','<table style="float:right;margin-right:0px" cellspacing="0" cellpadding="0"><tr>','<tpl for="DataSet">','<tpl for="data">','<tpl if="color !=&quot;#cdcdcd&quot;">','<td><h3 style="color:{color};">.</h3></td><td class="fontStyleRobotRegular font_normal11" style="padding-right:20px !important;">','<tpl if="name ==&quot;Total&quot;">',"<a>{text} ({valCount})</a>",'<tpl elseif="value ==&quot;0&quot;">',"<a>{text} ({valCount})</a>","<tpl else>",'<tpl if="color ==&quot;#0c9a12&quot;">',"<span>{text} ({valCount})</span>",'<tpl elseif="color ==&quot;#30a1d9&quot;">',"<span>{text} ({valCount})</span>",'<tpl elseif="subjectVariable !=&quot;&quot;">',"<a href=\"javascript:openAlarmPopup('{text}','{subjectVariable}')\">{text}</a>","<tpl else>","<a href=\"javascript:openAlarmPopup(' ','"+i+"','{name}')\">{text} ({valCount})</a>","</tpl>","</tpl>","</td>",'<tpl if="value ==&quot;-&quot;">','<tpl if="xindex % 2 != 0">',"</tr>","</tpl>","<tpl else>","</tr>","</tpl>","</tpl>","</tpl>","</tpl>","</table>","</div>","</tpl>","</td></tr></table>","</div>","</div>","</tpl>");
}else{if(h.ifSAP){DonutAlertTpl=new Ext.XTemplate('<tpl for=".">','<div class="widgetholders" style="border:0px solid blue;width:100%">',"<div class="+c+" style="+j+">",'<div class="fontStyleRobotRegular font_bold12 div_center trim_text" style="float:left;width:65%">','<tpl if="state">','<img style="position: absolute;top: 0;bottom: 0;margin: auto;vertical-align:sub" src="/final/images/clear.png" class="stateSymbol_{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:5px;padding-top:2px;" data-qtip="{heading}">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;white-space:normal;" data-qtip="{heading}">{heading}</ span></div>',"</tpl>",'<div style="float:right;width:35%;text-align:right" class="div_center"><div  class="font_bold20" style="margin-right:3px;text-align:right;display:inline-block;line-height:18px">{value}</div><div class="font_normal10" style="line-height:18px;display:inline-block;text-align:left;vertical-align:top;padding-right:15px">{footer}</div></div>','<div style="clear:both"></div>',"</div>","<div class="+f+">",'<div class="fontStyleRobotRegular font_bold13">','<tpl if="state">','<img style="vertical-align:sub" src="/final/images/clear.png" class="stateIconRumAppFlow{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:5px;padding-top:2px;" class="newFont_bold14">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;white-space:normal;"  class="newFont_bold14">{heading}</ span></div>',"</tpl>","<div >",'<table style="margin:auto" cellspacing="0" cellpadding="0"><tr>','<td  style="text-align:center; " ><div style="border:0px solid blue;margin:0px auto 10px; width:100px;height:110px;font-size:24px;" id="donutalert-graph_'+this.num+'"></div></td>','<td style="vertical-align:middle;padding-left:2px">','<div class="sessions_legends" style="margin-top:0px;">','<table style="float:right;margin-right:0px" cellspacing="0" cellpadding="0"><tr>','<tpl for="DataSet">','<tpl for="data">','<tpl if="color !=&quot;'+a+'&quot;">','<tpl if="!allZero">','<tr><td style="padding : 0px 0 0px 0 !important"><h3 style="color:{color}; margin-left:0px;">.</h3></td><td class="fontStyleRobotRegular font_normal11" style="padding : 3px 0 5px 0 !important;">{text}&nbsp;({value})</td></tr>',"</tpl>","</tpl>","</tpl>","</tpl>","</table>","</div></td></tr></table>","</div>","</div>","</tpl>");
}else{if(h.ifVer){DonutAlertTpl=new Ext.XTemplate('<tpl for=".">','<div class="widgetholders" style="border:0px solid blue;width:100%">',"<div class="+c+" style="+j+">",'<div class="fontStyleRobotRegular font_bold12 div_center trim_text" style="float:left;width:65%">','<tpl if="state">','<img style="position: absolute;top: 0;bottom: 0;margin: auto;vertical-align:sub" src="/final/images/clear.png" class="stateSymbol_{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:5px;padding-top:2px;" data-qtip="{heading}">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;white-space:normal;" data-qtip="{heading}">{heading}</ span></div>',"</tpl>",'<div style="float:right;width:35%;text-align:right" class="div_center"><div  class="font_bold20" style="margin-right:3px;text-align:right;display:inline-block;line-height:18px">{value}</div><div class="font_normal10" style="line-height:18px;display:inline-block;text-align:left;vertical-align:top;padding-right:15px">{footer}</div></div>','<div style="clear:both"></div>',"</div>","<div class="+f+">",'<div class="font_normal15 fontStyleRobot">','<tpl if="state">','<img style="vertical-align:sub" src="/final/images/clear.png" class="stateIconRumAppFlow{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:5px;padding-top:2px;" data-qtip="{heading}">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;white-space:normal;" data-qtip="{heading}">{heading}</ span></div>',"</tpl>","<div >",'<table style="margin:auto" cellspacing="0" cellpadding="0"><tr>','<tpl  if="noData != undefined && noData">','<td style="text-align:center;"><div style="float:left;border:0px solid blue;margin-left:-10px;margin-top:-5px;width:100px;height:110px" id="donutalert-graph_'+this.num+'"></div>','</td><td style="vertical-align:middle;padding-left:12px">',"<div>",'<table style="text-align:center;vertical-align:middle" cellspacing="0" cellpadding="0"><tr><td style="font-size:14px;">',"No Alerts <br>Found","</td></tr></table>","</div>","<tpl else>",'<td  style="text-align:center;" ><div style="border:0px solid red;margin-top:-5px;width:100px;height:110px" id="donutalert-graph_'+this.num+'"></div></td>','<td style="vertical-align:middle;padding-left:12px">','<div class="sessions_legends">','<table style="float:right;min-width:88px;min-height: 110px;max-height: 110px;height: 60%;align-items: center;width: 100%;margin-right:0px;overflow: auto;display: grid;" cellspacing="0" cellpadding="0"><tr>','<tpl for="DataSet">','<tpl for="data">','<tpl if="color !=&quot;'+a+'&quot;">','<tr><td><h3 style="color:{color};">.</h3></td><td class="fontStyleRobotRegular font_normal11">','<tpl if="value ==&quot;0&quot;">',"<a>{text}&nbsp;({value})</a>","<tpl else>",'<tpl if="subjectVariable !=&quot;&quot;">',"<a href=\"javascript:openAlarmPopup('{text}','{subjectVariable}')\">{text}&nbsp;({value})</a>","<tpl else>","<a href=\"javascript:openAlarmPopup(' ','"+i+"','{name}')\">{text}&nbsp;({value})</a>","</tpl>","</tpl>","</td></tr>","</tpl>","</tpl>","</tpl>","</table>","</div></td></tr></table>","</tpl>","</div>","</div>","</tpl>");
}else{if(h.ifMyDash){DonutAlertTpl=new Ext.XTemplate('<tpl for=".">','<div class="widgetholders" style="border:0px solid blue;width:100%">',"<div class="+c+" style="+j+">",'<div class=" font_bold12 div_center trim_text" style="float:left;width:65%">','<tpl if="state">','<img style="position: absolute;top: 0;bottom: 0;margin: auto;vertical-align:sub" src="/final/images/clear.png" class="stateSymbol_{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:20px;padding-top:2px;" data-qtip="{heading}">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;" data-qtip="{heading}">{heading}</ span></div>',"</tpl>",'<div style="float:right;width:35%;text-align:right" class="div_center"><div  class="font_bold20" style="margin-right:3px;text-align:right;display:inline-block;line-height:18px">{value}</div><div class="font_normal10" style="line-height:18px;display:inline-block;text-align:left;vertical-align:top;padding-right:15px">{footer}</div></div>','<div style="clear:both"></div>',"</div>","<div class="+f+">",'<div class="">','<tpl if="state">','<img style="vertical-align:sub" src="/final/images/clear.png" class="stateIconRumAppFlow{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:20px;padding-top:2px;" data-qtip="{heading}">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;" data-qtip="{heading}">{heading}</ span></div>',"</tpl>",'<div style="margin-top:-3px;border:0px solid orange">','<table style="margin:auto" cellspacing="0" cellpadding="0"><tr>','<tpl  if="noData != undefined && noData">','<td style="text-align:center;"><div style="float:left;border:0px solid blue;margin-left:-10px;margin-top:-5px;width:100px;height:110px" id="donutalert-graph_'+this.num+'"></div>','</td><td style="vertical-align:middle;padding-left:12px">',"<div>",'<table style="text-align:center;vertical-align:middle" cellspacing="0" cellpadding="0"><tr><td style="font-size:14px;">',"No Alerts <br>Found","</td></tr></table>","</div>","<tpl else>",'<td  style="text-align:center;" ><div style="border:0px solid red;margin-top:-11px;width:100px;height:110px" id="donutalert-graph_'+this.num+'"></div></td>',"<td>",'<div class="sessions_legends">',"</div></td></tr></table>","</tpl>","</div>","</div>","</tpl>");
}else{DonutAlertTpl=new Ext.XTemplate('<tpl for=".">','<div class="widgetholders" style="border:0px solid blue;width:100%">',"<div class="+c+" style="+j+">",'<div class="fontStyleRobotRegular font_bold12 div_center trim_text" style="float:left;width:65%">','<tpl if="state">','<img style="position: absolute;top: 0;bottom: 0;margin: auto;vertical-align:sub" src="/final/images/clear.png" class="stateSymbol_{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:5px;padding-top:2px;" data-qtip="{heading}">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;white-space:normal;" data-qtip="{heading}">{heading}</ span></div>',"</tpl>",'<div style="float:right;width:35%;text-align:right" class="div_center"><div  class="font_bold20" style="margin-right:3px;text-align:right;display:inline-block;line-height:18px">{value}</div><div class="font_normal10" style="line-height:18px;display:inline-block;text-align:left;vertical-align:top;padding-right:15px">{footer}</div></div>','<div style="clear:both"></div>',"</div>","<div class="+f+">",'<div class="fontStyleRobotRegular font_bold13 title">','<tpl if="state">','<img style="vertical-align:sub" src="/final/images/clear.png" class="stateIconRumAppFlow{state}" />','<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:5px;padding-top:2px;" data-qtip="{heading}">{heading}</ span></div>',"<tpl else>",'<span style="display: inline-block; width: inherit;vertical-align: text-bottom;margin-left:0px;padding-top:2px;white-space:normal;" data-qtip="{heading}">{heading}</ span></div>',"</tpl>",'<div style="margin-top:-3px;border:0px solid orange">','<table style="margin:auto" cellspacing="0" cellpadding="0"><tr>','<tpl  if="noData != undefined && noData">','<td style="text-align:center;"><div style="float:left;border:0px solid blue;margin-left:-10px;margin-top:-5px;width:100px;height:110px" id="donutalert-graph_'+this.num+'"></div>','</td><td style="vertical-align:middle;padding-left:12px">',"<div>",'<table style="text-align:center;vertical-align:middle" cellspacing="0" cellpadding="0"><tr><td style="font-size:14px;">',"No Alerts <br>Found","</td></tr></table>","</div>","<tpl else>",'<td  style="text-align:center;" ><div id="addText_'+this.num+'" style="position:absolute; left:0px; top:18px;"></div><div style="border:0px solid red;margin-top:-5px;width:100px;height:110px" id="donutalert-graph_'+this.num+'"></div></td>',"<td>",'<div class="sessions_legends">','<table style="float:right;min-width:88px;min-height: 110px;max-height: 110px;height: 60%;align-items: center;width: 100%;margin-right:0px;overflow: auto;display: grid;" cellspacing="0" cellpadding="0"><tr>','<tpl for="DataSet">','<tpl for="data">','<tpl if="color !=&quot;'+a+'&quot;">','<tr><td><h3 style="color:{color};">.</h3></td><td class="fontStyleRobotRegular font_normal11">','<tpl if="value ==&quot;0&quot;">',"<a>{text}&nbsp;({value})</a>","<tpl else>",'<tpl if="subjectVariable !=&quot;&quot;">',"<a href=\"javascript:openAlarmPopup('{text}','{subjectVariable}')\">{text}&nbsp;({value})</a>","<tpl else>","<a href=\"javascript:openAlarmPopup(' ','"+i+"','{name}')\">{text}&nbsp;({value})</a>","</tpl>","</tpl>","</td></tr>","</tpl>","</tpl>","</tpl>","</table>","</div></td></tr></table>","</tpl>","</div>","</div>","</tpl>");
}}}}}}var d=this.getItem(this.data,this.num,this.id,h);this.add(d);}},getItem:function(a,d,c,e){var b={xtype:"dataview",store:Ext.create("Ext.data.Store",{id:"Donutalert_model_id",model:"DonutAlertModel",autoLoad:true,data:a}),autoDestroy:true,tpl:DonutAlertTpl,listeners:{viewready:function(f){var g="";
if(!Ext.isEmpty(a)){var g=getHighChartsJSON(a,d,this.id,e);}if(!Ext.isEmpty(a)){$("#donutalert-graph_"+d).highcharts(g,function(k){var i=k.plotLeft+(k.series[0].center[0]);var h=k.plotTop+(k.series[0].center[1]);var j='<span data-qtip="'+a.value+'" id="pieChartInfoText" style="font-family:Roboto;font-size:22px;z-index:999999 !important;"><span>'+nFormatter(a.value)+"</span></span>";
$("#addText_"+d).append(j);j=$("#pieChartInfoText");j.css("position","absolute");j.css("left",i+(j.width()*-0.5));j.css("top",h+(j.height()*-0.3));});}}}};return b;},});function getHighChartsJSON(a,e,c,d){try{var b={};try{if(!Ext.isEmpty(d.ifXtra)){a["innersize"]="67%";a["outersize"]="135%";}else{if(!Ext.isEmpty(d.ifOv)){a["innersize"]="67%";
a["outersize"]="135%";}else{if(!Ext.isEmpty(d.ifGeo)){a["innersize"]="51%";}else{a["innersize"]="67%";a["outersize"]="165%";}}}}catch(f){a["innersize"]="70%";}if(!Ext.isEmpty(Ext.get("addText_"+e))){a["title"]="";}b=jQuery.extend(true,{},getDonutChartsInstance1("",null,null),b);b.setData(a,"","","donut");
jsonData=b.highchart;}catch(f){jsonData=null;}return jsonData;}