From 03489c22adf6c1d0bbc8fceaf06441eaa8080bd7 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 20 Apr 2016 13:00:21 -0400 Subject: [PATCH] Log the pushed tag and add IP address display Fixes #798 --- endpoints/v2/manifest.py | 2 +- static/directives/logs-view.html | 5 +++++ static/js/directives/ui/logs-view.js | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/endpoints/v2/manifest.py b/endpoints/v2/manifest.py index 6588d32eb..b2e60d18d 100644 --- a/endpoints/v2/manifest.py +++ b/endpoints/v2/manifest.py @@ -464,7 +464,7 @@ def _write_manifest(namespace_name, repo_name, manifest): 'updated_tags': [tag_name], } - track_and_log('push_repo', repo) + track_and_log('push_repo', repo, tag=tag_name) spawn_notification(repo, 'repo_push', event_data) response = make_response('OK', 202) diff --git a/static/directives/logs-view.html b/static/directives/logs-view.html index 3fab56d6a..342221db3 100644 --- a/static/directives/logs-view.html +++ b/static/directives/logs-view.html @@ -40,6 +40,7 @@ Description Date/Time User/Token/App + IP Address + + + (No data) +
diff --git a/static/js/directives/ui/logs-view.js b/static/js/directives/ui/logs-view.js index c62296187..3bae2d67e 100644 --- a/static/js/directives/ui/logs-view.js +++ b/static/js/directives/ui/logs-view.js @@ -45,7 +45,13 @@ angular.module('quay').directive('logsView', function () { 'create_robot': 'Create Robot Account: {robot}', 'delete_robot': 'Delete Robot Account: {robot}', 'create_repo': 'Create Repository: {repo}', - 'push_repo': 'Push to repository: {repo}', + 'push_repo': function(metadata) { + if (metadata.tag) { + return 'Push of {tag}'; + } else { + return 'Repository push'; + } + }, 'repo_verb': function(metadata) { var prefix = ''; if (metadata.verb == 'squash') {