Skip to content
Merged
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
21 changes: 21 additions & 0 deletions src/radical/orbit/data/orbit_explorer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2045,6 +2045,9 @@ <h2>${escHtml(ui.title)} — <span class="endpoint-label">${endpointName}</span>

// Open SSE event stream for push notifications
setupEventSource();

// a #plugin/<endpoint>/<name> deep link can now be honoured
applyDeepLink();
} catch (e) {
setConnectionStatus('disconnected');

Expand Down Expand Up @@ -2603,7 +2606,25 @@ <h2>${escHtml(ui.title)} — <span class="endpoint-label">${endpointName}</span>
if (entry && page && entry.module.onShow) {
entry.module.onShow(page, entry.api);
}

// the page is addressable: keep the URL in step (replaceState does
// not retrigger the hashchange listener)
history.replaceState(null, '',
`#plugin/${encodeURIComponent(endpointName)}`
+ `/${encodeURIComponent(pluginName)}`);
}

// ── URL deep links ───────────────────────────────────────────
// #plugin/<endpoint>/<name> opens that plugin's page once the
// Explorer is connected; external pages (the DT dashboard's pool
// titles, say) can link straight to a plugin this way.
function applyDeepLink() {
const m = location.hash.match(/^#plugin\/([^/]+)\/([^/]+)$/);
if (m && isConnected) {
showPluginPage(decodeURIComponent(m[1]), decodeURIComponent(m[2]));
}
}
window.addEventListener('hashchange', applyDeepLink);

// ─────────────────────────────────────────────────────────────
// SSE Notification handler
Expand Down
Loading