Skip to content

Commit

Permalink
Revert "fix(xo-web/host-item): display alert in host-item for host in…
Browse files Browse the repository at this point in the history
…consistent time"

This reverts commit eb68aaf.
  • Loading branch information
MathieuRA committed May 15, 2023
1 parent 194ead6 commit 09b22a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
3 changes: 0 additions & 3 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

> Users must be able to say: “I had this issue, happy to know it's fixed”
- [Import/VM/From VMware] Fix `Property description must be an object: undefined` [Forum#61834](https://xcp-ng.org/forum/post/61834) [Forum#61900](https://xcp-ng.org/forum/post/61900)
- [Sorted table] In collapsed actions, a spinner is displayed during the action time (PR [#6831](https://github.com/vatesfr/xen-orchestra/pull/6831))

### Packages to release
Expand All @@ -30,8 +29,6 @@
<!--packages-start-->

- @vates/task patch
- xo-server minor
- xo-web patch

<!--packages-end-->
18 changes: 3 additions & 15 deletions packages/xo-web/src/xo-app/home/host-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,6 @@ import { getXoaPlan, SOURCES } from '../../common/xoa-plans'
}))
@injectState
export default class HostItem extends Component {
state = {
isHostTimeConsistentWithXoaTime: true,
}

componentWillMount() {
isHostTimeConsistentWithXoaTime(this.props.item).then(value =>
this.setState({
isHostTimeConsistentWithXoaTime: value,
})
)
}

get _isRunning() {
const host = this.props.item
return host && host.power_state === 'Running'
Expand Down Expand Up @@ -131,9 +119,9 @@ export default class HostItem extends Component {
() => this.props.needsRestart,
() => this.props.item,
this._isMaintained,
() => this.state.isHostTimeConsistentWithXoaTime,
(needsRestart, host, isMaintained, isHostTimeConsistentWithXoaTime) => {
(needsRestart, host, isMaintained) => {
const alerts = []

if (needsRestart) {
alerts.push({
level: 'warning',
Expand All @@ -156,7 +144,7 @@ export default class HostItem extends Component {
})
}

if (!isHostTimeConsistentWithXoaTime) {
if (!isHostTimeConsistentWithXoaTime(host)) {
alerts.push({
level: 'danger',
render: (
Expand Down

0 comments on commit 09b22a7

Please sign in to comment.