This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.22
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.22 by this push:
new 15439ede7d4 UI: Update and reset domain level configuration (#11571)
15439ede7d4 is described below
commit 15439ede7d463f13c877993c5e42060cf7589556
Author: Pearl Dsilva <[email protected]>
AuthorDate: Tue Nov 11 03:29:54 2025 -0500
UI: Update and reset domain level configuration (#11571)
---
ui/src/components/view/SettingsTab.vue | 3 ++-
ui/src/views/setting/ConfigurationTable.vue | 6 +++++-
ui/src/views/setting/ConfigurationValue.vue | 16 ++++++++++++++++
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/ui/src/components/view/SettingsTab.vue
b/ui/src/components/view/SettingsTab.vue
index be55d03c4b9..ab75bef8394 100644
--- a/ui/src/components/view/SettingsTab.vue
+++ b/ui/src/components/view/SettingsTab.vue
@@ -25,7 +25,8 @@
@search="handleSearch" />
<ConfigurationTable
:columns="columns"
- :config="items" />
+ :config="items"
+ :resource="resource" />
</a-col>
</div>
</template>
diff --git a/ui/src/views/setting/ConfigurationTable.vue
b/ui/src/views/setting/ConfigurationTable.vue
index 56518d2570b..da05b9342a0 100644
--- a/ui/src/views/setting/ConfigurationTable.vue
+++ b/ui/src/views/setting/ConfigurationTable.vue
@@ -32,7 +32,7 @@
<b> {{record.displaytext }} </b> {{ ' (' + record.name + ')' }}
<br/> {{ record.description }}
</template>
<template v-if="column.key === 'value'">
- <ConfigurationValue :configrecord="record" />
+ <ConfigurationValue :configrecord="record" :resource="resource" />
</template>
</template>
</a-table>
@@ -85,6 +85,10 @@ export default {
pagesize: {
type: Number,
default: 20
+ },
+ resource: {
+ type: Object,
+ required: false
}
},
data () {
diff --git a/ui/src/views/setting/ConfigurationValue.vue
b/ui/src/views/setting/ConfigurationValue.vue
index e438f0eb831..662e5ef142e 100644
--- a/ui/src/views/setting/ConfigurationValue.vue
+++ b/ui/src/views/setting/ConfigurationValue.vue
@@ -217,6 +217,10 @@ export default {
actions: {
type: Array,
default: () => []
+ },
+ resource: {
+ type: Object,
+ required: false
}
},
data () {
@@ -254,6 +258,12 @@ export default {
this.setConfigData()
},
watch: {
+ configrecord: {
+ handler () {
+ this.setConfigData()
+ },
+ deep: true
+ }
},
methods: {
setConfigData () {
@@ -280,6 +290,9 @@ export default {
name: configrecord.name,
value: newValue
}
+ if (this.scopeKey === 'domainid' && !params[this.scopeKey]) {
+ params[this.scopeKey] = this.resource?.id
+ }
postAPI('updateConfiguration', params).then(json => {
this.editableValue =
this.getEditableValue(json.updateconfigurationresponse.configuration)
this.actualValue = this.editableValue
@@ -315,6 +328,9 @@ export default {
[this.scopeKey]: this.$route.params?.id,
name: configrecord.name
}
+ if (this.scopeKey === 'domainid' && !params[this.scopeKey]) {
+ params[this.scopeKey] = this.resource?.id
+ }
postAPI('resetConfiguration', params).then(json => {
this.editableValue =
this.getEditableValue(json.resetconfigurationresponse.configuration)
this.actualValue = this.editableValue