From: Filip Schauer <f.schauer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager v3 07/11] ui: split resource mapping types into tabbed views
Date: Mon, 10 Feb 2025 16:37:30 +0100 [thread overview]
Message-ID: <20250210153734.103381-8-f.schauer@proxmox.com> (raw)
In-Reply-To: <20250210153734.103381-1-f.schauer@proxmox.com>
Reorganize resource mapping types into separate views accessible via
tabs.
Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
---
www/manager6/Makefile | 13 ++---
www/manager6/dc/Config.js | 51 +++----------------
.../{window => resource-map}/HWRNGMapEdit.js | 2 +-
.../{dc => resource-map}/HWRNGMapView.js | 4 +-
.../{window => resource-map}/PCIMapEdit.js | 2 +-
.../{dc => resource-map}/PCIMapView.js | 4 +-
www/manager6/resource-map/ResourceMapView.js | 23 +++++++++
.../{window => resource-map}/USBMapEdit.js | 2 +-
.../{dc => resource-map}/USBMapView.js | 4 +-
9 files changed, 45 insertions(+), 60 deletions(-)
rename www/manager6/{window => resource-map}/HWRNGMapEdit.js (98%)
rename www/manager6/{dc => resource-map}/HWRNGMapView.js (93%)
rename www/manager6/{window => resource-map}/PCIMapEdit.js (99%)
rename www/manager6/{dc => resource-map}/PCIMapView.js (96%)
create mode 100644 www/manager6/resource-map/ResourceMapView.js
rename www/manager6/{window => resource-map}/USBMapEdit.js (99%)
rename www/manager6/{dc => resource-map}/USBMapView.js (95%)
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index d148a1c9..e13899b5 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -137,9 +137,6 @@ JSSRC= \
window/GuestDiskReassign.js \
window/GuestStop.js \
window/TreeSettingsEdit.js \
- window/PCIMapEdit.js \
- window/USBMapEdit.js \
- window/HWRNGMapEdit.js \
window/GuestImport.js \
ha/Fencing.js \
ha/GroupEdit.js \
@@ -188,9 +185,6 @@ JSSRC= \
dc/UserTagAccessEdit.js \
dc/RegisteredTagsEdit.js \
dc/RealmSyncJob.js \
- dc/PCIMapView.js \
- dc/USBMapView.js \
- dc/HWRNGMapView.js \
lxc/CmdMenu.js \
lxc/Config.js \
lxc/CreateWizard.js \
@@ -271,6 +265,13 @@ JSSRC= \
qemu/Smbios1Edit.js \
qemu/SystemEdit.js \
qemu/USBEdit.js \
+ resource-map/PCIMapEdit.js \
+ resource-map/USBMapEdit.js \
+ resource-map/HWRNGMapEdit.js \
+ resource-map/PCIMapView.js \
+ resource-map/ResourceMapView.js \
+ resource-map/USBMapView.js \
+ resource-map/HWRNGMapView.js \
sdn/Browser.js \
sdn/ControllerView.js \
sdn/Status.js \
diff --git a/www/manager6/dc/Config.js b/www/manager6/dc/Config.js
index 3650f290..1dc82dee 100644
--- a/www/manager6/dc/Config.js
+++ b/www/manager6/dc/Config.js
@@ -297,51 +297,12 @@ Ext.define('PVE.dc.Config', {
if (caps.mapping['Mapping.Audit'] ||
caps.mapping['Mapping.Use'] ||
caps.mapping['Mapping.Modify']) {
- me.items.push(
- {
- xtype: 'container',
- onlineHelp: 'resource_mapping',
- title: gettext('Resource Mappings'),
- itemId: 'resources',
- iconCls: 'fa fa-folder-o',
- layout: {
- type: 'vbox',
- align: 'stretch',
- multi: true,
- },
- scrollable: true,
- defaults: {
- border: false,
- },
- items: [
- {
- xtype: 'pveDcPCIMapView',
- title: gettext('PCI Devices'),
- flex: 1,
- },
- {
- xtype: 'splitter',
- collapsible: false,
- performCollapse: false,
- },
- {
- xtype: 'pveDcUSBMapView',
- title: gettext('USB Devices'),
- flex: 1,
- },
- {
- xtype: 'splitter',
- collapsible: false,
- performCollapse: false,
- },
- {
- xtype: 'pveDcHWRNGMapView',
- title: gettext('Hardware RNG Devices'),
- flex: 1,
- },
- ],
- },
- );
+ me.items.push({
+ xtype: 'pveResourceMapView',
+ title: gettext('Resource Mappings'),
+ itemId: 'resources',
+ iconCls: 'fa fa-folder-o',
+ });
}
if (caps.mapping['Mapping.Audit'] ||
diff --git a/www/manager6/window/HWRNGMapEdit.js b/www/manager6/resource-map/HWRNGMapEdit.js
similarity index 98%
rename from www/manager6/window/HWRNGMapEdit.js
rename to www/manager6/resource-map/HWRNGMapEdit.js
index aef4e2af..a6ba0641 100644
--- a/www/manager6/window/HWRNGMapEdit.js
+++ b/www/manager6/resource-map/HWRNGMapEdit.js
@@ -1,4 +1,4 @@
-Ext.define('PVE.window.HWRNGMapEditWindow', {
+Ext.define('PVE.resource-map.HWRNGMapEditWindow', {
extend: 'Proxmox.window.Edit',
mixins: ['Proxmox.Mixin.CBind'],
diff --git a/www/manager6/dc/HWRNGMapView.js b/www/manager6/resource-map/HWRNGMapView.js
similarity index 93%
rename from www/manager6/dc/HWRNGMapView.js
rename to www/manager6/resource-map/HWRNGMapView.js
index 27c0d2fc..dbd96ea8 100644
--- a/www/manager6/dc/HWRNGMapView.js
+++ b/www/manager6/resource-map/HWRNGMapView.js
@@ -4,11 +4,11 @@ Ext.define('pve-resource-hwrng-tree', {
fields: ['type', 'text', 'path', 'description', 'digest'],
});
-Ext.define('PVE.dc.HWRNGMapView', {
+Ext.define('PVE.resource-map.HWRNGMapView', {
extend: 'PVE.tree.ResourceMapTree',
alias: 'widget.pveDcHWRNGMapView',
- editWindowClass: 'PVE.window.HWRNGMapEditWindow',
+ editWindowClass: 'PVE.resource-map.HWRNGMapEditWindow',
baseUrl: '/cluster/mapping/hwrng',
mapIconCls: 'pve-itype-icon-die',
getStatusCheckUrl: (node) => `/nodes/${node}/hardware/hwrng`,
diff --git a/www/manager6/window/PCIMapEdit.js b/www/manager6/resource-map/PCIMapEdit.js
similarity index 99%
rename from www/manager6/window/PCIMapEdit.js
rename to www/manager6/resource-map/PCIMapEdit.js
index faf58255..8146ebbd 100644
--- a/www/manager6/window/PCIMapEdit.js
+++ b/www/manager6/resource-map/PCIMapEdit.js
@@ -1,4 +1,4 @@
-Ext.define('PVE.window.PCIMapEditWindow', {
+Ext.define('PVE.resource-map.PCIMapEditWindow', {
extend: 'Proxmox.window.Edit',
mixins: ['Proxmox.Mixin.CBind'],
diff --git a/www/manager6/dc/PCIMapView.js b/www/manager6/resource-map/PCIMapView.js
similarity index 96%
rename from www/manager6/dc/PCIMapView.js
rename to www/manager6/resource-map/PCIMapView.js
index 80fe3c0f..c5b11f96 100644
--- a/www/manager6/dc/PCIMapView.js
+++ b/www/manager6/resource-map/PCIMapView.js
@@ -4,11 +4,11 @@ Ext.define('pve-resource-pci-tree', {
fields: ['type', 'text', 'path', 'id', 'subsystem-id', 'iommugroup', 'description', 'digest'],
});
-Ext.define('PVE.dc.PCIMapView', {
+Ext.define('PVE.resource-map.PCIMapView', {
extend: 'PVE.tree.ResourceMapTree',
alias: 'widget.pveDcPCIMapView',
- editWindowClass: 'PVE.window.PCIMapEditWindow',
+ editWindowClass: 'PVE.resource-map.PCIMapEditWindow',
baseUrl: '/cluster/mapping/pci',
mapIconCls: 'pve-itype-icon-pci',
getStatusCheckUrl: (node) => `/nodes/${node}/hardware/pci?pci-class-blacklist=`,
diff --git a/www/manager6/resource-map/ResourceMapView.js b/www/manager6/resource-map/ResourceMapView.js
new file mode 100644
index 00000000..dcf2cc2d
--- /dev/null
+++ b/www/manager6/resource-map/ResourceMapView.js
@@ -0,0 +1,23 @@
+Ext.define('PVE.resource-map.ResourceMapView', {
+ extend: 'Ext.tab.Panel',
+ alias: 'widget.pveResourceMapView',
+ online_help: 'resource_mapping',
+
+ items: [
+ {
+ xtype: 'pveDcPCIMapView',
+ title: gettext('PCI Devices'),
+ itemId: 'pci-map',
+ },
+ {
+ xtype: 'pveDcUSBMapView',
+ title: gettext('USB Devices'),
+ itemId: 'usb-map',
+ },
+ {
+ xtype: 'pveDcHWRNGMapView',
+ title: gettext('Hardware RNG Devices'),
+ itemId: 'hwrng-map',
+ },
+ ],
+});
diff --git a/www/manager6/window/USBMapEdit.js b/www/manager6/resource-map/USBMapEdit.js
similarity index 99%
rename from www/manager6/window/USBMapEdit.js
rename to www/manager6/resource-map/USBMapEdit.js
index 69a40026..6af0ad07 100644
--- a/www/manager6/window/USBMapEdit.js
+++ b/www/manager6/resource-map/USBMapEdit.js
@@ -1,4 +1,4 @@
-Ext.define('PVE.window.USBMapEditWindow', {
+Ext.define('PVE.resource-map.USBMapEditWindow', {
extend: 'Proxmox.window.Edit',
mixins: ['Proxmox.Mixin.CBind'],
diff --git a/www/manager6/dc/USBMapView.js b/www/manager6/resource-map/USBMapView.js
similarity index 95%
rename from www/manager6/dc/USBMapView.js
rename to www/manager6/resource-map/USBMapView.js
index 96edc587..551f9472 100644
--- a/www/manager6/dc/USBMapView.js
+++ b/www/manager6/resource-map/USBMapView.js
@@ -4,11 +4,11 @@ Ext.define('pve-resource-usb-tree', {
fields: ['type', 'text', 'path', 'id', 'description', 'digest'],
});
-Ext.define('PVE.dc.USBMapView', {
+Ext.define('PVE.resource-map.USBMapView', {
extend: 'PVE.tree.ResourceMapTree',
alias: 'widget.pveDcUSBMapView',
- editWindowClass: 'PVE.window.USBMapEditWindow',
+ editWindowClass: 'PVE.resource-map.USBMapEditWindow',
baseUrl: '/cluster/mapping/usb',
mapIconCls: 'fa fa-usb',
getStatusCheckUrl: (node) => `/nodes/${node}/hardware/usb`,
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-02-10 15:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 15:37 [pve-devel] [PATCH cluster/guest-common/manager/qemu-server v3 00/11] fix #5657: allow configuring RNG device as non-root user Filip Schauer
2025-02-10 15:37 ` [pve-devel] [PATCH guest-common v3 01/11] mapping: add a hardware RNG mapping config Filip Schauer
2025-02-10 15:37 ` [pve-devel] [PATCH cluster v3 02/11] cfs: add 'mapping/hwrng.cfg' to observed files Filip Schauer
2025-02-10 15:37 ` [pve-devel] [PATCH manager v3 03/11] introduce hardware rng mapping api Filip Schauer
2025-02-10 15:37 ` [pve-devel] [PATCH manager v3 04/11] introduce hardware rng scanning api Filip Schauer
2025-02-10 15:37 ` [pve-devel] [PATCH manager v3 05/11] ui: add hardware RNG resource mapping Filip Schauer
2025-02-10 15:37 ` [pve-devel] [PATCH manager v3 06/11] ui: allow use of mapped hardware RNGs as entropy sources for VMs Filip Schauer
2025-02-10 15:37 ` Filip Schauer [this message]
2025-02-10 15:37 ` [pve-devel] [PATCH qemu-server v3 08/11] refactor: move rng related code into its own module Filip Schauer
2025-02-10 15:37 ` [pve-devel] [PATCH qemu-server v3 09/11] add helpers for VirtIO RNG command line arguments Filip Schauer
2025-02-10 15:37 ` [pve-devel] [PATCH qemu-server v3 10/11] allow non-root users to set /dev/u?random as an RNG source Filip Schauer
2025-02-11 12:34 ` Fabian Grünbichler
2025-02-10 15:37 ` [pve-devel] [PATCH qemu-server v3 11/11] let VirtIO RNG devices source entropy from mapped HWRNGs Filip Schauer
2025-02-11 12:34 ` Fabian Grünbichler
2025-02-11 12:34 ` [pve-devel] [PATCH cluster/guest-common/manager/qemu-server v3 00/11] fix #5657: allow configuring RNG device as non-root user Fabian Grünbichler
2025-02-18 11:17 ` Filip Schauer
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=20250210153734.103381-8-f.schauer@proxmox.com \
--to=f.schauer@proxmox.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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal