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

Merge branch 'dashboards' into 'main'

Dashboards

Closes #238, #240, and #241

See merge request !537
parents 08ea4846 b42d9823
No related branches found
No related tags found
1 merge request!537Dashboards
Pipeline #523814 passed with warnings
Showing
with 324 additions and 0 deletions
<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 />
Design Map 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 {
designMapApps,
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: designMapApps().map(navigation => ({navigation})),
gridClass: 'grid-col-12 tablet-lg:grid-col-8 grid-offset-1',
},
],
},
];
}
import {Routes} from '@angular/router';
const routes: Routes = [
{
loadComponent: () =>
import('./dashboard/app.component').then(com => com.AppComponent),
path: '',
},
{
loadComponent: () =>
import('./rtgm/app.component').then(com => com.AppComponent),
......
<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 />
National Crustal 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 {
navigation,
ncmApps,
} 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: ncmApps().map(navigation => ({navigation})),
gridClass: 'grid-col-12 tablet-lg:grid-col-8 grid-offset-1',
},
],
},
];
}
import {Routes} from '@angular/router';
const routes: Routes = [
{
loadComponent: () =>
import('./dashboard/app.component').then(com => com.AppComponent),
path: '',
},
{
loadComponent: () =>
import('./geophysical-profiles/app.component').then(
......
<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 />
Source 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 {
navigation,
sourceModelApps,
} 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: sourceModelApps().map(navigation => ({navigation})),
gridClass: 'grid-col-12 tablet-lg:grid-col-8 grid-offset-1',
},
],
},
];
}
......@@ -2,6 +2,11 @@ import {Routes} from '@angular/router';
/** Routes for source model applications */
const routes: Routes = [
{
loadComponent: () =>
import('./dashboard/app.component').then(com => com.AppComponent),
path: '',
},
// model maps application
{
loadComponent: () =>
......
......@@ -70,6 +70,8 @@ export interface DevHazardApplications {
* ERP design maps applications.
*/
export interface DesignMapsApplications {
/** Design map dashboard */
dashboard: Navigation;
rtgm: Navigation;
}
......@@ -105,6 +107,8 @@ export interface HazardApplications {
* NCM applications.
*/
export interface NcmApplications {
/** NCM dashboard */
dashboard: Navigation;
/** Geophysical profiles application */
geophysicalProfiles: Navigation;
}
......@@ -113,6 +117,8 @@ export interface NcmApplications {
* Source applications
*/
export interface SourceApplications {
/** Source model dashboard */
dashboard: Navigation;
/** Data mapping application */
data: Navigation;
/** Magnitude frequency distribution application */
......
......@@ -13,6 +13,11 @@ export function apps(): Applications {
routerLink: '/',
},
designMaps: {
dashboard: {
display: 'Design Maps Dashboard',
routerLink: '/designmaps',
showInDashboard: false,
},
rtgm: {
display: 'Risk-Targeted Ground Motion',
routerLink: '/designmaps/rtgm',
......@@ -57,6 +62,11 @@ export function apps(): Applications {
},
},
ncm: {
dashboard: {
display: 'NCM Dashboard',
routerLink: '/ncm',
showInDashboard: false,
},
geophysicalProfiles: {
display: 'NCM Geophysical Profiles',
routerLink: '/ncm/geophysical-profiles',
......@@ -67,6 +77,11 @@ export function apps(): Applications {
routerLink: '/services',
},
source: {
dashboard: {
display: 'Source Model Dashboard',
routerLink: '/source',
showInDashboard: false,
},
data: {
display: 'Model Maps',
routerLink: '/source/model-maps',
......
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