tazpanel rev 67

remove debug_info and put code in header
author Christophe Lincoln <pankso@slitaz.org>
date Tue Apr 12 02:47:00 2011 +0200 (2011-04-12)
parents 8f60cbb66259
children af9601acec8f
files boot.cgi hardware.cgi index.cgi lib/libtazpanel network.cgi pkgs.cgi settings.cgi tazpanel.conf
line diff
     1.1 --- a/boot.cgi	Tue Apr 12 02:40:59 2011 +0200
     1.2 +++ b/boot.cgi	Tue Apr 12 02:47:00 2011 +0200
     1.3 @@ -44,7 +44,7 @@
     1.4  		. /etc/rcS.conf
     1.5  		TITLE="- Boot"
     1.6  		xhtml_header
     1.7 -		debug_info
     1.8 +		
     1.9  		cat << EOT
    1.10  <div id="wrapper">
    1.11  	<h2>`gettext "Manage daemons"`</h2>
    1.12 @@ -138,7 +138,7 @@
    1.13  		. /etc/rcS.conf
    1.14  		TITLE="- Boot"
    1.15  		xhtml_header
    1.16 -		debug_info
    1.17 +		
    1.18  		cat << EOT
    1.19  <div id="wrapper">
    1.20  	<h2>`gettext "Boot &amp; Start services"`</h2>
     2.1 --- a/hardware.cgi	Tue Apr 12 02:40:59 2011 +0200
     2.2 +++ b/hardware.cgi	Tue Apr 12 02:47:00 2011 +0200
     2.3 @@ -75,7 +75,7 @@
     2.4  		# Default to summary with mounted filesystem, loaded modules
     2.5  		#
     2.6  		xhtml_header
     2.7 -		debug_info
     2.8 +		
     2.9  		cat << EOT
    2.10  <div id="wrapper">
    2.11  	<h2>`gettext "Drivers &amp; Devices"`</h2>
     3.1 --- a/index.cgi	Tue Apr 12 02:40:59 2011 +0200
     3.2 +++ b/index.cgi	Tue Apr 12 02:47:00 2011 +0200
     3.3 @@ -92,7 +92,7 @@
     3.4  		# Default xHTML content
     3.5  		#
     3.6  		xhtml_header
     3.7 -		debug_info
     3.8 +		
     3.9  		case "$QUERY_STRING" in
    3.10  			gen-locale=*)
    3.11  				new_locale=${QUERY_STRING#gen-locale=} ;;
     4.1 --- a/lib/libtazpanel	Tue Apr 12 02:40:59 2011 +0200
     4.2 +++ b/lib/libtazpanel	Tue Apr 12 02:47:00 2011 +0200
     4.3 @@ -36,13 +36,6 @@
     4.4  	done
     4.5  }
     4.6  
     4.7 -# DEBUG mode
     4.8 -debug_info() {
     4.9 -	if [ $DEBUG == "1" ]; then
    4.10 -		echo "<div class='debug'>$REQUEST_METHOD ${QUERY_STRING}</div>"
    4.11 -	fi
    4.12 -}
    4.13 -
    4.14  # LOG activities
    4.15  log() {
    4.16  	grep ^[a-zA-Z0-9] | sed s'/\.*\]//' >> $LOG_FILE
    4.17 @@ -105,6 +98,9 @@
    4.18  
    4.19  xhtml_header() {
    4.20  	cat ${PANEL}$HEADER | sed s/'- %TITLE%'/"$TITLE"/
    4.21 +	if [ $DEBUG == "1" ]; then
    4.22 +		echo "<div class='debug'>$REQUEST_METHOD ${QUERY_STRING}</div>"
    4.23 +	fi
    4.24  }
    4.25  
    4.26  xhtml_footer() {
     5.1 --- a/network.cgi	Tue Apr 12 02:40:59 2011 +0200
     5.2 +++ b/network.cgi	Tue Apr 12 02:47:00 2011 +0200
     5.3 @@ -39,7 +39,7 @@
     5.4  	eth)
     5.5  		# Wired connections settings
     5.6  		xhtml_header
     5.7 -		debug_info
     5.8 +		
     5.9  		cat << EOT
    5.10  <h2>`gettext "Ethernet connection`</h2>
    5.11  <pre>
    5.12 @@ -50,7 +50,7 @@
    5.13  	wifi)
    5.14  		# Wireless connections settings
    5.15  		xhtml_header
    5.16 -		debug_info
    5.17 +		
    5.18  		cat << EOT
    5.19  <h2>`gettext "Wireless connection`</h2>
    5.20  <pre>
    5.21 @@ -61,7 +61,7 @@
    5.22  	*)
    5.23  		# Main Network page starting with a summary
    5.24  		xhtml_header
    5.25 -		debug_info
    5.26 +		
    5.27  		cat << EOT
    5.28  <h2>`gettext "Networking`</h2>
    5.29  <p>
     6.1 --- a/pkgs.cgi	Tue Apr 12 02:40:59 2011 +0200
     6.2 +++ b/pkgs.cgi	Tue Apr 12 02:47:00 2011 +0200
     6.3 @@ -24,7 +24,7 @@
     6.4  # xHTML 5 header with special side bar fo categories.
     6.5  TITLE="- Packages"
     6.6  xhtml_header | sed 's/id="content"/id="content-sidebar"/'
     6.7 -debug_info
     6.8 +
     6.9  
    6.10  # We need packages information for list and search
    6.11  parse_packages_desc() {
     7.1 --- a/settings.cgi	Tue Apr 12 02:40:59 2011 +0200
     7.2 +++ b/settings.cgi	Tue Apr 12 02:47:00 2011 +0200
     7.3 @@ -79,7 +79,7 @@
     7.4  # Default xHTML content
     7.5  #
     7.6  xhtml_header
     7.7 -debug_info
     7.8 +
     7.9  cat << EOT
    7.10  <div id="wrapper">
    7.11  	<h2>`gettext "System settings"`</h2>
     8.1 --- a/tazpanel.conf	Tue Apr 12 02:40:59 2011 +0200
     8.2 +++ b/tazpanel.conf	Tue Apr 12 02:47:00 2011 +0200
     8.3 @@ -13,7 +13,7 @@
     8.4  FOOTER="/styles/$STYLE/footer.html"
     8.5  
     8.6  # Display some debug messages
     8.7 -DEBUG="0"
     8.8 +DEBUG="1"
     8.9  
    8.10  # Activity log file
    8.11  LOG_FILE="/var/log/slitaz/tazpanel.log"