tazpanel diff pkgs.cgi @ rev 86

pkgs.cgi: add administration buttons
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 13 18:58:27 2011 +0200 (2011-04-13)
parents 7c672aea996d
children 2a4015e17f42
line diff
     1.1 --- a/pkgs.cgi	Wed Apr 13 17:47:24 2011 +0200
     1.2 +++ b/pkgs.cgi	Wed Apr 13 18:58:27 2011 +0200
     1.3 @@ -550,7 +550,43 @@
     1.4  	awk '{print $1, $2, $3, $4, $5, $6, $7}'`
     1.5  </pre>
     1.6  
     1.7 +<a name="administration"></a>
     1.8 +<h3>`gettext "Administration"`</h3>
     1.9 +<div id="actions">
    1.10 +	<a class="button" href='$SCRIPT_NAME?action=saveconf#administration'>
    1.11 +		<img src="$IMAGES/tazpkg.png" />`gettext "Save configuration files"`</a>
    1.12 +	<a class="button" href='$SCRIPT_NAME?action=listconf#administration'>
    1.13 +		<img src="$IMAGES/edit.png" />`gettext "List configuration files"`</a>
    1.14 +	<a class="button" href='$SCRIPT_NAME?action=quickcheck#administration'>
    1.15 +		<img src="$IMAGES/recharge.png" />`gettext "Quick check"`</a>
    1.16 +	<a class="button" href='$SCRIPT_NAME?action=fullcheck#administration'>
    1.17 +		<img src="$IMAGES/recharge.png" />`gettext "Full check"`</a>
    1.18 +</div>
    1.19 +
    1.20  EOT
    1.21 +		case "$(GET action)" in
    1.22 +		saveconf)
    1.23 +			echo "<pre>"
    1.24 +			cd $HOME
    1.25 +			tazpkg repack-config | sed 's/.\[[^mG]*.//g'
    1.26 +			ls -l $HOME/config-*.tazpkg
    1.27 +			echo "</pre>" ;;
    1.28 +		listconf)
    1.29 +			echo "<h4>`gettext "Configuration files"`</h4>"
    1.30 +			echo "<ul>"
    1.31 +			tazpkg list-config | sed \
    1.32 +		'/^\//!d;s/.*/<li><a href="index.cgi?file=&">&<\/a><\/li>/'
    1.33 +			echo "</ul>"
    1.34 +			echo "</pre>" ;;
    1.35 +		quickcheck)
    1.36 +			echo "<pre>"
    1.37 +			tazpkg check
    1.38 +			echo "</pre>" ;;
    1.39 +		fullcheck)
    1.40 +			echo "<pre>"
    1.41 +			tazpkg check --full
    1.42 +			echo "</pre>" ;;
    1.43 +		esac
    1.44  		;;
    1.45  esac
    1.46