From a2f34e1bd3ff56ba60d0add255aec9eff6ee1882 Mon Sep 17 00:00:00 2001
From: Brandon Clayton <bclayton@usgs.gov>
Date: Tue, 26 Nov 2024 15:08:16 -0700
Subject: [PATCH 1/4] add design map dashboard

---
 .../designmaps/dashboard/app.component.html   | 19 ++++++++
 .../designmaps/dashboard/app.component.scss   |  0
 .../dashboard/app.component.spec.ts           | 30 ++++++++++++
 .../app/designmaps/dashboard/app.component.ts | 47 +++++++++++++++++++
 .../src/app/designmaps/design-maps.routes.ts  |  5 ++
 5 files changed, 101 insertions(+)
 create mode 100644 projects/nshmp-apps/src/app/designmaps/dashboard/app.component.html
 create mode 100644 projects/nshmp-apps/src/app/designmaps/dashboard/app.component.scss
 create mode 100644 projects/nshmp-apps/src/app/designmaps/dashboard/app.component.spec.ts
 create mode 100644 projects/nshmp-apps/src/app/designmaps/dashboard/app.component.ts

diff --git a/projects/nshmp-apps/src/app/designmaps/dashboard/app.component.html b/projects/nshmp-apps/src/app/designmaps/dashboard/app.component.html
new file mode 100644
index 000000000..1a7c48e65
--- /dev/null
+++ b/projects/nshmp-apps/src/app/designmaps/dashboard/app.component.html
@@ -0,0 +1,19 @@
+<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>
diff --git a/projects/nshmp-apps/src/app/designmaps/dashboard/app.component.scss b/projects/nshmp-apps/src/app/designmaps/dashboard/app.component.scss
new file mode 100644
index 000000000..e69de29bb
diff --git a/projects/nshmp-apps/src/app/designmaps/dashboard/app.component.spec.ts b/projects/nshmp-apps/src/app/designmaps/dashboard/app.component.spec.ts
new file mode 100644
index 000000000..10ce8a002
--- /dev/null
+++ b/projects/nshmp-apps/src/app/designmaps/dashboard/app.component.spec.ts
@@ -0,0 +1,30 @@
+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();
+  });
+});
diff --git a/projects/nshmp-apps/src/app/designmaps/dashboard/app.component.ts b/projects/nshmp-apps/src/app/designmaps/dashboard/app.component.ts
new file mode 100644
index 000000000..fbc4ee08a
--- /dev/null
+++ b/projects/nshmp-apps/src/app/designmaps/dashboard/app.component.ts
@@ -0,0 +1,47 @@
+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',
+        },
+      ],
+    },
+  ];
+}
diff --git a/projects/nshmp-apps/src/app/designmaps/design-maps.routes.ts b/projects/nshmp-apps/src/app/designmaps/design-maps.routes.ts
index f6c3e3cbd..ab715b048 100644
--- a/projects/nshmp-apps/src/app/designmaps/design-maps.routes.ts
+++ b/projects/nshmp-apps/src/app/designmaps/design-maps.routes.ts
@@ -1,6 +1,11 @@
 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),
-- 
GitLab


From 5f93919bf3b1430eb54434ad9fceea28de910ae0 Mon Sep 17 00:00:00 2001
From: Brandon Clayton <bclayton@usgs.gov>
Date: Tue, 26 Nov 2024 15:08:28 -0700
Subject: [PATCH 2/4] add ncm dashboard

---
 .../src/app/ncm/dashboard/app.component.html  | 19 ++++++++
 .../src/app/ncm/dashboard/app.component.scss  |  0
 .../app/ncm/dashboard/app.component.spec.ts   | 30 ++++++++++++
 .../src/app/ncm/dashboard/app.component.ts    | 47 +++++++++++++++++++
 projects/nshmp-apps/src/app/ncm/ncm.routes.ts |  5 ++
 5 files changed, 101 insertions(+)
 create mode 100644 projects/nshmp-apps/src/app/ncm/dashboard/app.component.html
 create mode 100644 projects/nshmp-apps/src/app/ncm/dashboard/app.component.scss
 create mode 100644 projects/nshmp-apps/src/app/ncm/dashboard/app.component.spec.ts
 create mode 100644 projects/nshmp-apps/src/app/ncm/dashboard/app.component.ts

