feat: several slot areas per device, e.g. front bays and a PCIe card
Disks that are not in the front bays, such as NVMe SSDs on a PCIe card or M.2 SSDs on a boot card, can now be documented in their own slot area. - A device can have several areas, each with name, order, slot count, rows, first slot, numbering and form factor; the tab shows one grid per area with its own fill, select and edit actions. - Add area, edit area and delete empty areas on the Disks tab. - Slot numbers are unique per area; drag and drop also moves or swaps disks between areas. - Device type templates store all areas; Apply template creates the missing ones. - Disks get a bay field in forms, CSV import (bay column, optional when the device has one area), REST API, GraphQL, filters and tables. - Migration 0010 turns every existing layout into the area "Front" and assigns the existing disks to it. - The grouped disk overview shows the area in its own column and centres the slot number. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
14cb5d5829
commit
d45afa5e54
19 files changed
+644
-238
No files matched your search
@@ -74,6 +74,7 @@
|
||||
event.preventDefault();
|
||||
const body = new FormData();
|
||||
body.append("disk", dragged.dataset.nbuDisk);
|
||||
body.append("bay", target.dataset.nbuBay);
|
||||
body.append("slot", target.dataset.nbuSlot);
|
||||
grid.classList.add("nbu-disk-busy");
|
||||
try {
|
||||
@@ -129,12 +130,9 @@
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const grid = document.getElementById("nbu-disk-grid-form");
|
||||
if (grid) {
|
||||
initSlotGrid(grid);
|
||||
const slots = grid.querySelector(".nbu-disk-grid");
|
||||
if (slots) initDragAndDrop(slots);
|
||||
}
|
||||
for (const form of document.querySelectorAll("[data-nbu-grid-form]")) initSlotGrid(form);
|
||||
const bays = document.getElementById("nbu-disk-bays");
|
||||
if (bays) initDragAndDrop(bays);
|
||||
const fill = document.getElementById("nbu-disk-fill-form");
|
||||
if (fill) initFillForm(fill);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user