# HG changeset patch # User Christophe Lincoln # Date 1302301343 -7200 # Node ID cf15cb2ff7159860bd8a6b097cf78a3977d4b909 # Parent 7dfcc2b58b334d8f4ddd7034990c754ff851cbdc Update all page with latest functions such as debug, bunch of fixes and adding support for deamons diff -r 7dfcc2b58b33 -r cf15cb2ff715 Makefile --- a/Makefile Fri Apr 08 20:22:25 2011 +0200 +++ b/Makefile Sat Apr 09 00:22:23 2011 +0200 @@ -3,7 +3,7 @@ PREFIX?=/usr SYSCONFDIR?=/etc/slitaz DESTDIR?= -LINGUAS?=fr +LINGUAS?= PANEL?=/var/www/tazpanel VERSION:=$(shell grep ^VERSION tazpanel | cut -d '=' -f 2) diff -r 7dfcc2b58b33 -r cf15cb2ff715 README --- a/README Fri Apr 08 20:22:25 2011 +0200 +++ b/README Sat Apr 09 00:22:23 2011 +0200 @@ -78,3 +78,6 @@ Or use tazpanel cmdline: # ./tazpanel start + + +================================================================================ diff -r 7dfcc2b58b33 -r cf15cb2ff715 TODO --- a/TODO Fri Apr 08 20:22:25 2011 +0200 +++ b/TODO Sat Apr 09 00:22:23 2011 +0200 @@ -1,3 +1,5 @@ +TODO for TazPanel +================================================================================ * Add full support for undigest to pkgs.cgi @@ -11,3 +13,4 @@ * Improve boot.cgi to handle theming GRUB, fbsplash and Slim and improve rcS.conf. * Handle start-stop-restart daemons and check status in system.cgi + diff -r 7dfcc2b58b33 -r cf15cb2ff715 doc/tazpanel.html --- a/doc/tazpanel.html Fri Apr 08 20:22:25 2011 +0200 +++ b/doc/tazpanel.html Sat Apr 09 00:22:23 2011 +0200 @@ -10,4 +10,220 @@

Get support on the Slitaz forum

