-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(aci): add monitor config form #90501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
79163fc
72af9dd
4e10a79
906f004
99210a9
912e83d
05c87b6
e9347ed
2371be4
58e1d67
87f018a
636349c
9128d7c
f8dccda
f96d00f
e3c221d
0c25cfb
8d27241
e40b590
a572e9a
1d2a997
f2aced1
8509c4d
0ba6e16
31e69bc
a660080
054fca5
0f23ff9
87a4c62
39c623c
0420a82
8a5b4f4
92ed66c
82efb48
b687c70
e13ba68
22a010d
7946e35
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ import {useState} from 'react'; | |
|
||
import type {ActionType} from 'sentry/types/workflowEngine/actions'; | ||
import type {Automation} from 'sentry/types/workflowEngine/automations'; | ||
import {useDetectorQueriesByIds} from 'sentry/views/detectors/hooks'; | ||
|
||
export function useAutomationActions(automation: Automation): ActionType[] { | ||
return [ | ||
|
@@ -47,3 +48,9 @@ export function useConnectedIds({storageKey, initialIds = []}: UseConnectedIdsPr | |
} | ||
|
||
export const NEW_AUTOMATION_CONNECTED_IDS_KEY = 'new-automation-connected-ids'; | ||
export function useAutomationProjectIds(automation: Automation): string[] { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. making x requests to get project ids seems kinda weird. Are we using this anywhere? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't the project ids exist in the list returned from that api There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah we've had a lot of back-and-forth discussion on this data model... it is weird! automations aren't associated directly with projects but only to detectors which are then associated with projects. so there's a lot of hoop jumping just to display these project badges, which would also be surfaced in the connected monitors tooltip. |
||
const queries = useDetectorQueriesByIds(automation.detectorIds); | ||
return [ | ||
...new Set(queries.map(query => query.data?.projectId).filter(x => x)), | ||
] as string[]; | ||
} |
Uh oh!
There was an error while loading. Please reload this page.