Navigation Menu

Skip to content

Commit

Permalink
Merge pull request goharbor#9189 from strainovic/patch-1
Browse files Browse the repository at this point in the history
Use external_url if exists on Add Repo Command chart details page
  • Loading branch information
AllForNothing committed Oct 15, 2019
2 parents aeaf3a1 + 84d7307 commit 285d3e1
Showing 1 changed file with 8 additions and 4 deletions.
Expand Up @@ -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();
}
Expand Down

0 comments on commit 285d3e1

Please sign in to comment.