Remove the Replication tab under project view

Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
This commit is contained in:
FangyuanCheng 2019-04-16 17:49:06 +08:00
parent ea6ca2b8cc
commit b11c95316f
3 changed files with 1 additions and 12 deletions

View File

@ -36,7 +36,6 @@ import { TotalReplicationPageComponent } from './replication/total-replication/t
import { ReplicationTasksPageComponent } from './replication/replication-tasks-page/replication-tasks-page.component';
import { DestinationPageComponent } from './replication/destination/destination-page.component';
import { ReplicationPageComponent } from './replication/replication-page.component';
import { AuditLogComponent } from './log/audit-log.component';
import { LogPageComponent } from './log/log-page.component';
@ -177,10 +176,6 @@ const harborRoutes: Routes = [
path: 'repositories/:repo/tags',
component: TagRepositoryComponent,
},
{
path: 'replications',
component: ReplicationPageComponent,
},
{
path: 'members',
component: MemberComponent

View File

@ -13,9 +13,6 @@
<li class="nav-item" *ngIf="hasMemberListPermission">
<a class="nav-link" routerLink="members" routerLinkActive="active">{{'PROJECT_DETAIL.USERS' | translate}}</a>
</li>
<li class="nav-item" *ngIf="hasReplicationListPermission">
<a class="nav-link" routerLink="replications" routerLinkActive="active">{{'PROJECT_DETAIL.REPLICATION' | translate}}</a>
</li>
<li class="nav-item" *ngIf="(hasLabelListPermission && hasLabelCreatePermission) && !withAdmiral">
<a class="nav-link" routerLink="labels" routerLinkActive="active">{{'PROJECT_DETAIL.LABELS' | translate}}</a>
</li>

View File

@ -38,7 +38,6 @@ export class ProjectDetailComponent implements OnInit {
hasHelmChartsListPermission: boolean;
hasRepositoryListPermission: boolean;
hasMemberListPermission: boolean;
hasReplicationListPermission: boolean;
hasLabelListPermission: boolean;
hasLabelCreatePermission: boolean;
hasLogListPermission: boolean;
@ -72,8 +71,6 @@ export class ProjectDetailComponent implements OnInit {
USERSTATICPERMISSION.CONFIGURATION.KEY, USERSTATICPERMISSION.CONFIGURATION.VALUE.READ));
permissionsList.push(this.userPermissionService.getPermission(projectId,
USERSTATICPERMISSION.MEMBER.KEY, USERSTATICPERMISSION.MEMBER.VALUE.LIST));
permissionsList.push(this.userPermissionService.getPermission(projectId,
USERSTATICPERMISSION.REPLICATION.KEY, USERSTATICPERMISSION.REPLICATION.VALUE.LIST));
permissionsList.push(this.userPermissionService.getPermission(projectId,
USERSTATICPERMISSION.LABEL.KEY, USERSTATICPERMISSION.LABEL.VALUE.LIST));
permissionsList.push(this.userPermissionService.getPermission(projectId,
@ -85,7 +82,7 @@ export class ProjectDetailComponent implements OnInit {
permissionsList.push(this.userPermissionService.getPermission(projectId,
USERSTATICPERMISSION.LABEL.KEY, USERSTATICPERMISSION.LABEL.VALUE.CREATE));
forkJoin(...permissionsList).subscribe(Rules => {
[this.hasLogListPermission, this.hasConfigurationListPermission, this.hasMemberListPermission, this.hasReplicationListPermission
[this.hasLogListPermission, this.hasConfigurationListPermission, this.hasMemberListPermission,
, this.hasLabelListPermission, this.hasRepositoryListPermission, this.hasHelmChartsListPermission, this.hasRobotListPermission
, this.hasLabelCreatePermission] = Rules;