From: Hannes Laimer <h.laimer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-widget-toolkit v2 1/1] ui: DiskLisk: handle partition data from PBS backend
Date: Wed, 8 Jun 2022 08:51:54 +0000 [thread overview]
Message-ID: <20220608085154.11271-5-h.laimer@proxmox.com> (raw)
In-Reply-To: <20220608085154.11271-1-h.laimer@proxmox.com>
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
src/panel/DiskList.js | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/panel/DiskList.js b/src/panel/DiskList.js
index 76d92cd..c5a0050 100644
--- a/src/panel/DiskList.js
+++ b/src/panel/DiskList.js
@@ -167,10 +167,19 @@ Ext.define('Proxmox.DiskList', {
for (const item of records) {
let data = item.data;
- data.leaf = true;
data.expanded = true;
- data.children = [];
+ data.children = data.partitions ?? [];
+ for (let p of data.children) {
+ p['disk-type'] = 'partition';
+ p.iconCls = 'fa fa-fw fa-hdd-o x-fa-tree';
+ p.used = p.used === 'filesystem' ? p.filesystem : p.used;
+ p.parent = data.devpath;
+ p.children = [];
+ p.leaf = true;
+ }
data.iconCls = 'fa fa-fw fa-hdd-o x-fa-tree';
+ data.leaf = data.children.length === 0;
+
if (!data.parent) {
disks[data.devpath] = data;
}
@@ -227,6 +236,15 @@ Ext.define('Proxmox.DiskList', {
extendedInfo = `, Ceph (${types.join(', ')})`;
}
}
+ const formatMap = {
+ 'bios': 'BIOS boot',
+ 'zfsreserved': 'ZFS reserved',
+ 'efi': 'EFI',
+ 'lvm': 'LVM',
+ 'zfs': 'ZFS',
+ };
+
+ v = formatMap[v] || v;
return v ? `${v}${extendedInfo}` : Proxmox.Utils.noText;
},
--
2.30.2
next prev parent reply other threads:[~2022-06-08 8:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 8:51 [pbs-devel] [PATCH proxmox-backup/proxmox-widget-toolkit v2 0/4] add partitions to disks/list endpoint Hannes Laimer
2022-06-08 8:51 ` [pbs-devel] [PATCH proxmox-backup v2 1/3] api2: disks endpoint return partitions Hannes Laimer
2022-06-08 8:51 ` [pbs-devel] [PATCH proxmox-backup v2 2/3] disks: use builder pattern for querying disk usage Hannes Laimer
2022-06-09 10:38 ` Wolfgang Bumiller
2022-06-15 6:07 ` [pbs-devel] [PATCH proxmox-backup v3 " Hannes Laimer
2022-06-15 6:17 ` Hannes Laimer
2022-06-08 8:51 ` [pbs-devel] [PATCH proxmox-backup v2 3/3] ui: disks: show partitions by default Hannes Laimer
2022-06-08 8:51 ` Hannes Laimer [this message]
2022-06-15 8:58 ` [pbs-devel] applied: [PATCH proxmox-widget-toolkit v2 1/1] ui: DiskLisk: handle partition data from PBS backend Wolfgang Bumiller
2022-06-15 7:58 ` [pbs-devel] [PATCH proxmox-backup/proxmox-widget-toolkit v2 0/4] add partitions to disks/list endpoint Wolfgang Bumiller
2022-06-15 8:08 ` Dominik Csapak
2022-06-15 8:10 ` Hannes Laimer
2022-06-15 8:17 ` Wolfgang Bumiller
2022-06-15 9:09 ` [pbs-devel] applied-series: [PATCH proxmox-backup/proxmox-widget-toolkit v2 0/4] add partitions to disks/list endpointg Wolfgang Bumiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220608085154.11271-5-h.laimer@proxmox.com \
--to=h.laimer@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox