-
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 identity lists #4655
Merged
Merged
UI identity lists #4655
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
42df30b
add new key_info to the list models for identity endpoints
meirish 159ef90
add details to group and show pages
meirish 4249f01
add parent groups to group tabs
meirish 32a45b0
render alias the same everywhere
meirish 284a9ce
space tab subnav more like the designs
meirish b4a8842
fix tests
meirish 6a1d08e
pull tabs in and remove padding
meirish 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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import ApplicationSerializer from '../application'; | ||
import Ember from 'ember'; | ||
|
||
export default ApplicationSerializer.extend({ | ||
normalizeItems(payload) { | ||
if (payload.data.keys && Array.isArray(payload.data.keys)) { | ||
return payload.data.keys; | ||
} | ||
Ember.assign(payload, payload.data); | ||
delete payload.data; | ||
return payload; | ||
}, | ||
|
||
extractLazyPaginatedData(payload) { | ||
let list; | ||
list = payload.data.keys.map(key => { | ||
let model = payload.data.key_info[key]; | ||
model.id = key; | ||
return model; | ||
}); | ||
delete payload.data.key_info; | ||
return list.sort((a,b) => { | ||
return a.name.localeCompare(b.name); | ||
}); | ||
}, | ||
|
||
}); |
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,2 @@ | ||
import IdentitySerializer from './_base'; | ||
export default IdentitySerializer.extend(); |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import IdentitySerializer from './_base'; | ||
export default IdentitySerializer.extend(); |
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
37 changes: 37 additions & 0 deletions
37
ui/app/templates/components/identity/item-parent-groups.hbs
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,37 @@ | ||
{{#if model.parentGroupIds.length}} | ||
{{#each model.parentGroupIds as |gid|}} | ||
{{#linked-block | ||
"vault.cluster.access.identity.show" | ||
"groups" | ||
gid | ||
details | ||
class="box is-sideless is-marginless" | ||
}} | ||
<div class="columns is-mobile"> | ||
<div class="column is-10"> | ||
<a href={{href-to "vault.cluster.access.identity.show" "groups" gid "details" }} | ||
class="is-block has-text-black has-text-weight-semibold" | ||
>{{i-con | ||
glyph='folder' | ||
size=14 | ||
class="has-text-grey-light" | ||
}}{{gid}}</a> | ||
</div> | ||
<div class="column has-text-right"> | ||
</div> | ||
</div> | ||
{{/linked-block}} | ||
{{/each}} | ||
{{else}} | ||
<div class="box is-bottomless has-background-white-bis"> | ||
<div class="columns is-centered"> | ||
<div class="column is-half has-text-centered"> | ||
<div class="box is-shadowless has-background-white-bis"> | ||
<p class="has-text-grey"> | ||
This group has no parent groups. | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{/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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
data-test-identity-row=true | ||
}} | ||
<div class="columns is-mobile"> | ||
<div class="column is-10"> | ||
<div class="column is-7-tablet is-10-mobile"> | ||
<a href={{href-to | ||
"vault.cluster.access.identity.show" | ||
item.id | ||
|
@@ -21,7 +21,18 @@ | |
glyph="role" | ||
size=14 | ||
class="has-text-grey-light" | ||
}}<span class="has-text-weight-semibold">{{item.id}}</span></a> | ||
}}<span class="has-text-weight-semibold">{{item.name}}</span></a> | ||
<div class="has-text-grey is-size-8"> | ||
{{item.id}} | ||
</div> | ||
</div> | ||
<div class="column is-3 is-hidden-mobile"> | ||
{{#if (eq item.identityType "entity")}} | ||
{{#if item.aliases.length}} | ||
{{pluralize item.aliases.length "alias"}} | ||
{{/if}} | ||
{{else}} | ||
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. ✂️ ? 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. Oh left that in from groups, can take out the outer if entirely until we land other groups stuff. |
||
{{/if}} | ||
</div> | ||
<div class="column has-text-right"> | ||
{{#popup-menu name="identity-item" onOpen=(action "reloadRecord" item)}} | ||
|
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
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.
Did this need spaces between for a reason?
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.
Lol nope, was being hasty - will fix!