File tree 1 file changed +8
-1
lines changed
static/app/views/detectors
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,11 @@ import {t} from 'sentry/locale';
17
17
import { space } from 'sentry/styles/space' ;
18
18
import getDuration from 'sentry/utils/duration/getDuration' ;
19
19
import useOrganization from 'sentry/utils/useOrganization' ;
20
+ import { useParams } from 'sentry/utils/useParams' ;
20
21
import { ConnectedAutomationsList } from 'sentry/views/detectors/components/connectedAutomationList' ;
21
22
import DetailsPanel from 'sentry/views/detectors/components/detailsPanel' ;
22
23
import IssuesList from 'sentry/views/detectors/components/issuesList' ;
24
+ import { useDetectorQuery } from 'sentry/views/detectors/hooks' ;
23
25
import { makeMonitorBasePathname } from 'sentry/views/detectors/pathnames' ;
24
26
25
27
type Priority = {
@@ -35,9 +37,14 @@ const priorities: Priority[] = [
35
37
export default function DetectorDetail ( ) {
36
38
const organization = useOrganization ( ) ;
37
39
useWorkflowEngineFeatureGate ( { redirect : true } ) ;
40
+ const { detectorId} = useParams ( ) ;
41
+ if ( ! detectorId ) {
42
+ throw new Error ( `Unable to find detector.` ) ;
43
+ }
44
+ const { data : detector } = useDetectorQuery ( detectorId ) ;
38
45
39
46
return (
40
- < SentryDocumentTitle title = { '/endpoint' } noSuffix >
47
+ < SentryDocumentTitle title = { detector ?. name } noSuffix >
41
48
< BreadcrumbsProvider
42
49
crumb = { { label : t ( 'Monitors' ) , to : makeMonitorBasePathname ( organization . slug ) } }
43
50
>
You can’t perform that action at this time.
0 commit comments