From 6b3091ea1b14b2719dfcc1457979eb009ca7f066 Mon Sep 17 00:00:00 2001 From: Dharini Jeeva Date: Mon, 20 Jun 2022 09:45:50 -0700 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20update=20to=20credentia?= =?UTF-8?q?l=20source=20(#1146)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/addon/models/session.js | 8 +++---- addons/api/mirage/scenarios/ipc.js | 24 +++++++++---------- addons/core/translations/resources/en-us.yaml | 4 ++-- .../scopes/scope/projects/targets.hbs | 20 ++++++++-------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/addons/api/addon/models/session.js b/addons/api/addon/models/session.js index b71a7bb13..9a474cd88 100644 --- a/addons/api/addon/models/session.js +++ b/addons/api/addon/models/session.js @@ -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; } diff --git a/addons/api/mirage/scenarios/ipc.js b/addons/api/mirage/scenarios/ipc.js index dd39c931e..afd68016c 100644 --- a/addons/api/mirage/scenarios/ipc.js +++ b/addons/api/mirage/scenarios/ipc.js @@ -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', }, diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 17979a4b2..c984eb194 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -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 diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs index 3d785230a..68a08f950 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs @@ -41,15 +41,15 @@ <:header> {{t 'form.id.label'}} <:value> - {{credential.library.id}} + {{credential.source.id}} <:key>{{t 'form.type.label'}} - <:value>{{credential.library.type}} + <:value>{{credential.source.type}} - {{#if credential.library.name}} + {{#if credential.source.name}} <:key>{{t 'form.name.label'}} - <:value>{{credential.library.name}} + <:value>{{credential.source.name}} {{/if}} - {{#if credential.library.description}} + {{#if credential.source.description}} <:key>{{t 'form.description.label'}} - <:value>{{credential.library.description}} + <:value>{{credential.source.description}} {{/if}}