Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ BuildNumber = 0
// NB: the BuildType is overridden in the environment-specific settings below.
BuildType = "Development"

firefly.tag.name = "pre-2-2026.1"
firefly.tag.name = "alert-viewer-changes"

mail.transport.protocol = "smtp"
mail.smtp.host = "mail.ncsa.illinois.edu"
Expand Down
10 changes: 10 additions & 0 deletions config/web-fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,14 @@
<url-pattern>/timeseries</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>alertviewer</servlet-name>
<jsp-file>/alertviewer.html</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>alertviewer</servlet-name>
<url-pattern>/alertviewer/*</url-pattern>
</servlet-mapping>


</web-fragment>
27 changes: 27 additions & 0 deletions src/suit/html/alertviewer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="icon" type="image/x-icon" href="images/fftools-logo-16x16.png">
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Alert Viewer</title>

<script>
window.firefly = {
app: {
template: 'router',
page: 'alertviewer',
}
};
</script>
<script type="text/javascript" src="firefly_loader.js"></script>
</head>

<body style="margin: 0">
<!-- attached location for firefly app -->
<div id='app' style="width:100vw;height: 100vh"/>
</body>

</html>


55 changes: 45 additions & 10 deletions src/suit/js/SUIT.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import {
} from './actions.jsx';
import {getRubinDCECollectionAttributes, makeRubinDCERegistryRequest} from './RubinInventoryConfig';
import {RubinLanding, RubinLandingAPI} from './RubinLanding.jsx';
import {ROUTER} from 'firefly/templates/router/RouteHelper';
import {alertviewer} from 'firefly/apps/alertviewer/alertviewer';

import APP_ICON from '../html/images/rubin-favicon-transparent-45px.png';
import './suit.css';
Expand All @@ -37,6 +39,16 @@ const RUBIN_DP1_IMAGES= RUBIN_DP1+'-images';
const LSST_DP02_DC2_SIAV2_IMAGES= LSST_DP02_DC2+'-siaV2images';
// const LSST_DP03_SSO_IMAGES=LSST_DP03_SSO+'-images';

/**
* Pages are spa within a webapp. In this case, a page can be alertviewer and a webapp is firefly(applications).
* @type {object}
* @prop {function} init an init function to call after firefly completes bootstrap.
* @prop {object[]} menu a list of menu for this page.
*/
const pages = {
alertviewer
};

/**
* This entry point is customized for LSST suit. Refer to FFEntryPoint.js for information on
* what could be used in defaults.
Expand Down Expand Up @@ -329,13 +341,36 @@ let options = {
};

options = mergeObjectOnly(options, window.firefly?.options ?? {});
firefly.bootstrap(props, options,
getFireflyViewerWebApiCommands(undefined,
[
{desc:LSST_DP02_DC2, name:LSST_DP02_DC2},
{desc:'DP1 Images', name:'rubin-obscore-images-dp1'},
{desc:'DP1 Catalogs', name:'rubin-catalogs-dp1'},
{desc:'DP0 Images', name:'rubin-obscore-images-dp0'},
{desc:'Gaia TAP at ESAC', name:'gaia-tap'},
],
));

let apiCommands = getFireflyViewerWebApiCommands(
undefined,
[
{desc:LSST_DP02_DC2, name:LSST_DP02_DC2},
{desc:'DP1 Images', name:'rubin-obscore-images-dp1'},
{desc:'DP1 Catalogs', name:'rubin-catalogs-dp1'},
{desc:'DP0 Images', name:'rubin-obscore-images-dp0'},
{desc:'Gaia TAP at ESAC', name:'gaia-tap'},
],
);
let initApp;

const {template, page} = props;

if (template === ROUTER) {
const pageDef = pages[page];
props = mergeObjectOnly(props, pageDef?.props);
options = mergeObjectOnly(options, pageDef?.options);

if (pageDef?.props?.landingPage) props.landingPage = pageDef.props.landingPage;
if (pageDef?.props?.appTitle) props.appTitle = pageDef.props.appTitle;
if (pageDef?.props?.backgroundMonitor !== undefined) {
props.backgroundMonitor = pageDef.props.backgroundMonitor;
}

if (pageDef?.menu) props.menu = pageDef.menu;
apiCommands = pageDef?.webApiCommands;
initApp = pageDef?.init;
}

firefly.bootstrap(props, options, apiCommands).then(() => initApp?.());

Loading