working on first pass of ipphones screen
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 6 Jan 2010 01:36:37 +0000 (01:36 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 6 Jan 2010 01:36:37 +0000 (01:36 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@97 01035d8c-6547-0410-b346-abe4f91aad63

easy-asterisk-gui/Makefile
easy-asterisk-gui/dashboard.js [deleted file]
easy-asterisk-gui/dashboard.sh [deleted file]
easy-asterisk-gui/ipphones.js [new file with mode: 0644]
easy-asterisk-gui/ipphones.sh [new file with mode: 0644]
easy-asterisk-gui/menu.html
easy-asterisk-gui/phone.sh
easy-asterisk-gui/tooltips.html

index 99d0e8620ee8f16491db20325aacab589b764af3..544598a864e7f1c6958201f467b19e80fde049c0 100644 (file)
@@ -9,5 +9,5 @@ TESTIP=192.168.1.150
 #      rcp index.html root@$(TESTIP):/var/lib/asterisk/static-http/
 
 test:
-       rcp voipline.jpg anphone.png phoneline.jpg ipphone.png phone.pl tooltips.html phone.sh phone.js tick.png cross.png banner.html menu.html check_loggedin.sh logout.sh login.sh dashboard.sh dashboard.js network.sh network.js set_network.sh tooltip.js tooltip.css root@$(TESTIP):/www/cgi-bin
+       rcp ipphones.sh ipphones.js voipline.jpg anphone.png phoneline.jpg ipphone.png phone.pl tooltips.html phone.sh phone.js tick.png cross.png banner.html menu.html check_loggedin.sh logout.sh login.sh network.sh network.js set_network.sh tooltip.js tooltip.css root@$(TESTIP):/www/cgi-bin
        rcp sip.conf extensions.conf root@$(TESTIP):/etc/asterisk
diff --git a/easy-asterisk-gui/dashboard.js b/easy-asterisk-gui/dashboard.js
deleted file mode 100644 (file)
index 74d6eaf..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-function localInit() {
-    if (init_internet == "yes")
-       $('internet').innerHTML = '<img src="tick.png" alt="tick" />';
-    else
-        $('internet').innerHTML = '<img src="cross.png" alt="tick" />';
-}
-
diff --git a/easy-asterisk-gui/dashboard.sh b/easy-asterisk-gui/dashboard.sh
deleted file mode 100644 (file)
index 87bfa3e..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/sh -x
-# dashboard.sh
-# David Rowe 4 Jan 2010
-# CGI for Easy Asterisk dashboard GUI
-
-# See if we have Internet connectivity, first check dns as time outs can be very slow
-
-dns=`cat /etc/resolv.conf | awk '/^nameserver/ {print $2}'`
-dns_packet_loss=`ping $dns -c 1 -q | sed -n 's/.*received, \(.*\)% packet loss/\1/p'`
-internet="no";
-if [ $dns_packet_loss == "0" ]; then
-  packet_loss=`ping google.com -c 1 -q | sed -n 's/.*received, \(.*\)% packet loss/\1/p'`
-  if [ $packet_loss == "0" ]; then
-    internet="yes";
-  fi
-fi
-
-# Construct the web page -------------------------------
-
-sh check_loggedin.sh
-
-cat <<EOF
-<script src="prototype.js"></script>
-<link href="astman.css" media="all" rel="Stylesheet" type="text/css" />
-<script type="text/javascript" src="tooltip.js"></script>
-<link rel="stylesheet" href="tooltip.css" type="text/css" />
-EOF
-
-echo "<script>"
-echo 'var init_internet="'$internet'";'
-cat dashboard.js
-echo "</script>"
-
-cat << EOF
-<html>
-<title>Easy Asterisk - Dashboard</title>
-<body onload="localInit()">
-EOF
-
-cat tooltips.html
-echo '<table align="center" width=800 border=0>'
-cat banner.html
-echo "    <tr>"
-cat menu.html    
-cat <<EOF
-
-    <td valign="top">
-
-    <form action="/cgi-bin/set_network.sh" onsubmit="return validate_form(this)" method="get">
-    <table align="right" width=600 border=0>
-      <tr><td colspan="3" align="left" valign="top" ><h2>Dashboard</h2></td></tr>
-      <tr onMouseOver="popUp(event,'network_internet')" onmouseout="popUp(event,'network_internet')">
-         <td>Internet Connection:</td>
-         <td><div id="internet" >
-         <span style="margin-left: 4px;font-weight:bold">&nbsp;</span></div></td>
-      </tr>
-    </table>
-    </form>
-
-    </td>
-
-    </tr>
-
-</table>
-</body>
-</html>
-EOF
-
diff --git a/easy-asterisk-gui/ipphones.js b/easy-asterisk-gui/ipphones.js
new file mode 100644 (file)
index 0000000..74d6eaf
--- /dev/null
@@ -0,0 +1,7 @@
+function localInit() {
+    if (init_internet == "yes")
+       $('internet').innerHTML = '<img src="tick.png" alt="tick" />';
+    else
+        $('internet').innerHTML = '<img src="cross.png" alt="tick" />';
+}
+
diff --git a/easy-asterisk-gui/ipphones.sh b/easy-asterisk-gui/ipphones.sh
new file mode 100644 (file)
index 0000000..6f63dab
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/sh -x
+# dashboard.sh
+# David Rowe 6 Jan 2010
+# Dashboard screen for Easy Asterisk GUI
+
+# Construct the web page -------------------------------
+
+sh check_loggedin.sh
+
+cat <<EOF
+<script src="prototype.js"></script>
+<link href="astman.css" media="all" rel="Stylesheet" type="text/css" />
+<script type="text/javascript" src="tooltip.js"></script>
+<link rel="stylesheet" href="tooltip.css" type="text/css" />
+EOF
+
+echo "<script>"
+echo 'var init_internet="'$internet'";'
+cat ipphones.js
+echo "</script>"
+
+cat << EOF
+<html>
+<title>Easy Asterisk - IP Phones</title>
+<body onload="localInit()">
+EOF
+
+cat tooltips.html
+echo '<table align="center" width=800 border=0>'
+cat banner.html
+echo "    <tr>"
+cat menu.html    
+cat <<EOF
+
+    <td valign="top">
+
+    <form action="/cgi-bin/set_network.sh" onsubmit="return validate_form(this)" method="get">
+    <table align="right" width=600 border=0>
+      <tr><td colspan="3" align="left" valign="top" ><h2>Dashboard</h2></td></tr>
+      <tr onMouseOver="popUp(event,'network_internet')" onmouseout="popUp(event,'network_internet')">
+         <td>Internet Connection:</td>
+         <td><div id="internet" >
+         <span style="margin-left: 4px;font-weight:bold">&nbsp;</span></div></td>
+      </tr>
+    </table>
+    </form>
+
+    </td>
+
+    </tr>
+
+</table>
+</body>
+</html>
+EOF
+
index 4eb1af07fa9bc9c487eb74c09e944974aec30033..c4bc9f74fd47b941d23b3d8eeb3aa48c31ecd0d7 100644 (file)
@@ -1,21 +1,21 @@
     <div id="admin_tip" class="tip">Change your password, Time & time zone, Reset the defaults, Install new software</div>
-    <div id="dashboard_tip" class="tip">Monitor the status of your phone system</div>
     <div id="network_tip" class="tip">Connect the phone system to your network and the Internet</div>
-    <div id="phone_tip" class="tip">Set up your phones and phone calls</div>
+    <div id="phones_tip" class="tip">Set up your phones, phone lines and phone calls</div>
+    <div id="ipphones_tip" class="tip">Set up your IP phones</div>
     <td valign="top" >
        <table align="right" width=200>
        <tr><td><h2>&nbsp;</h2></td></tr>
        <tr onMouseOver="popUp(event,'admin_tip')" onmouseout="popUp(event,'admin_tip')">
          <td><a href="admin.sh">Admin</a></td>
        </tr>
-       <tr onMouseOver="popUp(event,'dashboard_tip')" onmouseout="popUp(event,'dashboard_tip')">
-         <td><a href="dashboard.sh">Dashboard</a></td>
-       </tr>
        <tr onMouseOver="popUp(event,'network_tip')" onmouseout="popUp(event,'network_tip')">
          <td><a href="network.sh">Network</a></td>
        </tr>
-       <tr onMouseOver="popUp(event,'phone_tip')" onmouseout="popUp(event,'phone_tip')">
-         <td><a href="phone.sh">Phones</a></td>
+       <tr onMouseOver="popUp(event,'ipphones_tip')" onmouseout="popUp(event,'ipphones_tip')">
+         <td><a href="network.sh">IP Phones</a></td>
+       </tr>
+       <tr onMouseOver="popUp(event,'phones_tip')" onmouseout="popUp(event,'phones_tip')">
+         <td><a href="phones.sh">Phones</a></td>
        </tr>
        <tr>
          <td><a href="logout.sh">Logout</a></td>
index 2e014dc8d6bde043aed91b1016fea0a63fdabb16..7a36ccb379a4aeea9eddae4d391a72eb9679c8ed 100644 (file)
@@ -49,8 +49,9 @@ cat <<EOF
     <td valign="top">
 
     <table align="right" width=600>
-      <tr onMouseOver="popUp(event,'phone_system')" onmouseout="popUp(event,'phone_system')">
-          <td colspan="4" align="left" valign="top" ><h2>Phone System</h2></td>
+      <tr>
+          <td onMouseOver="popUp(event,'phone_system')" onmouseout="popUp(event,'phone_system')" colspan="3" align="left" valign="top"><h2>Phone System</h2></td>
+         <td onMouseOver="popUp(event,'phone_addipphone')" onmouseout="popUp(event,'phone_addipphone')"><a href="addipphone.sh">Add IP Phone</a></td>
       </tr>
       <tr onMouseOver="popUp(event,'network_internet')" onmouseout="popUp(event,'network_internet')">
          <td colspan="3">Internet Connection:</td>
index e652ae0ca00997b9df27af27264f770a8e52600a..6b9963cbaa65d5c5d632b25660c8bec3bbad8002 100644 (file)
@@ -65,3 +65,6 @@
 
 <div id="phone_voipline_ip" class="tip">
                         IP Address of the VOIP Internet Service Telephone Provider</div>
+
+<div id="phone_addipphone" class="tip">
+                        Instructions and help on adding a new IP phone</div>