-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 unseal screen updates #11705
Merged
Merged
UI unseal screen updates #11705
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c859748
Styling for empty-state and splash-page
hashishaw b27a9fe
Update shamir-flow language and trigger onError on non-400 error
hashishaw 0b3b4b0
Add license terminated screen to unseal
hashishaw c7516c3
Clean up language
hashishaw 9b12a6a
Remove log
hashishaw 45e73d9
Add changelog
hashishaw 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 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,3 @@ | ||
```release-note:improvement | ||
ui: Add specific error message if unseal fails due to license | ||
``` |
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -21,5 +21,5 @@ | |
} | ||
|
||
.splash-page-header { | ||
padding: $size-6 $size-5; | ||
padding: $size-6 0; | ||
} |
This file contains 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,26 +1,60 @@ | ||
<SplashPage as |Page|> | ||
<Page.header> | ||
<h1 class="title is-3"> | ||
Unseal Vault | ||
</h1> | ||
</Page.header> | ||
<Page.content> | ||
<AlertBanner | ||
@type="warning" | ||
@title="{{capitalize model.name}} is {{if model.unsealed 'unsealed' 'sealed'}}" | ||
@message="You can unseal the vault by entering a portion of the master key. Once all portions are entered, the vault will be unsealed." | ||
@class="unseal-warning" | ||
data-test-cluster-status | ||
/> | ||
<ShamirFlow | ||
@action="unseal" | ||
@onUpdate={{action 'setUnsealState'}} | ||
@onShamirSuccess={{action 'transitionToCluster'}} | ||
@buttonText="Unseal" | ||
@thresholdPath="t" | ||
@isComplete={{action 'isUnsealed'}} | ||
@threshold={{model.sealThreshold}} | ||
@progress={{model.sealProgress}} | ||
/> | ||
</Page.content> | ||
</SplashPage> | ||
{{#if showLicenseError}} | ||
<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 activeCluster.unsealed "good" "bad"}}"> | ||
<StatusMenu @label="Status" @onLinkClick={{action Nav.closeDrawer}} /> | ||
</div> | ||
</Nav.items> | ||
</NavHeader> | ||
<div class="section is-flex-v-centered-tablet is-flex-1 is-fullwidth"> | ||
<div class="columns is-centered is-gapless is-fullwidth"> | ||
<EmptyState | ||
class="empty-state-transparent" | ||
@title="License required" | ||
@subTitle="Vault license has terminated" | ||
@icon="disabled" | ||
@bottomBorder={{true}} | ||
@message="Your Vault license has terminated and Vault is sealed. To unseal, add a current license to your configuration and restart Vault." | ||
> | ||
<p class="align-right"><a href="https://learn.hashicorp.com/tutorials/nomad/hashicorp-enterprise-license" rel="noreferrer noopener">License documentation</a></p> | ||
</EmptyState> | ||
</div> | ||
</div> | ||
{{else}} | ||
<SplashPage as |Page|> | ||
<Page.header> | ||
<h1 class="title is-3"> | ||
Unseal Vault | ||
</h1> | ||
</Page.header> | ||
<Page.content> | ||
<div class="box is-borderless is-shadowless is-marginless"> | ||
<p class="title is-5">{{capitalize model.name}} is {{if model.unsealed 'unsealed' 'sealed'}}</p> | ||
<p> | ||
Unseal Vault by entering portions of the unseal key. This can be done via multiple mechanisms on multiple computers. Once all portions are entered, the root key will be decrypted and Vault will unseal. | ||
</p> | ||
</div> | ||
<ShamirFlow | ||
@action="unseal" | ||
@onUpdate={{action 'setUnsealState'}} | ||
@onLicenseError={{action 'handleLicenseError'}} | ||
@onShamirSuccess={{action 'transitionToCluster'}} | ||
@buttonText="Unseal" | ||
@thresholdPath="t" | ||
@isComplete={{action 'isUnsealed'}} | ||
@threshold={{model.sealThreshold}} | ||
@progress={{model.sealProgress}} | ||
/> | ||
</Page.content> | ||
<Page.footer> | ||
<div class="box is-borderless is-shadowless"> | ||
<p><a target="_blank" rel="noreferrer noopener" href="https://www.vaultproject.io/docs/concepts/seal">Seal/unseal documentation</a></p> | ||
</div> | ||
</Page.footer> | ||
</SplashPage> | ||
{{/if}} |
This file contains 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
This file contains 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
This file contains 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
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.
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.
Can we still use this.set?
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.
Yes, possibly because this is in a controller? I considered moving all of this logic to a separate component that we can glimmerize but that seemed out of scope for this, especially considering the backport