webbuild-cgi: display live server stats in first line of jobs window
This commit is contained in:
parent
6e6d92d5a2
commit
90a0d85269
@ -394,13 +394,15 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then
|
|||||||
PACKAGE_ENCODED=`cgi_encodevar $4`
|
PACKAGE_ENCODED=`cgi_encodevar $4`
|
||||||
[ $numprocess -eq 1 ] && {
|
[ $numprocess -eq 1 ] && {
|
||||||
# echo -n "<div align=left class=processes>"
|
# echo -n "<div align=left class=processes>"
|
||||||
echo -n "<b>Webbuild jobs:</b> "
|
u="$(uptime)"
|
||||||
|
f="$(df / -k -h --output=avail,pcent|tail -n1)"
|
||||||
|
b=`ps ax|grep rpmbuild|grep spec|while read l; do basename "${l/.spec}"; done`
|
||||||
|
echo -n "Load: <b>${u/*: }</b> | Disk: <b>$f</b> | Now building: <b>$b</b> | "
|
||||||
if [ "$STATE_JOBSSHOWALL" != "1" ]; then
|
if [ "$STATE_JOBSSHOWALL" != "1" ]; then
|
||||||
echo "[ <a href=# onclick=ajax_getvalues(\"REQUEST=refreshjobs&JOBSSHOWALL=true\");>Show all</a> ]"
|
echo "My jobs: [<a href=# onclick=ajax_getvalues(\"REQUEST=refreshjobs&JOBSSHOWALL=true\");>Show all jobs</a>]"
|
||||||
else
|
else
|
||||||
echo "[ <a href=# onclick=ajax_getvalues(\"REQUEST=refreshjobs&JOBSSHOWALL=false\");>Show mine only</a> ]"
|
echo "All jobs: [<a href=# onclick=ajax_getvalues(\"REQUEST=refreshjobs&JOBSSHOWALL=false\");>Only show my jobs</a>]"
|
||||||
fi
|
fi
|
||||||
echo -n "<i>(please click on [x] to clean your jobs when they are done)</i>"
|
|
||||||
echo -n "<br>"
|
echo -n "<br>"
|
||||||
}
|
}
|
||||||
[ "$STATE_JOBSSHOWALL" = "1" -o "$USER" = "$2" ] || continue
|
[ "$STATE_JOBSSHOWALL" = "1" -o "$USER" = "$2" ] || continue
|
||||||
|
Loading…
Reference in New Issue
Block a user