2026-06-08 15:57:40 -07:00
|
|
|
// config/widgetRegistry.js
|
2026-07-08 15:05:50 -07:00
|
|
|
import { lazy } from 'react';
|
2026-06-08 15:57:40 -07:00
|
|
|
|
|
|
|
|
// We assume a 12-column grid.
|
|
|
|
|
// w: 12 = full screen width
|
|
|
|
|
// w: 6 = half screen width
|
|
|
|
|
// w: 4 = one-third screen width
|
|
|
|
|
// w: 3 = one-quarter screen width
|
|
|
|
|
|
2026-08-27 12:36:25 -07:00
|
|
|
// ONE DAY DATE RANGE
|
|
|
|
|
const getToday = () => (new Date()).toLocaleDateString('en-CA')
|
|
|
|
|
|
|
|
|
|
// ONE WEEK DATE RANGE
|
2026-08-18 21:20:49 +00:00
|
|
|
const getStartDate = () => (new Date(Date.now() - 604800000)).toLocaleDateString('en-CA'); // 7 days = 604800000 = 7*24*60*60*1000
|
|
|
|
|
const getEndDate = () => (new Date()).toLocaleDateString('en-CA'); // 'en-CA' formats the date as YYYY-MM-DD
|
|
|
|
|
|
2026-06-08 15:57:40 -07:00
|
|
|
export const WIDGET_REGISTRY = {
|
|
|
|
|
"vaa_activity": {
|
|
|
|
|
name: "VAA 7 Day Activity",
|
2026-06-09 14:06:01 -07:00
|
|
|
category: "Aviation",
|
2026-06-08 15:57:40 -07:00
|
|
|
description: "Displays 7-day flight level timelines across multiple volcanoes.",
|
2026-07-08 15:05:50 -07:00
|
|
|
component: lazy(() => import('../components/widgets/VaaActivity7Day')),
|
2026-07-10 14:56:11 -07:00
|
|
|
|
|
|
|
|
// The specific settings UI for this widget
|
|
|
|
|
settingsComponent: lazy(() => import('../components/widgets/settings/VaaActivitySettings')),
|
|
|
|
|
|
|
|
|
|
// The baseline data every new VAA widget starts with
|
|
|
|
|
defaultSettings: {
|
2026-08-18 21:20:49 +00:00
|
|
|
// startDate: getStartDate(),
|
|
|
|
|
// endDate: getEndDate(),
|
|
|
|
|
yAxisScale: 'normal', // Options: 'normal' | 'symlog'
|
2026-07-10 14:56:11 -07:00
|
|
|
},
|
|
|
|
|
|
2026-06-08 15:57:40 -07:00
|
|
|
allowedSizes: {
|
2026-06-16 09:48:18 -07:00
|
|
|
xlarge: { w: 12, h: 12 },
|
2026-06-08 15:57:40 -07:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"db_cache_health": {
|
|
|
|
|
name: "DB Cache Health",
|
2026-06-09 14:06:01 -07:00
|
|
|
category: "Computer Science",
|
2026-06-08 15:57:40 -07:00
|
|
|
description: "Bar chart showing cache table operational status.",
|
|
|
|
|
allowedSizes: {
|
2026-06-16 09:48:18 -07:00
|
|
|
small: { w: 3, h: 12 },
|
|
|
|
|
medium: { w: 6, h: 12 }
|
2026-06-08 15:57:40 -07:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"ivans_alerts": {
|
|
|
|
|
name: "IVANS",
|
2026-06-09 14:06:01 -07:00
|
|
|
category: "Communications",
|
2026-06-08 15:57:40 -07:00
|
|
|
description: "Feed of recent IVANS reports and reviewer statuses.",
|
2026-07-30 09:18:47 -07:00
|
|
|
component: lazy(() => import('../components/Widgets/IvansAlerts.jsx')),
|
|
|
|
|
settingsComponent: lazy(() => import('../components/Widgets/settings/IvansAlertsSettings.jsx')),
|
|
|
|
|
defaultSettings: {
|
2026-08-18 21:20:49 +00:00
|
|
|
startDate: getStartDate(),
|
|
|
|
|
endDate: getEndDate(),
|
2026-07-30 09:18:47 -07:00
|
|
|
copyToClipboard: false,
|
|
|
|
|
activeSorts: {
|
|
|
|
|
timeSort: "desc",
|
|
|
|
|
volcanoSort: false
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-06-08 15:57:40 -07:00
|
|
|
allowedSizes: {
|
2026-08-05 17:16:45 +00:00
|
|
|
small: { w: 3, h: 6 },
|
|
|
|
|
medium: { w: 3, h: 9 },
|
2026-08-10 15:02:37 +00:00
|
|
|
large: { w: 3, h: 12 },
|
2026-06-08 15:57:40 -07:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"remote_sensing": {
|
|
|
|
|
name: "Remote Sensing",
|
2026-06-09 14:06:01 -07:00
|
|
|
category: "Remote Sensing",
|
2026-06-08 15:57:40 -07:00
|
|
|
description: "Feed of recent remote sensing reports.",
|
2026-08-10 20:47:07 +00:00
|
|
|
component: lazy(() => import('../components/Widgets/RemoteSensing.jsx')),
|
|
|
|
|
settingsComponent: lazy(() => import('../components/Widgets/Settings/RemoteSensingSettings.jsx')),
|
|
|
|
|
defaultSettings: {
|
2026-08-18 21:20:49 +00:00
|
|
|
startDate: getStartDate(),
|
|
|
|
|
endDate: getEndDate(),
|
2026-08-10 20:47:07 +00:00
|
|
|
copyToClipboard: false,
|
|
|
|
|
activeSorts: {
|
|
|
|
|
timeSort: "desc",
|
|
|
|
|
volcanoSort: false
|
|
|
|
|
}
|
|
|
|
|
},
|
2026-06-08 15:57:40 -07:00
|
|
|
allowedSizes: {
|
2026-08-10 20:47:07 +00:00
|
|
|
small: { w: 3, h: 6 },
|
|
|
|
|
medium: { w: 3, h: 9 },
|
|
|
|
|
large: { w: 3, h: 12 },
|
2026-06-08 15:57:40 -07:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"alert_levels": {
|
|
|
|
|
name: "Alert Level Changes",
|
2026-06-09 14:06:01 -07:00
|
|
|
category: "Daily Alerts",
|
2026-06-08 15:57:40 -07:00
|
|
|
description: "List of 7-day alert level changes with trend arrows.",
|
2026-08-18 21:20:49 +00:00
|
|
|
component: lazy(() => import('../components/Widgets/AlertChanges.jsx')),
|
|
|
|
|
settingsComponent: lazy(() => import('../components/Widgets/settings/AlertChangeSettings.jsx')),
|
|
|
|
|
defaultSettings: {
|
|
|
|
|
startDate: getStartDate(),
|
|
|
|
|
endDate: getEndDate(),
|
|
|
|
|
},
|
2026-06-08 15:57:40 -07:00
|
|
|
allowedSizes: {
|
2026-08-18 21:20:49 +00:00
|
|
|
small: { w: 3, h: 6 },
|
|
|
|
|
large: { w: 3, h: 12 }
|
2026-06-08 15:57:40 -07:00
|
|
|
}
|
2026-07-13 14:28:33 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"explosion_events": {
|
|
|
|
|
name: "Explosion Events",
|
|
|
|
|
category: "Daily Volcanic Activity",
|
|
|
|
|
description: "List of explosion events over a specified time period.",
|
|
|
|
|
|
|
|
|
|
component: lazy(() => import('../components/Widgets/ExplosionEvents.jsx')),
|
|
|
|
|
|
|
|
|
|
// The specific settings UI for this widget
|
|
|
|
|
settingsComponent: lazy(() => import('../components/widgets/settings/ExplosionEventsSettings.jsx')),
|
|
|
|
|
|
|
|
|
|
// The baseline data every new VAA widget starts with
|
|
|
|
|
defaultSettings: {
|
2026-08-18 21:20:49 +00:00
|
|
|
startDate: getStartDate(),
|
|
|
|
|
endDate: getEndDate(),
|
2026-07-13 14:28:33 -07:00
|
|
|
yAxisScale: 'normal' // Options: 'normal' | 'symlog'
|
|
|
|
|
},
|
|
|
|
|
allowedSizes: {
|
|
|
|
|
medium: { w: 6, h: 12 }
|
|
|
|
|
}
|
2026-07-15 13:56:12 -07:00
|
|
|
},
|
|
|
|
|
|
2026-08-05 17:16:45 +00:00
|
|
|
"plume_events": {
|
|
|
|
|
name: "Plume Events",
|
|
|
|
|
category: "Daily Volcanic Activity",
|
|
|
|
|
description: "Plot of explosion heights over a weeks time.",
|
|
|
|
|
component: lazy(() => import('../components/Widgets/PlumeEvents.jsx')),
|
2026-08-10 16:22:34 -07:00
|
|
|
settingsComponent: lazy(() => import('../components/Widgets/settings/PlumeEventsSettings.jsx')),
|
2026-08-18 21:20:49 +00:00
|
|
|
defaultSettings: {
|
|
|
|
|
startDate: getStartDate(),
|
|
|
|
|
endDate: getEndDate(),
|
|
|
|
|
},
|
2026-08-05 17:16:45 +00:00
|
|
|
allowedSizes: {
|
|
|
|
|
medium: { w: 6, h: 12 }
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2026-08-10 15:02:37 +00:00
|
|
|
"seismic_events": {
|
|
|
|
|
name: "Seismic Events",
|
|
|
|
|
category: "Daily Volcanic Activity",
|
|
|
|
|
description: "Plot of number of seismic events over a weeks time.",
|
|
|
|
|
component: lazy(() => import('../components/Widgets/SeismicEvents.jsx')),
|
|
|
|
|
settingsComponent: lazy(() => import('../components/Widgets/settings/SeismicEventsSettings.jsx')),
|
2026-08-18 21:20:49 +00:00
|
|
|
defaultSettings: {
|
|
|
|
|
startDate: getStartDate(),
|
|
|
|
|
endDate: getEndDate(),
|
|
|
|
|
},
|
2026-08-10 15:02:37 +00:00
|
|
|
allowedSizes: {
|
|
|
|
|
medium: { w: 6, h: 12 }
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2026-07-21 16:07:59 -07:00
|
|
|
"llm_al_changes_quad_plot": {
|
|
|
|
|
name: "Alert Level Changes Quad Plot",
|
|
|
|
|
category: "Computer Science",
|
2026-07-30 09:18:47 -07:00
|
|
|
description: "Percentage of TP, TN, FP, and FN changes in viable alert levels.",
|
2026-07-21 16:07:59 -07:00
|
|
|
component: lazy(() => import('../components/Widgets/LlmAlChangesQuadPlot.jsx')),
|
|
|
|
|
allowedSizes: {
|
2026-08-20 16:49:50 -07:00
|
|
|
medium: { w: 3, h: 12 }
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"comm_coor_report": {
|
|
|
|
|
name: "Communication Coordinator Report",
|
|
|
|
|
category: "Daily Volcanic Activity",
|
|
|
|
|
description: "Generated Report",
|
|
|
|
|
component: lazy(() => import('../components/Widgets/CommCoorReport.jsx')),
|
|
|
|
|
settingsComponent: lazy(() => import('../components/Widgets/settings/CommCoorReportSettings.jsx')),
|
|
|
|
|
defaultSettings: {
|
|
|
|
|
copyToClipboard: false,
|
|
|
|
|
downloadReport: false,
|
|
|
|
|
startDate: getStartDate(),
|
|
|
|
|
endDate: getEndDate(),
|
|
|
|
|
},
|
|
|
|
|
allowedSizes: {
|
|
|
|
|
medium: { w: 3, h: 12 },
|
2026-07-21 16:07:59 -07:00
|
|
|
}
|
2026-08-27 12:36:25 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"vaa_map": {
|
|
|
|
|
name: "VAA Ash Polygon Map",
|
|
|
|
|
category: "Maps",
|
|
|
|
|
description: "By selecting a volcano, the map will take you to it and show a polygon of the ash in 8, 12, and 18 hours",
|
|
|
|
|
component: lazy(() => import('../components/Widgets/VaaMap.jsx')),
|
|
|
|
|
settingsComponent: lazy(() => import('../components/Widgets/settings/VaaMapSettings.jsx')),
|
|
|
|
|
defaultSettings: {
|
|
|
|
|
position: [45.61142, -122.49630],
|
|
|
|
|
startDate: getToday(),
|
|
|
|
|
endDate: getToday(),
|
|
|
|
|
data: [],
|
|
|
|
|
isLoading: false,
|
|
|
|
|
isError: undefined,
|
|
|
|
|
selected: undefined,
|
|
|
|
|
},
|
|
|
|
|
allowedSizes: {
|
|
|
|
|
medium: { w: 6, h: 12 }
|
|
|
|
|
}
|
2026-07-21 16:07:59 -07:00
|
|
|
}
|
|
|
|
|
|
2026-06-08 15:57:40 -07:00
|
|
|
};
|