Skip to content

UIExtension: add optional getGlobalModuleFileName() for persistent page-level overlays - #181

Closed
joseanesONMS wants to merge 1 commit into
OpenNMS:masterfrom
joseanesONMS:jira/OIA-global-plugin-mount
Closed

UIExtension: add optional getGlobalModuleFileName() for persistent page-level overlays#181
joseanesONMS wants to merge 1 commit into
OpenNMS:masterfrom
joseanesONMS:jira/OIA-global-plugin-mount

Conversation

@joseanesONMS

@joseanesONMS joseanesONMS commented Jun 26, 2026

Copy link
Copy Markdown

ALEC-302

Summary

Adds a single default method to the UIExtension interface so that a plugin can register a second Vue3 module to be mounted globally (on every OpenNMS page), rather than only under its Plugins > menu route.

  • getGlobalModuleFileName() — returns the ES-module file name for a global overlay component, or null (default) if the plugin has none.

Why

Some plugins need UI components that persist across page navigation — e.g. a floating chatbot widget, a notification rail, or a live status indicator. The current UIExtension contract only supports a single module loaded at the plugin route; there is no way to inject a component at the application shell level without this hook.

Backward compatibility

  • All existing implementations compile without changes — the method is default returning null.
  • Old OpenNMS versions that do not call the method never attempt to mount the global module; all plugin functionality is fully unchanged.
  • New OpenNMS (companion PR #8602) checks for a non-null globalModuleFileName in the /rest/plugins response and mounts it via <Teleport to="body"> in the root App.vue, so it is visible on every page.

Companion PRs

…plugin overlays

Plugins that want to render a persistent overlay visible on every OpenNMS page
(e.g. a chatbot widget, a notification rail) can now return a second Vue3 module
file name from getGlobalModuleFileName(). The OpenNMS shell mounts this module via
<Teleport to="body"> in the root App component so it is present regardless of the
current route.

The method is a Java default returning null, so:
- All existing UIExtension implementations compile without changes.
- Old OpenNMS versions that do not call the method simply never mount the global
  module — plugin functionality is fully preserved.
- Plugins that do not want a global component need not override the method.

Related: ALEC-302 (ALEC chatbot — first consumer of this hook)
@sonarqubecloud

Copy link
Copy Markdown

@joseanesONMS

Copy link
Copy Markdown
Author

@mershad-manesh @marshallmassengill — updated the PR description. Please take a look when you get a chance.

@mershad-manesh
mershad-manesh requested a review from cgorantla June 30, 2026 13:14
@mershad-manesh

Copy link
Copy Markdown
Contributor

Do we want to deliver this change into release-2.x branch?

@synqotik

synqotik commented Jun 30, 2026

Copy link
Copy Markdown

Seems reasonable to me.

But see my comment on this PR. We may need to think about this a bit more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants