mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-10-04 21:10:03 +00:00
ui: add resource mapping view for directories
To save vertical space in the Resource Mappings tab, there is a temporary Directory Mappings tab until we find content fitting the general 'resource mapping' panel and can put all types as submenu items. Signed-off-by: Markus Frank <m.frank@proxmox.com> Link: https://lore.proxmox.com/20250407134950.265270-9-m.frank@proxmox.com Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
04078c7b9b
commit
3ac01b4ede
@ -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 \
|
||||
|
@ -331,6 +331,12 @@ Ext.define('PVE.dc.Config', {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
xtype: 'pveDcDirMapView',
|
||||
itemId: 'directories',
|
||||
title: gettext('Directory Mappings'),
|
||||
iconCls: 'fa fa-folder',
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
38
www/manager6/dc/DirMapView.js
Normal file
38
www/manager6/dc/DirMapView.js
Normal file
@ -0,0 +1,38 @@
|
||||
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,
|
||||
},
|
||||
{
|
||||
header: gettext('Comment'),
|
||||
dataIndex: 'description',
|
||||
renderer: function(value, _meta, record) {
|
||||
return Ext.String.htmlEncode(value ?? record.data.comment);
|
||||
},
|
||||
flex: 1,
|
||||
},
|
||||
],
|
||||
});
|
Loading…
Reference in New Issue
Block a user