-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui: add capabilities to pki key model (#18412)
* add capabilities to pki key model * move key list from route into component * rename test file * rename test file * add tests * pass capabilities directly to key list componente * add test for key list component * rename test files * remove href assertion
- Loading branch information
1 parent
6cd41e4
commit 0d610de
Showing
20 changed files
with
379 additions
and
87 deletions.
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,71 @@ | ||
<Toolbar> | ||
<ToolbarActions> | ||
{{#if @canImportKey}} | ||
<ToolbarLink @route="keys.import" @type="download" data-test-pki-key-import> | ||
Import | ||
</ToolbarLink> | ||
{{/if}} | ||
{{#if @canGenerateKey}} | ||
<ToolbarLink @route="keys.create" @type="add" data-test-pki-key-generate> | ||
Generate | ||
</ToolbarLink> | ||
{{/if}} | ||
</ToolbarActions> | ||
</Toolbar> | ||
<p class="has-padding">Below is information about the private keys used by the issuers to sign certificates. While | ||
certificates represent a public assertion of an identity, private keys represent the private part of that identity, a | ||
secret used to prove who they are and who they trust.</p> | ||
|
||
{{#if @keyModels.length}} | ||
{{#each @keyModels as |pkiKey|}} | ||
<LinkedBlock class="list-item-row" @params={{array "keys.key.details" pkiKey.keyId}} @linkPrefix={{@mountPoint}}> | ||
<div class="level is-mobile"> | ||
<div class="level-left"> | ||
<div> | ||
<Icon @name="certificate" class="has-text-grey-light" /> | ||
<span class="has-text-weight-semibold is-underline" data-test-key-id> | ||
{{pkiKey.id}} | ||
</span> | ||
<div class="is-flex-row has-left-margin-l has-top-margin-xs"> | ||
{{#if pkiKey.keyName}} | ||
<span class="tag has-text-grey-dark" data-test-key-name>{{pkiKey.keyName}}</span> | ||
{{/if}} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="level-right is-flex is-paddingless is-marginless"> | ||
<div class="level-item"> | ||
<PopupMenu> | ||
<nav class="menu"> | ||
<ul class="menu-list"> | ||
<li> | ||
<LinkTo | ||
@route="keys.key.details" | ||
@model={{pkiKey.keyId}} | ||
@disabled={{not @canRead}} | ||
data-test-key-menu-link="details" | ||
> | ||
Details | ||
</LinkTo> | ||
</li> | ||
<li> | ||
<LinkTo | ||
@route="keys.key.edit" | ||
@model={{pkiKey.keyId}} | ||
@disabled={{not @canEdit}} | ||
data-test-key-menu-link="edit" | ||
> | ||
Edit | ||
</LinkTo> | ||
</li> | ||
</ul> | ||
</nav> | ||
</PopupMenu> | ||
</div> | ||
</div> | ||
</div> | ||
</LinkedBlock> | ||
{{/each}} | ||
{{else}} | ||
<EmptyState @title="No keys yet" @message="There are no keys in this PKI mount. You can generate or create one." /> | ||
{{/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
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,9 @@ | ||
export const SELECTORS = { | ||
importKey: '[data-test-pki-key-import]', | ||
generateKey: '[data-test-pki-key-generate]', | ||
keyId: '[data-test-key-id]', | ||
keyName: '[data-test-key-name]', | ||
popupMenuTrigger: '[data-test-popup-menu-trigger]', | ||
popupMenuDetails: '[data-test-key-menu-link="details"]', | ||
popupMenuEdit: '[data-test-key-menu-link="edit"]', | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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.