Log the pushed tag and add IP address display

Fixes #798
This commit is contained in:
Joseph Schorr 2016-04-20 13:00:21 -04:00
parent feabfa38ff
commit 03489c22ad
3 changed files with 13 additions and 2 deletions

View file

@ -464,7 +464,7 @@ def _write_manifest(namespace_name, repo_name, manifest):
'updated_tags': [tag_name], '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) spawn_notification(repo, 'repo_push', event_data)
response = make_response('OK', 202) response = make_response('OK', 202)

View file

@ -40,6 +40,7 @@
<td>Description</td> <td>Description</td>
<td style="min-width: 226px">Date/Time</td> <td style="min-width: 226px">Date/Time</td>
<td>User/Token/App</td> <td>User/Token/App</td>
<td>IP Address</td>
</thead> </thead>
<tr class="log" ng-repeat="log in (logs | visibleLogFilter:kindsAllowed | filter:search)" <tr class="log" ng-repeat="log in (logs | visibleLogFilter:kindsAllowed | filter:search)"
@ -72,6 +73,10 @@
(anonymous) (anonymous)
</span> </span>
</td> </td>
<td>
<span bo-if="log.metadata._ip"><span bo-text="log.metadata._ip"></span></span>
<span class="empty" bo-if="!log.metadata._ip">(No data)</span>
</td>
</tr> </tr>
</table> </table>
<div class="cor-loader" ng-show="loading"></div> <div class="cor-loader" ng-show="loading"></div>

View file

@ -45,7 +45,13 @@ angular.module('quay').directive('logsView', function () {
'create_robot': 'Create Robot Account: {robot}', 'create_robot': 'Create Robot Account: {robot}',
'delete_robot': 'Delete Robot Account: {robot}', 'delete_robot': 'Delete Robot Account: {robot}',
'create_repo': 'Create Repository: {repo}', '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) { 'repo_verb': function(metadata) {
var prefix = ''; var prefix = '';
if (metadata.verb == 'squash') { if (metadata.verb == 'squash') {