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 >
@@ -273,6 +273,7 @@ export default {
273273 this .editableValueKey = null
274274 },
275275 updateConfigurationValue (configrecord ) {
276+ let configRecordEntry = this .configrecord
276277 this .valueLoading = true
277278 this .editableValueKey = null
278279 var newValue = this .editableValue
@@ -294,7 +295,8 @@ export default {
294295 params[this .scopeKey ] = this .resource ? .id
295296 }
296297 postAPI (' updateConfiguration' , params).then (json => {
297- this .editableValue = this .getEditableValue (json .updateconfigurationresponse .configuration )
298+ configRecordEntry = json .updateconfigurationresponse .configuration
299+ this .editableValue = this .getEditableValue (configRecordEntry)
298300 this .actualValue = this .editableValue
299301 this .$emit (' change-config' , { value: newValue })
300302 this .$store .dispatch (' RefreshFeatures' )
@@ -310,10 +312,11 @@ export default {
310312 })
311313 }).finally (() => {
312314 this .valueLoading = false
313- this .$emit (' refresh' )
315+ this .$emit (' refresh' , configrecord . name , configRecordEntry )
314316 })
315317 },
316318 resetConfigurationValue (configrecord ) {
319+ let configRecordEntry = this .configrecord
317320 this .valueLoading = true
318321 this .editableValueKey = null
319322 const params = {
@@ -324,7 +327,8 @@ export default {
324327 params[this .scopeKey ] = this .resource ? .id
325328 }
326329 postAPI (' resetConfiguration' , params).then (json => {
327- this .editableValue = this .getEditableValue (json .resetconfigurationresponse .configuration )
330+ configRecordEntry = json .resetconfigurationresponse .configuration
331+ this .editableValue = this .getEditableValue (configRecordEntry)
328332 this .actualValue = this .editableValue
329333 var newValue = this .editableValue
330334 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