bkruse: branch asterisknow r1735 - /branches/asterisknow/config/misdn.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Thu Oct 25 12:41:24 CDT 2007
Author: bkruse
Date: Thu Oct 25 12:41:23 2007
New Revision: 1735
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1735
Log:
More mISDN changes, its really starting to come along.
Modified:
branches/asterisknow/config/misdn.html
Modified: branches/asterisknow/config/misdn.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/misdn.html?view=diff&rev=1735&r1=1734&r2=1735
==============================================================================
--- branches/asterisknow/config/misdn.html (original)
+++ branches/asterisknow/config/misdn.html Thu Oct 25 12:41:23 2007
@@ -71,7 +71,6 @@
var oldLoadZone;
var menu ; // document.getElementById('mymenu');
var tot_spans = 0;
-var CARDS = 0;
function hide_mymenu(){ menu.style.display="none"; }
@@ -129,25 +128,16 @@
var newRow = tbl.insertRow(-1);
newRow.className = "frow";
- var newCell0 = newRow.insertCell(0);
- newCell0.innerHTML = "SPAN";
-
- var newCell1 = newRow.insertCell(1);
- newCell1.innerHTML = "ALARMS";
-
- var newCell2 = newRow.insertCell(2);
- newCell2.innerHTML = "Port Settings";
-
- var newCell3 = newRow.insertCell(3);
- newCell3.innerHTML = "channels<BR>Used/Total" ;
- newCell3.align = "center";
-
- var newCell4 = newRow.insertCell(4);
- newCell4.innerHTML = "Signalling" ;
- newCell4.align = "center";
-
- var newCell5 = newRow.insertCell(5);
- newCell5.innerHTML = "" ;
+ var l = 0;
+ var newCell0 = newRow.insertCell(l);
+ newCell0.innerHTML = "Span/Card";
+ newCell0.style.width = 15; l++;
+
+ var newCell1 = newRow.insertCell(l); l++;
+ newCell1.innerHTML = "Port Settings";
+
+ var newcell2 = newRow.insertCell(l); l++;
+ newcell2.innerhtml = "Advanced Options" ;
};
@@ -159,30 +149,19 @@
newRow.id ="row" + span ;
newRow["span_value"] = span;
- var newCell0 = newRow.insertCell(0);
- newCell0.innerHTML = SPANS[span]['description'] + " ";
- newCell0.align = "center";
+ var l = 0;
+ var newCell0 = newRow.insertCell(l); l++
+ newCell0.innerHTML = span + " / " + SPANS[span]['card'].split("=")[1].split(",")[0];
+ newCell0.style.width = 5;
+
+ var newCell1 = newRow.insertCell(l); l++
+ newCell1.innerHTML = (SPANS[span]['portset']) ? SPANS[span]['portset'] : _$('editspan_portset')[_$('editspan_portset').selectedIndex].innerHTML; //SPANS[span]['portset'];
+ newCell1.align = "center";
- var newCell1 = newRow.insertCell(1);
- newCell1.innerHTML = SPANS[span]['alarms'];
- newCell1.align = "center";
-
- var newCell2 = newRow.insertCell(2);
- newCell2.innerHTML = (SPANS[span]['portset']) ? SPANS[span]['portset'] : _$('editspan_portset')[_$('editspan_portset').selectedIndex].innerHTML; //SPANS[span]['portset'];
-
- var newCell3 = newRow.insertCell(3);
- newCell3.innerHTML = String(SPANS[span]['usedchans'])+"/"+String(SPANS[span]['totchans'])+" ("+SPANS[k]['spantype']+")";
- newCell3.align = "center";
-
- var newCell4 = newRow.insertCell(4);
- newCell4.innerHTML = (SPANS[span]['signalling'])?SPANS[span]['signalling'] : "<font color=red>NOT DEFINED</font>" ;
- newCell4.align = "center";
-
-
- var newCell5 = newRow.insertCell(5);
- newCell5.innerHTML = "<span class=\"downmenubutton\" id='" + "span_" + span + "' onclick=\"show_downmenu( '"+ span + "');\">Options <img src=images/1.gif></span>" ;
- newCell5.style.width = 90;
- newCell5.align = "center";
+ var newCell2 = newRow.insertCell(l); l++
+ newCell2.innerHTML = "<span class=\"downmenubutton\" id='" + "span_" + span + "' onclick=\"show_downmenu( '"+ span + "');\">Options <img src=images/1.gif></span>" ;
+ newCell2.style.width = 90;
+ newCell2.align = "center";
};
ASTGUI.domActions.clear_table(tbl);
@@ -258,7 +237,7 @@
var makeSymLink = function() {
parent.astmanEngine.run_tool("/bin/touch /etc/asterisk/misdn-init.conf", function(t) { // touch misdn-init.conf so we can write to it
- parent.astmanEngine.run_tool(asterisk_guiMisdn + " config", function(t) { return true});
+ parent.astmanEngine.run_tool(asterisk_guiMisdn + " scan", function(t) { return true});
var h= 0;
var uri = build_action('newcat', h, 'general', '', '', ''); h++;
uri += build_action('append', h, 'general', '#include "../misdn-init.conf" ;', '', '');
@@ -268,23 +247,26 @@
var digitalparse = function(n){
if( n == "ERROR: CONFIG FILE NOT FOUND"){
gui_feedback("First time running mISDN scan detected!");
+ }
makeSymLink();
// loadConfigFile.loadMisdnConf();
/* We are setting up mISDN for the first time. */
+ var CARDS = 0;
new Ajax.Request("/asterisk/static/scan.html", {
method : "get",
asynchronous : true,
onComplete : function(c) {
- records = c.responseText.split("\n");
+ var records = c.responseText.split("\n");
+ var span = 1;
for(var mn = 0; mn < records.length; mn++) {
- CARDS = 0;
if(records[mn].beginsWith('card=')) {
/* We found a 4 port mISDN card */
CARDS++;
- for(var z = 1; z <= 4; z++) {
- SPANS[z] = {};
- SPANS[z]['card'] = records[mn];
- /* set the spans stats here, if we have any */
+ var ns = (span + 4);
+ while(span <= ns) {
+ SPANS[span] = {};
+ SPANS[span]['card'] = records[mn];
+ span++;
}
}
}
@@ -295,6 +277,7 @@
gui_feedback("No mISDN Cards found !!");
return false;
}
+ _$('b410p_cards').innerHTML = "You Have <i>"+CARDS+"x</i> B410p Card(s)";
/* Here we would call something to setup a table for basic cards... (4 port BRI)*/
},
onFailure : function() {
@@ -302,8 +285,7 @@
return false;
}
});
-
- }
+ //}
for( var l in n ){ if(n.hasOwnProperty(l)){
if( l =='general') {
if(!n[l]['card']) {
@@ -480,6 +462,7 @@
<div class="pageheading">mISDN (b410p) Card Setup<br><a href="#" onClick="remove_misdn_conf();">Redo mISDN Setup</a></div>
<div style="overflow:auto;left:40" id="div_digitalcardstable">
+ <h2 align="center"><div id="b410p_cards"></div></h2>
<table class="taglist" id="digitalcardstable" cellpadding=5 cellspacing=1 border=0 align=center></table>
<table cellpadding=5 cellspacing=1 align=center border=0>
<h2 align="center">General mISDN Settings</h2>
More information about the asterisk-gui-commits
mailing list