backport of UI: prevent replication disable action from sending payload (#24296)

Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>
This commit is contained in:
hc-github-team-secure-vault-core 2023-11-29 17:57:58 -05:00 committed by GitHub
parent 63b7c27162
commit 58ce1d55db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

3
changelog/24292.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
ui: Fix payload sent when disabling replication
```

View File

@ -9,4 +9,11 @@ import layout from '../templates/components/replication-action-disable';
export default Actions.extend({
layout,
tagName: '',
actions: {
onSubmit(replicationMode, clusterMode, evt) {
// No data is submitted for disable request
return this.onSubmit(replicationMode, clusterMode, null, evt);
},
},
});

View File

@ -28,8 +28,8 @@
@isActive={{this.isModalActive}}
@confirmText={{this.model.replicationModeForDisplay}}
@toConfirmMsg="disabling {{this.model.replicationModeForDisplay}} Replication on this cluster"
@onConfirm={{action
"onSubmit"
@onConfirm={{fn
(action "onSubmit")
"disable"
(if (eq this.model.replicationAttrs.modeForUrl "bootstrapping") this.mode this.model.replicationAttrs.modeForUrl)
}}