bkruse: branch asterisknow r1715 - /branches/asterisknow/config/
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Mon Oct 22 17:34:17 CDT 2007
Author: bkruse
Date: Mon Oct 22 17:34:17 2007
New Revision: 1715
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1715
Log:
another update for misdn
Modified:
branches/asterisknow/config/cfgbasic.html
branches/asterisknow/config/misdn.html
Modified: branches/asterisknow/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/cfgbasic.html?view=diff&rev=1715&r1=1714&r2=1715
==============================================================================
--- branches/asterisknow/config/cfgbasic.html (original)
+++ branches/asterisknow/config/cfgbasic.html Mon Oct 22 17:34:17 2007
@@ -244,6 +244,9 @@
function check_digital(n) {
var l, h;
+ if( n == "ERROR: CONFIG FILE NOT FOUND"){
+ return false;
+ }
for( l in n ){ if(n.hasOwnProperty(l)){
if( l =='general') {
if(n[l]['continue'] == "no") {
Modified: branches/asterisknow/config/misdn.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/misdn.html?view=diff&rev=1715&r1=1714&r2=1715
==============================================================================
--- branches/asterisknow/config/misdn.html (original)
+++ branches/asterisknow/config/misdn.html Mon Oct 22 17:34:17 2007
@@ -89,27 +89,15 @@
_$('editspan_SPAN').innerHTML = SPANS[l]['description'];
_$('editspan_ALARMS').innerHTML = SPANS[l]['alarms'];
- ASTGUI.selectbox.clear( _$('editspan_fac') );
-
- if ( Number(SPANS[l]['totchans']) <= 24 ){
- ASTGUI.selectbox.append(_$('editspan_fac'),'ESF/B8ZS', 'ESF/B8ZS');
- ASTGUI.selectbox.append(_$('editspan_fac'),'D4/AMI', 'D4/AMI');
- }else{
- ASTGUI.selectbox.append(_$('editspan_fac'),'CAS/AMI', 'CAS/AMI');
- ASTGUI.selectbox.append(_$('editspan_fac'),'CCS/HDB3', 'CCS/HDB3');
- ASTGUI.selectbox.append(_$('editspan_fac'),'CCS/CRC4/HDB3', 'CCS/CRC4/HDB3');
- }
-
- ASTGUI.selectbox.selectOption( _$('editspan_fac') , SPANS[l]['fac'] );
+ ASTGUI.selectbox.selectOption( _$('editspan_portset') , SPANS[l]['portset'] );
_$('editspan_channels').innerHTML = String(SPANS[l]['usedchans']) + "/" + String(SPANS[l]['totchans']) + " ("+SPANS[l]['spantype']+")";
- if( SPANS[l]['signalling'] ){
- ASTGUI.selectbox.selectOption( _$('editspan_signalling') , SPANS[l]['signalling'] );
+ if( SPANS[l]['portset'] ){
+ ASTGUI.selectbox.selectOption( _$('editspan_portset') , SPANS[l]['portset'] );
}else{
- _$('editspan_signalling').selectedIndex = -1 ;
+ _$('editspan_portset').selectedIndex = 0;
}
- disablEnable_sc();
if(SPANS[l]['switchtype']){
ASTGUI.selectbox.selectOption( _$('editspan_switchtype') , SPANS[l]['switchtype'] );
}else{
@@ -180,7 +168,7 @@
newCell1.align = "center";
var newCell2 = newRow.insertCell(2);
- newCell2.innerHTML = SPANS[span]['fac'];
+ newCell2.innerHTML = SPANS[span]['portset'];
var newCell3 = newRow.insertCell(3);
newCell3.innerHTML = String(SPANS[span]['usedchans'])+"/"+String(SPANS[span]['totchans'])+" ("+SPANS[k]['spantype']+")";
@@ -217,7 +205,7 @@
showdiv_statusmessage(); // create status message dialog
_$('message_text').innerHTML = "Detecting mISDN Cards ...";
_$('status_message').style.display="block";
- setTimeout("_$('status_message').style.display='none';", 5000);
+ setTimeout("_$('status_message').style.display='none';", 3000);
preparemenus();
loadConfigFiles.runandread();
parent.loadscreen(this);
@@ -294,9 +282,10 @@
if(records[mn].beginsWith('card=')) {
/* We found a 4 port mISDN card */
CARDS++;
- for(z = 1; z <= 4; z++) {
+ for(var z = 1; z <= 4; z++) {
SPANS[z] = {};
- /* set the spans stats here */
+ SPANS['card'] = records[mn];
+ /* set the spans stats here, if we have any */
}
}
if(CARDS == 0) {
@@ -333,7 +322,7 @@
for(var z = 1; z <= spans.length; z++) {
SPANS[z] = {};
SPANS[z]['alarms'] = "Read from";
- SPANS[z]['fac'] = "applymisdn.conf, or";
+ SPANS[z]['portset'] = "applymisdn.conf, or";
SPANS[z]['totchans'] = "set to nothing";
}
continue;
@@ -375,24 +364,14 @@
function reloadpage(){ window.location.href="digital.html"; }
-function disablEnable_sc() {
- if( _$('editspan_signalling').value.beginsWith('fx') ){
- _$('editspan_switchtype').disabled = true;
- _$('editspan_switchtype').selectedIndex = -1;
- }else{
- _$('editspan_switchtype').disabled = false;
- }
- return true;
-}
-
function updateSpanInfo(){
var b = String( menu.span_value );
- SPANS[b]['fac'] = _$('editspan_fac').value;
- SPANS[b]['signalling'] = _$('editspan_signalling').value;
+ SPANS[b]['portset'] = _$('editspan_portset').value;
SPANS[b]['switchtype'] = _$('editspan_switchtype').value;
SPANS[b]['syncsrc'] = _$('editspan_syncsrc').value;
SPANS[b]['lbo'] = _$('editspan_lbo').value;
canelSpanInfo();
+ preparemenus();
_$('save_b').disabled = false;
_$('cancel_b').disabled = false;
}
@@ -461,36 +440,11 @@
uri = build_action('delcat', c, context,"", ""); c++;
uri += build_action('newcat', c , context, "", ""); c++;
var totalchans = 0, firstpart , secondpart, tmp, tmp2 , tmp3;
- for( var k in SPANS ){ if( SPANS.hasOwnProperty(k) ){ if(SPANS[k]['signalling']){
- firstpart = "span";
- /* XXX Timing source for card is being set to zero? */
- /* LBO is being set to 0 */
- secondpart = k + "," + SPANS[k]['syncsrc'] + "," + SPANS[k]['lbo'] + "," + SPANS[k]['fac'].toLowerCase().replace("/", ",");
- uri += build_action('append', c, context, firstpart, secondpart ); c++;
+ for( var k in SPANS ){ if( SPANS.hasOwnProperty(k) ){{
+ //secondpart = k + "," + SPANS[k]['syncsrc'] + "," + SPANS[k]['lbo'] + "," + SPANS[k]['fac'].toLowerCase().replace("/", ",");
+ uri += build_action('append', c, context, SPANS[k]['card'], k); c++;
+ uri += build_action('append', c, context, SPANS[k]['portset'], k); c++;
tmp2 = (bchanstring)? ",":"";
-
- if ( SPANS[k]['signalling'].beginsWith('fx') ){
- bchanstring += '';
- dchanstring += '';
- tmp = totalchans + Number(SPANS[k]['totchans']);
- tmp3 = String(totalchans+1) + "-" + String(tmp);
- totalchans = tmp;
- }else{
- if(SPANS[k]['totchans'] <= 24){
- tmp = totalchans + Number(SPANS[k]['totchans']);
- dchanstring += tmp2 + String(tmp) ;
- tmp3 = String(totalchans+1) + "-" + String(tmp-1);
- bchanstring += tmp2 + tmp3;
- totalchans = tmp;
- }else{ // take first 15 as b-channels, then a d channel and then take the next 15 as bchannels
- tmp = totalchans + Number(15);
- tmp3 = String(totalchans+1) + "-" + String(tmp);
- dchanstring += tmp2 + String(totalchans+16) ;
- tmp3 += "," + String(tmp+2) + "-" + String(tmp+16);
- bchanstring += tmp2 + tmp3;
- totalchans = tmp + Number(16);
- }
- }
SPANS[k]['zapchanstring'] = tmp3;
}}}
@@ -500,7 +454,6 @@
var gen = "general";
uri += build_action('append', c, gen, 'echocancel', _$('echocancel').value); c++;
uri += build_action('append', c, gen, 'echotraining', _$('echotraining').value); c++;
- //uri += build_action('append', c, context, 'defaultzone', 'us'); c++;
}();
makerequest('u', "applymisdn.conf", uri , function(t) { applySettings.updateUsersConf(); });
}
@@ -592,14 +545,14 @@
<TR> <TD align="right">Channels:</TD>
<TD><span id="editspan_channels"></span></TD>
</TR>
- <TR> <TD align="right">Signalling</TD>
- <TD> <select id="editspan_signalling" onChange="disablEnable_sc();">
- <option value="pri_net">PRI - Net</option>
- <option value="pri_cpe">PRI - CPE</option>
- <option value="fxoks">FXOKS</option>
- <option value="fxsks">FXSKS</option>
- <option value="fxols">FXOLS</option>
- <option value="fxsls">FXSLS</option>
+ <TR> <TD align="right">Port Settings</TD>
+ <TD> <select id="editspan_portset">
+ <option value="te_ptp">TE-Mode, PTP</option>
+ <option value="te_ptmp">TE-Mode, PTMP</option>
+ <option value="te_capi_ptp">TE-Mode(Capi), PTP</option>
+ <option value="te_capi_pmtp">TE-Mode(Capi), PTMP</option>
+ <option value="nt_ptp">NT-Mode, PTP</option>
+ <option value="nt_ptmp">NT-Mode, PMTP</option>
</select>
</TD>
</TR>
More information about the asterisk-gui-commits
mailing list