All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.ShowViewPage.75b5bca6e699a5d7e0af.js.map Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
{"version":3,"file":"ShowViewPage.75b5bca6e699a5d7e0af.js","mappings":"0fAwBA,QAF4B,CAAC,CAAE,KAAAA,CAAK,IAAa,gBAAC,SAAE,MAAIA,EAAK,YAAY,EAAE,WAAS,ECW9EC,EAAO,UAAO;AAAA;AAAA;AAAA,EAKdC,EAAY,UAAO;AAAA;AAAA;AAAA;AAAA,EAMnBC,EAAiB,UAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAOxBC,EAAuB,OAAMC,EAAA,GAAe,GAAuB,EAiFzE,EA/E8B,IAAM,CAClC,MAAMC,KAAWC,EAAA,GAAe,EAC1B,CAAE,aAAAC,CAAa,KAAIC,EAAA,GAA+B,EAClDC,EAAoBN,EAAqB,EAEzCO,KAAkB,WAAQ,IAAM,IAAI,IAAIH,EAAa,IAAKI,GAAQ,CACtE,GAAGA,EAAI,QAAQ,GAAGA,EAAI,IAAI,GAAGA,EAAI,KAAK,GAAIA,CAC5C,CAAC,CAAC,EAAG,CAACJ,CAAY,CAAC,EAEbK,KAAc,eAAY,CAAC,CAAE,KAAAC,EAAM,SAAAC,EAAU,UAAAC,CAAU,IAAM,CACjE,GAAIF,EACFR,KAAS,MAAuBQ,EAAM,CAAE,MAAO,KAAY,OAAOC,CAAQ,CAAE,CAAC,CAAC,MACzE,CACL,KAAM,CAAE,MAAAE,EAAO,SAAAC,EAAU,KAAAC,CAAK,EAAIR,EAAgB,IAAIK,CAAS,EAE/DV,KAAS,MAAwB,CAC/B,CACE,MAAAW,EACA,MAAOC,EACP,SAAO,KAAY,EACnB,UAAW,IAAsBC,CAAI,CACvC,CACF,CAAC,CAAC,CACJ,CACF,EAAG,CAACR,EAAiBL,CAAQ,CAAC,EAExBc,KAA0B,WAAuC,IAAM,CAC3E,MAAMC,EAAU,IAAI,IAA8Bb,EAAa,I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CAAa,KAAIC,EAAA,GAA+B,EAC9EmG,KAAQ,MAAsB,CAAE,UAAA/D,EAAW,gBAAAd,EAAiB,aAAAvB,CAAa,CAAC,EAC1EqJ,KAAOI,EAAA,GAAgBrD,CAAK,EAElC,OACE,gBAACsD,EAAA,GAAW,KAAAL,EACA,MAAK,GACL,qBAAsB,CACpB,YAAaM,EAAA,CACf,EAAG,CAEnB,EAEanF,EAAkByB,GAAU,CACnCA,EAAM,SAAW,KACnB2D,EAAA,EAAc,UAAO,MAAqB3D,CAAK,CAAC,CAEpD,EAiBA,EAf8B,IAAM,CAClC,KAAM,CAAC4D,EAAsBC,CAAuB,KAAI,YAAS,EAAK,EAChE,CAAE,QAAAS,CAAQ,KAAIR,EAAA,GAAgC,EAC9C,CAAE,KAAM1H,EAAW,UAAWmI,EAAgB,UAAWC,CAAe,EAAI,EAAaF,EAAS,CAAE,eAAA/F,CAAe,CAAC,EACpH,CAAE,UAAWwF,EAAa,UAAWC,CAAY,KAAIC,EAAA,GAAmB7H,GAAA,YAAAA,EAAW,mBAAmB,EAE5G,sBAAU,IAAM,CACd,IAA0B,QAAQ,EAAE,KAAK,IAAMyH,EAAwB,EAAI,CAAC,CAC9E,EAAG,CAACA,CAAuB,CAAC,EAEVU,GAAkBR,GAAe,CAACS,GAAkB,CAACR,GAAe,CAACJ,EAEpE,gBAAC,KAAO,IAAC,EAAK,gBAACL,EAAA,IAAU,CAC9C,C","sources":["webpack://graylog-web-interface/./src/components/event-definitions/replay-search/NoAttributeProvided.tsx","webpack://graylog-web-interface/./src/components/event-definitions/replay-search/AggreagtionConditions.tsx","webpack://graylog-web-interface/./src/components/event-definitions/replay-search/Notifications.tsx","webpack://graylog-web-interface/./src/components/event-definitions/replay-search/hooks/useAttributeComponents.tsx","webpack://graylog-web-interface/./src/components/event-definitions/replay-search/EventInfoBar.tsx","webpack://graylog-web-interface/./src/hooks/useEventDefinition.tsx","webpack://graylog-web-interface/./src/logic/alerts/EventDefinitionPriorityEnum.js","webpack://graylog-web-interface/./src/stores/event-notifications/EventNotificationsStore.ts","webpack://graylog-web-interface/./src/views/hooks/useCreateSearch.tsx","webpack://graylog-web-interface/./src/views/logic/ExpressionConditionMappers.tsx","webpack://graylog-web-interface/./src/views/logic/views/UseCreateViewForEvent.ts","webpack://graylog-web-interface/./src/views/logic/views/UseCreateViewForEventDefinition.ts","webpack://graylog-web-interface/./src/views/pages/EventDefinitionReplaySearchPage.tsx","webpack://graylog-web-interface/./src/hooks/useEventById.tsx","webpack://graylog-web-interface/./src/views/pages/EventReplaySearchPage.tsx"],"sourcesContent":["/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport React from 'react';\n\ntype Props = {\n  name: string\n}\n\nconst NoAttributeProvided = ({ name }: Props) => No {name.toLowerCase()} provided;\n\nexport default NoAttributeProvided;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport styled from 'styled-components';\nimport { useMemo, useCallback } from 'react';\n\nimport { StaticColor } from 'views/logic/views/formatting/highlighting/HighlightingColor';\nimport { ColorPickerPopover, Icon } from 'components/common';\nimport { DEFAULT_CUSTOM_HIGHLIGHT_RANGE } from 'views/Constants';\nimport type HighlightingRule from 'views/logic/views/formatting/highlighting/HighlightingRule';\nimport { conditionToExprMapper, exprToConditionMapper } from 'views/logic/ExpressionConditionMappers';\nimport useAppSelector from 'stores/useAppSelector';\nimport { selectHighlightingRules } from 'views/logic/slices/highlightSelectors';\nimport useAlertAndEventDefinitionData from 'hooks/useAlertAndEventDefinitionData';\nimport { updateHighlightingRule, createHighlightingRules } from 'views/logic/slices/highlightActions';\nimport { randomColor } from 'views/logic/views/formatting/highlighting/HighlightingRule';\nimport useAppDispatch from 'stores/useAppDispatch';\nimport NoAttributeProvided from 'components/event-definitions/replay-search/NoAttributeProvided';\n\nconst List = styled.div`\n  display: flex;\n  gap: 5px;\n`;\n\nconst Condition = styled.div`\n  display: flex;\n  gap: 5px;\n  align-items: center;\n`;\n\nconst ColorComponent = styled.div`\n  width: 13px;\n  height: 13px;\n  border-radius: 2px;\n  cursor: pointer;\n`;\n\nconst useHighlightingRules = () => useAppSelector(selectHighlightingRules);\n\nconst AggregationConditions = () => {\n  const dispatch = useAppDispatch();\n  const { aggregations } = useAlertAndEventDefinitionData();\n  const highlightingRules = useHighlightingRules();\n\n  const aggregationsMap = useMemo(() => new Map(aggregations.map((agg) => [\n    `${agg.fnSeries}${agg.expr}${agg.value}`, agg,\n  ])), [aggregations]);\n\n  const changeColor = useCallback(({ rule, newColor, condition }) => {\n    if (rule) {\n      dispatch(updateHighlightingRule(rule, { color: StaticColor.create(newColor) }));\n    } else {\n      const { value, fnSeries, expr } = aggregationsMap.get(condition);\n\n      dispatch(createHighlightingRules([\n        {\n          value,\n          field: fnSeries,\n          color: randomColor(),\n          condition: exprToConditionMapper[expr],\n        },\n      ]));\n    }\n  }, [aggregationsMap, dispatch]);\n\n  const highlightedAggregations = useMemo>(() => {\n    const initial = new Map(aggregations.map(\n      ({ fnSeries, value, expr }) => [\n        `${fnSeries}${expr}${value}`, undefined,\n      ],\n    ));\n\n    return highlightingRules.reduce((acc, rule) => {\n      const { field, value, condition } = rule;\n      const expr = conditionToExprMapper?.[condition];\n      let result = acc;\n\n      if (expr) {\n        const key = `${field}${expr}${value}`;\n\n        if (acc.has(key)) {\n          result = result.set(key, rule);\n        }\n      }\n\n      return result;\n    }, initial);\n  }, [aggregations, highlightingRules]);\n\n  return highlightedAggregations?.size ? (\n    \n      {Array.from(highlightedAggregations).map(([condition, rule]) => {\n        const color = rule?.color as StaticColor;\n        const hexColor = color?.color;\n\n        return (\n          \n             [c])}\n                                triggerNode={(\n                                  \n                                    {!hexColor && }\n                                  \n                                )}\n                                onChange={(newColor, _, hidePopover) => {\n                                  hidePopover();\n                                  changeColor({ newColor, rule, condition });\n                                }} />\n            {condition}\n          \n        );\n      })}\n    \n  ) : ;\n};\n\nexport default AggregationConditions;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { useMemo } from 'react';\n\nimport { Link } from 'components/common/router';\nimport Routes from 'routing/Routes';\nimport { useStore } from 'stores/connect';\nimport { EventNotificationsStore } from 'stores/event-notifications/EventNotificationsStore';\nimport useAlertAndEventDefinitionData from 'hooks/useAlertAndEventDefinitionData';\nimport NoAttributeProvided from 'components/event-definitions/replay-search/NoAttributeProvided';\n\nconst Notifications = () => {\n  const { eventDefinition } = useAlertAndEventDefinitionData();\n\n  const allNotifications = useStore(EventNotificationsStore, ({ all }) => all.reduce((res, cur) => {\n    res[cur.id] = cur;\n\n    return res;\n  }, {}));\n\n  const notificationList = useMemo(() => eventDefinition.notifications.reduce((res, cur) => {\n    if (allNotifications[cur.notification_id]) {\n      res.push((allNotifications[cur.notification_id]));\n    }\n\n    return res;\n  }, []), [eventDefinition, allNotifications]);\n\n  return notificationList.length ? (\n    <>\n      {notificationList.map(({ id, title }, index) => {\n        const prefix = index > 0 ? ', ' : '';\n\n        return (\n          \n            {prefix}\n            {title}\n          \n        );\n      })}\n    \n  ) : ;\n};\n\nexport default Notifications;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport React, { useMemo } from 'react';\nimport moment from 'moment/moment';\nimport styled, { css } from 'styled-components';\nimport upperFirst from 'lodash/upperFirst';\n\nimport { TIME_UNITS } from 'components/event-definitions/event-definition-types/FilterForm';\nimport EventDefinitionPriorityEnum from 'logic/alerts/EventDefinitionPriorityEnum';\nimport useAlertAndEventDefinitionData from 'hooks/useAlertAndEventDefinitionData';\nimport { extractDurationAndUnit } from 'components/common/TimeUnitInput';\nimport { Timestamp, HoverForHelp } from 'components/common';\nimport { Link } from 'components/common/router';\nimport Routes from 'routing/Routes';\n\nimport AggregationConditions from '../AggreagtionConditions';\nimport Notifications from '../Notifications';\n\nconst AlertTimestamp = styled(Timestamp)(({ theme }) => css`\n  color: ${theme.colors.variant.darker.warning};\n`);\n\nconst useAttributeComponents = () => {\n  const { eventData, eventDefinition, isEventDefinition } = useAlertAndEventDefinitionData();\n\n  return useMemo(() => {\n    if (!eventDefinition) {\n      return [\n        { title: 'Timestamp', content: , show: !isEventDefinition },\n      ];\n    }\n\n    const searchWithin = extractDurationAndUnit(eventDefinition.config.search_within_ms, TIME_UNITS);\n    const executeEvery = extractDurationAndUnit(eventDefinition.config.execute_every_ms, TIME_UNITS);\n    const isEDUpdatedAfterEvent = !isEventDefinition && moment(eventDefinition.updated_at).diff(eventData.timestamp) > 0;\n\n    return [\n      { title: 'Timestamp', content: , show: !isEventDefinition },\n      {\n        title: 'Event definition updated at',\n        content: (\n          <>\n            \n            \n              Event definition {eventDefinition.title} was edited after this event happened.\n              Some of aggregations widgets might not be representative for this event.\n            \n          \n        ),\n        show: isEDUpdatedAfterEvent,\n      },\n      {\n        title: 'Event definition',\n        content: (\n          \n            {eventDefinition.title}\n          \n        ),\n        show: !isEventDefinition,\n      },\n      {\n        title: 'Priority',\n        content: upperFirst(EventDefinitionPriorityEnum.properties[eventDefinition.priority].name),\n      },\n      { title: 'Execute search every', content: executeEvery?.duration && executeEvery?.unit && `${executeEvery.duration} ${executeEvery.unit.toLowerCase()}` },\n      { title: 'Search within', content: searchWithin?.duration && searchWithin?.unit && `${searchWithin.duration} ${searchWithin.unit.toLowerCase()}` },\n      { title: 'Description', content: eventDefinition.description },\n      {\n        title: 'Notifications',\n        content: ,\n      },\n      {\n        title: 'Aggregation conditions',\n        content: ,\n      },\n    ];\n  }, [\n    eventData?.timestamp,\n    eventDefinition,\n    isEventDefinition,\n  ]);\n};\n\nexport default useAttributeComponents;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\n\nimport type { SyntheticEvent } from 'react';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport styled from 'styled-components';\n\nimport { Button } from 'components/bootstrap';\nimport { FlatContentRow, Icon } from 'components/common';\nimport useAlertAndEventDefinitionData from 'hooks/useAlertAndEventDefinitionData';\nimport useAttributeComponents from 'components/event-definitions/replay-search/hooks/useAttributeComponents';\nimport NoAttributeProvided from 'components/event-definitions/replay-search/NoAttributeProvided';\n\nconst Header = styled.div`\n  display: flex;\n  align-items: center;\n  user-select: none;\n  gap: 5px;\n`;\n\nconst Item = styled.div`\n  display: flex;\n  gap: 5px;\n  align-items: flex-end;\n`;\n\nconst Container = styled.div`\n  display: flex;\n  flex-direction: column;\n  gap: 5px;\n`;\n\nconst Row = styled.div`\n  display: flex;\n  gap: 8px;\n  flex-wrap: wrap;\n`;\n\nconst Value = styled.div`\n  display: flex;\n`;\n\nconst EventInfoBar = () => {\n  const { isEventDefinition, isEvent, isAlert } = useAlertAndEventDefinitionData();\n  const [open, setOpen] = useState(true);\n\n  const toggleOpen = useCallback((e: SyntheticEvent) => {\n    e.stopPropagation();\n    setOpen((cur) => !cur);\n  }, []);\n\n  const infoAttributes = useAttributeComponents();\n\n  const currentTypeText = useMemo(() => {\n    if (isEventDefinition) return 'event definition';\n    if (isAlert) return 'alert';\n    if (isEvent) return 'event';\n\n    return '';\n  }, [isAlert, isEvent, isEventDefinition]);\n\n  return (\n    \n      
\n \n
\n {open && (\n \n \n {infoAttributes.map(({ title, content, show }) => (show !== false) && (\n \n {title}: \n {content || }\n \n ))}\n \n \n )}\n
\n );\n};\n\nexport default EventInfoBar;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport { useQuery } from '@tanstack/react-query';\nimport uniqWith from 'lodash/uniqWith';\nimport isEqual from 'lodash/isEqual';\n\nimport UserNotification from 'util/UserNotification';\nimport fetch from 'logic/rest/FetchProvider';\nimport { qualifyUrl } from 'util/URLUtils';\nimport type { EventDefinition } from 'logic/alerts/types';\nimport type FetchError from 'logic/errors/FetchError';\n\nexport type ValueExpr = '>' | '<' | '>=' | '<=' | '==';\n\nexport type EventDefinitionAggregation = {\n expr: ValueExpr,\n value: number,\n function: string,\n fnSeries: string,\n field?: string\n}\nexport const definitionsUrl = (definitionId: string) => qualifyUrl(`/events/definitions/${definitionId}`);\n\nconst transformExpressionsToArray = ({ series, conditions }): Array => {\n const res = [];\n\n const rec = (expression) => {\n if (!expression) {\n return 'No condition configured';\n }\n\n switch (expression.expr) {\n case 'number':\n return ({ value: expression.value });\n case 'number-ref':\n // eslint-disable-next-line no-case-declarations\n const numberRefSeries = series.find((s) => s.id === expression.ref);\n\n return (numberRefSeries?.type\n ? { field: `${numberRefSeries.type}(${numberRefSeries.field || ''})` }\n : null);\n case '&&':\n case '||':\n return [rec(expression.left), rec(expression.right)];\n case 'group':\n return [rec(expression.child)];\n case '<':\n case '<=':\n case '>':\n case '>=':\n case '==':\n // eslint-disable-next-line no-case-declarations\n const { ref } = expression.left;\n // eslint-disable-next-line no-case-declarations\n const selectedSeries = series.find((s) => s.id === ref);\n // eslint-disable-next-line no-case-declarations\n const fnSeries = selectedSeries?.type ? `${selectedSeries.type}(${selectedSeries.field || ''})` : undefined;\n res.push({ expr: expression.expr, value: expression.right.value, function: selectedSeries?.type, fnSeries, field: selectedSeries?.field });\n\n return [rec(expression.left), rec(expression.right)];\n default:\n return null;\n }\n };\n\n rec(conditions.expression);\n\n return res;\n};\n\nconst eventDefinitionDataMapper = (data: EventDefinition): { eventDefinition: EventDefinition, aggregations: Array} => ({\n eventDefinition: data,\n aggregations: (data?.config?.series && data?.config?.conditions)\n ? uniqWith(transformExpressionsToArray({ series: data.config.series, conditions: data.config.conditions }), isEqual)\n : [],\n});\n\nconst fetchDefinition = (definitionId: string) => fetch('GET', definitionsUrl(definitionId)).then(eventDefinitionDataMapper);\n\nconst useEventDefinition = (definitionId: string, { onErrorHandler }: { onErrorHandler?: (e: FetchError)=>void} = {}): {\n data: { eventDefinition: EventDefinition, aggregations: Array },\n refetch: () => void,\n isLoading: boolean,\n isFetched: boolean\n} => {\n const { data, refetch, isLoading, isFetched } = useQuery(\n ['event-definition-by-id', definitionId],\n () => fetchDefinition(definitionId),\n {\n onError: (errorThrown: FetchError) => {\n if (onErrorHandler) onErrorHandler(errorThrown);\n\n UserNotification.error(`Loading event definition failed with status: ${errorThrown}`,\n 'Could not load event definition');\n },\n keepPreviousData: true,\n enabled: !!definitionId,\n initialData: {\n eventDefinition: null,\n aggregations: [],\n },\n },\n );\n\n return ({\n data,\n refetch,\n isLoading,\n isFetched,\n });\n};\n\nexport default useEventDefinition;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nconst EventDefinitionPriorityEnum = {\n LOW: 1,\n NORMAL: 2,\n HIGH: 3,\n properties: {\n 1: { name: 'low' },\n 2: { name: 'normal' },\n 3: { name: 'high' },\n },\n};\n\nexport default EventDefinitionPriorityEnum;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport Reflux from 'reflux';\nimport URI from 'urijs';\nimport concat from 'lodash/concat';\n\nimport * as URLUtils from 'util/URLUtils';\nimport UserNotification from 'util/UserNotification';\nimport fetch from 'logic/rest/FetchProvider';\nimport { singletonStore, singletonActions } from 'logic/singleton';\nimport PaginationURL from 'util/PaginationURL';\n\nexport type TestResult = {\n isLoading: boolean,\n id?: string,\n error?: boolean,\n message?: string,\n};\nexport type TestResults ={\n [key: string]: TestResult\n};\nexport type EventNotification = {\n id: string,\n title: string,\n description: string,\n config: {\n type?: string\n },\n}\n\nexport type LegacyEventNotification = {\n name: string,\n configuration: {}\n}\n\ntype EventNotificationsActionsType = {\n listAll: () => Promise<{ notifications: Array }>,\n listAllLegacyTypes: () => Promise<{ types: { [key: string]: LegacyEventNotification } }>,\n listPaginated: () => Promise<{ notifications: Array }>,\n searchPaginated: () => Promise<{ elements: Array }>,\n get: (id: string) => Promise,\n create: (eventNotification: EventNotification) => Promise,\n update: (id: string, eventNotification: EventNotification) => Promise,\n delete: (eventNotification: EventNotification) => Promise,\n test: (eventNotification: EventNotification) => Promise,\n testPersisted: (eventNotification: EventNotification) => Promise,\n}\nexport const EventNotificationsActions = singletonActions(\n 'core.EventNotifications',\n () => Reflux.createActions({\n listAll: { asyncResult: true },\n listAllLegacyTypes: { asyncResult: true },\n listPaginated: { asyncResult: true },\n searchPaginated: { asyncResult: true },\n get: { asyncResult: true },\n create: { asyncResult: true },\n update: { asyncResult: true },\n delete: { asyncResult: true },\n test: { asyncResult: true },\n testPersisted: { asyncResult: true },\n }),\n);\n\ntype EventNotificationsStoreState = {\n all: Array,\n allLegacyTypes: { [key: string]: LegacyEventNotification },\n notifications: Array,\n query: string,\n pagination: {\n count: number,\n page: number,\n pageSize: number,\n total: number,\n grandTotal: number,\n }\n}\nexport const EventNotificationsStore = singletonStore(\n 'core.EventNotifications',\n () => Reflux.createStore({\n listenables: [EventNotificationsActions],\n sourceUrl: '/events/notifications',\n all: undefined,\n allLegacyTypes: undefined,\n notifications: undefined,\n query: undefined,\n pagination: {\n count: undefined,\n page: undefined,\n pageSize: undefined,\n total: undefined,\n grandTotal: undefined,\n },\n\n getInitialState() {\n return this.getState();\n },\n\n propagateChanges() {\n this.trigger(this.getState());\n },\n\n getState() {\n return {\n all: this.all,\n allLegacyTypes: this.allLegacyTypes,\n notifications: this.notifications,\n query: this.query,\n pagination: this.pagination,\n };\n },\n\n eventNotificationsUrl({ segments = [], query = {} }) {\n const uri = new URI(this.sourceUrl);\n const nextSegments = concat(uri.segment(), segments);\n\n uri.segmentCoded(nextSegments);\n uri.query(query);\n\n return URLUtils.qualifyUrl(uri.resource());\n },\n\n refresh() {\n if (this.all) {\n this.listAll();\n }\n\n if (this.pagination.page) {\n this.listPaginated({\n query: this.query,\n page: this.pagination.page,\n pageSize: this.pagination.pageSize,\n });\n }\n },\n\n listAll() {\n const promise = fetch('GET', this.eventNotificationsUrl({ query: { per_page: 0 } }));\n\n promise.then((response) => {\n this.all = response.notifications;\n this.propagateChanges();\n\n return response;\n });\n\n EventNotificationsActions.listAll.promise(promise);\n },\n\n listPaginated({ query = '', page = 1, pageSize = 10 }) {\n const promise = fetch('GET', this.eventNotificationsUrl({\n query: {\n query: query,\n page: page,\n per_page: pageSize,\n },\n }));\n\n promise.then((response) => {\n this.notifications = response.notifications;\n this.query = response.query;\n\n this.pagination = {\n count: response.count,\n page: response.page,\n pageSize: response.per_page,\n total: response.total,\n grandTotal: response.grand_total,\n };\n\n this.propagateChanges();\n\n return response;\n });\n\n EventNotificationsActions.listPaginated.promise(promise);\n },\n searchPaginated(newPage, newPerPage, newQuery, additional) {\n const url = PaginationURL(`${this.sourceUrl}/paginated`, newPage, newPerPage, newQuery, additional);\n\n const promise = fetch('GET', URLUtils.qualifyUrl(url))\n .then((response) => {\n const {\n elements,\n query,\n attributes,\n pagination: {\n count,\n total,\n page,\n per_page: perPage,\n },\n } = response;\n\n return {\n elements,\n attributes,\n pagination: {\n count,\n total,\n page,\n perPage,\n query,\n },\n };\n });\n\n EventNotificationsActions.searchPaginated.promise(promise);\n\n return promise;\n },\n get(notificationId) {\n const promise = fetch('GET', this.eventNotificationsUrl({ segments: [notificationId] }));\n\n promise.catch((error) => {\n if (error.status === 404) {\n UserNotification.error(`Unable to find Event Notification with id <${notificationId}>, please ensure it wasn't deleted.`,\n 'Could not retrieve Event Notification');\n }\n });\n\n EventNotificationsActions.get.promise(promise);\n },\n\n create(notification) {\n const promise = fetch('POST', this.eventNotificationsUrl({}), notification);\n\n promise.then(\n (response) => {\n UserNotification.success('Notification created successfully', `Notification \"${notification.title}\" was created successfully.`);\n this.refresh();\n\n return response;\n },\n (error) => {\n if (error.status !== 400 || !error.additional.body || !error.additional.body.failed) {\n UserNotification.error(`Creating Notification \"${notification.title}\" failed with status: ${error}`,\n 'Could not save Notification');\n }\n },\n );\n\n EventNotificationsActions.create.promise(promise);\n },\n\n update(notificationId, notification) {\n const promise = fetch('PUT', this.eventNotificationsUrl({ segments: [notificationId] }), notification);\n\n promise.then(\n (response) => {\n UserNotification.success('Notification updated successfully', `Notification \"${notification.title}\" was updated successfully.`);\n this.refresh();\n\n return response;\n },\n (error) => {\n if (error.status !== 400 || !error.additional.body || !error.additional.body.failed) {\n UserNotification.error(`Updating Notification \"${notification.title}\" failed with status: ${error}`,\n 'Could not update Notification');\n }\n },\n );\n\n EventNotificationsActions.update.promise(promise);\n },\n\n delete(notification) {\n const promise = fetch('DELETE', this.eventNotificationsUrl({ segments: [notification.id] }));\n\n promise.then(\n () => {\n UserNotification.success('Notification deleted successfully', `Notification \"${notification.title}\" was deleted successfully.`);\n this.refresh();\n },\n (error) => {\n UserNotification.error(`Deleting Notification \"${notification.title}\" failed with status: ${error}`,\n 'Could not delete Notification');\n },\n );\n\n EventNotificationsActions.delete.promise(promise);\n },\n\n test(notification) {\n const promise = fetch('POST', this.eventNotificationsUrl({ segments: ['test'] }), notification);\n\n EventNotificationsActions.test.promise(promise);\n },\n\n testPersisted(notification) {\n const promise = fetch('POST', this.eventNotificationsUrl({ segments: [notification.id, 'test'] }));\n\n EventNotificationsActions.testPersisted.promise(promise);\n },\n\n listAllLegacyTypes() {\n const promise = fetch('GET', this.eventNotificationsUrl({ segments: ['legacy', 'types'] }));\n\n promise.then((response) => {\n this.allLegacyTypes = response.types;\n this.propagateChanges();\n\n return response;\n });\n\n EventNotificationsActions.listAllLegacyTypes.promise(promise);\n },\n }),\n);\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport { useMemo } from 'react';\n\nimport createSearch from 'views/logic/slices/createSearch';\nimport type View from 'views/logic/views/View';\n\nconst useCreateSearch = (viewPromise: Promise) => useMemo(() => viewPromise.then(async (_view) => {\n await createSearch(_view.search);\n\n return _view;\n}), [viewPromise]);\n\nexport default useCreateSearch;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\n\nimport type { ValueExpr } from 'hooks/useEventDefinition';\nimport type { Condition } from 'views/logic/views/formatting/highlighting/HighlightingRule';\n\nexport const exprToConditionMapper: {[name: string]: Condition} = {\n '<': 'less',\n '<=': 'less_equal',\n '>=': 'greater_equal',\n '>': 'greater',\n '==': 'equal',\n};\n\nexport const conditionToExprMapper: {[name: string]: ValueExpr} = {\n less: '<',\n less_equal: '<=',\n greater_equal: '>=',\n greater: '>',\n equal: '==',\n};\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport { useMemo } from 'react';\nimport * as Immutable from 'immutable';\nimport uniq from 'lodash/uniq';\n\nimport View from 'views/logic/views/View';\nimport type { AbsoluteTimeRange, ElasticsearchQueryString, RelativeTimeRangeStartOnly } from 'views/logic/queries/Query';\nimport type { Event } from 'components/events/events/types';\nimport type { EventDefinition } from 'logic/alerts/types';\nimport QueryGenerator from 'views/logic/queries/QueryGenerator';\nimport Search from 'views/logic/search/Search';\nimport { matchesDecoratorStream } from 'views/logic/views/ViewStateGenerator';\nimport UpdateSearchForWidgets from 'views/logic/views/UpdateSearchForWidgets';\nimport ViewState from 'views/logic/views/ViewState';\nimport { allMessagesTable, resultHistogram } from 'views/logic/Widgets';\nimport WidgetPosition from 'views/logic/widgets/WidgetPosition';\nimport { DecoratorsActions } from 'stores/decorators/DecoratorsStore';\nimport generateId from 'logic/generateId';\nimport pivotForField from 'views/logic/searchtypes/aggregation/PivotGenerator';\nimport FieldType from 'views/logic/fieldtypes/FieldType';\nimport AggregationWidget from 'views/logic/aggregationbuilder/AggregationWidget';\nimport AggregationWidgetConfig from 'views/logic/aggregationbuilder/AggregationWidgetConfig';\nimport Series from 'views/logic/aggregationbuilder/Series';\nimport type Pivot from 'views/logic/aggregationbuilder/Pivot';\nimport type { EventDefinitionAggregation } from 'hooks/useEventDefinition';\nimport SortConfig from 'views/logic/aggregationbuilder/SortConfig';\nimport Direction from 'views/logic/aggregationbuilder/Direction';\nimport type { ParameterJson } from 'views/logic/parameters/Parameter';\nimport Parameter from 'views/logic/parameters/Parameter';\nimport { concatQueryStrings, escape } from 'views/logic/queries/QueryHelper';\nimport HighlightingRule, { randomColor } from 'views/logic/views/formatting/highlighting/HighlightingRule';\nimport { exprToConditionMapper } from 'views/logic/ExpressionConditionMappers';\nimport FormattingSettings from 'views/logic/views/formatting/FormattingSettings';\n\nconst AGGREGATION_WIDGET_HEIGHT = 3;\n\nexport const getAggregationWidget = ({ rowPivots, fnSeries, sort = [] }: {\n rowPivots: Array,\n fnSeries: Array,\n sort?: Array\n}) => AggregationWidget.builder()\n .id(generateId())\n .config(\n AggregationWidgetConfig.builder()\n .columnPivots([])\n .rowPivots(rowPivots)\n .series(fnSeries)\n .sort(sort)\n .visualization('table')\n .rollup(true)\n .build(),\n )\n .build();\n\nconst createViewPosition = ({ index, SUMMARY_ROW_DELTA }) => {\n const isEven = (index + 1) % 2 === 0;\n const col = isEven ? 7 : 1;\n const HEIGHT_DELTA = index >= 2 ? AGGREGATION_WIDGET_HEIGHT : 0;\n const row = Math.ceil((index + 1) / 2) + HEIGHT_DELTA + SUMMARY_ROW_DELTA;\n\n return new WidgetPosition(col, row, AGGREGATION_WIDGET_HEIGHT, 6);\n};\n\nconst createViewWidget = ({ field, groupBy, fnSeries, expr }) => {\n const uniqPivotFields = uniq([field, ...groupBy].filter((v) => !!v));\n const rowPivots = uniqPivotFields.length ? [pivotForField(uniqPivotFields, new FieldType('value', [], []))] : [];\n const fnSeriesForFunc = Series.forFunction(fnSeries);\n const direction = ['>', '>=', '=='].includes(expr) ? Direction.Descending : Direction.Ascending;\n const sort = [new SortConfig(SortConfig.SERIES_TYPE, fnSeries, direction)];\n\n return getAggregationWidget({ rowPivots, fnSeries: [fnSeriesForFunc], sort });\n};\n\nconst getSummaryAggregation = ({ aggregations, groupBy }) => {\n const { summaryFnSeries, summaryRowPivots, summaryTitle } = aggregations.reduce((res, { field, value, expr, fnSeries }) => {\n const concatTitle = `${fnSeries} ${expr} ${value}`;\n res.summaryFnSeries.push(fnSeries);\n if (field) res.summaryRowPivots.push(field);\n res.summaryTitle = `${res.summaryTitle} ${concatTitle}`;\n\n return res;\n }, {\n summaryFnSeries: [],\n summaryRowPivots: [],\n summaryTitle: 'Summary: ',\n });\n\n const summaryWidget = getAggregationWidget({\n rowPivots: [pivotForField(uniq([...summaryRowPivots, ...groupBy]), new FieldType('value', [], []))],\n fnSeries: summaryFnSeries.map((s) => Series.forFunction(s)),\n });\n\n return ({\n summaryTitle,\n summaryWidget,\n summaryPosition: new WidgetPosition(1, 1, AGGREGATION_WIDGET_HEIGHT, Infinity),\n });\n};\n\nexport const WidgetsGenerator = async ({ streams, aggregations, groupBy }) => {\n const decorators = await DecoratorsActions.list();\n const byStreamId = matchesDecoratorStream(streams);\n const streamDecorators = decorators?.length ? decorators.filter(byStreamId) : [];\n const histogram = resultHistogram();\n const messageTable = allMessagesTable(undefined, streamDecorators);\n const needsSummaryAggregations = aggregations.length > 1;\n const SUMMARY_ROW_DELTA = needsSummaryAggregations ? AGGREGATION_WIDGET_HEIGHT : 0;\n const { aggregationWidgets, aggregationTitles, aggregationPositions } = aggregations.reduce((res, { field, value, expr, fnSeries }, index) => {\n const widget = createViewWidget({ fnSeries, field, groupBy, expr });\n res.aggregationWidgets.push(widget);\n res.aggregationTitles[widget.id] = `${fnSeries} ${expr} ${value}`;\n res.aggregationPositions[widget.id] = createViewPosition({ index, SUMMARY_ROW_DELTA });\n\n return res;\n }, { aggregationTitles: {}, aggregationWidgets: [], aggregationPositions: {} });\n\n const widgets = [\n ...aggregationWidgets,\n histogram,\n messageTable,\n ];\n\n const titles = {\n widget: {\n ...aggregationTitles,\n [histogram.id]: 'Message Count',\n [messageTable.id]: 'All Messages',\n },\n };\n\n const positions = {\n ...aggregationPositions,\n [histogram.id]: new WidgetPosition(1, AGGREGATION_WIDGET_HEIGHT * aggregationWidgets.length + 1 + SUMMARY_ROW_DELTA, 2, Infinity),\n [messageTable.id]: new WidgetPosition(1, AGGREGATION_WIDGET_HEIGHT * aggregationWidgets.length + 3 + SUMMARY_ROW_DELTA, 6, Infinity),\n };\n\n if (needsSummaryAggregations) {\n const { summaryTitle, summaryWidget, summaryPosition } = getSummaryAggregation({ aggregations, groupBy });\n widgets.push(summaryWidget);\n titles.widget[summaryWidget.id] = summaryTitle;\n positions[summaryWidget.id] = summaryPosition;\n }\n\n return { titles, widgets, positions };\n};\n\nexport const ViewStateGenerator = async ({ streams, aggregations, groupBy }: {groupBy: Array, streams: string | string[] | undefined, aggregations: Array}) => {\n const { titles, widgets, positions } = await WidgetsGenerator({ streams, aggregations, groupBy });\n\n const highlightRules = aggregations?.map(({ fnSeries, value, expr }) => HighlightingRule.create(fnSeries, value, exprToConditionMapper[expr] || 'equal', randomColor()));\n\n return ViewState.create()\n .toBuilder()\n .titles(titles)\n .widgets(Immutable.List(widgets))\n .widgetPositions(positions)\n .formatting(FormattingSettings.create(highlightRules))\n .build();\n};\n\nexport const ViewGenerator = async ({\n streams,\n timeRange,\n queryString,\n aggregations,\n groupBy,\n queryParameters,\n}: {\n streams: string | string[] | undefined | null,\n timeRange: AbsoluteTimeRange | RelativeTimeRangeStartOnly,\n queryString: ElasticsearchQueryString,\n aggregations: Array\n groupBy: Array,\n queryParameters: Array,\n},\n) => {\n const query = QueryGenerator(streams, undefined, timeRange, queryString);\n const search = Search.create().toBuilder().queries([query]).parameters(queryParameters.map((param) => Parameter.fromJSON(param)))\n .build();\n const viewState = await ViewStateGenerator({ streams, aggregations, groupBy });\n\n const view = View.create()\n .toBuilder()\n .newId()\n .type(View.Type.Search)\n .state({ [query.id]: viewState })\n .search(search)\n .build();\n\n return UpdateSearchForWidgets(view);\n};\n\nexport const UseCreateViewForEvent = (\n { eventData, eventDefinition, aggregations }: { eventData: Event, eventDefinition: EventDefinition, aggregations: Array },\n) => {\n const queryStringFromGrouping = concatQueryStrings(Object.entries(eventData.group_by_fields).map(([field, value]) => `${field}:${escape(value)}`), { withBrackets: false });\n const eventQueryString = eventData?.replay_info?.query || '';\n const { streams } = eventData.replay_info;\n const timeRange: AbsoluteTimeRange = {\n type: 'absolute',\n from: eventData?.replay_info?.timerange_start,\n to: eventData?.replay_info?.timerange_end,\n };\n const queryString: ElasticsearchQueryString = {\n type: 'elasticsearch',\n query_string: concatQueryStrings([eventQueryString, queryStringFromGrouping]),\n };\n\n const queryParameters = eventDefinition?.config?.query_parameters || [];\n\n const groupBy = eventDefinition?.config?.group_by ?? [];\n\n return useMemo(\n () => ViewGenerator({ streams, timeRange, queryString, aggregations, groupBy, queryParameters }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n};\n\nexport default UseCreateViewForEvent;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\n\nimport { useMemo } from 'react';\n\nimport type { EventDefinition } from 'logic/alerts/types';\nimport type { EventDefinitionAggregation } from 'hooks/useEventDefinition';\nimport type { ElasticsearchQueryString, RelativeTimeRangeStartOnly } from 'views/logic/queries/Query';\nimport { ViewGenerator } from 'views/logic/views/UseCreateViewForEvent';\n\nconst useCreateViewForEventDefinition = (\n {\n eventDefinition,\n aggregations,\n }: { eventDefinition: EventDefinition, aggregations: Array },\n) => {\n const streams = eventDefinition?.config?.streams ?? [];\n const timeRange: RelativeTimeRangeStartOnly = {\n type: 'relative',\n range: (eventDefinition?.config?.search_within_ms ?? 0) / 1000,\n };\n const queryString: ElasticsearchQueryString = {\n type: 'elasticsearch',\n query_string: eventDefinition?.config?.query || '',\n };\n\n const queryParameters = eventDefinition?.config?.query_parameters || [];\n\n const groupBy = eventDefinition?.config?.group_by ?? [];\n\n return useMemo(\n () => ViewGenerator({ streams, timeRange, queryString, aggregations, groupBy, queryParameters }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n};\n\nexport default useCreateViewForEventDefinition;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\n\nimport React, { useEffect, useState } from 'react';\n\nimport useParams from 'routing/useParams';\nimport useEventDefinition from 'hooks/useEventDefinition';\nimport { Spinner } from 'components/common';\nimport SearchPage from 'views/pages/SearchPage';\nimport { EventNotificationsActions } from 'stores/event-notifications/EventNotificationsStore';\nimport useAlertAndEventDefinitionData from 'hooks/useAlertAndEventDefinitionData';\nimport useCreateViewForEventDefinition from 'views/logic/views/UseCreateViewForEventDefinition';\nimport EventInfoBar from 'components/event-definitions/replay-search/EventInfoBar';\nimport { createFromFetchError } from 'logic/errors/ReportedErrors';\nimport ErrorsActions from 'actions/errors/ErrorsActions';\nimport useCreateSearch from 'views/hooks/useCreateSearch';\n\nconst EventView = () => {\n const { eventDefinition, aggregations } = useAlertAndEventDefinitionData();\n const _view = useCreateViewForEventDefinition({ eventDefinition, aggregations });\n const view = useCreateSearch(_view);\n\n return (\n \n );\n};\n\nexport const onErrorHandler = (error) => {\n if (error.status === 404) {\n ErrorsActions.report(createFromFetchError(error));\n }\n};\n\nconst EventDefinitionReplaySearchPage = () => {\n const [isNotificationLoaded, setIsNotificationLoaded] = useState(false);\n const { definitionId } = useParams<{ definitionId?: string }>();\n const { isLoading: EDIsLoading, isFetched: EDIsFetched } = useEventDefinition(definitionId, { onErrorHandler });\n\n useEffect(() => {\n EventNotificationsActions.listAll().then(() => setIsNotificationLoaded(true));\n }, [setIsNotificationLoaded]);\n\n const isLoading = EDIsLoading || !EDIsFetched || !isNotificationLoaded;\n\n return isLoading ? : ;\n};\n\nexport default EventDefinitionReplaySearchPage;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport { useQuery } from '@tanstack/react-query';\n\nimport UserNotification from 'util/UserNotification';\nimport fetch from 'logic/rest/FetchProvider';\nimport { qualifyUrl } from 'util/URLUtils';\nimport type { Event } from 'components/events/events/types';\nimport type FetchError from 'logic/errors/FetchError';\n\nexport const eventsUrl = (id) => qualifyUrl(`/events/${id}`);\n\nconst fetchEvent = (eventId: string) => fetch('GET', eventsUrl(eventId)).then((data) => data.event);\n\nconst useEventById = (eventId: string, { onErrorHandler }: { onErrorHandler?: (e: FetchError)=>void} = {}): {\n data: Event,\n refetch: () => void,\n isLoading: boolean,\n isFetched: boolean,\n} => {\n const { data, refetch, isLoading, isFetched } = useQuery(\n ['event-by-id', eventId],\n () => fetchEvent(eventId),\n {\n onError: (errorThrown: FetchError) => {\n if (onErrorHandler) onErrorHandler(errorThrown);\n\n UserNotification.error(`Loading event or alert failed with status: ${errorThrown}`,\n 'Could not load event or alert');\n },\n keepPreviousData: true,\n enabled: !!eventId,\n },\n );\n\n return ({\n data,\n refetch,\n isLoading,\n isFetched,\n });\n};\n\nexport default useEventById;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\n\nimport React, { useEffect, useState } from 'react';\n\nimport useParams from 'routing/useParams';\nimport useEventById from 'hooks/useEventById';\nimport useEventDefinition from 'hooks/useEventDefinition';\nimport { Spinner } from 'components/common';\nimport SearchPage from 'views/pages/SearchPage';\nimport { EventNotificationsActions } from 'stores/event-notifications/EventNotificationsStore';\nimport useCreateViewForEvent from 'views/logic/views/UseCreateViewForEvent';\nimport useAlertAndEventDefinitionData from 'hooks/useAlertAndEventDefinitionData';\nimport EventInfoBar from 'components/event-definitions/replay-search/EventInfoBar';\nimport { createFromFetchError } from 'logic/errors/ReportedErrors';\nimport ErrorsActions from 'actions/errors/ErrorsActions';\nimport useCreateSearch from 'views/hooks/useCreateSearch';\n\nconst EventView = () => {\n const { eventData, eventDefinition, aggregations } = useAlertAndEventDefinitionData();\n const _view = useCreateViewForEvent({ eventData, eventDefinition, aggregations });\n const view = useCreateSearch(_view);\n\n return (\n \n );\n};\n\nexport const onErrorHandler = (error) => {\n if (error.status === 404) {\n ErrorsActions.report(createFromFetchError(error));\n }\n};\n\nconst EventReplaySearchPage = () => {\n const [isNotificationLoaded, setIsNotificationLoaded] = useState(false);\n const { alertId } = useParams<{ alertId?: string }>();\n const { data: eventData, isLoading: eventIsLoading, isFetched: eventIsFetched } = useEventById(alertId, { onErrorHandler });\n const { isLoading: EDIsLoading, isFetched: EDIsFetched } = useEventDefinition(eventData?.event_definition_id);\n\n useEffect(() => {\n EventNotificationsActions.listAll().then(() => setIsNotificationLoaded(true));\n }, [setIsNotificationLoaded]);\n\n const isLoading = eventIsLoading || EDIsLoading || !eventIsFetched || !EDIsFetched || !isNotificationLoaded;\n\n return isLoading ? : ;\n};\n\nexport default EventReplaySearchPage;\n"],"names":["name","List","Condition","ColorComponent","useHighlightingRules","useAppSelector","dispatch","useAppDispatch","aggregations","useAlertAndEventDefinitionData","highlightingRules","aggregationsMap","agg","changeColor","rule","newColor","condition","value","fnSeries","expr","highlightedAggregations","initial","acc","field","result","key","color","hexColor","c","_","hidePopover","eventDefinition","allNotifications","EventNotificationsStore","all","res","cur","notificationList","id","title","index","prefix","Routes","AlertTimestamp","theme","eventData","isEventDefinition","searchWithin","executeEvery","isEDUpdatedAfterEvent","EventDefinitionPriorityEnum","Header","Item","Container","Row","Value","isEvent","isAlert","open","setOpen","toggleOpen","e","infoAttributes","currentTypeText","content","show","definitionsUrl","definitionId","transformExpressionsToArray","series","conditions","rec","expression","numberRefSeries","s","ref","selectedSeries","eventDefinitionDataMapper","data","fetchDefinition","onErrorHandler","refetch","isLoading","isFetched","errorThrown","EventNotificationsActions","segments","query","uri","nextSegments","promise","response","page","pageSize","newPage","newPerPage","newQuery","additional","url","elements","attributes","count","total","perPage","notificationId","error","notification","viewPromise","_view","exprToConditionMapper","conditionToExprMapper","AGGREGATION_WIDGET_HEIGHT","getAggregationWidget","rowPivots","sort","createViewPosition","SUMMARY_ROW_DELTA","col","HEIGHT_DELTA","row","createViewWidget","groupBy","uniqPivotFields","v","fnSeriesForFunc","direction","getSummaryAggregation","summaryFnSeries","summaryRowPivots","summaryTitle","concatTitle","summaryWidget","WidgetsGenerator","streams","decorators","byStreamId","streamDecorators","histogram","messageTable","needsSummaryAggregations","aggregationWidgets","aggregationTitles","aggregationPositions","widget","widgets","titles","positions","summaryPosition","ViewStateGenerator","highlightRules","ViewGenerator","timeRange","queryString","queryParameters","search","param","viewState","view","queryStringFromGrouping","eventQueryString","EventView","useCreateSearch","SearchPage","EventInfoBar","ErrorsActions","isNotificationLoaded","setIsNotificationLoaded","useParams","EDIsLoading","EDIsFetched","useEventDefinition","eventsUrl","fetchEvent","eventId","UserNotification","alertId","eventIsLoading","eventIsFetched"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy