espiceland: branch 2.0 r5150 - in /branches/2.0/config: ./ js/
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Thu Jan 27 14:06:52 CST 2011
Author: espiceland
Date: Thu Jan 27 14:06:47 2011
New Revision: 5150
URL: http://svnview.digium.com/svn/asterisk-gui?view=rev&rev=5150
Log:
Add new configuration options for vpmadt032 stuff for certain versions. Also fixes a display issue where contents of the form were running out of the dialog.
Modified:
branches/2.0/config/hardware_aa50.html
branches/2.0/config/hardware_dahdi.html
branches/2.0/config/js/astman.js
branches/2.0/config/js/hardware_aa50.js
branches/2.0/config/js/hardware_dahdi.js
Modified: branches/2.0/config/hardware_aa50.html
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/hardware_aa50.html?view=diff&rev=5150&r1=5149&r2=5150
==============================================================================
--- branches/2.0/config/hardware_aa50.html (original)
+++ branches/2.0/config/hardware_aa50.html Thu Jan 27 14:06:47 2011
@@ -3,9 +3,10 @@
*
* hardware configuration for AA50
*
- * Copyright (C) 2008, Digium, Inc.
+ * Copyright (C) 2008-2011, Digium, Inc.
*
* Pari Nannapaneni <pari at digium.com>
+ * Erin Spiceland <espiceland at digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -292,7 +293,6 @@
<option value='1'>Mute</option>
<option value='2'>Random Noise</option>
<option value='3'>Hoth Noise</option>
- <option value='4'>Suppression NLP (default)</option>
</select>
</td>
</tr>
Modified: branches/2.0/config/hardware_dahdi.html
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/hardware_dahdi.html?view=diff&rev=5150&r1=5149&r2=5150
==============================================================================
--- branches/2.0/config/hardware_dahdi.html (original)
+++ branches/2.0/config/hardware_dahdi.html Thu Jan 27 14:06:47 2011
@@ -3,10 +3,11 @@
*
* Digital Card Setup / Detection
*
- * Copyright (C) 2007-2009, Digium, Inc.
+ * Copyright (C) 2007-2011, Digium, Inc.
*
* Brandon Kruse <bkruse at digium.com>
* Pari Nannapaneni <pari at digium.com>
+ * Erin Spiceland <espiceland at digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -43,7 +44,7 @@
** - - - - - - End of ztscan output - - - - - - - -
** in the above output, [3] is the span number and the description says 'Card 2 Span 1' which is
** still valid because 'span 3' is the 'span 1' on 'card 2'
- ** if your ztscan outputs in some other wiered format, this page will go crazy and might not work as expected.
+ ** if your ztscan outputs in some other weird format, this page will go crazy and might not work as expected.
**
*** in this page, SPANS[l]['syncsrc'] is NOT the syncsrc from ztscan - but it is read from zaptel.conf
-->
@@ -386,7 +387,7 @@
<div id="errmsg" style="display:none"></div>
- <div id="edit_span" STYLE="width:500; height:340;display:none;" class='dialog'>
+ <div id="edit_span" STYLE="width:500; display:none;" class='dialog'>
<TABLE width="100%" cellpadding=0 cellspacing=0>
<TR class="dialog_title_tr">
<TD class="dialog_title" onmousedown="ASTGUI.startDrag(event);">
Modified: branches/2.0/config/js/astman.js
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=5150&r1=5149&r2=5150
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Thu Jan 27 14:06:47 2011
@@ -3,7 +3,7 @@
*
* Javascript functions for accessing manager over HTTP and Some UI components/functions used in AsteriskGUI.
*
- * Copyright (C) 2006-2010, Digium, Inc.
+ * Copyright (C) 2006-2011, Digium, Inc.
*
* Mark Spencer <markster at digium.com>
* Pari Nannapaneni <pari at digium.com>
@@ -310,6 +310,21 @@
String.prototype.withOut = function(k){
return this.split(k).join('');
+ };
+
+ String.prototype.versionGreaterOrEqualTo = function(c){
+ var v = this.split(".");
+ var c = c.split(".");
+ for(var i = 0; i < 6; i++){
+ c[i] = parseInt(c[i] || 0);
+ v[i] = parseInt(v[i] || 0);
+ if(v[i] > c[i]){
+ return true;
+ }else if(v[i] < c[i]){
+ return false;
+ }
+ }
+ return true; /* They are equal */
};
Modified: branches/2.0/config/js/hardware_aa50.js
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/js/hardware_aa50.js?view=diff&rev=5150&r1=5149&r2=5150
==============================================================================
--- branches/2.0/config/js/hardware_aa50.js (original)
+++ branches/2.0/config/js/hardware_aa50.js Thu Jan 27 14:06:47 2011
@@ -3,9 +3,10 @@
*
* hardware_aa50.html functions
*
- * Copyright (C) 2006-2008, Digium, Inc.
+ * Copyright (C) 2006-2011, Digium, Inc.
*
* Pari Nannapaneni <pari at digium.com>
+ * Erin Spiceland <espiceland at digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -198,11 +199,11 @@
var localajaxinit = function(){
- top.log.debug("Starting Loading Page hardware_aa50.html .. start function: window.onload()");
+ ASTGUI.Log.Debug("Starting Loading Page hardware_aa50.html .. start function: window.onload()");
ASTGUI.dialog.waitWhile('Detecting Hardware ...');
top.document.title = "Analog Hardware Setup & Configuration";
load_currentAnalogSettings();
- top.log.debug("end of function: window.onload()");
+ ASTGUI.Log.Debug("end of function: window.onload()");
};
@@ -358,14 +359,37 @@
parent.ASTGUI.systemCmd( ' touch /etc/asterisk/applyzap.conf', function(){ // run ztscan and then try loading ztscan.conf
setTimeout( function(){
+ var DAHDI_version = "0";
+ ASTGUI.systemCmdWithOutput( 'cat /sys/module/dahdi/version' , function(output){
+ output = output.trim();
+ if(output){
+ DAHDI_version = output;
+ }else{
+ ASTGUI.systemCmdWithOutput( 'modinfo -F version dahdi' , function(output){
+ output = output.trim();
+ if(output){
+ DAHDI_version = output;
+ }
+ });
+ }
+ });
ASTGUI.systemCmdWithOutput( 'cat /proc/cmdline' , function(output){
ASTGUI.dialog.hide();
if( output.contains('boardrev=C') ){
$('.hidevpm').show();
isREVC = true;
- ASTGUI.updateFieldToValue( 'vpmnlptype' , c.getProperty('vpmnlptype') || '4' );
- ASTGUI.updateFieldToValue( 'vpmnlpthresh' , c.getProperty('vpmnlpthresh') || '24' );
- ASTGUI.updateFieldToValue( 'vpmnlpmaxsupp' , c.getProperty('vpmnlpmaxsupp') || '24' );
+ if(DAHDI_version.versionGreaterOrEqualTo("2.4.0") || parent.sessionData.PLATFORM.isAA50){
+ ASTGUI.selectbox.append('vpmnlptype', "NLP Suppression", 4);
+ ASTGUI.selectbox.append('vpmnlptype', "NLP AutoSuppression (default)", 6);
+ ASTGUI.updateFieldToValue( 'vpmnlptype' , c.getProperty('vpmnlptype') || '6' );
+ ASTGUI.updateFieldToValue( 'vpmnlpthresh' , c.getProperty('vpmnlpthresh') || '22' );
+ ASTGUI.updateFieldToValue( 'vpmnlpmaxsupp' , c.getProperty('vpmnlpmaxsupp') || '10' );
+ }else{
+ ASTGUI.selectbox.append('vpmnlptype', "NLP Suppression (default)", 4);
+ ASTGUI.updateFieldToValue( 'vpmnlptype' , c.getProperty('vpmnlptype') || '4' );
+ ASTGUI.updateFieldToValue( 'vpmnlpthresh' , c.getProperty('vpmnlpthresh') || '24' );
+ ASTGUI.updateFieldToValue( 'vpmnlpmaxsupp' , c.getProperty('vpmnlpmaxsupp') || '24' );
+ }
}
});
} , 700);
Modified: branches/2.0/config/js/hardware_dahdi.js
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/js/hardware_dahdi.js?view=diff&rev=5150&r1=5149&r2=5150
==============================================================================
--- branches/2.0/config/js/hardware_dahdi.js (original)
+++ branches/2.0/config/js/hardware_dahdi.js Thu Jan 27 14:06:47 2011
@@ -3,7 +3,7 @@
*
* hardware_dahdi.html functions
*
- * Copyright (C) 2006-2010, Digium, Inc.
+ * Copyright (C) 2006-2011, Digium, Inc.
*
* Pari Nannapaneni <pari at digium.com>
* Ryan Brindley <ryan at digium.com>
@@ -443,6 +443,7 @@
continue;
} // in this page, we care only about digital spans
// note: function detectHwChanges checks if there are any changes in analog ports detected
+ top.log.debug("devicetype is " + n[l]['devicetype']);
if( n[l]['description'].toLowerCase().contains('ztdummy') ){ continue;} // ignore ztdummy :-)
SPANS[l] = {};
for( var k in n[l] ){ if(n[l].hasOwnProperty(k)){
@@ -1268,9 +1269,38 @@
ASTGUI.updateFieldToValue('mwimode', config.getProperty('mwimode'));
_$('enable_disable_checkbox_mwimode').checked = (config.getProperty('mwimode')) ? true : false ;
_$('enable_disable_checkbox_mwimode').updateStatus();
- ASTGUI.updateFieldToValue('vpmnlptype', config.getProperty('vpmnlptype') || '4');
- ASTGUI.updateFieldToValue('vpmnlpthresh', config.getProperty('vpmnlpthresh') || '24');
- ASTGUI.updateFieldToValue('vpmnlpmaxsupp', config.getProperty('vpmnlpmaxsupp') || '24');
+
+
+
+ var DAHDI_version = "0";
+ ASTGUI.systemCmdWithOutput( 'cat /sys/module/dahdi/version' , function(output){
+ output = output.trim();
+ if(output){
+ DAHDI_version = output;
+ }else{
+ ASTGUI.systemCmdWithOutput( 'modinfo -F version dahdi' , function(output){
+ output = output.trim();
+ if(output){
+ DAHDI_version = output;
+ }
+ });
+ }
+ });
+ ASTGUI.systemCmdWithOutput( 'cat /proc/cmdline' , function(output){
+ if(DAHDI_version.versionGreaterOrEqualTo("2.4.0") || parent.sessionData.PLATFORM.isAA50){
+ ASTGUI.selectbox.append('vpmnlptype', "NLP Suppression", 4);
+ ASTGUI.selectbox.append('vpmnlptype', "NLP AutoSuppression (default)", 6);
+ ASTGUI.updateFieldToValue( 'vpmnlptype' , config.getProperty('vpmnlptype') || '6' );
+ ASTGUI.updateFieldToValue( 'vpmnlpthresh' , config.getProperty('vpmnlpthresh') || '22' );
+ ASTGUI.updateFieldToValue( 'vpmnlpmaxsupp' , config.getProperty('vpmnlpmaxsupp') || '10' );
+ }else{
+ ASTGUI.selectbox.append('vpmnlptype', "NLP Suppression (default)", 4);
+ ASTGUI.updateFieldToValue( 'vpmnlptype' , config.getProperty('vpmnlptype') || '4' );
+ ASTGUI.updateFieldToValue( 'vpmnlpthresh' , config.getProperty('vpmnlpthresh') || '24' );
+ ASTGUI.updateFieldToValue( 'vpmnlpmaxsupp' , config.getProperty('vpmnlpmaxsupp') || '24' );
+ }
+ });
+
loadConfigFiles.load_hwcfgfile(); // try to load last detected/configured hardware information
};
More information about the asterisk-gui-commits
mailing list