-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 - core addon & replication engine #6629
Changes from 1 commit
e930ebf
fb2f134
56a1b6a
c014f00
d41d95e
29a9d1e
4880692
30e82cc
e45f981
497d656
87417a4
2811fa5
454da2b
e56d139
c82289c
5bf7644
355f626
3c00245
672508d
fea375a
45827d2
1076fa9
9b4b32a
d0c8de3
e7470e6
695b68e
a010369
33ca09a
323cd6a
af56b73
c956ff2
37023bc
1d963fe
9f950d6
893b32d
971030c
a219a26
1b7c5fd
becb8ce
bbcabca
9c06ec4
17acf70
e3c9983
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…ion engine, remove some partials
- Loading branch information
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{{#if (eq display 'menu')}} | ||
<div class="level is-mobile"> | ||
<div class="level-left is-flex-1"> | ||
{{#if replicationUnsupported}} | ||
Unsupported | ||
{{else if replicationEnabled}} | ||
<span> | ||
{{capitalize modeForUrl}} | ||
</span> | ||
{{#if secondaryId}} | ||
<small> | ||
<code> | ||
{{secondaryId}} | ||
</code> | ||
</small> | ||
{{/if}} | ||
<small> | ||
<code> | ||
{{clusterIdDisplay}} | ||
</code> | ||
</small> | ||
{{else if (and (eq mode 'performance') (not (has-feature "Performance Replication")))}} | ||
Learn more | ||
{{else if auth.currentToken}} | ||
Enable {{if (eq mode 'performance') 'Performance' 'DR'}} | ||
{{else}} | ||
Not enabled | ||
{{/if}} | ||
</div> | ||
<div class="level-right"> | ||
{{#if replicationEnabled}} | ||
{{#if (get cluster (concat mode 'StateGlyph'))}} | ||
<span class="has-text-success"> | ||
{{i-con size=16 glyph=(get cluster (concat mode 'StateGlyph'))}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here's another |
||
</span> | ||
{{else if syncProgress}} | ||
<progress value="{{syncProgressPercent}}" max="100" class="progress is-small is-narrow is-info"> | ||
{{syncProgress.progress}} of {{syncProgress.total}} keys | ||
</progress> | ||
{{/if}} | ||
{{else}} | ||
<ICon @glyph="neutral-circled-outline" @size="16" @class="has-text-grey-light" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this instance of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heh, probably - just a branch that's hard to hit locally. |
||
{{/if}} | ||
</div> | ||
</div> | ||
{{else}} | ||
<div class="level-left is-flex-1"> | ||
<div> | ||
{{#if (and (eq mode 'performance') (not (has-feature "Performance Replication")))}} | ||
<p> | ||
Performance Replication is a feature of Vault Enterprise Premium. | ||
</p> | ||
<p class="has-text-centered"> | ||
{{#upgrade-link linkClass="button is-ghost has-icon-right" pageName="Performance Replication"}} | ||
Learn more | ||
{{i-con glyph="chevron-right"}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this one too? |
||
{{/upgrade-link}} | ||
</p> | ||
{{else if replicationEnabled}} | ||
<h5 class="title is-7 is-uppercase is-marginless"> | ||
Enabled | ||
</h5> | ||
<span class="has-text-grey"> | ||
{{capitalize modeForUrl}} | ||
</span> | ||
{{#if secondaryId}} | ||
<span class="tag"> | ||
<code> | ||
{{secondaryId}} | ||
</code> | ||
</span> | ||
{{/if}} | ||
<span class="tag"> | ||
<code> | ||
{{clusterIdDisplay}} | ||
</code> | ||
</span> | ||
{{else}} | ||
<p class="help has-text-grey-dark"> | ||
{{#if (eq mode 'dr')}} | ||
DR is designed to protect against catastrophic failure of entire clusters. Secondaries do not forward service requests (until they are elected and become a new primary). | ||
{{else}} | ||
Performance Replication scales workloads horizontally across clusters to make requests faster. Local secondaries handle read requests but forward writes to the primary to be handled. | ||
{{/if}} | ||
</p> | ||
{{/if}} | ||
</div> | ||
</div> | ||
<div class="level-right"> | ||
{{#if replicationDisabled}} | ||
{{#link-to "vault.cluster.replication.mode.index" cluster.name mode class="button is-primary"}} | ||
Enable | ||
{{/link-to}} | ||
{{else if (eq mode 'dr')}} | ||
{{cluster.drReplicationStateDisplay}} | ||
{{else if (eq mode 'performance')}} | ||
{{cluster.perfReplicationStateDisplay}} | ||
{{/if}} | ||
</div> | ||
|
||
{{/if}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from 'core/components/alert-banner'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from 'core/components/i-con'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from 'core/components/message-error'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from 'core/components/replication-mode-summary'; |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this template has a lot of conditionals in it and it can be hard to keep track of what's going on. could it be split up into smaller components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, before it was a couple of partials so it was easier to follow. I spent a while trying to get components to work with the larger one and couldn't get it right when using components so this (inlining the templates) was my fall back :-/ - I think pretty much this whole engine needs a rewrite. This one may be easier to divvy up than the other one I was looking at though, I'll give it a try.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. I think it's worth trying, but I don't see it as a blocker. Just makes things easier to read. 😬