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' )
@@ -318,10 +320,11 @@ export default {
318320 })
319321 }).finally (() => {
320322 this .valueLoading = false
321- this .$emit (' refresh' )
323+ this .$emit (' refresh' , configrecord . name , configRecordEntry )
322324 })
323325 },
324326 resetConfigurationValue (configrecord ) {
327+ let configRecordEntry = this .configrecord
325328 this .valueLoading = true
326329 this .editableValueKey = null
327330 const params = {
@@ -332,7 +335,8 @@ export default {
332335 params[this .scopeKey ] = this .resource ? .id
333336 }
334337 postAPI (' resetConfiguration' , params).then (json => {
335- this .editableValue = this .getEditableValue (json .resetconfigurationresponse .configuration )
338+ configRecordEntry = json .resetconfigurationresponse .configuration
339+ this .editableValue = this .getEditableValue (configRecordEntry)
336340 this .actualValue = this .editableValue
337341 var newValue = this .editableValue
338342 if (configrecord .type === ' Range' ) {
@@ -360,7 +364,7 @@ export default {
360364 })
361365 }).finally (() => {
362366 this .valueLoading = false
363- this .$emit (' refresh' )
367+ this .$emit (' refresh' , configrecord . name , configRecordEntry )
364368 })
365369 },
366370 getEditableValue (configrecord ) {
0 commit comments