mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
UI: Proper explanation for the global setting to avoid ambiguity (#10042)
This commit is contained in:
parent
b92fd17ef1
commit
3aabedd447
@ -1399,7 +1399,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
|
|||||||
}
|
}
|
||||||
if (!BooleanUtils.toBoolean(EnableKVMAutoEnableDisable.valueIn(host.getClusterId()))) {
|
if (!BooleanUtils.toBoolean(EnableKVMAutoEnableDisable.valueIn(host.getClusterId()))) {
|
||||||
logger.debug("{} is disabled for the cluster {}, cannot process the health check result " +
|
logger.debug("{} is disabled for the cluster {}, cannot process the health check result " +
|
||||||
"received for the host {}", EnableKVMAutoEnableDisable.key(), host.getClusterId(), host);
|
"received for {}", EnableKVMAutoEnableDisable.key(), host.getClusterId(), host);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1840,9 +1840,9 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
|
|||||||
_hostDetailsDao.update(hostDetail.getId(), hostDetail);
|
_hostDetailsDao.update(hostDetail.getId(), hostDetail);
|
||||||
} else if (!isUpdateFromHostHealthCheck && hostDetail != null &&
|
} else if (!isUpdateFromHostHealthCheck && hostDetail != null &&
|
||||||
Boolean.parseBoolean(hostDetail.getValue()) && resourceEvent == ResourceState.Event.Disable) {
|
Boolean.parseBoolean(hostDetail.getValue()) && resourceEvent == ResourceState.Event.Disable) {
|
||||||
logger.info(String.format("The setting %s is enabled but the host %s is manually set into %s state," +
|
logger.info("The setting {} is enabled but {} is manually set into {} state," +
|
||||||
"ignoring future auto enabling of the host based on health check results",
|
"ignoring future auto enabling of the host based on health check results",
|
||||||
AgentManager.EnableKVMAutoEnableDisable.key(), host.getName(), resourceEvent));
|
AgentManager.EnableKVMAutoEnableDisable.key(), host, resourceEvent);
|
||||||
hostDetail.setValue(Boolean.FALSE.toString());
|
hostDetail.setValue(Boolean.FALSE.toString());
|
||||||
_hostDetailsDao.update(hostDetail.getId(), hostDetail);
|
_hostDetailsDao.update(hostDetail.getId(), hostDetail);
|
||||||
} else if (hostDetail == null) {
|
} else if (hostDetail == null) {
|
||||||
|
|||||||
@ -28,15 +28,15 @@
|
|||||||
>
|
>
|
||||||
<a-alert type="warning">
|
<a-alert type="warning">
|
||||||
<template #message>
|
<template #message>
|
||||||
<span v-html="$t('message.confirm.enable.host')" />
|
<span v-html="resourcestate === 'Disabled' ? $t('message.confirm.enable.host') : $t('message.confirm.disable.host') " />
|
||||||
</template>
|
</template>
|
||||||
</a-alert>
|
</a-alert>
|
||||||
<div v-show="enableKVMAutoEnableDisableSetting" class="reason">
|
<div v-show="kvmAutoEnableDisableSetting" class="reason">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
class="form__item"
|
class="form__item"
|
||||||
name="reason"
|
name="reason"
|
||||||
ref="reason"
|
ref="reason"
|
||||||
:label="'The setting \'enable.kvm.host.auto.enable.disable\' is enabled, ' +
|
:label="'The Auto Enable/Disable KVM Hosts functionality is enabled, ' +
|
||||||
' can specify a reason for ' + (resourcestate === 'Enabled' ? 'disabling' : 'enabling') + ' this host'">
|
' can specify a reason for ' + (resourcestate === 'Enabled' ? 'disabling' : 'enabling') + ' this host'">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model:value="form.reason"
|
v-model:value="form.reason"
|
||||||
@ -69,7 +69,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
resourcestate: '',
|
resourcestate: '',
|
||||||
allocationstate: '',
|
allocationstate: '',
|
||||||
enableKVMAutoEnableDisableSetting: false
|
kvmAutoEnableDisableSetting: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@ -91,8 +91,8 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
api('listConfigurations', { name: 'enable.kvm.host.auto.enable.disable', clusterid: this.resource.clusterid }).then(json => {
|
api('listConfigurations', { name: 'enable.kvm.host.auto.enable.disable', clusterid: this.resource.clusterid }).then(json => {
|
||||||
if (json.listconfigurationsresponse.configuration[0]) {
|
if (json.listconfigurationsresponse.configuration?.[0]) {
|
||||||
this.enableKVMAutoEnableDisableSetting = json.listconfigurationsresponse.configuration[0].value
|
this.kvmAutoEnableDisableSetting = json?.listconfigurationsresponse?.configuration?.[0]?.value || false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user