From 6971c3dca260c1a06d7d1a1093cb2e73e6c9fc96 Mon Sep 17 00:00:00 2001 From: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com> Date: Wed, 8 Mar 2023 15:50:23 -0500 Subject: [PATCH] [SM-401] Adding the ability to edit service account name (#4845) * Adding the ability to edit service account name * Update bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.html Co-authored-by: Oscar Hinton * Suggested Updates * removing unecessary messages * Adding back messages.json entry, updating API Call * fix * Update bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-account.service.ts Co-authored-by: Oscar Hinton * Update bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/models/requests/service-account-update.request.ts Co-authored-by: Oscar Hinton * Update bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.ts Co-authored-by: Oscar Hinton * Fixing endpoints after Server side change * changes * updates * adding loading notification * adding description to message * Update bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.html Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> * Thomas's suggested changes * reorder list --------- Co-authored-by: Oscar Hinton Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> --- apps/web/src/locales/en/messages.json | 8 +++ .../overview/overview.component.ts | 1 + .../service-account-dialog.component.html | 15 ++++-- .../service-account-dialog.component.ts | 51 ++++++++++++++++--- .../service-account.service.ts | 35 +++++++++++++ .../service-accounts-list.component.html | 4 ++ .../service-accounts-list.component.ts | 1 + .../service-accounts.component.html | 1 + .../service-accounts.component.ts | 12 +++++ .../shared/new-menu.component.ts | 1 + 10 files changed, 118 insertions(+), 11 deletions(-) diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 14077394f6..3910581d45 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -5876,6 +5876,10 @@ "message": "Search service accounts", "description": "Placeholder text for searching service accounts." }, + "editServiceAccount":{ + "message":"Edit service account", + "description" : "Title for editing a service account." + }, "addProject": { "message": "Add project", "description": "Title for creating a new project." @@ -5933,6 +5937,10 @@ "message": "Service account created", "description": "Notifies that a new service account has been created" }, + "serviceAccountUpdated": { + "message": "Service account updated", + "description": "Notifies that a service account has been updated" + }, "newSaSelectAccess": { "message": "Type or select projects or secrets", "description": "Instructions for selecting projects or secrets for a new service account" diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.ts index a9e354202b..8df58782c9 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.ts @@ -225,6 +225,7 @@ export class OverviewComponent implements OnInit, OnDestroy { this.dialogService.open(ServiceAccountDialogComponent, { data: { organizationId: this.organizationId, + operation: OperationType.Add, }, }); } diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.html index efc8a55f2e..473f901d55 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.html @@ -1,11 +1,16 @@
- {{ "newServiceAccount" | i18n }} + {{ title | i18n }}
- - {{ "serviceAccountName" | i18n }} - - +
+ +
+
+ + {{ "serviceAccountName" | i18n }} + + +