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

add dashboard

parent a9447958
No related branches found
No related tags found
1 merge request!539Dev dashboards
Showing
with 310 additions and 1 deletion
<nshmp-lib-ng-template #template [navigationList]="navigationList" [title]="">
<!-- Dashboard -->
<nshmp-lib-ng-dashboard [sections]="sections">
<nshmp-lib-ng-dashboard-title>
USGS Development
<br />
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 {
devGmmApps,
devNavigation,
} 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 = devNavigation();
sections: ApplicationSections[] = [
{
gridClass: 'grid-col-10',
sections: [
{
applications: devGmmApps().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 dev GMM applications */
const routes: Routes = [
{
loadComponent: () =>
import('./dashboard/app.component').then(com => com.AppComponent),
path: '',
},
{
loadComponent: () =>
import('./hanging-wall-effects/app.component').then(
......
<nshmp-lib-ng-template #template [navigationList]="navigationList" [title]="">
<!-- Dashboard -->
<nshmp-lib-ng-dashboard [sections]="sections">
<nshmp-lib-ng-dashboard-title>
USGS Development
<br />
Earthquake Hazard Toolbox:
<br />
Hazard 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 {
devHazardApps,
devNavigation,
} 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 = devNavigation();
sections: ApplicationSections[] = [
{
gridClass: 'grid-col-10',
sections: [
{
applications: devHazardApps().map(navigation => ({navigation})),
gridClass: 'grid-col-12 tablet-lg:grid-col-8 grid-offset-1',
},
],
},
];
}
......@@ -5,6 +5,11 @@ import {DynamicHazardCompareGuard} from './dynamic-compare/guards/dynamic-hazard
/** Routes for dev hazard applications */
const routes: Routes = [
{
loadComponent: () =>
import('./dashboard/app.component').then(com => com.AppComponent),
path: '',
},
{
canActivate: [() => inject(DynamicHazardCompareGuard).canActivate()],
loadComponent: () =>
......
<nshmp-lib-ng-template #template [navigationList]="navigationList" [title]="">
<!-- Dashboard -->
<nshmp-lib-ng-dashboard [sections]="sections">
<nshmp-lib-ng-dashboard-title>
USGS Development
<br />
Earthquake Hazard Toolbox:
<br />
Math 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 {
devMathApps,
devNavigation,
} 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 = devNavigation();
sections: ApplicationSections[] = [
{
gridClass: 'grid-col-10',
sections: [
{
applications: devMathApps().map(navigation => ({navigation})),
gridClass: 'grid-col-12 tablet-lg:grid-col-8 grid-offset-1',
},
],
},
];
}
......@@ -42,5 +42,5 @@ export class AppComponent {
/** Navigation list for menu */
navigationList = devNavigation();
/** Application title */
title = devApps().exceedanceExplorer.display;
title = devApps().math.exceedanceExplorer.display;
}
......@@ -2,6 +2,11 @@ import {Routes} from '@angular/router';
/** Routes for math applications */
const routes: Routes = [
{
loadComponent: () =>
import('./dashboard/app.component').then(com => com.AppComponent),
path: '',
},
{
loadComponent: () =>
import('./exceedance-explorer/app.component').then(
......
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