Merge pull request #5513 from ninjadq/hidden_chart_lib_without_chartmeseum

Hide the helmcharts tab when chart museum is not installed.
This commit is contained in:
Qian Deng 2018-08-03 05:41:06 -04:00 committed by GitHub
commit 0f519c9dc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 1 deletions

View File

@ -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;

View File

@ -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;
}
}

View File

@ -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">

View File

@ -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');