diff --git a/static/app/views/detectors/list/allMonitors.tsx b/static/app/views/detectors/list/allMonitors.tsx index 58d95c75695d3d..e9b38236c92529 100644 --- a/static/app/views/detectors/list/allMonitors.tsx +++ b/static/app/views/detectors/list/allMonitors.tsx @@ -19,7 +19,7 @@ export default function AllMonitors() { return ( } + actions={} title={TITLE} description={DESCRIPTION} docsUrl={DOCS_URL} diff --git a/static/app/views/detectors/list/common/detectorListActions.tsx b/static/app/views/detectors/list/common/detectorListActions.tsx index db3724911f498e..0a14dccd1cdd07 100644 --- a/static/app/views/detectors/list/common/detectorListActions.tsx +++ b/static/app/views/detectors/list/common/detectorListActions.tsx @@ -5,42 +5,22 @@ import {ALL_ACCESS_PROJECTS} from 'sentry/components/pageFilters/constants'; import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters'; import {IconAdd} from 'sentry/icons'; import {t} from 'sentry/locale'; -import type {DetectorType} from 'sentry/types/workflowEngine/detectors'; import {useOrganization} from 'sentry/utils/useOrganization'; import {MonitorFeedbackButton} from 'sentry/views/detectors/components/monitorFeedbackButton'; -import { - makeMonitorCreatePathname, - makeMonitorCreateSettingsPathname, -} from 'sentry/views/detectors/pathnames'; -import {detectorTypeIsUserCreateable} from 'sentry/views/detectors/utils/detectorTypeConfig'; +import {makeMonitorCreatePathname} from 'sentry/views/detectors/pathnames'; import {getNoPermissionToCreateMonitorsTooltip} from 'sentry/views/detectors/utils/monitorAccessMessages'; import {useCanCreateDetector} from 'sentry/views/detectors/utils/useCanCreateDetector'; interface DetectorListActionsProps { - detectorType: DetectorType | null; children?: React.ReactNode; } -function getPermissionTooltipText({detectorType}: {detectorType: DetectorType | null}) { - const noPermissionText = getNoPermissionToCreateMonitorsTooltip(); - - if (!detectorType || detectorTypeIsUserCreateable(detectorType)) { - return noPermissionText; - } - - return t('This monitor type is managed by Sentry.'); -} - -export function DetectorListActions({detectorType, children}: DetectorListActionsProps) { +export function DetectorListActions({children}: DetectorListActionsProps) { const organization = useOrganization(); const {selection} = usePageFilters(); - const createPath = detectorType - ? makeMonitorCreateSettingsPathname(organization.slug) - : makeMonitorCreatePathname(organization.slug); const project = selection.projects.find(pid => pid !== ALL_ACCESS_PROJECTS); - const createQuery = detectorType ? {project, detectorType} : {project}; - const canCreateDetector = useCanCreateDetector(detectorType); + const canCreateDetector = useCanCreateDetector(null); return ( @@ -48,19 +28,15 @@ export function DetectorListActions({detectorType, children}: DetectorListAction } size="sm" disabled={!canCreateDetector} tooltipProps={{ - title: canCreateDetector - ? undefined - : getPermissionTooltipText({ - detectorType, - }), + title: canCreateDetector ? undefined : getNoPermissionToCreateMonitorsTooltip(), }} > {t('Create Monitor')} diff --git a/static/app/views/detectors/list/cron.tsx b/static/app/views/detectors/list/cron.tsx index ac861c9fa7b39e..d291cfe7f475fc 100644 --- a/static/app/views/detectors/list/cron.tsx +++ b/static/app/views/detectors/list/cron.tsx @@ -244,7 +244,7 @@ export default function CronDetectorsList() { } + actions={} title={TITLE} description={DESCRIPTION} docsUrl={DOCS_URL} diff --git a/static/app/views/detectors/list/error.tsx b/static/app/views/detectors/list/error.tsx index d2ed71479687aa..cc23e6a3360d38 100644 --- a/static/app/views/detectors/list/error.tsx +++ b/static/app/views/detectors/list/error.tsx @@ -21,7 +21,7 @@ export default function ErrorDetectorsList() { return ( } + actions={} title={TITLE} description={DESCRIPTION} docsUrl={DOCS_URL} diff --git a/static/app/views/detectors/list/metric.tsx b/static/app/views/detectors/list/metric.tsx index 063e6bfcf0d58f..c0de7b94a40932 100644 --- a/static/app/views/detectors/list/metric.tsx +++ b/static/app/views/detectors/list/metric.tsx @@ -21,7 +21,7 @@ export default function MetricDetectorsList() { return ( } + actions={} title={TITLE} description={DESCRIPTION} docsUrl={DOCS_URL} diff --git a/static/app/views/detectors/list/mobileBuild.tsx b/static/app/views/detectors/list/mobileBuild.tsx index daea09353a6e25..fe6914cf811e13 100644 --- a/static/app/views/detectors/list/mobileBuild.tsx +++ b/static/app/views/detectors/list/mobileBuild.tsx @@ -22,7 +22,7 @@ export default function MobileBuildDetectorsList() { } + actions={} title={TITLE} description={DESCRIPTION} docsUrl={DOCS_URL} diff --git a/static/app/views/detectors/list/myMonitors.tsx b/static/app/views/detectors/list/myMonitors.tsx index 2d81d8172bf5a4..6c91043f495f20 100644 --- a/static/app/views/detectors/list/myMonitors.tsx +++ b/static/app/views/detectors/list/myMonitors.tsx @@ -18,7 +18,7 @@ export default function MyMonitorsList() { return ( } + actions={} title={TITLE} description={DESCRIPTION} docsUrl={DOCS_URL} diff --git a/static/app/views/detectors/list/uptime.tsx b/static/app/views/detectors/list/uptime.tsx index fa385dbfc4222b..dbbacafdcd3285 100644 --- a/static/app/views/detectors/list/uptime.tsx +++ b/static/app/views/detectors/list/uptime.tsx @@ -105,7 +105,7 @@ export default function UptimeDetectorsList() { } + actions={} title={TITLE} description={DESCRIPTION} docsUrl={DOCS_URL} diff --git a/static/app/views/detectors/pathnames.tsx b/static/app/views/detectors/pathnames.tsx index c89431355cbe4d..33b54650b84f2b 100644 --- a/static/app/views/detectors/pathnames.tsx +++ b/static/app/views/detectors/pathnames.tsx @@ -23,10 +23,6 @@ export const makeMonitorCreatePathname = (orgSlug: string) => { return normalizeUrl(`${makeMonitorBasePathname(orgSlug)}new/`); }; -export const makeMonitorCreateSettingsPathname = (orgSlug: string) => { - return normalizeUrl(`${makeMonitorBasePathname(orgSlug)}new/settings/`); -}; - export const makeMonitorEditPathname = (orgSlug: string, monitorId: string) => { return normalizeUrl(`${makeMonitorBasePathname(orgSlug)}${monitorId}/edit/`); };