# HG changeset patch # User Christophe Lincoln # Date 1301973057 -7200 # Node ID 253219c1f9fe35558bba7b556e59f842608b682b # Parent 55ce67f05cf9fd262cc08c767432b6ca0cffc065 index.cgi: Add support for network connection detection and listing + up po/* diff -r 55ce67f05cf9 -r 253219c1f9fe index.cgi --- a/index.cgi Tue Apr 05 05:09:53 2011 +0200 +++ b/index.cgi Tue Apr 05 05:10:57 2011 +0200 @@ -18,6 +18,47 @@ TEXTDOMAIN='tazpanel-cgi' export TEXTDOMAIN +# Network interface status +interface_status() { + if ifconfig | grep -A 1 $i | grep -q inet; then + ip=`ifconfig | grep -A 1 $i | grep inet | \ + awk '{ print $2 }' | cut -d ":" -f 2` + echo "connected $ip" + else + echo "-" + fi +} + +# Catch network interface +list_network_interfaces() { + table_start + cat << EOT + + `gettext "Interface"` + `gettext "Name"` + `gettext "Statut"` + `gettext "IP Address"` + +EOT + for i in `ls /sys/class/net` + do + case $i in + eth*) + echo "$i + Ethernet `interface_status`" ;; + wlan*|ath*|ra*) + echo "$i + Wireless `interface_status`" ;; + lo) + echo "$i + Loopback `interface_status`" ;; + *) + continue ;; + esac + done + table_end +} + # # Commands # @@ -144,6 +185,8 @@

`gettext "Manage network connection and services`

+`list_network_interfaces` +

Output of: ifconfig -a

 `ifconfig -a`
@@ -201,6 +244,8 @@
 `df -h | grep ^/dev`
 
+`list_network_interfaces` + EOT diff -r 55ce67f05cf9 -r 253219c1f9fe po/tazpanel-cgi/tazpanel-cgi.pot --- a/po/tazpanel-cgi/tazpanel-cgi.pot Tue Apr 05 05:09:53 2011 +0200 +++ b/po/tazpanel-cgi/tazpanel-cgi.pot Tue Apr 05 05:10:57 2011 +0200 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: TazPanel CGI 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-04-05 01:58+0200\n" +"POT-Creation-Date: 2011-04-05 04:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -69,50 +69,50 @@ msgid "User login:" msgstr "" -#: index.cgi:131 +#: index.cgi:129 msgid "User password:" msgstr "" -#: index.cgi:135 +#: index.cgi:131 msgid "Create user" msgstr "" -#: index.cgi:147 +#: index.cgi:143 msgid "Networking" msgstr "" -#: index.cgi:148 +#: index.cgi:144 msgid "Manage network connection and services" msgstr "" -#: index.cgi:165 +#: index.cgi:161 msgid "Drivers & Devices" msgstr "" -#: index.cgi:166 +#: index.cgi:162 msgid "Manage your computer hardware" msgstr "" -#: index.cgi:186 +#: index.cgi:182 msgid "Host:" msgstr "" -#: index.cgi:187 +#: index.cgi:183 msgid "SliTaz administration et configuration Panel" msgstr "" -#: index.cgi:190 +#: index.cgi:186 msgid "Summary" msgstr "" -#: index.cgi:194 +#: index.cgi:190 msgid "Uptime:" msgstr "" -#: index.cgi:197 +#: index.cgi:193 msgid "Memory in Mb" msgstr "" -#: index.cgi:202 +#: index.cgi:198 msgid "Filesystem usage statistics:" msgstr "" diff -r 55ce67f05cf9 -r 253219c1f9fe po/tazpanel-live/tazpanel-live.pot --- a/po/tazpanel-live/tazpanel-live.pot Tue Apr 05 05:09:53 2011 +0200 +++ b/po/tazpanel-live/tazpanel-live.pot Tue Apr 05 05:10:57 2011 +0200 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Tazpanel live CGI 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-04-05 01:58+0200\n" +"POT-Creation-Date: 2011-04-05 04:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,10 +17,50 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: live.cgi:35 +#: live.cgi:49 +msgid "TODO" +msgstr "" + +#: live.cgi:57 msgid "SliTaz Live Systems" msgstr "" -#: live.cgi:36 +#: live.cgi:58 msgid "Create and manage Live CD or USB SliTaz systems" msgstr "" + +#: live.cgi:61 +msgid "Write a Live CD" +msgstr "" + +#: live.cgi:63 +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:69 +msgid "Compression type:" +msgstr "" + +#: live.cgi:75 +msgid "write ISO" +msgstr "" + +#: live.cgi:78 +msgid "Live USB" +msgstr "" + +#: live.cgi:81 +msgid "USB Media to use:" +msgstr "" + +#: live.cgi:90 +msgid "Not found" +msgstr "" + +#: live.cgi:94 +msgid "generate" +msgstr "" diff -r 55ce67f05cf9 -r 253219c1f9fe po/tazpanel-pkgs/tazpanel-pkgs.pot --- a/po/tazpanel-pkgs/tazpanel-pkgs.pot Tue Apr 05 05:09:53 2011 +0200 +++ b/po/tazpanel-pkgs/tazpanel-pkgs.pot Tue Apr 05 05:10:57 2011 +0200 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Tazpanel pkgs CGI 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-04-05 01:58+0200\n" +"POT-Creation-Date: 2011-04-05 04:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff -r 55ce67f05cf9 -r 253219c1f9fe po/tazpanel/tazpanel.pot --- a/po/tazpanel/tazpanel.pot Tue Apr 05 05:09:53 2011 +0200 +++ b/po/tazpanel/tazpanel.pot Tue Apr 05 05:10:57 2011 +0200 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: TazPanel cmdline 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-04-05 01:58+0200\n" +"POT-Creation-Date: 2011-04-05 04:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff -r 55ce67f05cf9 -r 253219c1f9fe styles/default/header.html --- a/styles/default/header.html Tue Apr 05 05:09:53 2011 +0200 +++ b/styles/default/header.html Tue Apr 05 05:10:57 2011 +0200 @@ -8,7 +8,7 @@ -
+
diff -r 55ce67f05cf9 -r 253219c1f9fe styles/default/images/ethernet.png Binary file styles/default/images/ethernet.png has changed diff -r 55ce67f05cf9 -r 253219c1f9fe styles/default/images/loopback.png Binary file styles/default/images/loopback.png has changed diff -r 55ce67f05cf9 -r 253219c1f9fe styles/default/images/wireless.png Binary file styles/default/images/wireless.png has changed diff -r 55ce67f05cf9 -r 253219c1f9fe styles/default/style.css --- a/styles/default/style.css Tue Apr 05 05:09:53 2011 +0200 +++ b/styles/default/style.css Tue Apr 05 05:10:57 2011 +0200 @@ -93,7 +93,7 @@ /* Desktop gui style bar */ -#tazbar { +#toolbar { position: fixed; top: 0; left: 0; @@ -123,8 +123,6 @@ overflow: auto; } -.pre_main { margin: 20px 0 10px; } - input[type=submit], select { padding: 2px 4px; margin: 4px 0 0;