mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-24 20:31:36 +00:00

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>
39 lines
852 B
JavaScript
39 lines
852 B
JavaScript
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,
|
|
},
|
|
],
|
|
});
|