[pgstatus] [PATCH] Link to the buildd machine information from the architecture page.
---
architecture.php | 2 ++
library.php | 23 +++++++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/architecture.php b/architecture.php
index ec2c44d..70fa029 100644
--- a/architecture.php
+++ b/architecture.php
@@ -46,6 +46,8 @@ buildds_overview_link($arch, $suite, $buildd);
notes_overview_link($arch, $suite, $notes);
+buildds_machine_info($arch, $suite, $buildd);
+
echo "<p>The time indicates for how long a package is in the given state.</p>";
$query =
diff --git a/library.php b/library.php
index 956f745..de0bb13 100644
--- a/library.php
+++ b/library.php
@@ -590,6 +590,14 @@ function pkg_buildd($buildd, $suite, $arch) {
htmlentities($name));
}
+function buildd_machine_link($buildd) {
+ if ($buildd == "none") return $buildd;
+ $name = buildd_name($buildd);
+ return sprintf("<a href=\"https://db.debian.org/machines.cgi?host=%s\">%s</a>",
+ urlencode($buildd),
+ htmlentities($name));
+}
+
function pkg_state($status, $state) {
global $goodstate;
if (in_array($status, $goodstate))
@@ -1186,6 +1194,21 @@ function buildds_overview_link($arch, $suite, $current_buildd="") {
echo "<br />";
}
+function buildd_machine_info($arch, $suite, $current_buildd="") {
+ $list = buildd_list($arch, $suite);
+ echo "Buildd machine info: ";
+ if (is_array($list))
+ foreach($list as $buildd) {
+ $name = $buildd["username"];
+ if ($name == "buildd_${arch}" || !is_buildd($name)) continue;
+ $name = buildd_machine_link($buildd["username"]);
+ if ($name == $current_buildd)
+ $name = "<strong>" . $name . "</strong>";
+ printf(" [%s] ", $name);
+ }
+ echo "<br />";
+}
+
function notes_overview_link($arch, $suite, $current_notes="") {
echo "Restrict on notes: ";
$current_notes = empty($current_notes) ? "all" : $current_notes;
--
1.7.10.4
Reply to: