Skip to content

Commit 544f8d5

Browse files
committed
Update name and UI dialog box
1 parent 425fc95 commit 544f8d5

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

engine/components-api/src/main/java/com/cloud/agent/AgentManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public interface AgentManager {
4040
static final ConfigKey<Integer> Wait = new ConfigKey<Integer>("Advanced", Integer.class, "wait", "1800", "Time in seconds to wait for control commands to return",
4141
true);
4242
ConfigKey<Boolean> KVMAutoEnableDisable = new ConfigKey<>(Boolean.class,
43-
"enable.kvm.host.auto.enable",
43+
"kvm.host.auto.enable.disable",
4444
"Advanced",
4545
"false",
4646
"(KVM only) Enable Auto Disable/Enable KVM hosts in the cluster " +

engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,3 +425,5 @@ INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid, hypervisor_type, hypervi
425425

426426
CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.vm_instance', 'delete_protection', 'boolean DEFAULT FALSE COMMENT "delete protection for vm" ');
427427
CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.volumes', 'delete_protection', 'boolean DEFAULT FALSE COMMENT "delete protection for volumes" ');
428+
429+
UPDATE `cloud`.`configuration` set name = "kvm.host.auto.enable.disable" where name = "enable.kvm.host.auto.enable.disable";

ui/src/views/infra/HostEnableDisable.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<span v-html="$t('message.confirm.enable.host')" />
3232
</template>
3333
</a-alert>
34-
<div v-show="enableKVMAutoEnableDisableSetting" class="reason">
34+
<div v-show="kvmAutoEnableDisableSetting" class="reason">
3535
<a-form-item
3636
class="form__item"
3737
name="reason"
@@ -69,7 +69,7 @@ export default {
6969
return {
7070
resourcestate: '',
7171
allocationstate: '',
72-
enableKVMAutoEnableDisableSetting: false
72+
kvmAutoEnableDisableSetting: false
7373
}
7474
},
7575
created () {
@@ -90,9 +90,9 @@ export default {
9090
if (this.resource.hypervisor !== 'KVM') {
9191
return
9292
}
93-
api('listConfigurations', { name: 'enable.kvm.host.auto.enable.disable', clusterid: this.resource.clusterid }).then(json => {
94-
if (json.listconfigurationsresponse.configuration[0]) {
95-
this.enableKVMAutoEnableDisableSetting = json.listconfigurationsresponse.configuration[0].value
93+
api('listConfigurations', { name: 'kvm.host.auto.enable.disable', clusterid: this.resource.clusterid }).then(json => {
94+
if (json.listconfigurationsresponse.configuration?.[0]) {
95+
this.kvmAutoEnableDisableSetting = json?.listconfigurationsresponse?.configuration?.[0]?.value || false
9696
}
9797
})
9898
},

0 commit comments

Comments
 (0)