multiple IP handling for x86 in ipphones tooltips, ipphone and phones screens
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 11 Feb 2010 00:51:05 +0000 (00:51 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 11 Feb 2010 00:51:05 +0000 (00:51 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@153 01035d8c-6547-0410-b346-abe4f91aad63

mini-asterisk-gui/cgi-bin/ipphones.sh
mini-asterisk-gui/cgi-bin/phones.sh

index 69d3b03d28ee88a642c7b92c0db7cc6b6885a75b..f0bf1bd5344b74f5474bc7035cc3b3d4fde5dde2 100644 (file)
@@ -64,11 +64,16 @@ cat <<EOF
       <tr onMouseOver="popUp(event,'phone_ipaddress')" onmouseout="popUp(event,'phone_ipaddress')">
          <td colspan="3">Phone System IP Address:</td>
 EOF
-echo "<td>$ipaddress</td></tr><td>&nbsp;</td><tr></tr>"
+echo "<td>"
+echo $ipaddress | sed -n 's/ /<br>/p'
+echo "</td>"
+
+# make nice tooltips for multiple ip interfaces on some x86 boxes
+ipaddress=`echo $ipaddress | sed -n 's/ / or /p'`
 
     # use perl to construct list of IP phones for us
     asterisk "-rx sip show peers" 2>/dev/null > sipshowpeers.txt
-    perl ipphones.pl $ipaddress $more
+    perl ipphones.pl "$ipaddress" $more
 
 cat <<EOF
     </table>
index 03a526d25583e3c4e39e11b1b96216a7eb3e0c43..f433be96193e7c14bec083a5d3ae0aa1d27295f6 100644 (file)
@@ -37,7 +37,7 @@ ipaddress=`ifconfig | sed -n 's/.*inet addr:\(.*\)  Bcast.*/\1/p'`
 
 cat /proc/cpuinfo | grep "CPU:.*ADSP" > /dev/null
 if [ $? -eq 0 ]; then
-    ipaddress=`echo $ipaddress |  awk '{ print $1 }'`
+    ipaddress=`echo $ipaddress | awk '{ print $1 }'`
 fi
 
 # Construct the web page -------------------------------
@@ -80,7 +80,9 @@ cat <<EOF
       <tr onMouseOver="popUp(event,'phone_ipaddress')" onmouseout="popUp(event,'phone_ipaddress')">
          <td colspan="4">Phone System IP Address:</td>
 EOF
-echo "<td>$ipaddress</td>"
+echo "<td>"
+echo $ipaddress | sed -n 's/ /<br>/p'
+echo "</td>"
 cat <<EOF
       </tr>
       <tr><td>&nbsp</td></tr>