Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ui/src/components/view/SettingsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
@search="handleSearch" />
<ConfigurationTable
:columns="columns"
:config="items" />
:config="items"
:resource="resource" />
</a-col>
</div>
</template>
Expand Down
6 changes: 5 additions & 1 deletion ui/src/views/setting/ConfigurationTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -85,6 +85,10 @@ export default {
pagesize: {
type: Number,
default: 20
},
resource: {
type: Object,
required: false
}
},
data () {
Expand Down
18 changes: 18 additions & 0 deletions ui/src/views/setting/ConfigurationValue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ export default {
actions: {
type: Array,
default: () => []
},
resource: {
type: Object,
required: false
}
},
data () {
Expand Down Expand Up @@ -254,6 +258,17 @@ export default {
this.setConfigData()
},
watch: {
loading (newVal, oldVal) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is loading value for the element set somewhere in the code?
Similarly for property configDisable, though unrelated to the PR

if (oldVal === true && newVal === false) {
this.setConfigData()
}
},
configrecord: {
handler () {
this.setConfigData()
},
deep: true
}
},
methods: {
setConfigData () {
Expand All @@ -280,6 +295,9 @@ export default {
name: configrecord.name,
value: newValue
}
if (this.scopeKey === 'domainid' && !params[this.scopeKey]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need the this.scopeKey === 'domainid' check? Can it be

Suggested change
if (this.scopeKey === 'domainid' && !params[this.scopeKey]) {
if (this.scopeKey && !params[this.scopeKey]) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I specifically added domainid, because it's taken care of for other cases.

params[this.scopeKey] = this.resource?.id
}
postAPI('updateConfiguration', params).then(json => {
this.editableValue = this.getEditableValue(json.updateconfigurationresponse.configuration)
this.actualValue = this.editableValue
Expand Down
Loading