Unverified Commit 285d3e1e authored by Will Sun's avatar Will Sun Committed by GitHub
Browse files

Merge pull request #9189 from strainovic/patch-1

Use external_url if exists on Add Repo Command chart details page
parents aeaf3a12 84d7307e
......@@ -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();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment