Skip to content

Commit 3ea7edf

Browse files
committed
refactor: update configuration value handling and improve notification logic
1 parent 893c6df commit 3ea7edf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ui/src/views/setting/ConfigurationValue.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,14 @@ export default {
295295
params[this.scopeKey] = this.resource?.id
296296
}
297297
postAPI('updateConfiguration', params).then(json => {
298-
configRecordEntry = json.updateconfigurationresponse.configuration
298+
const apiRecord = json.updateconfigurationresponse.configuration
299+
configRecordEntry = { ...apiRecord, value: String(newValue) }
299300
this.editableValue = this.getEditableValue(configRecordEntry)
300301
this.actualValue = this.editableValue
301302
this.$emit('change-config', { value: newValue })
302303
this.$store.dispatch('RefreshFeatures')
303304
this.$messageConfigSuccess(`${this.$t('message.setting.updated')} ${configrecord.name}`, configrecord)
304-
this.$notifyConfigurationValueChange(json?.updateconfigurationresponse?.configuration || null)
305+
this.$notifyConfigurationValueChange(configRecordEntry)
305306
}).catch(error => {
306307
this.editableValue = this.actualValue
307308
console.error(error)

0 commit comments

Comments
 (0)