summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-16 21:32:30 +0200
committerErich Eckner <git@eckner.net>2018-05-16 21:32:30 +0200
commiteeed41b1626045266c3f5656e616cc41de935d8c (patch)
tree18e7686a35c214d0fa493880947eaaa15e9c48a3
parente1c41e21d75838bfd2e522f53e2d1c6d88a9d9c4 (diff)
downloadarchweb32-eeed41b1626045266c3f5656e616cc41de935d8c.tar.xz
buildmaster/log.php: ?filter new
-rw-r--r--buildmaster/log.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/buildmaster/log.php b/buildmaster/log.php
index 911a52a..477d4c9 100644
--- a/buildmaster/log.php
+++ b/buildmaster/log.php
@@ -2,6 +2,7 @@
include "lib/mysql.php";
+ $filter = "";
if (isset($_GET["show"]) &&
($_GET["show"] == "ssh")) {
$to_show = "ssh";
@@ -12,6 +13,8 @@
"parameters" => "`ssh_log`.`parameters`"
);
$join = " LEFT JOIN `build_slaves` ON `ssh_log`.`build_slave`=`build_slaves`.`id`";
+ if (isset($_GET["filter"]))
+ $filter = " AND `ssh_log`.`action` LIKE from_base64(\"" . base64_encode($_GET["filter"]) . "\")";
} else {
$to_show = "email";
$columns = array(
@@ -46,6 +49,7 @@
// NOW() is wrong here - due to differing time zones O.o
"SELECT MAX(`l`.`date`) FROM `" . $to_show . "_log` AS `l`" .
"),`" . $to_show . "_log`.`date`) < from_base64(\"" . base64_encode( $min_time ) . "\")" .
+ $filter .
" ORDER BY `" . $to_show . "_log`.`date` DESC";
$result = mysql_run_query($query);