-gn \ No newline at end of file +gni:492 +msgid "Latest log entries" +msgstr "" + +#: live.cgi:50 +msgid "TODO" +msgstr "" + +#: live.cgi:58 +msgid "SliTaz Live Systems" +msgstr "" + +#: live.cgi:59 +msgid "Create and manage Live CD or USB SliTaz systems" +msgstr "" + +#: live.cgi:62 +msgid "Write a Live CD" +msgstr "" + +#: live.cgi:64 +msgid "" +"The command writeiso will generate an ISO image of the\n" +"\tcurrent filesystem as is, including all files in the /home directory.\n" +"\tIt is an easy way to remaster a SliTaz Live system, you just have\n" +"\tto: boot, modify, writeiso." +msgstr "" + +#: live.cgi:70 +msgid "Compression type:" +msgstr "" + +#: live.cgi:76 +msgid "write ISO" +msgstr "" + +#: live.cgi:79 +msgid "Live USB" +msgstr "" + +#: live.cgi:81 +msgid "" +"Generate SliTaz LiveUSB media and boot in RAM! Insert a\n" +"\tLiveCD into the cdrom drive, select the correct device and press\n" +"\tGenerate." +msgstr "" + +#: live.cgi:86 +msgid "USB Media to use:" +msgstr "" + +#: live.cgi:95 +msgid "Not found" +msgstr "" + +#: live.cgi:99 +msgid "generate" +msgstr "" + +#: network.cgi:41 +msgid "Ethernet connection" +msgstr "" + +#: network.cgi:51 +msgid "Wireless connection" +msgstr "" + +#: network.cgi:61 +msgid "Networking" +msgstr "" + +#: network.cgi:63 +msgid "Manage network connection and services" +msgstr "" + +#: network.cgi:67 +msgid "Connection:" +msgstr "" + +#: network.cgi:68 +msgid "Start" +msgstr "" + +#: network.cgi:69 +msgid "Stop" +msgstr "" + +#: network.cgi:75 +msgid "Output of ifconfig" +msgstr "" + +#: lib/libtazpanel:39 +msgid "Interface" +msgstr "" + +#: lib/libtazpanel:41 +msgid "Status" +msgstr "" + +#: lib/libtazpanel:42 +msgid "IP Address" +msgstr "" + +msgid "Summary" +msgstr "" + +#: index.cgi:186 +msgid "Uptime:" +msgstr "" + +#: index.cgi:189 +msgid "Memory in Mb" +msgstr "" + +#: index.cgi:196 +msgid "Network status" +msgstr "" + +#: index.cgi:199 +msgid "Filesystem usage statistics" +msgstr "" + +#: index.cgi:204 +msgid "System language" +msgstr "" + +#: index.cgi:215 +#, sh-format +msgid "" +"You must logout and login again your current\n" +"\t\t\t\tsession to use $new_locale language." +msgstr "" + +#: index.cgi:218 +#, sh-format +msgid "Current system locales: " +msgstr "" + +#: index.cgi:224 +msgid "Avalaible locales:" +msgstr "" + +#: index.cgi:229 +msgid "Generated and use" +msgstr "" + +#: pkgs.cgi:64 +msgid "Last recharge : " +msgstr "" + +#: pkgs.cgi:74 +msgid "Installed packages : " +msgstr "" + +#: pkgs.cgi:76 +msgid "Mirrored packages : " +msgstr "" + +#: pkgs.cgi:78 +msgid "Upgradeable packages : " +msgstr "" + +#: pkgs.cgi:80 +msgid "Installed files : " +msgstr "" + +#: pkgs.cgi:82 +msgid "Blocked packages : " +msgstr "" + +#: pkgs.cgi:108 +msgid "Search" +msgstr "" + +#: pkgs.cgi:119 +msgid "Version" +msgstr "" + +#: pkgs.cgi:120 +msgid "Description" +msgstr "" + +#: pkgs.cgi:121 +msgid "Web" +msgstr "" + +#: pkgs.cgi:152 pkgs.cgi:167 pkgs.cgi:185 pkgs.cgi:204 +msgid "Selection:" +msgstr "" + +#: pkgs.cgi:156 pkgs.cgi:172 pkgs.cgi:191 pkgs.cgi:210 +msgid "List:" +msgstr "" + +#: pkgs.cgi:176 pkgs.cgi:195 pkgs.cgi:213 pkgs.cgi:230 pkgs.cgi:312 +#: pkgs.cgi:369 pkgs.cgi:400 pkgs.cgi:484 +msgid "My packages" +msgstr "" + +#: pkgs.cgi:188 pkgs.cgi:207 +msgid "Toogle all" +msgstr "" + +#: pkgs.cgi:265 +msgid "Category:" +msgstr "" + +#: pkgs.cgi:284 +msgid "Search packages" +msgstr "" + +#: pkgs.cgi:300 +msgid "Recharge" +msgstr "" + +#: pkgs.cgi:305 +msgidplea \ No newline at end of file diff -r 7dfcc2b58b33 -r cf15cb2ff715 hardware.cgi --- a/hardware.cgi Fri Apr 08 20:22:25 2011 +0200 +++ b/hardware.cgi Sat Apr 09 00:22:23 2011 +0200 @@ -32,6 +32,7 @@ # Default to summary with mounted filesystem, loaded modules # xhtml_header + debug_info cat << EOT

`gettext "Drivers & Devices"`

@@ -46,8 +47,7 @@ df -h | grep ^/dev echo '' echo '

Loaded kernel modules

' - # We may want modinfi output - + # Request may be modinfo output case "$QUERY_STRING" in modinfo=*) mod=${QUERY_STRING#modinfo=} diff -r 7dfcc2b58b33 -r cf15cb2ff715 index.cgi --- a/index.cgi Fri Apr 08 20:22:25 2011 +0200 +++ b/index.cgi Sat Apr 09 00:22:23 2011 +0200 @@ -21,41 +21,27 @@ export TEXTDOMAIN # +# Things to do before displaying the page +# + +case "$QUERY_STRING" in + panel-pass=*) + new=${QUERY_STRING#*=} + sed -i s@/:root:.*@/:root:$new@ $HTTPD_CONF ;; + *) continue ;; +esac + +# # Commands # case "$QUERY_STRING" in - boot) - # - # Everything until user login - # - . /etc/rcS.conf - TITLE="- Boot" - xhtml_header - cat << EOT -
-

`gettext "Boot & startup"`

-

- `gettext "Everything that appends before user login."` -

-
- -

`gettext "Kernel cmdline"`

-
-`cat /proc/cmdline`
-
- -

`gettext "Local startup commands"`

-
-`cat /etc/init.d/local.sh`
-
-EOT - ;; *) # # Default xHTML content # xhtml_header + debug_info case "$QUERY_STRING" in gen-locale=*) new_locale=${QUERY_STRING#gen-locale=} ;; @@ -88,6 +74,15 @@
 `df -h | grep ^/dev`
 
+ +

`gettext "Panel settings"`

+
+
+ + +
+
+ EOT ;; esac diff -r 7dfcc2b58b33 -r cf15cb2ff715 lib/libtazpanel --- a/lib/libtazpanel Fri Apr 08 20:22:25 2011 +0200 +++ b/lib/libtazpanel Sat Apr 09 00:22:23 2011 +0200 @@ -20,6 +20,13 @@ exit 1 } +# DEBUG mode +debug_info() { + if [ $DEBUG == "1" ]; then + echo "
$REQUEST_METHOD ${QUERY_STRING}
" + fi +} + # Network interface status interface_status() { if ifconfig | grep -A 1 $i | grep -q inet; then diff -r 7dfcc2b58b33 -r cf15cb2ff715 live.cgi --- a/live.cgi Fri Apr 08 20:22:25 2011 +0200 +++ b/live.cgi Sat Apr 09 00:22:23 2011 +0200 @@ -2,6 +2,8 @@ # # CGI interface for SliTaz Live systems using Tazlito and TazUSB. # +# Copyright (C) 2011 SliTaz GNU/Linux - GNU gpl v3 +# echo "Content-Type: text/html" echo "" @@ -25,12 +27,12 @@ case "$QUERY_STRING" in write-iso=*) comp=${QUERY_STRING#write-iso=} - xterm $XTERM_OPTS \ + $TERMINAL $TERM_OPTS \ -T "write-iso" \ -e "tazlito writeiso $comp" & ;; gen-liveusb=*) dev=`httpd -d ${QUERY_STRING#gen-liveusb=}` - xterm $XTERM_OPTS \ + $TERMINAL $TERM_OPTS \ -T "Tazusb gen-liveusb" \ -e "tazusb gen-liveusb $dev; \ gettext \"ENTER to quit\"; read i" & ;; @@ -46,6 +48,7 @@ create) # # Create a flavor file and ISO in option with all settings + # Step by step interface and store files in cache. # gettext "TODO" ;; *) diff -r 7dfcc2b58b33 -r cf15cb2ff715 network.cgi --- a/network.cgi Fri Apr 08 20:22:25 2011 +0200 +++ b/network.cgi Sat Apr 09 00:22:23 2011 +0200 @@ -39,6 +39,7 @@ eth) # Wired connections settings xhtml_header + debug_info cat << EOT

`gettext "Ethernet connection`

@@ -49,6 +50,7 @@
 	wifi)
 		# Wireless connections settings
 		xhtml_header
+		debug_info
 		cat << EOT
 

`gettext "Wireless connection`

@@ -59,6 +61,7 @@
 	*)
 		# Main Network page starting with a summary
 		xhtml_header
+		debug_info
 		cat << EOT
 

`gettext "Networking`

diff -r 7dfcc2b58b33 -r cf15cb2ff715 pkgs.cgi --- a/pkgs.cgi Fri Apr 08 20:22:25 2011 +0200 +++ b/pkgs.cgi Sat Apr 09 00:22:23 2011 +0200 @@ -21,14 +21,10 @@ TEXTDOMAIN='tazpanel' export TEXTDOMAIN -# xHTML 5 header +# xHTML 5 header with special side bar fo categories. TITLE="- Packages" xhtml_header | sed 's/id="content"/id="content-sidebar"/' - -# DEBUG mode -if [ $DEBUG == "1" ]; then - echo "

