var stmin="";var enmin="";var mgr_stmin="";var mgr_enmin="";var isTrend=false;Ext.define("OperationAlarmsHistory.view.TimeLine",{alias:"widget.timeline",requires:["utilities.DatePicker","utilities.ScrollCombo"],extend:"Ext.form.FieldContainer",layout:"column",erUtils:null,gtype:"",hideMinutes:true,selectedMgrStMin:"",selectedMgrEndMin:"",selectedStMinForDisplay:"",selectedEndminForDisplay:"",defaults:{labelAlign:"top",margin:"0 10 10 0",labelSeparator:"",editable:false},initComponent:function(){if(window["moduleEntry"]!=undefined){if(!Ext.isEmpty(moduleEntry)&&moduleEntry=="reporter"){this.items=this.getReporterTimelineItems();
}else{this.items=this.getTimelineItems();}}else{this.items=this.getTimelineItems();}this.callParent();},getReporterTimelineItems:function(){return[{xtype:"scrollcombo",fieldLabel:timelineLbl,id:"er_timeline",name:"er_timeline",displayField:"displayField",valueField:"valueField",queryMode:"local",store:Ext.data.Store({fields:["displayField","valueField"],data:[]}),width:90,cls:"dropdown",defaultListConfig:{loadingHeight:70,minWidth:90,maxHeight:340,shadow:"sides"},listeners:{"boxready":function(e){var d=Ext.getCmp("er_stdate");
var f=Ext.getCmp("er_enddate");var b=Ext.getCmp("er_sthr");var c=Ext.getCmp("er_endhr");var a=Ext.getCmp("er_mode");if(e.getValue()=="Any"){d.setDisabled(false);f.setDisabled(false);b.setDisabled(false);c.setDisabled(false);}else{d.setDisabled(true);f.setDisabled(true);b.setDisabled(true);c.setDisabled(true);
}a.hide();},"select":function(f){var g=Ext.getCmp("er_stdate");var h=Ext.getCmp("er_enddate");var i=Ext.getCmp("er_sthr");var j=Ext.getCmp("er_endhr");var c=Ext.getCmp("er_mode");if(f.getValue()=="Any"){g.setDisabled(false);h.setDisabled(false);i.setDisabled(false);j.setDisabled(false);}else{g.setDisabled(true);
h.setDisabled(true);i.setDisabled(true);j.setDisabled(true);}var l=f.getValue();var k=g.getValue();var e=h.getValue();var d=i.getValue();var a=j.getValue();if(l=="Any"){k=Ext.Date.dateFormat(k,"m/d/Y");e=Ext.Date.dateFormat(e,"m/d/Y");}else{k=Ext.Date.dateFormat(k,mgrDateFormat);e=Ext.Date.dateFormat(e,mgrDateFormat);
}var b="C=id&P0=["+l+"]&P1=["+k+"]&P2=["+e+"]&P3=["+d+"]&P4=["+a+"]";if(isTrend==true){b+="&P5=["+stmin+"]&P6=["+enmin+"]&P7=["+dateFormatForTimeline+"]&F=getTrendTime";}else{b+="&P5=["+dateFormatForTimeline+"]&F=getTime";}Ext.Ajax.request({url:"/final/servlet/com.eg.ErRemoteScriptingServlet",params:b,scope:this,method:"POST",success:function(p){var u=p.responseText;
var s=Ext.decode(u);if(!Ext.isEmpty(s)){var q=s.timeline;var n=q[0];var m=q[2];var x=q[4];var r=q[1];var o=q[3];var t=q[5];g.dataArray=q[0];h.dataArray=q[1];i.dataArray=q[2];j.dataArray=q[3];mgr_stmin=q[4];mgr_enmin=q[5];g.setValue(q[6]);h.setValue(q[7]);i.setValue(q[8]);j.setValue(q[9]);stmin=q[10];
enmin=q[11];var w=n+" "+m+":"+x;var v=r+" "+o+":"+t;getResultType(w,v,dateFormatForTimeline);}}});}}},{xtype:"datepicker",id:"er_stdate",name:"er_stdate",format:mgrDateFormat,fieldLabel:fromLbl,cls:"datepicker",disabled:true,dataArray:null,listeners:{"select":function(g){var f=Ext.getCmp("er_timeline").getValue();
var e=Ext.getCmp("er_stdate").getValue();var d=Ext.getCmp("er_enddate").getValue();var b=Ext.getCmp("er_sthr").getValue();var c=Ext.getCmp("er_endhr").getValue();var a=Ext.getCmp("er_mode");if(f=="Any"){e=Ext.Date.dateFormat(e,"m/d/Y");d=Ext.Date.dateFormat(d,"m/d/Y");}else{e=Ext.Date.dateFormat(e,mgrDateFormat);
d=Ext.Date.dateFormat(d,mgrDateFormat);}var h="C=id&P0=["+f+"]&P1=["+e+"]&P2=["+d+"]&P3=["+b+"]&P4=["+c+"]&P5=["+stmin+"]&P6=["+enmin+"]&P7=["+dateFormatForTimeline+"]&F=getTime";Ext.Ajax.request({url:"/final/servlet/com.eg.ErRemoteScriptingServlet",params:h,scope:this,method:"POST",success:function(m){var r=m.responseText;
var p=Ext.decode(r);if(!Ext.isEmpty(p)){var n=p.timeline;var j=n[0];var i=n[2];var l=n[4];var o=n[1];var k=n[3];var q=n[5];Ext.getCmp("er_stdate").dataArray=n[0];Ext.getCmp("er_enddate").setValue(n[7]);Ext.getCmp("er_stdate").setValue(n[6]);Ext.getCmp("er_enddate").dataArray=n[1];if(!isTrend){Ext.getCmp("er_sthr").setValue(n[8]);
Ext.getCmp("er_sthr").dataArray=n[2];Ext.getCmp("er_endhr").setValue(n[9]);Ext.getCmp("er_endhr").dataArray=n[3];stmin=n[10];enmin=n[11];mgr_stmin=n[4];mgr_enmin=n[5];}var t=j+" "+i+":"+l;var s=o+" "+k+":"+q;getResultType(t,s,dateFormatForTimeline);}}});}}},{xtype:"scrollcombo",width:50,id:"er_sthr",name:"er_sthr",defaultListConfig:{loadingHeight:70,minWidth:50,maxHeight:300,shadow:"sides"},store:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],displayField:"displayField",valueField:"valueField",queryMode:"local",fieldLabel:hrLbl,cls:"dropdown",disabled:true,dataArray:null,listeners:{"select":function(b){formated_sdate=Ext.Date.dateFormat(Ext.getCmp("er_stdate").getValue(),mgrDateFormat);
if(stmin==null||stmin=="undefined"||stmin==""){stmin="00";}var a=formated_sdate+" "+b.getValue()+":"+stmin+":00";var c="date="+a+"&method=getDateTime&isReverse=true&isFromReporter=true";Ext.Ajax.request({url:"/final/servlet/com.eg.EgTimeZoneConverterServlet",params:c,scope:this,method:"POST",success:function(d){var f=d.responseText;
f=Ext.String.trim(f);var e=f.substring(0,f.lastIndexOf(" "));var g=f.substring(f.lastIndexOf(" ")+1);Ext.getCmp("er_stdate").dataArray=e;Ext.getCmp("er_sthr").dataArray=g.substring(0,g.indexOf(":"));mgr_stmin=g.substring(g.indexOf(":")+1,g.lastIndexOf(":"));}});}}},{xtype:"datepicker",id:"er_enddate",name:"er_enddate",format:mgrDateFormat,fieldLabel:Tolbl,cls:"datepicker",disabled:true,dataArray:null,listeners:{"select":function(g){var f=Ext.getCmp("er_timeline").getValue();
var e=Ext.getCmp("er_stdate").getValue();var d=Ext.getCmp("er_enddate").getValue();var b=Ext.getCmp("er_sthr").getValue();var c=Ext.getCmp("er_endhr").getValue();var a=Ext.getCmp("er_mode");if(f=="Any"){e=Ext.Date.dateFormat(e,"m/d/Y");d=Ext.Date.dateFormat(d,"m/d/Y");}else{e=Ext.Date.dateFormat(e,mgrDateFormat);
d=Ext.Date.dateFormat(d,mgrDateFormat);}var h="C=id&P0=["+f+"]&P1=["+e+"]&P2=["+d+"]&P3=["+b+"]&P4=["+c+"]&P5=["+stmin+"]&P6=["+enmin+"]&P7=["+dateFormatForTimeline+"]&F=getTime";Ext.Ajax.request({url:"/final/servlet/com.eg.ErRemoteScriptingServlet",params:h,scope:this,method:"POST",success:function(m){var r=m.responseText;
var p=Ext.decode(r);if(!Ext.isEmpty(p)){var n=p.timeline;var j=n[0];var i=n[2];var l=n[4];var o=n[1];var k=n[3];var q=n[5];Ext.getCmp("er_stdate").setValue(n[6]);Ext.getCmp("er_stdate").dataArray=n[0];Ext.getCmp("er_enddate").setValue(n[7]);Ext.getCmp("er_enddate").dataArray=n[1];if(!isTrend){Ext.getCmp("er_sthr").setValue(n[8]);
Ext.getCmp("er_sthr").dataArray=n[2];Ext.getCmp("er_endhr").setValue(n[9]);Ext.getCmp("er_endhr").dataArray=n[3];stmin=n[10];enmin=n[11];mgr_stmin=n[4];mgr_enmin=n[5];}var t=j+" "+i+":"+l;var s=o+" "+k+":"+q;getResultType(t,s,dateFormatForTimeline);}}});}}},{xtype:"scrollcombo",width:50,defaultListConfig:{loadingHeight:70,minWidth:50,maxHeight:300,shadow:"sides"},fieldLabel:hrLbl,cls:"dropdown",id:"er_endhr",name:"er_endhr",store:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],displayField:"displayField",valueField:"valueField",queryMode:"local",disabled:true,dataArray:null,listeners:{"select":function(b){formated_sdate=Ext.Date.dateFormat(Ext.getCmp("er_enddate").getValue(),mgrDateFormat);
if(enmin==null||enmin=="undefined"||enmin==""){enmin="00";}var a=formated_sdate+" "+b.getValue()+":"+enmin+":00";var c="date="+a+"&method=getDateTime&isReverse=true&isFromReporter=true";Ext.Ajax.request({url:"/final/servlet/com.eg.EgTimeZoneConverterServlet",params:c,scope:this,method:"POST",success:function(d){var f=d.responseText;
f=Ext.String.trim(f);var e=f.substring(0,f.lastIndexOf(" "));var g=f.substring(f.lastIndexOf(" ")+1);Ext.getCmp("er_enddate").dataArray=e;Ext.getCmp("er_endhr").dataArray=g.substring(0,g.indexOf(":"));mgr_enmin=g.substring(g.indexOf(":")+1,g.lastIndexOf(":"));}});}}},{xtype:"combo",width:50,defaultListConfig:{loadingHeight:70,minWidth:50,maxHeight:300,shadow:"sides"},id:"er_mode",name:"er_mode",hidden:true,fieldLabel:graphLbl,margin:"0 20 10 10",value:er_modeInTracker,cls:"dropdown",store:["2D","3D"]}];
},getTimelineItems:function(){return[{xtype:"scrollcombo",fieldLabel:timelineLbl,id:"er_timeline",name:"er_timeline",displayField:"displayField",valueField:"valueField",queryMode:"local",store:Ext.data.Store({fields:["displayField","valueField"],data:[]}),width:90,cls:"dropdown",defaultListConfig:{loadingHeight:70,minWidth:90,maxHeight:300,shadow:"sides"},listeners:{"boxready":function(g){var f=Ext.getCmp("er_stdate");
var h=Ext.getCmp("er_enddate");var c=Ext.getCmp("er_sthr");var e=Ext.getCmp("er_endhr");var a=Ext.getCmp("er_mode");var d=Ext.getCmp("er_stmin");var b=Ext.getCmp("er_endmin");if(g.getValue()=="Any"){f.setDisabled(false);h.setDisabled(false);c.setDisabled(false);e.setDisabled(false);d.setDisabled(false);
b.setDisabled(false);}else{f.setDisabled(true);h.setDisabled(true);c.setDisabled(true);e.setDisabled(true);d.setDisabled(true);b.setDisabled(true);}a.hide();},"select":function(j){var b=Ext.getCmp("er_stdate");var r=Ext.getCmp("er_enddate");var d=Ext.getCmp("er_sthr");var s=Ext.getCmp("er_endhr");var m=Ext.getCmp("er_mode");
var e=Ext.getCmp("er_stmin");var l=Ext.getCmp("er_endmin");if(j.getValue()=="Any"){b.setDisabled(false);r.setDisabled(false);d.setDisabled(false);s.setDisabled(false);e.setDisabled(false);l.setDisabled(false);var f=j.getValue();var i=b.getValue();var k=r.getValue();var q=d.getValue();var t=s.getValue();
var c=e.getValue();var p=l.getValue();var g=this.up("fieldcontainer").hideMinutes;if(stmin==""){i=Ext.Date.dateFormat(i,"m/d/Y");k=Ext.Date.dateFormat(k,"m/d/Y");var n=this.up("fieldcontainer").gtype;var a="&P0=["+f+"]&P1=["+i+"]&P2=["+k+"]&P3=["+q+"]&P4=["+t+"]&P5=["+c+"]&P6=["+p+"]&P7=["+dateFormatForTimeline+"]";
if(n!=null&&(n=="summary"||n=="trend")){var o=Ext.getCmp("period").getValue();a+="&P8=["+o+"]&P9=[]&F=getTimeForSummary";}else{a+="&F=getTime";if(!g){h+="&P8=true";}}var h="C=id"+a;Ext.Ajax.request({url:"/final/servlet/com.eg.ErRemoteScriptingServlet",params:h,scope:this,method:"POST",success:function(v){var x=v.responseText;
var w=Ext.decode(x);if(!Ext.isEmpty(w)){var u=w.timeline;if(!isTrend){b.setValue(u[6]);b.dataArray=u[0];r.setValue(u[7]);r.dataArray=u[1];d.setValue(u[8]);d.dataArray=u[2];s.setValue(u[9]);s.dataArray=u[3];if(!g){if((selectedStMinForDisplay!=null&&selectedStMinForDisplay!="")&&(selectedEndminForDisplay!=null&&selectedEndminForDisplay!="")){e.setValue(selectedStMinForDisplay);
e.dataArray=selectedMgrStMin;l.setValue(selectedEndminForDisplay);l.dataArray=selectedMgrEndMin;this.up("fieldcontainer").selectedStMinForDisplay="";this.up("fieldcontainer").selectedMgrStMin="";this.up("fieldcontainer").selectedEndminForDisplay="";this.up("fieldcontainer").selectedMgrEndMin="";}else{e.setValue(u[10]);
e.dataArray=u[4];l.setValue(u[11]);l.dataArray=u[5];}}else{e.setValue(u[10]);e.dataArray=u[4];l.setValue(u[11]);l.dataArray=u[5];}}}}});}else{i=Ext.Date.dateFormat(i,"m/d/Y");k=Ext.Date.dateFormat(k,"m/d/Y");var n=this.up("fieldcontainer").gtype;var a="&P0=["+f+"]&P1=["+i+"]&P2=["+k+"]&P3=["+q+"]&P4=["+t+"]&P5=["+c+"]&P6=["+p+"]&P7=["+dateFormatForTimeline+"]";
if(n!=null&&(n=="summary"||n=="trend")){var o=Ext.getCmp("period").getValue();a+="&P8=["+o+"]&P9=[]&F=getTimeForSummary";isTrend=true;}else{a+="&F=getTime";if(!g){a+="&P8=[true]";}}var h="C=id"+a;Ext.Ajax.request({url:"/final/servlet/com.eg.ErRemoteScriptingServlet",params:h,scope:this,method:"POST",success:function(w){var B=w.responseText;
var z=Ext.decode(B);if(!Ext.isEmpty(z)){var u=z.timeline;if(!isTrend){b.setValue(u[6]);b.dataArray=u[0];r.setValue(u[7]);r.dataArray=u[1];d.setValue(u[8]);d.dataArray=u[2];s.setValue(u[9]);s.dataArray=u[3];if(!g){var A=this.up("fieldcontainer").selectedStMinForDisplay;var x=this.up("fieldcontainer").selectedEndminForDisplay;
if((A!=null&&A!="")&&(x!=null&&x!="")){var y=this.up("fieldcontainer").selectedMgrStMin;var v=this.up("fieldcontainer").selectedMgrEndMin;e.setValue(A);e.dataArray=y;l.setValue(x);l.dataArray=v;this.up("fieldcontainer").selectedStMinForDisplay="";this.up("fieldcontainer").selectedMgrStMin="";this.up("fieldcontainer").selectedEndminForDisplay="";
this.up("fieldcontainer").selectedMgrEndMin="";}else{e.setValue(u[10]);e.dataArray=u[4];l.setValue(u[11]);l.dataArray=u[5];}}else{e.setValue(u[10]);e.dataArray=u[4];l.setValue(u[11]);l.dataArray=u[5];}}}}});}}else{b.setDisabled(true);r.setDisabled(true);d.setDisabled(true);s.setDisabled(true);e.setDisabled(true);
l.setDisabled(true);var f=j.getValue();var i=b.getValue();var k=r.getValue();var q=d.getValue();var t=s.getValue();var c=e.getValue();var p=l.getValue();if(f=="Any"){i=Ext.Date.dateFormat(i,"m/d/Y");k=Ext.Date.dateFormat(k,"m/d/Y");}else{i=Ext.Date.dateFormat(i,mgrDateFormat);k=Ext.Date.dateFormat(k,mgrDateFormat);
}var n=this.up("fieldcontainer").gtype;var a="&P0=["+f+"]&P1=["+i+"]&P2=["+k+"]&P3=["+q+"]&P4=["+t+"]&P5=["+c+"]&P6=["+p+"]&P7=["+dateFormatForTimeline+"]";if(n!=null&&(n=="summary"||n=="trend")){var o=Ext.getCmp("period").getValue();a+="&P8=["+o+"]&P9=[]&F=getTimeForSummary";}else{a+="&F=getTime";}var h="C=id"+a;
Ext.Ajax.request({url:"/final/servlet/com.eg.ErRemoteScriptingServlet",params:h,scope:this,method:"POST",success:function(v){var x=v.responseText;var w=Ext.decode(x);if(!Ext.isEmpty(w)){var u=w.timeline;b.setValue(u[6]);b.dataArray=u[0];r.setValue(u[7]);r.dataArray=u[1];d.setValue(u[8]);d.dataArray=u[2];
s.setValue(u[9]);s.dataArray=u[3];e.setValue(u[10]);e.dataArray=u[4];l.setValue(u[11]);l.dataArray=u[5];}}});}}}},{xtype:"datepicker",id:"er_stdate",name:"er_stdate",format:mgrDateFormat,fieldLabel:fromLbl,cls:"datepicker",disabled:true,dataArray:null,listeners:{"select":function(e){var h=Ext.getCmp("er_stmin");
var n=Ext.getCmp("er_endmin");var p=Ext.getCmp("er_timeline").getValue();var o=Ext.getCmp("er_stdate").getValue();var f=Ext.getCmp("er_enddate").getValue();var g=Ext.getCmp("er_sthr").getValue();var a=Ext.getCmp("er_endhr").getValue();var c=Ext.getCmp("er_stmin").getValue();var m=Ext.getCmp("er_endmin").getValue();
var d=Ext.getCmp("er_mode");var j=this.up("fieldcontainer").hideMinutes;if(p=="Any"){o=Ext.Date.dateFormat(o,"m/d/Y");f=Ext.Date.dateFormat(f,"m/d/Y");}else{o=Ext.Date.dateFormat(o,mgrDateFormat);f=Ext.Date.dateFormat(f,mgrDateFormat);}var i="&P0=["+p+"]&P1=["+o+"]&P2=["+f+"]&P3=["+g+"]&P4=["+a+"]&P5=["+c+"]&P6=["+m+"]&P7=["+dateFormatForTimeline+"]";
var l=this.up("fieldcontainer").gtype;if(l!=null&&(l=="summary"||l=="trend")){var k=Ext.getCmp("period").getValue();i+="&P8=["+k+"]&P9=[]&F=getTimeForSummary";isTrend=true;}else{i+="&F=getTime";if(!j){i+="&P8=[true]";}}var b="C=id"+i;Ext.Ajax.request({url:"/final/servlet/com.eg.ErRemoteScriptingServlet",params:b,scope:this,method:"POST",success:function(s){var x=s.responseText;
var v=Ext.decode(x);if(!Ext.isEmpty(v)){var q=v.timeline;Ext.getCmp("er_stdate").dataArray=q[0];Ext.getCmp("er_enddate").setValue(q[7]);Ext.getCmp("er_stdate").setValue(q[6]);Ext.getCmp("er_enddate").dataArray=q[1];if(!isTrend){Ext.getCmp("er_sthr").setValue(q[8]);Ext.getCmp("er_sthr").dataArray=q[2];
Ext.getCmp("er_endhr").setValue(q[9]);Ext.getCmp("er_endhr").dataArray=q[3];Ext.getCmp("er_stmin").setValue(q[10]);Ext.getCmp("er_stmin").dataArray=q[4];Ext.getCmp("er_endmin").setValue(q[11]);Ext.getCmp("er_endmin").dataArray=q[5];if(!j){var w=this.up("fieldcontainer").selectedStMinForDisplay;var t=this.up("fieldcontainer").selectedEndminForDisplay;
if((w!=null&&w!="")&&(t!=null&&t!="")){var u=this.up("fieldcontainer").selectedMgrStMin;var r=this.up("fieldcontainer").selectedMgrEndMin;h.setValue(w);h.dataArray=u;n.setValue(t);n.dataArray=r;this.up("fieldcontainer").selectedStMinForDisplay="";this.up("fieldcontainer").selectedMgrStMin="";this.up("fieldcontainer").selectedEndminForDisplay="";
this.up("fieldcontainer").selectedMgrEndMin="";}else{h.setValue(q[10]);h.dataArray=q[4];n.setValue(q[11]);n.dataArray=q[5];}}}}}});}}},{xtype:"scrollcombo",width:50,id:"er_sthr",name:"er_sthr",defaultListConfig:{loadingHeight:70,minWidth:50,maxHeight:300,shadow:"sides"},store:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],displayField:"displayField",valueField:"valueField",queryMode:"local",fieldLabel:hrLbl,cls:"dropdown",disabled:true,dataArray:null,listeners:{"select":function(b){formated_sdate=Ext.Date.dateFormat(Ext.getCmp("er_stdate").getValue(),mgrDateFormat);
if(stmin==null||stmin=="undefined"||stmin==""){stmin="00";}var a=formated_sdate+" "+b.getValue()+":"+stmin+":00";var c="date="+a+"&method=getDateTime&isReverse=true&isFromReporter=true";Ext.Ajax.request({url:"/final/servlet/com.eg.EgTimeZoneConverterServlet",params:c,scope:this,method:"POST",success:function(d){var f=d.responseText;
f=Ext.String.trim(f);var e=f.substring(0,f.lastIndexOf(" "));var g=f.substring(f.lastIndexOf(" ")+1);if(!isTrend){if(g!=null&&(g.indexOf(":")==g.lastIndexOf(":"))){Ext.getCmp("er_sthr").dataArray=g.substring(0,g.indexOf(":"));}else{if(g!=null&&g.length>0&&g.indexOf(":")>-1){Ext.getCmp("er_sthr").dataArray=g.substring(0,g.indexOf(":"));
}}}}});}}},{xtype:"scrollcombo",width:50,id:"er_stmin",name:"er_stmin",defaultListConfig:{loadingHeight:70,minWidth:50,maxHeight:300,shadow:"sides"},store:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58"],displayField:"displayField",valueField:"valueField",queryMode:"local",fieldLabel:minLbl,cls:"dropdown",disabled:true,hidden:this.hideMinutes,dataArray:null,listeners:{"select":function(b){formated_sdate=Ext.Date.dateFormat(Ext.getCmp("er_stdate").getValue(),mgrDateFormat);
var a=formated_sdate+" "+Ext.getCmp("er_sthr").getValue()+":"+b.getValue()+":00";var c="date="+a+"&method=getDateTime&isReverse=true&isFromReporter=true";Ext.Ajax.request({url:"/final/servlet/com.eg.EgTimeZoneConverterServlet",params:c,scope:this,method:"POST",success:function(d){var f=d.responseText;
f=Ext.String.trim(f);var e=f.substring(0,f.lastIndexOf(" "));var g=f.substring(f.lastIndexOf(" ")+1);if(!isTrend){if(g!=null&&(g.indexOf(":")==g.lastIndexOf(":"))){Ext.getCmp("er_stmin").dataArray="00";}else{if(g!=null&&g.length>0&&g.indexOf(":")>-1){Ext.getCmp("er_stmin").dataArray=g.substring(g.indexOf(":")+1,g.lastIndexOf(":"));
}}}}});}}},{xtype:"datepicker",id:"er_enddate",name:"er_enddate",format:mgrDateFormat,fieldLabel:Tolbl,cls:"datepicker",disabled:true,dataArray:null,listeners:{"select":function(e){var h=Ext.getCmp("er_stmin");var n=Ext.getCmp("er_endmin");var p=Ext.getCmp("er_timeline").getValue();var o=Ext.getCmp("er_stdate").getValue();
var f=Ext.getCmp("er_enddate").getValue();var g=Ext.getCmp("er_sthr").getValue();var a=Ext.getCmp("er_endhr").getValue();var c=Ext.getCmp("er_stmin").getValue();var m=Ext.getCmp("er_endmin").getValue();var d=Ext.getCmp("er_mode");var j=this.up("fieldcontainer").hideMinutes;if(p=="Any"){o=Ext.Date.dateFormat(o,"m/d/Y");
f=Ext.Date.dateFormat(f,"m/d/Y");}else{o=Ext.Date.dateFormat(o,mgrDateFormat);f=Ext.Date.dateFormat(f,mgrDateFormat);}var i="&P0=["+p+"]&P1=["+o+"]&P2=["+f+"]&P3=["+g+"]&P4=["+a+"]&P5=["+c+"]&P6=["+m+"]&P7=["+dateFormatForTimeline+"]";var l=this.up("fieldcontainer").gtype;if(l!=null&&(l=="summary"||l=="trend")){var k=Ext.getCmp("period").getValue();
i+="&P8=["+k+"]&P9=[]&F=getTimeForSummary";}else{i+="&F=getTime";if(!j){i+="&P8=[true]";}}var b="C=id"+i;Ext.Ajax.request({url:"/final/servlet/com.eg.ErRemoteScriptingServlet",params:b,scope:this,method:"POST",success:function(s){var x=s.responseText;var v=Ext.decode(x);if(!Ext.isEmpty(v)){var q=v.timeline;
Ext.getCmp("er_stdate").setValue(q[6]);Ext.getCmp("er_stdate").dataArray=q[0];Ext.getCmp("er_enddate").setValue(q[7]);Ext.getCmp("er_enddate").dataArray=q[1];if(!isTrend){Ext.getCmp("er_sthr").setValue(q[8]);Ext.getCmp("er_sthr").dataArray=q[2];Ext.getCmp("er_endhr").setValue(q[9]);Ext.getCmp("er_endhr").dataArray=q[3];
Ext.getCmp("er_stmin").setValue(q[10]);Ext.getCmp("er_stmin").dataArray=q[4];Ext.getCmp("er_endmin").setValue(q[11]);Ext.getCmp("er_endmin").dataArray=q[5];if(!j){var w=this.up("fieldcontainer").selectedStMinForDisplay;var t=this.up("fieldcontainer").selectedEndminForDisplay;if((w!=null&&w!="")&&(t!=null&&t!="")){var u=this.up("fieldcontainer").selectedMgrStMin;
var r=this.up("fieldcontainer").selectedMgrEndMin;h.setValue(w);h.dataArray=u;n.setValue(t);n.dataArray=r;this.up("fieldcontainer").selectedStMinForDisplay="";this.up("fieldcontainer").selectedMgrStMin="";this.up("fieldcontainer").selectedEndminForDisplay="";this.up("fieldcontainer").selectedMgrEndMin="";
}else{h.setValue(q[10]);h.dataArray=q[4];n.setValue(q[11]);n.dataArray=q[5];}}}}}});}}},{xtype:"scrollcombo",width:50,defaultListConfig:{loadingHeight:70,minWidth:50,maxHeight:300,shadow:"sides"},fieldLabel:hrLbl,cls:"dropdown",id:"er_endhr",name:"er_endhr",store:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],displayField:"displayField",valueField:"valueField",queryMode:"local",disabled:true,dataArray:null,listeners:{"select":function(b){formated_sdate=Ext.Date.dateFormat(Ext.getCmp("er_enddate").getValue(),mgrDateFormat);
if(enmin==null||enmin=="undefined"||enmin==""){enmin="00";}var a=formated_sdate+" "+b.getValue()+":"+enmin+":00";var c="date="+a+"&method=getDateTime&isReverse=true&isFromReporter=true";Ext.Ajax.request({url:"/final/servlet/com.eg.EgTimeZoneConverterServlet",params:c,scope:this,method:"POST",success:function(d){var f=d.responseText;
f=Ext.String.trim(f);var e=f.substring(0,f.lastIndexOf(" "));var g=f.substring(f.lastIndexOf(" ")+1);if(!isTrend){if(g!=null&&(g.indexOf(":")==g.lastIndexOf(":"))){Ext.getCmp("er_endhr").dataArray=g.substring(0,g.indexOf(":"));}else{if(g!=null&&g.length>0&&g.indexOf(":")>-1){Ext.getCmp("er_endhr").dataArray=g.substring(0,g.indexOf(":"));
}}}}});}}},{xtype:"scrollcombo",width:50,id:"er_endmin",name:"er_endmin",defaultListConfig:{loadingHeight:70,minWidth:50,maxHeight:300,shadow:"sides"},store:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58"],displayField:"displayField",valueField:"valueField",queryMode:"local",fieldLabel:minLbl,cls:"dropdown",disabled:true,hidden:this.hideMinutes,dataArray:null,listeners:{"select":function(b){formated_sdate=Ext.Date.dateFormat(Ext.getCmp("er_enddate").getValue(),mgrDateFormat);
var a=formated_sdate+" "+Ext.getCmp("er_endhr").getValue()+":"+b.getValue()+":00";var c="date="+a+"&method=getDateTime&isReverse=true&isFromReporter=true";Ext.Ajax.request({url:"/final/servlet/com.eg.EgTimeZoneConverterServlet",params:c,scope:this,method:"POST",success:function(d){var f=d.responseText;
f=Ext.String.trim(f);var e=f.substring(0,f.lastIndexOf(" "));var g=f.substring(f.lastIndexOf(" ")+1);if(!isTrend){if(g!=null&&(g.indexOf(":")==g.lastIndexOf(":"))){Ext.getCmp("er_endmin").dataArray="00";}else{if(g!=null&&g.length>0&&g.indexOf(":")>-1){Ext.getCmp("er_endmin").dataArray=g.substring(g.indexOf(":")+1,g.lastIndexOf(":"));
}}}}});}}},{xtype:"combo",width:50,defaultListConfig:{loadingHeight:70,minWidth:50,maxHeight:300,shadow:"sides"},id:"er_mode",name:"er_mode",fieldLabel:graphLbl,margin:"0 20 10 10",value:er_modeInTracker,cls:"dropdown",store:["2D","3D"]}];}});