-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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/control group db cred #12024
Merged
Merged
UI/control group db cred #12024
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d525b1c
Update database/credential model, adapter, serializer
hashishaw 800911d
Remove fetch logic from generateCredentialDatabase component
hashishaw 0f8befc
Get database/credential on credentials route if backend type is database
hashishaw 80d6ee9
Cleanup
hashishaw 9e36775
Update button for credentials to get if static role
hashishaw cf19d6f
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:bug | ||
ui: fix control group access for database credential | ||
``` |
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
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
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 |
---|---|---|
|
@@ -38,7 +38,7 @@ | |
{{on 'click' (fn this.generateCreds @model.id)}} | ||
data-test-database-role-generate-creds | ||
> | ||
Generate credentials | ||
{{if (eq @model.type "static") "Get credentials" "Generate credentials"}} | ||
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. thank you for tackling this while you're in here |
||
</button> | ||
{{/if}} | ||
{{#if @model.canEditRole}} | ||
|
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 |
---|---|---|
|
@@ -18,15 +18,15 @@ | |
</p.levelLeft> | ||
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. glimmerizing! 💙 |
||
</PageHeader> | ||
|
||
<div class={{unless (eq this.roleType 'noRoleFound') "box is-fullwidth is-sideless is-marginless"}}> | ||
{{!-- ROLE TYPE NOT FOUND, returned when query on the creds and static creds both returned error --}} | ||
{{#if (eq this.roleType 'noRoleFound') }} | ||
<div class={{if @roleType "box is-fullwidth is-sideless is-marginless"}}> | ||
{{!-- If no role type, that means both static and dynamic requests returned an error --}} | ||
{{#unless @roleType }} | ||
<EmptyState | ||
@title={{this.errorTitle}} | ||
@subTitle="Error {{this.errorHttpStatus}}" | ||
@title={{errorTitle}} | ||
@subTitle="Error {{@model.errorHttpStatus}}" | ||
@icon="alert-circle-outline" | ||
@bottomBorder={{true}} | ||
@message={{this.errorMessage}} | ||
@message={{@model.errorMessage}} | ||
> | ||
<nav class="breadcrumb"> | ||
<ul class="is-grouped-split"> | ||
|
@@ -41,53 +41,53 @@ | |
</ul> | ||
</nav> | ||
</EmptyState> | ||
{{/if}} | ||
{{#unless (or model.errorMessage (eq this.roleType 'noRoleFound'))}} | ||
{{/unless}} | ||
{{#unless (or @model.errorMessage (not @roleType))}} | ||
<AlertBanner | ||
@type="warning" | ||
@message="You will not be able to access these credentials later, so please copy them now." | ||
data-test-warning | ||
/> | ||
{{/unless}} | ||
{{!-- DYNAMIC ROLE --}} | ||
{{#if (and (eq this.roleType 'dynamic') model.username)}} | ||
<InfoTableRow @label="Username" @value={{model.username}}> | ||
{{#if (and (eq @roleType 'dynamic') @model.username)}} | ||
<InfoTableRow @label="Username" @value={{@model.username}}> | ||
<MaskedInput | ||
@value={{model.username}} | ||
@value={{@model.username}} | ||
@name="Username" | ||
@displayOnly={{true}} | ||
@allowCopy={{true}} | ||
/> | ||
</InfoTableRow> | ||
<InfoTableRow @label="Password" @value={{model.password}}> | ||
<InfoTableRow @label="Password" @value={{@model.password}}> | ||
<MaskedInput | ||
@value={{model.password}} | ||
@value={{@model.password}} | ||
@name="Password" | ||
@displayOnly={{true}} | ||
@allowCopy={{true}} | ||
/> | ||
</InfoTableRow> | ||
<InfoTableRow @label="Lease ID" @value={{model.leaseId}} /> | ||
<InfoTableRow @label="Lease Duration" @value={{format-duration model.leaseDuration }} /> | ||
<InfoTableRow @label="Lease ID" @value={{@model.leaseId}} /> | ||
<InfoTableRow @label="Lease Duration" @value={{format-duration @model.leaseDuration }} /> | ||
{{/if}} | ||
{{!-- STATIC ROLE --}} | ||
{{#if (and (eq this.roleType 'static') model.username)}} | ||
{{#if (and (eq @roleType 'static') @model.username)}} | ||
<InfoTableRow | ||
@label="Last Vault rotation" | ||
@value={{date-format model.lastVaultRotation 'MMMM d yyyy, h:mm:ss a'}} | ||
@tooltipText={{model.lastVaultRotation}} | ||
@value={{date-format @model.lastVaultRotation 'MMMM d yyyy, h:mm:ss a'}} | ||
@tooltipText={{@model.lastVaultRotation}} | ||
/> | ||
<InfoTableRow @label="Password" @value={{model.password}}> | ||
<InfoTableRow @label="Password" @value={{@model.password}}> | ||
<MaskedInput | ||
@value={{model.password}} | ||
@value={{@model.password}} | ||
@name="Password" | ||
@displayOnly={{true}} | ||
@allowCopy={{true}} | ||
/> | ||
</InfoTableRow> | ||
<InfoTableRow @label="Username" @value={{model.username}} /> | ||
<InfoTableRow @label="Rotation Period" @value={{format-duration model.rotationPeriod}} /> | ||
<InfoTableRow @label="Time Remaining" @value={{format-duration model.ttl}} /> | ||
<InfoTableRow @label="Username" @value={{@model.username}} /> | ||
<InfoTableRow @label="Rotation Period" @value={{format-duration @model.rotationPeriod}} /> | ||
<InfoTableRow @label="Time Remaining" @value={{format-duration @model.ttl}} /> | ||
{{/if}} | ||
</div> | ||
<div class="has-top-bottom-margin"> | ||
|
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
Oops, something went wrong.
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.
much cleaner, thank you for moving this logic out of the component.