-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Copy pathroutes.tsx
2317 lines (2271 loc) · 72.9 KB
/
routes.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import {Fragment, lazy} from 'react';
import {IndexRedirect, Redirect} from 'react-router';
import memoize from 'lodash/memoize';
import LazyLoad from 'sentry/components/lazyLoad';
import {EXPERIMENTAL_SPA, USING_CUSTOMER_DOMAIN} from 'sentry/constants';
import {t} from 'sentry/locale';
import HookStore from 'sentry/stores/hookStore';
import type {HookName} from 'sentry/types/hooks';
import errorHandler from 'sentry/utils/errorHandler';
import retryableImport from 'sentry/utils/retryableImport';
import withDomainRedirect from 'sentry/utils/withDomainRedirect';
import withDomainRequired from 'sentry/utils/withDomainRequired';
import App from 'sentry/views/app';
import AuthLayout from 'sentry/views/auth/layout';
import {Tab, TabPaths} from 'sentry/views/issueDetails/types';
import IssueListContainer from 'sentry/views/issueList';
import IssueListOverview from 'sentry/views/issueList/overview';
import OrganizationContainer from 'sentry/views/organizationContainer';
import OrganizationLayout from 'sentry/views/organizationLayout';
import OrganizationRoot from 'sentry/views/organizationRoot';
import ProjectEventRedirect from 'sentry/views/projectEventRedirect';
import redirectDeprecatedProjectRoute from 'sentry/views/projects/redirectDeprecatedProjectRoute';
import RouteNotFound from 'sentry/views/routeNotFound';
import SettingsWrapper from 'sentry/views/settings/components/settingsWrapper';
import {IndexRoute, Route} from './components/route';
const hook = (name: HookName) => HookStore.get(name).map(cb => cb());
// LazyExoticComponent Props get crazy when wrapped in an additional layer
const SafeLazyLoad = errorHandler(LazyLoad) as unknown as React.ComponentType<
typeof LazyLoad
>;
// NOTE: makeLazyloadComponent is exported for use in the sentry.io (getsentry)
// pirvate routing tree.
/**
* Factory function to produce a component that will render the SafeLazyLoad
* _with_ the required props.
*/
export function makeLazyloadComponent<C extends React.ComponentType<any>>(
resolve: () => Promise<{default: C}>
) {
const LazyComponent = lazy<C>(() => retryableImport(resolve));
// XXX: Assign the component to a variable so it has a displayname
function RouteLazyLoad(props: React.ComponentProps<C>) {
// we can use this hook to set the organization as it's
// a child of the organization context
return <SafeLazyLoad {...props} LazyComponent={LazyComponent} />;
}
return RouteLazyLoad;
}
// Shorthand to avoid extra line wrapping
const make = makeLazyloadComponent;
function buildRoutes() {
// Read this to understand where to add new routes, how / why the routing
// tree is structured the way it is, and how the lazy-loading /
// code-splitting works for pages.
//
// ## Formatting
//
// NOTE that there are intentionally NO blank lines within route tree blocks.
// This helps make it easier to navigate within the file by using your
// editors shortcuts to jump between 'paragraphs' of code.
//
// [!!] Do NOT add blank lines within route blocks to preserve this behavior!
//
//
// ## Lazy loading
//
// * The `SafeLazyLoad` component
//
// Most routes are rendered as LazyLoad components (SafeLazyLoad is the
// errorHandler wrapped version). This means the rendered component for the
// route will only be loaded when the route is loaded. This helps us
// "code-split" the app.
//
// ## Hooks
//
// There are a number of `hook()` routes placed within the routing tree to
// allow for additional routes to be augmented into the application via the
// hookStore mechanism.
//
//
// ## The structure
//
// * `experimentalSpaRoutes`
//
// These routes are specifically for the experimental single-page-app mode,
// where Sentry is run separate from Django. These are NOT part of the root
// <App /> component.
//
// Right now these are mainly used for authentication pages. In the future
// they would be used for other pages like registration.
//
// * `rootRoutes`
//
// These routes live directly under the <App /> container, and generally
// are not specific to an organization.
//
// * `settingsRoutes`
//
// This is the route tree for all of `/settings/`. This route tree is
// composed of a few different sub-trees.
//
// - `accountSettingsRoutes` User specific settings
// - `orgSettingsRoutes` Specific to a organization
// - `projectSettingsRoutes` Specific to a project
// - `legacySettingsRedirects` Routes that used to exist in settings
//
// * `organizationRoutes`
//
// This is where a majority of the app routes live. This is wrapped with
// the <OrganizationLayout /> component, which renders the sidebar and
// loads the organiztion into context (though in some cases, there may be
// no organiztion)
//
// When adding new top-level organization routes, be sure the top level
// route includes withOrgPath to support installs that are not using
// customer domains.
//
// Within these routes are a variety of subroutes. They are not all
// listed here as the subroutes will be added and removed, and most are
// self explanatory.
//
// * `legacyRedirectRoutes`
//
// This route tree contains <Redirect /> routes for many old legacy paths.
//
// You may also find <Redirect />'s collocated next to the feature routes
// they have redirects for. A good rule here is to place 'helper' redirects
// next to the routes they redirect to, and place 'legacy route' redirects
// for routes that have completely changed in this tree.
const experimentalSpaRoutes = EXPERIMENTAL_SPA ? (
<Route path="/auth/login/" component={errorHandler(AuthLayout)}>
<IndexRoute component={make(() => import('sentry/views/auth/login'))} />
<Route path=":orgId/" component={make(() => import('sentry/views/auth/login'))} />
</Route>
) : null;
const rootRoutes = (
<Fragment>
<IndexRoute component={make(() => import('sentry/views/app/root'))} />
{hook('routes:root')}
<Route
path="/accept/:orgId/:memberId/:token/"
component={make(() => import('sentry/views/acceptOrganizationInvite'))}
/>
<Route
path="/accept/:memberId/:token/"
component={make(() => import('sentry/views/acceptOrganizationInvite'))}
/>
<Route
path="/accept-transfer/"
component={make(() => import('sentry/views/acceptProjectTransfer'))}
/>
<Route component={errorHandler(OrganizationContainer)}>
<Route
path="/extensions/external-install/:integrationSlug/:installationId"
component={make(() => import('sentry/views/integrationOrganizationLink'))}
/>
<Route
path="/extensions/:integrationSlug/link/"
component={make(() => import('sentry/views/integrationOrganizationLink'))}
/>
</Route>
<Route
path="/sentry-apps/:sentryAppSlug/external-install/"
component={make(() => import('sentry/views/sentryAppExternalInstallation'))}
/>
<Redirect from="/account/" to="/settings/account/details/" />
<Redirect from="/share/group/:shareId/" to="/share/issue/:shareId/" />
{/* TODO: remove share/issue orgless url */}
<Route
path="/share/issue/:shareId/"
component={make(() => import('sentry/views/sharedGroupDetails'))}
/>
<Route
path="/organizations/:orgId/share/issue/:shareId/"
component={make(() => import('sentry/views/sharedGroupDetails'))}
/>
{USING_CUSTOMER_DOMAIN && (
<Route
path="/unsubscribe/project/:id/"
component={make(() => import('sentry/views/unsubscribe/project'))}
/>
)}
<Route
path="/unsubscribe/:orgId/project/:id/"
component={make(() => import('sentry/views/unsubscribe/project'))}
/>
{USING_CUSTOMER_DOMAIN && (
<Route
path="/unsubscribe/issue/:id/"
component={make(() => import('sentry/views/unsubscribe/issue'))}
/>
)}
<Route
path="/unsubscribe/:orgId/issue/:id/"
component={make(() => import('sentry/views/unsubscribe/issue'))}
/>
<Route
path="/organizations/new/"
component={make(() => import('sentry/views/organizationCreate'))}
/>
{USING_CUSTOMER_DOMAIN && (
<Route
path="/data-export/:dataExportId"
component={withDomainRequired(
make(() => import('sentry/views/dataExport/dataDownload'))
)}
key="orgless-data-export-route"
/>
)}
<Route
path="/organizations/:orgId/data-export/:dataExportId"
component={withDomainRedirect(
make(() => import('sentry/views/dataExport/dataDownload'))
)}
key="org-data-export"
/>
<Route component={errorHandler(OrganizationContainer)}>
{USING_CUSTOMER_DOMAIN && (
<Route
path="/disabled-member/"
component={withDomainRequired(
make(() => import('sentry/views/disabledMember'))
)}
key="orgless-disabled-member-route"
/>
)}
<Route
path="/organizations/:orgId/disabled-member/"
component={withDomainRedirect(
make(() => import('sentry/views/disabledMember'))
)}
key="org-disabled-member"
/>
</Route>
{USING_CUSTOMER_DOMAIN && (
<Route
path="/restore/"
component={make(() => import('sentry/views/organizationRestore'))}
/>
)}
<Route
path="/organizations/:orgId/restore/"
component={make(() => import('sentry/views/organizationRestore'))}
/>
{USING_CUSTOMER_DOMAIN && (
<Route
path="/join-request/"
component={withDomainRequired(
make(() => import('sentry/views/organizationJoinRequest'))
)}
key="orgless-join-request"
/>
)}
<Route
path="/join-request/:orgId/"
component={withDomainRedirect(
make(() => import('sentry/views/organizationJoinRequest'))
)}
key="org-join-request"
/>
<Route
path="/relocation/"
component={make(() => import('sentry/views/relocation'))}
key="orgless-relocation"
>
<IndexRedirect to="get-started/" />
<Route path=":step/" component={make(() => import('sentry/views/relocation'))} />
</Route>
{USING_CUSTOMER_DOMAIN && (
<Route
path="/onboarding/"
component={errorHandler(withDomainRequired(OrganizationContainer))}
key="orgless-onboarding"
>
<IndexRedirect to="welcome/" />
<Route
path=":step/"
component={make(() => import('sentry/views/onboarding'))}
/>
</Route>
)}
<Route
path="/onboarding/:orgId/"
component={withDomainRedirect(errorHandler(OrganizationContainer))}
key="org-onboarding"
>
<IndexRedirect to="welcome/" />
<Route path=":step/" component={make(() => import('sentry/views/onboarding'))} />
</Route>
{USING_CUSTOMER_DOMAIN && (
<Route
path="/stories/"
component={make(() => import('sentry/views/stories/index'))}
key="orgless-stories"
/>
)}
<Route
path="/organizations/:orgId/stories/"
component={withDomainRedirect(make(() => import('sentry/views/stories/index')))}
key="org-stories"
/>
</Fragment>
);
const accountSettingsRoutes = (
<Route
path="account/"
name={t('Account')}
component={make(
() => import('sentry/views/settings/account/accountSettingsLayout')
)}
>
<IndexRedirect to="details/" />
<Route
path="details/"
name={t('Details')}
component={make(() => import('sentry/views/settings/account/accountDetails'))}
/>
<Route path="notifications/" name={t('Notifications')}>
<IndexRoute
component={make(
() =>
import(
'sentry/views/settings/account/notifications/notificationSettingsController'
)
)}
/>
<Route
path=":fineTuneType/"
name={t('Fine Tune Alerts')}
component={make(
() =>
import(
'sentry/views/settings/account/accountNotificationFineTuningController'
)
)}
/>
</Route>
<Route
path="emails/"
name={t('Emails')}
component={make(() => import('sentry/views/settings/account/accountEmails'))}
/>
<Route
path="authorizations/"
component={make(
() => import('sentry/views/settings/account/accountAuthorizations')
)}
/>
<Route path="security/" name={t('Security')}>
<Route
component={make(
() =>
import(
'sentry/views/settings/account/accountSecurity/accountSecurityWrapper'
)
)}
>
<IndexRoute
component={make(
() => import('sentry/views/settings/account/accountSecurity')
)}
/>
<Route
path="session-history/"
name={t('Session History')}
component={make(
() => import('sentry/views/settings/account/accountSecurity/sessionHistory')
)}
/>
<Route
path="mfa/:authId/"
name={t('Details')}
component={make(
() =>
import(
'sentry/views/settings/account/accountSecurity/accountSecurityDetails'
)
)}
/>
</Route>
<Route
path="mfa/:authId/enroll/"
name={t('Enroll')}
component={make(
() =>
import(
'sentry/views/settings/account/accountSecurity/accountSecurityEnroll'
)
)}
/>
</Route>
<Route
path="subscriptions/"
name={t('Subscriptions')}
component={make(
() => import('sentry/views/settings/account/accountSubscriptions')
)}
/>
<Route
path="identities/"
name={t('Identities')}
component={make(() => import('sentry/views/settings/account/accountIdentities'))}
/>
<Route path="api/" name={t('API')}>
<IndexRedirect to="auth-tokens/" />
<Route path="auth-tokens/" name={t('User Auth Tokens')}>
<IndexRoute
component={make(() => import('sentry/views/settings/account/apiTokens'))}
/>
<Route
path="new-token/"
name={t('Create New Token')}
component={make(() => import('sentry/views/settings/account/apiNewToken'))}
/>
</Route>
<Route path="applications/" name={t('Applications')}>
<IndexRoute
component={make(
() => import('sentry/views/settings/account/apiApplications')
)}
/>
<Route
path=":appId/"
name={t('Details')}
component={make(
() => import('sentry/views/settings/account/apiApplications/details')
)}
/>
</Route>
{hook('routes:api')}
</Route>
<Route
path="close-account/"
name={t('Close Account')}
component={make(() => import('sentry/views/settings/account/accountClose'))}
/>
</Route>
);
const projectSettingsRoutes = (
<Route
path="projects/:projectId/"
name={t('Project')}
component={make(
() => import('sentry/views/settings/project/projectSettingsLayout')
)}
>
<IndexRoute
name={t('General')}
component={make(() => import('sentry/views/settings/projectGeneralSettings'))}
/>
<Redirect from="install/" to="/projects/:projectId/getting-started/" />
<Route
path="teams/"
name={t('Teams')}
component={make(() => import('sentry/views/settings/project/projectTeams'))}
/>
<Route
path="alerts/"
name={t('Alerts')}
component={make(() => import('sentry/views/settings/projectAlerts'))}
>
<IndexRoute
component={make(() => import('sentry/views/settings/projectAlerts/settings'))}
/>
<Redirect from="new/" to="/organizations/:orgId/alerts/:projectId/new/" />
<Redirect from="rules/" to="/organizations/:orgId/alerts/rules/" />
<Redirect from="rules/new/" to="/organizations/:orgId/alerts/:projectId/new/" />
<Redirect
from="metric-rules/new/"
to="/organizations/:orgId/alerts/:projectId/new/"
/>
<Redirect
from="rules/:ruleId/"
to="/organizations/:orgId/alerts/rules/:projectId/:ruleId/"
/>
<Redirect
from="metric-rules/:ruleId/"
to="/organizations/:orgId/alerts/metric-rules/:projectId/:ruleId/"
/>
</Route>
<Route
path="environments/"
name={t('Environments')}
component={make(
() => import('sentry/views/settings/project/projectEnvironments')
)}
>
<IndexRoute />
<Route path="hidden/" />
</Route>
<Route
path="tags/"
name={t('Tags & Context')}
component={make(() => import('sentry/views/settings/projectTags'))}
/>
<Redirect from="issue-tracking/" to="/settings/:orgId/:projectId/plugins/" />
<Route
path="release-tracking/"
name={t('Release Tracking')}
component={make(
() => import('sentry/views/settings/project/projectReleaseTracking')
)}
/>
<Route
path="ownership/"
name={t('Ownership Rules')}
component={make(() => import('sentry/views/settings/project/projectOwnership'))}
/>
<Route
path="data-forwarding/"
name={t('Data Forwarding')}
component={make(() => import('sentry/views/settings/projectDataForwarding'))}
/>
<Route path="security-and-privacy/" name={t('Security & Privacy')}>
<IndexRoute
component={make(
() => import('sentry/views/settings/projectSecurityAndPrivacy')
)}
/>
<Route
path="advanced-data-scrubbing/:scrubbingId/"
component={make(
() => import('sentry/views/settings/projectSecurityAndPrivacy')
)}
/>
</Route>
<Route
path="debug-symbols/"
name={t('Debug Information Files')}
component={make(() => import('sentry/views/settings/projectDebugFiles'))}
/>
<Route
path="proguard/"
name={t('ProGuard Mappings')}
component={make(() => import('sentry/views/settings/projectProguard'))}
/>
<Route
path="performance/"
name={t('Performance')}
component={make(() => import('sentry/views/settings/projectPerformance'))}
/>
<Route path="metrics/" name={t('Metrics')}>
<IndexRoute
component={make(() => import('sentry/views/settings/projectMetrics'))}
/>
<Route
name={t('Metrics Details')}
path=":mri/"
component={make(
() => import('sentry/views/settings/projectMetrics/projectMetricsDetails')
)}
/>
</Route>
<Route
path="replays/"
name={t('Replays')}
component={make(() => import('sentry/views/settings/project/projectReplays'))}
/>
<Route
path="user-feedback-processing/"
name={t('User Feedback')}
component={make(
() => import('sentry/views/settings/project/projectUserFeedbackProcessing')
)}
/>
<Route path="source-maps/" name={t('Source Maps')}>
<IndexRoute
component={make(() => import('sentry/views/settings/projectSourceMaps'))}
/>
<Route
path="artifact-bundles/"
name={t('Artifact Bundles')}
component={make(() => import('sentry/views/settings/projectSourceMaps'))}
>
<Route
name={t('Artifact Bundle')}
path=":bundleId/"
component={make(() => import('sentry/views/settings/projectSourceMaps'))}
/>
</Route>
<Route
path="release-bundles/"
name={t('Release Bundles')}
component={make(() => import('sentry/views/settings/projectSourceMaps'))}
>
<Route
name={t('Release Bundle')}
path=":bundleId/"
component={make(() => import('sentry/views/settings/projectSourceMaps'))}
/>
</Route>
<Redirect from=":name/" to="release-bundles/:name/" />
</Route>
<Route
path="processing-issues/"
name={t('Processing Issues')}
component={make(
() => import('sentry/views/settings/project/projectProcessingIssues')
)}
/>
<Route
path="filters/"
name={t('Inbound Filters')}
component={make(() => import('sentry/views/settings/project/projectFilters'))}
>
<IndexRedirect to="data-filters/" />
<Route path=":filterType/" />
</Route>
<Redirect from="dynamic-sampling/" to="performance/" />
<Route
path="issue-grouping/"
name={t('Issue Grouping')}
component={make(() => import('sentry/views/settings/projectIssueGrouping'))}
/>
<Route
path="hooks/"
name={t('Service Hooks')}
component={make(
() => import('sentry/views/settings/project/projectServiceHooks')
)}
/>
<Route
path="hooks/new/"
name={t('Create Service Hook')}
component={make(
() => import('sentry/views/settings/project/projectCreateServiceHook')
)}
/>
<Route
path="hooks/:hookId/"
name={t('Service Hook Details')}
component={make(
() => import('sentry/views/settings/project/projectServiceHookDetails')
)}
/>
<Route path="keys/" name={t('Client Keys')}>
<IndexRoute
component={make(() => import('sentry/views/settings/project/projectKeys/list'))}
/>
<Route
path=":keyId/"
name={t('Details')}
component={make(
() => import('sentry/views/settings/project/projectKeys/details')
)}
/>
</Route>
<Route
path="loader-script/"
name={t('Loader Script')}
component={make(() => import('sentry/views/settings/project/loaderScript'))}
/>
<Route
path="user-feedback/"
name={t('User Feedback')}
component={make(
() => import('sentry/views/settings/project/projectUserFeedback')
)}
/>
<Redirect from="csp/" to="security-headers/" />
<Route path="security-headers/" name={t('Security Headers')}>
<IndexRoute
component={make(() => import('sentry/views/settings/projectSecurityHeaders'))}
/>
<Route
path="csp/"
name={t('Content Security Policy')}
component={make(
() => import('sentry/views/settings/projectSecurityHeaders/csp')
)}
/>
<Route
path="expect-ct/"
name={t('Certificate Transparency')}
component={make(
() => import('sentry/views/settings/projectSecurityHeaders/expectCt')
)}
/>
<Route
path="hpkp/"
name={t('HPKP')}
component={make(
() => import('sentry/views/settings/projectSecurityHeaders/hpkp')
)}
/>
</Route>
<Route path="plugins/" name={t('Legacy Integrations')}>
<IndexRoute
component={make(() => import('sentry/views/settings/projectPlugins'))}
/>
<Route
path=":pluginId/"
name={t('Integration Details')}
component={make(() => import('sentry/views/settings/projectPlugins/details'))}
/>
</Route>
</Route>
);
const orgSettingsRoutes = (
<Route
component={make(
() => import('sentry/views/settings/organization/organizationSettingsLayout')
)}
>
{hook('routes:organization')}
{!USING_CUSTOMER_DOMAIN && (
<IndexRoute
name={t('General')}
component={make(
() => import('sentry/views/settings/organizationGeneralSettings')
)}
/>
)}
{USING_CUSTOMER_DOMAIN && (
<Route
path="/settings/organization/"
name={t('General')}
component={make(
() => import('sentry/views/settings/organizationGeneralSettings')
)}
/>
)}
<Route
path="projects/"
name={t('Projects')}
component={make(() => import('sentry/views/settings/organizationProjects'))}
/>
<Route path="api-keys/" name={t('API Key')}>
<IndexRoute
component={make(() => import('sentry/views/settings/organizationApiKeys'))}
/>
<Route
path=":apiKey/"
name={t('Details')}
component={make(
() =>
import(
'sentry/views/settings/organizationApiKeys/organizationApiKeyDetails'
)
)}
/>
</Route>
<Route
path="audit-log/"
name={t('Audit Log')}
component={make(() => import('sentry/views/settings/organizationAuditLog'))}
/>
<Route
path="auth/"
name={t('Auth Providers')}
component={make(() => import('sentry/views/settings/organizationAuth'))}
/>
<Redirect from="members/requests" to="members/" />
<Route path="members/" name={t('Members')}>
<Route
component={make(
() =>
import(
'sentry/views/settings/organizationMembers/organizationMembersWrapper'
)
)}
>
<IndexRoute
component={make(
() =>
import(
'sentry/views/settings/organizationMembers/organizationMembersList'
)
)}
/>
</Route>
<Route
path=":memberId/"
name={t('Details')}
component={make(
() =>
import('sentry/views/settings/organizationMembers/organizationMemberDetail')
)}
/>
</Route>
<Route
path="rate-limits/"
name={t('Rate Limits')}
component={make(() => import('sentry/views/settings/organizationRateLimits'))}
/>
<Route
path="relay/"
name={t('Relay')}
component={make(() => import('sentry/views/settings/organizationRelay'))}
/>
<Route
path="repos/"
name={t('Repositories')}
component={make(() => import('sentry/views/settings/organizationRepositories'))}
/>
<Route
path="settings/"
component={make(
() => import('sentry/views/settings/organizationGeneralSettings')
)}
/>
<Route path="security-and-privacy/" name={t('Security & Privacy')}>
<IndexRoute
component={make(
() => import('sentry/views/settings/organizationSecurityAndPrivacy')
)}
/>
<Route
path="advanced-data-scrubbing/:scrubbingId/"
component={make(
() => import('sentry/views/settings/organizationSecurityAndPrivacy')
)}
/>
</Route>
<Route path="teams/" name={t('Teams')}>
<IndexRoute
component={make(() => import('sentry/views/settings/organizationTeams'))}
/>
<Route
path=":teamId/"
name={t('Team')}
component={make(
() => import('sentry/views/settings/organizationTeams/teamDetails')
)}
>
<IndexRedirect to="members/" />
<Route
path="members/"
name={t('Members')}
component={make(
() => import('sentry/views/settings/organizationTeams/teamMembers')
)}
/>
<Route
path="notifications/"
name={t('Notifications')}
component={make(
() => import('sentry/views/settings/organizationTeams/teamNotifications')
)}
/>
<Route
path="projects/"
name={t('Projects')}
component={make(
() => import('sentry/views/settings/organizationTeams/teamProjects')
)}
/>
<Route
path="settings/"
name={t('Settings')}
component={make(
() => import('sentry/views/settings/organizationTeams/teamSettings')
)}
/>
</Route>
</Route>
<Redirect from="plugins/" to="integrations/" />
<Route path="plugins/" name={t('Integrations')}>
<Route
path=":integrationSlug/"
name={t('Integration Details')}
component={make(
() =>
import('sentry/views/settings/organizationIntegrations/pluginDetailedView')
)}
/>
</Route>
<Redirect from="sentry-apps/" to="integrations/" />
<Route path="sentry-apps/" name={t('Integrations')}>
<Route
path=":integrationSlug"
name={t('Details')}
component={make(
() =>
import(
'sentry/views/settings/organizationIntegrations/sentryAppDetailedView'
)
)}
/>
</Route>
<Redirect from="document-integrations/" to="integrations/" />
<Route path="document-integrations/" name={t('Integrations')}>
<Route
path=":integrationSlug"
name={t('Details')}
component={make(
() =>
import(
'sentry/views/settings/organizationIntegrations/docIntegrationDetailedView'
)
)}
/>
</Route>
<Route path="integrations/" name={t('Integrations')}>
<IndexRoute
component={make(
() =>
import(
'sentry/views/settings/organizationIntegrations/integrationListDirectory'
)
)}
/>
<Route
path=":integrationSlug"
name={t('Integration Details')}
component={make(
() =>
import(
'sentry/views/settings/organizationIntegrations/integrationDetailedView'
)
)}
/>
<Route
path=":providerKey/:integrationId/"
name={t('Configure Integration')}
component={make(
() =>
import(
'sentry/views/settings/organizationIntegrations/configureIntegration'
)
)}
/>
</Route>
<Redirect from="developer-settings/sentry-functions/" to="developer-settings/" />
<Route path="developer-settings/" name={t('Custom Integrations')}>
<IndexRoute
component={make(
() => import('sentry/views/settings/organizationDeveloperSettings')
)}
/>
<Route
path="new-public/"
name={t('Create Integration')}
component={make(
() =>
import(
'sentry/views/settings/organizationDeveloperSettings/sentryApplicationDetails'
)
)}
/>
<Route
path="new-internal/"
name={t('Create Integration')}
component={make(
() =>
import(
'sentry/views/settings/organizationDeveloperSettings/sentryApplicationDetails'
)
)}
/>
<Route
path=":appSlug/"
name={t('Edit Integration')}
component={make(
() =>
import(
'sentry/views/settings/organizationDeveloperSettings/sentryApplicationDetails'
)
)}
/>
<Route
path=":appSlug/dashboard/"
name={t('Integration Dashboard')}
component={make(
() =>
import(
'sentry/views/settings/organizationDeveloperSettings/sentryApplicationDashboard'
)
)}
/>
<Route path="sentry-functions/" name={t('Sentry Functions')}>
<Route
path="new/"
name={t('Create Sentry Function')}
component={make(
() =>
import(
'sentry/views/settings/organizationDeveloperSettings/sentryFunctionDetails'
)
)}
/>
<Route
path=":functionSlug/"
name={t('Edit Sentry Function')}
component={make(