Skip to content

Commit 2ab54d9

Browse files
committed
UI: Update domain level configuration
1 parent 3d6ec29 commit 2ab54d9

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

ui/src/components/view/SettingsTab.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
@search="handleSearch" />
2626
<ConfigurationTable
2727
:columns="columns"
28-
:config="items" />
28+
:config="items"
29+
:resource="resource" />
2930
</a-col>
3031
</div>
3132
</template>

ui/src/views/setting/ConfigurationTable.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<b> {{record.displaytext }} </b> {{ ' (' + record.name + ')' }} <br/> {{ record.description }}
3333
</template>
3434
<template v-if="column.key === 'value'">
35-
<ConfigurationValue :configrecord="record" />
35+
<ConfigurationValue :configrecord="record" :resource="resource" />
3636
</template>
3737
</template>
3838
</a-table>
@@ -85,6 +85,10 @@ export default {
8585
pagesize: {
8686
type: Number,
8787
default: 20
88+
},
89+
resource: {
90+
type: Object,
91+
required: false
8892
}
8993
},
9094
data () {

ui/src/views/setting/ConfigurationValue.vue

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ export default {
217217
actions: {
218218
type: Array,
219219
default: () => []
220+
},
221+
resource: {
222+
type: Object,
223+
required: false
220224
}
221225
},
222226
data () {
@@ -254,6 +258,17 @@ export default {
254258
this.setConfigData()
255259
},
256260
watch: {
261+
loading (newVal, oldVal) {
262+
if (oldVal === true && newVal === false) {
263+
this.setConfigData()
264+
}
265+
},
266+
configrecord: {
267+
handler () {
268+
this.setConfigData()
269+
},
270+
deep: true
271+
}
257272
},
258273
methods: {
259274
setConfigData () {
@@ -280,6 +295,9 @@ export default {
280295
name: configrecord.name,
281296
value: newValue
282297
}
298+
if (this.scopeKey === 'domainid' && !params[this.scopeKey]) {
299+
params[this.scopeKey] = this.resource?.id
300+
}
283301
postAPI('updateConfiguration', params).then(json => {
284302
this.editableValue = this.getEditableValue(json.updateconfigurationresponse.configuration)
285303
this.actualValue = this.editableValue

0 commit comments

Comments
 (0)