diff --git a/initdb.py b/initdb.py index 6a4fc5853..6d2f75b38 100644 --- a/initdb.py +++ b/initdb.py @@ -286,6 +286,9 @@ def populate_database(): model.log_action('delete_tag', org.username, performer=new_user_2, repository=org_repo, timestamp=today, metadata={'username': new_user_2.username, 'repo': 'orgrepo', 'tag': 'sometag'}) + model.log_action('pull_repo', org.username, repository=org_repo, timestamp=today, + metadata={'token_code': 'somecode', 'repo': 'orgrepo'}) + if __name__ == '__main__': logging.basicConfig(**app.config['LOGGING_CONFIG']) initialize_database() diff --git a/static/js/app.js b/static/js/app.js index 4d0637924..8ea82cd48 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -1287,9 +1287,7 @@ quayApp.directive('logsView', function () { 'robot': 'wrench' }; - if (log.ip) { - log.metadata['_ip'] = log.ip; - } + log.metadata['_ip'] = log.ip ? log.ip : null; var description = logDescriptions[log.kind] || logTitles[log.kind] || log.kind; if (typeof description != 'string') { @@ -1298,7 +1296,8 @@ quayApp.directive('logsView', function () { for (var key in log.metadata) { if (log.metadata.hasOwnProperty(key)) { - var markedDown = getMarkedDown(log.metadata[key].toString()); + var value = log.metadata[key] != null ? log.metadata[key].toString() : '(Unknown)'; + var markedDown = getMarkedDown(value); markedDown = markedDown.substr('

'.length, markedDown.length - '

'.length); var icon = fieldIcons[key];