mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 00:24:03 +00:00
ui: bootorder: show device type as icon for UX
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
595c30aa62
commit
dd27ec6d3a
@ -149,6 +149,24 @@ Ext.define('PVE.qemu.BootOrderPanel', {
|
|||||||
header: gettext('Device'),
|
header: gettext('Device'),
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
flex: 6,
|
flex: 6,
|
||||||
|
renderer: (value, metaData, record, rowIndex) => {
|
||||||
|
let desc = record.get('desc');
|
||||||
|
|
||||||
|
let icon = '', iconCls;
|
||||||
|
if (value.match(/^net\d+$/)) {
|
||||||
|
iconCls = 'exchange';
|
||||||
|
} else if (desc.match(/media=cdrom/)) {
|
||||||
|
metaData.tdCls = 'pve-itype-icon-cdrom';
|
||||||
|
} else {
|
||||||
|
iconCls = 'hdd-o';
|
||||||
|
}
|
||||||
|
if (iconCls !== undefined) {
|
||||||
|
metaData.tdCls += 'pve-itype-fa';
|
||||||
|
icon = `<i class="pve-grid-fa fa fa-fw fa-${iconCls}"></i>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return icon + value;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: gettext('Description'),
|
header: gettext('Description'),
|
||||||
|
Loading…
Reference in New Issue
Block a user