Add per-user quotas (max instances, vCPU, RAM, disk) enforced at deploy
time and surfaced to users self-service.
Backend:
- UserQuota model (one-to-one, NULL = unlimited) + migration #28
- quota_service: usage from vm_instances cache, check_quota raises 429
- enforce in VM (templates.py) and LXC (lxc.py) deploy paths
- RBAC quota:view / quota:manage, granted to admin
- admin API GET/PUT /admin/api/users/{id}/quota
- self-service GET /settings/api/quota
- tighten VM list isolation via can_view_all_instances
Frontend:
- admin quota dialog in UsersPage with usage bars
- quota card on Settings page (own limits)
- remaining-quota hint in CreateInstanceWizard config step
- useUserQuota/useSetUserQuota, useMyQuota hooks; RU/EN locales
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Persisted instances-server-filter/instances-node-filter kept an old id
after switching workspace, emptying the list and showing the raw id in
the Select. Drop the filter to 'all' when the server/node is no longer
present in the active workspace.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Make 'Cloud-образы ВМ' and 'LXC-шаблоны' section headers clickable to
collapse/expand. State is saved to localStorage per section so it
survives reloads and navigation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- ForgotPasswordPage and ResetPasswordPage in the split-screen auth layout.
- "Forgot password" link on the login page now routes to /forgot-password.
- Public routes /forgot-password and /reset-password; reset page validates
the token on mount and gates the form, with show/hide password and
confirmation matching.
- i18n keys (reset.*) for ru/en.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add an email-based "forgot password" flow:
- PasswordResetToken model (stores only a SHA-256 hash, single-use, TTL)
and migration 27 for the password_reset_tokens table.
- POST /api/auth/forgot-password — generic response (no account
enumeration), 60s throttle, emails a one-time reset link via the
existing EmailChannel as a background task.
- GET /api/auth/reset-password/validate — token validity check for the UI.
- POST /api/auth/reset-password — validates the token, enforces the
password policy, sets the new password, clears lock state, invalidates
outstanding tokens and terminates all sessions.
- Configurable link lifetime via PASSWORD_RESET_TOKEN_EXPIRE_MINUTES (30m).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Allow overriding the dep-optimizer cache dir via VITE_CACHE_DIR (the
default node_modules/.vite is root-owned when built in Docker) and honor
a PORT injected by the harness. Both default to prior behavior when the
env vars are unset, so Docker builds are unaffected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Redesign the login page into a two-column layout: a decorative
geometric line pattern on the left (hidden on mobile) and the form on
the right with the PVEmanager logo on top and a footer with a language
switcher + copyright. Add a password show/hide toggle and a "forgot
password" link. Login logic (username/password) is unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add v1.6.0 CHANGELOG entries (EN/RU) for the Images module: cloud-image
catalog, auto-convert to VM template, custom mirrors, arch-aware filtering.
Add feature bullet to README (EN/RU) and a dedicated WIKI section + TOC entry.
Bump VERSION 1.5.2-1 -> 1.6.0.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Retrying a template build failed at download because the qcow2 from a prior
attempt already existed and download-url refuses to overwrite. Now skip the
download when the volume already exists (volume_exists), and surface the PVE
task-log tail on download failure instead of a generic message.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
create_vm_with_import got the display name ('Ubuntu 22.04 LTS (Jammy) Cloud')
which PVE rejects (Parameter verification failed on 'name'). Sanitize to a
DNS-safe name (e.g. ubuntu-22-04-lts-jammy-cloud). Also stop attributing every
create failure to 'import unsupported' — only say that when the error mentions
import; otherwise surface the real error.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Proxmox content=import rejects Ubuntu cloud '*.img' with 'invalid filename
or wrong extension' though the format is qcow2. Rename non-import-extension
files to .qcow2 before download-url; import-from auto-detects the format.
Applied to both download and template workers (download filename + import volid).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- arch filter defaults to amd64 and auto-syncs to the selected node's arch
(useNodeArch), so amd64 nodes no longer show arm64 images by default
- node Select no longer renders raw '__none__'; shows 'Нода' placeholder
and a disabled hint when no nodes are reachable
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GET /proxmox/api/{server_id}/images/node-arch derives amd64/arm64 from
node status current-kernel.machine; returns null when node unreachable.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Admin-only MirrorsManager on ImagesPage: list/add/edit/delete custom
mirrors with kind/arch/url/template/checksum fields; mirror CRUD hooks.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GET/POST/PUT/DELETE /proxmox/api/images/mirrors (perm template:manage).
Enabled mirrors merge into the catalog feed automatically.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
qcow2: 'make VM template' toggle (default on) with disk-storage picker,
cores/memory/bridge and cloud-init user/password fields; routes to
image_template task kind.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Proxmox's guest-agent exec (PVE/QemuServer/Agent.pm) dies with
"Wide character in subroutine entry" when input-data contains non-ASCII
bytes. The growpart script had Cyrillic comments, so the whole auto-grow
call returned 500 and the FS was never resized. Replace those comments
with ASCII so the script reaches the guest.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Settings tab disk-resize UX:
- useResizeDisk/useUpdateConfig now send the required node query param,
fixing the 422 "Field required" error.
- disk device is chosen from the VM's actual disks (defaults to the boot
disk) instead of a hardcoded scsi0.
- show the current disk size, prefill it, and block shrinking before
hitting Proxmox (which rejects it).
- render the growpart output and a grown/not-grown status after resize.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Backend fixes for VM/LXC disk resize:
- resize_vm_disk/resize_container_disk now honor wait_for_task and raise
the real Proxmox exitstatus (e.g. "disk 'scsi0' does not exist") instead
of always returning success.
- add grow_vm_filesystem: after a VM resize, rescan the disk (retry loop,
needed for SATA/SCSI), growpart the partition and resize the FS
(ext*/xfs/btrfs) via the guest agent; surface its output to the API.
- execute_script normalizes CRLF/CR to LF so pasted scripts and growpart
don't break on trailing \r ("partition-number must be a number").
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The monitoring worker wrote Proxmox maxmem/maxdisk (bytes) straight into
the memory/disk_size columns, which the rest of the app stores as MB/GB.
Every sync cycle clobbered correct values with bytes, so the saved-config
card showed huge byte numbers under MB/GB labels. Convert via new
_bytes_to_mb/_bytes_to_gb helpers; existing rows self-heal on next sync.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Allows the shared column filter to be attached to typed VMInstance columns
without a FilterFn<unknown> assignability error.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Backend returns the live `lock` field (clone/create/migrate/...) and the
list shows an amber badge next to the status, so an instance that is
still being cloned no longer looks like a ready stopped VM.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Expose target node, target storage, owner (admin-only) and description
in the clone dialog, wired to the existing backend params. Reset the
form on open and fix the cramped label/field spacing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- _do_clone_sync now tails the PVE clone task log and maps the disk
transfer percentage to deploy progress 50→95% instead of a static 70%.
- Add owner_id to CloneRequest; admins may assign the clone to another
user (mirrors LXC deploy). Register the cloned instance via
save_vm_instance so it has an owner and is visible to limited users.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add ColumnFilter component (Popover-based faceted filter) and a
formatVmConfig helper rendering "N vCPU / X GB RAM / Y GB".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move hardcoded English labels (compute resources, disk resize, raw
config, etc.) to i18n keys and replace ad-hoc mt-1 with consistent
space-y-1.5 between labels and inputs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>