tazpanel rev 76
Show Panel activity and log a few more things to test (we need date in log() and reverse output on main page)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Apr 12 04:24:35 2011 +0200 (2011-04-12) |
parents | 1780ef64bcd5 |
children | 5db1f3648ed8 |
files | boot.cgi index.cgi lib/libtazpanel network.cgi pkgs.cgi styles/default/style.css |
line diff
1.1 --- a/boot.cgi Tue Apr 12 03:52:19 2011 +0200 1.2 +++ b/boot.cgi Tue Apr 12 04:24:35 2011 +0200 1.3 @@ -94,8 +94,16 @@ 1.4 gettext "<td>Busybox DHCP server</td>" ;; 1.5 syslogd|klogd) 1.6 gettext "<td>Linux Kernel log daemon</td>" ;; 1.7 - crond|dnsd|tftpd|inetd|zcip) 1.8 - gettext "<td>Daemon powered by BusyBox</td>" ;; 1.9 + crond) 1.10 + gettext "<td>Execute scheduled commands</td>" ;; 1.11 + dnsd) 1.12 + gettext "<td>Small static DNS server daemon</td>" ;; 1.13 + tftpd) 1.14 + gettext "<td>Transfer a file on tftp request</td>" ;; 1.15 + inetd) 1.16 + gettext "<td>Listen for network connections and launch programs</td>" ;; 1.17 + zcip) 1.18 + gettext "<td>Manage a ZeroConf IPv4 link-local address</td>" ;; 1.19 *) 1.20 # Descrition from receipt 1.21 [ -d "$LOCALSTATE/installed/$name" ] && pkg=$name
2.1 --- a/index.cgi Tue Apr 12 03:52:19 2011 +0200 2.2 +++ b/index.cgi Tue Apr 12 04:24:35 2011 +0200 2.3 @@ -46,7 +46,6 @@ 2.4 echo "<h2>$WANT</h2>" 2.5 echo '<pre>' 2.6 # Handle file type by extension as a Web Server does it. 2.7 - # HTML entities: -e 's|&|\&|g' -e 's|<|\<|g' -e 's|>|\>|g' 2.8 case "$WANT" in 2.9 *.conf|*.lst) 2.10 cat $WANT | syntax_highlighter conf ;; 2.11 @@ -123,6 +122,11 @@ 2.12 `df -h | grep ^/dev` 2.13 </pre> 2.14 2.15 +<h3>`gettext "Panel Activity"`</h3> 2.16 +<pre> 2.17 +$(cat $LOG_FILE | tail -n 6) 2.18 +</pre> 2.19 + 2.20 <h3>`gettext "Panel settings"`</h3> 2.21 <form method="get" action="$SCRIPT_NAME"> 2.22 <div>
3.1 --- a/lib/libtazpanel Tue Apr 12 03:52:19 2011 +0200 3.2 +++ b/lib/libtazpanel Tue Apr 12 04:24:35 2011 +0200 3.3 @@ -38,6 +38,7 @@ 3.4 } 3.5 3.6 # Syntax highlighting for config file and SHell scripts 3.7 +# HTML entities: -e 's|&|\&|g' -e 's|<|\<|g' -e 's|>|\>|g' 3.8 syntax_highlighter() { 3.9 case $1 in 3.10 conf)
4.1 --- a/network.cgi Tue Apr 12 03:52:19 2011 +0200 4.2 +++ b/network.cgi Tue Apr 12 04:24:35 2011 +0200 4.3 @@ -23,10 +23,10 @@ 4.4 start) 4.5 # Here we sleep a bit to let udhcp get the lease before reloading 4.6 # page with status 4.7 - /etc/init.d/network.sh start >/dev/null 4.8 + /etc/init.d/network.sh start | log 4.9 sleep 2 ;; 4.10 stop) 4.11 - /etc/init.d/network.sh stop >/dev/null ;; 4.12 + /etc/init.d/network.sh stop | log ;; 4.13 *) 4.14 continue ;; 4.15 esac
5.1 --- a/pkgs.cgi Tue Apr 12 03:52:19 2011 +0200 5.2 +++ b/pkgs.cgi Tue Apr 12 04:24:35 2011 +0200 5.3 @@ -287,6 +287,7 @@ 5.4 </div> 5.5 <pre> 5.6 EOT 5.7 + echo "$(date +%Y%M%d-%H:%M) Recharging packages list" | log 5.8 tazpkg recharge | filter_tazpkg_msgs 5.9 cat << EOT 5.10 </pre>
6.1 --- a/styles/default/style.css Tue Apr 12 03:52:19 2011 +0200 6.2 +++ b/styles/default/style.css Tue Apr 12 04:24:35 2011 +0200 6.3 @@ -183,7 +183,7 @@ 6.4 /* syntax_highlighter */ 6.5 6.6 span.conf-comment { color: #666; } 6.7 -span.conf-var { color: #1f1500; } 6.8 +span.conf-var { color: #392600; } 6.9 span.conf-val, span.sh-val { color: #f35a00; } 6.10 span.sh-comment { color: #b20000; } 6.11