mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 02:22:52 +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" />
|
@search="handleSearch" />
|
||||||
<ConfigurationTable
|
<ConfigurationTable
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:config="items" />
|
:config="items"
|
||||||
|
:resource="resource" />
|
||||||
</a-col>
|
</a-col>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
<b> {{record.displaytext }} </b> {{ ' (' + record.name + ')' }} <br/> {{ record.description }}
|
<b> {{record.displaytext }} </b> {{ ' (' + record.name + ')' }} <br/> {{ record.description }}
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'value'">
|
<template v-if="column.key === 'value'">
|
||||||
<ConfigurationValue :configrecord="record" />
|
<ConfigurationValue :configrecord="record" :resource="resource" />
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@ -85,6 +85,10 @@ export default {
|
|||||||
pagesize: {
|
pagesize: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 20
|
default: 20
|
||||||
|
},
|
||||||
|
resource: {
|
||||||
|
type: Object,
|
||||||
|
required: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
|||||||
@ -217,6 +217,10 @@ export default {
|
|||||||
actions: {
|
actions: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
|
},
|
||||||
|
resource: {
|
||||||
|
type: Object,
|
||||||
|
required: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@ -254,6 +258,12 @@ export default {
|
|||||||
this.setConfigData()
|
this.setConfigData()
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
configrecord: {
|
||||||
|
handler () {
|
||||||
|
this.setConfigData()
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setConfigData () {
|
setConfigData () {
|
||||||
@ -280,6 +290,9 @@ export default {
|
|||||||
name: configrecord.name,
|
name: configrecord.name,
|
||||||
value: newValue
|
value: newValue
|
||||||
}
|
}
|
||||||
|
if (this.scopeKey === 'domainid' && !params[this.scopeKey]) {
|
||||||
|
params[this.scopeKey] = this.resource?.id
|
||||||
|
}
|
||||||
postAPI('updateConfiguration', params).then(json => {
|
postAPI('updateConfiguration', params).then(json => {
|
||||||
this.editableValue = this.getEditableValue(json.updateconfigurationresponse.configuration)
|
this.editableValue = this.getEditableValue(json.updateconfigurationresponse.configuration)
|
||||||
this.actualValue = this.editableValue
|
this.actualValue = this.editableValue
|
||||||
@ -315,6 +328,9 @@ export default {
|
|||||||
[this.scopeKey]: this.$route.params?.id,
|
[this.scopeKey]: this.$route.params?.id,
|
||||||
name: configrecord.name
|
name: configrecord.name
|
||||||
}
|
}
|
||||||
|
if (this.scopeKey === 'domainid' && !params[this.scopeKey]) {
|
||||||
|
params[this.scopeKey] = this.resource?.id
|
||||||
|
}
|
||||||
postAPI('resetConfiguration', params).then(json => {
|
postAPI('resetConfiguration', params).then(json => {
|
||||||
this.editableValue = this.getEditableValue(json.resetconfigurationresponse.configuration)
|
this.editableValue = this.getEditableValue(json.resetconfigurationresponse.configuration)
|
||||||
this.actualValue = this.editableValue
|
this.actualValue = this.editableValue
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user