# HG changeset patch # User Christophe Lincoln # Date 1302863769 -7200 # Node ID 9df14c495cdd11c7ff1c57c7989b1c39508fbe30 # Parent 4c348c1d521e4e8730e424ef999cc2cac6fd01b6 Move config file to data/, improve panel activity with syntax_highliter and move diff colors to CSS diff -r 4c348c1d521e -r 9df14c495cdd data/tazpanel.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/tazpanel.conf Fri Apr 15 12:36:09 2011 +0200 @@ -0,0 +1,34 @@ +# tazpanel.conf: SliTaz Web Control Panel configuration +# +# Copyright (C) 2011 SliTaz GNU/Linux - BSD License +# + +# Panel location and theme +PANEL="/var/www/tazpanel" +STYLE="default" + +# Absolute path to images and xHTML skel from $PANEL +IMAGES="/styles/$STYLE/images" +HEADER="/styles/$STYLE/header.html" +FOOTER="/styles/$STYLE/footer.html" + +# Display some debug messages +DEBUG="0" + +# Activity log file +LOG_FILE="/var/log/slitaz/tazpanel.log" + +# Terminal settings +TERMINAL="xterm" +TERM_OPTS="-geometry 80x16-0+24 -bg black -fg white" + +# Generic page loading message +LOADING_MSG="Loading..." + +# Busybox HTTP daemon config +HTTPD_CONF="/etc/slitaz/httpd.conf" +HTTPD_PORT="82" + +# Shared Tazpkg paths +LOCALSTATE="/var/lib/tazpkg" +INSTALLED="$LOCALSTATE/installed" diff -r 4c348c1d521e -r 9df14c495cdd index.cgi --- a/index.cgi Fri Apr 15 12:18:00 2011 +0200 +++ b/index.cgi Fri Apr 15 12:36:09 2011 +0200 @@ -139,8 +139,8 @@

`gettext "Panel Activity"`

-
-$(cat $LOG_FILE | tail -n 6)
+
+$(cat $LOG_FILE | tail -n 8 | sort -r | syntax_highlighter activity)
 
EOT diff -r 4c348c1d521e -r 9df14c495cdd lib/libtazpanel --- a/lib/libtazpanel Fri Apr 15 12:18:00 2011 +0200 +++ b/lib/libtazpanel Fri Apr 15 12:36:09 2011 +0200 @@ -35,9 +35,11 @@ -e s"#\"\([^']*\)\"#\0#"g ;; diff) sed -e 's|&|\&|g' -e 's|<|\<|g' -e 's|>|\>|g' \ - -e s"#^-\([^']*\).#\0#"g \ - -e s"#^+\([^']*\).#\0#"g \ - -e s"#@@\([^']*\)@@#@@\1@@#"g ;; + -e s"#^-\([^']*\).#\0#"g \ + -e s"#^+\([^']*\).#\0#"g \ + -e s"#@@\([^']*\)@@#@@\1@@#"g ;; + activity) + sed s"#^\([^']*:\)#\0#"g ;; esac } diff -r 4c348c1d521e -r 9df14c495cdd styles/default/style.css --- a/styles/default/style.css Fri Apr 15 12:18:00 2011 +0200 +++ b/styles/default/style.css Fri Apr 15 12:36:09 2011 +0200 @@ -101,6 +101,13 @@ #content-sidebar { margin: 20px 120px 20px 40px; } #wrapper { margin: 10px 0 20px; } +#actions { + height: 20px; + margin: 16px 0; +} + +#actions p { margin: 6px 0; } + .search { position: absolute; right: 40px; @@ -135,13 +142,6 @@ border-bottom-left-radius: 4px; } -#actions { - height: 20px; - margin: 16px 0; -} - -#actions p { margin: 6px 0; } - .box { margin: 10px 0; padding: 12px; @@ -195,6 +195,10 @@ span.conf-var { color: #392600; } span.conf-val, span.sh-val { color: #f35a00; } span.sh-comment { color: #b20000; } +span.activity-log { color: #888; font-size: 95%; } +span.diff-rm { color: red; } +span.diff-add { color: green; } +span.diff-at { color: blue; } /* Misc */ diff -r 4c348c1d521e -r 9df14c495cdd tazpanel.conf --- a/tazpanel.conf Fri Apr 15 12:18:00 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -# tazpanel.conf: SliTaz Web Control Panel configuration -# -# Copyright (C) 2011 SliTaz GNU/Linux - BSD License -# - -# Panel location and theme -PANEL="/var/www/tazpanel" -STYLE="default" - -# Absolute path to images and xHTML skel from $PANEL -IMAGES="/styles/$STYLE/images" -HEADER="/styles/$STYLE/header.html" -FOOTER="/styles/$STYLE/footer.html" - -# Display some debug messages -DEBUG="0" - -# Activity log file -LOG_FILE="/var/log/slitaz/tazpanel.log" - -# Terminal settings -TERMINAL="xterm" -TERM_OPTS="-geometry 80x16-0+24 -bg black -fg white" - -# Generic page loading message -LOADING_MSG="Loading..." - -# Busybox HTTP daemon config -HTTPD_CONF="/etc/slitaz/httpd.conf" -HTTPD_PORT="82" - -# Shared Tazpkg paths -LOCALSTATE="/var/lib/tazpkg" -INSTALLED="$LOCALSTATE/installed"