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

Merge branch 'gmm-dashboard' into 'main'

gmm dashboard

Closes #239

See merge request !536
parents 7738e85f 04354725
No related branches found
Tags 1.1.2
1 merge request!536gmm dashboard
Pipeline #523776 passed with warnings
<nshmp-lib-ng-template #template [navigationList]="navigationList" [title]="">
<!-- Dashboard -->
<nshmp-lib-ng-dashboard [sections]="sections">
<nshmp-lib-ng-dashboard-title>
USGS Earthquake Hazard Toolbox:
<br />
Ground Motion Model Applications
</nshmp-lib-ng-dashboard-title>
<nshmp-lib-ng-dashboard-description />
</nshmp-lib-ng-dashboard>
<!-- About page -->
<nshmp-lib-ng-about-page>
<nshmp-lib-ng-about-content
[showSavingSettingPanel]="false"
[showUsingApplicationPanel]="false"
/>
</nshmp-lib-ng-about-page>
</nshmp-lib-ng-template>
import {provideHttpClient} from '@angular/common/http';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {provideNoopAnimations} from '@angular/platform-browser/animations';
import {provideRouter} from '@angular/router';
import {AppComponent} from './app.component';
describe('AppComponent', () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [AppComponent],
providers: [
provideHttpClient(),
provideNoopAnimations(),
provideRouter([]),
],
}).compileComponents();
fixture = TestBed.createComponent(AppComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import {Component} from '@angular/core';
import {
NshmpLibNgAboutContentComponent,
NshmpLibNgAboutPageComponent,
} from '@ghsc/nshmp-lib-ng/about';
import {
ApplicationSections,
NshmpLibNgDashboardComponent,
NshmpLibNgDashboardDescriptionComponent,
NshmpLibNgDashboardTitleComponent,
NshmpLibNgTemplateComponent,
} from '@ghsc/nshmp-lib-ng/nshmp';
import {
gmmApps,
navigation,
} from 'projects/nshmp-apps/src/shared/utils/navigation.utils';
@Component({
imports: [
NshmpLibNgTemplateComponent,
NshmpLibNgAboutPageComponent,
NshmpLibNgDashboardComponent,
NshmpLibNgDashboardTitleComponent,
NshmpLibNgDashboardDescriptionComponent,
NshmpLibNgAboutContentComponent,
],
selector: 'app-app',
standalone: true,
styleUrl: './app.component.scss',
templateUrl: './app.component.html',
})
export class AppComponent {
/** Navigation list for menu */
navigationList = navigation();
sections: ApplicationSections[] = [
{
gridClass: 'grid-col-10',
sections: [
{
applications: gmmApps().map(navigation => ({navigation})),
gridClass: 'grid-col-12 tablet-lg:grid-col-8 grid-offset-1',
},
],
},
];
}
...@@ -2,6 +2,11 @@ import {Routes} from '@angular/router'; ...@@ -2,6 +2,11 @@ import {Routes} from '@angular/router';
/** GMM routes */ /** GMM routes */
const routes: Routes = [ const routes: Routes = [
{
loadComponent: () =>
import('./dashboard/app.component').then(com => com.AppComponent),
path: '',
},
{ {
loadComponent: () => loadComponent: () =>
import('./distance/app.component').then(com => com.AppComponent), import('./distance/app.component').then(com => com.AppComponent),
......
...@@ -77,6 +77,8 @@ export interface DesignMapsApplications { ...@@ -77,6 +77,8 @@ export interface DesignMapsApplications {
* GMM applications. * GMM applications.
*/ */
export interface GmmApplications { export interface GmmApplications {
/** GMM dashboard */
dashboard: Navigation;
/** Ground motion vs. distance application */ /** Ground motion vs. distance application */
distance: Navigation; distance: Navigation;
/** Ground motion vs magnitude application */ /** Ground motion vs magnitude application */
......
...@@ -19,6 +19,11 @@ export function apps(): Applications { ...@@ -19,6 +19,11 @@ export function apps(): Applications {
}, },
}, },
gmm: { gmm: {
dashboard: {
display: 'GMM Dashboard',
routerLink: '/gmm',
showInDashboard: false,
},
distance: { distance: {
display: 'Ground Motion vs. Distance', display: 'Ground Motion vs. Distance',
routerLink: '/gmm/distance', routerLink: '/gmm/distance',
......
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