UI: Update domain level configuration

This commit is contained in:
Pearl Dsilva 2025-09-03 14:34:01 -04:00
parent 3d6ec29c9b
commit 2ab54d981e
3 changed files with 25 additions and 2 deletions

View File

@ -25,7 +25,8 @@
@search="handleSearch" />
<ConfigurationTable
:columns="columns"
:config="items" />
:config="items"
:resource="resource" />
</a-col>
</div>
</template>

View File

@ -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 () {

View File

@ -217,6 +217,10 @@ export default {
actions: {
type: Array,
default: () => []
},
resource: {
type: Object,
required: false
}
},
data () {
@ -254,6 +258,17 @@ export default {
this.setConfigData()
},
watch: {
loading (newVal, oldVal) {
if (oldVal === true && newVal === false) {
this.setConfigData()
}
},
configrecord: {
handler () {
this.setConfigData()
},
deep: true
}
},
methods: {
setConfigData () {
@ -280,6 +295,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