-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Sidebranch: Setup Replication Page as component to be consumed in all pages for project #8661
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
Merged
Monkeychip
merged 16 commits into
ui/replication-status-discoverability
from
ui/dr-secondary-details-setup-pr2
Apr 2, 2020
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4ea6ff9
setup, not complete
Monkeychip 2be992e
update routing
Monkeychip c8b10c9
clean up
Monkeychip 3800c4f
add test
Monkeychip 90d9d69
add link from status menu
Monkeychip c356e25
clean up
Monkeychip 5d5a655
fixes per pr comments
Monkeychip 74afc6b
setup dashboard with contextual components, and toggle
Monkeychip f496bbb
setup option to show tabs or not
Monkeychip cdd9510
handle conditional nav menu
Monkeychip c1bf61d
pass in whole model object
Monkeychip 9d7be2f
rename to replication-page
Monkeychip 472154d
Merge branch 'ui/replication-status-discoverability' into ui/dr-secon…
Monkeychip 074a13a
clean up
Monkeychip d8357da
clean up based on pr feedback
Monkeychip a91ca29
fix linting error
Monkeychip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { inject as service } from '@ember/service'; | ||
import Component from '@ember/component'; | ||
|
||
export default Component.extend({}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Component from '@ember/component'; | ||
import { computed } from '@ember/object'; | ||
|
||
export default Component.extend({ | ||
// ARG TODO: if other components need access to this response, will need to move it higher up to replication parent. | ||
checkedValue: false, | ||
handleToggleOff: computed('checkedValue', function() { | ||
console.log(this.checkedValue, 'setup to handle change later'); | ||
let status = this.checkedValue ? 'on' : 'off'; | ||
return status; | ||
}), | ||
}); |
10 changes: 10 additions & 0 deletions
10
ui/app/routes/vault/cluster/replication-dr-promote/details.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { inject as service } from '@ember/service'; | ||
import Base from '../cluster-route-base'; | ||
|
||
export default Base.extend({ | ||
replicationMode: service(), | ||
beforeModel() { | ||
this._super(...arguments); | ||
this.get('replicationMode').setMode('dr'); | ||
}, | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{{yield (hash | ||
header=(component 'replication-page/replication-header') | ||
toggle=(component 'replication-page/replication-toggle') | ||
Monkeychip marked this conversation as resolved.
Show resolved
Hide resolved
|
||
)}} |
1 change: 1 addition & 0 deletions
1
ui/app/templates/components/replication-page/replication-content.hbs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{yield}} |
66 changes: 66 additions & 0 deletions
66
ui/app/templates/components/replication-page/replication-header.hbs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{{!-- DR Secondary has a different Nav Header with access only to the Status menu --}} | ||
{{!-- ARG TODO all links are hard coded as well as titles right now, they will need to by dynamic --}} | ||
{{#if (and (eq model.rm.mode 'dr') (eq model.dr.mode 'secondary') )}} | ||
<NavHeader as |Nav|> | ||
<Nav.home> | ||
<HomeLink @class="navbar-item splash-page-logo has-text-white"> | ||
<LogoEdition /> | ||
</HomeLink> | ||
</Nav.home> | ||
<Nav.items> | ||
<div class="navbar-item status-indicator-button" data-status="{{if model.unsealed "good" "bad"}}"> | ||
<StatusMenu @label="Status" @onLinkClick={{action Nav.closeDrawer}} /> | ||
</div> | ||
</Nav.items> | ||
</NavHeader> | ||
{{/if}} | ||
|
||
<PageHeader as |p|> | ||
<p.top> | ||
{{#key-value-header | ||
baseKey=baseKey | ||
path="vault.cluster.replication-dr-promote" | ||
root=backendCrumb | ||
}} | ||
<li> | ||
<span class="sep"> | ||
/ | ||
</span> | ||
{{#link-to "vault.cluster.replication-dr-promote"}} | ||
Disaster Recovery | ||
{{/link-to}} | ||
</li> | ||
{{/key-value-header}} | ||
</p.top> | ||
<p.levelLeft> | ||
<h1 class="title is-3"> | ||
Details | ||
<span class="tag"> | ||
{{model.dr.mode}} | ||
</span> | ||
<span class="tag"> | ||
{{model.dr.clusterIdDisplay}} | ||
</span> | ||
</h1> | ||
</p.levelLeft> | ||
</PageHeader> | ||
|
||
{{#if showTabs}} | ||
<div class="tabs-container box is-bottomless is-marginless is-fullwidth is-paddingless"> | ||
<nav class="tabs"> | ||
<ul> | ||
{{!-- TODO should map over array of options with link and title --}} | ||
{{#link-to | ||
"vault.cluster.replication-dr-promote" | ||
tagName="li" | ||
activeClass="is-active" | ||
current-when="" | ||
}} | ||
{{#link-to "vault.cluster.replication-dr-promote"}} | ||
Details | ||
{{/link-to}} | ||
{{/link-to}} | ||
</ul> | ||
</nav> | ||
</div> | ||
{{/if}} |
5 changes: 5 additions & 0 deletions
5
ui/app/templates/components/replication-page/replication-toggle.hbs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<Toolbar> | ||
<ToolbarActions> | ||
<Toggle @tagName="name" @checked={{checkedValue}} @onChange={{action (mut checkedValue)}}> Auto-refresh {{handleToggleOff}}</Toggle> | ||
Monkeychip marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
</ToolbarActions> | ||
</Toolbar> |
26 changes: 13 additions & 13 deletions
26
ui/app/templates/vault/cluster/replication-dr-promote/details.hbs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<SplashPage as |Page|> | ||
<Page.header> | ||
<h1 class="title is-4"> | ||
Disaster Recovery | ||
</h1> | ||
</Page.header> | ||
<Page.content> | ||
<LinkTo | ||
@params={{array "vault.cluster.replication-dr-promote"}} | ||
class="is-block">MEEP | ||
</LinkTo> | ||
</Page.content> | ||
</SplashPage> | ||
<section class="section"> | ||
<div class="container is-widescreen"> | ||
{{!-- ARG TODO setup error state and return --}} | ||
<ReplicationPage as |Page|> | ||
<Page.header | ||
@showTabs={{false}} | ||
@model={{model}} | ||
/> | ||
<Page.toggle /> | ||
<Page.content /> | ||
</ReplicationPage> | ||
</div> | ||
</section> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.