Skip to content
Snippets Groups Projects
Commit 14a0536c authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

Merge branch 'services' into 'main'

fix url

See merge request !554
parents da8a8db6 17182852
No related branches found
No related tags found
1 merge request!554fix url
Pipeline #568742 passed with warnings
......@@ -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>
......
......@@ -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: [],
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment