@@ -20,7 +20,6 @@ import PanelHeader from 'sentry/components/panels/panelHeader';
20
20
import PanelItem from 'sentry/components/panels/panelItem' ;
21
21
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle' ;
22
22
import { t , tct } from 'sentry/locale' ;
23
- import ConfigStore from 'sentry/stores/configStore' ;
24
23
import ProjectsStore from 'sentry/stores/projectsStore' ;
25
24
import { space } from 'sentry/styles/space' ;
26
25
import type { Scope } from 'sentry/types/core' ;
@@ -275,10 +274,6 @@ function ProjectPerformance() {
275
274
}
276
275
277
276
const requiredScopes : Scope [ ] = [ 'project:write' ] ;
278
- const hasManageDetectors = organization . features . includes (
279
- 'performance-manage-detectors'
280
- ) ;
281
-
282
277
const projectEndpoint = `/projects/${ organization . slug } /${ projectSlug } /` ;
283
278
const performanceIssuesEndpoint = `/projects/${ organization . slug } /${ projectSlug } /performance-issues/configure/` ;
284
279
const isSuperUser = isActiveSuperuser ( ) ;
@@ -550,22 +545,8 @@ function ProjectPerformance() {
550
545
} ,
551
546
] ;
552
547
553
- const performanceIssueDetectorAdminFields = hasManageDetectors
554
- ? performanceRegressionAdminFields
555
- : Object . values ( performanceIssueDetectorAdminFieldMapping ) . concat (
556
- performanceRegressionAdminFields
557
- ) ;
558
-
559
548
const project_owner_detector_settings = ( hasAccess : boolean ) : JsonFormObject [ ] => {
560
- const supportMail = ConfigStore . get ( 'supportEmail' ) ;
561
- const disabledText = hasManageDetectors
562
- ? t ( 'Detection of this issue has been disabled.' )
563
- : t (
564
- 'Detection of this issue has been disabled. Contact our support team at [link:support@sentry.io].' ,
565
- {
566
- link : < ExternalLink href = { 'mailto:' + supportMail } /> ,
567
- }
568
- ) ;
549
+ const disabledText = t ( 'Detection of this issue has been disabled.' ) ;
569
550
570
551
const disabledReason = hasAccess ? disabledText : null ;
571
552
@@ -895,29 +876,27 @@ function ProjectPerformance() {
895
876
] ;
896
877
897
878
// If the organization can manage detectors, add the admin field to the existing settings
898
- return hasManageDetectors
899
- ? baseDetectorFields . map ( fieldGroup => {
900
- const manageField =
901
- performanceIssueDetectorAdminFieldMapping [ fieldGroup . title as string ] ;
879
+ return baseDetectorFields . map ( fieldGroup => {
880
+ const manageField =
881
+ performanceIssueDetectorAdminFieldMapping [ fieldGroup . title as string ] ;
902
882
903
- return manageField
904
- ? {
905
- ...fieldGroup ,
906
- fields : [
907
- {
908
- ...manageField ,
909
- help : t (
910
- 'Controls whether or not Sentry should detect this type of issue.'
911
- ) ,
912
- disabled : ! hasAccess ,
913
- disabledReason : t ( 'You do not have permission to manage detectors.' ) ,
914
- } ,
915
- ...fieldGroup . fields ,
916
- ] ,
917
- }
918
- : fieldGroup ;
919
- } )
920
- : baseDetectorFields ;
883
+ return manageField
884
+ ? {
885
+ ...fieldGroup ,
886
+ fields : [
887
+ {
888
+ ...manageField ,
889
+ help : t (
890
+ 'Controls whether or not Sentry should detect this type of issue.'
891
+ ) ,
892
+ disabled : ! hasAccess ,
893
+ disabledReason : t ( 'You do not have permission to manage detectors.' ) ,
894
+ } ,
895
+ ...fieldGroup . fields ,
896
+ ] ,
897
+ }
898
+ : fieldGroup ;
899
+ } ) ;
921
900
} ;
922
901
923
902
return (
@@ -1062,7 +1041,7 @@ function ProjectPerformance() {
1062
1041
title = { t (
1063
1042
'### INTERNAL ONLY ### - Performance Issues Admin Detector Settings'
1064
1043
) }
1065
- fields = { performanceIssueDetectorAdminFields }
1044
+ fields = { performanceRegressionAdminFields }
1066
1045
disabled = { ! isSuperUser }
1067
1046
/>
1068
1047
</ Form >
0 commit comments