bkruse: branch 1.4 r1494 - in /branches/1.4/config: ./ scripts/
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Thu Aug 30 19:29:03 CDT 2007
Author: bkruse
Date: Thu Aug 30 19:29:03 2007
New Revision: 1494
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1494
Log:
After adding support for framing/coding in
ztscan, it will now go into the gui.
Modified:
branches/1.4/config/digital.html
branches/1.4/config/scripts/tooltip.js
Modified: branches/1.4/config/digital.html
URL: http://svn.digium.com/view/asterisk-gui/branches/1.4/config/digital.html?view=diff&rev=1494&r1=1493&r2=1494
==============================================================================
--- branches/1.4/config/digital.html (original)
+++ branches/1.4/config/digital.html Thu Aug 30 19:29:03 2007
@@ -74,9 +74,10 @@
var divs_tohide = new Array('osversion_div', 'uptime_div', 'asterisk_div', 'today_div','hostname_div','ifconfig_div','df_div','memory_div');
var has_spans = 0; /* Count of our spans we have, incrementing each time. */
var total_spans = 0; /* Count of our spans that ztscan.conf says we have */
+var old_zap = 0;
var widgets = {};
-var fieldnames = [ 'active', 'alarms', 'description', 'name', 'totchans', 'usedchans', 'lineconfig' ];
-var fieldnames_proper = [ 'Out Of Alarm:', 'Alarms:', 'Card Description:', 'Card Name:', 'Total Channels:', 'Configured Channels:', 'Signalling Type(beta)' ];
+var fieldnames = [ 'active', 'alarms', 'description', 'name', 'totchans', 'fac', 'lbo' ];
+var fieldnames_proper = [ 'Out Of Alarm:', 'Alarms:', 'Card Description:', 'Card Name:', 'Total Channels:', 'Framing/Coding', 'Line Build Out' ];
/* This page is based off of sample.html, the gui tutorial on writing a page */
@@ -168,6 +169,11 @@
if (isNaN(y)) return false;
return x==y && x.toString()==y.toString();
}
+
+function run_zt_and_restart() {
+ /* this function will run ztcfg and reload the page. */
+ gui_alert("This is a place holder, if you see this its probably because you need to run ztcfg, and running it is not in this page yet.");
+}
function digitalparse(n) {
@@ -209,19 +215,55 @@
/* if alarms is red, make cell red, else make cell green/yellow etc. */
for(var i=0; i < fieldnames.length; i++) {
var td = document.createElement("td");
+ if(fieldnames[i] == 'lbo' || n[l][fieldnames[i]] == "NODEF") {
+ old_zap = 1;
+ td.appendChild(document.createTextNode("N/A"));
+ td.tip="en,digital,2";
+ tr.appendChild(td);
+ continue;
+ }
+ if(fieldnames[i] == 'fac') {
+ if(n[l][fieldnames[i]] == "NODEF") {
+ old_zap = 1;
+ td.appendChild(document.createTextNode("N/A"));
+ td.tip="en,digital,1";
+ tr.appendChild(td);
+ continue;
+ }
+ var framing = n[l][fieldnames[i]].split("/");
+ if(framing[0] == "ESF" || framing[0] == "D4") {
+ td.appendChild(document.createTextNode(n[l][fieldnames[i]] + " (T1)"));
+ tr.appendChild(td);
+ continue;
+ } else {
+ td.appendChild(document.createTextNode(n[l][fieldnames[i]] + " (E1)"));
+ tr.appendChild(td);
+ continue;
+ }
+ }
+ if(fieldnames[i] == 'alarms') {
+ if(n[l][fieldnames[i]] == "UNCONFIGURED") {
+ gui_alert("Span " + (i+1) + " is unconfigured, running ztscan.");
+ run_zt_and_restart();
+ }
+ }
td.appendChild(document.createTextNode(n[l][fieldnames[i]]));
tr.appendChild(td);
}
box.appendChild(tr);
}
}}
+ if(old_zap == 1) {
+ gui_alert("To have the ability to see your cards current configuration/framing/coding/line build out, please install rev: 2986 or higher of the 1.4 branch of zaptel!");
+ parent._$('tooltip').innerHTML = "<B>Framing/Coding/Line Build Out:</B><br>To see this requires rev: 2986 of the 1.4 branch of zaptel.";
+ }
_$('tablecontainer').style.display="";
_$('tablecontainer').style.visibility="";
_$('status_message').style.display='none';
- return "span: " + t.name + " Mode: " + mode;
+ return true;
}
function update_sysinfo(){
@@ -368,8 +410,12 @@
<tr> <td class="field_text">Used Channels:</td>
<td><input type="text" id="usedchans" size=14 class="input8"></td>
</tr>
- <tr> <td class="field_text">Line Config:</td>
- <td><input type="text" id="lineconfig" size=14 class="input8"></td>
- </tr>
+ <tr> <td class="field_text">Framing/Coding:</td>
+ <td><input type="text" id="fac" size=14 class="input8"></td>
+ </tr>
+ <tr> <td class="field_text">Line Build Out:</td>
+ <td><input type="text" id="lbo" size=14 class="input8"></td>
+ </tr>
+
</div>
</body>
Modified: branches/1.4/config/scripts/tooltip.js
URL: http://svn.digium.com/view/asterisk-gui/branches/1.4/config/scripts/tooltip.js?view=diff&rev=1494&r1=1493&r2=1494
==============================================================================
--- branches/1.4/config/scripts/tooltip.js (original)
+++ branches/1.4/config/scripts/tooltip.js Thu Aug 30 19:29:03 2007
@@ -326,3 +326,10 @@
tooltips['cdr'] = new Object;
tooltips['cdr'].en = new Array;
tooltips['cdr'].en[0] = "<B>View:</B> Select how many call detail records to read at once.." ;
+
+// Tooltips for the Digital Card page.
+ tooltips['digital'] = new Object;
+ tooltips['digital'].en = new Array;
+ tooltips['digital'].en[0] = "<B>Framing/Coding:</B> To see this requires rev: 2986 of the 1.4 branch of zaptel.";
+ tooltips['digital'].en[1] = "<B>Line Build Out:</B> To see this requires rev: 2986 of the 1.4 branch of zaptel.";
+
More information about the asterisk-gui-commits
mailing list