Skip to content
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

SM-1159: Rename Service Accounts to Machine Accounts #8444

Merged
merged 14 commits into from Apr 5, 2024
Merged
Expand Up @@ -33,7 +33,7 @@
</bit-hint>
</bit-form-field>
<bit-form-field class="tw-w-2/3">
<bit-label>{{ "additionalServiceAccounts" | i18n }}</bit-label>
<bit-label>{{ "additionalMachineAccounts" | i18n }}</bit-label>
<input
bitInput
id="additionalServiceAccountCount"
Expand All @@ -44,8 +44,8 @@
/>
<bit-hint>
<div>
cyprain-okeke marked this conversation as resolved.
Show resolved Hide resolved
{{ "includedServiceAccounts" | i18n: options.baseServiceAccountCount }}
{{ "addAdditionalServiceAccounts" | i18n: (monthlyServiceAccountPrice | currency: "$") }}
{{ "includedMachineAccounts" | i18n: options.baseServiceAccountCount }}
{{ "addAdditionalMachineAccounts" | i18n: (monthlyServiceAccountPrice | currency: "$") }}
</div>
<div>
<strong>{{ "total" | i18n }}:</strong>
Expand All @@ -56,15 +56,15 @@
</bit-hint>
</bit-form-field>
<bit-form-control>
<bit-label>{{ "limitServiceAccounts" | i18n }}</bit-label>
<bit-label>{{ "limitMachineAccounts" | i18n }}</bit-label>
<input
type="checkbox"
bitCheckbox
id="limitServiceAccounts"
formControlName="limitServiceAccounts"
/>
<bit-hint>
{{ "limitServiceAccountsDesc" | i18n }}
{{ "limitMachineAccountsDesc" | i18n }}
</bit-hint>
</bit-form-control>
<bit-form-field class="tw-w-2/3" *ngIf="formGroup.value.limitServiceAccounts">
Expand All @@ -79,7 +79,7 @@
/>
<bit-hint>
<div>
{{ "includedServiceAccounts" | i18n: options.baseServiceAccountCount }}
{{ "includedMachineAccounts" | i18n: options.baseServiceAccountCount }}
</div>
<strong>{{ "maxServiceAccountCost" | i18n }}:</strong>
{{ maxAdditionalServiceAccounts }} &times;
Expand Down
10 changes: 5 additions & 5 deletions apps/web/src/app/billing/shared/sm-subscribe.component.html
Expand Up @@ -20,10 +20,10 @@ <h4 bitTypography="h4">{{ "secretsManagerForPlan" | i18n: planName }}</h4>
<ng-template #unlimitedProjects>
<li>{{ "unlimitedProjects" | i18n }}</li>
</ng-template>
<li>{{ "serviceAccountsIncluded" | i18n: serviceAccountsIncluded }}</li>
<li>{{ "machineAccountsIncluded" | i18n: machineAccountsIncluded }}</li>
<li *ngIf="product != productTypes.Free">
{{
"additionalServiceAccountCost" | i18n: (monthlyCostPerServiceAccount | currency: "$")
"additionalMachineAccountCost" | i18n: (monthlyCostPerServiceAccount | currency: "$")
cturnbull-bitwarden marked this conversation as resolved.
Show resolved Hide resolved
}}
</li>
</ul>
Expand Down Expand Up @@ -54,12 +54,12 @@ <h4 bitTypography="h4">{{ "secretsManagerForPlan" | i18n: planName }}</h4>
</div>
<div *ngIf="selectedPlan.SecretsManager.hasAdditionalServiceAccountOption" class="tw-w-1/2">
<bit-form-field>
<bit-label>{{ "additionalServiceAccounts" | i18n }}</bit-label>
<bit-label>{{ "additionalMachineAccounts" | i18n }}</bit-label>
<input bitInput formControlName="additionalServiceAccounts" type="number" />
<bit-hint>
{{ "includedServiceAccounts" | i18n: serviceAccountsIncluded }}
{{ "includedMachineAccounts" | i18n: machineAccountsIncluded }}
{{
"addAdditionalServiceAccounts" | i18n: (monthlyCostPerServiceAccount | currency: "$")
"addAdditionalMachineAccounts" | i18n: (monthlyCostPerServiceAccount | currency: "$")
}}
</bit-hint>
</bit-form-field>
Expand Down
92 changes: 92 additions & 0 deletions apps/web/src/locales/en/messages.json
Expand Up @@ -7605,5 +7605,97 @@
},
"restrictedCollectionAccess": {
"message": "You cannot add yourself to collections."
},
"machineAccountsCannotCreate": {
"message": "Machine accounts cannot be created in suspended organizations. Please contact your organization owner for assistance."
},
"machineAccounts": {
"message": "Machine accounts",
"description": "The title for the section that deals with machine accounts."
},
"machineAccountsNoItemsMessage": {
"message": "Create a new machine account to get started automating secret access.",
"description": "Message to encourage the user to start creating machine accounts."
},
"machineAccountsNoItemsTitle": {
"message": "Nothing to show yet",
"description": "Title to indicate that there are no machine accounts to display."
},
"deleteMachineAccounts": {
"message": "Delete machine accounts",
"description": "Title for the action to delete one or multiple machine accounts."
},
"deleteMachineAccountsDialogMessage": {
"message": "Deleting machine accounts is permanent and irreversible."
},
"deleteMachineAccountsConfirmMessage": {
"message": "Delete $COUNT$ machine accounts",
"placeholders": {
"count": {
"content": "$1",
"example": "2"
}
}
},
"deleteMachineAccountsToast": {
"message": "Machine accounts deleted"
},
"searchMachineAccounts": {
"message": "Search machine accounts",
"description": "Placeholder text for searching machine accounts."
},
"projectMachineAccountsDescription": {
"message": "Grant machine accounts access to this project."
},
"projectMachineAccountsSelectHint": {
"message": "Type or select machine accounts"
},
"projectEmptyMachineAccountAccessPolicies": {
"message": "Add machine accounts to grant access"
},
"machineAccountsIncluded": {
"message": "$COUNT$ machine accounts included",
"placeholders": {
"count": {
"content": "$1",
"example": "3"
}
}
},
"additionalMachineAccountCost": {
"message": "$COST$ per month for additional machine accounts",
"placeholders": {
"cost": {
"content": "$1",
"example": "$0.50"
}
}
},
"additionalMachineAccounts": {
"message": "Additional machine accounts"
},
"includedMachineAccounts": {
"message": "Your plan comes with $COUNT$ machine accounts.",
"placeholders": {
"count": {
"content": "$1",
"example": "50"
}
}
},
"addAdditionalMachineAccounts": {
"message": "You can add additional machine accounts for $COST$ per month.",
"placeholders": {
"cost": {
"content": "$1",
"example": "$0.50"
}
}
},
"limitMachineAccounts": {
"message": "Limit machine accounts (optional)"
},
"limitMachineAccountsDesc": {
"message": "Set a limit for your machine accounts. Once this limit is reached, you will not be able to create new machine accounts."
}
}
Expand Up @@ -18,7 +18,7 @@
></bit-nav-item>
<bit-nav-item
icon="bwi-wrench"
[text]="'serviceAccounts' | i18n"
[text]="'machineAccounts' | i18n"
route="service-accounts"
[relativeTo]="route.parent"
></bit-nav-item>
Expand Down
@@ -1,14 +1,14 @@
<div class="tw-w-2/5">
<p class="tw-mt-8">
{{ "projectServiceAccountsDescription" | i18n }}
{{ "projectMachineAccountsDescription" | i18n }}
</p>
<sm-access-selector
[rows]="rows$ | async"
granteeType="serviceAccounts"
[label]="'serviceAccounts' | i18n"
[hint]="'projectServiceAccountsSelectHint' | i18n"
[columnTitle]="'serviceAccounts' | i18n"
[emptyMessage]="'projectEmptyServiceAccountAccessPolicies' | i18n"
[label]="'machineAccounts' | i18n"
[hint]="'projectMachineAccountsSelectHint' | i18n"
[columnTitle]="'machineAccounts' | i18n"
[emptyMessage]="'projectEmptyMachineAccountAccessPolicies' | i18n"
(onCreateAccessPolicies)="handleCreateAccessPolicies($event)"
(onDeleteAccessPolicy)="handleDeleteAccessPolicy($event)"
(onUpdateAccessPolicy)="handleUpdateAccessPolicy($event)"
Expand Down
Expand Up @@ -6,7 +6,7 @@
<bit-tab-link [route]="['secrets']">{{ "secrets" | i18n }}</bit-tab-link>
<ng-container *ngIf="project.write">
<bit-tab-link [route]="['people']">{{ "people" | i18n }}</bit-tab-link>
<bit-tab-link [route]="['service-accounts']">{{ "serviceAccounts" | i18n }}</bit-tab-link>
<bit-tab-link [route]="['service-accounts']">{{ "machineAccounts" | i18n }}</bit-tab-link>
</ng-container>
</bit-tab-nav-bar>
<sm-new-menu></sm-new-menu>
Expand Down
Expand Up @@ -8,7 +8,7 @@
</ng-container>
<ng-container *ngIf="data.serviceAccounts.length > 1">
{{ data.serviceAccounts.length }}
{{ "serviceAccounts" | i18n }}
{{ "machineAccounts" | i18n }}
</ng-container>
</span>
</ng-container>
Expand Down
Expand Up @@ -44,13 +44,13 @@ export class ServiceAccountDeleteDialogComponent {
get title() {
return this.data.serviceAccounts.length === 1
? this.i18nService.t("deleteServiceAccount")
: this.i18nService.t("deleteServiceAccounts");
: this.i18nService.t("deleteMachineAccounts");
}

get dialogContent() {
return this.data.serviceAccounts.length === 1
? this.i18nService.t("deleteServiceAccountDialogMessage", this.data.serviceAccounts[0].name)
: this.i18nService.t("deleteServiceAccountsDialogMessage");
: this.i18nService.t("deleteMachineAccountsDialogMessage");
}

get dialogConfirmationLabel() {
Expand Down Expand Up @@ -80,15 +80,15 @@ export class ServiceAccountDeleteDialogComponent {
const message =
this.data.serviceAccounts.length === 1
? "deleteServiceAccountToast"
: "deleteServiceAccountsToast";
: "deleteMachineAccountsToast";
this.platformUtilsService.showToast("success", null, this.i18nService.t(message));
}

openBulkStatusDialog(bulkStatusResults: BulkOperationStatus[]) {
this.dialogService.open<unknown, BulkStatusDetails>(BulkStatusDialogComponent, {
data: {
title: "deleteServiceAccounts",
subTitle: "serviceAccounts",
title: "deleteMachineAccounts",
subTitle: "machineAccounts",
columnTitle: "serviceAccountName",
message: "bulkDeleteProjectsErrorMessage",
details: bulkStatusResults,
Expand All @@ -100,7 +100,7 @@ export class ServiceAccountDeleteDialogComponent {
return this.data.serviceAccounts?.length === 1
? this.i18nService.t("deleteProjectConfirmMessage", this.data.serviceAccounts[0].name)
: this.i18nService.t(
"deleteServiceAccountsConfirmMessage",
"deleteMachineAccountsConfirmMessage",
this.data.serviceAccounts?.length.toString(),
);
}
Expand Down
Expand Up @@ -69,7 +69,7 @@ export class ServiceAccountDialogComponent {
this.platformUtilsService.showToast(
"error",
null,
this.i18nService.t("serviceAccountsCannotCreate"),
this.i18nService.t("machineAccountsCannotCreate"),
);
return;
}
Expand Down
Expand Up @@ -5,7 +5,7 @@
>
<bit-breadcrumbs slot="breadcrumbs">
<bit-breadcrumb [route]="['..']" icon="bwi-angle-left">{{
"serviceAccounts" | i18n
"machineAccounts" | i18n
}}</bit-breadcrumb>
</bit-breadcrumbs>
<sm-new-menu></sm-new-menu>
Expand Down
Expand Up @@ -3,8 +3,8 @@
</div>

<bit-no-items *ngIf="serviceAccounts?.length == 0">
<ng-container slot="title">{{ "serviceAccountsNoItemsTitle" | i18n }}</ng-container>
<ng-container slot="description">{{ "serviceAccountsNoItemsMessage" | i18n }}</ng-container>
<ng-container slot="title">{{ "machineAccountsNoItemsTitle" | i18n }}</ng-container>
<ng-container slot="description">{{ "machineAccountsNoItemsMessage" | i18n }}</ng-container>
<button
slot="button"
type="button"
Expand Down Expand Up @@ -101,7 +101,7 @@
<button type="button" bitMenuItem (click)="bulkDeleteServiceAccounts()">
<i class="bwi bwi-fw bwi-trash tw-text-danger" aria-hidden="true"></i>
<span class="tw-text-danger">
{{ "deleteServiceAccounts" | i18n }}
{{ "deleteMachineAccounts" | i18n }}
</span>
</button>
</bit-menu>
@@ -1,6 +1,6 @@
<app-header>
<bit-search
[placeholder]="'searchServiceAccounts' | i18n"
[placeholder]="'searchMachineAccounts' | i18n"
[(ngModel)]="search"
class="tw-w-80"
></bit-search>
Expand Down