mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 03:36:48 +00:00
feat(instances): the Resize tab shows how much a VM has within its maximum
Each sub-tab (CPU, Memory, Disks) opened on a two-column card that put a heading and a sentence of current values beside the forms, and the CPU tab added two more rows: Live vCPUs as a row of "0 · Fixed / 1 · On" buttons and vCPU hot plug as a select with its own Save. Now each sub-tab opens on the VM's size. CPU: one cell per vCPU up to the maximum, filled when on, with "2 on, up to 4" and the host's logical CPUs; on a running VM with hot-pluggable vCPUs the cells are the buttons that turn them on and off. Memory: a bar of the current memory within the maximum, with the host's memory. Disks: a row per disk with its format, size now and a new size. The forms below keep their names and posts; the CPU fields are disabled while the VM runs, and hot plug is a switch that posts on change. A memory or disk resize returns to its own sub-tab.
This commit is contained in:
parent
103ce111ef
commit
607c8381b4
12 changed files with 543 additions and 619 deletions
|
|
@ -132,6 +132,34 @@ th[aria-sort="ascending"]:not([data-sort-method="none"])::after {
|
|||
/* the access tab's two login buttons line up */
|
||||
.access-act { min-width: 9rem; }
|
||||
|
||||
/* the resize tab: one cell per vCPU up to the maximum, filled when on; memory now within its maximum */
|
||||
.vcpu-cell {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 2.25rem;
|
||||
height: 2.25rem;
|
||||
padding: 0 .4rem;
|
||||
border-radius: var(--bs-border-radius);
|
||||
border: 2px solid var(--bs-primary);
|
||||
background: var(--bs-body-bg);
|
||||
color: var(--bs-primary);
|
||||
font-size: .875rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
.vcpu-cell.on { background: var(--bs-primary); color: #fff; }
|
||||
button.vcpu-cell:not(:disabled):hover { box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .25); }
|
||||
button.vcpu-cell:disabled { opacity: .65; }
|
||||
.memory-bar {
|
||||
width: min(18rem, 100%);
|
||||
height: .9rem;
|
||||
border: 2px solid var(--bs-primary);
|
||||
border-radius: var(--bs-border-radius);
|
||||
overflow: hidden;
|
||||
}
|
||||
.memory-bar-now { height: 100%; background: var(--bs-primary); }
|
||||
.resize-act { min-width: 9rem; }
|
||||
|
||||
/* the boot order: the devices the VM tries in turn, numbered and joined by a line */
|
||||
.boot-chain { counter-reset: boot; }
|
||||
.boot-node { position: relative; padding: .5rem 0; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue