summaryrefslogtreecommitdiff
path: root/buildmaster
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-06-28 10:10:28 +0200
committerErich Eckner <git@eckner.net>2019-06-28 10:10:28 +0200
commit5ca407440565a9f1238691e794b53eb083de0537 (patch)
treea34369e93b9782509cee33dbc71501f05415a84b /buildmaster
parente6651a0ae649c73c88f4bb116a3a35442d45bfbc (diff)
downloadwebsite-5ca407440565a9f1238691e794b53eb083de0537.tar.xz
buildmaster/log.php: command_log display new
Diffstat (limited to 'buildmaster')
-rw-r--r--buildmaster/index.php3
-rw-r--r--buildmaster/log.php18
2 files changed, 20 insertions, 1 deletions
diff --git a/buildmaster/index.php b/buildmaster/index.php
index c7999bb..bd43cf4 100644
--- a/buildmaster/index.php
+++ b/buildmaster/index.php
@@ -51,7 +51,8 @@ if ($sarch_param != "") {
<a href="status.php">status</a><br>
<a href="https://buildmaster.archlinux32.org/build-logs/">build logs</a> --
<a href="log.php?show=ssh">ssh-log</a> --
- <a href="log.php?show=email">email-log</a><br>
+ <a href="log.php?show=email">email-log</a> --
+ <a href="log.php?show=command">command-log</a><br>
sanity: of <a href="https://buildmaster.archlinux32.org/master-sanity.html">state files</a>,
of <a href="https://buildmaster.archlinux32.org/mysql-sanity.html">mysql database</a> and
<a href="mysql-issues.php?ignore-i486&ignore-pentium4">broken dependencies in the database</a><br>
diff --git a/buildmaster/log.php b/buildmaster/log.php
index 371bb86..2810d7f 100644
--- a/buildmaster/log.php
+++ b/buildmaster/log.php
@@ -18,6 +18,24 @@ require_once BASE . "/lib/mysql.php";
$filter .= " AND `ssh_log`.`action` LIKE from_base64(\"" . base64_encode($_GET["action"]) . "\")";
if (array_key_exists("slave", $_GET))
$filter .= " AND `build_slaves`.`name` LIKE from_base64(\"" . base64_encode($_GET["slave"]) . "\")";
+ } elseif (array_key_exists("show", $_GET) &&
+ ($_GET["show"] == "command")) {
+ $to_show = "command";
+ $columns = array(
+ "date" => "`command_log`.`date`",
+ "command" => "`command_log`.`command`",
+ "parameters" => "`command_log`.`parameters`",
+ "shell" => "IF(`command_log`.`shell`,1,0)"
+ );
+ $join = '';
+ if (array_key_exists("command", $_GET))
+ $filter .= " AND `command_log`.`command` LIKE from_base64(\"" . base64_encode($_GET["command"]) . "\")";
+ if (array_key_exists("shell", $_GET)) {
+ $filter .= " AND";
+ if (!$_GET["shell"])
+ $filter .= " NOT";
+ $filter .= " `command_log`.`shell`";
+ }
} else {
$to_show = "email";
$columns = array(