mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
Hide the helmcharts tab when chart museum is not installed.
Add parameter for receving chartmuseum installation state. Using that to decide the presentation of helmchart tab in project.
This commit is contained in:
parent
a7fc977bc3
commit
66d85a12b4
@ -201,6 +201,7 @@ export interface SystemInfo {
|
||||
with_clair?: boolean;
|
||||
with_notary?: boolean;
|
||||
with_admiral?: boolean;
|
||||
with_chartmuseum?: boolean;
|
||||
admiral_endpoint?: string;
|
||||
auth_mode?: string;
|
||||
registry_url?: string;
|
||||
|
@ -28,6 +28,7 @@ export class AppConfig {
|
||||
next_scan_all: number;
|
||||
registry_storage_provider_name: string;
|
||||
read_only: boolean;
|
||||
with_chartmuseum: boolean;
|
||||
|
||||
constructor() {
|
||||
// Set default value
|
||||
@ -48,5 +49,6 @@ export class AppConfig {
|
||||
this.next_scan_all = 0;
|
||||
this.registry_storage_provider_name = "";
|
||||
this.read_only = false;
|
||||
this.with_chartmuseum = false;
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" routerLink="repositories" routerLinkActive="active">{{'PROJECT_DETAIL.REPOSITORIES' | translate}}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<li *ngIf="withHelmChart" class="nav-item">
|
||||
<a class="nav-link" routerLink="helm-charts" routerLinkActive="active">{{'PROJECT_DETAIL.HELMCHART' | translate}}</a>
|
||||
</li>
|
||||
<li class="nav-item" *ngIf="isSystemAdmin || isMember">
|
||||
|
@ -67,6 +67,10 @@ export class ProjectDetailComponent {
|
||||
return this.appConfigService.getConfig().with_admiral;
|
||||
}
|
||||
|
||||
public get withHelmChart(): boolean {
|
||||
return this.appConfigService.getConfig().with_chartmuseum;
|
||||
}
|
||||
|
||||
backToProject(): void {
|
||||
if (window.sessionStorage) {
|
||||
window.sessionStorage.setItem('fromDetails', 'true');
|
||||
|
Loading…
Reference in New Issue
Block a user