summaryrefslogtreecommitdiff
path: root/web-scripts
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-01-25 07:17:41 +0100
committerErich Eckner <git@eckner.net>2018-01-25 07:17:41 +0100
commit0ff03eeb9bcf74bb0febbde389a19cbb33253338 (patch)
treee03c5ffa65644701891ca5712756eebff532f702 /web-scripts
parent1a3983bf3199066bb2394b099ea42a0c7b16b41f (diff)
downloadbuilder-0ff03eeb9bcf74bb0febbde389a19cbb33253338.tar.xz
web-scripts/broken-packages.php: link to logs should be on reason, not on trial-count
Diffstat (limited to 'web-scripts')
-rw-r--r--web-scripts/broken-packages.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/web-scripts/broken-packages.php b/web-scripts/broken-packages.php
index 268e296..d88ba4d 100644
--- a/web-scripts/broken-packages.php
+++ b/web-scripts/broken-packages.php
@@ -58,18 +58,25 @@ foreach ($row as $key => $val)
);
unset($reasons);
- unset($last_log);
$rows[$count]["trials"] = $fail_result -> num_rows;
if ($rows[$count]["trials"] > 0) {
while($fail_row = $fail_result->fetch_assoc()) {
- $reasons[$fail_row["name"]] = $fail_row["name"];
- $last_log = $fail_row["log_file"];
+ $reasons[$fail_row["name"]] = $fail_row["log_file"];
}
}
if (isset($reasons)) {
$to_print="";
- foreach ($reasons as $reason) {
- $to_print=$to_print.", ".$reason;
+ foreach ($reasons as $reason => $last_log) {
+ if (file_exists("/srv/http/build-logs/error/".$last_log)) {
+ $to_print= $to_print .
+ ", <a href=\"/build-logs/error/" .
+ $last_log .
+ "\">" .
+ $reason .
+ "</a>";
+ } else {
+ $to_print= $to_print . ", " . $reason;
+ }
}
$rows[$count]["fail_reasons"]=substr($to_print,2);
} else {
@@ -85,10 +92,6 @@ foreach ($row as $key => $val)
$rows[$count]["git_revision"] = $row["git_revision"];
$rows[$count]["mod_git_revision"] = $row["mod_git_revision"];
$rows[$count]["name"] = $row["name"];
- if (isset($last_log))
- $rows[$count]["print_trials"]="<a href=\"/build-logs/error/".$last_log."\">". $rows[$count]["trials"] ."</a>";
- else
- $rows[$count]["print_trials"]=$rows[$count]["trials"];
if ($row["is_blocked"]=="") {
$rows[$count]["is_blocked"]="&nbsp;";
}