Skip to content

Commit

Permalink
Ui/replication mgmt/recover action (#9127)
Browse files Browse the repository at this point in the history
* Replication Management Sidebranch: Replication Action Recover (#9061)
  • Loading branch information
chelshaw authored Jun 3, 2020
1 parent 85d9470 commit da4c6db
Showing 1 changed file with 46 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,50 @@
<h4 class="title is-5 is-marginless">
Recover
</h4>
<div class="content">
<p>
Attempt recovery if replication is in a bad state, for instance if an error
has caused replication to stop syncing.
</p>
</div>
<div class="field">
<div class="control">
<ConfirmAction
@buttonClasses="button is-primary"
@confirmTitle="Begin recovery?"
@confirmMessage="This will attempt to recover to continue syncing."
@confirmButtonText="Recover"
@horizontalPosition="auto-left"
@onConfirmAction={{action "onSubmit" "recover"}}
<div class="action-block is-rounded">
<div class="action-block-info">
<h4 class="title is-5 is-marginless">
Recover
</h4>
<p>
Attempt recovery if replication is in a bad state.
</p>
</div>

<div class="action-block-action">
<button
class="button is-secondary"
onclick={{action (mut isModalActive) true}}
data-test-replication-action-trigger
>
Recover
</ConfirmAction>
</button>
</div>
</div>

<Modal
@title="Begin recovery?"
@onClose={{action (mut isModalActive) false}}
@isActive={{isModalActive}}
@type="warning"
@showCloseButton={{true}}
>
<section class="modal-card-body">
<p>
If replication is in an adverse state, we can begin recovery. This will attempt to recover to continue syncing.
</p>
</section>
<footer class="modal-card-foot modal-card-foot-outlined">
<button
class="button is-primary"
disabled={{if (and (eq replicationMode "dr") (not dr_operation_token)) true}}
onclick={{action "onSubmit" "recover"}}
data-test-recover-confirm-button
>
Recover
</button>
<button
class="button is-secondary"
onclick={{action (mut isModalActive) false}}
data-test-recover-cancel-button>
Cancel
</button>
</footer>
</Modal>

0 comments on commit da4c6db

Please sign in to comment.