summaryrefslogtreecommitdiffstats
path: root/autobuild/results.php
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2020-04-17 20:58:28 +0000
committerPascal Terjan <pterjan@mageia.org>2020-04-17 20:58:28 +0000
commit3088e0eb759ce97ccd71e9cae005bad2d29a4a73 (patch)
tree988e0ae3ab3c9d65c2b64c8b97e29971ee117392 /autobuild/results.php
parent66d3897efd79ea045721bc6ffb57f300a16b5ae2 (diff)
downloadpkgsubmit-3088e0eb759ce97ccd71e9cae005bad2d29a4a73.tar
pkgsubmit-3088e0eb759ce97ccd71e9cae005bad2d29a4a73.tar.gz
pkgsubmit-3088e0eb759ce97ccd71e9cae005bad2d29a4a73.tar.bz2
pkgsubmit-3088e0eb759ce97ccd71e9cae005bad2d29a4a73.tar.xz
pkgsubmit-3088e0eb759ce97ccd71e9cae005bad2d29a4a73.zip
Only load failures by default
This gets the page currently to 241kB down from 2.8MB
Diffstat (limited to 'autobuild/results.php')
-rw-r--r--autobuild/results.php59
1 files changed, 18 insertions, 41 deletions
diff --git a/autobuild/results.php b/autobuild/results.php
index 0fc9807..631d20f 100644
--- a/autobuild/results.php
+++ b/autobuild/results.php
@@ -146,19 +146,6 @@ $estimated_percent = round(($nb_success+$nb_fixed)*1000/($nb_tried-$nb_removed))
echo "<title>$succes_percent% Success</title>\n";
?>
<style>
-.collapse-arrow:before {
- content: '▼';
-}
-.collapse-arrow {
- text-decoration: none;
-}
-
-.expand-arrow:before {
- content: '►';
-}
-.expand-arrow {
- text-decoration: none;
-}
table.failureTable {
background-color: #f7f7f7;
}
@@ -169,22 +156,9 @@ table.failureTable thead th {
font-weight: bold;
}
</style>
-<script language='javascript'>
-function toggle(titleid, contentid){
- document.getElementById(titleid).classList.toggle('expand-arrow');
- document.getElementById(titleid).classList.toggle('collapse-arrow');
- var e = document.getElementById(contentid);
- if(e.style.display == 'block')
- e.style.display = 'none';
- else
- e.style.display = 'block';
-}
-
-</script>
<meta charset="utf-8">
</head>
<body>
-<div style='position:absolute;right:0;top:0;'>
<?php
# See if the pattern of recent build failures indicate a flaky build
@@ -242,7 +216,13 @@ foreach ($runs as $r) {
$selected = ($r == $run) ? ' selected' : '';
echo "<option value='$r'$selected>$r$in_progress</option>";
}
-echo "</select></form></div>\n";
+echo "</select></form>";
+if ($_GET['include_success'] === 'true') {
+ echo "<a href=\"" . $_SERVER["PHP_SELF"] . "?run=" . $_GET['run'] . "\">Only failures</a>";
+} else {
+ echo "<a href=\"" . $_SERVER["PHP_SELF"] . "?run=" . $_GET['run'] . "&amp;include_success=true\">Include successful packages</a>";
+}
+echo "</div>\n";
echo "<header id=\"mgnavt\"><h1>$succes_percent% Success</h1></header>\n";
echo "$nb_fixed packages have been fixed since this run and $nb_removed have been removed.<br/> If no new package was broken, success rate next time should be $estimated_percent%.<br/>\n";
echo "<h1>Failed builds ($nb_failed/$nb_tried)</h1>\n";
@@ -314,23 +294,20 @@ foreach ($failure as $rpm => $error) {
$db->close();
?>
</table>
-</div>
-<div><h1><a class='expand-arrow' id='success-title' href='javascript:toggle("success-title","success-list");'>
-<?php echo "Successful builds ($nb_success/$nb_tried)" ?>
-</a></h1>
-<div id="success-list" style="display:none"><ul>
<?php
-foreach ($success as $rpm) {
- $parsed = parse_package($rpm);
- $history_link = '<a href="history.php?package='.$parsed['package'].'">[h]</a>';
- if (file_exists("$base_dir/$rpm/")) {
- echo "<li><a href='$base_dir/$rpm/'>$rpm</a> $history_link</li>\n";
- } else {
- echo "<li>$rpm $history_link</li>\n";
+if ($_GET['include_success'] === 'true') {
+ echo "<h1>Successful builds ($nb_success/$nb_tried)</h1>\n<ul>\n";
+ foreach ($success as $rpm) {
+ $parsed = parse_package($rpm);
+ $history_link = '<a href="history.php?package='.$parsed['package'].'">[h]</a>';
+ if (file_exists("$base_dir/$rpm/")) {
+ echo "<li><a href='$base_dir/$rpm/'>$rpm</a> $history_link</li>\n";
+ } else {
+ echo "<li>$rpm $history_link</li>\n";
+ }
}
+ echo "</ul>\n";
}
-
?>
-</ul></div></div>
</body>
</html>