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

add dashboards

parent 9623af8a
No related branches found
No related tags found
1 merge request!539Dev dashboards
......@@ -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;
}
......
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',
},
};
}
......@@ -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],
},
......
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