diff --git a/frontend/public/locales/en-GB/routes.json b/frontend/public/locales/en-GB/routes.json index c88baa096a..ede3f467cf 100644 --- a/frontend/public/locales/en-GB/routes.json +++ b/frontend/public/locales/en-GB/routes.json @@ -3,7 +3,7 @@ "alert_channels": "Alert Channels", "organization_settings": "Organization Settings", "ingestion_settings": "Ingestion Settings", - "api_keys": "API Keys", + "api_keys": "Access Tokens", "my_settings": "My Settings", "overview_metrics": "Overview Metrics", "dbcall_metrics": "Database Calls", diff --git a/frontend/public/locales/en-GB/titles.json b/frontend/public/locales/en-GB/titles.json index d8ed6ff0ef..0eb98e9960 100644 --- a/frontend/public/locales/en-GB/titles.json +++ b/frontend/public/locales/en-GB/titles.json @@ -26,7 +26,7 @@ "MY_SETTINGS": "SigNoz | My Settings", "ORG_SETTINGS": "SigNoz | Organization Settings", "INGESTION_SETTINGS": "SigNoz | Ingestion Settings", - "API_KEYS": "SigNoz | API Keys", + "API_KEYS": "SigNoz | Access Tokens", "SOMETHING_WENT_WRONG": "SigNoz | Something Went Wrong", "UN_AUTHORIZED": "SigNoz | Unauthorized", "NOT_FOUND": "SigNoz | Page Not Found", diff --git a/frontend/public/locales/en/apiKeys.json b/frontend/public/locales/en/apiKeys.json index 5cc51fa92e..fb86610c9a 100644 --- a/frontend/public/locales/en/apiKeys.json +++ b/frontend/public/locales/en/apiKeys.json @@ -1,3 +1,3 @@ { - "delete_confirm_message": "Are you sure you want to delete {{keyName}} key? Deleting a key is irreversible and cannot be undone." + "delete_confirm_message": "Are you sure you want to delete {{keyName}} token? Deleting a token is irreversible and cannot be undone." } diff --git a/frontend/public/locales/en/routes.json b/frontend/public/locales/en/routes.json index c88baa096a..ede3f467cf 100644 --- a/frontend/public/locales/en/routes.json +++ b/frontend/public/locales/en/routes.json @@ -3,7 +3,7 @@ "alert_channels": "Alert Channels", "organization_settings": "Organization Settings", "ingestion_settings": "Ingestion Settings", - "api_keys": "API Keys", + "api_keys": "Access Tokens", "my_settings": "My Settings", "overview_metrics": "Overview Metrics", "dbcall_metrics": "Database Calls", diff --git a/frontend/public/locales/en/titles.json b/frontend/public/locales/en/titles.json index cebb3151d9..85da13a12a 100644 --- a/frontend/public/locales/en/titles.json +++ b/frontend/public/locales/en/titles.json @@ -26,7 +26,7 @@ "MY_SETTINGS": "SigNoz | My Settings", "ORG_SETTINGS": "SigNoz | Organization Settings", "INGESTION_SETTINGS": "SigNoz | Ingestion Settings", - "API_KEYS": "SigNoz | API Keys", + "API_KEYS": "SigNoz | Access Tokens", "SOMETHING_WENT_WRONG": "SigNoz | Something Went Wrong", "UN_AUTHORIZED": "SigNoz | Unauthorized", "NOT_FOUND": "SigNoz | Page Not Found", diff --git a/frontend/src/AppRoutes/routes.ts b/frontend/src/AppRoutes/routes.ts index 9fb4fd9c70..c0332448e7 100644 --- a/frontend/src/AppRoutes/routes.ts +++ b/frontend/src/AppRoutes/routes.ts @@ -358,6 +358,7 @@ export const oldRoutes = [ '/logs/old-logs-explorer', '/logs-explorer', '/logs-explorer/live', + '/settings/api-keys', ]; export const oldNewRoutesMapping: Record = { @@ -365,6 +366,7 @@ export const oldNewRoutesMapping: Record = { '/logs/old-logs-explorer': '/logs/old-logs-explorer', '/logs-explorer': '/logs/logs-explorer', '/logs-explorer/live': '/logs/logs-explorer/live', + '/settings/api-keys': '/settings/access-tokens', }; export interface AppRoutes { diff --git a/frontend/src/constants/routes.ts b/frontend/src/constants/routes.ts index 0715ebf787..2f7c650912 100644 --- a/frontend/src/constants/routes.ts +++ b/frontend/src/constants/routes.ts @@ -24,7 +24,7 @@ const ROUTES = { MY_SETTINGS: '/my-settings', SETTINGS: '/settings', ORG_SETTINGS: '/settings/org-settings', - API_KEYS: '/settings/api-keys', + API_KEYS: '/settings/access-tokens', INGESTION_SETTINGS: '/settings/ingestion-settings', SOMETHING_WENT_WRONG: '/something-went-wrong', UN_AUTHORIZED: '/un-authorized', diff --git a/frontend/src/container/APIKeys/APIKeys.test.tsx b/frontend/src/container/APIKeys/APIKeys.test.tsx index cfc2239236..960c276ebc 100644 --- a/frontend/src/container/APIKeys/APIKeys.test.tsx +++ b/frontend/src/container/APIKeys/APIKeys.test.tsx @@ -26,13 +26,13 @@ describe('APIKeys component', () => { }); it('renders APIKeys component without crashing', () => { - expect(screen.getByText('API Keys')).toBeInTheDocument(); + expect(screen.getByText('Access Tokens')).toBeInTheDocument(); expect( - screen.getByText('Create and manage access keys for the SigNoz API'), + screen.getByText('Create and manage access tokens for the SigNoz API'), ).toBeInTheDocument(); }); - it('render list of API Keys', async () => { + it('render list of Access Tokens', async () => { server.use( rest.get(apiKeysURL, (req, res, ctx) => res(ctx.status(200), ctx.json(getAPIKeysResponse)), @@ -41,15 +41,15 @@ describe('APIKeys component', () => { await waitFor(() => { expect(screen.getByText('No Expiry Token')).toBeInTheDocument(); - expect(screen.getByText('1-5 of 18 API Keys')).toBeInTheDocument(); + expect(screen.getByText('1-5 of 18 tokens')).toBeInTheDocument(); }); }); it('opens add new key modal on button click', async () => { - fireEvent.click(screen.getByText('New Key')); + fireEvent.click(screen.getByText('New Token')); await waitFor(() => { const createNewKeyBtn = screen.getByRole('button', { - name: /Create new key/i, + name: /Create new token/i, }); expect(createNewKeyBtn).toBeInTheDocument(); @@ -57,10 +57,10 @@ describe('APIKeys component', () => { }); it('closes add new key modal on cancel button click', async () => { - fireEvent.click(screen.getByText('New Key')); + fireEvent.click(screen.getByText('New Token')); const createNewKeyBtn = screen.getByRole('button', { - name: /Create new key/i, + name: /Create new token/i, }); await waitFor(() => { @@ -79,10 +79,10 @@ describe('APIKeys component', () => { ), ); - fireEvent.click(screen.getByText('New Key')); + fireEvent.click(screen.getByText('New Token')); const createNewKeyBtn = screen.getByRole('button', { - name: /Create new key/i, + name: /Create new token/i, }); await waitFor(() => { @@ -90,7 +90,7 @@ describe('APIKeys component', () => { }); act(() => { - const inputElement = screen.getByPlaceholderText('Enter Key Name'); + const inputElement = screen.getByPlaceholderText('Enter Token Name'); fireEvent.change(inputElement, { target: { value: 'Top Secret' } }); fireEvent.click(screen.getByTestId('create-form-admin-role-btn')); fireEvent.click(createNewKeyBtn); diff --git a/frontend/src/container/APIKeys/APIKeys.tsx b/frontend/src/container/APIKeys/APIKeys.tsx index c24bad7009..933012a00d 100644 --- a/frontend/src/container/APIKeys/APIKeys.tsx +++ b/frontend/src/container/APIKeys/APIKeys.tsx @@ -514,15 +514,15 @@ function APIKeys(): JSX.Element {
- API Keys + Access Tokens - Create and manage access keys for the SigNoz API + Create and manage access tokens for the SigNoz API
} value={searchValue} onChange={handleSearch} @@ -533,7 +533,7 @@ function APIKeys(): JSX.Element { type="primary" onClick={showAddModal} > - New Key + New Token
@@ -546,7 +546,7 @@ function APIKeys(): JSX.Element { pageSize: 5, hideOnSinglePage: true, showTotal: (total: number, range: number[]): string => - `${range[0]}-${range[1]} of ${total} API Keys`, + `${range[0]}-${range[1]} of ${total} tokens`, }} />
@@ -554,7 +554,7 @@ function APIKeys(): JSX.Element { {/* Delete Key Modal */} Delete key} + title={Delete Token} open={isDeleteModalOpen} closable afterClose={handleModalClose} @@ -576,7 +576,7 @@ function APIKeys(): JSX.Element { onClick={onDeleteHandler} className="delete-btn" > - Delete key + Delete Token , ]} > @@ -590,7 +590,7 @@ function APIKeys(): JSX.Element { {/* Edit Key Modal */} } onClick={onUpdateApiKey} > - Update key + Update Token , ]} > @@ -634,7 +634,7 @@ function APIKeys(): JSX.Element { label="Name" rules={[{ required: true }, { type: 'string', min: 6 }]} > - + @@ -668,7 +668,7 @@ function APIKeys(): JSX.Element { {/* Create New Key Modal */} } > - Copy key and close + Copy token and close , ] : [ @@ -706,7 +706,7 @@ function APIKeys(): JSX.Element { loading={isLoadingCreateAPIKey} onClick={onCreateAPIKey} > - Create new key + Create new token , ] } @@ -730,7 +730,7 @@ function APIKeys(): JSX.Element { rules={[{ required: true }, { type: 'string', min: 6 }]} validateTrigger="onFinish" > - + @@ -771,7 +771,7 @@ function APIKeys(): JSX.Element { {showNewAPIKeyDetails && (
- Key + Token