autodist cgi: lots of changes following webbuild development
This commit is contained in:
parent
2f6984ed3b
commit
87a184e585
172
autodist-cgi
172
autodist-cgi
@ -93,7 +93,7 @@ for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
|
|||||||
LOGFILE="/var/autodist/log/autoport-chroot-$r-${AUTOPORT_CHROOT[$i]}.log"
|
LOGFILE="/var/autodist/log/autoport-chroot-$r-${AUTOPORT_CHROOT[$i]}.log"
|
||||||
LASTLOGFILE="/var/autodist/log/autoport-chroot-$r-${AUTOPORT_CHROOT[$i]}-last.log"
|
LASTLOGFILE="/var/autodist/log/autoport-chroot-$r-${AUTOPORT_CHROOT[$i]}-last.log"
|
||||||
AUTODISTLOGFILE="/var/autoport/${AUTOPORT_CHROOT[$i]}/home/${AUTOPORT_CHROOT_USER[$i]}/.autoport/${AUTOPORT_ARCH[$i]}/$r-current.log"
|
AUTODISTLOGFILE="/var/autoport/${AUTOPORT_CHROOT[$i]}/home/${AUTOPORT_CHROOT_USER[$i]}/.autoport/${AUTOPORT_ARCH[$i]}/$r-current.log"
|
||||||
AUTODISTSTATEFILE="/var/autoport/${AUTOPORT_CHROOT[$i]}/var/autodist/autoport-$r-current"
|
AUTODISTSTATEFILE="/var/autoport/${AUTOPORT_CHROOT[$i]}/var/autodist/log/autoport-$r-current"
|
||||||
elif [ "${AUTOPORT_NATIVE[$i]}" ]; then
|
elif [ "${AUTOPORT_NATIVE[$i]}" ]; then
|
||||||
LOGFILE="/var/autodist/log/autoport-native-$r-${AUTOPORT_ARCH[$i]}.log"
|
LOGFILE="/var/autodist/log/autoport-native-$r-${AUTOPORT_ARCH[$i]}.log"
|
||||||
LASTLOGFILE="/var/autodist/log/autoport-native-$r-${AUTOPORT_ARCH[$i]}-last.log"
|
LASTLOGFILE="/var/autodist/log/autoport-native-$r-${AUTOPORT_ARCH[$i]}-last.log"
|
||||||
@ -122,24 +122,15 @@ for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
|
|||||||
echo -n ":</h2>"
|
echo -n ":</h2>"
|
||||||
cat << _EOF
|
cat << _EOF
|
||||||
<div class=downloadbox align=center>
|
<div class=downloadbox align=center>
|
||||||
<div align=left style="height: 550px; width: 850px;overflow:auto;font-size:8pt;border:1px solid #2b6600;margin:4px;padding:2px;color:lightgray;background-color:black;">
|
<div class=output align=left style="height:550px;width:850px;">
|
||||||
|
<!--overflow:auto;font-size:8pt;border:1px solid #2b6600;margin:4px;padding:2px;color:lightgray;background-color:black;"-->
|
||||||
_EOF
|
_EOF
|
||||||
echo -n "<pre><code>"
|
echo -n "<pre><code>"
|
||||||
if [ "$SHOWLOG" = "current" ]; then
|
if [ "$SHOWLOG" = "current" ]; then
|
||||||
RELOADTIME=3600000
|
RELOADTIME=3600000
|
||||||
cat $LOGFILE | parse_build_output
|
cat $LOGFILE | parse_build_output
|
||||||
# sed "s|<|\<|g;s|[[:cntrl:]]\[[0-9;]*m||g;
|
|
||||||
# s|^\([\+#] .*\)|<font style=\"color:gray\">\1</font>|;
|
|
||||||
# s|\(.*error[[:space:]]*:.*\)|<font style=\"background-color:red;color:white\">\1</font>|i;
|
|
||||||
# s|^\(== =.*\)|<font style=\"background-color:green;color:white\">\1</font>|;
|
|
||||||
# s|^\([%?=][!=>] .*\)|<font style=\"color:white\">\1</font>|;"
|
|
||||||
elif [ "$SHOWLOG" = "last" ]; then
|
elif [ "$SHOWLOG" = "last" ]; then
|
||||||
cat $LASTLOGFILE | parse_build_output
|
cat $LASTLOGFILE | parse_build_output
|
||||||
# sed "s|<|\<|g;s|[[:cntrl:]]\[[0-9;]*m||g;
|
|
||||||
# s|^\([\+#] .*\)|<font style=\"color:gray\">\1</font>|;
|
|
||||||
# s|\(.*error[[:space:]]*:.*\)|<font style=\"background-color:red;color:white\">\1</font>|i;
|
|
||||||
# s|^\(== =.*\)|<font style=\"background-color:green;color:white\">\1</font>|;
|
|
||||||
# s|^\([%?=][!=>] .*\)|<font style=\"color:white\">\1</font>|;"
|
|
||||||
else
|
else
|
||||||
# Security check
|
# Security check
|
||||||
[ "${SHOWLOG/\/\.}" != "${SHOWLOG}" ] && continue
|
[ "${SHOWLOG/\/\.}" != "${SHOWLOG}" ] && continue
|
||||||
@ -154,19 +145,14 @@ _EOF
|
|||||||
echo "<table style=\"color:black\"><tr><td colspan=3>Last ${SHOWLOGPKG} logs:</td>"
|
echo "<table style=\"color:black\"><tr><td colspan=3>Last ${SHOWLOGPKG} logs:</td>"
|
||||||
for t in prepare update build install send; do
|
for t in prepare update build install send; do
|
||||||
echo -n "<tr><td>$t:</td><td>"
|
echo -n "<tr><td>$t:</td><td>"
|
||||||
[ -e ${BUILDLOGDIR}${t}/ok/${SHOWLOGPKG} ] && echo -n "<td><a href=\"?NUM=$i$HOST_ADD&SHOWLOG=${t}/ok/${SHOWLOGPKG}\">OK</a></td>" || echo "<td></td>"
|
[ -e ${BUILDLOGDIR}${t}/ok/${SHOWLOGPKG} ] && echo -n "<td><a style=\"color:green;text-decoration:none\" target=_autodist href=\"?NUM=$i$HOST_ADD&SHOWLOG=${t}/ok/${SHOWLOGPKG}\">OK</a></td>" || echo "<td></td>"
|
||||||
[ -e ${BUILDLOGDIR}${t}/failed/${SHOWLOGPKG} ] && echo -n "<td><a href=\"?NUM=$i$HOST_ADD&SHOWLOG=${t}/failed/${SHOWLOGPKG}\">FAILED</a></td>" || echo "<td></td>"
|
[ -e ${BUILDLOGDIR}${t}/failed/${SHOWLOGPKG} ] && echo -n "<td><a style=\"color:green;text-decoration:none\" target=_autodist href=\"?NUM=$i$HOST_ADD&SHOWLOG=${t}/failed/${SHOWLOGPKG}\">FAILED</a></td>" || echo "<td></td>"
|
||||||
echo "</tr>"
|
echo "</tr>"
|
||||||
done
|
done
|
||||||
echo "</table>"
|
echo "</table>"
|
||||||
fi
|
fi
|
||||||
[ -e ${BUILDLOGDIR}${SHOWLOG} ] && \
|
[ -e ${BUILDLOGDIR}${SHOWLOG} ] && \
|
||||||
cat ${BUILDLOGDIR}${SHOWLOG} | parse_build_output
|
cat ${BUILDLOGDIR}${SHOWLOG} | parse_build_output
|
||||||
# sed "s|<|\<|g;s|[[:cntrl:]]\[[0-9;]*m||g;
|
|
||||||
# s|^\([\+#] .*\)|<font style=\"color:gray\">\1</font>|;
|
|
||||||
# s|\(.*error:.*\)|<font style=\"background-color:red;color:white\">\1</font>|i;
|
|
||||||
# s|^\(== =.*\)|<font style=\"background-color:green;color:white\">\1</font>|;
|
|
||||||
# s|^\([%?=][!=>] .*\)|<font style=\"color:white\">\1</font>|;"
|
|
||||||
fi
|
fi
|
||||||
echo -n "</pre></code>"
|
echo -n "</pre></code>"
|
||||||
echo -n "</div></div>"
|
echo -n "</div></div>"
|
||||||
@ -178,29 +164,30 @@ _EOF
|
|||||||
[[ "$NUM" && "$NUM" != "$i" ]] && continue
|
[[ "$NUM" && "$NUM" != "$i" ]] && continue
|
||||||
[[ "$HOST" = "$AS_HOST" ]] || continue
|
[[ "$HOST" = "$AS_HOST" ]] || continue
|
||||||
if [ "${AUTOPORT_UPDATE[$i]}" ]; then
|
if [ "${AUTOPORT_UPDATE[$i]}" ]; then
|
||||||
echo "<b>* <a href=\"?NUM=$i&HOST=$AS_HOST\">$r</a>(${AUTOPORT_ARCH[$i]}) (type:autodist update)"
|
echo "<b>* <a target=_autodist href=\"?NUM=$i&HOST=$AS_HOST\">$r</a>(${AUTOPORT_ARCH[$i]}) (type:autodist update)"
|
||||||
echo " [ <a href=\"?SHOWLOG=current&NUM=$i$HOST_ADD\">log</a> <a href=\"?SHOWLOG=last&NUM=$i$HOST_ADD\">last</a> ]</b>"
|
echo " [ <a target=_autodist href=\"?SHOWLOG=current&NUM=$i$HOST_ADD\">log</a> <a target=_autodist href=\"?SHOWLOG=last&NUM=$i$HOST_ADD\">last</a> ]</b>"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${AUTOPORT_CHROOT[$i]}" ]; then
|
if [ "${AUTOPORT_CHROOT[$i]}" ]; then
|
||||||
echo "<b>* <a href=\"?NUM=$i&HOST=$AS_HOST\">$r</a>(${AUTOPORT_ARCH[$i]}) (type:chroot autoport</a> chroot:${AUTOPORT_CHROOT[$i]})"
|
echo "<b>* <a target=_autodist href=\"?NUM=$i&HOST=$AS_HOST\">$r</a>(${AUTOPORT_ARCH[$i]}) (type:chroot autoport</a> chroot:${AUTOPORT_CHROOT[$i]})"
|
||||||
echo " [ <a href=\"?SHOWLOG=current&NUM=$i$HOST_ADD\">log</a> <a href=\"?SHOWLOG=last&NUM=$i$HOST_ADD\">last</a> ]</b>"
|
echo " [ <a target=_autodist href=\"?SHOWLOG=current&NUM=$i$HOST_ADD\">log</a> <a target=_autodist href=\"?SHOWLOG=last&NUM=$i$HOST_ADD\">last</a> ]</b>"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${AUTOPORT_NATIVE[$i]}" ]; then
|
if [ "${AUTOPORT_NATIVE[$i]}" ]; then
|
||||||
echo "<b>* <a href=\"?NUM=$i&HOST=$AS_HOST\">$r</a>(${AUTOPORT_ARCH[$i]}) (type:native autoport)"
|
echo "<b>* <a target=_autodist href=\"?NUM=$i&HOST=$AS_HOST\">$r</a>(${AUTOPORT_ARCH[$i]}) (type:native autoport)"
|
||||||
echo " [ <a href=\"?SHOWLOG=current&NUM=$i$HOST_ADD\">log</a> <a href=\"?SHOWLOG=last&NUM=$i$HOST_ADD\">last</a> ]</b>"
|
echo " [ <a target=_autodist href=\"?SHOWLOG=current&NUM=$i$HOST_ADD\">log</a> <a target=_autodist href=\"?SHOWLOG=last&NUM=$i$HOST_ADD\">last</a> ]</b>"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${AUTOPORT_CROSS[$i]}" ]; then
|
if [ "${AUTOPORT_CROSS[$i]}" ]; then
|
||||||
echo "<b>* <a href=\"?NUM=$i&HOST=$AS_HOST\">cross-platform</a> autoport (arch:${AUTOPORT_CROSS[$i]})</b>"
|
echo "<b>* <a target=_autodist href=\"?NUM=$i&HOST=$AS_HOST\">cross-platform</a> autoport (arch:${AUTOPORT_CROSS[$i]})</b>"
|
||||||
echo " [ <a href=\"?SHOWLOG=current&NUM=$i$HOST_ADD\">last</a> ]</b>"
|
echo " [ <a target=_autodist href=\"?SHOWLOG=current&NUM=$i$HOST_ADD\">last</a> ]</b>"
|
||||||
fi
|
fi
|
||||||
cat << _EOF
|
cat << _EOF
|
||||||
<div class=downloadbox align=center>
|
<div class=downloadbox align=center>
|
||||||
<div align=left style="background-color: white; height: 250px; width: 850px; overflow: auto; font-size: 8pt; border:1px solid #2b6600; margin: 4px; padding:4; background-color: #e0f2d0;">
|
<div align=left style="background-color: white; height: 250px; width: 850px; overflow: auto; font-size: 8pt; border:1px solid #2b6600; margin: 4px; padding:4; background-color: #e0f2d0;">
|
||||||
_EOF
|
_EOF
|
||||||
echo "<pre>"
|
echo "<pre>"
|
||||||
|
unset BUILDNOWIDX BUILDLOG BUILDNOW BUILDNOWSTATUS SCHEDULED STARTTIME AUTODIST_PID ENDTIME
|
||||||
if [ "${AUTOPORT_UPDATE[$i]}" ]; then
|
if [ "${AUTOPORT_UPDATE[$i]}" ]; then
|
||||||
BUILDNOWIDX=0
|
BUILDNOWIDX=0
|
||||||
STARTTIME=`head $LOGFILE | grep "%% Autodist started" | sed "s|.* @ ||"`
|
STARTTIME=`head $LOGFILE | grep "%% Autodist started" | sed "s|.* @ ||"`
|
||||||
@ -223,83 +210,43 @@ _EOF
|
|||||||
BUILDNOWSTATUS[$BUILDNOWIDX]=
|
BUILDNOWSTATUS[$BUILDNOWIDX]=
|
||||||
BUILDNOWIDX=`expr $BUILDNOWIDX + 1`
|
BUILDNOWIDX=`expr $BUILDNOWIDX + 1`
|
||||||
done < $STATEFILE
|
done < $STATEFILE
|
||||||
elif [ -e $AUTODISTSTATEFILE ]; then
|
else
|
||||||
BUILDNOWIDX=0
|
|
||||||
STARTTIME=`head $LOGFILE | grep "^+ .*start at " | sed "s|.*start at ||"`
|
STARTTIME=`head $LOGFILE | grep "^+ .*start at " | sed "s|.*start at ||"`
|
||||||
# AUTODIST_PID=`head $LOGFILE | grep "%% Autodist started" | sed "s|.*PID \([0-9]*\) .*|\1|"`
|
# AUTODIST_PID=`head $LOGFILE | grep "%% Autodist started" | sed "s|.*PID \([0-9]*\) .*|\1|"`
|
||||||
SCHEDULED=`head -n 40 $LOGFILE | grep -m 1 "^> .*Scheduled jobs: " | sed "s|.*Scheduled jobs: ||"`
|
SCHEDULED=`head -n 40 $LOGFILE | grep -m 1 "^> .*Scheduled jobs: " | sed "s|.*Scheduled jobs: ||"`
|
||||||
ENDTIME=`tail $LOGFILE | grep "^- .*end at " | sed "s|.*end at ||"`
|
ENDTIME=`tail $LOGFILE | grep "^- .*end at " | sed "s|.*end at ||"`
|
||||||
while read line; do
|
if [ -e "$AUTODISTSTATEFILE" ]; then
|
||||||
set -- $line
|
while read line; do
|
||||||
for c in `seq 0 ${#BUILDNOW[*]}`; do
|
set -- $line
|
||||||
if [ "${BUILDNOW[c]}" = "$1" ]; then
|
for c in `seq 0 ${#BUILDNOW[*]}`; do
|
||||||
BUILDNOWIDX=$c
|
if [ "${BUILDNOW[c]}" = "$1" ]; then
|
||||||
break
|
BUILDNOWIDX=$c
|
||||||
|
break
|
||||||
|
else
|
||||||
|
BUILDNOWIDX=$c
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
BUILDNOW[$BUILDNOWIDX]="$1"
|
||||||
|
if [ "$2" = "port" ]; then
|
||||||
|
CURRLOGFILE=build/$3/$1.${AUTOPORT_ARCH[$i]}
|
||||||
else
|
else
|
||||||
BUILDNOWIDX=$c
|
CURRLOGFILE=$2/$3/$1.${AUTOPORT_ARCH[$i]}
|
||||||
fi
|
fi
|
||||||
|
BUILDLOG[$BUILDNOWIDX]="${BUILDLOG[$BUILDNOWIDX]} $CURRLOGFILE"
|
||||||
|
# BUILDLOG[$BUILDNOWIDX]="${BUILDLOG[$BUILDNOWIDX]} $2/$3/$1.i586"
|
||||||
|
BUILDNOWSTATUS[$BUILDNOWIDX]=
|
||||||
|
BUILDNOWIDX=`expr $BUILDNOWIDX + 1`
|
||||||
|
done < $AUTODISTSTATEFILE
|
||||||
|
for p in `dirname $LOGFILE`/current.*; do
|
||||||
|
CURRENT_FILE=`basename $p`
|
||||||
|
AUTODIST_PID=${p/*.}
|
||||||
|
[ -e /proc/$AUTODIST_PID ] && break
|
||||||
|
AUTODIST_PID=
|
||||||
done
|
done
|
||||||
BUILDNOW[$BUILDNOWIDX]="$1"
|
fi
|
||||||
if [ "$2" = "port" ]; then
|
|
||||||
CURRLOGFILE=build/$3/$1.${AUTOPORT_ARCH[$i]}
|
|
||||||
else
|
|
||||||
CURRLOGFILE=$2/$3/$1.${AUTOPORT_ARCH[$i]}
|
|
||||||
fi
|
|
||||||
BUILDLOG[$BUILDNOWIDX]="${BUILDLOG[$BUILDNOWIDX]} $CURRLOGFILE"
|
|
||||||
# BUILDLOG[$BUILDNOWIDX]="${BUILDLOG[$BUILDNOWIDX]} $2/$3/$1.i586"
|
|
||||||
BUILDNOWSTATUS[$BUILDNOWIDX]=
|
|
||||||
BUILDNOWIDX=`expr $BUILDNOWIDX + 1`
|
|
||||||
done < $AUTODISTSTATEFILE
|
|
||||||
else
|
|
||||||
unset STARTTIME ENDTIME BUILDNOW BUILDLOG AUTODISTON LASTLINE SCHEDULED
|
|
||||||
while read line; do
|
|
||||||
line=`echo $line | sed "s|.*\r||"`
|
|
||||||
set -- $line
|
|
||||||
case $1 in
|
|
||||||
"%%" ) AUTODISTON=1 ;;
|
|
||||||
"^"|"="*|""|"!"|"|"|"#"|"->") ;; #comment
|
|
||||||
"+") [ "$STARTTIME" ] || STARTTIME=`echo $line | sed "s|.*start at ||"` ;;
|
|
||||||
"-") ENDTIME=`echo $line | sed "s|.*end at ||"` ;;
|
|
||||||
[A-Za-z0-9]*) ;;
|
|
||||||
">") [ "$SCHEDULED" ] || SCHEDULED=`echo $line | sed "s|.*Scheduled jobs: ||"` ;;
|
|
||||||
*) [ ! "$AUTODISTON" ] && echo $line ;;
|
|
||||||
esac
|
|
||||||
done < $LOGFILE
|
|
||||||
BUILDNOWIDX=1
|
|
||||||
while read line; do
|
|
||||||
line=`echo $line | sed "s|.*\r||"`
|
|
||||||
set -- $line
|
|
||||||
case $1 in
|
|
||||||
"%%" ) if [ "$2" == "Doing" ]; then
|
|
||||||
if [ "$3" != "${BUILDNOW[$BUILDNOWIDX-1]}" ]; then
|
|
||||||
BUILDNOW[$BUILDNOWIDX]="$3"
|
|
||||||
BUILDLOG[$BUILDNOWIDX]=
|
|
||||||
BUILDNOWSTATUS[$BUILDNOWIDX]=
|
|
||||||
BUILDNOWIDX=`expr $BUILDNOWIDX + 1`
|
|
||||||
fi
|
|
||||||
JOBON=1
|
|
||||||
fi ;;
|
|
||||||
"?=") if [ "$2" == "See" ]; then
|
|
||||||
BUILDLOG[$BUILDNOWIDX-1]="${BUILDLOG[$BUILDNOWIDX-1]} `echo $line | sed 's|.*autodist/log/||'`"
|
|
||||||
# BUILDLOG[$BUILDNOWIDX-1]=`echo $line | sed "s|.*autodist/log/||"`
|
|
||||||
fi ;;
|
|
||||||
"=>") JOBON=1 ;;
|
|
||||||
"%!"|"!!") BUILDNOWSTATUS[$BUILDNOWIDX-1]="$line"; JOBON= ;;
|
|
||||||
"==") [ "${2:0:2}" == "==" ] && JOBON= ;;
|
|
||||||
"Hunk"|"") ;;
|
|
||||||
*) [ "$JOBON" ] || echo $line ;;
|
|
||||||
esac
|
|
||||||
done < $AUTODISTLOGFILE
|
|
||||||
for p in `dirname $LOGFILE`/current.*; do
|
|
||||||
CURRENT_FILE=`basename $p`
|
|
||||||
AUTODIST_PID=${p/*.}
|
|
||||||
[ -e /proc/$AUTODIST_PID ] && break
|
|
||||||
AUTODIST_PID=
|
|
||||||
done
|
|
||||||
LASTLINE=$line
|
|
||||||
fi
|
fi
|
||||||
echo "<b>Start:</b> $STARTTIME"
|
[ "$STARTTIME" ] && echo "<b>Start:</b> $STARTTIME"
|
||||||
echo "<b>Scheduled jobs:</b> $SCHEDULED"
|
[ "$SCHEDULED" ] && echo "<b>Scheduled jobs:</b> $SCHEDULED"
|
||||||
LASTJOBNAME=
|
LASTJOBNAME=
|
||||||
for b in `seq 0 ${#BUILDNOW[*]}`; do
|
for b in `seq 0 ${#BUILDNOW[*]}`; do
|
||||||
# set -- ${BUILDNOW[$b]}
|
# set -- ${BUILDNOW[$b]}
|
||||||
@ -307,7 +254,7 @@ _EOF
|
|||||||
[ "$JOBNAME" ] || continue
|
[ "$JOBNAME" ] || continue
|
||||||
if [ "$JOBNAME" != "$LASTJOBNAME" ]; then
|
if [ "$JOBNAME" != "$LASTJOBNAME" ]; then
|
||||||
[ "$LASTJOBNAME" -a "$JOBNAME" ] && echo ""
|
[ "$LASTJOBNAME" -a "$JOBNAME" ] && echo ""
|
||||||
echo -n "<a href=\"/distribution/webbuild.php?ENVIRONMENT=$i&PACKAGE=$JOBNAME\" target=\"webbuild\"><b>$JOBNAME</b></a>: "
|
echo -n "<a target=_webbuild href=\"/distribution/webbuild.php?ENVIRONMENT=$i&PACKAGE=$JOBNAME\"><b>$JOBNAME</b></a>: "
|
||||||
fi
|
fi
|
||||||
rowcnt=0
|
rowcnt=0
|
||||||
if [ "${BUILDLOG[$b]}" ]; then
|
if [ "${BUILDLOG[$b]}" ]; then
|
||||||
@ -324,16 +271,17 @@ _EOF
|
|||||||
# echo
|
# echo
|
||||||
# rowcnt=0
|
# rowcnt=0
|
||||||
# fi
|
# fi
|
||||||
if [ "$OPERATIONNAME" = "send" -a "$OPERATIONSTATUS" = "ok" ]; then
|
case $OPERATIONNAME-$OPERATIONSTATUS in
|
||||||
echo -n "<a href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\">$OPERATIONNAME:$OPERATIONSTATUS</a>"
|
build-ok|send-ok|install-ok|retryinstall-ok)
|
||||||
elif [ "$OPERATIONNAME" = "install" -a "$OPERATIONSTATUS" = "ok" ]; then
|
echo -n "<a target=_autodist href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\">$OPERATIONNAME:$OPERATIONSTATUS</a>"
|
||||||
echo -n "<a href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\">$OPERATIONNAME:$OPERATIONSTATUS</a>"
|
;;
|
||||||
elif [ "$OPERATIONSTATUS" = "ok" ]; then
|
*-failed)
|
||||||
echo -n "<a href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\"><font color=black>$OPERATIONNAME:$OPERATIONSTATUS</font></a>"
|
echo -n "<a target=_autodist href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\"><font color=red>$OPERATIONNAME:$OPERATIONSTATUS</font></a>"
|
||||||
else
|
;;
|
||||||
echo -n "<a href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\"><font color=red>$OPERATIONNAME:$OPERATIONSTATUS</font></a>"
|
*) echo -n "<a target=_autodist href=\"?SHOWLOG=$l&NUM=$i$HOST_ADD\"><font color=black>$OPERATIONNAME:$OPERATIONSTATUS</font></a>"
|
||||||
fi
|
;;
|
||||||
[ "$SUBJOBNAME" != "$JOBNAME" ] && echo -en "(<a href=\"/distribution/webbuild.php?ENVIRONMENT=$i&PACKAGE=$SUBJOBNAME\" target=\"webbuild\">$SUBJOBNAME</a>)"
|
esac
|
||||||
|
# [ "$SUBJOBNAME" != "$JOBNAME" ] && echo -en "(<a href=\"/distribution/webbuild.php?ENVIRONMENT=$i&PACKAGE=$SUBJOBNAME\" target=\"webbuild\">$SUBJOBNAME</a>)"
|
||||||
echo -n " "
|
echo -n " "
|
||||||
rowcnt=`expr $rowcnt + 1`
|
rowcnt=`expr $rowcnt + 1`
|
||||||
done
|
done
|
||||||
@ -342,13 +290,11 @@ _EOF
|
|||||||
LASTJOBNAME=$JOBNAME
|
LASTJOBNAME=$JOBNAME
|
||||||
done
|
done
|
||||||
[ "$LASTJOBNAME" ] && echo
|
[ "$LASTJOBNAME" ] && echo
|
||||||
if [ "$LASTLINE" ]; then
|
if [ "$ENDTIME" ]; then
|
||||||
set -- $LASTLINE
|
echo "<b>End:</b> $ENDTIME"
|
||||||
[ "$1" = "^" ] && echo "<font color=red><b>${2}</b> ${3} ${4} ${5} ${6} ${7}</font>"
|
elif [ "$AUTODIST_PID" ]; then
|
||||||
|
echo "<b>End: <a target=_autodist href=\"?SHOWLOG=current.$AUTODIST_PID&NUM=$i$HOST_ADD\">in progress</a></b>"
|
||||||
fi
|
fi
|
||||||
[ "$ENDTIME" ] && \
|
|
||||||
echo "<b>End:</b> $ENDTIME" || \
|
|
||||||
echo "<b>End: <a href=\"?SHOWLOG=current.$AUTODIST_PID&NUM=$i$HOST_ADD\">in progress</a></b>"
|
|
||||||
echo
|
echo
|
||||||
# grep -v "^=" $LOGFILE | tail -n "$LINES" | sed "s|.*\r||"
|
# grep -v "^=" $LOGFILE | tail -n "$LINES" | sed "s|.*\r||"
|
||||||
# echo
|
# echo
|
||||||
|
Loading…
Reference in New Issue
Block a user