|
6 | 6 |
|
7 | 7 | $days_ago = get_integer_param($_GET, 'days_ago', 1, 0, 365); |
8 | 8 | $job = $_GET['job'] ?? null; |
9 | | -$event = $_GET['event'] ?? ''; |
| 9 | +$succeeded = get_bool_param($_GET, 'succeeded', null, true); |
10 | 10 |
|
11 | 11 | $start_timestamp = time() - (60 * 60 * 24 * $days_ago); |
12 | 12 |
|
|
30 | 30 | echo "</tr>"; |
31 | 31 | echo "<tr>"; |
32 | 32 | echo " <th>" . _("Job") . "</th>"; |
33 | | -echo " <td><input name='job' type='text' value='" . attr_safe($job) . "'></td>"; |
| 33 | +echo " <td>"; |
| 34 | +echo " <select name='job'>"; |
| 35 | +foreach (array_merge([_("All")], get_job_log_filenames()) as $jobname) { |
| 36 | + $value = $jobname == _("All") ? "" : attr_safe($jobname); |
| 37 | + $selected = $jobname == $job ? "selected" : ""; |
| 38 | + echo "<option value='$value' $selected>" . html_safe($jobname) . "</option>"; |
| 39 | +} |
| 40 | +echo " </select>"; |
| 41 | +echo " </td>"; |
34 | 42 | echo "</tr>"; |
35 | 43 | echo "<tr>"; |
36 | | -echo " <th>" . _("Event") . "</th>"; |
37 | | -echo " <td><input name='event' type='text' value='" . attr_safe($event) . "'></td>"; |
| 44 | +echo " <th>" . _("Status") . "</th>"; |
| 45 | +echo " <td>"; |
| 46 | +echo " <select name='succeeded'>"; |
| 47 | +foreach ([_("All") => null, _("Succeeded") => 1, _("Failed") => 0] as $name => $value) { |
| 48 | + $selected = $succeeded === boolval($value) ? "selected" : ""; |
| 49 | + echo "<option value='$value' $selected>$name</option>"; |
| 50 | +} |
| 51 | +echo " </td>"; |
38 | 52 | echo "</tr>"; |
39 | 53 | echo "</table>"; |
40 | 54 | echo "<input type='submit' value='" . attr_safe(_("Show")) . "'>"; |
|
50 | 64 | echo "<th>" . _("Event") . "</th>"; |
51 | 65 | echo "<th>" . _("Comments") . "</th>"; |
52 | 66 | echo "</tr>"; |
53 | | -foreach (get_job_log_entries($start_timestamp, $job, $event) as $row) { |
| 67 | +foreach (get_job_log_entries($start_timestamp, $job, /*$event*/ null, $succeeded) as $row) { |
54 | 68 | if ($row["succeeded"] === null) { |
55 | 69 | $status = ""; |
56 | 70 | } elseif ($row["succeeded"]) { |
|
0 commit comments