From 4e8fb66e25f81ae2123783310b65fd36117bcbc7 Mon Sep 17 00:00:00 2001 From: "othman.suseno" Date: Thu, 18 Dec 2025 16:19:00 +0700 Subject: [PATCH] modified storage view --- web/templates/storage.html | 61 ++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 19 deletions(-) diff --git a/web/templates/storage.html b/web/templates/storage.html index 7d06a69..a2b89cb 100644 --- a/web/templates/storage.html +++ b/web/templates/storage.html @@ -100,8 +100,8 @@
-
-

Loading...

+
+

Loading...

@@ -500,49 +500,72 @@ async function loadDisks() { // Update summary summaryEl.textContent = `Disk: ${disks.length}`; - // Visual disk blocks (like QNAP) - using slate theme + // Visual disk blocks (like QNAP) - using slate theme with numbered slots visualEl.innerHTML = disks.map((disk, index) => { // Available disks - using slate theme colors + const slotNumber = index + 1; const statusColor = 'bg-slate-700'; const statusBorder = 'border-slate-500'; - const accentColor = 'border-blue-500'; return `
-
-
-
- + +
+ ${slotNumber} +
+ + +
+
+ +
-
-
${disk.name}
-
${disk.size || 'N/A'}
+ + +
+
+ ${disk.name} +
+
+ ${disk.size || 'N/A'} +
+
+ ${disk.path || `/dev/${disk.name}`} +
+ -
-
+
+
`; }).join(''); - // Detailed disk list - listEl.innerHTML = disks.map(disk => { + // Detailed disk list with slot numbers + listEl.innerHTML = disks.map((disk, index) => { const status = 'Available'; const statusColor = 'bg-slate-700 text-slate-200'; const diskPath = disk.path || `/dev/${disk.name}`; + const slotNumber = index + 1; return `
+ +
+ ${slotNumber} +
+
@@ -554,7 +577,7 @@ async function loadDisks() {
-

${disk.name}

+

${disk.name}

${status} ${diskPath}
@@ -572,8 +595,8 @@ async function loadDisks() {
` : ''}
- Type: - Physical Disk + Slot: + #${slotNumber}