pari: branch aadk r885 - in /branches/aadk: ./ config/ config/setup/
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Mon May 7 09:04:43 MST 2007
Author: pari
Date: Mon May 7 11:04:42 2007
New Revision: 885
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=885
Log:
Merged revisions 879,881-883 via svnmerge from
https://origsvn.digium.com/svn/asterisk-gui/trunk
........
r879 | pari | 2007-05-04 18:20:17 -0500 (Fri, 04 May 2007) | 22 lines
** Major Change **
Until now we've been using pollEvents for keeping the http session alive.
We need an alternative because -
*) If Esc key is pressed - all the background XHRs will be stopped including the waitevent
effectively resulting in a session timeout
*) There is actually no need to monitor events on the server except for in status.html
*) If User takes more time for answering an alert box or a confirm dialog -
any new pollEvents will be called only after the user answers the dialog.
This is often resulting in timeouts
*) This never worked in IE, Opera
The new model of making pings using setInterval should solve all these issues
For the timebeing I'm hardcoding the value 60 (60*250 milliseconds = 15 seconds)
but this will be soon replaced by the actual httptimeout from manager.conf
-Pari
........
r881 | pari | 2007-05-07 10:23:50 -0500 (Mon, 07 May 2007) | 1 line
minor bug fix - element.value instead of element
........
r882 | pari | 2007-05-07 10:41:12 -0500 (Mon, 07 May 2007) | 1 line
Forgot to update used_fxos on 'deletion of trunks'
........
r883 | pari | 2007-05-07 10:44:20 -0500 (Mon, 07 May 2007) | 1 line
SetupWizard: Forgot to update used_fxos on 'deletion of trunks'
........
Modified:
branches/aadk/ (props changed)
branches/aadk/config/cfgbasic.html
branches/aadk/config/home.html
branches/aadk/config/localexts.html
branches/aadk/config/setup/4.html
branches/aadk/config/status.html
branches/aadk/config/trunks.html
Propchange: branches/aadk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon May 7 11:04:42 2007
@@ -1,1 +1,1 @@
-/trunk:1-430,433-449,489-501,505-506,508-510,512-540,542-557,559,561-577,580-586,588-616,618-767,769-873
+/trunk:1-430,433-449,489-501,505-506,508-510,512-540,542-557,559,561-577,580-586,588-616,618-767,769-884
Modified: branches/aadk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/cfgbasic.html?view=diff&rev=885&r1=884&r2=885
==============================================================================
--- branches/aadk/config/cfgbasic.html (original)
+++ branches/aadk/config/cfgbasic.html Mon May 7 11:04:42 2007
@@ -46,6 +46,28 @@
var tooltip_default = "Move the mouse over to a field to see tooltips";
var asterisk_guitools_inextconf = 0;
var CF_status = 0;
+eventeater.pingstatus = false;
+var keepPinging;
+
+function pingevery(a){
+ keepPinging = setInterval( makeping, a*250 );
+}
+
+function makeping(){
+ var tmp;
+ var opt = {
+ method: 'get',
+ parameters: "action=ping",
+ asynchronous: true,
+ onComplete: function(t){
+ //if( t.responseText.match("Authentication failed") || t.responseText =="" ){
+ // window.clearInterval(keepPinging);
+ //}
+ // For some reason, I could not get clearInterval to work. I will fix this soon. - pari
+ }
+ };
+ tmp = new Ajax.Request( asterisk_rawmanPath, opt);
+}
eventeater.eventcb = function(msgs) {
if (loggedon == 1){
@@ -142,7 +164,6 @@
function loadscreen(srcbody) {
_$('mainscreen').style.display = '';
- if (loggedon == 1){ astmanEngine.pollEvents(); }
}
function setstatus(status) { _$('status').innerHTML = copyright + status; }
@@ -207,7 +228,7 @@
}
astmanEngine.setURL(asterisk_rawmanPath );
-astmanEngine.setEventCallback(eventeater.eventcb);
+//astmanEngine.setEventCallback(eventeater.eventcb);
function Logoff(){
//if(!confirm("Are you sure ?")){ return true; }
Modified: branches/aadk/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/home.html?view=diff&rev=885&r1=884&r2=885
==============================================================================
--- branches/aadk/config/home.html (original)
+++ branches/aadk/config/home.html Mon May 7 11:04:42 2007
@@ -76,6 +76,11 @@
if( parent.asterisk_guitools_inextconf == 0){
checkessentials();
+ }
+
+ if(!parent.eventeater.pingstatus){
+ parent.eventeater.pingstatus = true;
+ parent.pingevery(60);
}
parent.setLoggedOn(1);
@@ -296,7 +301,7 @@
if(m){
parent.gui_feedback("Login Successful",'blue',2000);
_$('statusbar').innerHTML = "<img src='images/tick.gif'><i>Connected!</i>";
- parent.astmanEngine.pollEvents();
+ //parent.astmanEngine.pollEvents();
}else{
_$('statusbar').innerHTML = "<i>Already connected...</i>";
if( window.location.href.match("reload=yes") ){ parent._$('mainscreen').style.display = ''; reload_Config2(); }else{ parent.loadscreen(this); }
Modified: branches/aadk/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/localexts.html?view=diff&rev=885&r1=884&r2=885
==============================================================================
--- branches/aadk/config/localexts.html (original)
+++ branches/aadk/config/localexts.html Mon May 7 11:04:42 2007
@@ -98,7 +98,7 @@
if( lel.value == ub.value.length ) {
return;
}else if( lel.value < ub.value.length ){
- ub.value = ub.value.substr(0,lel);
+ ub.value = ub.value.substr(0,lel.value);
return;
}else if( lel.value > ub.value.length ){
while ( lel.value != ub.value.length ){ ub.value = ub.value + "0" ; }
Modified: branches/aadk/config/setup/4.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/setup/4.html?view=diff&rev=885&r1=884&r2=885
==============================================================================
--- branches/aadk/config/setup/4.html (original)
+++ branches/aadk/config/setup/4.html Mon May 7 11:04:42 2007
@@ -195,6 +195,8 @@
callbacks.delchanges = function(box, value) {
deletesp_fromui(value);
delete_didcontext(value);
+ used_fxos.newvalue = "";
+ update_used_fxos();
var _hglobals = _$('hiddenglobals');
var oldvalue = _hglobals.stored_config.catbyname['globals'].fieldbyname[value];
if (oldvalue) {
@@ -932,6 +934,7 @@
if(_devices.options[i].value == trunk){
_devices.selectitem(i) ;
_$('delete').disabled = 0;
+ used_fxos.oldvalue = _devices.stored_config.catbyname[_devices.value].fieldbyname['zapchan'] ;
if( !_$('delete').click() ){ return; }
break;
}
Modified: branches/aadk/config/status.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/status.html?view=diff&rev=885&r1=884&r2=885
==============================================================================
--- branches/aadk/config/status.html (original)
+++ branches/aadk/config/status.html Mon May 7 11:04:42 2007
@@ -118,10 +118,11 @@
refreshChannelsList() ;
parent.astmanEngine.setEventCallback(parent.eventeater.eventcd );
parent.loadscreen(this);
+ parent.astmanEngine.pollEvents();
}
function localajaxend(){
- parent.astmanEngine.setEventCallback(parent.eventeater.eventcb );
+ parent.astmanEngine.setEventCallback(null);
if( navigator.userAgent.indexOf("MSIE") != -1 ){
try{ purge( document.body ); } catch(e){ }
}
Modified: branches/aadk/config/trunks.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/trunks.html?view=diff&rev=885&r1=884&r2=885
==============================================================================
--- branches/aadk/config/trunks.html (original)
+++ branches/aadk/config/trunks.html Mon May 7 11:04:42 2007
@@ -184,6 +184,8 @@
callbacks.delchanges = function(box, value) {
deletesp_fromui(value);
delete_didcontext(value);
+ used_fxos.newvalue = "";
+ update_used_fxos();
var _hglobals = _$('hiddenglobals');
var oldvalue = _hglobals.stored_config.catbyname['globals'].fieldbyname[value];
if (oldvalue) {
@@ -917,6 +919,7 @@
if(_devices.options[i].value == trunk){
_devices.selectitem(i) ;
_$('delete').disabled = 0;
+ used_fxos.oldvalue = _devices.stored_config.catbyname[_devices.value].fieldbyname['zapchan'] ;
if( !_$('delete').click() ){ return; }
break;
}
More information about the asterisk-gui-commits
mailing list