NMS-18978: Don't load ui-components menu assets on login and password gate; fix wallpaper edge gap - #8900
Open
synqotik wants to merge 2 commits into
Open
NMS-18978: Don't load ui-components menu assets on login and password gate; fix wallpaper edge gap#8900synqotik wants to merge 2 commits into
synqotik wants to merge 2 commits into
Conversation
… gate Add a 'nomenuassets' bootstrap.jsp include param / Bootstrap flag that omits the Vue menu bundle's stylesheet and modulepreload links, and set it on login.jsp and the password gate, neither of which mounts the menu. Other quiet pages are unchanged. /ui-components/assets/** remains anonymously accessible. Update WebappIT to assert login.jsp no longer references the bundle.
background_dark.png had a partially transparent 1-2px border (top two rows, bottom row, left column). Scaled up by background-size: cover, it let the white <body> show through as a thin bar along the top and left of the login and password gate pages. Crop it off; the remaining image is fully opaque and pixel-identical to the original's interior.
synqotik
marked this pull request as ready for review
September 25, 2026 21:26
synqotik
requested review from
cgorantla,
marshallmassengill and
mershad-manesh
September 25, 2026 21:27
This branch has not been deployed
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.
NMS-18978: Don't load ui-components menu assets on login and password gate; fix wallpaper edge gap
The
ui-componentsCSS and JS, which are used for the menu/sidemenu that appear on JSP pages, were included in the JSP login and password gate pages, even though there's no menu on those pages.This removes those references so those 2 pages are cleaner. There's a small tradeoff where the menu assets won't be loaded until the user logs in and gets to the main page vs. having already been cached, but this seems like a reasonable one-time-per-session tradeoff.
Also, fixed an edge gap with the OpenNMS Horizon wallpaper on those 2 pages, where a thin white bar across the top and left edges was being displayed. The image was fixed and now the wallpaper fills the entire window neatly.
Summary
includes/bootstrap.jspadds two links to the<head>of every page:ui-components/assets/index.cssmodulepreloadforui-components/assets/index.jsThis includes
login.jspandaccount/selfService/passwordGate.jsp, which never mount the menu. The links were added in NMS-19975 (#8670). NMS-20180 (#8792) then kept them on the login page on purpose, so the bundle would be cached before the first page after login.This PR drops both links on those two pages:
Changes
includes/bootstrap.jsp: newnomenuassetsoption. When set, the page skips the menu bundle's stylesheet andmodulepreloadlinks. Pages can set it either way they already setquiet: as an include param or as aBootstrapflag. The option is documented in the parameter notes at the top of the file, and the head comment is updated.login.jsp:Bootstrap.flags("quiet", "nomenuassets").passwordGate.jsp:<jsp:param name="nomenuassets" value="true" />.WebappIT:verifyLoginPageDoesNotExecuteMenuBundleis nowverifyLoginPageDoesNotReferenceMenuBundle. It asserts that login.jsp contains noui-components/reference at all. It also checks that the login form rendered, so it can't pass on an error page.Wallpaper edge gap
The login and password gate pages both showed a thin white bar along the top and left edges of the background. This is not caused by the menu changes above.
images/wallpapers/background_dark.pnghas a 1–2px partly transparent border: the top 2 rows, the bottom row and the left column. Layout is not involved, because.login-pagesits at (0,0) and fills the viewport.background-size: coverscales the image about 1.28×, so the white<body>shows through as a 2–3px strip on top and 1–2px on the left. The bottom edge is cropped off bycover, so it never shows.Not changed
quietpages still get the stylesheet and preload. The new flag is opt-in and only these two pages use it./ui-components/assets/**stays reachable without logging in. That rule from NMS-20174/NMS-20180 still guards against a browser caching an auth redirect as the bundle. TheWebappITtests for anonymous asset access are unchanged.open-light/open-darkclass on<html>before first paint and doesn't referenceui-components.External References