tazwok rev 349

more info in web status
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 22 21:47:55 2011 +0100 (2011-02-22)
parents 82372ea97698
children 79d63d8143ce
files tazwok web/index.php
line diff
     1.1 --- a/tazwok	Tue Feb 22 20:44:24 2011 +0100
     1.2 +++ b/tazwok	Tue Feb 22 21:47:55 2011 +0100
     1.3 @@ -2049,6 +2049,7 @@
     1.4  	# Define log path and start report.
     1.5  	[ -f $LOCAL_REPOSITORY/log/$PACKAGE.html ] && rm $LOCAL_REPOSITORY/log/$PACKAGE.html
     1.6  	report sublog $LOCAL_REPOSITORY/log/$PACKAGE.html
     1.7 +	echo "$PACKAGE" > $LOCAL_REPOSITORY/log/package
     1.8  	report step "Cooking $PACKAGE"
     1.9  	report open-bloc
    1.10  
     2.1 --- a/web/index.php	Tue Feb 22 20:44:24 2011 +0100
     2.2 +++ b/web/index.php	Tue Feb 22 21:47:55 2011 +0100
     2.3 @@ -127,12 +127,20 @@
     2.4  <ul>
     2.5  <?php
     2.6  	// Check curent status (update in real time) and display summary.
     2.7 +	$status = "Chroot is not mounted";
     2.8  	if (file_exists($lockfile)) {
     2.9 -		echo "<li>Status: Chroot is mounted</li>\n";
    2.10 +		$status = "Chroot is mounted"";
    2.11  	}
    2.12 -	else {
    2.13 -		echo "<li>Status: Chroot is not mounted</li>\n";
    2.14 +	if (file_exists("$log_dir/step")) {
    2.15 +		$status .= ", ".file_get_contents("$log_dir/step");
    2.16 +		if (file_exists("$log_dir/package")) {
    2.17 +			$pkg = file_get_contents("$log_dir/package");
    2.18 +			if (file_exists("$log_dir/$pkg.html"))
    2.19 +				$status .= " <a href=\"log.php?version=$version&package=$pkg\">$pkg</a>";
    2.20 +			else	$status .= "$pkg";
    2.21 +		}
    2.22  	}
    2.23 +	echo "<li>Status: $status</li>\n";
    2.24  	//include("$db_dir/summary");
    2.25  ?>
    2.26  	<li>Packages in the wok: <?php