fix(xo-web/proxies): remove "Bind license" for proxies without VM UUID (#6472)
This commit is contained in:
parent
7ede6bdbce
commit
afd47f5522
@ -13,6 +13,8 @@
|
||||
|
||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||
|
||||
- [Licenses] Remove "Bind license" button for proxies whose corresponding VM cannot be found (PR [#6472](https://github.com/vatesfr/xen-orchestra/pull/6472))
|
||||
|
||||
### Packages to release
|
||||
|
||||
> When modifying a package, add it here with its release type.
|
||||
|
@ -2448,6 +2448,7 @@ const messages = {
|
||||
premiumLicense: 'Premium license',
|
||||
trialLicenseInfo: 'You are currently in a {edition} trial period that will end on {date, date, medium}',
|
||||
proxyMultipleLicenses: 'This proxy has more than 1 license!',
|
||||
proxyUnknownVm: 'Unknown proxy VM.',
|
||||
|
||||
// ----- proxies -----
|
||||
deployProxyDisabled: 'Only available to XOA users',
|
||||
|
@ -145,6 +145,14 @@ const COLUMNS = [
|
||||
{
|
||||
name: _('license'),
|
||||
itemRenderer: (proxy, { isAdmin, licensesByVmUuid }) => {
|
||||
if (proxy.vmUuid === undefined) {
|
||||
return (
|
||||
<span className='text-danger'>
|
||||
{_('proxyUnknownVm')} <a href='https://xen-orchestra.com/'>{_('contactUs')}</a>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
const licenses = licensesByVmUuid[proxy.vmUuid]
|
||||
|
||||
// Proxy bound to multiple licenses
|
||||
|
@ -32,6 +32,14 @@ class ProxyLicensesForm extends Component {
|
||||
const { licenseId } = this.state
|
||||
const licenses = userData.licensesByVmUuid[item.vmUuid]
|
||||
|
||||
if (item.vmUuid === undefined) {
|
||||
return (
|
||||
<span className='text-danger'>
|
||||
{_('proxyUnknownVm')} <a href='https://xen-orchestra.com/'>{_('contactUs')}</a>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
// Proxy bound to multiple licenses
|
||||
if (licenses?.length > 1) {
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user