Ext.define("microsoftDashboard.view.microsoftTeams.CallSummaryPage",{extend:"Ext.panel.Panel",alias:"widget.MS_Teams_Dashboard.callsummarypage",ui:"eg-panel",border:false,autoScroll:false,scroll:false,layout:{type:"vbox",align:"stretch"},flex:1,requires:["microsoftDashboard.view.CommonGrid"],items:[],updatePage:function(c){var b=c[2].CallQualityView_third_block;
for(var a=0;a<b.length;a++){if(b[a].title.startsWith("Poor")){if(!Ext.isEmpty(b[0])&&b[0].hasOwnProperty("DataSet")){Ext.getCmp("chartParent_poorApp_"+a).show();}else{Ext.getCmp("chartParent_poorApp_"+a).hide();}}}if(!Ext.isEmpty(b[0])&&b[0].hasOwnProperty("DataSet")){Ext.getCmp("res_acc_pan_id").show();
}else{Ext.getCmp("res_acc_pan_id").hide();}Ext.getCmp("lusage_header_id").setTitle('<span style="float:left;">'+c[4].call_quality_view_header+'</span><span style="display:'+c[c.length-1].layerUrlDisplay+';margin-top:-3px;margin-left:5px;float:left" class="iconRumToLayermodel handSymbol" data-qclass="yellowTip" data-qtip="Layer Model" href="javascript:void(0);" onclick="javascript:DashboardToLayers(\''+c[c.length-1].layerUrl+"');\"></span>");
var e=c[0].CallQualityView_first_block;for(var d=0;d<e.length;d++){Ext.getCmp(e[d].measure+""+d).getStore().loadRawData(e[d]);}Ext.getCmp("streamDist").updatePanel(c);Ext.getCmp("mailRecievers").updatePanel(c);Ext.getCmp("fieldCalls").updatePanel(c);Ext.getCmp("poorApp").updateChart(c[2].CallQualityView_third_block);
Ext.getCmp("topTenGrid1").setTitle(c[3].CallQualityView_fourth_block[0].title);Ext.getCmp("topTenGridId1").loadData(c[3].CallQualityView_fourth_block[0]);Ext.getCmp("topTenGrid2").setTitle(c[3].CallQualityView_fourth_block[1].title);Ext.getCmp("topTenGridId2").loadData(c[3].CallQualityView_fourth_block[1]);
Ext.getCmp("topTenGrid3").setTitle(c[3].CallQualityView_fourth_block[2].title);Ext.getCmp("topTenGridId3").loadData(c[3].CallQualityView_fourth_block[2]);},listeners:{afterrender:function(d){var b=this;b.add({xtype:"header",height:25,margin:"0 0 5 0",id:"lusage_header_id",title:'<span style="float:left;">'+b.data[4].call_quality_view_header+'</span><span style="display:'+b.data[b.data.length-1].layerUrlDisplay+';margin-top:-3px;margin-left:5px;float:left" class="iconRumToLayermodel handSymbol" data-qclass="yellowTip" data-qtip="Layer Model" href="javascript:void(0);" onclick="javascript:DashboardToLayers(\''+b.data[b.data.length-1].layerUrl+"');\"></span>"});
b.add({xtype:"container",ui:"eg-container",height:95,margin:"0 1 1 0",layout:{type:"hbox",align:"stretch"},listeners:{afterrender:function(i){var g=this;var h=b.data[0].CallQualityView_first_block;for(var f=0;f<h.length;f++){g.add({xtype:"dataview",cls:"dividerGradient",ui:"uniqueSessions",id:h[f].measure+""+f,minWidth:190,flex:1,store:Ext.create("Ext.data.Store",{fields:[{name:"iconCls",type:"string"},{name:"backgroundCls",type:"string"},{name:"value",type:"string"},{name:"valueText",type:"string"},{name:"valueStatus",type:"string"},{name:"layerLink",type:"string"},{name:"stateValue",type:"string"}],autoLoad:true,data:h[f]}),tpl:new Ext.XTemplate('<div class="widgetholders" style="height:100%;width:100%;margin:0px;display:flex;">','<tpl for=".">','<tpl if="xindex === 1">','<tpl if="layerLink!=&quot;&quot;">','<div onClick="javascript:layerModelLinks(\'{layerLink}\')" style="position:relative;flex:1;text-align:center;cursor:pointer;" class="{backgroundCls}">',"<tpl else>","<tpl if=\"valueText=='Total Streams (Number)'\">",'<div onClick="javascript:scrollAnimation(\'streamDist\')" style="position:relative;flex:1;text-align:center;cursor:pointer;" class="{backgroundCls}">',"<tpl else>",'<div style="position:relative;flex:1;text-align:center;" class="{backgroundCls}">',"</tpl>","</tpl>",'<tpl elseif="xindex === 2">','<div style="position:relative;flex:1;text-align:center;" class="{backgroundCls}">',"<tpl else>",'<div style="position:relative;flex:1;text-align:center;" class="{backgroundCls} ms-separator">',"</tpl>",'<div class="d_m_t25">','<div style="display:inline-block;">','<tpl if="stateValue">','<img src="/final/images/clear.png" class="stateIcon22_{stateValue}" style="float:left;margin-right:8px;margin-top:3px;">',"<tpl else>",'<img src="/final/images/clear.png" class="{iconCls}" style="float:left;margin-right:8px">',"</tpl>",'<span class="f24-normal">{value}','<span class="f19-normal"></span>',"</span>","</div>",'<tpl if="backgroundCls==&quot;&quot;">','<div style="width:80%;margin:10px auto auto auto;" class="f12-normal">{valueText}</div>',"<tpl else>",'<div style="width:80%;margin:10px auto auto auto;color:white;" class="f12-normal">{valueStatus}</div>',"</tpl>","</div>","</div>","</tpl>","</div>")});
}}}});b.add({xtype:"container",layout:"column",margin:"10 0 10 0",listeners:{afterrender:function(g){var f=this;f.add({xtype:"panel",ui:"eg-x-panel",margin:"0 10 0 0",height:225,id:"streamDist",columnWidth:0.32,tools:[{xtype:"label",cls:"font_bold9 grayColor",id:"streamDistTools",style:{"white-space":"nowrap"},text:b.data[1].CallQualityView_second_block[0].chartHistory}],updatePanel:function(e){this.setTitle(e[1].CallQualityView_second_block[0].title);
Ext.getCmp("streamDistTools").setText(e[1].CallQualityView_second_block[0].chartHistory);Ext.getCmp("streamDistView").getStore().loadRawData(e[1].CallQualityView_second_block[0]);Ext.getCmp("streamDistView").updateView(e[1].CallQualityView_second_block[0]);},listeners:{afterrender:function(){var e=this;
e.setTitle(b.data[1].CallQualityView_second_block[0].title);e.add({xtype:"dataview",id:"streamDistView",layout:{type:"vbox",pack:"center"},store:Ext.create("Ext.data.Store",{fields:[{name:"state",type:"string"},{name:"name",type:"string"},{name:"title",type:"string"},{name:"noData",type:"boolean"},{name:"value",type:"number"},{name:"valueText",type:"string"},{name:"sessions"},{name:"data"},{name:"graphID",type:"string"},{name:"DataSet"},{name:"Mails"},{name:"layerLink",type:"string"}],autoLoad:true,data:b.data[1].CallQualityView_second_block[0]}),tpl:new Ext.XTemplate('<tpl for=".">','<div class="widgetholders" style="height:100%;margin-top:0px;border:0px solid red !important">','<div class="b_box1" style="margin:auto;width:100%;height:100%;display:inline-flex;">','<div style="display:flex; margin:auto auto;height:100%;width:100%;"><div  style=" height:100%;margin:auto 0px auto auto;width:100%;" id="'+e.id+'_bgDonut" ></div>','<div style="margin:auto auto auto 0px;width:100%;height:100%;display:flex;overflow:auto">','<div style="margin:auto auto auto 0px;">','<tpl for="DataSet">','<tpl for="data">','<tpl if="color !=&quot;'+strSkinclr+'&quot;">','<tpl if="layerLink!=&quot;&quot;">','<div style="padding:0px 0px 10px 0px !important;cursor:pointer" class="widgetholders {handSymbol}" onClick="javascript:layerModelLinks(\'{layerLink}\')"><div style="display:table-cell;margin-top:-10px;margin-right:5px;"><div class="msChartLegend" style="position:relative;top:-1px;background:{color}"></div></div><div  style="display:table-cell;" class="f11-normal">{name}&nbsp;({value})</div></div>',"<tpl else>",'<div style="padding:0px 0px 10px 0px !important;" class="widgetholders {handSymbol}" ><div style="display:table-cell;margin-top:-10px;margin-right:5px;"><div class="msChartLegend" style="position:relative;top:-1px;background:{color}"></div></div><div  style="display:table-cell;" class="f11-normal">{name}&nbsp;({value})</div></div>',"</tpl>","</tpl>","</tpl>","</tpl>","</div>","</div>","</div></div>","</tpl>","</div>"),updateView:function(i){var p=noDataComputefunction(i);
var r="";if(!p){try{var j={};var l=i;var m=true;l["outersize"]="100%";l["innersize"]="30%";l["showLegend"]=false;r=l["allMeasureTotal"];l["title"]="";try{var h=l.DataSet[0].data;var k=0;for(var o=0;o<h.length;o++){k+=h[o].y;}if(k==0){l.DataSet[0].data[h.length]={name:"-",color:"#cdcdcd",y:100,value:"-"};
}}catch(n){}j=jQuery.extend(true,{},getDonutChartsInstance1(this.id,null,null),j);j.setData(l,"","","bgdonut");jsonData=j.highchart;}catch(q){}$("#"+e.id+"_bgDonut").highcharts(jsonData);}else{this.update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconInformation" style="margin:0px auto"></div><div style="text-align:center">No Data Found!</div></div></div>');
}},listeners:{viewready:function(){var k=b.data[1].CallQualityView_second_block[0];var o=noDataComputefunction(k);var q="";if(!o){try{var i={};var l=true;k["outersize"]="100%";k["innersize"]="30%";k["showLegend"]=false;q=k["allMeasureTotal"];k["title"]="";try{var h=k.DataSet[0].data;var j=0;for(var n=0;
n<h.length;n++){j+=h[n].y;}if(j==0){k.DataSet[0].data[h.length]={name:"-",color:"#cdcdcd",y:100,value:"-"};}}catch(m){}i=jQuery.extend(true,{},getDonutChartsInstance1(this.id,null,null),i);i.setData(k,"","","bgdonut");jsonData=i.highchart;}catch(p){}$("#"+e.id+"_bgDonut").highcharts(jsonData);}else{this.update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconInformation" style="margin:0px auto"></div><div style="text-align:center">No Data Found!</div></div></div>');
}}},});}}},{xtype:"panel",columnWidth:0.36,title:b.data[1].CallQualityView_second_block[1].title,id:"mailRecievers",ui:"eg-x-panel",height:225,margin:"0 10 0 0",bodyPadding:8,tools:[{xtype:"label",cls:"font_bold9 grayColor",id:"mailRecieversTools",style:{"white-space":"nowrap"},text:b.data[1].CallQualityView_second_block[1].chartHistory}],updatePanel:function(m){var k=this;
Ext.getCmp("mailRecieversTools").setText(m[1].CallQualityView_second_block[1].chartHistory);var l=m[1].CallQualityView_second_block[1];var h=noDataComputefunction(l);if(!h){try{var j={};j=jQuery.extend(true,{},createBarforCtx("",null,null),j);k.setTitle(l["title"]);l["title"]="";l["marginTop"]=0;l["setPointWidth"]=null;
l["fromPage"]="Microsoft";j.setData(l,"","","bar");var i=j.highchart;$("#"+k.body.id).highcharts(i);}catch(e){k.update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconInformation" style="margin:0px auto"></div><div style="text-align:center">No Data Found!</div></div></div>');
}}else{this.update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconInformation" style="margin:0px auto"></div><div style="text-align:center">No Data Found!</div></div></div>');}},listeners:{boxready:function(n){var l=this;
var m=b.data[1].CallQualityView_second_block[1];var i=noDataComputefunction(m);if(!i){try{var k={};k=jQuery.extend(true,{},createBarforCtx("",null,null),k);m["title"]="";m["marginTop"]=0;m["setPointWidth"]=null;m["fromPage"]="Microsoft";k.setData(m,"","","bar");var j=k.highchart;$("#"+l.id+"-body").highcharts(j);
}catch(h){l.update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconInformation" style="margin:0px auto"></div><div style="text-align:center">No Data Found!</div></div></div>');}}else{this.update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconInformation" style="margin:0px auto"></div><div style="text-align:center">No Data Found!</div></div></div>');
}}}},{xtype:"panel",ui:"eg-x-panel",margin:"0 1 0 0",height:225,id:"fieldCalls",columnWidth:0.32,tools:[{xtype:"label",cls:"font_bold9 grayColor",id:"fieldCallsTools",style:{"white-space":"nowrap"},text:b.data[1].CallQualityView_second_block[2].chartHistory}],updatePanel:function(e){this.setTitle(e[1].CallQualityView_second_block[2].title);
Ext.getCmp("fieldCallsTools").setText(e[1].CallQualityView_second_block[2].chartHistory);Ext.getCmp("fieldCallsView").getStore().loadRawData(b.data[1].CallQualityView_second_block[2]);Ext.getCmp("fieldCallsView").updateView(b.data[1].CallQualityView_second_block[2]);},listeners:{afterrender:function(){var e=this;
e.setTitle(b.data[1].CallQualityView_second_block[2].title);e.add({xtype:"dataview",id:"fieldCallsView",layout:{type:"vbox",pack:"center"},store:Ext.create("Ext.data.Store",{fields:[{name:"state",type:"string"},{name:"name",type:"string"},{name:"title",type:"string"},{name:"noData",type:"boolean"},{name:"value",type:"number"},{name:"valueText",type:"string"},{name:"sessions"},{name:"data"},{name:"graphID",type:"string"},{name:"data"},{name:"Mails"},{name:"layerLink",type:"string"}],autoLoad:true,data:b.data[1].CallQualityView_second_block[2]}),tpl:new Ext.XTemplate('<tpl for=".">','<div class="widgetholders" style="height:100%;margin-top:0px;border:0px solid red !important">','<div class="b_box1" style="margin:auto;width:100%;height:100%;display:inline-flex;">','<div style="display:flex;width:100%;"><div  style=" height:100%;width:100%;margin:auto auto auto auto" id="'+e.id+'_bgDonut"></div>','<div style="margin:auto auto auto auto;height: 100%;width:100%;display:flex;overflow:auto">','<div style="margin:auto auto auto 0px;">','<tpl for="data">','<tpl if="color !=&quot;'+strSkinclr+'&quot;">','<tpl if="layerLink!=&quot;&quot;">','<div style="padding:0px 0px 10px 0px !important;cursor:pointer" class="widgetholders {handSymbol}" onClick="javascript:layerModelLinks(\'{layerLink}\')"><div style="display:table-cell;margin-top:-10px;margin-right:5px;"><div class="msChartLegend" style="position:relative;top:-1px;background:{color}"></div></div><div  style="display:table-cell;" class="f11-normal">{name}&nbsp;({value})</div></div>',"<tpl else>",'<div style="padding:0px 0px 10px 0px !important;" class="widgetholders {handSymbol}" ><div style="display:table-cell;margin-top:-10px;margin-right:5px;"><div class="msChartLegend" style="position:relative;top:-1px;background:{color}"></div></div><div  style="display:table-cell;" class="f11-normal">{name}&nbsp;({value})</div></div>',"</tpl>","</tpl>","</tpl>","</div>","</div>","</div></div>","</tpl>","</div>"),updateView:function(i){var o=noDataComputefunction(i);
var l=i;if(!o){try{var j={};l["outersize"]="100%";l["innersize"]="30%";l["showLegend"]=false;l["title"]="";try{var h=l.data;var k=0;for(var n=0;n<h.length;n++){k+=h[n].y;}if(k==0){l.data[h.length]={name:"-",color:"#cdcdcd",y:100,value:"-"};}l["DataSet"]=[{"data":l["data"]}];}catch(m){l["DataSet"]=[];
}j=jQuery.extend(true,{},getDonutChartsInstance1(this.id,null,null),j);j.setData(l,"","","bgdonut");var q=j.highchart;}catch(p){}$("#"+e.id+"_bgDonut").highcharts(q);}else{if(l.hasOwnProperty("positiveMessage")&&l["positiveMessage"].length>0){this.update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconNoAlarms" style="margin:0px auto"></div><div style="text-align:center">'+l["positiveMessage"]+"</div></div></div>");
}else{this.update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconInformation" style="margin:0px auto"></div><div style="text-align:center">No Data Found!</div></div></div>');}}},listeners:{viewready:function(){var k=b.data[1].CallQualityView_second_block[2];
var n=noDataComputefunction(k);if(!n){try{var i={};k["outersize"]="100%";k["innersize"]="30%";k["title"]="";k["showLegend"]=false;try{var h=k.data;var j=0;for(var m=0;m<h.length;m++){j+=h[m].y;}if(j==0){k.data[h.length]={name:"-",color:"#cdcdcd",y:100,value:"-"};}k["DataSet"]=[{"data":k["data"]}];}catch(l){k["DataSet"]=[];
}i=jQuery.extend(true,{},getDonutChartsInstance1(this.id,null,null),i);i.setData(k,"","","bgdonut");var p=i.highchart;}catch(o){}$("#"+e.id+"_bgDonut").highcharts(p);}else{if(k.hasOwnProperty("positiveMessage")&&k["positiveMessage"].length>0){this.update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconNoAlarms" style="margin:0px auto"></div><div style="text-align:center">'+k["positiveMessage"]+"</div></div></div>");
}else{this.update('<div style="height:100%;width:100%;display:table"><div class="msgFont" style="display:table-cell;vertical-align:middle"> <div class="iconInformation" style="margin:0px auto"></div><div style="text-align:center">No Data Found!</div></div></div>');}}}},});}}});}}});b.add({xtype:"container",padding:0,id:"geoBarIns",bodyPadding:0,margin:"0 0 0 0",flex:1,layout:{type:"card",reserveScrollbar:true},items:[{xtype:"chartparentpanel",margin:0,id:"poorApp",data:b.data[2].CallQualityView_third_block,orgData:b.data[2].CallQualityView_third_block,flex:1}]});
b.add({xtype:"panel",id:"res_acc_pan_id",ui:"eg-accordion-panel groupedAccordian",padding:20,margin:"0 0 10 0",flex:2,layout:{type:"accordion",animate:true,multi:true,},items:[{title:b.data[3].CallQualityView_fourth_block[0].title,width:"100%",layout:{type:"anchor",anchor:"50%"},margin:"0 2 0 0",id:"topTenGrid1",collapsed:false,items:[{xtype:"panel",padding:"0 10 10 10",layout:"fit",height:200,margin:0,items:[{xtype:"commongrid",width:"99%",id:"topTenGridId1",data:b.data[3].CallQualityView_fourth_block[0],orgData:b.data[3].CallQualityView_fourth_block[0]}],listeners:{afterrender:function(){try{var f=b.data[3].CallQualityView_fourth_block[0].data.items.length;
if(f<10&&f>0){this.setHeight(68+(30*f));}}catch(g){}}},}],listeners:{expand:function(){var e=Ext.getCmp("topTenGridId1");e.loadData(e.orgData);}}},{title:b.data[3].CallQualityView_fourth_block[1].title,width:"100%",layout:{type:"anchor",anchor:"50%"},margin:"0 2 0 0",id:"topTenGrid2",collapsed:false,items:[{xtype:"panel",padding:"0 10 10 10",layout:"fit",height:200,margin:0,items:[{xtype:"commongrid",width:"99%",id:"topTenGridId2",data:b.data[3].CallQualityView_fourth_block[1],orgData:b.data[3].CallQualityView_fourth_block[1]}],listeners:{afterrender:function(){try{var f=b.data[3].CallQualityView_fourth_block[1].data.items.length;
if(f<10&&f>0){this.setHeight(68+(30*f));}}catch(g){}}},}],listeners:{expand:function(){var e=Ext.getCmp("topTenGridId2");e.loadData(e.orgData);}}},{title:b.data[3].CallQualityView_fourth_block[2].title,width:"100%",layout:{type:"anchor",anchor:"50%"},margin:"0 2 0 0",id:"topTenGrid3",collapsed:false,items:[{xtype:"panel",padding:"0 10 10 10",layout:"fit",height:200,margin:0,items:[{xtype:"commongrid",width:"99%",id:"topTenGridId3",data:b.data[3].CallQualityView_fourth_block[2],orgData:b.data[3].CallQualityView_fourth_block[2]}],listeners:{afterrender:function(){try{var f=b.data[3].CallQualityView_fourth_block[2].data.items.length;
if(f<10&&f>0){this.setHeight(68+(30*f));}}catch(g){}}},}],listeners:{expand:function(){var e=Ext.getCmp("topTenGridId3");e.loadData(e.orgData);}}}]});var c=b.data[2].CallQualityView_third_block;for(var a=0;a<c.length;a++){if(c[a].title.startsWith("Poor")){if(!Ext.isEmpty(c[0])&&c[0].hasOwnProperty("DataSet")){Ext.getCmp("chartParent_poorApp_"+a).show();
}else{Ext.getCmp("chartParent_poorApp_"+a).hide();}}}if(!Ext.isEmpty(c[0])&&c[0].hasOwnProperty("DataSet")){Ext.getCmp("res_acc_pan_id").show();}else{Ext.getCmp("res_acc_pan_id").hide();}}}});