Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ui/replication status discoverability #8705

Merged
merged 56 commits into from
Jun 18, 2020
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
e51ba17
Sidebranch: add new route on DR secondary (#8640)
Monkeychip Apr 1, 2020
72f2743
Sidebranch: Setup Replication Page as component to be consumed in all…
Monkeychip Apr 2, 2020
635f963
Sidebranch: setup replication dashboard with scss and initial card co…
Monkeychip Apr 6, 2020
bf23bc0
Ui/dr primary/initial page setup (#8671)
Apr 8, 2020
2eb3c0d
Ui/dr primary components (#8711)
Apr 9, 2020
f8123ed
Sidebranch: DR Secondary Dashboard - pr4 (#8706)
Monkeychip Apr 13, 2020
5eb4838
Sidebranch: DR Secondary Dashboard state message handlers (#8741)
Monkeychip Apr 16, 2020
7f992f3
Ui/dr dashboard tests (#8732)
Apr 20, 2020
e477dc9
show dynamic state glyph (#8747)
Apr 20, 2020
358feb5
Merge branch 'master' into ui/replication-status-discoverability
Monkeychip Apr 24, 2020
2f78a9a
Sidebranch: dr-secondary-dashboard-pr7 (#8792)
Monkeychip Apr 24, 2020
36f0a80
Replication Primary Dashboard: handle errors (#8845)
Apr 28, 2020
c5ce3a2
Ui/replication/refactor dashboard components (#8878)
Apr 29, 2020
be645f3
Ui/replication/primary reindexing (#8906)
May 6, 2020
241c1f0
Merge branch 'master' into ui/replication-status-discoverability
May 6, 2020
f31dc15
Sidebranch: component and acceptance tests (#8903)
Monkeychip May 7, 2020
5293685
Merge branch 'master' into ui/replication-status-discoverability
May 7, 2020
f60d159
Sidebranch: remove delta, toggle, and make auto-refresh (#8945)
Monkeychip May 8, 2020
05a985d
ensure status menu displays replication state, not just one (#8959)
May 8, 2020
fe96778
Merge branch 'master' into ui/replication-status-discoverability
May 8, 2020
b1735c8
Add Replication Reindexing Progress Bar (#8975)
May 13, 2020
c5f3e92
Sidebranch: Performance Secondary Dashboard (#8956)
Monkeychip May 13, 2020
11aa304
Merge branch 'master' into ui/replication-status-discoverability
May 15, 2020
4448ad8
Ui/replication/test update (#8995)
May 18, 2020
1dcb6ba
Merge branch 'master' into ui/replication-status-discoverability
May 19, 2020
b88c367
prepare KnownSecondariesTable for backend compatibility (#9029)
May 19, 2020
dd81d58
Ui/replication mgmt action block (#9053)
chelshaw May 21, 2020
83c8944
Sidebranch: address transition issues on replication engine and actio…
Monkeychip May 21, 2020
ef8e476
add Replication Learn Links to wizard (#9106)
May 29, 2020
bf88fdc
Ui/summary dashboard (#9079)
Monkeychip May 29, 2020
6fa0f54
change message with bold 'not' if primary (#9112)
Monkeychip Jun 1, 2020
bd59ffc
Merge branch 'master' into ui/replication-status-discoverability
Jun 1, 2020
65e53f8
Add JSDocs to components (#9125)
Monkeychip Jun 2, 2020
df031aa
Merge branch 'master' into ui/replication-status-discoverability
Jun 2, 2020
764b8e1
Replication Management Sidebranch: Replication Action Disable (#9061)
chelshaw May 29, 2020
77c7f31
Refactor Replication Action: Promote to use modal flow (#9122)
chelshaw Jun 2, 2020
85d9470
Ui/replication mgmt/reindex action (#9126)
chelshaw Jun 3, 2020
da4c6db
Ui/replication mgmt/recover action (#9127)
chelshaw Jun 3, 2020
0d2c486
Close link-to tag in header (#9139)
chelshaw Jun 3, 2020
6f0411d
UI: Fix replication management tests (#9136)
Jun 4, 2020
6a63041
Ui/replication mgmt/update primary action (#9149)
chelshaw Jun 5, 2020
d214629
Ui/secondary token flow dr (#9150)
Monkeychip Jun 8, 2020
1d27584
Add known primaries info table (#9152)
Jun 8, 2020
f8ad326
Ui/rep design updates (#9169)
Jun 9, 2020
d93798d
Merge branch 'master' into ui/replication-status-discoverability
Jun 9, 2020
eb36143
Ui/fix enable overflow (#9173)
Jun 9, 2020
68bc4ab
Merge branch 'ui/replication-mgmt-sidebranch' into ui/replication-sta…
Monkeychip Jun 10, 2020
b0b9f20
Ui/replication mgmt/demote action (#9168)
chelshaw Jun 10, 2020
07817f0
Ui/replication merge cleanup 2 (#9212)
Monkeychip Jun 15, 2020
dd81267
Add real connected state and API address (#9219)
Jun 15, 2020
87d29b4
fix enterprise test (#9229)
Monkeychip Jun 15, 2020
4f92449
Merge branch 'master' into ui/replication-status-discoverability
Jun 15, 2020
b13b1bf
Ui/replication mgmt/generate token action (#9187)
chelshaw Jun 17, 2020
9068757
Merge branch 'master' into ui/replication-status-discoverability
Monkeychip Jun 18, 2020
dca26c9
Merge branch 'master' into ui/replication-status-discoverability
Jun 18, 2020
8c19624
use none set instead of not defined
Jun 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor Replication Action: Promote to use modal flow (#9122)
  • Loading branch information
chelshaw committed Jun 2, 2020
commit 77c7f31880d58c8b81451eff4d8cadd30554b802
172 changes: 70 additions & 102 deletions ui/lib/core/addon/templates/components/replication-action-promote.hbs
Original file line number Diff line number Diff line change
@@ -1,28 +1,56 @@
{{#if (and (eq replicationMode 'dr') (eq model.replicationAttrs.modeForUrl 'secondary'))}}
<div class="box is-marginless is-shadowless">
<div class="action-block is-rounded">
<div class="action-block-info">
<h4 class="title is-5 is-marginless">
Promote cluster
</h4>
<p>
This cluster is currently running as a DR Replication Secondary.
Promote the cluster to a primary by entering DR Operation Token.
Promote this cluster to a {{replicationDisplayMode}} primary
</p>
<div class="field">
<label for="dr_operation_token" class="is-label">
DR Operation Token
</label>
<div class="control">
{{input class="input" id="dr_operation_token" name="dr_operation_token" value=dr_operation_token}}
</div>
</div>
<ToggleButton
@class="is-block"
@toggleAttr="showOptions"
@toggleTarget={{this}}
@openLabel="Hide options"
@closedLabel="Options"
/>
{{#if showOptions}}
<div class="box is-marginless">
</div>

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

<Modal
@title="Promote cluster?"
@onClose={{action (mut isModalActive) false}}
@isActive={{isModalActive}}
@type="warning"
@showCloseButton={{true}}
>
<section class="modal-card-body">
<div class="box is-shadowless is-fullwidth is-sideless">

{{#if (eq replicationMode "dr")}}
<p class="has-bottom-margin-m">
To promote this DR Replication Secondary to a primary, enter the DR Operation token.
</p>
{{/if}}
<p class="has-bottom-margin-m">
Vault Replication is not designed for active-active usage. Enabling two primaries should never be done, as it can lead to data loss if they or their secondaries are ever reconnected. If the cluster has a primary, be sure to demote it before promoting a secondary.
</p>

<div data-test-promote-dr-inputs>
{{#if (eq replicationMode "dr")}}
<div class="field is-borderless">
<label for="dr_operation_token" class="is-label is-size-6">
DR Operation Token
</label>
<div class="control">
{{input class="input" id="dr_operation_token" name="dr_operation_token" value=dr_operation_token}}
</div>
</div>
{{/if}}
<div class="field">
<label for="primary_cluster_addr" class="is-label">
<label for="primary_cluster_addr" class="is-label is-size-6">
Primary cluster address <em class="is-optional">(optional)</em>
</label>
<div class="control">
@@ -41,89 +69,29 @@
checked={{force}}
onchange={{action (mut force) value="target.checked"}}
/>
<label for="forcePromote" class="is-label">
<label for="forcePromote" class="is-label is-size-6">
Force promotion of this cluster
</label>
<p>Promote the cluster even if certain safety checks fail. This could result in data loss of data isn't fully replicated</p>
</div>
<AlertInline
@type="warning"
@message="Forcing promotion could result in data loss if data isn't fully replicated. Force promotion
promotes the cluster even if certain safety checks fail."
/>
</div>
</div>
{{/if}}
</div>
<div class="box is-marginless is-shadowless">
<div class="field">
<div class="control">
<ConfirmAction
@buttonClasses="button is-primary"
@confirmTitle="Promote this cluster?"
@confirmMessage="This will affect how your Vault data is replicated."
@confirmButtonText="Promote"
@horizontalPosition="auto-left"
@onConfirmAction={{action "onSubmit" "promote" model.replicationAttrs.modeForUrl (hash dr_operation_token=dr_operation_token primary_cluster_addr=primary_cluster_addr force=force)}}
>
Promote cluster
</ConfirmAction>
</div>
</div>
</div>
{{else}}
<h4 class="title is-5 is-marginless">
Promote cluster
</h4>
<div class="content">
<p>Promote the cluster to primary.
<AlertInline
@type="warning"
@message="Vault Replication is not designed for active-active usage and enabling two primaries should never be done, as it can lead to data loss if they or their secondaries are ever reconnected.
If the cluster has a primary, be sure to demote it before promoting a secondary."
/>
</p>
<div class="field">
<label for="primary_cluster_addr" class="is-label">
Primary cluster address <em class="is-optional">(optional)</em>
</label>
<div class="control">
{{input class="input" id="primary_cluster_addr" name="primary_cluster_addr" value=primary_cluster_addr}}
</div>
<p class="help has-text-grey">
Overrides the cluster address that the primary gives to secondary nodes.
</p>
</div>
<div class="field">
<div class="b-checkbox">
<input type="checkbox"
id="forcePromote"
class="styled"
checked={{force}}
onchange={{action (mut force) value="target.checked"}}
/>
<label for="forcePromote" class="is-label">
Force promotion of this cluster
</label>
</div>
<AlertInline
@type="warning"
@message="Forcing promotion could result in data loss if data isn't fully replicated. Force promotion
promotes the cluster even if certain safety checks fail."
/>
</div>
</div>
<div class="field">
<div class="control">
<ConfirmAction
@buttonClasses="button is-primary"
@confirmTitle="Promote this cluster?"
@confirmMessage="This will affect how your Vault data is replicated."
@confirmButtonText="Promote"
@horizontalPosition="auto-left"
@onConfirmAction={{action "onSubmit" "promote" model.replicationAttrs.modeForUrl (hash primary_cluster_addr=primary_cluster_addr force=force)}}
>
Promote cluster
</ConfirmAction>
</div>
</div>
{{/if}}
</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" "promote" model.replicationAttrs.modeForUrl (hash dr_operation_token=dr_operation_token primary_cluster_addr=primary_cluster_addr force=force)}}
data-test-promote-confirm-button
>
Promote
</button>
<button
class="button is-secondary"
onclick={{action (mut isModalActive) false}}
data-test-promote-cancel-button>
Cancel
</button>
</footer>
</Modal>