Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/buildmaster/execution-times.php
diff options
context:
space:
mode:
Diffstat (limited to 'buildmaster/execution-times.php')
-rw-r--r--buildmaster/execution-times.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/buildmaster/execution-times.php b/buildmaster/execution-times.php
index cbe1cd5..cc1e064 100644
--- a/buildmaster/execution-times.php
+++ b/buildmaster/execution-times.php
@@ -5,6 +5,11 @@ require_once BASE . '/lib/mysql.php';
abort_iff_webspider();
+if (array_key_exists('from', $_GET))
+ $min_time = 'from_base64("' . base64_encode('-' . $_GET['from']) . '")';
+else
+ $min_time='"-7 00:00:00"';
+
$result = mysql_run_query(
'SELECT' .
' UNIX_TIMESTAMP(`ssh_log`.`date`) AS `date`,' .
@@ -12,7 +17,8 @@ $result = mysql_run_query(
'`ssh_log`.`action`,' .
'`ssh_log`.`parameters`' .
' FROM `ssh_log`' .
- ' WHERE `ssh_log`.`duration` IS NOT NULL' .
+ ' WHERE `ssh_log`.`date`>=ADDDATE(NOW(),' . $min_time . ')' .
+ ' AND `ssh_log`.`duration` IS NOT NULL' .
' AND `ssh_log`.`action` != "ping-from-slave"' .
' AND `ssh_log`.`exit_code` = 0' .
' ORDER BY `ssh_log`.`date`'