feat(xo-web/proxy): make proxy address editable (#6816)

This commit is contained in:
Mathieu
2023-05-16 10:12:31 +00:00
committed by GitHub
parent 01ba10fedb
commit 315e5c9289
2 changed files with 16 additions and 2 deletions

View File

@@ -7,6 +7,8 @@
> Users must be able to say: “Nice enhancement, I'm eager to test it”
- [Proxy] Make proxy address editable (PR [#6816](https://github.com/vatesfr/xen-orchestra/pull/6816))
### Bug fixes
> Users must be able to say: “I had this issue, happy to know it's fixed”
@@ -31,6 +33,6 @@
<!--packages-start-->
- xen-api patch
- xo-web patch
- xo-web minor
<!--packages-end-->

View File

@@ -37,7 +37,13 @@ import { updateApplianceSettings } from './update-appliance-settings'
import Tooltip from '../../common/tooltip'
import { getXoaPlan, SOURCES } from '../../common/xoa-plans'
const _editProxy = (value, { name, proxy }) => editProxyAppliance(proxy, { [name]: value })
const _editProxy = (value, { name, proxy }) => {
if (typeof value === 'string') {
value = value.trim()
value = value === '' ? null : value
}
return editProxyAppliance(proxy, { [name]: value })
}
const HEADER = (
<h2>
@@ -143,6 +149,12 @@ const COLUMNS = [
itemRenderer: proxy => <Vm id={proxy.vmUuid} link />,
name: _('vm'),
},
{
itemRenderer: proxy => (
<Text data-name='address' data-proxy={proxy} value={proxy.address ?? ''} onChange={_editProxy} />
),
name: _('address'),
},
{
name: _('license'),
itemRenderer: (proxy, { isAdmin, licensesByVmUuid }) => {