Skip to content

Commit 70c361f

Browse files
authored
ref(insights): Declare module base URLs as constants (#70861)
More preparation for moving all insights to the `/insights/` URL namespace. Now that every module is wrapped in `ModulePageProviders` I can set the correct `baseURL` for each one. `BASE_URL` is the _base URL of the whole module_ rather than of the page. It's also not the _full_ base URL, only the module itself, relevant to whatever comes before it (usually "/performance"), which is why they don't have starting slashes (except for AI). Most importantly, almost nothing in the app actually _uses_ `baseURL` to construct URLs, so this PR has almost no impact. The only affected links: - resource table - queries table - cache samples table
1 parent 73d4ff9 commit 70c361f

31 files changed

+86
-27
lines changed

static/app/views/aiMonitoring/aiMonitoringDetailsPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
TotalTokensUsedChart,
2222
} from 'sentry/views/aiMonitoring/aiMonitoringCharts';
2323
import {PipelineSpansTable} from 'sentry/views/aiMonitoring/pipelineSpansTable';
24+
import {BASE_URL} from 'sentry/views/aiMonitoring/settings';
2425
import {MetricReadout} from 'sentry/views/performance/metricReadout';
2526
import * as ModuleLayout from 'sentry/views/performance/moduleLayout';
2627
import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
@@ -178,7 +179,7 @@ function PageWithProviders({params}: Props) {
178179
return (
179180
<ModulePageProviders
180181
title={[spanDescription ?? t('(no name)'), t('Pipeline Details')].join(' — ')}
181-
baseURL="/ai-monitoring/"
182+
baseURL={BASE_URL}
182183
features="ai-analytics"
183184
>
184185
<AiMonitoringPage params={params} />

static/app/views/aiMonitoring/landing.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
} from 'sentry/views/aiMonitoring/aiMonitoringCharts';
1818
import {AIMonitoringOnboarding} from 'sentry/views/aiMonitoring/onboarding';
1919
import {PipelinesTable} from 'sentry/views/aiMonitoring/PipelinesTable';
20+
import {BASE_URL} from 'sentry/views/aiMonitoring/settings';
2021
import {useOnboardingProject} from 'sentry/views/performance/browser/webVitals/utils/useOnboardingProject';
2122
import * as ModuleLayout from 'sentry/views/performance/moduleLayout';
2223
import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
@@ -92,7 +93,7 @@ function PageWithProviders() {
9293
return (
9394
<ModulePageProviders
9495
title={t('AI Monitoring')}
95-
baseURL="/ai-monitoring/"
96+
baseURL={BASE_URL}
9697
features="ai-analytics"
9798
>
9899
<AiMonitoringPage />
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import {t} from 'sentry/locale';
2+
3+
export const MODULE_TITLE = t('AI Monitoring');
4+
export const BASE_URL = '/ai-monitoring';

static/app/views/performance/browser/resources/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import ResourceView, {
1919
DEFAULT_RESOURCE_TYPES,
2020
FilterOptionsContainer,
2121
} from 'sentry/views/performance/browser/resources/resourceView';
22+
import {BASE_URL} from 'sentry/views/performance/browser/resources/settings';
2223
import {
2324
BrowserStarfishFields,
2425
useResourceModuleFilters,
@@ -91,7 +92,7 @@ function PageWithProviders() {
9192
return (
9293
<ModulePageProviders
9394
title={[t('Performance'), t('Resources')].join(' — ')}
94-
baseURL="/performance/browser/resources"
95+
baseURL={`/performance/${BASE_URL}`}
9596
features="spans-first-ui"
9697
>
9798
<ResourcesLandingPage />

static/app/views/performance/browser/resources/resourceSummaryPage/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import ResourceSummaryCharts from 'sentry/views/performance/browser/resources/re
2121
import ResourceSummaryTable from 'sentry/views/performance/browser/resources/resourceSummaryPage/resourceSummaryTable';
2222
import SampleImages from 'sentry/views/performance/browser/resources/resourceSummaryPage/sampleImages';
2323
import {FilterOptionsContainer} from 'sentry/views/performance/browser/resources/resourceView';
24+
import {BASE_URL} from 'sentry/views/performance/browser/resources/settings';
2425
import {IMAGE_FILE_EXTENSIONS} from 'sentry/views/performance/browser/resources/shared/constants';
2526
import RenderBlockingSelector from 'sentry/views/performance/browser/resources/shared/renderBlockingSelector';
2627
import {ResourceSpanOps} from 'sentry/views/performance/browser/resources/shared/types';
@@ -160,7 +161,7 @@ function PageWithProviders() {
160161
return (
161162
<ModulePageProviders
162163
title={[t('Performance'), t('Resources'), t('Resource Summary')].join(' — ')}
163-
baseURL="/performance/browser/resources"
164+
baseURL={`/performance/${BASE_URL}`}
164165
features="spans-first-ui"
165166
>
166167
<ResourceSummary />
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import {t} from 'sentry/locale';
2+
3+
export const MODULE_TITLE = t('Resources');
4+
export const BASE_URL = 'browser/resources';

static/app/views/performance/browser/webVitals/pageOverview.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import {
3737
import WebVitalMeters from 'sentry/views/performance/browser/webVitals/components/webVitalMeters';
3838
import {PageOverviewWebVitalsDetailPanel} from 'sentry/views/performance/browser/webVitals/pageOverviewWebVitalsDetailPanel';
3939
import {PageSamplePerformanceTable} from 'sentry/views/performance/browser/webVitals/pageSamplePerformanceTable';
40+
import {BASE_URL} from 'sentry/views/performance/browser/webVitals/settings';
4041
import {useProjectRawWebVitalsQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/rawWebVitalsQueries/useProjectRawWebVitalsQuery';
4142
import {calculatePerformanceScoreFromStoredTableDataRow} from 'sentry/views/performance/browser/webVitals/utils/queries/storedScoreQueries/calculatePerformanceScoreFromStored';
4243
import {useProjectWebVitalsScoresQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/storedScoreQueries/useProjectWebVitalsScoresQuery';
@@ -307,7 +308,7 @@ function PageWithProviders() {
307308
return (
308309
<ModulePageProviders
309310
title={[t('Performance'), t('Web Vitals')].join(' — ')}
310-
baseURL="/performance/browser/pageloads"
311+
baseURL={`/performance/${BASE_URL}`}
311312
features="spans-first-ui"
312313
>
313314
<PageOverview />
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
import {t} from 'sentry/locale';
2+
3+
export const MODULE_TITLE = t('Web Vitals');
4+
export const BASE_URL = 'browser/pageloads';
5+
16
export const USE_STORED_SCORES = false;
27
export const REPLACE_FID_WITH_INP = false;

static/app/views/performance/browser/webVitals/webVitalsLandingPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {FID_DEPRECATION_DATE} from 'sentry/views/performance/browser/webVitals/c
2727
import WebVitalMeters from 'sentry/views/performance/browser/webVitals/components/webVitalMeters';
2828
import {PagePerformanceTable} from 'sentry/views/performance/browser/webVitals/pagePerformanceTable';
2929
import {PerformanceScoreChart} from 'sentry/views/performance/browser/webVitals/performanceScoreChart';
30+
import {BASE_URL} from 'sentry/views/performance/browser/webVitals/settings';
3031
import {useProjectRawWebVitalsQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/rawWebVitalsQueries/useProjectRawWebVitalsQuery';
3132
import {calculatePerformanceScoreFromStoredTableDataRow} from 'sentry/views/performance/browser/webVitals/utils/queries/storedScoreQueries/calculatePerformanceScoreFromStored';
3233
import {useProjectWebVitalsScoresQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/storedScoreQueries/useProjectWebVitalsScoresQuery';
@@ -182,7 +183,7 @@ function PageWithProviders() {
182183
return (
183184
<ModulePageProviders
184185
title={[t('Performance'), t('Web Vitals')].join(' — ')}
185-
baseURL="/performance/browser/pageloads"
186+
baseURL={`/performance/${BASE_URL}`}
186187
features="spans-first-ui"
187188
>
188189
<WebVitalsLandingPage />

static/app/views/performance/cache/cacheLandingPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {Referrer} from 'sentry/views/performance/cache/referrers';
2323
import {CacheSamplePanel} from 'sentry/views/performance/cache/samplePanel/samplePanel';
2424
import {
2525
BASE_FILTERS,
26-
CACHE_BASE_URL,
26+
BASE_URL,
2727
MODULE_TITLE,
2828
RELEASE_LEVEL,
2929
} from 'sentry/views/performance/cache/settings';
@@ -206,7 +206,7 @@ function PageWithProviders() {
206206
return (
207207
<ModulePageProviders
208208
title={[t('Performance'), MODULE_TITLE].join(' — ')}
209-
baseURL={CACHE_BASE_URL}
209+
baseURL={`/performance/${BASE_URL}`}
210210
features="performance-cache-view"
211211
>
212212
<CacheLandingPage />

static/app/views/performance/cache/settings.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import type {BadgeType} from 'sentry/components/badge/featureBadge';
22
import {t} from 'sentry/locale';
33
import type {SpanMetricsQueryFilters} from 'sentry/views/starfish/types';
44

5+
export const MODULE_TITLE = t('Cache');
6+
export const BASE_URL = 'cache';
7+
58
export const RELEASE_LEVEL: BadgeType = 'alpha';
69

710
// NOTE: Awkward typing, but without it `RELEASE_LEVEL` is narrowed and the comparison is not allowed
@@ -11,11 +14,9 @@ export const releaseLevelAsBadgeProps = {
1114
isNew: (RELEASE_LEVEL as BadgeType) === 'new',
1215
};
1316

14-
export const MODULE_TITLE = t('Cache');
15-
1617
export const CHART_HEIGHT = 160;
1718

18-
export const CACHE_BASE_URL = '/performance/cache';
19+
export const CACHE_BASE_URL = `/performance/${BASE_URL}`;
1920

2021
export const BASE_FILTERS: SpanMetricsQueryFilters = {
2122
'span.op': 'cache.get_item', // TODO - add more span ops as they become available, we can't use span.module because db.redis is also `cache`

static/app/views/performance/database/databaseLandingPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {useOnboardingProject} from 'sentry/views/performance/browser/webVitals/u
2323
import {DurationChart} from 'sentry/views/performance/database/durationChart';
2424
import {NoDataMessage} from 'sentry/views/performance/database/noDataMessage';
2525
import {isAValidSort, QueriesTable} from 'sentry/views/performance/database/queriesTable';
26+
import {BASE_URL} from 'sentry/views/performance/database/settings';
2627
import {ThroughputChart} from 'sentry/views/performance/database/throughputChart';
2728
import {useSelectedDurationAggregate} from 'sentry/views/performance/database/useSelectedDurationAggregate';
2829
import * as ModuleLayout from 'sentry/views/performance/moduleLayout';
@@ -269,7 +270,7 @@ function PageWithProviders() {
269270
return (
270271
<ModulePageProviders
271272
title={[t('Performance'), t('Database')].join(' — ')}
272-
baseURL="/performance/database"
273+
baseURL={`/performance/${BASE_URL}`}
273274
features="spans-first-ui"
274275
>
275276
<DatabaseLandingPage />

static/app/views/performance/database/databaseSpanSummaryPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {normalizeUrl} from 'sentry/utils/withDomainRequired';
2020
import {DurationChart} from 'sentry/views/performance/database/durationChart';
2121
import {isAValidSort} from 'sentry/views/performance/database/queriesTable';
2222
import {QueryTransactionsTable} from 'sentry/views/performance/database/queryTransactionsTable';
23+
import {BASE_URL} from 'sentry/views/performance/database/settings';
2324
import {ThroughputChart} from 'sentry/views/performance/database/throughputChart';
2425
import {useSelectedDurationAggregate} from 'sentry/views/performance/database/useSelectedDurationAggregate';
2526
import {MetricReadout} from 'sentry/views/performance/metricReadout';
@@ -314,7 +315,7 @@ function PageWithProviders(props) {
314315
return (
315316
<ModulePageProviders
316317
title={[t('Performance'), t('Database'), t('Query Summary')].join(' — ')}
317-
baseURL="/performance/database"
318+
baseURL={`/performance/${BASE_URL}`}
318319
features="spans-first-ui"
319320
>
320321
<DatabaseSpanSummaryPage {...props} />

static/app/views/performance/database/settings.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ import {
88
TWENTY_FOUR_HOURS,
99
TWO_WEEKS,
1010
} from 'sentry/components/charts/utils';
11+
import {t} from 'sentry/locale';
1112
import type {Aggregate} from 'sentry/views/starfish/types';
1213

14+
export const MODULE_TITLE = t('Queries');
15+
export const BASE_URL = 'database';
16+
1317
export const MIN_SDK_VERSION_BY_PLATFORM: {[platform: string]: string} = {
1418
'sentry.python': '1.29.2',
1519
'sentry.javascript': '7.63.0',

static/app/views/performance/http/httpDomainSummaryPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import {HTTPSamplesPanel} from 'sentry/views/performance/http/httpSamplesPanel';
3434
import {Referrer} from 'sentry/views/performance/http/referrers';
3535
import {
3636
BASE_FILTERS,
37+
BASE_URL,
3738
MODULE_TITLE,
3839
NULL_DOMAIN_DESCRIPTION,
3940
RELEASE_LEVEL,
@@ -357,7 +358,7 @@ const MetricsRibbon = styled('div')`
357358
function PageWithProviders() {
358359
return (
359360
<ModulePageProviders
360-
baseURL="/performance/http"
361+
baseURL={`/performance/${BASE_URL}`}
361362
title={[t('Performance'), MODULE_TITLE, t('Domain Summary')].join(' — ')}
362363
features="spans-first-ui"
363364
>

static/app/views/performance/http/httpLandingPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {ThroughputChart} from 'sentry/views/performance/http/charts/throughputCh
2525
import {Referrer} from 'sentry/views/performance/http/referrers';
2626
import {
2727
BASE_FILTERS,
28+
BASE_URL,
2829
MODULE_TITLE,
2930
RELEASE_LEVEL,
3031
} from 'sentry/views/performance/http/settings';
@@ -254,7 +255,7 @@ function PageWithProviders() {
254255
return (
255256
<ModulePageProviders
256257
title={[t('Performance'), MODULE_TITLE].join(' — ')}
257-
baseURL="/performance/http"
258+
baseURL={`/performance/${BASE_URL}`}
258259
features="spans-first-ui"
259260
>
260261
<HTTPLandingPage />

static/app/views/performance/http/settings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {t} from 'sentry/locale';
33
import {ModuleName} from 'sentry/views/starfish/types';
44

55
export const MODULE_TITLE = t('Requests');
6+
export const BASE_URL = 'http';
67

78
export const NULL_DOMAIN_DESCRIPTION = t('Unknown Domain');
89

static/app/views/performance/landing/widgets/widgets/lineChartListWidget.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ import withApi from 'sentry/utils/withApi';
2727
import {normalizeUrl} from 'sentry/utils/withDomainRequired';
2828
import {DEFAULT_RESOURCE_TYPES} from 'sentry/views/performance/browser/resources/resourceView';
2929
import {getResourcesEventViewQuery} from 'sentry/views/performance/browser/resources/utils/useResourcesQuery';
30+
import {BASE_URL as RESOURCES_BASE_URL} from 'sentry/views/performance/browser/webVitals/settings';
3031
import {BASE_FILTERS, CACHE_BASE_URL} from 'sentry/views/performance/cache/settings';
3132
import DurationChart from 'sentry/views/performance/charts/chart';
33+
import {BASE_URL as DATABASE_BASE_URL} from 'sentry/views/performance/database/settings';
34+
import {BASE_URL as HTTP_BASE_URL} from 'sentry/views/performance/http/settings';
3235
import {DomainCell} from 'sentry/views/performance/http/tables/domainCell';
3336
import {transactionSummaryRouteWithQuery} from 'sentry/views/performance/transactionSummary/utils';
3437
import {
@@ -604,7 +607,9 @@ export function LineChartListWidget(props: PerformanceWidgetProps) {
604607
);
605608
case PerformanceWidgetSetting.MOST_TIME_CONSUMING_DOMAINS:
606609
return (
607-
<RoutingContextProvider value={{baseURL: '/performance/http'}}>
610+
<RoutingContextProvider
611+
value={{baseURL: `/performance/${HTTP_BASE_URL}`}}
612+
>
608613
<Fragment>
609614
<StyledTextOverflow>
610615
<DomainCell
@@ -650,8 +655,8 @@ export function LineChartListWidget(props: PerformanceWidgetProps) {
650655
const moduleName = isQueriesWidget ? ModuleName.DB : ModuleName.RESOURCE;
651656
const timeSpentOp = isQueriesWidget ? 'op' : undefined;
652657
const routingContextBaseURL = isQueriesWidget
653-
? '/performance/database'
654-
: '/performance/browser/resources';
658+
? `/performance/${DATABASE_BASE_URL}`
659+
: `/performance/${RESOURCES_BASE_URL}`;
655660
return (
656661
<RoutingContextProvider value={{baseURL: routingContextBaseURL}}>
657662
<Fragment>

static/app/views/performance/mobile/appStarts/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import AppStartup from 'sentry/views/performance/mobile/appStarts/screens';
22
import {StartTypeSelector} from 'sentry/views/performance/mobile/appStarts/screenSummary/startTypeSelector';
3+
import {BASE_URL} from 'sentry/views/performance/mobile/appStarts/settings';
34
import ScreensTemplate from 'sentry/views/performance/mobile/components/screensTemplate';
45
import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
56
import {ROUTE_NAMES} from 'sentry/views/starfish/utils/routeNames';
@@ -18,7 +19,7 @@ function PageWithProviders() {
1819
return (
1920
<ModulePageProviders
2021
title={ROUTE_NAMES['app-startup']}
21-
baseURL="/performance/mobile/app-startup"
22+
baseURL={`/performance/${BASE_URL}`}
2223
features="spans-first-ui"
2324
>
2425
<InitializationModule />

static/app/views/performance/mobile/appStarts/screenSummary/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
COLD_START_TYPE,
2525
StartTypeSelector,
2626
} from 'sentry/views/performance/mobile/appStarts/screenSummary/startTypeSelector';
27+
import {BASE_URL} from 'sentry/views/performance/mobile/appStarts/settings';
2728
import {MetricsRibbon} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/metricsRibbon';
2829
import {ScreenLoadSpanSamples} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/samples';
2930
import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
@@ -224,7 +225,7 @@ function PageWithProviders() {
224225
return (
225226
<ModulePageProviders
226227
title={[transaction, ROUTE_NAMES['app-startup']].join(' — ')}
227-
baseURL="/performance/mobile/app-startup/spans"
228+
baseURL={`/performance/${BASE_URL}`}
228229
features="spans-first-ui"
229230
>
230231
<ScreenSummary />
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import {t} from 'sentry/locale';
2+
3+
export const MODULE_TITLE = t('App Starts');
4+
export const BASE_URL = 'mobile/app-startup';

static/app/views/performance/mobile/screenload/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {useOnboardingProject} from 'sentry/views/performance/browser/webVitals/u
2121
import {ScreensView, YAxis} from 'sentry/views/performance/mobile/screenload/screens';
2222
import {PlatformSelector} from 'sentry/views/performance/mobile/screenload/screens/platformSelector';
2323
import {isCrossPlatform} from 'sentry/views/performance/mobile/screenload/screens/utils';
24+
import {BASE_URL} from 'sentry/views/performance/mobile/screenload/settings';
2425
import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
2526
import Onboarding from 'sentry/views/performance/onboarding';
2627
import {ReleaseComparisonSelector} from 'sentry/views/starfish/components/releaseSelector';
@@ -104,7 +105,7 @@ function PageWithProviders() {
104105
return (
105106
<ModulePageProviders
106107
title={t('Screen Loads')}
107-
baseURL="/performance/mobile/screens"
108+
baseURL={`/performance/${BASE_URL}`}
108109
features="spans-first-ui"
109110
>
110111
<PageloadModule />

static/app/views/performance/mobile/screenload/screenLoadSpans/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import {
3535
} from 'sentry/views/performance/mobile/screenload/screens/constants';
3636
import {PlatformSelector} from 'sentry/views/performance/mobile/screenload/screens/platformSelector';
3737
import {isCrossPlatform} from 'sentry/views/performance/mobile/screenload/screens/utils';
38+
import {BASE_URL} from 'sentry/views/performance/mobile/screenload/settings';
3839
import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
3940
import {
4041
PRIMARY_RELEASE_ALIAS,
@@ -240,7 +241,7 @@ function PageWithProviders() {
240241
return (
241242
<ModulePageProviders
242243
title={[transaction, t('Screen Loads')].join(' — ')}
243-
baseURL="/performance/mobile/screens"
244+
baseURL={`/performance/${BASE_URL}`}
244245
features="spans-first-ui"
245246
>
246247
<ScreenLoadSpans />
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import {t} from 'sentry/locale';
2+
3+
export const MODULE_TITLE = t('Screen Loads');
4+
export const BASE_URL = 'mobile/screens';

static/app/views/performance/mobile/ui/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import ScreensTemplate from 'sentry/views/performance/mobile/components/screensTemplate';
22
import {UIScreens} from 'sentry/views/performance/mobile/ui/screens';
3+
import {BASE_URL} from 'sentry/views/performance/mobile/ui/settings';
34
import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
45
import {ROUTE_NAMES} from 'sentry/views/starfish/utils/routeNames';
56

@@ -11,7 +12,7 @@ function PageWithProviders() {
1112
return (
1213
<ModulePageProviders
1314
title={ROUTE_NAMES.mobileUI}
14-
baseURL="/performance/mobile/ui"
15+
baseURL={`/performance/${BASE_URL}`}
1516
features={['spans-first-ui', 'starfish-mobile-ui-module']}
1617
>
1718
<ResponsivenessModule />

static/app/views/performance/mobile/ui/screenSummary/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {normalizeUrl} from 'sentry/utils/withDomainRequired';
1616
import {SamplesTables} from 'sentry/views/performance/mobile/components/samplesTables';
1717
import {ScreenLoadSpanSamples} from 'sentry/views/performance/mobile/screenload/screenLoadSpans/samples';
1818
import {SpanOperationTable} from 'sentry/views/performance/mobile/ui/screenSummary/spanOperationTable';
19+
import {BASE_URL} from 'sentry/views/performance/mobile/ui/settings';
1920
import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
2021
import {ReleaseComparisonSelector} from 'sentry/views/starfish/components/releaseSelector';
2122
import {SpanMetricsField} from 'sentry/views/starfish/types';
@@ -138,7 +139,7 @@ function PageWithProviders() {
138139
return (
139140
<ModulePageProviders
140141
title={[transaction, t('Screen Loads')].join(' — ')}
141-
baseURL="/performance/mobile/ui/spans"
142+
baseURL={`/performance/${BASE_URL}`}
142143
features={['spans-first-ui', 'starfish-mobile-ui-module']}
143144
>
144145
<ScreenSummary />
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import {t} from 'sentry/locale';
2+
3+
export const MODULE_TITLE = t('Mobile UI');
4+
export const BASE_URL = 'mobile/ui';

0 commit comments

Comments
 (0)