Add a logs view for specific members of an organization
This commit is contained in:
parent
59046b2e79
commit
a0f9e1646a
7 changed files with 124 additions and 8 deletions
|
@ -451,6 +451,7 @@ quayApp = angular.module('quay', ['ngRoute', 'restangular', 'angularMoment', 'an
|
|||
when('/organization/:orgname', {templateUrl: '/static/partials/org-view.html', controller: OrgViewCtrl}).
|
||||
when('/organization/:orgname/admin', {templateUrl: '/static/partials/org-admin.html', controller: OrgAdminCtrl}).
|
||||
when('/organization/:orgname/teams/:teamname', {templateUrl: '/static/partials/team-view.html', controller: TeamViewCtrl}).
|
||||
when('/organization/:orgname/logs/:membername', {templateUrl: '/static/partials/org-member-logs.html', controller: OrgMemberLogsCtrl}).
|
||||
when('/v1/', {title: 'Activation information', templateUrl: '/static/partials/v1-page.html', controller: V1Ctrl}).
|
||||
when('/', {title: 'Hosted Private Docker Registry', templateUrl: '/static/partials/landing.html', controller: LandingCtrl}).
|
||||
otherwise({redirectTo: '/'});
|
||||
|
@ -679,7 +680,8 @@ quayApp.directive('logsView', function () {
|
|||
'organization': '=organization',
|
||||
'user': '=user',
|
||||
'visible': '=visible',
|
||||
'repository': '=repository'
|
||||
'repository': '=repository',
|
||||
'performer': '=performer'
|
||||
},
|
||||
controller: function($scope, $element, $sce, Restangular) {
|
||||
$scope.loading = true;
|
||||
|
@ -782,6 +784,10 @@ quayApp.directive('logsView', function () {
|
|||
if ($scope.repository) {
|
||||
url = getRestUrl('repository', $scope.repository.namespace, $scope.repository.name, 'logs');
|
||||
}
|
||||
|
||||
if ($scope.performer) {
|
||||
url += '?performer=' + encodeURIComponent($scope.performer.username);
|
||||
}
|
||||
|
||||
var loadLogs = Restangular.one(url);
|
||||
loadLogs.customGET().then(function(resp) {
|
||||
|
@ -851,6 +857,7 @@ quayApp.directive('logsView', function () {
|
|||
$scope.$watch('user', update);
|
||||
$scope.$watch('repository', update);
|
||||
$scope.$watch('visible', update);
|
||||
$scope.$watch('performer', update);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue