Skip to content

Commit 85d9470

Browse files
authored
Ui/replication mgmt/reindex action (#9126)
* Replication Management Sidebranch: Replication Action Disable (#9061)
1 parent 77c7f31 commit 85d9470

File tree

1 file changed

+49
-19
lines changed

1 file changed

+49
-19
lines changed
Lines changed: 49 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,53 @@
1-
<h4 class="title is-5 is-marginless">
2-
Reindex
3-
</h4>
4-
<div class="content">
5-
<p>
6-
Reindex the local data storage. This can cause a very long delay depending
7-
on the number and size of objects in the data store.
8-
</p>
9-
</div>
10-
<div class="field">
11-
<div class="control">
12-
<ConfirmAction
13-
@buttonClasses="button is-primary"
14-
@confirmTitle="Begin reindex?"
15-
@confirmMessage="This will initiate reindexing of the local data storage."
16-
@confirmButtonText="Reindex"
17-
@horizontalPosition="auto-left"
18-
@onConfirmAction={{action "onSubmit" "reindex"}}
1+
<div class="action-block is-rounded" data-test-reindex-replication>
2+
<div class="action-block-info">
3+
<h4 class="title is-5 is-marginless">
4+
Reindex
5+
</h4>
6+
<p>
7+
Reindex the local data storage
8+
</p>
9+
</div>
10+
11+
<div class="action-block-action">
12+
<button
13+
class="button is-secondary"
14+
onclick={{action (mut isModalActive) true}}
15+
data-test-replication-action-trigger
1916
>
2017
Reindex
21-
</ConfirmAction>
18+
</button>
2219
</div>
2320
</div>
21+
22+
<Modal
23+
@title="Begin reindex?"
24+
@onClose={{action (mut isModalActive) false}}
25+
@isActive={{isModalActive}}
26+
@type="warning"
27+
@showCloseButton={{true}}
28+
>
29+
<section class="modal-card-body">
30+
<p class="has-bottom-margin-m">
31+
Reindexing can cause a very long delay on the number and size of objects in the data store. {{if model.replicationAttrs.isPrimary 'You should always re-index your secondary first.'}}
32+
</p>
33+
<p>
34+
Progress will be shown, and you will {{ if model.replicationAttrs.isPrimary 'not' }} be able to use Vault during this time.
35+
</p>
36+
</section>
37+
<footer class="modal-card-foot modal-card-foot-outlined">
38+
<button
39+
class="button is-primary"
40+
disabled={{if (and (eq replicationMode "dr") (not dr_operation_token)) true}}
41+
onclick={{action "onSubmit" "reindex"}}
42+
data-test-reindex-confirm-button
43+
>
44+
Reindex
45+
</button>
46+
<button
47+
class="button is-secondary"
48+
onclick={{action (mut isModalActive) false}}
49+
data-test-reindex-cancel-button>
50+
Cancel
51+
</button>
52+
</footer>
53+
</Modal>

0 commit comments

Comments
 (0)