fix(xo-web/proxies): proxy VM should be in RO (#4947)

This commit is contained in:
badrAZ 2020-04-24 11:16:07 +02:00 committed by GitHub
parent 53f9b5d131
commit 7775df8ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@ import React from 'react'
import SortedTable from 'sorted-table'
import { adminOnly } from 'utils'
import { provideState, injectState } from 'reaclette'
import { Text, XoSelect } from 'editable'
import { Text } from 'editable'
import { Vm } from 'render-xo-item'
import { withRouter } from 'react-router'
import {
@ -136,29 +136,8 @@ const COLUMNS = [
sortCriteria: 'address',
},
{
itemRenderer: proxy => (
<XoSelect
onChange={value => _editProxy(value, { name: 'vm', proxy })}
value={proxy.vmUuid}
xoType='VM'
>
{proxy.vmUuid !== undefined ? (
<div>
<Vm id={proxy.vmUuid} />{' '}
<a
role='button'
onClick={() => _editProxy(null, { name: 'vm', proxy })}
>
<Icon icon='remove' />
</a>
</div>
) : (
_('noValue')
)}
</XoSelect>
),
itemRenderer: proxy => <Vm id={proxy.vmUuid} link newTab />,
name: _('vm'),
sortCriteria: 'vm',
},
]