chore(xo-web/xosan): prevent installing XOSAN on XCP-ng pools (#4953)
This commit is contained in:
parent
0ed5c8f0ae
commit
94b1cc2bdd
@ -2173,6 +2173,8 @@ const messages = {
|
||||
xosanState_configuringGluster: 'Configuring gluster…',
|
||||
xosanState_creatingSr: 'Creating SR…',
|
||||
xosanState_scanningSr: 'Scanning SR…',
|
||||
xosanXcpngWarning:
|
||||
'XOSAN cannot be installed on XCP-ng yet. Incoming XOSANv2 will be compatible with XCP-ng: {link}.',
|
||||
// Pack download modal
|
||||
xosanInstallCloudPlugin: 'Install XOA plugin first',
|
||||
xosanLoadCloudPlugin: 'Load XOA plugin first',
|
||||
|
@ -275,8 +275,12 @@ const XOSAN_INDIVIDUAL_ACTIONS = [
|
||||
}
|
||||
)
|
||||
|
||||
const getPoolPredicate = createSelector(getXosanSrs, srs => pool =>
|
||||
every(srs, sr => sr.$pool !== pool.id)
|
||||
const getPoolPredicate = createSelector(
|
||||
getXosanSrs,
|
||||
getHosts,
|
||||
(srs, hosts) => pool =>
|
||||
hosts[pool.master].productBrand !== 'XCP-ng' &&
|
||||
every(srs, sr => sr.$pool !== pool.id)
|
||||
)
|
||||
|
||||
return {
|
||||
|
@ -111,6 +111,11 @@ export default class NewXosan extends Component {
|
||||
suggestion: 0,
|
||||
}
|
||||
|
||||
_hasXcpng = createSelector(
|
||||
() => this.props.hosts,
|
||||
hosts => Object.values(hosts).some(host => host.productBrand === 'XCP-ng')
|
||||
)
|
||||
|
||||
_checkPacks = pool =>
|
||||
getResourceCatalog().then(
|
||||
catalog => {
|
||||
@ -347,6 +352,24 @@ export default class NewXosan extends Component {
|
||||
|
||||
return (
|
||||
<Container>
|
||||
{this._hasXcpng() && (
|
||||
<Row className='mb-1'>
|
||||
<span className='text-muted'>
|
||||
<Icon icon='info' />{' '}
|
||||
{_('xosanXcpngWarning', {
|
||||
link: (
|
||||
<a
|
||||
href='https://xcp-ng.org/docs/storage.html#xosanv2'
|
||||
rel='noopener noreferrer'
|
||||
target='_blank'
|
||||
>
|
||||
https://xcp-ng.org/docs/storage.html
|
||||
</a>
|
||||
),
|
||||
})}
|
||||
</span>
|
||||
</Row>
|
||||
)}
|
||||
<Row className='mb-1'>
|
||||
<Col size={4}>
|
||||
<SelectPool
|
||||
|
Loading…
Reference in New Issue
Block a user