diff --git a/projects/nshmp-apps/src/app/ncm/dashboard/app.component.html b/projects/nshmp-apps/src/app/ncm/dashboard/app.component.html
new file mode 100644
index 000000000..35b0fc397
--- /dev/null
+++ b/projects/nshmp-apps/src/app/ncm/dashboard/app.component.html
@@ -0,0 +1,19 @@
+<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>
diff --git a/projects/nshmp-apps/src/app/ncm/dashboard/app.component.scss b/projects/nshmp-apps/src/app/ncm/dashboard/app.component.scss
new file mode 100644
index 000000000..e69de29bb
diff --git a/projects/nshmp-apps/src/app/ncm/dashboard/app.component.spec.ts b/projects/nshmp-apps/src/app/ncm/dashboard/app.component.spec.ts
new file mode 100644
index 000000000..10ce8a002
--- /dev/null
+++ b/projects/nshmp-apps/src/app/ncm/dashboard/app.component.spec.ts
@@ -0,0 +1,30 @@
+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();
+  });
+});
diff --git a/projects/nshmp-apps/src/app/ncm/dashboard/app.component.ts b/projects/nshmp-apps/src/app/ncm/dashboard/app.component.ts
new file mode 100644
index 000000000..7a677f638
--- /dev/null
+++ b/projects/nshmp-apps/src/app/ncm/dashboard/app.component.ts
@@ -0,0 +1,47 @@
+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',
+        },
+      ],
+    },
+  ];
+}
diff --git a/projects/nshmp-apps/src/app/ncm/ncm.routes.ts b/projects/nshmp-apps/src/app/ncm/ncm.routes.ts
index b339f3475..6db1834d1 100644
--- a/projects/nshmp-apps/src/app/ncm/ncm.routes.ts
+++ b/projects/nshmp-apps/src/app/ncm/ncm.routes.ts
@@ -1,6 +1,11 @@
 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(
-- 
GitLab


From 9fce40258e39fee931816aba0a8d4403108fb0be Mon Sep 17 00:00:00 2001
From: Brandon Clayton <bclayton@usgs.gov>
Date: Tue, 26 Nov 2024 15:08:39 -0700
Subject: [PATCH 3/4] add source model dashboard

---
 .../app/source/dashboard/app.component.html   | 19 ++++++++
 .../app/source/dashboard/app.component.scss   |  0
 .../source/dashboard/app.component.spec.ts    | 30 ++++++++++++
 .../src/app/source/dashboard/app.component.ts | 47 +++++++++++++++++++
 .../src/app/source/source.routes.ts           |  5 ++
 5 files changed, 101 insertions(+)
 create mode 100644 projects/nshmp-apps/src/app/source/dashboard/app.component.html
 create mode 100644 projects/nshmp-apps/src/app/source/dashboard/app.component.scss
 create mode 100644 projects/nshmp-apps/src/app/source/dashboard/app.component.spec.ts
 create mode 100644 projects/nshmp-apps/src/app/source/dashboard/app.component.ts

diff --git a/projects/nshmp-apps/src/app/source/dashboard/app.component.html b/projects/nshmp-apps/src/app/source/dashboard/app.component.html
new file mode 100644
index 000000000..a39713d9b
--- /dev/null
+++ b/projects/nshmp-apps/src/app/source/dashboard/app.component.html
@@ -0,0 +1,19 @@
+<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>
diff --git a/projects/nshmp-apps/src/app/source/dashboard/app.component.scss b/projects/nshmp-apps/src/app/source/dashboard/app.component.scss
new file mode 100644
index 000000000..e69de29bb
diff --git a/projects/nshmp-apps/src/app/source/dashboard/app.component.spec.ts b/projects/nshmp-apps/src/app/source/dashboard/app.component.spec.ts
new file mode 100644
index 000000000..10ce8a002
--- /dev/null
+++ b/projects/nshmp-apps/src/app/source/dashboard/app.component.spec.ts
@@ -0,0 +1,30 @@
+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();
+  });
+});
diff --git a/projects/nshmp-apps/src/app/source/dashboard/app.component.ts b/projects/nshmp-apps/src/app/source/dashboard/app.component.ts
new file mode 100644
index 000000000..a19b283ac
--- /dev/null
+++ b/projects/nshmp-apps/src/app/source/dashboard/app.component.ts
@@ -0,0 +1,47 @@
+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',
+        },
+      ],
+    },
+  ];
+}
diff --git a/projects/nshmp-apps/src/app/source/source.routes.ts b/projects/nshmp-apps/src/app/source/source.routes.ts
index 36e53d53b..5054debe4 100644
--- a/projects/nshmp-apps/src/app/source/source.routes.ts
+++ b/projects/nshmp-apps/src/app/source/source.routes.ts
@@ -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: () =>
-- 
GitLab


From b42d9823d9a026eebf035033360bbfc5b3526d0c Mon Sep 17 00:00:00 2001
From: Brandon Clayton <bclayton@usgs.gov>
Date: Tue, 26 Nov 2024 15:08:48 -0700
Subject: [PATCH 4/4] add dashboards

---
 .../src/shared/models/applications.model.ts       |  6 ++++++
 .../src/shared/utils/applications.utils.ts        | 15 +++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/projects/nshmp-apps/src/shared/models/applications.model.ts b/projects/nshmp-apps/src/shared/models/applications.model.ts
index b5f124407..e308e0bea 100644
--- a/projects/nshmp-apps/src/shared/models/applications.model.ts
+++ b/projects/nshmp-apps/src/shared/models/applications.model.ts
@@ -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 */
diff --git a/projects/nshmp-apps/src/shared/utils/applications.utils.ts b/projects/nshmp-apps/src/shared/utils/applications.utils.ts
index 2bcd035fd..64c22fdcd 100644
--- a/projects/nshmp-apps/src/shared/utils/applications.utils.ts
+++ b/projects/nshmp-apps/src/shared/utils/applications.utils.ts
@@ -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',
-- 
GitLab