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

service account ui minor updates and fixes #1447

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/organization/service-account/list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class OrganizationServiceAccountListComponent extends Component<O
valuePath: 'name',
},
{
name: this.intl.t('accountID'),
name: this.intl.t('accessKeyID'),
valuePath: 'accessKeyId',
width: 150,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,36 @@
data-test-serviceAccountSection-accessToken-accountIdLabel
@variant='subtitle1'
>
{{t 'accountID'}}
{{t 'accessKeyID'}}
</AkTypography>

{{#if this.regenerateKey.isRunning}}
<AkSkeleton @width='160px' />
{{else}}
<AkTypography
data-test-serviceAccountSection-accessToken-accountIdValue
>
{{@serviceAccount.accessKeyId}}
</AkTypography>
<AkStack @width='full' @alignItems='center' @spacing='1'>
<AkTypography
data-test-serviceAccountSection-accessToken-accountIdValue
>
{{@serviceAccount.accessKeyId}}
</AkTypography>

{{#if this.secretAccessKeyVisible}}
<AkClipboard
@onSuccess={{this.handleCopySuccess}}
@onError={{this.handleCopyError}}
as |ac|
>
<AkIconButton
data-test-serviceAccountSection-accessToken-accountIdCopyBtn
data-clipboard-text={{@serviceAccount.accessKeyId}}
id={{ac.triggerId}}
@size='small'
>
<AkIcon @iconName='content-copy' @color='primary' />
</AkIconButton>
</AkClipboard>
{{/if}}
</AkStack>
{{/if}}
</AkStack>

Expand All @@ -138,7 +157,7 @@
@variant='subtitle1'
data-test-serviceAccountSection-accessToken-secretKeyLabel
>
{{t 'serviceAccountModule.secretAccountKey'}}
{{t 'serviceAccountModule.secretAccessKey'}}
</AkTypography>

{{#if this.regenerateKey.isRunning}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export default class OrganizationServiceAccountSectionAccessTokenComponent exten

get secretAccessKeyHelperText() {
return this.secretAccessKeyVisible
? this.intl.t('serviceAccountModule.unmaskedSecretAccountKeyHelperText')
: this.intl.t('serviceAccountModule.maskedSecretAccountKeyHelperText');
? this.intl.t('serviceAccountModule.unmaskedSecretAccessKeyHelperText')
: this.intl.t('serviceAccountModule.maskedSecretAccessKeyHelperText');
}

setCreateServiceAccountExpiry() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ module('Acceptance | Create service account', function (hooks) {
.dom(
'[data-test-serviceAccountSection-accessToken-secretKeyHelperText]'
)
.hasText(t('serviceAccountModule.unmaskedSecretAccountKeyHelperText'));
.hasText(t('serviceAccountModule.unmaskedSecretAccessKeyHelperText'));

assert
.dom('[data-test-serviceAccountSection-accessToken-secretKeyCopyBtn]')
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/organization/service-account-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ module('Acceptance | Organization Service Account List', function (hooks) {
assert.strictEqual(headerCells.length, 5);

assert.dom(headerCells[0]).hasText(t('accountName'));
assert.dom(headerCells[1]).hasText(t('accountID'));
assert.dom(headerCells[1]).hasText(t('accessKeyID'));
assert.dom(headerCells[2]).hasText(t('expiryOn'));
assert.dom(headerCells[3]).hasText(t('createdBy'));
assert.dom(headerCells[4]).hasText(t('action'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ module(

assert
.dom('[data-test-serviceAccountSection-accessToken-accountIdLabel]')
.hasText('t:accountID:()');
.hasText('t:accessKeyID:()');

assert
.dom('[data-test-serviceAccountSection-accessToken-accountIdValue]')
.hasText(this.serviceAccount.accessKeyId);

assert
.dom('[data-test-serviceAccountSection-accessToken-secretKeyLabel]')
.hasText('t:serviceAccountModule.secretAccountKey:()');
.hasText('t:serviceAccountModule.secretAccessKey:()');

assert
.dom('[data-test-serviceAccountSection-accessToken-secretKeyMasked]')
Expand All @@ -165,7 +165,7 @@ module(
.dom(
'[data-test-serviceAccountSection-accessToken-secretKeyHelperText]'
)
.hasText('t:serviceAccountModule.maskedSecretAccountKeyHelperText:()');
.hasText('t:serviceAccountModule.maskedSecretAccessKeyHelperText:()');

assert
.dom('[data-test-serviceAccountSection-accessToken-expiryLabel]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ module(

assert
.dom('[data-test-serviceAccountSection-accessToken-accountIdLabel]')
.hasText('t:accountID:()');
.hasText('t:accessKeyID:()');

assert
.dom('[data-test-serviceAccountSection-accessToken-accountIdValue]')
.hasText(this.serviceAccount.accessKeyId);

assert
.dom('[data-test-serviceAccountSection-accessToken-secretKeyLabel]')
.hasText('t:serviceAccountModule.secretAccountKey:()');
.hasText('t:serviceAccountModule.secretAccessKey:()');

assert
.dom('[data-test-serviceAccountSection-accessToken-secretKeyMasked]')
Expand All @@ -92,9 +92,7 @@ module(
.dom(
'[data-test-serviceAccountSection-accessToken-secretKeyHelperText]'
)
.hasText(
't:serviceAccountModule.maskedSecretAccountKeyHelperText:()'
);
.hasText('t:serviceAccountModule.maskedSecretAccessKeyHelperText:()');

assert
.dom('[data-test-serviceAccountSection-accessToken-expiryLabel]')
Expand Down Expand Up @@ -285,7 +283,7 @@ module(
'[data-test-serviceAccountSection-accessToken-secretKeyHelperText]'
)
.hasText(
't:serviceAccountModule.unmaskedSecretAccountKeyHelperText:()'
't:serviceAccountModule.unmaskedSecretAccessKeyHelperText:()'
);

assert
Expand Down
8 changes: 4 additions & 4 deletions translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"accessRequested": "Removal for the restriction has been requested, please wait for our team to revert",
"accessToken": "Access Token",
"account": "Account",
"accountID": "Account ID",
"accessKeyID": "Access Key ID",
"accountName": "Account Name",
"accountOverview": "Account Overview",
"accountSettings": "Account Settings",
Expand Down Expand Up @@ -1368,9 +1368,9 @@
"refreshAccessToken": "Refresh Access Token",
"accessTokenEditDescription": "You can regenerate the secret key here. Ensure you copy the token immediately as it will not be visible when you access this page again.",
"accessTokenCreateDescription": "Access Token will be visible in this section once you Save this page. Ensure you copy the token immediately as it will not be visible when you access this page again.",
"secretAccountKey": "Secret Account Key",
"unmaskedSecretAccountKeyHelperText": "Please copy the Secret Account Key immediately. This will not be available later.",
"maskedSecretAccountKeyHelperText": "Can't view the secret account key again but you can regenerate again for a new secret account key.",
"secretAccessKey": "Secret Access Key",
"unmaskedSecretAccessKeyHelperText": "Please copy the Secret Access Key immediately. This will not be available later.",
"maskedSecretAccessKeyHelperText": "Can't view the secret access key again but you can regenerate again for a new secret access key.",
"doesNotExpire": "Does not expire",
"doesNotExpireHelperText": "* This token will not expire",
"expiryHelperText": "* This token will expire on {date}",
Expand Down
8 changes: 4 additions & 4 deletions translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"accessRequested": "Removal for the restriction has been requested, please wait for our team to revert",
"accessToken": "Access Token",
"account": "アカウント",
"accountID": "Account ID",
"accessKeyID": "Access Key ID",
"accountName": "Account Name",
"accountOverview": "アカウントの概要",
"accountSettings": "アカウント設定",
Expand Down Expand Up @@ -1368,9 +1368,9 @@
"refreshAccessToken": "Refresh Access Token",
"accessTokenEditDescription": "You can regenerate the secret key here. Ensure you copy the token immediately as it will not be visible when you access this page again.",
"accessTokenCreateDescription": "Access Token will be visible in this section once you Save this page. Ensure you copy the token immediately as it will not be visible when you access this page again.",
"secretAccountKey": "Secret Account Key",
"unmaskedSecretAccountKeyHelperText": "Please copy the Secret Account Key immediately. This will not be available later.",
"maskedSecretAccountKeyHelperText": "Can't view the secret account key again but you can regenerate again for a new secret account key.",
"secretAccessKey": "Secret Access Key",
"unmaskedSecretAccessKeyHelperText": "Please copy the Secret Access Key immediately. This will not be available later.",
"maskedSecretAccessKeyHelperText": "Can't view the secret access key again but you can regenerate again for a new secret access key.",
"doesNotExpire": "Does not expire",
"doesNotExpireHelperText": "* This token will not expire",
"expiryHelperText": "* This token will expire on {date}",
Expand Down
Loading