Align sized cluster seeds and GET dumps with PVE wire shapes; restyle DATA panel.
- Scale small/large/big seeds (3×50 / 10×1000 / 20×2000) with proportional backups, snapshots, HA, replication, Ceph capacity, and OSD totals (10 / 100 / 500) plus matching node disks and crush/pg metadata - Enrich handler responses for apt, certificates, qemu/lxc status, storage, SDN, metrics export, and related cluster/node dumps - Flatten nested body_example fields into PARAMS and sync the request body via dotted paths (oVirt-style) - Restyle DATA controls as size cards with full-width Reset to minimal / Refresh stats; unload reloads the minimal cluster
This commit is contained in:
+14
-3
@@ -129,13 +129,24 @@ def storage_payload(row: Any) -> dict[str, Any]:
|
||||
total = int(row["capacity_bytes"] or 0)
|
||||
used = int(row["used_bytes"] or 0)
|
||||
avail = max(total - used, 0)
|
||||
storage_type = str(row["storage_type"])
|
||||
formats = config.get("formats")
|
||||
if not isinstance(formats, str) or not formats:
|
||||
formats = {
|
||||
"dir": "raw,qcow2,vmdk",
|
||||
"lvmthin": "raw",
|
||||
"rbd": "raw",
|
||||
"zfspool": "raw,subvol",
|
||||
}.get(storage_type, "raw")
|
||||
payload: dict[str, Any] = {
|
||||
"storage": str(row["storage_id"]),
|
||||
"type": str(row["storage_type"]),
|
||||
"type": storage_type,
|
||||
"shared": int(bool(row["shared"])),
|
||||
"content": content_str,
|
||||
"active": 1,
|
||||
"enabled": 1,
|
||||
"active": int(bool(config.get("active", True))),
|
||||
"enabled": int(bool(config.get("enabled", True))),
|
||||
"formats": formats,
|
||||
"select_existing": int(bool(config.get("select_existing", False))),
|
||||
"total": total,
|
||||
"used": used,
|
||||
"avail": avail,
|
||||
|
||||
Reference in New Issue
Block a user