mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 01:32:18 +02:00
UI: Update domain level configuration
This commit is contained in:
parent
3d6ec29c9b
commit
2ab54d981e
@ -25,7 +25,8 @@
|
||||
@search="handleSearch" />
|
||||
<ConfigurationTable
|
||||
:columns="columns"
|
||||
:config="items" />
|
||||
:config="items"
|
||||
:resource="resource" />
|
||||
</a-col>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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 () {
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user