$REQUEST_METHOD ${QUERY_STRING}

" -fi +debug_info # We need packages information for list and search parse_packages_desc() { @@ -73,7 +69,7 @@ ls $INSTALLED | wc -l gettext "Mirrored packages : " cat $LOCALSTATE/packages.list | wc -l - gettext "up packages : " + gettext "Upgradeable packages : " cat $LOCALSTATE/packages.up | wc -l #gettext "Installed files : " #cat $INSTALLED/*/files.list | wc -l diff -r 7dfcc2b58b33 -r cf15cb2ff715 settings.cgi --- a/settings.cgi Fri Apr 08 20:22:25 2011 +0200 +++ b/settings.cgi Sat Apr 09 00:22:23 2011 +0200 @@ -2,8 +2,9 @@ # # System settings CGI interface: user, locale, keyboard, date. Since we # dont have multiple page here there is only one case used to get commands -# values and the full content is following directly. +# values and the full content is following directly. # +# Copyright (C) 2011 SliTaz GNU/Linux - GNU gpl v3 # echo "Content-Type: text/html" echo "" @@ -78,6 +79,7 @@ # Default xHTML content # xhtml_header +debug_info cat << EOT

`gettext "System settings"`

diff -r 7dfcc2b58b33 -r cf15cb2ff715 styles/default/footer.html --- a/styles/default/footer.html Fri Apr 08 20:22:25 2011 +0200 +++ b/styles/default/footer.html Sat Apr 09 00:22:23 2011 +0200 @@ -3,7 +3,7 @@
diff -r 7dfcc2b58b33 -r cf15cb2ff715 styles/default/header.html --- a/styles/default/header.html Fri Apr 08 20:22:25 2011 +0200 +++ b/styles/default/header.html Sat Apr 09 00:22:23 2011 +0200 @@ -25,7 +25,7 @@ Network Settings Live - Boot + Boot Hardware
diff -r 7dfcc2b58b33 -r cf15cb2ff715 styles/default/style.css --- a/styles/default/style.css Fri Apr 08 20:22:25 2011 +0200 +++ b/styles/default/style.css Sat Apr 09 00:22:23 2011 +0200 @@ -130,7 +130,7 @@ padding: 4px; height: 17px; margin: 0; - width: 190px; + width: 200px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } @@ -206,7 +206,7 @@ border: 1px solid #999; } -input[type=text] { height: 18px; } +input[type=text], input[type=password] { height: 18px; } div.scroll { height: 200px; overflow: auto; border: 1px solid #ddd; } diff -r 7dfcc2b58b33 -r cf15cb2ff715 tazpanel --- a/tazpanel Fri Apr 08 20:22:25 2011 +0200 +++ b/tazpanel Sat Apr 09 00:22:23 2011 +0200 @@ -2,7 +2,8 @@ # # Tiny Tazpanel cmdline interface # - +# Copyright (C) 2011 SliTaz GNU/Linux - GNU gpl v3 +# VERSION=1.0 # Get the configuration file and functions diff -r 7dfcc2b58b33 -r cf15cb2ff715 tazpanel.conf --- a/tazpanel.conf Fri Apr 08 20:22:25 2011 +0200 +++ b/tazpanel.conf Sat Apr 09 00:22:23 2011 +0200 @@ -1,5 +1,7 @@ # tazpanel.conf: SliTaz Web Control Panel configuration # +# Copyright (C) 2011 SliTaz GNU/Linux - GNU gpl v3 +# # Panel location and theme PANEL="/var/www/tazpanel" @@ -11,10 +13,11 @@ FOOTER="/styles/$STYLE/footer.html" # Display some debug message -DEBUG="0" +DEBUG="1" -# Xterm options -XTERM_OPTS="-geometry 80x16-0+24 -bg black -fg white" +# Terminal settings +TERMINAL="xterm" +TERM_OPTS="-geometry 80x16-0+24 -bg black -fg white" # Generic page loading message LOADING_MSG="Loading..."