bkruse: branch asterisknow r1496 - in /branches/asterisknow: ./ config/ confi...

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Aug 30 19:32:18 CDT 2007


Author: bkruse
Date: Thu Aug 30 19:32:18 2007
New Revision: 1496

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1496
Log:
Merged revisions 1494 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-gui/branches/1.4

........
r1494 | bkruse | 2007-08-30 19:29:03 -0500 (Thu, 30 Aug 2007) | 3 lines

After adding support for framing/coding in 
ztscan, it will now go into the gui.

........

Modified:
    branches/asterisknow/   (props changed)
    branches/asterisknow/config/digital.html
    branches/asterisknow/config/scripts/tooltip.js

Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Aug 30 19:32:18 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-1296,1316,1326,1332,1336-1338,1342,1346,1356,1362,1381,1384,1395,1399,1402,1413,1416,1426,1432,1435,1439,1442,1455,1465,1475,1478,1481,1488,1491
+/branches/1.4:1-1296,1316,1326,1332,1336-1338,1342,1346,1356,1362,1381,1384,1395,1399,1402,1413,1416,1426,1432,1435,1439,1442,1455,1465,1475,1478,1481,1488,1491,1494

Modified: branches/asterisknow/config/digital.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/digital.html?view=diff&rev=1496&r1=1495&r2=1496
==============================================================================
--- branches/asterisknow/config/digital.html (original)
+++ branches/asterisknow/config/digital.html Thu Aug 30 19:32:18 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/asterisknow/config/scripts/tooltip.js
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/scripts/tooltip.js?view=diff&rev=1496&r1=1495&r2=1496
==============================================================================
--- branches/asterisknow/config/scripts/tooltip.js (original)
+++ branches/asterisknow/config/scripts/tooltip.js Thu Aug 30 19:32:18 2007
@@ -327,3 +327,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