diff --git a/packages/xo-web/src/xo-app/home/host-item.js b/packages/xo-web/src/xo-app/home/host-item.js index 9a5070e9372..0ab02735776 100644 --- a/packages/xo-web/src/xo-app/home/host-item.js +++ b/packages/xo-web/src/xo-app/home/host-item.js @@ -61,7 +61,8 @@ export default class HostItem extends Component { isHostTimeConsistentWithXoaTime: true, } - componentWillMount() { + async componentWillMount() { + await this.props.isPubKeyTooShort.then(isPubKeyTooShort => this.setState({ isPubKeyTooShort })) Promise.resolve(isHostTimeConsistentWithXoaTime(this.props.item)).then(value => this.setState({ isHostTimeConsistentWithXoaTime: value, @@ -138,8 +139,7 @@ export default class HostItem extends Component { () => this.state.isHostTimeConsistentWithXoaTime, this._getAreHostsVersionsEqual, () => this.props.state.hostsByPoolId[this.props.item.$pool], - () => this.props.isPubKeyTooShort, - (needsRestart, host, isMaintained, isHostTimeConsistentWithXoaTime, areHostsVersionsEqual, poolHosts, isPubKeyTooShort) => { + (needsRestart, host, isMaintained, isHostTimeConsistentWithXoaTime, areHostsVersionsEqual, poolHosts) => { const alerts = [] if (needsRestart) { @@ -198,19 +198,17 @@ export default class HostItem extends Component { }) } - if (isPubKeyTooShort) { - console.log("=====> isPubKeyTooShort:", isPubKeyTooShort) + if (this.state.isPubKeyTooShort) { + console.log("=====> isPubKeyTooShort:", this.state.isPubKeyTooShort) alerts.push({ level: 'warning', render: ( {_('pubKeyTooShort')} - -
    -
  • {_('longerCustomCertficate')}
  • -
  • {_('longerDefaultCertificate')}
  • -
-
+
), })