ui: fix pci map selector status column

the 'errors' property changed to 'checks' so we have to adapt here too

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2023-06-19 11:13:30 +02:00 committed by Thomas Lamprecht
parent 7e4e6f00bd
commit b7c7be3e50

View File

@ -43,7 +43,7 @@ Ext.define('PVE.form.PCIMapSelector', {
}, },
{ {
header: gettext('Status'), header: gettext('Status'),
dataIndex: 'errors', dataIndex: 'checks',
renderer: function(value) { renderer: function(value) {
let me = this; let me = this;
@ -51,11 +51,11 @@ Ext.define('PVE.form.PCIMapSelector', {
return `<i class="fa fa-check-circle good"></i> ${gettext('Mapping OK')}`; return `<i class="fa fa-check-circle good"></i> ${gettext('Mapping OK')}`;
} }
let errors = []; let checks = [];
value.forEach((error) => { value.forEach((check) => {
let iconCls; let iconCls;
switch (error?.severity) { switch (check?.severity) {
case 'warning': case 'warning':
iconCls = 'fa-exclamation-circle warning'; iconCls = 'fa-exclamation-circle warning';
break; break;
@ -64,14 +64,14 @@ Ext.define('PVE.form.PCIMapSelector', {
break; break;
} }
let message = error?.message; let message = check?.message;
let icon = `<i class="fa ${iconCls}"></i>`; let icon = `<i class="fa ${iconCls}"></i>`;
if (iconCls !== undefined) { if (iconCls !== undefined) {
errors.push(`${icon} ${message}`); checks.push(`${icon} ${message}`);
} }
}); });
return errors.join('<br>'); return checks.join('<br>');
}, },
flex: 3, flex: 3,
}, },