Update of /cvsroot/leaf/src/config/webconf/var/webconf/www
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19405

Modified Files:
        connection-info.cgi logfiles.cgi 
Log Message:
fixes and layout changes by Mats


Index: connection-info.cgi
===================================================================
RCS file: /cvsroot/leaf/src/config/webconf/var/webconf/www/connection-info.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** connection-info.cgi 20 Mar 2007 10:49:41 -0000      1.2
--- connection-info.cgi 2 Apr 2007 22:51:51 -0000       1.3
***************
*** 1,13 ****
  #!/usr/bin/haserl
  <? title="Connection Status"  /var/webconf/lib/preamble.sh    # One large 
script
  
- . /var/webconf/lib/validator.sh
- #CL0=FFFFE0; CL1=FFFFE8 CL2=FFFFF0; CL3=F8FFF8; CL4=F0FFFF
- 
  table_wrapper () {    # $1 is masq or publ
        if [ -s $TABLEF.$1 ]
        then
                echo "<table><tr>"
!               for a in Pkg Origin "Destination port" Destination "Time to 
live" State; do
                        echo -n "<th>$a</th>"
                done
--- 1,11 ----
  #!/usr/bin/haserl
+ # $Id$
  <? title="Connection Status"  /var/webconf/lib/preamble.sh    # One large 
script
  
  table_wrapper () {    # $1 is masq or publ
        if [ -s $TABLEF.$1 ]
        then
                echo "<table><tr>"
!               for a in Pkg Port Source Destination "Time to live" State; do
                        echo -n "<th>$a</th>"
                done
***************
*** 31,38 ****
        [ -n "$v_dp1" ] && dp1="$dp1/$v_dp1"
        printf "<tr bgcolor=\"$COL\"><td>$( echo $proto | sed 'y/tu/TU/' 
)&nbsp;</td>"
        printf "<td>from $src1&nbsp;</td>"
!       printf "<td>knocks on port&nbsp; $dp1\t&nbsp;</td>"
!       printf "<td>at $dst1.&nbsp;&nbsp;&nbsp;</td><td> Will live $tm 
sec.&nbsp;</td>"
!       [ -n "$state" ] && echo -n "<td>in state $state.</td>"
        echo "</tr>"
        } | { if [ $src1 == $dst2 ]; then cat >> $TABLEF.publ; else cat >> 
$TABLEF.masq; fi; }
--- 29,36 ----
        [ -n "$v_dp1" ] && dp1="$dp1/$v_dp1"
        printf "<tr bgcolor=\"$COL\"><td>$( echo $proto | sed 'y/tu/TU/' 
)&nbsp;</td>"
+       printf "<td>at&nbsp; $dp1\t&nbsp;</td>"
        printf "<td>from $src1&nbsp;</td>"
!       printf "<td>to $dst1.&nbsp;&nbsp;&nbsp;</td><td>$tm sec.&nbsp;</td>"
!       [ -n "$state" ] && echo -n "<td>$state.</td>"
        echo "</tr>"
        } | { if [ $src1 == $dst2 ]; then cat >> $TABLEF.publ; else cat >> 
$TABLEF.masq; fi; }
***************
*** 40,44 ****
  } # build_tables
  
! # . /var/webconf/lib/validator.sh
  TCPCOL="#$CL0"; UDPCOL="#$CL4"
  TABLEF=/tmp/$SESSIONID.table
--- 38,42 ----
  } # build_tables
  
! . /var/webconf/lib/validator.sh
  TCPCOL="#$CL0"; UDPCOL="#$CL4"
  TABLEF=/tmp/$SESSIONID.table
***************
*** 49,53 ****
  table_wrapper masq
  
! echo -e "<br>\n<h1>Other connections</h1>"
  table_wrapper publ
  
--- 47,51 ----
  table_wrapper masq
  
! echo -e "<br/>\n<h1>Other connections</h1>"
  table_wrapper publ
  

Index: logfiles.cgi
===================================================================
RCS file: /cvsroot/leaf/src/config/webconf/var/webconf/www/logfiles.cgi,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** logfiles.cgi        20 Mar 2007 10:49:41 -0000      1.6
--- logfiles.cgi        2 Apr 2007 22:51:51 -0000       1.7
***************
*** 1,5 ****
  #!/usr/bin/haserl
  <? # This is all just one big shell script because its smaller and easier to 
