From 8e7a01ce454296b57e54b21432b6225fbddd3788 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Fri, 11 Nov 2022 18:52:18 +0000 Subject: Allow filtering on package status --- autobuild/results.php | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/autobuild/results.php b/autobuild/results.php index 5292812..fe1d479 100644 --- a/autobuild/results.php +++ b/autobuild/results.php @@ -313,11 +313,10 @@ if ($all_attrs) { echo "$attr_type: "; $filters[$attr_type] = Array(); foreach ($attrs as $attr) { + $checked = ""; if ($_GET["attr_$attr_type_$attr"]) { $checked = "checked"; array_push($filters[$attr_type], $attr); - } else { - $checked=""; } echo "$attr\n"; } @@ -337,6 +336,20 @@ if ($all_attrs) { echo "\n"; } echo "
\n"; + $filters["history"] = Array(); + $checked = ""; + if ($_GET["history_new"]) { + $checked = "checked"; + array_push($filters["history"], "new"); + } + echo "Only show newly broken packages
\n"; + $filters["status"] = Array(); + $checked = ""; + if ($_GET["status_broken"]) { + $checked = "checked"; + array_push($filters["status"], "broken"); + } + echo "Hide fixed packages
\n"; echo "\n"; echo ""; } @@ -345,14 +358,27 @@ echo "\n"; echo "\n"; foreach ($failure as $rpm => $error) { $parsed = parse_package($rpm); + $attributes = get_package_attributes($packageid); + if (isset($pkg_maintainers[$parsed['package']])) { + $maintainer = $pkg_maintainers[$parsed['package']]; + } else { + $maintainer = "nobody"; + } + $attributes .= " maintainer_$maintainer"; $history_link = 'History'; $status_html = ""; if (array_key_exists($rpm, $fixed)) { - $status_html = " Fixed"; + $status_html .= " Fixed"; + $attributes .= " status_fixed"; } elseif (array_key_exists($rpm, $removed)) { - $status_html = " Removed"; - } elseif (array_key_exists($rpm, $broken)) { - $status_html = " New"; + $status_html .= " Removed"; + $attributes .= " status_removed"; + } else { + $attributes .= " status_broken"; + } + if (array_key_exists($rpm, $broken)) { + $status_html .= " New"; + $attributes .= " history_new"; } $error_html = $error; if (file_exists("icons/error-$error.png")) { @@ -366,13 +392,6 @@ foreach ($failure as $rpm => $error) { $langs = ""; $errors = ""; $stage = ""; - $attributes = get_package_attributes($packageid); - if (isset($pkg_maintainers[$parsed['package']])) { - $maintainer = $pkg_maintainers[$parsed['package']]; - } else { - $maintainer = "nobody"; - } - $attributes .= " maintainer_$maintainer"; if ($attributes) { # Attributes are space separated words of the form "TYPE_SPECIFIER", e.g., "lang_php" # Types are currently build (use of a particular build system), -- cgit v1.2.1
MaintainerStatusFailure typeBuild stepLanguagesDetected errors