Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
b-Nollet committed Sep 18, 2024
1 parent 840c36f commit 31afffe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
2 changes: 2 additions & 0 deletions packages/xo-web/src/common/intl/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,8 @@ const messages = {
hostSupportEnabled: 'XCP-ng Pro Support enabled on this host',
noMoreMaintained: 'This host version is no longer maintained',
pubKeyTooShort: 'TLS key is too small to update to XCP-ng 8.3',
longerCustomCertficate: 'If your certificate is custom, you need to install a new one with a key at least 2048 characters long.',
longerDefaultCertificate: 'If your certificate is the default self-signed certificate from host installation, you need to re-generate it from XCP-ng 8.2.1.',

// ----- Host actions ------
disableMaintenanceMode: 'Disable maintenance mode',
Expand Down
23 changes: 6 additions & 17 deletions packages/xo-web/src/xo-app/home/host-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,14 @@ import styles from './index.css'

import BulkIcons from '../../common/bulk-icons'
import { LICENSE_WARNING_BODY } from '../host/license-warning'
// import { LICENSE_WARNING_BODY } from '../host/license-warning'
import { getXoaPlan, SOURCES } from '../../common/xoa-plans'

@addSubscriptions({
hvSupportedVersions: subscribeHvSupportedVersions,
})
@connectStore(() => ({
container: createGetObject((_, props) => props.item.$pool),
isPubKeyTooShort: createSelector((_, props) => props.item.id, hostId => {
return isPubKeyTooShort(hostId)
}),
isPubKeyTooShort: createSelector((_, props) => props.item.id, hostId => isPubKeyTooShort(hostId)),
needsRestart: createDoesHostNeedRestart((_, props) => props.item),
nVms: createGetObjectsOfType('VM').count(
createSelector(
Expand Down Expand Up @@ -141,7 +138,8 @@ export default class HostItem extends Component {
() => this.state.isHostTimeConsistentWithXoaTime,
this._getAreHostsVersionsEqual,
() => this.props.state.hostsByPoolId[this.props.item.$pool],
(needsRestart, host, isMaintained, isHostTimeConsistentWithXoaTime, isPubKeyTooShort, areHostsVersionsEqual, poolHosts) => {
() => this.props.isPubKeyTooShort,
(needsRestart, host, isMaintained, isHostTimeConsistentWithXoaTime, areHostsVersionsEqual, poolHosts, isPubKeyTooShort) => {
const alerts = []

if (needsRestart) {
Expand Down Expand Up @@ -206,22 +204,13 @@ export default class HostItem extends Component {
level: 'warning',
render: (
<span>
<Icon icon='alarm' /> {_('pubKeyTooShort')} (
<Icon icon='alarm' /> {_('pubKeyTooShort')}
<span>
<a href='https://xcp-ng.com/pricing.html#xcpngvsxenserver' rel='noopener noreferrer' target='_blank'>
{_('actionsRestricted')}
</a>{' '}
{_('counterRestrictionsOptions')}
<ul>
<li>
<a href='https://github.com/xcp-ng/xcp/wiki/Upgrade-from-XenServer' rel='noopener noreferrer' target='_blank'>
{_('counterRestrictionsOptionsXcp')}
</a>
</li>
<li>{_('counterRestrictionsOptionsXsLicense')}</li>
<li>{_('longerCustomCertficate')}</li>
<li>{_('longerDefaultCertificate')}</li>
</ul>
</span>
)
</span>
),
})
Expand Down

0 comments on commit 31afffe

Please sign in to comment.