From: "nansen.su" <nansen.su@sianit.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager v1 2/2] fix #4929: ui: add hidden storage support for iSCSI
Date: Wed, 30 Jul 2025 13:41:40 +0800 [thread overview]
Message-ID: <20250730054139.2277904-2-nansen.su@sianit.com> (raw)
This patch implements the UI components for the hidden storage feature:
- Add hidden checkbox to iSCSI storage edit dialog
- Filter hidden storages from resource tree display
- Include hidden property in storage API response
- Show hidden status in storage management view
This is part 2 of 2 patches that together implement hidden storage
support for iSCSI. This patch depends on the storage plugin changes
submitted to pve-storage.
Depends-on: [PATCH pve-storage v1 1/2] iscsi: add hidden option to hide storage from UI
Signed-off-by: Nansen Su
---
PVE/API2Tools.pm | 1 +
www/manager6/dc/StorageView.js | 7 +++++++
www/manager6/storage/IScsiEdit.js | 10 ++++++++++
www/manager6/tree/ResourceTree.js | 4 ++++
4 files changed, 22 insertions(+)
diff --git a/PVE/API2Tools.pm b/PVE/API2Tools.pm
index d6154925..6a82c800 100644
--- a/PVE/API2Tools.pm
+++ b/PVE/API2Tools.pm
@@ -149,6 +149,7 @@ sub extract_storage_stats {
status => 'unknown',
shared => $scfg->{shared} || 0,
content => $content,
+ hidden => $scfg->{hidden} || 0,
};
if (my $d = $rrd->{"pve2-storage/$node/$storeid"}) {
diff --git a/www/manager6/dc/StorageView.js b/www/manager6/dc/StorageView.js
index e4c6f07d..93e5ffec 100644
--- a/www/manager6/dc/StorageView.js
+++ b/www/manager6/dc/StorageView.js
@@ -154,6 +154,13 @@ Ext.define(
sortable: true,
dataIndex: 'bwlimit',
},
+ {
+ header: gettext('Hidden'),
+ flex: 1,
+ sortable: true,
+ dataIndex: 'hidden',
+ renderer: Proxmox.Utils.format_boolean,
+ },
],
listeners: {
activate: () => store.load(),
diff --git a/www/manager6/storage/IScsiEdit.js b/www/manager6/storage/IScsiEdit.js
index cd474f7d..283aec09 100644
--- a/www/manager6/storage/IScsiEdit.js
+++ b/www/manager6/storage/IScsiEdit.js
@@ -145,5 +145,15 @@ Ext.define('PVE.storage.IScsiInputPanel', {
checked: true,
fieldLabel: gettext('Use LUNs directly'),
},
+ {
+ xtype: 'checkbox',
+ name: 'hidden',
+ uncheckedValue: 0,
+ fieldLabel: gettext('Hide in UI'),
+ autoEl: {
+ tag: 'div',
+ 'data-qtip': gettext('Hide this storage from the resource tree'),
+ },
+ },
],
});
diff --git a/www/manager6/tree/ResourceTree.js b/www/manager6/tree/ResourceTree.js
index 58611aa3..d9ec67e5 100644
--- a/www/manager6/tree/ResourceTree.js
+++ b/www/manager6/tree/ResourceTree.js
@@ -425,6 +425,10 @@ Ext.define('PVE.tree.ResourceTree', {
if (filterFn && !filterFn(item)) {
return;
}
+ // skip hidden storage
+ if (item.data.type === 'storage' && item.data.hidden) {
+ return;
+ }
let info = Ext.apply({ leaf: true }, item.data);
let child = me.groupChild(rootnode, info, groups, 0);
--
2.50.1
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
reply other threads:[~2025-07-30 5:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250730054139.2277904-2-nansen.su@sianit.com \
--to=nansen.su@sianit.com \
--cc=pve-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