Repository navigation
feat(settings): split the admin page into Status and Background jobs - #1119
Merged
Merged
Conversation
karlitschek
force-pushed
the
feat/settings-tabs
branch
2 times, most recently
from
September 9, 2026 14:12
da0d364 to
2468d6f
Compare
Member
Author
Member
Author
Member
Author
|
the idea is to add a third page with the DB Doctor checks later |
This was referenced Sep 9, 2026
Collaborator
|
/backport to stable35 please |
The Monitoring page had grown to fourteen sections on one long scroll, with the background job tables — three of them, each potentially long — sitting in the middle of the hardware readings. Checking whether cron is alive meant scrolling past the CPU and memory charts every time. Add a navigation at the top of the page that switches between a "Status" page, which keeps everything that describes the machine, and a new "Background jobs" page, which the background jobs section moves to unchanged. The page body is split into StatusView and BackgroundJobsView so that SettingsAdmin is left as a shell that fetches the data and picks a view. The two are toggled with v-show rather than v-if on purpose: the CPU and memory charts accumulate their history in the component, so v-if would reset both graphs every time the admin glanced at the job tables. The switch is an NcRadioGroup of NcRadioGroupButton, so it renders real radio inputs with a group label rather than click handlers on divs. Signed-off-by: Frank Karlitschek <frank.karlitschek@nextcloud.com> Assisted-by: Claude Code:claude-opus-5 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
kesselb
force-pushed
the
feat/settings-tabs
branch
from
September 9, 2026 17:31
2468d6f to
bb8e500
Compare
3 tasks done
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.


Problem
The Monitoring admin page had grown to fourteen sections on a single scroll, and the background job area is the bulkiest part of it: three tables (latest failures, latest runs, slowest jobs), any of which can be long. It sat in the middle, between Network and Active users, so the common task of "is cron still alive, and did anything fail?" meant scrolling past the CPU and memory charts every time.
Change
A navigation at the top of the page switches between two pages:
The page body is split so that
SettingsAdmin.vueis left as a shell that fetches the data and picks a view:views/SettingsAdmin.vueviews/StatusView.vueviews/BackgroundJobsView.vueBackgroundJobsSectionand its skeletoncomponents/SettingsNavigation.vueStatusView.vueis a straight move of the existing markup — the only edits are the props it now takes (staticData,liveData,tick) and the removal of the background jobs block.Two decisions worth flagging for review:
v-show, notv-if. The CPU and memory charts accumulate their history inside the component (60 points, one per 2s poll). Withv-if, a glance at the job tables would reset both graphs and the admin would come back to empty charts.v-showkeeps them mounted and filling. This is why both views have a single element root —v-showis a no-op on a fragment root.NcRadioGroup+NcRadioGroupButtonrather than buttons with click handlers, so the switch renders real radio inputs with a group label (Monitoring pages, visually hidden) and is keyboard- and screen-reader-navigable for free.The switch has to clear the navigation-collapse button. Core floats
#app-navigation-toggleover the top-inline-start corner of the content area. Core's own settings pages clear it vertically — their sections start at the content top but their 30px padding puts the content below the toggle's bottom edge — so the switch does the same, reservingvar(--default-clickable-area)above itself and lining its buttons up with the section content below. Dodging sideways instead does not work: the toggle is 7px inside the content edge and scales with the clickable-area setting (34px in compact mode, 44px otherwise), so an inline offset that looks right at one setting overlaps at the other.Polling is unchanged and still lives in the shell, so the background jobs page stays as fresh as it was and switching pages costs no extra requests.
Verification
npm run lintcleannpm run buildclean;js/andcss/rebuilt and committed as the repo doesvue-tsc. The one error reported insideStatusView.vueis the pre-existingfpmshape mismatch betweenuseStaticData.tsandPhpSection.vue— it travelled with the markup and is untouched by this PR (git show master:src/views/SettingsAdmin.vue | grep fpmshows the same binding). Worth a separate fix.vitest+@vue/test-utilsmount (not committed, to keep this PR from dragging in a test-infra decision): the switch renders two radios with the correct checked state, drivesv-modelin both directions, and the shell shows Status first and swaps which view is visible on selection.That last point is a bit unsatisfying — this repo has no frontend test setup at all, so there is nowhere for those tests to live. Adding
vitestwould be a good follow-up if you want it, and I'm happy to open that separately.Verified on a running instance
Measured and clicked through with Playwright against a live NC 35 admin settings page (1400x900, compact clickable-area of 34px):
.status-viewand shows.background-jobs-view, and selecting Status puts it backScreenshots
Not included — I don't have a browser against a running instance here. Happy to add them if that blocks review.