Remove dead maintenance mode code from SettingsView#151
Merged
Conversation
Copilot
AI
changed the title
[WIP] Remove dead code and unused imports in SettingsView
Remove dead maintenance mode code from SettingsView
Apr 8, 2026
maximthomas
approved these changes
Apr 8, 2026
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.
SettingsView.jscopyright headerSettingsTemplate.htmlcopyright headerOriginal prompt
Problem
The System Preferences page (
#settings/) makes aPOST /openidm/maintenance?_action=statusREST call inSettingsView.json every page load. This call:ConfigDelegate, this call doesn't haveerrorsHandlersfor 404.UpdateView.js(lines 70-112) is already fully commented out, so even if maintenance mode is detected, the Update tab renders nothing useful.This breaks the Playwright smoke test
Configure dropdown - System Preferences sub-item navigates correctlyin PR #145.Required Changes
1.
openidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/settings/SettingsView.jsAbstractDelegateimport (no longer needed)UpdateViewimport (no longer needed)maintenanceModeDelegate.serviceCallblock (lines 53-71) that doesPOST /openidm/maintenance?_action=statusUpdateView.render({step: "version"}, ...)call (line 80-82)maintenanceModeconditionals — just always render AuditView, SelfServiceView, EmailConfigViewtabdrop()call but move it out of the UpdateView callback2.
openidm-ui/openidm-ui-admin/src/main/resources/templates/admin/settings/SettingsTemplate.html<li>element (line 26-28)#updateContainerdiv (line 38)#installdiv (line 45){{#if maintenanceMode}}disabled{{/if}}conditionals from the remaining tab<li>elementsImportant Notes
UpdateView.js— it simply won't be imported anymoresocialContainerdiv in the template can also be removed as it has no corresponding view being renderedThe following is the prior conversation context from the user's chat exploration (may be truncated):
User: проанализируй причину ошибки в PR
Assistant: ## Анализ причины ошибки
Тест на строке 209 переходит на страницу System Preferences (
#settings/), и на странице появляется видимый alert с текстом "Not found error." (виден как на скриншоте, так и в page snapshot):Это розовый баннер
.alert-dangerна скриншоте. Страница System Preferences при этом загрузилась корректно (заголовок "System Preferences", вкладки Audit/Self-Service UI/Email/Update отображаются), но сервер вернул ошибку "Not found" для одного из REST-запросов при загрузке конфигурации (скорее всего, отсутствует какой-то конфиг-ресурс в тестовой среде).Функция
assertNoErrors(строка 44) ждёт максимум 3 секунды для авто-скрытия.alert-danger, но этот баннер не скрывается — он остаётся видимым, иvisibleErrorsстановится1вместо ожидаемого0.#...
This pull request was created from Copilot chat.