mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-15 18:12:35 +01:00
UI: Update and reset domain level configuration (#11571)
This commit is contained in:
parent
50fe265017
commit
15439ede7d
@ -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,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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user