feat(xo-web): prevent XO from checking time consistency of halted hosts
This commit is contained in:
parent
fe7901ca7f
commit
59ca6c6708
@ -9,6 +9,7 @@
|
||||
|
||||
- [Backup] Better resolution of the "last run log" quick access (PR [#5141](https://github.com/vatesfr/xen-orchestra/pull/5141))
|
||||
- [Patches] Don't check patches on halted XCP-ng hosts (PR [#5140](https://github.com/vatesfr/xen-orchestra/pull/5140))
|
||||
- [XO] Don't check time consistency on halted hosts (PR [#5140](https://github.com/vatesfr/xen-orchestra/pull/5140))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
@ -10,8 +10,8 @@ import { isHostTimeConsistentWithXoaTime } from 'xo'
|
||||
const InconsistentHostTimeWarning = decorate([
|
||||
provideState({
|
||||
computed: {
|
||||
isHostTimeConsistentWithXoaTime: (_, { hostId }) =>
|
||||
isHostTimeConsistentWithXoaTime(hostId),
|
||||
isHostTimeConsistentWithXoaTime: (_, { host }) =>
|
||||
isHostTimeConsistentWithXoaTime(host),
|
||||
},
|
||||
}),
|
||||
injectState,
|
||||
@ -24,7 +24,7 @@ const InconsistentHostTimeWarning = decorate([
|
||||
])
|
||||
|
||||
InconsistentHostTimeWarning.propTypes = {
|
||||
hostId: PropTypes.string.isRequired,
|
||||
host: PropTypes.object.isRequired,
|
||||
}
|
||||
|
||||
export { InconsistentHostTimeWarning as default }
|
||||
|
@ -850,8 +850,12 @@ export const emergencyShutdownHosts = hosts => {
|
||||
)
|
||||
}
|
||||
|
||||
export const isHostTimeConsistentWithXoaTime = host =>
|
||||
_call('host.isHostServerTimeConsistent', { host: resolveId(host) })
|
||||
export const isHostTimeConsistentWithXoaTime = host => {
|
||||
if (host.power_state !== 'Running') {
|
||||
return true
|
||||
}
|
||||
return _call('host.isHostServerTimeConsistent', { host: resolveId(host) })
|
||||
}
|
||||
|
||||
export const isHyperThreadingEnabledHost = host =>
|
||||
_call('host.isHyperThreadingEnabled', {
|
||||
|
@ -133,7 +133,7 @@ export default class HostItem extends Component {
|
||||
</Tooltip>
|
||||
)}
|
||||
|
||||
<InconsistentHostTimeWarning hostId={host.id} />
|
||||
<InconsistentHostTimeWarning host={host} />
|
||||
|
||||
{hasLicenseRestrictions(host) && <LicenseWarning />}
|
||||
</EllipsisContainer>
|
||||
|
@ -260,7 +260,7 @@ export default class Host extends Component {
|
||||
</Tooltip>
|
||||
)}
|
||||
|
||||
<InconsistentHostTimeWarning hostId={host.id} />
|
||||
<InconsistentHostTimeWarning host={host} />
|
||||
</h2>
|
||||
<Copiable tagName='pre' className='text-muted mb-0'>
|
||||
{host.uuid}
|
||||
|
Loading…
Reference in New Issue
Block a user