read that way.
!    # $Id$
     
  . /var/webconf/lib/validator.sh               # Sets colours CL0 to CL4
--- 1,6 ----
  #!/usr/bin/haserl
  <? # This is all just one big shell script because its smaller and easier to 
read that way.
!    # Id: logfiles.cgi,v 1.4 2005/10/03 21:09:05 nangel Exp 
!    # $Revision$ $Date$ $Author$
     
  . /var/webconf/lib/validator.sh               # Sets colours CL0 to CL4
***************
*** 193,198 ****
  echo "<h1>Available Log files</h1><table cellspacing=\"0\">"
  
! opens=$( find /proc/[0-9]*/ -type d -name fd 2>/dev/null | xargs ls -l 
2>/dev/null | \
!       sed '/log/!d; s|^.*/||' | sort | tr '\n' ' ' )
  
  echo -n "<tr align=left>"
--- 194,201 ----
  echo "<h1>Available Log files</h1><table cellspacing=\"0\">"
  
! # Register the log file groups
! opens=$( ls -1 /var/log | sed '/.tmp/d; s/\.[0-9]\(\.gz\)\?$//' | uniq | tr 
'\n' ' ' )
! # Log files in use by daemons
! active=$( ls -l /proc/[1-9]*/fd 2>/dev/null | sed '/log/!d; s|^.*/||' | sort 
| tr '\n' ' ' )
  
  echo -n "<tr align=left>"
***************
*** 207,212 ****
  while read x; do
        PRP=$( expr match "$(ls -l /var/log/$x)" '.*   \([^/]* \)' ) # Size 
Time; three spaces!
!       in_use=$( expr match "$opens" ".*$x" )
!       if [ $in_use -gt 0 ]; then
                opens=${opens#* } # Remove the already used item
                filtered=$( ls $FILTERDIR/${x%.[0-9]*}.* 2>/dev/null)
--- 210,215 ----
  while read x; do
        PRP=$( expr match "$(ls -l /var/log/$x)" '.*   \([^/]* \)' ) # Size 
Time; three spaces!
!       in_use=$( expr match "$active" ".*$x" )
!       if [ $( expr match "$opens" "$x" ) -gt 0 ]; then 
                opens=${opens#* } # Remove the already used item
                filtered=$( ls $FILTERDIR/${x%.[0-9]*}.* 2>/dev/null)
***************
*** 215,224 ****
        fi
        echo "<tr bgcolor=\"#$CLR\">  <td>$x&nbsp;&nbsp;</td>"
!       echo "<td>&nbsp;${PRP#* }</td> <td align=right>${PRP%% 
*}&nbsp;&nbsp;</td>"
!       echo "<td align=center><a 
href=$SCRIPT_NAME?cmd=View&name=$x>view</a></td>"
!       echo "<td align=center><a 
href=$SCRIPT_NAME?cmd=Download&name=$x>download</a></td>"
        echo "<td align=center>"
        if [ $in_use = 0 ]; then
!               echo "<a href=$SCRIPT_NAME?cmd=Delete&name=$x>delete</a></td>"
        else
                echo "(in use)</td>"
--- 218,227 ----
        fi
        echo "<tr bgcolor=\"#$CLR\">  <td>$x&nbsp;&nbsp;</td>"
!       echo "<td>${PRP#* }&nbsp;</td> <td align=right>&nbsp;${PRP%% 
*}&nbsp;</td>"
!       echo "<td align=center>&nbsp;<a 
href=$SCRIPT_NAME?cmd=View&name=$x>view</a></td>"
!       echo "<td align=center>&nbsp;<a 
href=$SCRIPT_NAME?cmd=Download&name=$x>download</a></td>"
        echo "<td align=center>"
        if [ $in_use = 0 ]; then
!               echo "<a 
href=$SCRIPT_NAME?cmd=Delete&name=$x>delete</a>&nbsp;</td>"
        else
                echo "(in use)</td>"


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits

Reply via email to