View File Name : 1660.e1f66118fb028d12074f.js.map
}\n title={\n
\n \n {title}\n \n }\n footer={\n externalLink ? (\n
\n \n \n {linkText} \n \n \n \n ) : undefined\n }\n closeButton={true}\n placement=\"bottom-start\"\n >\n
\n \n \n \n Need help?\n \n \n
\n \n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n mutedText: css`\n color: ${theme.colors.text.secondary};\n font-size: ${theme.typography.size.sm};\n `,\n helpInfo: css`\n cursor: pointer;\n text-decoration: underline;\n `,\n});\n","import { css, cx } from '@emotion/css';\nimport React, { ReactElement } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { FieldSet, Text, useStyles2, Stack } from '@grafana/ui';\n\nexport interface RuleEditorSectionProps {\n title: string;\n stepNo: number;\n description?: string | ReactElement;\n fullWidth?: boolean;\n}\n\nexport const RuleEditorSection = ({\n title,\n stepNo,\n children,\n fullWidth = false,\n description,\n}: React.PropsWithChildren
) => {\n const styles = useStyles2(getStyles);\n\n return (\n \n
\n
\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n parent: css`\n display: flex;\n flex-direction: row;\n max-width: ${theme.breakpoints.values.xl}px;\n border: solid 1px ${theme.colors.border.weak};\n border-radius: ${theme.shape.radius.default};\n padding: ${theme.spacing(2)} ${theme.spacing(3)};\n `,\n description: css`\n margin-top: -${theme.spacing(2)};\n `,\n fullWidth: css`\n width: 100%;\n `,\n});\n","import { SerializedError } from '@reduxjs/toolkit';\n\nimport { alertmanagerApi } from '../api/alertmanagerApi';\n\ntype Options = {\n refetchOnFocus: boolean;\n refetchOnReconnect: boolean;\n};\n\n// TODO refactor this so we can just call \"alertmanagerApi.endpoints.getAlertmanagerConfiguration\" everywhere\n// and remove this hook since it adds little value\nexport function useAlertmanagerConfig(amSourceName?: string, options?: Options) {\n const fetchConfig = alertmanagerApi.endpoints.getAlertmanagerConfiguration.useQuery(amSourceName ?? '', {\n ...options,\n skip: !amSourceName,\n });\n\n return {\n ...fetchConfig,\n // TODO refactor to get rid of this type assertion\n error: fetchConfig.error as SerializedError,\n };\n}\n"],"names":["useCleanup","cleanupAction","dispatch","selectorRef","CustomAnnotationHeaderField","field","styles","getStyles","Input","theme","annotationField","annotations","annotation","index","control","Stack","InputControl","ref","label","Text","DashboardAnnotationField","dashboard","panel","dashboardUid","panelId","onEditClick","onDeleteClick","dashboardLink","panelLink","Icon","dashboardApi","alertingApi","build","query","params","uid","convertToDashboardModel","dashboardDTO","meta","useDashboardQuery","currentData","data","rest","panelSort","a","b","DashboardPicker","isOpen","onChange","onDismiss","getPickerStyles","selectedDashboardUid","setSelectedDashboardUid","selectedPanelId","setSelectedPanelId","dashboardFilter","setDashboardFilter","debouncedDashboardFilter","setDebouncedDashboardFilter","panelFilter","setPanelFilter","useSearchQuery","filteredDashboards","isDashSearchFetching","dashboardModel","isDashboardFetching","handleDashboardChange","allDashboardPanels","getVisualPanels","filteredPanels","currentPanel","isValidPanel","selectedDashboardIndex","isDefaultSelection","selectedDashboardIsInPageResult","scrollToItem","node","canScroll","useDebounce","DashboardRow","style","isSelected","PanelRow","panelTitle","isAlertingCompatible","disabled","Tooltip","Modal","Alert","FilterInput","LoadingPlaceholder","height","width","Button","panelsWithoutRows","panelsNestedInRows","rowPanel","collapsedRow","hasValidID","isValidPanelType","isLibraryPanel","clearButton","AnnotationsStep","showPanelSelector","setShowPanelSelector","useToggle","register","watch","errors","setValue","fields","append","remove","selectedDashboard","setSelectedDashboard","selectedPanel","setSelectedPanel","setSelectedDashboardAndPanelId","updatedAnnotations","draft","dashboardAnnotation","panelAnnotation","handleDeleteDashboardAnnotation","handleEditDashboardAnnotation","getAnnotationsSectionDescription","docsLink","NeedHelpInfo","RuleEditorSection","isUrl","ValueInputComponent","TextArea","Field","_customFilter","customFilter","opt","searchQuery","handleIsValidNewOption","inputValue","value","options","exactValueExists","el","valueIsNotEmpty","defaultValue","type","onOpenMenu","Select","useGetCustomLabels","dataSourceName","rulerRequest","useUnifiedAlertingSelector","state","labelsByKeyResult","labelsByKey","rulerRulesConfig","groups","group","rule","key","labelEntry","mapLabelsToOptions","items","item","RemoveButton","className","AddButton","LabelsWithSuggestions","labels","loading","selectedKey","setSelectedKey","keys","getValuesForLabel","values","newValue","InlineLabel","LabelsWithoutSuggestions","LabelsField","contentText","externalLink","linkText","title","stepNo","children","fullWidth","description","useAlertmanagerConfig","amSourceName","fetchConfig"],"sourceRoot":""}