-
Notifications
You must be signed in to change notification settings - Fork 115
feat(iam): add 'service-accounts' listing page #22179
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
base: master
Are you sure you want to change the base?
Conversation
| "iam_identities_service_accounts": "Compte de service", | ||
| "iam_identities_sso": "SSO", | ||
| "iam_service_accounts_breadcrumb_service_accounts": "Compte de service", |
There was a problem hiding this comment.
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.
| "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', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| label={t('iam_service_accounts_breadcrumb_service_accounts', { | |
| label={t('iam_identities_service_accounts', { |
| export const useIamServiceAccountList = ({ | ||
| columns, | ||
| pageSize, | ||
| }: { | ||
| columns: DatagridColumn<IamServiceAccount>[]; | ||
| pageSize: number; | ||
| }) => { | ||
| const route = '/me/api/oauth2/client'; | ||
| return useResourcesIcebergV6<IamServiceAccount>({ | ||
| route, | ||
| queryKey: getIamServiceAccountListQueryKey(), | ||
| columns, | ||
| pageSize, | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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, | |
| }); |
| // TODO: load policy count | ||
| console.log('account: ', account); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no unit test?
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| getRowId={(token) => token.name} | |
| getRowId={({name}) => name} |
| import { IamServiceAccount } from '@/data/api/iam-service-accounts'; | ||
| import { Actions } from './Actions.component'; | ||
| import { ServiceAccountsPolicyCount } from '../components/ServiceAccountsPolicyCount.component'; |
There was a problem hiding this comment.
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 [ |
There was a problem hiding this comment.
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>
4d06084 to
65b9327
Compare
ref: #MAIAM-81
Description
Ticket Reference: #...
Additional Information