diff --git a/src/components/UptimeAlertSection.tsx b/src/components/UptimeAlertSection.tsx index 96a6dc286..e959c985b 100644 --- a/src/components/UptimeAlertSection.tsx +++ b/src/components/UptimeAlertSection.tsx @@ -97,10 +97,7 @@ export default function UptimeAlertSection({ ); const allRoles = useMemo( - () => - orgRoles - .map((r) => ({ id: String(r.roleId), text: r.name })) - .filter((r) => r.text !== "Admin"), + () => orgRoles.map((r) => ({ id: String(r.roleId), text: r.name })), [orgRoles] ); diff --git a/src/components/alert-rule-editor/AlertRuleFields.tsx b/src/components/alert-rule-editor/AlertRuleFields.tsx index e9056256b..1d420f433 100644 --- a/src/components/alert-rule-editor/AlertRuleFields.tsx +++ b/src/components/alert-rule-editor/AlertRuleFields.tsx @@ -30,10 +30,7 @@ import { SelectTrigger, SelectValue } from "@app/components/ui/select"; -import { - RadioGroup, - RadioGroupItem -} from "@app/components/ui/radio-group"; +import { RadioGroup, RadioGroupItem } from "@app/components/ui/radio-group"; import { Label } from "@app/components/ui/label"; import { StrategySelect } from "@app/components/StrategySelect"; import { TagInput, type Tag } from "@app/components/tags/tag-input"; @@ -59,7 +56,6 @@ export function AddActionPanel({ }) { const t = useTranslations(); - const EXTERNAL_INTEGRATIONS = [ { id: "pagerduty", @@ -247,9 +243,7 @@ function HealthCheckMultiSelect({ const shown = useMemo(() => { const query = debounced.trim().toLowerCase(); const base = query - ? healthChecks.filter((hc) => - hc.name.toLowerCase().includes(query) - ) + ? healthChecks.filter((hc) => hc.name.toLowerCase().includes(query)) : healthChecks; // Always keep already-selected items visible even if they fall outside the search if (query && value.length > 0) { @@ -323,9 +317,7 @@ function HealthCheckMultiSelect({ aria-hidden tabIndex={-1} /> - - {hc.name} - + {hc.name} ))} @@ -510,8 +502,12 @@ function NotifyActionFields({ number | null >(null); - const { data: orgUsers = [], isLoading: isLoadingUsers } = useQuery(orgQueries.users({ orgId })); - const { data: orgRoles = [], isLoading: isLoadingRoles } = useQuery(orgQueries.roles({ orgId })); + const { data: orgUsers = [], isLoading: isLoadingUsers } = useQuery( + orgQueries.users({ orgId }) + ); + const { data: orgRoles = [], isLoading: isLoadingRoles } = useQuery( + orgQueries.roles({ orgId }) + ); const allUsers = useMemo( () => @@ -527,10 +523,7 @@ function NotifyActionFields({ ); const allRoles = useMemo( - () => - orgRoles - .map((r) => ({ id: String(r.roleId), text: r.name })) - .filter((r) => r.text !== "Admin"), + () => orgRoles.map((r) => ({ id: String(r.roleId), text: r.name })), [orgRoles] ); @@ -578,9 +571,18 @@ function NotifyActionFields({ hasResolvedTagsRef.current = true; }, [isLoadingUsers, isLoadingRoles, allUsers, allRoles]); - const userTags = (useWatch({ control, name: `actions.${index}.userTags` }) ?? []) as Tag[]; - const roleTags = (useWatch({ control, name: `actions.${index}.roleTags` }) ?? []) as Tag[]; - const emailTags = (useWatch({ control, name: `actions.${index}.emailTags` }) ?? []) as Tag[]; + const userTags = (useWatch({ + control, + name: `actions.${index}.userTags` + }) ?? []) as Tag[]; + const roleTags = (useWatch({ + control, + name: `actions.${index}.roleTags` + }) ?? []) as Tag[]; + const emailTags = (useWatch({ + control, + name: `actions.${index}.emailTags` + }) ?? []) as Tag[]; return (
- {t("httpDestAuthNoneDescription")} + {t( + "httpDestAuthNoneDescription" + )}
- {t("httpDestAuthBearerDescription")} + {t( + "httpDestAuthBearerDescription" + )}
{field.value === "bearer" && ( @@ -821,7 +829,9 @@ function WebhookActionFields({- {t("httpDestAuthBasicDescription")} + {t( + "httpDestAuthBasicDescription" + )}
{field.value === "basic" && ( @@ -860,7 +874,9 @@ function WebhookActionFields({- {t("httpDestAuthCustomDescription")} + {t( + "httpDestAuthCustomDescription" + )}
{field.value === "custom" && ( @@ -895,12 +915,16 @@ function WebhookActionFields({