Author: pari
Date: Tue Jan 8 16:30:33 2008
New Revision: 2104
URL: http://svn.digium.com/view/asterisk-gui?view=rev&am
p;rev=2104
Log:
add a REQUIRE_RESTART flag that alerts the user about a
restart if there are changes in zapchan/signalling in
users.conf
Modified:
branches/asterisknow/config/cfgbasic.html
branches/asterisknow/config/users.html
Modified: branches/asterisknow/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/bran
ches/asterisknow/config/cfgbasic.html?view=diff&rev=2104
&r1=2103&r2=2104
============================================================
==================
--- branches/asterisknow/config/cfgbasic.html (original)
+++ branches/asterisknow/config/cfgbasic.html Tue Jan 8
16:30:33 2008
 -33,6
+33,9 
var hwcfgfile = 'gui_confighw.conf'; // file to store
configured hardware information
var CONFIGURED_FXOPORTS = '';
var CONFIGURED_FXSPORTS = '';
+var REQUIRE_RESTART = false; // this flag is used to know
if there are any updates in zapchan settings
+// like if a FXS is assigned to a user or an analog trunk
is created or something
+// if this flag is true - we want to throw alert 'on
ApplySettings' saying that a restart is required
var eventeater = new Object;
var loggedon = -1;
 -345,7
+348,11 
window.setTimeout( function(){
_$('reloadconfig').style.display=""; },
asterisk_guifbt );
//gui_feedback("Running ztcfg ");
//astmanEngine.run_tool('ztcfg', function(t) { // run
ztcfg
- astmanEngine.cliCommand('reload', function(t){
gui_feedback("Restarted Asterisk !!",'blue'); });
// then reload asterisk
+ astmanEngine.cliCommand('reload', function(t){
gui_feedback("Restarted Asterisk !!",'blue');
+ if(REQUIRE_RESTART == true){
+ alert('The changes you made requires a restart.n' +
'Your hardware might not work properly until you reboot
!!');
+ }
+ }); // then reload asterisk
//});
}
Modified: branches/asterisknow/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/branche
s/asterisknow/config/users.html?view=diff&rev=2104&r
1=2103&r2=2104
============================================================
==================
--- branches/asterisknow/config/users.html (original)
+++ branches/asterisknow/config/users.html Tue Jan 8
16:30:33 2008
 -38,6
+38,9 
var fieldnames_buynow = ['cust_firstName', 'cust_lastName',
'cust_company', 'cust_email', 'cust_phone', 'cust_street',
'cust_city', 'cust_state', 'cust_zip', 'cust_country'];
var userinfowidgets = {};
var userinfo_callbacks = {};
+var USER_ZAPCHAN ; // this global variable is used to know
if the selected user's zapchan is changed between
+// callbacks.postselect and callbacks.savechanges, if it is
changed we set parent.REQUIRE_RESTART to true;
+// and if parent.REQUIRE_RESTART is true - we nolonger care
about updating/keeping track of this variable anyway.
userinfo_callbacks.format = function(t){
if ((t.name != 'Myinfo'))
 -266,10
+269,16 
showhide();
/* check to see if we need to display out email/voicemail
settings. */
_$('codecs_text').innerHTML = 'disallow: '+
_$('disallow').value + ' <BR> allow:' +
_$('allow').value ;
+
+ USER_ZAPCHAN = _$('zapchan').value ;
}
callbacks.savechanges = function(){
+ if( parent.REQUIRE_RESTART == false &&
_$('zapchan').value != USER_ZAPCHAN ){
+ parent.REQUIRE_RESTART = true;
+ }
+
var y = _$('name').value ;
var uri1 = build_action('update', 0 , y , 'signalling',
'fxo_ks'); // set the signalling to fxo_ks
makerequest( 'u', 'users.conf' , uri1 , function(t){ } );
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.c
om--
asterisk-gui-commits mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-g
ui-commits
|