webbuild: more css support for output boxes

This commit is contained in:
Silvan Calarco 2019-07-28 21:57:52 +02:00
parent 1c15fcfb25
commit 94f1ffcf9a
4 changed files with 8 additions and 9 deletions

View File

@ -145,9 +145,8 @@ for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
[ "${SHOWLOG}" = "current" -o "${SHOWLOG}" = "last" -a ! "${AUTOPORT_UPDATE[$i]}" ] && echo -n " ($r)" [ "${SHOWLOG}" = "current" -o "${SHOWLOG}" = "last" -a ! "${AUTOPORT_UPDATE[$i]}" ] && echo -n " ($r)"
echo -n ":</h2>" echo -n ":</h2>"
cat << _EOF cat << _EOF
<div class=downloadbox align=center> <div class="downloadbox" align="center">
<div class=output align=left style="height:550px;width:850px;"> <div class="output outputbox">
<!--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
@ -215,8 +214,8 @@ _EOF
echo " [ <a target=_autodist href=\"?SHOWLOG=current&NUM=$i&REP=$RNUM$HOST_ADD\">last</a> ]</b>" echo " [ <a target=_autodist href=\"?SHOWLOG=current&NUM=$i&REP=$RNUM$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" class="showlogbox">
_EOF _EOF
echo -n "<pre style='margin:1px;word-wrap:normal;white-space:pre;'>" echo -n "<pre style='margin:1px;word-wrap:normal;white-space:pre;'>"
unset BUILDNOWIDX BUILDLOG BUILDNOW BUILDNOWSTATUS SCHEDULED STARTTIME AUTODIST_PID ENDTIME unset BUILDNOWIDX BUILDLOG BUILDNOW BUILDNOWSTATUS SCHEDULED STARTTIME AUTODIST_PID ENDTIME

View File

@ -1658,7 +1658,7 @@ if [ "$REQUEST" != "" ]; then
echo -n "<b>Console output ($REQUEST" echo -n "<b>Console output ($REQUEST"
[ "$PACKAGE" ] && echo -n " for $PACKAGE" [ "$PACKAGE" ] && echo -n " for $PACKAGE"
echo -n "):</b>" echo -n "):</b>"
echo -n "<div align=left class=output " echo -n "<div class=\"outputbox\" "
if [ "$REQUEST" = "rpmbuild" -o "$REQUEST" = "autoportnp" -o "$REQUEST" = "rpmprepare" \ if [ "$REQUEST" = "rpmbuild" -o "$REQUEST" = "autoportnp" -o "$REQUEST" = "rpmprepare" \
-o "$REQUEST" = "sendpackage" -o "$REQUEST" = "sendsource" -o "$REQUEST" = "autospeclistcheck" \ -o "$REQUEST" = "sendpackage" -o "$REQUEST" = "sendsource" -o "$REQUEST" = "autospeclistcheck" \
-o "$REQUEST" = "autodistbuild" -o "$REQUEST" = "autodistinstall" -o "$REQUEST" = "autodistsend" ]; then -o "$REQUEST" = "autodistbuild" -o "$REQUEST" = "autodistinstall" -o "$REQUEST" = "autodistsend" ]; then

View File

@ -268,8 +268,8 @@ function parse_build_output() {
s|^\([\+#] .*\)|<font style=\"color:cyan\">\1</font>|; s|^\([\+#] .*\)|<font style=\"color:cyan\">\1</font>|;
s|\(ftp[s]*://[[:alnum:]+\,:&?/_.=~%#-]*\)|<a href=\1 target=new>\1</a>|; s|\(ftp[s]*://[[:alnum:]+\,:&?/_.=~%#-]*\)|<a href=\1 target=new>\1</a>|;
s|\(http[s]*://[[:alnum:]+\,:&?/_.=~%#-]*\)|<a href=\1 target=new>\1</a>|; s|\(http[s]*://[[:alnum:]+\,:&?/_.=~%#-]*\)|<a href=\1 target=new>\1</a>|;
s|\(.*\)\(error[^0-9A-Za-z]*:[[:space:]]*.*\)|<font style=\"background-color:darkred;color:white\">\1<a %SRCURL%\2%SRCURLEND%>\2</a></font>|i; s|\(.*\)\(error[^0-9A-Za-z]*:[[:space:]]*.*\)|<span class=\"outputboxerror\">\1<a %SRCURL%\2%SRCURLEND%>\2</a></span>|i;
s|^\(== =.*\)|<font style=\"background-color:green;color:white\">\1</font>|; s|^\(== =.*\)|<span class=\"outputboxok\">\1</span>|;
s|^[[:cntrl:]]*\([!%?=][!%!=>] .*\)|<font style=\"color:gold\">\1</font>|; s|^[[:cntrl:]]*\([!%?=][!%!=>] .*\)|<font style=\"color:gold\">\1</font>|;
s|[[:cntrl:]]||g;" | google_search $1 s|[[:cntrl:]]||g;" | google_search $1
} }

View File

@ -42,7 +42,7 @@ function showlog() {
LOGFILES=`$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "ls -t $LOGFILES 2>/dev/null | head -1"` LOGFILES=`$SUDO_WRAPPER 0 $ENVIRONMENT "$USER" "" "ls -t $LOGFILES 2>/dev/null | head -1"`
fi fi
echo -n "<output><![CDATA[<hr><b>Console output for $PACKAGE ($LOGTYPE$LOGSTATUSAPPEND):</b>" echo -n "<output><![CDATA[<hr><b>Console output for $PACKAGE ($LOGTYPE$LOGSTATUSAPPEND):</b>"
echo "<div align=left class=output id=$LOGOUTPUTID>" echo "<div align=left class=\"outputbox\" id=\"$LOGOUTPUTID\">"
for f in $LOGFILES; do for f in $LOGFILES; do
if [ -r $f ]; then if [ -r $f ]; then
LOGFILESIZE=`stat -c %s $f` LOGFILESIZE=`stat -c %s $f`