You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2017/04/18 21:34:58 UTC

[1/2] incubator-trafficcontrol git commit: sets last_seen_log cookie when all change logs are viewed. this is needed so logs/newcount can be reset when logs are viewed.

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master f790c3707 -> 76970c3ee


sets last_seen_log cookie when all change logs are viewed. this is needed so logs/newcount can be reset when logs are viewed.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/5432b506
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/5432b506
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/5432b506

Branch: refs/heads/master
Commit: 5432b50674d32ba38de875872e2fdfe17e434728
Parents: f790c37
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Tue Apr 18 15:24:34 2017 -0600
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Tue Apr 18 15:34:15 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/lib/API/ChangeLog.pm | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5432b506/traffic_ops/app/lib/API/ChangeLog.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/ChangeLog.pm b/traffic_ops/app/lib/API/ChangeLog.pm
index c5816b7..cf54256 100644
--- a/traffic_ops/app/lib/API/ChangeLog.pm
+++ b/traffic_ops/app/lib/API/ChangeLog.pm
@@ -24,6 +24,10 @@ sub index {
 	my $numdays = defined( $self->param('days') ) ? $self->param('days') : 30;
 	my $rows    = defined( $self->param('days') ) ? 1000000 : 1000;              # all of them gets to be too much
 
+	my $date_string = `date "+%Y-%m-%d% %H:%M:%S"`;
+	chomp($date_string);
+	$self->cookie( last_seen_log => $date_string, { path => "/", max_age => 604800 } );    # expires in a week.
+
 	my @data;
 	my $interval = "> now() - interval '" . $numdays . " day'";                  # postgres
 	my $rs = $self->db->resultset('Log')->search( { 'me.last_updated' => \$interval },


[2/2] incubator-trafficcontrol git commit: This closes #481.

Posted by da...@apache.org.
This closes #481.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/76970c3e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/76970c3e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/76970c3e

Branch: refs/heads/master
Commit: 76970c3ee5d39db4b2bf3c835dca7cdcf0df852c
Parents: 5432b50
Author: Dan Kirkwood <da...@gmail.com>
Authored: Tue Apr 18 15:34:53 2017 -0600
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Tue Apr 18 15:34:53 2017 -0600

----------------------------------------------------------------------

----------------------------------------------------------------------