Skip to content

Expose admin resource overrides beside VPS and dataset allocation controls - #503

Merged
Kerrycek merged 2 commits into
mainfrom
codex/resource-override-controls
Sep 24, 2026
Merged

Kerrycek merged 2 commits into
mainfrom
codex/resource-override-controls

Conversation

@Kerrycek

@Kerrycek Kerrycek commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

English

Admins cannot readily find the legacy resource-allocation exception when increasing VPS RAM or dataset size: the VPS checkbox is buried in administration and the dataset checkbox inside collapsed advanced ZFS settings.

  • Put Allow exceeding user resource allocation beside VPS CPU/RAM/swap and dataset quota controls, along with the existing admin lock selector.
  • Expose the same explicit checkbox in VPS resource-change confirmation, including after an allocation error. Preserve the draft and require another Save; never automatically enable or retry the exception.
  • Send the existing admin_override / admin_lock_type API options independently of advanced dataset edits, without resending unrelated ZFS properties. Reset these per-save options after success.
  • Keep controls admin-only, default off, and explain their meaning in Czech/English, including the existing root SSD resize dialog.

Contract verified against legacy webui/pages/page_adminvps.php, webui/forms/dataset.forms.php, and API VPS/Dataset Update authorization. This bypasses the user's available allocation check; it does not bypass other API checks. No backend change or deployment is needed for the parameter.

Validation:

  • Typecheck, repository lint, i18n parity audit and production build passed.
  • 28 targeted unit tests passed (configuration model, storage model, dataset overview and dataset API).
  • Desktop/mobile Playwright with fixture API: broad three-file run had 100 passing cases; corrected all six failures (new fixture expected an omitted zero quota / lacked a required VPS task ID; existing user-dataset deletion expected an obsolete return route). Focused rerun passed all 12 cases, including all six previously failing cases, member permissions, RAM error → explicit override retry, quota+lock exact payload without ZFS fields, and root SSD with/without override.
  • Browser checks use synthetic fixtures, not live VM or production mutation evidence. Mobile confirmation screenshot inspected. Live isolated verification remains part of the beta plan.

Risk: allocation exceptions intentionally let admins exceed a user's allocation. They remain an explicit unchecked choice and API authorization is unchanged. No merge/deploy included.

Česky

Při navýšení RAM nebo datasetu byla výjimka z kontroly volných prostředků obtížně dohledatelná. Podle starého UI je nyní přímo u prostředků a velikosti datasetu; u VPS také v potvrzovacím dialogu, kde lze po chybě zaškrtnout výjimku a znovu uložit zachovaný návrh.

Používá stávající admin_override a admin_lock_type, jen pro administrátora. Výchozí stav je vypnutý a po úspěchu se volby resetují. U datasetu nevyžaduje otevření pokročilých vlastností a neodesílá vedlejší změny ZFS. Sjednocené české/anglické popisky také u SSD.

Ověřeno: typecheck, lint, překlady, build a 28 unit testů. Širší fixture Playwright běh měl 100 úspěchů; všech 6 selhání bylo v testech opraveno a cílený běh následně prošel 12/12 na desktopu/mobilu. Zahrnuje zamítnutou alokaci, výslovné opakování s výjimkou, přesná těla požadavků, reset a oprávnění. Nejde o live VM ověření. Opravené starší očekávání návratu po smazání uživatelského datasetu odpovídá současné navigaci do úložiště VPS.

Ostatní kontroly API zůstávají platné. Bez změny backendu, merge nebo nasazení.

CI follow-up / Doplnění ověření

Updated overview/member/read-only assertions to target the actual override checkbox after its label changed. The CI failure was the obsolete Admin override text; the relevant desktop/mobile specs now pass 8/8 locally. The unrelated OOM history test was flaky in the previous CI run and passed on retry; it is not changed here.

Testy přehledu a oprávnění nyní kontrolují skutečný checkbox místo původního textu Admin override. Příslušné desktopové i mobilní scénáře prošly lokálně 8/8. Nesouvisející test historie OOM byl v předchozím CI běhu nestabilní a prošel při opakování; toto PR jej nemění.

Match legacy VPS and dataset forms by placing allocation exceptions beside
resource inputs. Allow explicit retry inside VPS confirmation after an
allocation failure, and avoid resending unrelated advanced ZFS properties.
Keep overrides admin-only and clear them after a successful save.
Use the checkbox test ID after the resource override label was clarified.
This restores the overview smoke test and ensures member and read-only
permission tests still check the actual control rather than an old label.
@Kerrycek
Kerrycek merged commit 277283c into main Sep 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant