fix(shares): allow setting Emptying disk(s) while array is Started#2686
fix(shares): allow setting Emptying disk(s) while array is Started#2686elibosley wants to merge 2 commits into
Conversation
The Global Share Settings form locks every control whenever the array is not Stopped. The 'Emptying disk(s)' setting (shareUserEmptying), however, is accepted by emhttpd at runtime, so gating it on array state is an unnecessary UI restriction. Decouple shareUserEmptying from the array-state lock in presetShare(), gating it only on user shares being enabled, and add the previously missing help text for the field. Other settings remain locked while the array is Started.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 13 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🔧 PR Test Plugin AvailableA test plugin has been generated for this PR that includes the modified files. Version: 📥 Installation Instructions:Install via Unraid Web UI:
Alternative: Direct Download
|
Rather than keeping 'Emptying disk(s)' inside the array-state-locked Global Share Settings form and relying on disabled fields not being POSTed, move it into a dedicated form at the bottom of the page with its own Apply button (mirrors the two-form pattern in NFS.page). The emptying form posts only shareUserEmptying to /update.htm, is always editable while user shares are enabled regardless of array state, and makes the submit semantics explicit. The main form reverts to locking all of its settings while the array is not Stopped.
|
Closing — we won't be doing this in 7.4.0 Per discussion with Tom: this is a larger change than it appears on the surface. Unlocking "Emptying disk(s)" at the UI level isn't sufficient — FUSE / the user file system needs to be made aware of the emptying change at runtime as well, otherwise the setting doesn't take effect safely while the array is Started. That backend awareness is the real scope here and is out of scope for 7.4.0 Leaving the branch in place for reference if we pick this up later. |
🧹 PR Test Plugin Cleaned UpThe test plugin and associated files for this PR have been removed from the preview environment. 🤖 This comment is automatically generated when a PR is closed without merging. |
Summary
The Global Share Settings page locked every control whenever the array was not
Stopped, including Emptying disk(s) (shareUserEmptying) — even thoughemhttpdaccepts the emptying command at runtime and does not require the array to be stopped.This splits "Emptying disk(s)" into its own form at the bottom of the page (mirroring the two-form pattern already used in
NFS.page), so it can be changed independently while the array is Started. The main settings form remains fully locked while the array is not Stopped.Why a separate form (vs. one form)
The page is a single markdown definition-list form and "Emptying disk(s)" sat in the middle of the stop-required settings. A dedicated form:
shareUserEmptyingto/update.htm— no reliance on "disabled fields aren't submitted"Changes
emhttp/plugins/dynamix/ShareSettings.pageshare_emptyingform at the bottom with the "Emptying disk(s)" control + its own Apply (posts to/update.htmwithchangeShare, identical backend path to the existing form).prepareEmptying()collapses the multi-select for submit; emptying collapse removed fromprepareShare().presetShare()gates the emptying control only on user shares being enabled (not array state).emhttp/languages/en_US/helptext.txt:shares_emptying_disks_help:entry.Testing
shareUserEmptying.Linear
Resolves OS-495 — https://linear.app/lime-technology/issue/OS-495