List Info

Thread: pari: branch asterisknow r2130 - /branches/asterisknow/config/digital.html




pari: branch asterisknow r2130 - /branches/asterisknow/config/digital.htm l
user name
2008-01-11 12:42:05
Author: pari
Date: Fri Jan 11 12:42:05 2008
New Revision: 2130

URL: http://svn.digium.com/view/asterisk-gui?view=rev&am
p;rev=2130
Log:
Fix for BE-320

problem: GUI asking for restart even when there is no
hardware detected.
    Fix: set the require_reboot flag only when there is
analog/digital hardware detected



Modified:
    branches/asterisknow/config/digital.html

Modified: branches/asterisknow/config/digital.html
URL: http://svn.digium.com/view/asterisk-gui/branc
hes/asterisknow/config/digital.html?view=diff&rev=2130&a
mp;r1=2129&r2=2130
============================================================
==================
--- branches/asterisknow/config/digital.html (original)
+++ branches/asterisknow/config/digital.html Fri Jan 11
12:42:05 2008
 -118,6
+118,7 
 var spans_todelete = []; // we delete all the span_x
entries in users.conf (and their extensions.conf counter
parts) before writing back any new information.
 var hwchanged = true ; // -1 for no previous configuration
found (first time), true for detected hardware changes,
false for no hardware changes
 
+var HAS_ANALOGHARDWARE = true; var HAS_DIGITALHARDWARE =
true; // if the user does not have any hardware - always set
parent.REQUIRE_RESTART to false
 
 function detectHwChanges(){ // compare DETECTEDHARDWARE vs
CONFIGUREDHARDWARE 
 // returns true if a hardware change is detected and false
if there are no hardware changes
 -347,6
+348,7 
 
 		var newCell0 = newRow.insertCell(0);
 		newCell0.innerHTML = "No Digital Hardware detected
!!";
+		HAS_DIGITALHARDWARE = false;
 	}
 
 	if(foo_spans && hwchanged == -1){ // no previous
hardware information found - configuring for the first time
 -384,6
+386,7 
 
 	if(!parent.FXS_PORTS_DETECTED.length &&
!parent.FXO_PORTS_DETECTED.length ){
 		_$('FXSFXO_ports_td').innerHTML = "<table
class="taglist" cellpadding=5 cellspacing=1
border=0 align=center><tr><td>No Analog
Hardware detected !!
</td></tr></table><BR><BR>&quo
t;;
+		HAS_ANALOGHARDWARE = false;
 	}else{
 		if(parent.FXS_PORTS_DETECTED.length){
 			var s1 = ((parent.FXS_PORTS_DETECTED.length > 1)
?'Ports ':'Port ') + parent.FXS_PORTS_DETECTED.join(' , ')
;
 -710,7
+713,7 
 			makerequest('u', hwcfgfile, uri , function(t) {
 				// inform the user to restart
 				_$('status_message').style.display="none";
-				parent.REQUIRE_RESTART = true; 
+				parent.REQUIRE_RESTART = (HAS_ANALOGHARDWARE ||
HAS_DIGITALHARDWARE)? true : false;
 				//alert("You need to restart your machine for
these settings to take effect"); // the user needs to
click 'apply settings' in the main screen anyway - so this
would be a duplicate alert message.
 				window.location.href= "digital.html";
 			});
 -726,7
+729,7 
 	generate_zaptel: function(){
 		parent.astmanEngine.run_tool(asterisk_guiEditZap + "
applysettings", function(t) {
 			/* anything we need to do here? */
-			parent.REQUIRE_RESTART = true;
+			parent.REQUIRE_RESTART = (HAS_ANALOGHARDWARE ||
HAS_DIGITALHARDWARE)? true : false;
 			parent.astmanEngine.run_tool("ztcfg -vv",
function(t) {
 				storeDetectedHardware();
 				return true; 


_______________________________________________
--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

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )