mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 22:57:38 +01:00
show user role on the project list page
This commit is contained in:
parent
55d1b075f3
commit
f6e9827ed4
@ -11,6 +11,13 @@
|
||||
function ProjectController($scope, ListProjectService, $timeout, currentUser) {
|
||||
var vm = this;
|
||||
|
||||
vm.MAP = {
|
||||
0: 'NA',
|
||||
1: 'Project Admin',
|
||||
2: 'Developer',
|
||||
3: 'Guest'
|
||||
};
|
||||
|
||||
vm.isOpen = false;
|
||||
vm.projectName = '';
|
||||
vm.publicity = 0;
|
||||
@ -35,6 +42,9 @@
|
||||
}
|
||||
|
||||
function listProjectSuccess(data, status) {
|
||||
data.forEach(function(data){
|
||||
data.role = vm.MAP[data.role_id];
|
||||
});
|
||||
vm.projects = data;
|
||||
}
|
||||
|
||||
|
@ -32,8 +32,8 @@
|
||||
<tbody>
|
||||
<tr ng-repeat="p in vm.projects">
|
||||
<td><a href="/ng/repository#/repositories?project_id=//p.ProjectId//&is_public=//p.Public//">//p.Name//</a></td>
|
||||
<td>N/A</td>
|
||||
<td>N/A</td>
|
||||
<td>//p.count//</td>
|
||||
<td>//p.role//</td>
|
||||
<td>//p.CreationTime | dateL : 'YYYY-MM-DD HH:mm:ss'//</td>
|
||||
<td><publicity-button is-public="p.Public" owned="p.OwnerId == vm.user.UserId" project-id="p.ProjectId"></publicity-button></td>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user