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ajP,GAGd,MAACgN,EAAWhN,GAIvB,MAAMkP,EAAcJ,EAAAA,EAAAA,IAAUC,EAAAA,IAC9B,OAAIG,GAAsC,iBAAhBA,GAA4BV,EAAwBU,IAC5ElP,EAAOkP,GACA,CAACA,EAAalP,IAGnBwO,EAAwBK,EAAAA,IACnB,CAACA,EAAAA,GAA2B7O,GAG9B,MAACgN,EAAWhN,K,0DC7Dd,SAAS0H,EAA6ByH,GAC3C,OAAO9M,EAAAA,EAAAA,UAAQ,KAAM+M,EAAAA,EAAAA,IAAuCD,IAAa,CAACA","sources":["webpack://grafana/./public/app/features/alerting/unified/components/alert-groups/AlertDetails.tsx","webpack://grafana/./public/app/features/alerting/unified/components/alert-groups/AlertGroupAlertsTable.tsx","webpack://grafana/./public/app/features/alerting/unified/components/alert-groups/AlertGroup.tsx","webpack://grafana/./public/app/features/alerting/unified/components/alert-groups/AlertStateFilter.tsx","webpack://grafana/./public/app/features/alerting/unified/components/alert-groups/GroupBy.tsx","webpack://grafana/./public/app/features/alerting/unified/components/alert-groups/AlertGroupFilter.tsx","webpack://grafana/./public/app/features/alerting/unified/AlertGroups.tsx","webpack://grafana/./public/app/features/alerting/unified/hooks/useGroupedAlerts.ts","webpack://grafana/./public/app/features/alerting/unified/hooks/useFilteredAmGroups.ts","webpack://grafana/./public/app/features/alerting/unified/components/AlertingPageWrapper.tsx","webpack://grafana/./public/app/features/alerting/unified/components/Authorize.tsx","webpack://grafana/./public/app/features/alerting/unified/components/DynamicTableWithGuidelines.tsx","webpack://grafana/./public/app/features/alerting/unified/components/NoAlertManagerWarning.tsx","webpack://grafana/./public/app/features/alerting/unified/components/alert-groups/MatcherFilter.tsx","webpack://grafana/./public/app/features/alerting/unified/components/silences/AmAlertStateTag.tsx","webpack://grafana/./public/app/features/alerting/unified/hooks/useAlertManagerSourceName.ts","webpack://grafana/./public/app/features/alerting/unified/hooks/useAlertManagerSources.ts"],"sourcesContent":["import { css } from '@emotion/css';\nimport React, { FC } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { LinkButton, useStyles2 } from '@grafana/ui';\nimport { contextSrv } from 'app/core/services/context_srv';\nimport { AlertmanagerAlert, AlertState } from 'app/plugins/datasource/alertmanager/types';\nimport { AccessControlAction } from 'app/types';\n\nimport { getInstancesPermissions } from '../../utils/access-control';\nimport { isGrafanaRulesSource } from '../../utils/datasource';\nimport { makeAMLink, makeLabelBasedSilenceLink } from '../../utils/misc';\nimport { AnnotationDetailsField } from '../AnnotationDetailsField';\nimport { Authorize } from '../Authorize';\n\ninterface AmNotificationsAlertDetailsProps {\n alertManagerSourceName: string;\n alert: AlertmanagerAlert;\n}\n\nexport const AlertDetails: FC = ({ alert, alertManagerSourceName }) => {\n const styles = useStyles2(getStyles);\n const instancePermissions = getInstancesPermissions(alertManagerSourceName);\n\n // For Grafana Managed alerts the Generator URL redirects to the alert rule edit page, so update permission is required\n // For external alert manager the Generator URL redirects to an external service which we don't control\n const isGrafanaSource = isGrafanaRulesSource(alertManagerSourceName);\n const isSeeSourceButtonEnabled = isGrafanaSource\n ? contextSrv.hasPermission(AccessControlAction.AlertingRuleRead)\n : true;\n\n return (\n <>\n
\n \n {alert.status.state === AlertState.Suppressed && (\n \n Manage silences\n \n )}\n {alert.status.state === AlertState.Active && (\n \n Silence\n \n )}\n \n {isSeeSourceButtonEnabled && alert.generatorURL && (\n \n See source\n \n )}\n
\n {Object.entries(alert.annotations).map(([annotationKey, annotationValue]) => (\n \n ))}\n
\n Receivers:{' '}\n {alert.receivers\n .map(({ name }) => name)\n .filter((name) => !!name)\n .join(', ')}\n
\n \n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n button: css`\n & + & {\n margin-left: ${theme.spacing(1)};\n }\n `,\n actionsRow: css`\n padding: ${theme.spacing(2, 0)} !important;\n border-bottom: 1px solid ${theme.colors.border.medium};\n `,\n receivers: css`\n padding: ${theme.spacing(1, 0)};\n `,\n});\n","import { css } from '@emotion/css';\nimport React, { useMemo } from 'react';\n\nimport { GrafanaTheme2, intervalToAbbreviatedDurationString } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\nimport { AlertmanagerAlert } from 'app/plugins/datasource/alertmanager/types';\n\nimport { AlertLabels } from '../AlertLabels';\nimport { DynamicTableColumnProps, DynamicTableItemProps } from '../DynamicTable';\nimport { DynamicTableWithGuidelines } from '../DynamicTableWithGuidelines';\nimport { AmAlertStateTag } from '../silences/AmAlertStateTag';\n\nimport { AlertDetails } from './AlertDetails';\n\ninterface Props {\n alerts: AlertmanagerAlert[];\n alertManagerSourceName: string;\n}\n\ntype AlertGroupAlertsTableColumnProps = DynamicTableColumnProps;\ntype AlertGroupAlertsTableItemProps = DynamicTableItemProps;\n\nexport const AlertGroupAlertsTable = ({ alerts, alertManagerSourceName }: Props) => {\n const styles = useStyles2(getStyles);\n\n const columns = useMemo(\n (): AlertGroupAlertsTableColumnProps[] => [\n {\n id: 'state',\n label: 'State',\n // eslint-disable-next-line react/display-name\n renderCell: ({ data: alert }) => (\n <>\n \n \n for{' '}\n {intervalToAbbreviatedDurationString({\n start: new Date(alert.startsAt),\n end: new Date(alert.endsAt),\n })}\n \n \n ),\n size: '220px',\n },\n {\n id: 'labels',\n label: 'Labels',\n // eslint-disable-next-line react/display-name\n renderCell: ({ data: { labels } }) => ,\n size: 1,\n },\n ],\n [styles]\n );\n\n const items = useMemo(\n (): AlertGroupAlertsTableItemProps[] =>\n alerts.map((alert) => ({\n id: alert.fingerprint,\n data: alert,\n })),\n [alerts]\n );\n\n return (\n
\n (\n \n )}\n />\n
\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n tableWrapper: css`\n margin-top: ${theme.spacing(3)};\n ${theme.breakpoints.up('md')} {\n margin-left: ${theme.spacing(4.5)};\n }\n `,\n duration: css`\n margin-left: ${theme.spacing(1)};\n font-size: ${theme.typography.bodySmall.fontSize};\n `,\n labels: css`\n padding-bottom: 0;\n `,\n});\n","import { css } from '@emotion/css';\nimport React, { useState } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\nimport { AlertmanagerGroup, AlertState } from 'app/plugins/datasource/alertmanager/types';\n\nimport { AlertLabels } from '../AlertLabels';\nimport { CollapseToggle } from '../CollapseToggle';\n\nimport { AlertGroupAlertsTable } from './AlertGroupAlertsTable';\nimport { AlertGroupHeader } from './AlertGroupHeader';\n\ninterface Props {\n group: AlertmanagerGroup;\n alertManagerSourceName: string;\n}\n\nexport const AlertGroup = ({ alertManagerSourceName, group }: Props) => {\n const [isCollapsed, setIsCollapsed] = useState(true);\n const styles = useStyles2(getStyles);\n\n return (\n
\n
\n
\n setIsCollapsed(!isCollapsed)}\n data-testid=\"alert-group-collapse-toggle\"\n />\n {Object.keys(group.labels).length ? (\n \n ) : (\n No grouping\n )}\n
\n \n
\n {!isCollapsed && }\n
\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n wrapper: css`\n & + & {\n margin-top: ${theme.spacing(2)};\n }\n `,\n headerLabels: css`\n padding-bottom: 0 !important;\n margin-bottom: -${theme.spacing(0.5)};\n `,\n header: css`\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n padding: ${theme.spacing(1, 1, 1, 0)};\n background-color: ${theme.colors.background.secondary};\n width: 100%;\n `,\n group: css`\n display: flex;\n flex-direction: row;\n align-items: center;\n `,\n summary: css``,\n spanElement: css`\n margin-left: ${theme.spacing(0.5)};\n `,\n [AlertState.Active]: css`\n color: ${theme.colors.error.main};\n `,\n [AlertState.Suppressed]: css`\n color: ${theme.colors.primary.main};\n `,\n [AlertState.Unprocessed]: css`\n color: ${theme.colors.secondary.main};\n `,\n});\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2, SelectableValue } from '@grafana/data';\nimport { RadioButtonGroup, Label, useStyles2 } from '@grafana/ui';\nimport { AlertState } from 'app/plugins/datasource/alertmanager/types';\n\ninterface Props {\n stateFilter?: AlertState;\n onStateFilterChange: (value: AlertState) => void;\n}\n\nexport const AlertStateFilter = ({ onStateFilterChange, stateFilter }: Props) => {\n const styles = useStyles2(getStyles);\n const alertStateOptions: SelectableValue[] = Object.entries(AlertState)\n .sort(([labelA], [labelB]) => (labelA < labelB ? -1 : 1))\n .map(([label, state]) => ({\n label,\n value: state,\n }));\n\n return (\n
\n \n \n
\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n wrapper: css`\n margin-left: ${theme.spacing(1)};\n `,\n});\n","import { uniq } from 'lodash';\nimport React from 'react';\n\nimport { SelectableValue } from '@grafana/data';\nimport { Icon, Label, MultiSelect } from '@grafana/ui';\nimport { AlertmanagerGroup } from 'app/plugins/datasource/alertmanager/types';\n\ninterface Props {\n className?: string;\n groups: AlertmanagerGroup[];\n groupBy: string[];\n onGroupingChange: (keys: string[]) => void;\n}\n\nexport const GroupBy = ({ className, groups, groupBy, onGroupingChange }: Props) => {\n const labelKeyOptions = uniq(groups.flatMap((group) => group.alerts).flatMap(({ labels }) => Object.keys(labels)))\n .filter((label) => !(label.startsWith('__') && label.endsWith('__'))) // Filter out private labels\n .map((key) => ({\n label: key,\n value: key,\n }));\n\n return (\n
\n \n }\n onChange={(items) => {\n onGroupingChange(items.map(({ value }) => value as string));\n }}\n options={labelKeyOptions}\n />\n
\n );\n};\n","import { css } from '@emotion/css';\nimport React, { useState } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Button, useStyles2 } from '@grafana/ui';\nimport { useQueryParams } from 'app/core/hooks/useQueryParams';\nimport { AlertmanagerGroup, AlertState } from 'app/plugins/datasource/alertmanager/types';\n\nimport { useAlertManagerSourceName } from '../../hooks/useAlertManagerSourceName';\nimport { useAlertManagersByPermission } from '../../hooks/useAlertManagerSources';\nimport { getFiltersFromUrlParams } from '../../utils/misc';\nimport { AlertManagerPicker } from '../AlertManagerPicker';\n\nimport { AlertStateFilter } from './AlertStateFilter';\nimport { GroupBy } from './GroupBy';\nimport { MatcherFilter } from './MatcherFilter';\n\ninterface Props {\n groups: AlertmanagerGroup[];\n}\n\nexport const AlertGroupFilter = ({ groups }: Props) => {\n const [filterKey, setFilterKey] = useState(Math.floor(Math.random() * 100));\n const [queryParams, setQueryParams] = useQueryParams();\n const { groupBy = [], queryString, alertState } = getFiltersFromUrlParams(queryParams);\n const matcherFilterKey = `matcher-${filterKey}`;\n\n const alertManagers = useAlertManagersByPermission('instance');\n const [alertManagerSourceName, setAlertManagerSourceName] = useAlertManagerSourceName(alertManagers);\n const styles = useStyles2(getStyles);\n\n const clearFilters = () => {\n setQueryParams({\n groupBy: null,\n queryString: null,\n alertState: null,\n });\n setTimeout(() => setFilterKey(filterKey + 1), 100);\n };\n\n const showClearButton = !!(groupBy.length > 0 || queryString || alertState);\n\n return (\n
\n \n
\n setQueryParams({ queryString: value ? value : null })}\n />\n setQueryParams({ groupBy: keys.length ? keys.join(',') : null })}\n />\n setQueryParams({ alertState: value ? value : null })}\n />\n {showClearButton && (\n \n )}\n
\n
\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n wrapper: css`\n border-bottom: 1px solid ${theme.colors.border.medium};\n margin-bottom: ${theme.spacing(3)};\n `,\n filterSection: css`\n display: flex;\n flex-direction: row;\n margin-bottom: ${theme.spacing(3)};\n `,\n filterInput: css`\n width: 340px;\n & + & {\n margin-left: ${theme.spacing(1)};\n }\n `,\n clearButton: css`\n margin-left: ${theme.spacing(1)};\n margin-top: 19px;\n `,\n});\n","import { css } from '@emotion/css';\nimport React, { useEffect } from 'react';\nimport { useDispatch } from 'react-redux';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Alert, LoadingPlaceholder, useStyles2 } from '@grafana/ui';\nimport { useQueryParams } from 'app/core/hooks/useQueryParams';\n\nimport { AlertingPageWrapper } from './components/AlertingPageWrapper';\nimport { NoAlertManagerWarning } from './components/NoAlertManagerWarning';\nimport { AlertGroup } from './components/alert-groups/AlertGroup';\nimport { AlertGroupFilter } from './components/alert-groups/AlertGroupFilter';\nimport { useAlertManagerSourceName } from './hooks/useAlertManagerSourceName';\nimport { useAlertManagersByPermission } from './hooks/useAlertManagerSources';\nimport { useFilteredAmGroups } from './hooks/useFilteredAmGroups';\nimport { useGroupedAlerts } from './hooks/useGroupedAlerts';\nimport { useUnifiedAlertingSelector } from './hooks/useUnifiedAlertingSelector';\nimport { fetchAlertGroupsAction } from './state/actions';\nimport { NOTIFICATIONS_POLL_INTERVAL_MS } from './utils/constants';\nimport { getFiltersFromUrlParams } from './utils/misc';\nimport { initialAsyncRequestState } from './utils/redux';\n\nconst AlertGroups = () => {\n const alertManagers = useAlertManagersByPermission('instance');\n const [alertManagerSourceName] = useAlertManagerSourceName(alertManagers);\n const dispatch = useDispatch();\n const [queryParams] = useQueryParams();\n const { groupBy = [] } = getFiltersFromUrlParams(queryParams);\n const styles = useStyles2(getStyles);\n\n const alertGroups = useUnifiedAlertingSelector((state) => state.amAlertGroups);\n const {\n loading,\n error,\n result: results = [],\n } = alertGroups[alertManagerSourceName || ''] ?? initialAsyncRequestState;\n\n const groupedAlerts = useGroupedAlerts(results, groupBy);\n const filteredAlertGroups = useFilteredAmGroups(groupedAlerts);\n\n useEffect(() => {\n function fetchNotifications() {\n if (alertManagerSourceName) {\n dispatch(fetchAlertGroupsAction(alertManagerSourceName));\n }\n }\n fetchNotifications();\n const interval = setInterval(fetchNotifications, NOTIFICATIONS_POLL_INTERVAL_MS);\n return () => {\n clearInterval(interval);\n };\n }, [dispatch, alertManagerSourceName]);\n\n if (!alertManagerSourceName) {\n return (\n \n \n \n );\n }\n\n return (\n \n \n {loading && }\n {error && !loading && (\n \n {error.message || 'Unknown error'}\n \n )}\n {results &&\n filteredAlertGroups.map((group, index) => {\n return (\n \n {((index === 1 && Object.keys(filteredAlertGroups[0].labels).length === 0) ||\n (index === 0 && Object.keys(group.labels).length > 0)) && (\n

Grouped by: {Object.keys(group.labels).join(', ')}

\n )}\n \n
\n );\n })}\n {results && !filteredAlertGroups.length &&

No results.

}\n
\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n groupingBanner: css`\n margin: ${theme.spacing(2, 0)};\n `,\n});\n\nexport default AlertGroups;\n","import { uniqBy } from 'lodash';\nimport { useMemo } from 'react';\n\nimport { Labels } from '@grafana/data';\nimport { AlertmanagerGroup } from 'app/plugins/datasource/alertmanager/types';\n\nexport const useGroupedAlerts = (groups: AlertmanagerGroup[], groupBy: string[]): AlertmanagerGroup[] => {\n return useMemo(() => {\n if (groupBy.length === 0) {\n const emptyGroupings = groups.filter((group) => Object.keys(group.labels).length === 0);\n if (emptyGroupings.length > 1) {\n // Merges multiple ungrouped grouping\n return groups.reduce((combinedGroups, group) => {\n if (Object.keys(group.labels).length === 0) {\n const noGroupingGroup = combinedGroups.find(({ labels }) => Object.keys(labels));\n if (!noGroupingGroup) {\n combinedGroups.push({ alerts: group.alerts, labels: {}, receiver: { name: 'NONE' } });\n } else {\n noGroupingGroup.alerts = uniqBy([...noGroupingGroup.alerts, ...group.alerts], 'labels');\n }\n } else {\n combinedGroups.push(group);\n }\n return combinedGroups;\n }, [] as AlertmanagerGroup[]);\n } else {\n return groups;\n }\n }\n const alerts = groups.flatMap(({ alerts }) => alerts);\n return alerts.reduce((groupings, alert) => {\n const alertContainsGroupings = groupBy.every((groupByLabel) => Object.keys(alert.labels).includes(groupByLabel));\n\n if (alertContainsGroupings) {\n const existingGrouping = groupings.find((group) => {\n return groupBy.every((groupKey) => {\n return group.labels[groupKey] === alert.labels[groupKey];\n });\n });\n if (!existingGrouping) {\n const labels = groupBy.reduce((acc, key) => {\n acc = { ...acc, [key]: alert.labels[key] };\n return acc;\n }, {} as Labels);\n groupings.push({\n alerts: [alert],\n labels,\n receiver: {\n name: 'NONE',\n },\n });\n } else {\n existingGrouping.alerts.push(alert);\n }\n } else {\n const noGroupingGroup = groupings.find((group) => Object.keys(group.labels).length === 0);\n if (!noGroupingGroup) {\n groupings.push({ alerts: [alert], labels: {}, receiver: { name: 'NONE' } });\n } else {\n noGroupingGroup.alerts.push(alert);\n }\n }\n\n return groupings;\n }, [] as AlertmanagerGroup[]);\n }, [groups, groupBy]);\n};\n","import { useMemo } from 'react';\n\nimport { useQueryParams } from 'app/core/hooks/useQueryParams';\nimport { AlertmanagerGroup } from 'app/plugins/datasource/alertmanager/types';\n\nimport { labelsMatchMatchers, parseMatchers } from '../utils/alertmanager';\nimport { getFiltersFromUrlParams } from '../utils/misc';\n\nexport const useFilteredAmGroups = (groups: AlertmanagerGroup[]) => {\n const [queryParams] = useQueryParams();\n const filters = getFiltersFromUrlParams(queryParams);\n const matchers = parseMatchers(filters.queryString || '');\n\n return useMemo(() => {\n return groups.reduce((filteredGroup: AlertmanagerGroup[], group) => {\n const alerts = group.alerts.filter(({ labels, status }) => {\n const labelsMatch = labelsMatchMatchers(labels, matchers);\n const filtersMatch = filters.alertState ? status.state === filters.alertState : true;\n return labelsMatch && filtersMatch;\n });\n if (alerts.length > 0) {\n // The ungrouped alerts should be first in the results\n if (Object.keys(group.labels).length === 0) {\n filteredGroup.unshift({ ...group, alerts });\n } else {\n filteredGroup.push({ ...group, alerts });\n }\n }\n return filteredGroup;\n }, []);\n }, [groups, filters, matchers]);\n};\n","import React, { FC } from 'react';\nimport { useSelector } from 'react-redux';\n\nimport Page from 'app/core/components/Page/Page';\nimport { getNavModel } from 'app/core/selectors/navModel';\nimport { StoreState } from 'app/types/store';\n\ninterface Props {\n pageId: string;\n isLoading?: boolean;\n}\n\nexport const AlertingPageWrapper: FC = ({ children, pageId, isLoading }) => {\n const navModel = getNavModel(\n useSelector((state: StoreState) => state.navIndex),\n pageId\n );\n\n return (\n \n {children}\n \n );\n};\n","import React, { FC } from 'react';\n\nimport { contextSrv } from 'app/core/services/context_srv';\nimport { AccessControlAction } from 'app/types';\n\ntype Props = {\n actions: AccessControlAction[];\n fallback?: boolean;\n};\n\nexport const Authorize: FC = ({ actions, children, fallback = true }) => {\n if (actions.some((action) => contextSrv.hasAccess(action, fallback))) {\n return <>{children};\n } else {\n return null;\n }\n};\n","import { css, cx } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\n\nimport { DynamicTable, DynamicTableProps } from './DynamicTable';\n\nexport type DynamicTableWithGuidelinesProps = Omit, 'renderPrefixHeader, renderPrefixCell'>;\n\n// DynamicTable, but renders visual guidelines on the left, for larger screen widths\nexport const DynamicTableWithGuidelines = ({\n renderExpandedContent,\n ...props\n}: DynamicTableWithGuidelinesProps) => {\n const styles = useStyles2(getStyles);\n return (\n (\n <>\n {!(index === items.length - 1) &&
}\n {renderExpandedContent(item, index, items)}\n \n )\n : undefined\n }\n renderPrefixHeader={() => (\n
\n
\n
\n )}\n renderPrefixCell={(_, index, items) => (\n
\n
\n {!(index === items.length - 1) &&
}\n
\n )}\n {...props}\n />\n );\n};\n\nexport const getStyles = (theme: GrafanaTheme2) => ({\n relative: css`\n position: relative;\n height: 100%;\n `,\n guideline: css`\n left: -19px;\n border-left: 1px solid ${theme.colors.border.medium};\n position: absolute;\n\n ${theme.breakpoints.down('md')} {\n display: none;\n }\n `,\n topGuideline: css`\n width: 18px;\n border-bottom: 1px solid ${theme.colors.border.medium};\n top: 0;\n bottom: 50%;\n `,\n bottomGuideline: css`\n top: 50%;\n bottom: 0;\n `,\n contentGuideline: css`\n top: 0;\n bottom: 0;\n left: -49px !important;\n `,\n headerGuideline: css`\n top: -25px;\n bottom: 0;\n `,\n});\n","import React from 'react';\n\nimport { Alert } from '@grafana/ui';\n\nimport { useAlertManagerSourceName } from '../hooks/useAlertManagerSourceName';\nimport { AlertManagerDataSource } from '../utils/datasource';\n\nimport { AlertManagerPicker } from './AlertManagerPicker';\n\ninterface Props {\n availableAlertManagers: AlertManagerDataSource[];\n}\n\nconst NoAlertManagersAvailable = () => (\n \n We could not find any external Alertmanagers and you may not have access to the built-in Grafana Alertmanager.\n \n);\n\nconst OtherAlertManagersAvailable = () => (\n \n Selected Alertmanager no longer exists or you may not have permission to access it.\n \n);\n\nexport const NoAlertManagerWarning = ({ availableAlertManagers }: Props) => {\n const [_, setAlertManagerSourceName] = useAlertManagerSourceName(availableAlertManagers);\n const hasOtherAMs = availableAlertManagers.length > 0;\n\n return (\n
\n {hasOtherAMs ? (\n <>\n \n \n \n ) : (\n \n )}\n
\n );\n};\n","import { css } from '@emotion/css';\nimport React, { FormEvent } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Stack } from '@grafana/experimental';\nimport { Label, Tooltip, Input, Icon, useStyles2 } from '@grafana/ui';\n\ninterface Props {\n className?: string;\n queryString?: string;\n defaultQueryString?: string;\n onFilterChange: (filterString: string) => void;\n}\n\nexport const MatcherFilter = ({ className, onFilterChange, defaultQueryString, queryString }: Props) => {\n const styles = useStyles2(getStyles);\n const handleSearchChange = (e: FormEvent) => {\n const target = e.target as HTMLInputElement;\n onFilterChange(target.value);\n };\n const searchIcon = ;\n return (\n
\n
\n }\n >\n \n \n \n \n \n
\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n icon: css`\n margin-right: ${theme.spacing(0.5)};\n `,\n inputWidth: css`\n width: 340px;\n flex-grow: 0;\n `,\n});\n","import React, { FC } from 'react';\n\nimport { AlertState } from 'app/plugins/datasource/alertmanager/types';\n\nimport { State, StateTag } from '../StateTag';\n\nconst alertStateToState: Record = {\n [AlertState.Active]: 'bad',\n [AlertState.Unprocessed]: 'neutral',\n [AlertState.Suppressed]: 'info',\n};\n\ninterface Props {\n state: AlertState;\n}\n\nexport const AmAlertStateTag: FC = ({ state }) => {state};\n","import { useCallback } from 'react';\n\nimport { useQueryParams } from 'app/core/hooks/useQueryParams';\nimport store from 'app/core/store';\n\nimport { ALERTMANAGER_NAME_LOCAL_STORAGE_KEY, ALERTMANAGER_NAME_QUERY_KEY } from '../utils/constants';\nimport { AlertManagerDataSource, GRAFANA_RULES_SOURCE_NAME } from '../utils/datasource';\n\nfunction useIsAlertManagerAvailable(availableAlertManagers: AlertManagerDataSource[]) {\n return useCallback(\n (alertManagerName: string) => {\n const availableAlertManagersNames = availableAlertManagers.map((am) => am.name);\n return availableAlertManagersNames.includes(alertManagerName);\n },\n [availableAlertManagers]\n );\n}\n\n/* This will return am name either from query params or from local storage or a default (grafana).\n * Due to RBAC permissions Grafana Managed Alert manager or external alert managers may not be available\n * In the worst case neihter GMA nor external alert manager is available\n */\nexport function useAlertManagerSourceName(\n availableAlertManagers: AlertManagerDataSource[]\n): [string | undefined, (alertManagerSourceName: string) => void] {\n const [queryParams, updateQueryParams] = useQueryParams();\n const isAlertManagerAvailable = useIsAlertManagerAvailable(availableAlertManagers);\n\n const update = useCallback(\n (alertManagerSourceName: string) => {\n if (!isAlertManagerAvailable(alertManagerSourceName)) {\n return;\n }\n if (alertManagerSourceName === GRAFANA_RULES_SOURCE_NAME) {\n store.delete(ALERTMANAGER_NAME_LOCAL_STORAGE_KEY);\n updateQueryParams({ [ALERTMANAGER_NAME_QUERY_KEY]: null });\n } else {\n store.set(ALERTMANAGER_NAME_LOCAL_STORAGE_KEY, alertManagerSourceName);\n updateQueryParams({ [ALERTMANAGER_NAME_QUERY_KEY]: alertManagerSourceName });\n }\n },\n [updateQueryParams, isAlertManagerAvailable]\n );\n\n const querySource = queryParams[ALERTMANAGER_NAME_QUERY_KEY];\n\n if (querySource && typeof querySource === 'string') {\n if (isAlertManagerAvailable(querySource)) {\n return [querySource, update];\n } else {\n // non existing alertmanager\n return [undefined, update];\n }\n }\n\n const storeSource = store.get(ALERTMANAGER_NAME_LOCAL_STORAGE_KEY);\n if (storeSource && typeof storeSource === 'string' && isAlertManagerAvailable(storeSource)) {\n update(storeSource);\n return [storeSource, update];\n }\n\n if (isAlertManagerAvailable(GRAFANA_RULES_SOURCE_NAME)) {\n return [GRAFANA_RULES_SOURCE_NAME, update];\n }\n\n return [undefined, update];\n}\n","import { useMemo } from 'react';\n\nimport { getAlertManagerDataSourcesByPermission } from '../utils/datasource';\n\nexport function useAlertManagersByPermission(accessType: 'instance' | 'notification') {\n return useMemo(() => getAlertManagerDataSourcesByPermission(accessType), [accessType]);\n}\n"],"names":["AlertDetails","alert","alertManagerSourceName","styles","useStyles2","getStyles","instancePermissions","getInstancesPermissions","isSeeSourceButtonEnabled","isGrafanaRulesSource","contextSrv","AccessControlAction","className","actionsRow","Authorize","actions","update","create","fallback","status","state","AlertState","LinkButton","href","makeAMLink","silencedBy","join","button","icon","size","makeLabelBasedSilenceLink","labels","generatorURL","Object","entries","annotations","map","annotationKey","annotationValue","AnnotationDetailsField","value","receivers","name","filter","theme","css","spacing","colors","border","medium","AlertGroupAlertsTable","alerts","columns","useMemo","id","label","renderCell","data","AmAlertStateTag","duration","intervalToAbbreviatedDurationString","start","Date","startsAt","end","endsAt","AlertLabels","items","fingerprint","tableWrapper","DynamicTableWithGuidelines","cols","isExpandable","renderExpandedContent","breakpoints","up","typography","bodySmall","fontSize","AlertGroup","group","isCollapsed","setIsCollapsed","useState","wrapper","header","CollapseToggle","onToggle","keys","length","headerLabels","AlertGroupHeader","background","secondary","summary","spanElement","error","main","primary","AlertStateFilter","onStateFilterChange","stateFilter","alertStateOptions","sort","labelA","labelB","Label","RadioButtonGroup","options","onChange","GroupBy","groups","groupBy","onGroupingChange","labelKeyOptions","uniq","flatMap","startsWith","endsWith","key","MultiSelect","placeholder","prefix","Icon","AlertGroupFilter","filterKey","setFilterKey","Math","floor","random","queryParams","setQueryParams","useQueryParams","queryString","alertState","getFiltersFromUrlParams","matcherFilterKey","alertManagers","useAlertManagersByPermission","setAlertManagerSourceName","useAlertManagerSourceName","showClearButton","AlertManagerPicker","current","dataSources","filterSection","MatcherFilter","filterInput","defaultQueryString","onFilterChange","Button","clearButton","variant","onClick","setTimeout","groupingBanner","dispatch","useDispatch","alertGroups","useUnifiedAlertingSelector","amAlertGroups","loading","result","results","initialAsyncRequestState","groupedAlerts","reduce","combinedGroups","noGroupingGroup","find","uniqBy","push","receiver","groupings","every","groupByLabel","includes","existingGrouping","groupKey","acc","useGroupedAlerts","filteredAlertGroups","filters","matchers","parseMatchers","filteredGroup","labelsMatch","labelsMatchMatchers","filtersMatch","unshift","useFilteredAmGroups","useEffect","fetchNotifications","fetchAlertGroupsAction","interval","setInterval","NOTIFICATIONS_POLL_INTERVAL_MS","clearInterval","AlertingPageWrapper","pageId","LoadingPlaceholder","text","Alert","title","severity","message","index","JSON","stringify","NoAlertManagerWarning","availableAlertManagers","children","isLoading","navModel","getNavModel","useSelector","navIndex","some","action","props","item","cx","contentGuideline","guideline","undefined","renderPrefixHeader","relative","headerGuideline","renderPrefixCell","_","topGuideline","bottomGuideline","down","NoAlertManagersAvailable","OtherAlertManagersAvailable","hasOtherAMs","searchIcon","Stack","gap","Tooltip","content","Input","defaultValue","e","target","inputWidth","alertStateToState","updateQueryParams","isAlertManagerAvailable","useCallback","alertManagerName","am","useIsAlertManagerAvailable","GRAFANA_RULES_SOURCE_NAME","store","ALERTMANAGER_NAME_LOCAL_STORAGE_KEY","ALERTMANAGER_NAME_QUERY_KEY","querySource","storeSource","accessType","getAlertManagerDataSourcesByPermission"],"sourceRoot":""}