This commit is contained in:
Jeroen De Meerleer 2018-08-31 12:02:38 +02:00
parent 2dbbb2b0cb
commit 896b839c27
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
2 changed files with 3 additions and 3 deletions

View File

@ -37,8 +37,8 @@ $jobName = $jobnameResult[0]['name'];
$runsForJobQry = "SELECT runs.*, jobs.name FROM runs, jobs WHERE runs.job = jobs.jobID AND runs.job = ?";
$allruns = true;
if(!isset($_GET['allruns']) || $_GET['allruns'] == 1) {
$runsForJobQry .= " AND runs.statuscode = jobs.expected";
if(!(isset($_GET['allruns']) && $_GET['allruns'] == 1)) {
$runsForJobQry .= " AND runs.statuscode <> jobs.expected";
$allruns = false;
}
$runsForJob = $db->prepare($runsForJobQry);

View File

@ -5,7 +5,7 @@
{% if allruns %}
<p><a href="runs.php?jobID={{ jobID }}&allruns=0">Only show failed runs</a></p>
{% elseif not allruns %}
<p><a href="runs.php?jobID={{ jobID }}&allruns=1">Only all failed runs</a></p>
<p><a href="runs.php?jobID={{ jobID }}&allruns=1">Show all runs</a></p>
{% endif %}
<div id="accordion" class="panel-group">
{% for run in runs %}