Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove helm chart UI #18099

Merged
merged 1 commit into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/portal/src/app/account/sign-in/sign-in.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,6 @@ export class SignInComponent implements AfterViewChecked, OnInit {

// App title
public get appTitle(): string {
if (
this.appConfigService.getConfig() &&
this.appConfigService.getConfig().with_admiral
) {
return 'APP_TITLE.VIC';
}

return 'APP_TITLE.VMW_HARBOR';
}

Expand Down
4 changes: 0 additions & 4 deletions src/portal/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ export class AppComponent {
this.initLanguage();
// Override page title
let key: string = 'APP_TITLE.HARBOR';
if (this.appConfigService.isIntegrationMode()) {
key = 'APP_TITLE.REG';
}

translate.get(key).subscribe((res: string) => {
const customSkinData: CustomStyle =
this.skinableConfig.getSkinConfig();
Expand Down
11 changes: 0 additions & 11 deletions src/portal/src/app/base/base.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,6 @@ const routes: Routes = [
projectResolver: ProjectRoutingResolver,
},
},
{
path: 'projects/:id/helm-charts',
canActivate: [MemberGuard],
resolve: {
projectResolver: ProjectRoutingResolver,
},
loadChildren: () =>
import(
'./project/helm-chart/helm-chart-detail/helm-chart-detail.module'
).then(m => m.HelmChartListModule),
},
],
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
{{ 'SIDE_NAV.DISTRIBUTIONS.NAME' | translate }}
</a>
<a
*ngIf="!withAdmiral"
clrVerticalNavLink
routerLink="/harbor/labels"
routerLinkActive="active">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,6 @@ export class HarborShellComponent implements OnInit, OnDestroy {
this.session.getCurrentUser().has_admin_role
);
}
public get withAdmiral(): boolean {
return this.appConfigService.getConfig().with_admiral;
}
// Open modal dialog
openModal(event: ModalEvent): void {
switch (event.modalName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h2 class="custom-h2 config-title">
type="button"
routerLink="security"
routerLinkActive="active">
{{ 'HELM_CHART.SECURITY' | translate }}
{{ 'CONFIG.SECURITY' | translate }}
</button>
</li>
<li role="presentation" class="nav-item">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@
<clr-dg-column>{{ 'PROJECT.ROLE' | translate }}</clr-dg-column>
<clr-dg-column>{{ 'PROJECT.TYPE' | translate }}</clr-dg-column>
<clr-dg-column>{{ 'PROJECT.REPO_COUNT' | translate }}</clr-dg-column>
<clr-dg-column *ngIf="withChartMuseum">{{
'PROJECT.CHART_COUNT' | translate
}}</clr-dg-column>
<clr-dg-column [clrDgSortBy]="'creation_time'">{{
'PROJECT.CREATION_TIME' | translate
}}</clr-dg-column>
Expand Down Expand Up @@ -83,7 +80,6 @@
projectTypeMap[p.registry_id ? 1 : 0] | translate
}}</clr-dg-cell>
<clr-dg-cell>{{ p.repo_count }}</clr-dg-cell>
<clr-dg-cell *ngIf="withChartMuseum">{{ p.chart_count }}</clr-dg-cell>
<clr-dg-cell>{{
p.creation_time | harborDatetime: 'short'
}}</clr-dg-cell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,6 @@ export class ListProjectComponent implements OnDestroy {
}
return false;
}

get withChartMuseum(): boolean {
return this.appConfigService.getConfig().with_chartmuseum;
}

public get isSystemAdmin(): boolean {
let account = this.session.getCurrentUser();
return account != null && account.has_admin_role;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,10 @@ export class CreateEditEndpointComponent
this.endpointService.getAdapters().subscribe(
adapters => {
this.adapterList = adapters || [];
if (!this.appConfigService.getConfig().with_chartmuseum) {
// disable helm-hub
for (let i = 0; i < this.adapterList.length; i++) {
if (this.adapterList[i] === HELM_HUB) {
this.adapterList.splice(i, 1);
}
// disable helm-hub
for (let i = 0; i < this.adapterList.length; i++) {
if (this.adapterList[i] === HELM_HUB) {
this.adapterList.splice(i, 1);
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,7 @@ <h3 class="modal-title">{{ headerTitle | translate }}</h3>
?.values
"
value="{{ value }}">
{{ value
}}{{
value === 'chart'
? ' (chartmuseum)'
: ''
}}
{{ value }}
</option>
</select>
</div>
Expand Down Expand Up @@ -610,7 +605,6 @@ <h3 class="modal-title">{{ headerTitle | translate }}</h3>
| translate
}}
</div>
<div>{{ 'REPLICATION.NOTE' | translate }}</div>
</clr-tooltip-content>
</clr-tooltip>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export class ReplicationComponent implements OnInit, OnDestroy {
@Input() projectId: number | string;
@Input() projectName: string;
@Input() isSystemAdmin: boolean;
@Input() withAdmiral: boolean;
@Input() withReplicationJob: boolean;
@Input() hasCreateReplicationPermission: boolean;
@Input() hasUpdateReplicationPermission: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ <h2 class="custom-h2">{{ 'SIDE_NAV.SYSTEM_MGMT.REPLICATION' | translate }}</h2>
<hbr-replication
[withReplicationJob]="true"
[isSystemAdmin]="isSystemAdmin"
[withAdmiral]="withAdmiral"
(goToRegistry)="goRegistry()"
[hasCreateReplicationPermission]="true"
[hasUpdateReplicationPermission]="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,4 @@ export class TotalReplicationPageComponent implements OnInit, OnDestroy {
let account = this.session.getCurrentUser();
return account != null && account.has_admin_role;
}

get withAdmiral(): boolean {
return this.appConfigService.getConfig().with_admiral;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ export enum PermissionsKinds {

export enum Resource {
REPO = 'repository',
HELM_CHART = 'helm-chart',
HELM_CHART_VERSION = 'helm-chart-version',
ARTIFACT = 'artifact',
}

Expand Down Expand Up @@ -116,31 +114,6 @@ export const INITIAL_ACCESSES: FrontAccess[] = [
action: 'stop',
checked: true,
},
{
resource: 'helm-chart',
action: 'read',
checked: true,
},
{
resource: 'helm-chart-version',
action: 'create',
checked: true,
},
{
resource: 'helm-chart-version',
action: 'delete',
checked: true,
},
{
resource: 'helm-chart-version-label',
action: 'create',
checked: true,
},
{
resource: 'helm-chart-version-label',
action: 'delete',
checked: true,
},
];

export const ACTION_RESOURCE_I18N_MAP = {
Expand All @@ -151,11 +124,8 @@ export const ACTION_RESOURCE_I18N_MAP = {
delete: 'SYSTEM_ROBOT.DELETE',
repository: 'SYSTEM_ROBOT.REPOSITORY',
artifact: 'SYSTEM_ROBOT.ARTIFACT',
'helm-chart': 'SYSTEM_ROBOT.HELM',
'helm-chart-version': 'SYSTEM_ROBOT.HELM_VERSION',
tag: 'REPLICATION.TAG',
'artifact-label': 'SYSTEM_ROBOT.ARTIFACT_LABEL',
'helm-chart-version-label': 'SYSTEM_ROBOT.HELM_LABEL',
scan: 'SYSTEM_ROBOT.SCAN',
'scanner-pull': 'SYSTEM_ROBOT.SCANNER_PULL',
stop: 'SYSTEM_ROBOT.STOP',
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading