tazpanel diff network.cgi @ rev 41

Better CSS for pkgs.cgi and handle packages category as fast as we can
author Christophe Lincoln <pankso@slitaz.org>
date Wed Apr 06 19:02:07 2011 +0200 (2011-04-06)
parents 5f2f88618292
children a7b1d69663c3
line diff
     1.1 --- a/network.cgi	Wed Apr 06 06:09:34 2011 +0200
     1.2 +++ b/network.cgi	Wed Apr 06 19:02:07 2011 +0200
     1.3 @@ -16,28 +16,65 @@
     1.4  TEXTDOMAIN='tazpanel'
     1.5  export TEXTDOMAIN
     1.6  
     1.7 +# Actions commands before page is displayed
     1.8 +case "$QUERY_STRING" in
     1.9 +	start)
    1.10 +		# Here we sleep a bit to let udhcp get the lease before reloading
    1.11 +		# page with status
    1.12 +		/etc/init.d/network.sh start >/dev/null
    1.13 +		sleep 2 ;;
    1.14 +	stop)
    1.15 +		/etc/init.d/network.sh stop >/dev/null ;;
    1.16 +	*)
    1.17 +		continue ;;
    1.18 +esac
    1.19 +
    1.20  #
    1.21 -# Commands
    1.22 +# Main Commands for pages
    1.23  #
    1.24  
    1.25  case "$QUERY_STRING" in
    1.26 -	*)
    1.27 -		#
    1.28 -		# Network configuration
    1.29 -		#
    1.30 -		TITLE="- Network"
    1.31 +	eth)
    1.32 +		# Wired connections settings
    1.33  		xhtml_header
    1.34  		cat << EOT
    1.35 -<div id="wrapper">
    1.36 -	<h2>`gettext "Networking`</h2>
    1.37 -	<p>`gettext "Manage network connection and services`</p>
    1.38 +<h2>`gettext "Ethernet connection`</h2>
    1.39 +<pre>
    1.40 +`grep ^[A-V] /etc/network.conf`
    1.41 +</pre>
    1.42 +EOT
    1.43 +		;;
    1.44 +	wifi)
    1.45 +		# Wireless connections settings
    1.46 +		xhtml_header
    1.47 +		cat << EOT
    1.48 +<h2>`gettext "Wireless connection`</h2>
    1.49 +<pre>
    1.50 +`grep ^WIFI_ /etc/network.conf`
    1.51 +</pre>
    1.52 +EOT
    1.53 +		;;
    1.54 +	*)
    1.55 +		# Main Network page starting with a summary
    1.56 +		xhtml_header
    1.57 +		cat << EOT
    1.58 +<h2>`gettext "Networking`</h2>
    1.59 +<p>
    1.60 +	`gettext "Manage network connection and services`
    1.61 +</p>
    1.62 +<div id="actions">
    1.63 +	<p>
    1.64 +		`gettext "Connection:"`
    1.65 +		<a class="button" href="$SCRIPT_NAME?start">`gettext "Start"`</a>
    1.66 +		<a class="button" href="$SCRIPT_NAME?stop">`gettext "Stop"`</a>
    1.67 +	</p>
    1.68  </div>
    1.69  
    1.70  `list_network_interfaces`
    1.71  
    1.72 -<h3>Output of: ifconfig -a</h3>
    1.73 +<h3>`gettext "Output of ifconfig"`</h3>
    1.74  <pre>
    1.75 -`ifconfig -a`
    1.76 +`ifconfig`
    1.77  </pre>
    1.78  EOT
    1.79  		;;