Skip to content
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 static/app/components/sidebar/sidebarDropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default function SidebarDropdown({orientation, collapsed, hideOrgLinks}:
{t('User settings')}
</SidebarMenuItem>
<SidebarMenuItem to="/settings/account/api/">
{t('User auth tokens')}
{t('Personal Tokens')}
</SidebarMenuItem>
{hasOrganization && (
<Hook
Expand Down
2 changes: 1 addition & 1 deletion static/app/gettingStartedDocs/java/java.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const onboarding: OnboardingConfig<PlatformOptions> = {
configurations: [
{
description: tct(
'To see source context in Sentry, you have to generate an auth token by visiting the [link:Organization Auth Tokens] settings. You can then set the token as an environment variable that is used by the build plugins.',
'To see source context in Sentry, you have to generate an auth token by visiting the [link:Organization Tokens] settings. You can then set the token as an environment variable that is used by the build plugins.',
{
link: <Link to="/settings/auth-tokens/" />,
}
Expand Down
2 changes: 1 addition & 1 deletion static/app/gettingStartedDocs/java/log4j2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ const onboarding: OnboardingConfig<PlatformOptions> = {
configurations: [
{
description: tct(
'To see source context in Sentry, you have to generate an auth token by visiting the [link:Organization Auth Tokens] settings. You can then set the token as an environment variable that is used by the build plugins.',
'To see source context in Sentry, you have to generate an auth token by visiting the [link:Organization Tokens] settings. You can then set the token as an environment variable that is used by the build plugins.',
{
link: <Link to="/settings/auth-tokens/" />,
}
Expand Down
2 changes: 1 addition & 1 deletion static/app/gettingStartedDocs/java/logback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ const onboarding: OnboardingConfig<PlatformOptions> = {
configurations: [
{
description: tct(
'To see source context in Sentry, you have to generate an auth token by visiting the [link:Organization Auth Tokens] settings. You can then set the token as an environment variable that is used by the build plugins.',
'To see source context in Sentry, you have to generate an auth token by visiting the [link:Organization Tokens] settings. You can then set the token as an environment variable that is used by the build plugins.',
{
link: <Link to="/settings/auth-tokens/" />,
}
Expand Down
2 changes: 1 addition & 1 deletion static/app/gettingStartedDocs/java/spring-boot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const onboarding: OnboardingConfig<PlatformOptions> = {
configurations: [
{
description: tct(
'To see source context in Sentry, you have to generate an auth token by visiting the [link:Organization Auth Tokens] settings. You can then set the token as an environment variable that is used by the build plugins.',
'To see source context in Sentry, you have to generate an auth token by visiting the [link:Organization Tokens] settings. You can then set the token as an environment variable that is used by the build plugins.',
{
link: <Link to="/settings/auth-tokens/" />,
}
Expand Down
2 changes: 1 addition & 1 deletion static/app/gettingStartedDocs/java/spring.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const onboarding: OnboardingConfig<PlatformOptions> = {
description: (
<p>
{tct(
'To see source context in Sentry, you have to generate an auth token by visiting the [link:Organization Auth Tokens] settings. You can then set the token as an environment variable that is used by the build plugins.',
'To see source context in Sentry, you have to generate an auth token by visiting the [link:Organization Tokens] settings. You can then set the token as an environment variable that is used by the build plugins.',
{
link: <Link to="/settings/auth-tokens/" />,
}
Expand Down
2 changes: 1 addition & 1 deletion static/app/gettingStartedDocs/kotlin/kotlin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const onboarding: OnboardingConfig<PlatformOptions> = {
configurations: [
{
description: tct(
'To see source context in Sentry, you have to generate an auth token by visiting the [link:Organization Auth Tokens] settings. You can then set the token as an environment variable that is used by the build plugins.',
'To see source context in Sentry, you have to generate an auth token by visiting the [link:Organization Tokens] settings. You can then set the token as an environment variable that is used by the build plugins.',
{
link: <Link to="/settings/auth-tokens/" />,
}
Expand Down
12 changes: 6 additions & 6 deletions static/app/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -415,18 +415,18 @@ function buildRoutes() {
/>
<Route path="api/" name={t('API')}>
<IndexRedirect to="auth-tokens/" />
<Route path="auth-tokens/" name={t('User Auth Tokens')}>
<Route path="auth-tokens/" name={t('Personal Tokens')}>
<IndexRoute
component={make(() => import('sentry/views/settings/account/apiTokens'))}
/>
<Route
path="new-token/"
name={t('Create New Token')}
name={t('Create Personal Token')}
component={make(() => import('sentry/views/settings/account/apiNewToken'))}
/>
<Route
path=":tokenId/"
name={t('Edit User Auth Token')}
name={t('Edit Personal Token')}
component={make(
() => import('sentry/views/settings/account/apiTokenDetails')
)}
Expand Down Expand Up @@ -983,20 +983,20 @@ function buildRoutes() {
)}
/>
</Route>
<Route path="auth-tokens/" name={t('Auth Tokens')}>
<Route path="auth-tokens/" name={t('Organization Tokens')}>
<IndexRoute
component={make(() => import('sentry/views/settings/organizationAuthTokens'))}
/>
<Route
path="new-token/"
name={t('Create New Auth Token')}
name={t('Create New Organization Token')}
component={make(
() => import('sentry/views/settings/organizationAuthTokens/newAuthToken')
)}
/>
<Route
path=":tokenId/"
name={t('Edit Auth Token')}
name={t('Edit Organization Token')}
component={make(
() => import('sentry/views/settings/organizationAuthTokens/authTokenDetails')
)}
Expand Down
8 changes: 1 addition & 7 deletions static/app/types/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type SelectorItems from 'sentry/components/timeRangeSelector/selectorItem
import type {TitleableModuleNames} from 'sentry/views/insights/common/components/modulePageProviders';
import type {OrganizationStatsProps} from 'sentry/views/organizationStats';
import type {RouteAnalyticsContext} from 'sentry/views/routeAnalyticsContextProvider';
import type {NavigationItem, NavigationSection} from 'sentry/views/settings/types';
import type {NavigationSection} from 'sentry/views/settings/types';

import type {Integration, IntegrationProvider} from './integrations';
import type {
Expand Down Expand Up @@ -284,7 +284,6 @@ type OnboardingHooks = {
* Settings navigation hooks.
*/
type SettingsHooks = {
'settings:api-navigation-config': SettingsItemsHook;
Copy link
Member Author

Choose a reason for hiding this comment

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

The hook was unused and this nav section is now gone, so I removed it.

'settings:organization-navigation': OrganizationSettingsHook;
'settings:organization-navigation-config': SettingsConfigHook;
};
Expand Down Expand Up @@ -455,11 +454,6 @@ type OrganizationSettingsHook = (organization: Organization) => React.ReactEleme
*/
type SettingsConfigHook = (organization: Organization) => NavigationSection;

/**
* Provides additional setting navigation items
*/
type SettingsItemsHook = (organization?: Organization) => NavigationItem[];

/**
* Each sidebar label is wrapped with this hook, to allow sidebar item
* augmentation.
Expand Down
6 changes: 3 additions & 3 deletions static/app/views/settings/account/apiNewToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ export default function ApiNewToken() {
);

return (
<SentryDocumentTitle title={t('Create User Auth Token')}>
<SentryDocumentTitle title={t('Create New Personal Token')}>
<div>
<SettingsPageHeader title={t('Create New User Auth Token')} />
<SettingsPageHeader title={t('Create New Personal Token')} />
<TextBlock>
{t(
"Authentication tokens allow you to perform actions against the Sentry API on behalf of your account. They're the easiest way to get started using the API."
"Personal tokens allow you to perform actions against the Sentry API on behalf of your account. They're the easiest way to get started using the API."
)}
</TextBlock>
<TextBlock>
Expand Down
8 changes: 4 additions & 4 deletions static/app/views/settings/account/apiTokenDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ function ApiTokenDetails({params}: Props) {

return (
<div>
<SentryDocumentTitle title={t('Edit User Auth Token')} />
<SettingsPageHeader title={t('Edit User Auth Token')} />
<SentryDocumentTitle title={t('Edit Personal Token')} />
<SettingsPageHeader title={t('Edit Personal Token')} />

<TextBlock>
{t(
Expand All @@ -133,12 +133,12 @@ function ApiTokenDetails({params}: Props) {
)}
</TextBlock>
<Panel>
<PanelHeader>{t('User Auth Token Details')}</PanelHeader>
<PanelHeader>{t('Personal Token Details')}</PanelHeader>

<PanelBody>
{isError && (
<LoadingError
message={t('Failed to load user auth token.')}
message={t('Failed to load personal token.')}
onRetry={refetchToken}
/>
)}
Expand Down
4 changes: 2 additions & 2 deletions static/app/views/settings/account/apiTokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import ApiTokenRow from 'sentry/views/settings/account/apiTokenRow';
import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader';
import TextBlock from 'sentry/views/settings/components/text/textBlock';

const PAGE_TITLE = t('User Auth Tokens');
const PAGE_TITLE = t('Personal Tokens');
const API_TOKEN_QUERY_KEY = ['/api-tokens/'] as const;

function ApiTokens() {
Expand Down Expand Up @@ -111,7 +111,7 @@ function ApiTokens() {
<SettingsPageHeader title={PAGE_TITLE} action={action} />
<TextBlock>
{t(
"Authentication tokens allow you to perform actions against the Sentry API on behalf of your account. They're the easiest way to get started using the API."
"Personal tokens allow you to perform actions against the Sentry API on behalf of your account. They're the easiest way to get started using the API."
)}
</TextBlock>
<TextBlock>
Expand Down
10 changes: 3 additions & 7 deletions static/app/views/settings/account/navigationConfiguration.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {t} from 'sentry/locale';
import HookStore from 'sentry/stores/hookStore';
import type {Organization} from 'sentry/types/organization';
import {prefersStackedNav} from 'sentry/views/nav/prefersStackedNav';
import {getUserOrgNavigationConfiguration} from 'sentry/views/settings/organization/userOrgNavigationConfiguration';
Expand All @@ -13,7 +12,7 @@ type ConfigParams = {

function getConfiguration({organization}: ConfigParams): NavigationSection[] {
if (organization && prefersStackedNav(organization)) {
return getUserOrgNavigationConfiguration({organization});
return getUserOrgNavigationConfiguration();
}

return [
Expand Down Expand Up @@ -84,14 +83,11 @@ function getConfiguration({organization}: ConfigParams): NavigationSection[] {
},
{
path: `${pathPrefix}/api/auth-tokens/`,
title: t('User Auth Tokens'),
title: t('Personal Tokens'),
description: t(
"Authentication tokens allow you to perform actions against the Sentry API on behalf of your account. They're the easiest way to get started using the API."
"Personal tokens allow you to perform actions against the Sentry API on behalf of your account. They're the easiest way to get started using the API."
),
},
...HookStore.get('settings:api-navigation-config').flatMap(cb =>
cb(organization)
),
],
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function getOrganizationNavigationConfiguration({
organization: incomingOrganization,
}: ConfigParams): NavigationSection[] {
if (incomingOrganization && prefersStackedNav(incomingOrganization)) {
return getUserOrgNavigationConfiguration({organization: incomingOrganization});
return getUserOrgNavigationConfiguration();
}

return [
Expand Down Expand Up @@ -162,8 +162,8 @@ export function getOrganizationNavigationConfiguration({
items: [
{
path: `${organizationSettingsPathPrefix}/auth-tokens/`,
title: t('Auth Tokens'),
description: t('Manage organization auth tokens'),
title: t('Organization Tokens'),
description: t('Manage organization tokens'),
id: 'auth-tokens',
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import {FeatureBadge} from 'sentry/components/core/badge/featureBadge';
import {t} from 'sentry/locale';
import HookStore from 'sentry/stores/hookStore';
import type {Organization} from 'sentry/types/organization';
import {hasDynamicSamplingCustomFeature} from 'sentry/utils/dynamicSampling/features';
import type {NavigationSection} from 'sentry/views/settings/types';

const organizationSettingsPathPrefix = '/settings/:orgId';
const userSettingsPathPrefix = '/settings/account';

export function getUserOrgNavigationConfiguration({
organization: incomingOrganization,
}: {
organization: Organization;
}): NavigationSection[] {
export function getUserOrgNavigationConfiguration(): NavigationSection[] {
return [
{
id: 'settings-account',
Expand Down Expand Up @@ -191,37 +185,28 @@ export function getUserOrgNavigationConfiguration({
items: [
{
path: `${organizationSettingsPathPrefix}/auth-tokens/`,
title: t('Auth Tokens'),
description: t('Manage organization auth tokens'),
title: t('Organization Tokens'),
description: t('Manage organization tokens'),
id: 'auth-tokens',
},
{
path: `${userSettingsPathPrefix}/api/auth-tokens/`,
title: t('Personal Tokens'),
description: t(
"Personal tokens allow you to perform actions against the Sentry API on behalf of your account. They're the easiest way to get started using the API."
),
},
{
path: `${organizationSettingsPathPrefix}/developer-settings/`,
title: t('Custom Integrations'),
description: t('Manage custom integrations'),
id: 'developer-settings',
},
],
},
{
id: 'settings-api',
name: t('API'),
items: [
{
path: `${userSettingsPathPrefix}/api/applications/`,
title: t('Applications'),
description: t('Add and configure OAuth2 applications'),
},
{
path: `${userSettingsPathPrefix}/api/auth-tokens/`,
title: t('User Auth Tokens'),
description: t(
"Authentication tokens allow you to perform actions against the Sentry API on behalf of your account. They're the easiest way to get started using the API."
),
},
...HookStore.get('settings:api-navigation-config').flatMap(cb =>
cb(incomingOrganization)
),
],
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function OrganizationApiKeysList({
<AlertLink.Container>
<AlertLink to="/settings/account/api/auth-tokens/" type="info">
{tct(
'Until Sentry supports OAuth, you might want to switch to using [tokens:User Auth Tokens] instead.',
'Until Sentry supports OAuth, you might want to switch to using [tokens:Personal Tokens] instead.',
{
tokens: <u />,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ function OrganizationAuthTokensDetails({params, organization}: Props) {

return (
<div>
<SentryDocumentTitle title={t('Edit Auth Token')} />
<SettingsPageHeader title={t('Edit Auth Token')} />
<SentryDocumentTitle title={t('Edit Organization Token')} />
<SettingsPageHeader title={t('Edit Organization Token')} />

<TextBlock>
{t(
Expand All @@ -216,12 +216,12 @@ function OrganizationAuthTokensDetails({params, organization}: Props) {
)}
</TextBlock>
<Panel>
<PanelHeader>{t('Auth Token Details')}</PanelHeader>
<PanelHeader>{t('Organization Token Details')}</PanelHeader>

<PanelBody>
{isError && (
<LoadingError
message={t('Failed to load auth token.')}
message={t('Failed to load organization token.')}
onRetry={refetchToken}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ describe('OrganizationAuthTokensIndex', function () {
render(<OrganizationAuthTokensIndex {...defaultProps} />);

expect(await screen.findByTestId('loading-error')).toHaveTextContent(
'Failed to load auth tokens for the organization.'
'Failed to load organization tokens.'
);
expect(screen.queryByTestId('loading-indicator')).not.toBeInTheDocument();
expect(screen.queryByTestId('empty-state')).not.toBeInTheDocument();
Expand Down
13 changes: 8 additions & 5 deletions static/app/views/settings/organizationAuthTokens/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,15 @@ export function OrganizationAuthTokensIndex({
<Access access={['org:write']}>
{({hasAccess}) => (
<Fragment>
<SentryDocumentTitle title={t('Auth Tokens')} orgSlug={organization.slug} />
<SettingsPageHeader title={t('Auth Tokens')} action={createNewToken} />
<SentryDocumentTitle
title={t('Organization Tokens')}
orgSlug={organization.slug}
/>
<SettingsPageHeader title={t('Organization Tokens')} action={createNewToken} />

<TextBlock>
{t(
'Organization Auth Tokens can be used in many places to interact with Sentry programatically. For example, they can be used for sentry-cli, bundler plugins or similar uses cases.'
'Organization Tokens can be used in many places to interact with Sentry programatically. For example, they can be used for sentry-cli, bundler plugins or similar uses cases.'
)}
</TextBlock>
<TextBlock>
Expand All @@ -183,13 +186,13 @@ export function OrganizationAuthTokensIndex({
loader={
isError ? (
<LoadingError
message={t('Failed to load auth tokens for the organization.')}
message={t('Failed to load organization tokens.')}
onRetry={refetchTokenList}
/>
) : undefined
}
emptyMessage={t("You haven't created any authentication tokens yet.")}
headers={[t('Auth token'), t('Created'), t('Last access'), '']}
headers={[t('Token'), t('Created'), t('Last access'), '']}
>
{!isError && !isPending && !!tokenList?.length && (
<TokenList
Expand Down
Loading
Loading