index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-07-26 10:53:50 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-07-26 10:53:50 +0200 |
commit | 2fe6e5380f561377ec1b7cf0c6f1fda4c2680f7d (patch) | |
tree | f12e7f966265b771b02206e1a878040afe975f64 /buildmaster | |
parent | 14703b9448125a2901bc6e54823ab5d00df22d8e (diff) |
-rw-r--r-- | buildmaster/execution-times.php | 8 |
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`' |