diff --git a/projects/nshmp-ws/src/app/services/components/content/content.component.html b/projects/nshmp-ws/src/app/services/components/content/content.component.html index a7e49548d5b005aeaf999d2048f4389599c96389..29768740629c63600e1f19969a96d8ccb5ad4d3c 100644 --- a/projects/nshmp-ws/src/app/services/components/content/content.component.html +++ b/projects/nshmp-ws/src/app/services/components/content/content.component.html @@ -115,23 +115,13 @@ </h4> <mat-nav-list> @for (app of serviceGroup.applicationsUsedIn; track app) { - @if (serviceGroup.isHref) { - <a - mat-list-item - [href]="app.routerLink" - target="_blank" - > - {{ app.display }} - </a> - } @else { - <a - mat-list-item - [routerLink]="app.routerLink" - target="_blank" - > - {{ app.display }} - </a> - } + <a + mat-list-item + [href]="baseUrl + app.routerLink" + target="_blank" + > + {{ app.display }} + </a> } </mat-nav-list> </div> diff --git a/projects/nshmp-ws/src/app/services/components/content/content.component.ts b/projects/nshmp-ws/src/app/services/components/content/content.component.ts index d016f9e085d09fe6945b786c867ab4412354dc4b..bb9e7d051ea10179dd059d6370a975fdbc2df7cf 100644 --- a/projects/nshmp-ws/src/app/services/components/content/content.component.ts +++ b/projects/nshmp-ws/src/app/services/components/content/content.component.ts @@ -16,7 +16,7 @@ import { MatSidenavContainer, MatSidenavContent, } from '@angular/material/sidenav'; -import {ActivatedRoute, Router, RouterLink} from '@angular/router'; +import {ActivatedRoute, Router} from '@angular/router'; import {HazardService} from '@ghsc/nshmp-lib-ng/hazard'; import {NshmpService} from '@ghsc/nshmp-lib-ng/nshmp'; import {NshmpTemplateService} from '@ghsc/nshmp-template'; @@ -60,7 +60,6 @@ const APPS = apps(); MatCardSubtitle, MatCardContent, MatDivider, - RouterLink, AsyncPipe, ], selector: 'app-content', @@ -126,12 +125,7 @@ export class ContentComponent implements AfterViewInit { apps().hazard.dynamic, apps().hazard.disagg, apps().gmm.spectra, - ].map(nav => { - return { - ...nav, - routerLink: `${this.baseUrl}${nav.routerLink}`, - }; - }), + ], applicationUsedInLabel: 'Main Applications', id: ServiceGroupId.TOOLBOX, images: [], diff --git a/projects/nshmp-ws/src/app/swagger/app.component.ts b/projects/nshmp-ws/src/app/swagger/app.component.ts index db0a5399263dbdbbd1585ad3eea70dda5937368f..b72bdc11b8b2a2df9a40f3371aa2ab0370b98d92 100644 --- a/projects/nshmp-ws/src/app/swagger/app.component.ts +++ b/projects/nshmp-ws/src/app/swagger/app.component.ts @@ -80,10 +80,12 @@ export class AppComponent implements OnInit { if (spec && spec.paths) { const newPaths: Record<string, string> = {}; // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - Object.entries(spec.paths).forEach( - ([path, value]) => - (newPaths[contextPath + path] = value as string), - ); + Object.entries(spec.paths).forEach(([path, value]) => { + const servicePath = path.includes(contextPath) + ? path + : `${contextPath}${path}`; + newPaths[servicePath] = value as string; + }); spec.paths = newPaths; } oriAction(...args);