chore: 🤖 update to credential source (#1146)

This commit is contained in:
Dharini Jeeva authored and GitHub committed 2022-06-20 09:45:50 -07:00
1 parent 26baf8a80b
commit 6b3091ea1b
4 files changed
+28 -28

No files matched your search

+4 -4
View File
@@ -13,7 +13,7 @@ class SessionCredential {
/**
*
*/
static Library = class Library {
static Source = class Source {
id;
name;
description;
@@ -42,7 +42,7 @@ class SessionCredential {
// =attributes
rawCredential;
library;
source;
#payloadSecret;
/**
@@ -72,8 +72,8 @@ class SessionCredential {
// =methods
constructor(cred) {
const { id, name, description, type } = cred.credential_library;
this.library = new SessionCredential.Library(id, name, description, type);
const { id, name, description, type } = cred.credential_source;
this.source = new SessionCredential.Source(id, name, description, type);
this.#payloadSecret = cred.secret;
this.rawCredential = cred;
}
+12 -12
View File
@@ -66,10 +66,10 @@ export default function initializeMockIPC(server, config) {
session_id: newSession.id,
credentials: [
{
credential_library: {
credential_source: {
id: 'clvlt_4cvscMTl0N',
name: 'Library Name',
description: 'Library Description',
name: 'Source Name',
description: 'Source Description',
credential_store_id: 'csvlt_Q1HFGt7Jpm',
type: 'vault',
},
@@ -78,10 +78,10 @@ export default function initializeMockIPC(server, config) {
},
},
{
credential_library: {
credential_source: {
id: 'clvlt_4cvscMTl0N',
name: 'Library Name',
description: 'Library Description',
name: 'Source Name',
description: 'Source Description',
credential_store_id: 'csvlt_Q1HFGt7Jpm',
type: 'vault',
},
@@ -91,10 +91,10 @@ export default function initializeMockIPC(server, config) {
},
},
{
credential_library: {
credential_source: {
id: 'clvlt_9KWscxpcY7',
name: 'Library Name',
description: 'Library Description',
name: 'Source Name',
description: 'Source Description',
credential_store_id: 'csvlt_Q1HFGt7Jpm',
type: 'vault',
},
@@ -103,10 +103,10 @@ export default function initializeMockIPC(server, config) {
},
},
{
credential_library: {
credential_source: {
id: 'clvlt_9KWscxpcY7',
name: 'Library Name',
description: 'Library Description',
name: 'Source Name',
description: 'Source Description',
credential_store_id: 'csvlt_Q1HFGt7Jpm',
type: 'vault',
},
@@ -172,8 +172,8 @@ session:
title_plural: Credentials
secret:
label: Secret
credential_library:
title: Credential Library
credential_source:
title: Credential Source
actions:
raw-api:
show: View raw API output
@@ -41,15 +41,15 @@
<Card
@heading='{{t 'resources.session.credential.title'}}
{{if
credential.library.name
(concat ' (' credential.library.name ')')
credential.source.name
(concat ' (' credential.source.name ')')
}}'
@icon='flight-icons/svg/key-16'
>
<:header>
<Rose::Dropdown
@text={{t
'resources.session.credential.credential_library.title'
'resources.session.credential.credential_source.title'
}}
@style='condensed'
@dropdownRight={{true}}
@@ -60,28 +60,28 @@
<:key>{{t 'form.id.label'}}</:key>
<:value>
<Copyable
@text={{credential.library.id}}
@text={{credential.source.id}}
@buttonText={{t 'actions.copy-to-clipboard'}}
@acknowledgeText={{t 'states.copied'}}
>
<code>{{credential.library.id}}</code>
<code>{{credential.source.id}}</code>
</Copyable>
</:value>
</dropdown.key-value>
<dropdown.key-value>
<:key>{{t 'form.type.label'}}</:key>
<:value>{{credential.library.type}}</:value>
<:value>{{credential.source.type}}</:value>
</dropdown.key-value>
{{#if credential.library.name}}
{{#if credential.source.name}}
<dropdown.key-value>
<:key>{{t 'form.name.label'}}</:key>
<:value>{{credential.library.name}}</:value>
<:value>{{credential.source.name}}</:value>
</dropdown.key-value>
{{/if}}
{{#if credential.library.description}}
{{#if credential.source.description}}
<dropdown.key-value>
<:key>{{t 'form.description.label'}}</:key>
<:value>{{credential.library.description}}</:value>
<:value>{{credential.source.description}}</:value>
</dropdown.key-value>
{{/if}}
</Rose::Dropdown>