187187 @onClick =" $resetConfigurationValueConfirm(configrecord, resetConfigurationValue)"
188188 v-if =" editableValueKey === null"
189189 icon =" reload-outlined"
190- :disabled =" (!('resetConfiguration' in $store.getters.apis) || configDisabled || valueLoading)" />
190+ :disabled =" (!('resetConfiguration' in $store.getters.apis) || configDisabled || valueLoading || configrecord.value === configrecord.defaultvalue )" />
191191 </span >
192192 </a-list-item >
193193 </a-list >
@@ -263,6 +263,7 @@ export default {
263263 this .editableValueKey = null
264264 },
265265 updateConfigurationValue (configrecord ) {
266+ let configRecordEntry = this .configrecord
266267 this .valueLoading = true
267268 this .editableValueKey = null
268269 var newValue = this .editableValue
@@ -281,7 +282,8 @@ export default {
281282 value: newValue
282283 }
283284 postAPI (' updateConfiguration' , params).then (json => {
284- this .editableValue = this .getEditableValue (json .updateconfigurationresponse .configuration )
285+ configRecordEntry = json .updateconfigurationresponse .configuration
286+ this .editableValue = this .getEditableValue (configRecordEntry)
285287 this .actualValue = this .editableValue
286288 this .$emit (' change-config' , { value: newValue })
287289 this .$store .dispatch (' RefreshFeatures' )
@@ -305,18 +307,20 @@ export default {
305307 })
306308 }).finally (() => {
307309 this .valueLoading = false
308- this .$emit (' refresh' )
310+ this .$emit (' refresh' , configrecord . name , configRecordEntry )
309311 })
310312 },
311313 resetConfigurationValue (configrecord ) {
314+ let configRecordEntry = this .configrecord
312315 this .valueLoading = true
313316 this .editableValueKey = null
314317 const params = {
315318 [this .scopeKey ]: this .$route .params ? .id ,
316319 name: configrecord .name
317320 }
318321 postAPI (' resetConfiguration' , params).then (json => {
319- this .editableValue = this .getEditableValue (json .resetconfigurationresponse .configuration )
322+ configRecordEntry = json .resetconfigurationresponse .configuration
323+ this .editableValue = this .getEditableValue (configRecordEntry)
320324 this .actualValue = this .editableValue
321325 var newValue = this .editableValue
322326 if (configrecord .type === ' Range' ) {
@@ -344,7 +348,7 @@ export default {
344348 })
345349 }).finally (() => {
346350 this .valueLoading = false
347- this .$emit (' refresh' )
351+ this .$emit (' refresh' , configrecord . name , configRecordEntry )
348352 })
349353 },
350354 getEditableValue (configrecord ) {
0 commit comments