Skip to content

Conversation

@MarcMonchablon
Copy link

ref: #MAIAM-81

Description

Ticket Reference: #...

Additional Information

Comment on lines +5 to +7
"iam_identities_service_accounts": "Compte de service",
"iam_identities_sso": "SSO",
"iam_service_accounts_breadcrumb_service_accounts": "Compte de service",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use only one translation to manage the breadcrumb? Moreover, you don't use specific key for other breadcrumb elements.

Suggested change
"iam_identities_service_accounts": "Compte de service",
"iam_identities_sso": "SSO",
"iam_service_accounts_breadcrumb_service_accounts": "Compte de service",
"iam_identities_service_accounts": "Compte de service",
"iam_identities_sso": "SSO",

href={identitiesHref}
/>
<OdsBreadcrumbItem
label={t('iam_service_accounts_breadcrumb_service_accounts', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
label={t('iam_service_accounts_breadcrumb_service_accounts', {
label={t('iam_identities_service_accounts', {

Comment on lines +9 to +22
export const useIamServiceAccountList = ({
columns,
pageSize,
}: {
columns: DatagridColumn<IamServiceAccount>[];
pageSize: number;
}) => {
const route = '/me/api/oauth2/client';
return useResourcesIcebergV6<IamServiceAccount>({
route,
queryKey: getIamServiceAccountListQueryKey(),
columns,
pageSize,
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export const useIamServiceAccountList = ({
columns,
pageSize,
}: {
columns: DatagridColumn<IamServiceAccount>[];
pageSize: number;
}) => {
const route = '/me/api/oauth2/client';
return useResourcesIcebergV6<IamServiceAccount>({
route,
queryKey: getIamServiceAccountListQueryKey(),
columns,
pageSize,
});
const authRoute = '/me/api/oauth2/client';
export const useIamServiceAccountList = ({
columns,
pageSize,
}: {
columns: DatagridColumn<IamServiceAccount>[];
pageSize: number;
}) => {
return useResourcesIcebergV6<IamServiceAccount>({
route: authRoute,
queryKey: getIamServiceAccountListQueryKey(),
columns,
pageSize,
});

Comment on lines 11 to 12
// TODO: load policy count
console.log('account: ', account);
Copy link
Contributor

@darsene darsene Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not doable yet?
Shell plugin provides a logger if needed. Better than using console.log

import { OdsTabs, OdsTab } from '@ovhcloud/ods-components/react';

export function ServiceAccountsTabs() {
// TODO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is to be done?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no unit test?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no unit test?

manualSorting={false}
search={search}
contentAlignLeft
getRowId={(token) => token.name}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
getRowId={(token) => token.name}
getRowId={({name}) => name}

Comment on lines +10 to +12
import { IamServiceAccount } from '@/data/api/iam-service-accounts';
import { Actions } from './Actions.component';
import { ServiceAccountsPolicyCount } from '../components/ServiceAccountsPolicyCount.component';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use same import syntax

const { t } = useTranslation('permanent-tokens');
const formatDate = useFormatDate();

return [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to be memoized?

ref: #MAIAM-81

Signed-off-by: Marc Monchablon <marc.monchablon.ext@corp.ovh.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants