diff --git a/projects/nshmp-apps/src/shared/models/applications.model.ts b/projects/nshmp-apps/src/shared/models/applications.model.ts index e308e0beaf0deae6f01015b312c107283b61c787..001335a719662706812db148de6bc24cd901cd2f 100644 --- a/projects/nshmp-apps/src/shared/models/applications.model.ts +++ b/projects/nshmp-apps/src/shared/models/applications.model.ts @@ -26,6 +26,8 @@ export interface Applications { export interface AwsApplications { /** Check hazard jobs application */ checkHazJobs: Navigation; + /** Dashboard */ + dashboard: Navigation; /** Hazard run job history application */ hazJobHistory: Navigation; /** Submit hazard run jobs application */ @@ -38,22 +40,36 @@ export interface AwsApplications { * Development applications navigation config. */ export interface DevApplications { - /** AWS applications */ - aws: AwsApplications; /** Dev dashboard */ dashboard: Navigation; - /** Exceedance explorer applications */ - exceedanceExplorer: Navigation; /** Dev GMM applications */ gmm: DevGmmApplications; /** Dev hazard applications */ hazard: DevHazardApplications; + /** Dev math applications */ + math: DevMathApplications; +} + +export interface DevMathApplications { + /** Math dashboard */ + dashboard: Navigation; + /** Exceedance explorer applications */ + exceedanceExplorer: Navigation; +} + +export interface InternalApplications { + /** AWS applications */ + aws: AwsApplications; + /** Internal dashboard */ + dashboard: Navigation; } /** * Development GMM applications. */ export interface DevGmmApplications { + /** Dev GMM dashboard */ + dashboard: Navigation; /** Hanging wall effects application */ hangingWallEffects: Navigation; } @@ -62,6 +78,8 @@ export interface DevGmmApplications { * Development hazard applications. */ export interface DevHazardApplications { + /** Dev harad dashboard */ + dashboard: Navigation; /** Dynamic compare hazard applicaiton */ dynamicCompare: Navigation; } diff --git a/projects/nshmp-apps/src/shared/utils/applications.utils.ts b/projects/nshmp-apps/src/shared/utils/applications.utils.ts index 64c22fdcd6ab4d1e8cf5b1b30363bd097b8fbc53..1cbaa5e1738cb4150beef255ffe59da324529849 100644 --- a/projects/nshmp-apps/src/shared/utils/applications.utils.ts +++ b/projects/nshmp-apps/src/shared/utils/applications.utils.ts @@ -1,4 +1,8 @@ -import {Applications, DevApplications} from '../models/applications.model'; +import { + Applications, + DevApplications, + InternalApplications, +} from '../models/applications.model'; /** Main application name */ export const TOOLBOX_NAME = 'USGS Earthquake Hazard Toolbox'; @@ -103,43 +107,78 @@ export function apps(): Applications { */ export function devApps(): DevApplications { return { - aws: { - checkHazJobs: { - display: 'Check nshmp-haz Jobs', - routerLink: '/dev/aws/check-haz-jobs', - }, - hazJobHistory: { - display: 'nshmp-haz Job History', - routerLink: '/dev/aws/haz-job-history', - }, - submitHazJobs: { - display: 'Submit nshmp-haz Jobs', - routerLink: '/dev/aws/submit-haz-jobs', - }, - terminateHazJobs: { - display: 'Terminate nshmp-haz Jobs', - routerLink: '/dev/aws/terminate-haz-jobs', - }, - }, dashboard: { display: 'Development Dashboard', routerLink: '/dev', }, - exceedanceExplorer: { - display: 'Exceedance Explorer', - routerLink: '/dev/math/exceedance-explorer', - }, gmm: { + dashboard: { + display: 'Development GMM Dashboard', + routerLink: '/dev/gmm', + showInDashboard: false, + }, hangingWallEffects: { display: 'Hanging Wall Effects', routerLink: '/dev/gmm/hanging-wall-effects', }, }, hazard: { + dashboard: { + display: 'Development Hazard Dashboard', + routerLink: '/dev/hazard', + showInDashboard: false, + }, dynamicCompare: { display: 'Dynamic Hazard Compare', routerLink: '/dev/hazard/dynamic-compare', }, }, + math: { + dashboard: { + display: 'Development Math Dashboard', + routerLink: '/dev/math', + showInDashboard: false, + }, + exceedanceExplorer: { + display: 'Exceedance Explorer', + routerLink: '/dev/math/exceedance-explorer', + }, + }, + }; +} + +/** + * Returns all the dev application info. + */ +export function internalApps(): InternalApplications { + return { + aws: { + dashboard: { + display: 'Internal AWS Dashboard', + routerLink: '/internal/aws', + showInDashboard: false, + }, + // eslint-disable-next-line sort-keys-fix/sort-keys-fix + checkHazJobs: { + display: 'Check nshmp-haz Jobs', + routerLink: '/internal/aws/check-haz-jobs', + }, + hazJobHistory: { + display: 'nshmp-haz Job History', + routerLink: '/internal/aws/haz-job-history', + }, + submitHazJobs: { + display: 'Submit nshmp-haz Jobs', + routerLink: '/internal/aws/submit-haz-jobs', + }, + terminateHazJobs: { + display: 'Terminate nshmp-haz Jobs', + routerLink: '/internal/aws/terminate-haz-jobs', + }, + }, + dashboard: { + display: 'Internal Dashboard', + routerLink: '/internal', + }, }; } diff --git a/projects/nshmp-apps/src/shared/utils/navigation.utils.ts b/projects/nshmp-apps/src/shared/utils/navigation.utils.ts index d9a6082add1f324bb52489fe355d69373d4106d2..9b66d1f3a6057e080f71963394e85e3a6e284ac2 100644 --- a/projects/nshmp-apps/src/shared/utils/navigation.utils.ts +++ b/projects/nshmp-apps/src/shared/utils/navigation.utils.ts @@ -4,6 +4,7 @@ import * as ApplicationsUtils from './applications.utils'; const APPS = ApplicationsUtils.apps(); const DEV_APPS = ApplicationsUtils.devApps(); +const INTERNAL_APPS = ApplicationsUtils.internalApps(); /** * Returns the list of design map application. @@ -12,11 +13,12 @@ export function designMapApps(): Navigation[] { return Object.values(APPS.designMaps) as Navigation[]; } -/** - * Returns the list of AWS applications. - */ -export function devAwsApps(): Navigation[] { - return Object.values(DEV_APPS.aws) as Navigation[]; +export function devGmmApps(): Navigation[] { + return Object.values(DEV_APPS.gmm) as Navigation[]; +} + +export function devHazardApps(): Navigation[] { + return Object.values(DEV_APPS.hazard) as Navigation[]; } /** @@ -24,23 +26,35 @@ export function devAwsApps(): Navigation[] { */ export function devMainApps(): Navigation[] { return [ - DEV_APPS.exceedanceExplorer, + DEV_APPS.math.exceedanceExplorer, DEV_APPS.hazard.dynamicCompare, DEV_APPS.gmm.hangingWallEffects, ]; } +export function devMathApps(): Navigation[] { + return Object.values(DEV_APPS.math) as Navigation[]; +} + /** * Returns the drop down navigation menu for development applications. */ export function devNavigation(): NavigationList[] { const devNavigation: NavigationList[] = [ { - navigation: [DEV_APPS.dashboard, ...devMainApps()], + navigation: [DEV_APPS.dashboard], }, { - navigation: devAwsApps(), - subHeader: 'AWS', + navigation: devHazardApps(), + subHeader: 'Hazard', + }, + { + navigation: devGmmApps(), + subHeader: 'Ground Motion Models', + }, + { + navigation: devMathApps(), + subHeader: 'Math', }, ]; @@ -61,6 +75,31 @@ export function hazardApps(): Navigation[] { return Object.values(APPS.hazard) as Navigation[]; } +/** + * Returns the list of AWS applications. + */ +export function internalAwsApps(): Navigation[] { + return Object.values(INTERNAL_APPS.aws) as Navigation[]; +} + +export function internalMainApps(): Navigation[] { + return internalAwsApps(); +} + +export function internalNavigation(): NavigationList[] { + const internalNavigation: NavigationList[] = [ + { + navigation: [INTERNAL_APPS.dashboard], + }, + { + navigation: internalAwsApps(), + subHeader: 'AWS', + }, + ]; + + return [...internalNavigation]; +} + /** * Returns the list of main applications. */ @@ -101,6 +140,10 @@ export function navigation(): NavigationList[] { navigation: ncmApps(), subHeader: 'National Crustal Model', }, + { + navigation: [DEV_APPS.dashboard, ...devMainApps()], + subHeader: 'Development', + }, { navigation: [APPS.services], },