cookutils diff lighttpd/index.cgi @ rev 938

Tiny edits.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Jun 20 03:52:01 2017 +0300 (2017-06-20)
parents 49ff02f8d304
children 81f33cdb5a66
line diff
     1.1 --- a/lighttpd/index.cgi	Mon Jun 19 15:59:48 2017 +0300
     1.2 +++ b/lighttpd/index.cgi	Tue Jun 20 03:52:01 2017 +0300
     1.3 @@ -487,7 +487,7 @@
     1.4  				-e 's#^.*[Nn]o such file.*#<b>\0</b>#' \
     1.5  				-e 's#^.*No package .* found.*#<b>\0</b>#' \
     1.6  				-e 's#^.*Unable to find.*#<b>\0</b>#' \
     1.7 -				-e 's#^.*[Ii]nvalid.*#<b>\0</b>#' \
     1.8 +				-e 's#[^a-zA-Z-][Ii]nvalid.*#<b>\0</b>#' \
     1.9  				-e 's#\([Nn][Oo][Tt] found\.*\)$#<b>\1</b>#' \
    1.10  				-e 's#\(found\.*\)$#<i>\1</i>#' \
    1.11  				\
    1.12 @@ -591,8 +591,11 @@
    1.13  			}
    1.14  			function row2(line, rowNum) {
    1.15  				split(line, s, " : ");
    1.16 -				if (rowNum == 1)
    1.17 +				if (rowNum == 1) {
    1.18 +					print "<thead>";
    1.19  					printf("\t<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n", s[1], s[2], s[3], s[4], s[5]);
    1.20 +					print "</thead><tbody>";
    1.21 +				}
    1.22  				else
    1.23  					printf("\t<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", s[1], s[2], s[3], s[4], s[5]);
    1.24  			}
    1.25 @@ -601,12 +604,12 @@
    1.26  				if ($0 ~ "===") { seen++; if (seen == 1) next; else exit; }
    1.27  				if ($0 ~ "---") {
    1.28  					seen2++;
    1.29 -					if (seen2 == 1) printf("</table>\n<table class=\"pkgslist\">\n")
    1.30 +					if (seen2 == 1) print "</table>\n\n<table class=\"pkgslist\">"
    1.31  					next
    1.32  				}
    1.33  				if (seen2) row2($0, seen2); else row($0);
    1.34  			}
    1.35 -			END { print "</table></section>" }
    1.36 +			END { print "</tbody></table></section>" }
    1.37  			'
    1.38  		elif fgrep -q "Debug information" $log; then
    1.39  			echo -e '<section>\n<h3>Debug information</h3>'
    1.40 @@ -739,6 +742,10 @@
    1.41  # There is no need to recalculate the statistics every time the page is displayed.
    1.42  
    1.43  update_webstat() {
    1.44 +	echo '<div id="waitme">'
    1.45 +	show_note i 'Please wait while statistics are being collected.'
    1.46 +	echo "</div>"
    1.47 +
    1.48  	# for receipts:
    1.49  	rtotal=$(ls $WOK/*/arch.$ARCH | wc -l)
    1.50  	rcooked=$(ls -d $WOK/*/taz | wc -l)
    1.51 @@ -763,6 +770,8 @@
    1.52  rtotal="$rtotal"; rcooked="$rcooked"; runbuilt="$runbuilt"; rblocked="$rblocked"; rbroken="$rbroken"
    1.53  ptotal="$ptotal"; pcooked="$pcooked"; punbuilt="$punbuilt"; pblocked="$pblocked"; pbroken="$pbroken"
    1.54  EOT
    1.55 +
    1.56 +	echo '<script>document.getElementById("waitme").remove();</script>'
    1.57  }
    1.58  
    1.59  
    1.60 @@ -790,10 +799,10 @@
    1.61  		done
    1.62  
    1.63  		if [ -n "$(GET broken)" ]; then
    1.64 -			echo '<div id="content2">'
    1.65 +			echo '<section id="content2">'
    1.66  			echo "<h2>DB: broken - Packages: $(wc -l < $broken)</h2>"
    1.67  			sort $CACHE/broken | sed "s|^[^']*|<a href='$base/\0'>\0</a>|g" | mktable
    1.68 -			echo '</div>'
    1.69 +			echo '</section>'
    1.70  		fi
    1.71  
    1.72  		case "$QUERY_STRING" in