From 84d7307e289a8e4295a02ca8accf5aa6793eb1aa Mon Sep 17 00:00:00 2001 From: Nenad Strainovic Date: Sat, 21 Sep 2019 01:01:23 +0200 Subject: [PATCH] Use external_url if exists on Add Repo Command chart details page Signed-off-by: strainovic --- .../chart-detail/chart-detail.component.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.ts b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.ts index 52f2c0d4fe8..e3aeb300d6c 100644 --- a/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.ts +++ b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.ts @@ -44,12 +44,16 @@ export class ChartDetailComponent implements OnInit { ngOnInit(): void { this.systemInfoService.getSystemInfo() .subscribe(systemInfo => { - let scheme = 'http://'; this.systemInfo = systemInfo; - if (this.systemInfo.has_ca_root) { - scheme = 'https://'; + if (this.systemInfo.external_url) { + this.repoURL = `${this.systemInfo.external_url}`; + } else { + let scheme = 'http://'; + if (this.systemInfo.has_ca_root) { + scheme = 'https://'; + } + this.repoURL = `${scheme}${this.systemInfo.registry_url}`; } - this.repoURL = `${scheme}${this.systemInfo.registry_url}`; }, error => this.errorHandler.error(error)); this.refresh(); }