fix: Fix port download

fix port download

Change-Id: I00678744b5cd9b7729712c5d1564dc75fe3718ec
This commit is contained in:
zhuyue 2021-09-02 14:47:35 +08:00
parent e63243dbb4
commit 50454df894

View File

@ -142,6 +142,15 @@ export default class VirtualAdapter extends Base {
{ {
title: t('Bind Resource'), title: t('Bind Resource'),
dataIndex: 'server_name', dataIndex: 'server_name',
stringify: (server_name, item) => {
if (item.device_id && item.device_owner === 'compute:nova') {
return `${item.device_owner} \n ${item.device_id} (${server_name})`;
}
return `
${item.device_owner} ${item.device_owner && `\n`}
${item.device_id || '-'}
`;
},
render: (server_name, item) => { render: (server_name, item) => {
if (item.device_id && item.device_owner === 'compute:nova') { if (item.device_id && item.device_owner === 'compute:nova') {
return ( return (