# HG changeset patch # User Christophe Lincoln # Date 1303091060 -7200 # Node ID 29a4a55db6e35e11bc721762afd10795715ec50b # Parent e4381f2e73f66ef08c35b920862679a1bcc7479e hardware.cgi: add free with colors and also add colors to top diff -r e4381f2e73f6 -r 29a4a55db6e3 hardware.cgi --- a/hardware.cgi Mon Apr 18 02:44:54 2011 +0200 +++ b/hardware.cgi Mon Apr 18 03:44:20 2011 +0200 @@ -105,17 +105,25 @@ Kernel modules + +

$(gettext "Filesystem usage statistics")

+
 EOT
-		echo '

Filesystem usage statistics

' - echo '
'
-			fdisk -l | fgrep Disk
+		fdisk -l | fgrep Disk
 		echo '
' echo '
'
 			df -h | grep ^/dev
-		echo '
' + echo '
' + echo "

$(gettext "System memory")

" + echo '
'
+		free -m | sed \
+			-e s"#total.*\([^']\)#\0#"g \
+			-e s"#^[A-Z-].*:\([^']\)#\0#"g
+		echo '
' echo '

lspci

' echo '
'
-			lspci -k
+			lspci -k | \
+				sed s"#^[0-9].*\([^']\)#\0#"g
 		echo '
' echo '

lsusb

' echo '
'
diff -r e4381f2e73f6 -r 29a4a55db6e3 index.cgi
--- a/index.cgi	Mon Apr 18 02:44:54 2011 +0200
+++ b/index.cgi	Mon Apr 18 03:44:20 2011 +0200
@@ -101,7 +101,9 @@
 		TITLE="- $(gettext "Process activity")"
 		xhtml_header
 		echo '
'
-		top -n1 -b
+		top -n1 -b | sed \
+			-e s"#^[A-Z].*:\([^']\)#\0#"g \
+			-e s"#PID.*\([^']\)#\0#"g
 		echo '
' ;; *\ debug\ *) TITLE="- Debug" diff -r e4381f2e73f6 -r 29a4a55db6e3 styles/default/style.css --- a/styles/default/style.css Mon Apr 18 02:44:54 2011 +0200 +++ b/styles/default/style.css Mon Apr 18 03:44:20 2011 +0200 @@ -199,7 +199,7 @@ span.diff-rm { color: red; } span.diff-add { color: green; } span.diff-at { color: blue; } - +span.top { color: #00c800; font-weight: bold; font-size: 95%; } /* Misc */ pre, .pre-main {