From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 9A2761FF38E for ; Tue, 14 May 2024 12:55:57 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id F2DD0585C; Tue, 14 May 2024 12:55:27 +0200 (CEST) From: Markus Frank To: pve-devel@lists.proxmox.com Date: Tue, 14 May 2024 12:54:40 +0200 Message-Id: <20240514105442.1187746-10-m.frank@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240514105442.1187746-1-m.frank@proxmox.com> References: <20240514105442.1187746-1-m.frank@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.027 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager v10 09/11] ui: ResourceMapTree for DIR X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Signed-off-by: Markus Frank --- www/manager6/Makefile | 1 + www/manager6/dc/Config.js | 10 +++++++ www/manager6/dc/DirMapView.js | 50 +++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 www/manager6/dc/DirMapView.js diff --git a/www/manager6/Makefile b/www/manager6/Makefile index f6140562..5a3541e0 100644 --- a/www/manager6/Makefile +++ b/www/manager6/Makefile @@ -189,6 +189,7 @@ JSSRC= \ dc/RealmSyncJob.js \ dc/PCIMapView.js \ dc/USBMapView.js \ + dc/DirMapView.js \ lxc/CmdMenu.js \ lxc/Config.js \ lxc/CreateWizard.js \ diff --git a/www/manager6/dc/Config.js b/www/manager6/dc/Config.js index ddbb58b1..3355c835 100644 --- a/www/manager6/dc/Config.js +++ b/www/manager6/dc/Config.js @@ -320,6 +320,16 @@ Ext.define('PVE.dc.Config', { title: gettext('USB Devices'), flex: 1, }, + { + xtype: 'splitter', + collapsible: false, + performCollapse: false, + }, + { + xtype: 'pveDcDirMapView', + title: gettext('Directories'), + flex: 1, + }, ], }, ); diff --git a/www/manager6/dc/DirMapView.js b/www/manager6/dc/DirMapView.js new file mode 100644 index 00000000..4468e951 --- /dev/null +++ b/www/manager6/dc/DirMapView.js @@ -0,0 +1,50 @@ +Ext.define('pve-resource-dir-tree', { + extend: 'Ext.data.Model', + idProperty: 'internalId', + fields: ['type', 'text', 'path', 'id', 'description', 'digest'], +}); + +Ext.define('PVE.dc.DirMapView', { + extend: 'PVE.tree.ResourceMapTree', + alias: 'widget.pveDcDirMapView', + + editWindowClass: 'PVE.window.DirMapEditWindow', + baseUrl: '/cluster/mapping/dir', + mapIconCls: 'fa fa-folder', + entryIdProperty: 'path', + + store: { + sorters: 'text', + model: 'pve-resource-dir-tree', + data: {}, + }, + + columns: [ + { + xtype: 'treecolumn', + text: gettext('ID/Node'), + dataIndex: 'text', + width: 200, + }, + { + text: gettext('xattr'), + dataIndex: 'xattr', + }, + { + text: gettext('acl'), + dataIndex: 'acl', + }, + { + text: gettext('submounts'), + dataIndex: 'submounts', + }, + { + header: gettext('Comment'), + dataIndex: 'description', + renderer: function(value, _meta, record) { + return value ?? record.data.comment; + }, + flex: 1, + }, + ], +}); -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel