feat(ui): global plugin overlay slot via Teleport (companion to OIA PR #181)#8602
Open
joseanesONMS wants to merge 1 commit into
Open
feat(ui): global plugin overlay slot via Teleport (companion to OIA PR #181)#8602joseanesONMS wants to merge 1 commit into
joseanesONMS wants to merge 1 commit into
Conversation
…gets Plugins that declare UIExtension.getGlobalModuleFileName() (new OIA default method) now get their module loaded and rendered in a <Teleport to="body"> at the root App level, so the component is visible on every page — not just under the Plugins > menu route. Changes: - App.vue: import GlobalPlugin; compute globalPlugins (plugins with a non-null globalModuleFileName); render them inside <Teleport to="body"> - GlobalPlugin.vue: new component that loads the global module via the existing Container + externalComponent machinery (same URL pattern as Plugin.vue) - types/index.ts: add optional globalModuleFileName field to the Plugin type Backward compatibility: - Plugins that do not override getGlobalModuleFileName() return null; the REST layer omits or nulls the field; the v-for filter skips them — zero behaviour change for all existing plugins. - Old OpenNMS that does not serve this field: globalPlugins is always empty, Teleport renders nothing — no visual or functional regression. Relates-To: ALEC-302
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UIExtension.getGlobalModuleFileName()(new OIA default method, OIA PR #181) now get their module loaded and rendered in a<Teleport to="body">at the root App level — visible on every page, not just under Plugins > menu.GlobalPlugin.vuecomponent handles the load using the sameContainer+externalComponentmachinery already used byPlugin.vue.PluginTypeScript type gets an optionalglobalModuleFileNamefield.Changes
ui/src/main/App.vueGlobalPlugin; computeglobalPlugins; add<Teleport to="body">ui/src/components/Plugin/GlobalPlugin.vueContainerui/src/types/index.tsglobalModuleFileName?: stringtoPluginBackward compatibility
getGlobalModuleFileName()(i.e. all existing plugins) returnnull; the REST layer omits or nulls the field; thev-forfilter skips them — zero behaviour change.globalPluginsis always empty,<Teleport>renders nothing — no visual or functional regression.Dependencies
Requires OIA PR #181 to be merged and a new OIA snapshot published before the
globalModuleFileNamefield appears in/rest/pluginsresponses for plugins that use it.First consumer
ALEC-302 — ALEC context-aware chatbot overlay.
🤖 Generated with Claude Code