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

web-interface.assets.1255d548-7421.a7412cee59c41a56812e.js.map Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
{"version":3,"file":"1255d548-7421.a7412cee59c41a56812e.js","mappings":"iNAoDA,QAhCyB,CACvB,qBAAqBA,EAAgB,CACnC,KAAM,CAAE,QAAAC,CAAQ,EAAID,EAEpB,OAAO,KAAK,cAAcC,EAAQ,IAAKD,EAAe,MAAOC,EAASA,EAASD,EAAe,iBAAkBA,EAAe,gBAAgB,CACjJ,EAEA,oBAAoBE,EAAe,CACjC,KAAM,CAAE,QAAAD,CAAQ,EAAIC,EAEpB,OAAO,KAAK,cAAcD,EAAQ,GAAIC,EAAc,MAAOD,EAASA,EAAQ,OAAQC,EAAc,iBAAkBA,EAAc,gBAAgB,CACpJ,EAEA,cAAcC,EAAIC,EAAOH,EAASI,EAAQC,EAAiBC,EAAiB,CAC1E,MAAMC,EAAiB,IAAoB,aAAaH,CAAM,EAE9D,MAAO,CACL,GAAAF,EACA,UAAW,IAAOF,EAAQ,SAAS,EAAE,KAAK,EAC1C,gBAAiBO,EACjB,iBAAkBA,EAClB,OAAAH,EACA,MAAAD,EACA,eAAgBC,EAAO,gBACvB,gBAAiBA,EAAO,iBACxB,WAAYJ,EAAQ,QACpB,iBAAkBK,EAClB,iBAAkBC,CACpB,CACF,CACF,C,yYCFA,MAAME,EAAa,IAAM,CACvB,KAAM,CAACC,EAASC,CAAU,KAAI,YAAwC,EAChE,CAACC,EAAYC,CAAa,KAAI,YAAiC,EAErE,sBAAU,IAAM,CACd,KAAa,YAAY,EAAE,KAAMC,GAAe,CAC9C,GAAIA,EAAY,CACd,MAAMC,EAAa,OAAO,YAAYD,EAAW,IAAKE,GAAW,CAACA,EAAO,GAAIA,CAAM,CAAC,CAAC,EAErFL,EAAW,MAAcI,CAAU,CAAC,EACpCF,EAAc,OAAeC,CAAU,CAAC,CAC1C,CACF,CAAC,CACH,EAAG,CAACH,EAAYE,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,KAAU,MAAM,OAAQ,KAAoBD,CAAG,EAAGS,CAAO,EAC5D,KACEP,GAAa,IAAiB,oBAAoBA,CAAQ,EAC1DG,GAAU,CACT,GAAIA,EAAM,YAAcA,EAAM,WAAW,SAAW,IAAK,CACvD,IAAiB,MAAM,iHAC2B,4BAA4B,EAE9E,MACF,CAEA,IAAiB,MAAM,2CAA2CA,CAAK,GACrE,4BAA4B,CAChC,CACF,EAEFP,EAAgB,eAAe,QAAQG,CAAO,CAChD,CACF,CAAC,CACH,C","sources":["webpack://graylog-web-interface/./src/logic/message/MessageFormatter.js","webpack://graylog-web-interface/./src/pages/ShowMessagePage.tsx","webpack://graylog-web-interface/./src/routing/withParams.tsx","webpack://graylog-web-interface/./src/stores/messages/MessagesStore.js"],"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 moment from 'moment';\n\nimport MessageFieldsFilter from 'logic/message/MessageFieldsFilter';\n\nconst MessageFormatter = {\n  formatMessageSummary(messageSummary) {\n    const { message } = messageSummary;\n\n    return this.formatMessage(message._id, messageSummary.index, message, message, messageSummary.highlight_ranges, messageSummary.decoration_stats);\n  },\n\n  formatResultMessage(resultMessage) {\n    const { message } = resultMessage;\n\n    return this.formatMessage(message.id, resultMessage.index, message, message.fields, resultMessage.highlight_ranges, resultMessage.decoration_stats);\n  },\n\n  formatMessage(id, index, message, fields, highlightRanges, decorationStats) {\n    const filteredFields = MessageFieldsFilter.filterFields(fields);\n\n    return {\n      id: id,\n      timestamp: moment(message.timestamp).unix(),\n      filtered_fields: filteredFields,\n      formatted_fields: filteredFields,\n      fields: fields,\n      index: index,\n      source_node_id: fields.gl2_source_node,\n      source_input_id: fields.gl2_source_input,\n      stream_ids: message.streams,\n      highlight_ranges: highlightRanges,\n      decoration_stats: decorationStats,\n    };\n  },\n};\n\nexport default MessageFormatter;\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 PropTypes from 'prop-types';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport * as Immutable from 'immutable';\n\nimport DocumentTitle from 'components/common/DocumentTitle';\nimport Spinner from 'components/common/Spinner';\nimport { Col, Row } from 'components/bootstrap';\nimport InteractiveContext from 'views/components/contexts/InteractiveContext';\nimport MessageDetail from 'views/components/messagelist/MessageDetail';\nimport withParams from 'routing/withParams';\nimport type { Stream } from 'views/stores/StreamsStore';\nimport type { Input } from 'components/messageloaders/Types';\nimport useFieldTypes from 'views/logic/fieldtypes/useFieldTypes';\nimport type { Message } from 'views/components/messagelist/Types';\nimport FieldTypesContext from 'views/components/contexts/FieldTypesContext';\nimport WindowDimensionsContextProvider from 'contexts/WindowDimensionsContextProvider';\nimport StreamsStore from 'stores/streams/StreamsStore';\nimport { InputsActions } from 'stores/inputs/InputsStore';\nimport { MessagesActions } from 'stores/messages/MessagesStore';\nimport { NodesActions } from 'stores/nodes/NodesStore';\nimport { isLocalNode } from 'views/hooks/useIsLocalNode';\nimport PluggableStoreProvider from 'components/PluggableStoreProvider';\nimport View from 'views/logic/views/View';\nimport SearchExecutionState from 'views/logic/search/SearchExecutionState';\n\ntype Props = {\n  params: {\n    index: string | undefined | null,\n    messageId: string | undefined | null,\n  },\n};\n\nconst useStreams = () => {\n  const [streams, setStreams] = useState>();\n  const [allStreams, setAllStreams] = useState>();\n\n  useEffect(() => {\n    StreamsStore.listStreams().then((newStreams) => {\n      if (newStreams) {\n        const streamsMap = Object.fromEntries(newStreams.map((stream) => [stream.id, stream]));\n\n        setStreams(Immutable.Map(streamsMap));\n        setAllStreams(Immutable.List(newStreams));\n      }\n    });\n  }, [setStreams, setAllStreams]);\n\n  return { streams, allStreams };\n};\n\nconst useMessage = (index: string, messageId: string) => {\n  const [message, setMessage] = useState();\n  const [inputs, setInputs] = useState>(Immutable.Map());\n\n  useEffect(() => {\n    const fetchData = async () => {\n      const _message = await MessagesActions.loadMessage(index, messageId);\n      setMessage(_message);\n\n      if (_message.source_input_id && (await isLocalNode(_message.fields.gl2_source_node))) {\n        const input = await InputsActions.get(_message.source_input_id);\n\n        if (input) {\n          const newInputs = Immutable.Map({ [input.id]: input });\n\n          setInputs(newInputs);\n        }\n      }\n    };\n\n    fetchData();\n  }, [index, messageId, setMessage, setInputs]);\n\n  return { message, inputs };\n};\n\ntype FieldTypesProviderProps = {\n  children: React.ReactNode,\n  streams: Array,\n  timestamp: string,\n};\n\nconst FieldTypesProvider = ({ streams, timestamp, children }: FieldTypesProviderProps) => {\n  const { data: fieldTypes } = useFieldTypes(streams, { type: 'absolute', from: timestamp, to: timestamp });\n  const types = useMemo(() => {\n    const fieldTypesList = Immutable.List(fieldTypes);\n\n    return ({ all: fieldTypesList, queryFields: Immutable.Map({ query: fieldTypesList }) });\n  }, [fieldTypes]);\n\n  return (\n    \n      {children}\n    \n  );\n};\n\ntype MessageFields = {\n  streams: Array,\n  timestamp: string,\n};\n\nconst ShowMessagePage = ({ params: { index, messageId } }: Props) => {\n  if (!index || !messageId) {\n    throw new Error('index and messageId need to be specified!');\n  }\n\n  const { streams, allStreams } = useStreams();\n  const { message, inputs } = useMessage(index, messageId);\n\n  useEffect(() => { NodesActions.list(); }, []);\n\n  const isLoaded = useMemo(() => (message !== undefined\n    && streams !== undefined\n    && inputs !== undefined\n    && allStreams !== undefined), [message, streams, inputs, allStreams]);\n\n  const view = useMemo(() => View.create(), []);\n  const executionState = useMemo(() => SearchExecutionState.empty(), []);\n\n  if (isLoaded) {\n    const { streams: messageStreams, timestamp } = message.fields as MessageFields;\n    const fieldTypesStreams = messageStreams.filter((streamId) => streams.has(streamId));\n\n    return (\n      \n        \n          \n            \n              \n                \n                  \n                    \n                  \n                \n              \n            \n          \n        \n      \n    );\n  }\n\n  return ;\n};\n\nShowMessagePage.propTypes = {\n  params: PropTypes.exact({\n    index: PropTypes.string.isRequired,\n    messageId: PropTypes.string.isRequired,\n  }).isRequired,\n};\n\nexport default withParams(ShowMessagePage);\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 { useParams } from 'react-router-dom';\nimport type { Subtract } from 'utility-types';\n\ntype ParamsContext = {\n  params: {\n    [key: string]: string | null | undefined;\n  };\n};\n\nconst withParams = (Component: React.ComponentType): React.ComponentType> => (props) => {\n  const params = useParams();\n\n  return ;\n};\n\nexport default withParams;\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';\n\nimport fetch from 'logic/rest/FetchProvider';\nimport MessageFormatter from 'logic/message/MessageFormatter';\nimport ApiRoutes from 'routing/ApiRoutes';\nimport * as URLUtils from 'util/URLUtils';\nimport UserNotification from 'util/UserNotification';\nimport StringUtils from 'util/StringUtils';\nimport { singletonStore, singletonActions } from 'logic/singleton';\n\nexport const MessagesActions = singletonActions(\n  'core.Messages',\n  () => Reflux.createActions({\n    loadMessage: { asyncResult: true },\n    fieldTerms: { asyncResult: true },\n    loadRawMessage: { asyncResult: true },\n  }),\n);\n\nexport const MessagesStore = singletonStore(\n  'core.Messages',\n  () => Reflux.createStore({\n    listenables: [MessagesActions],\n    sourceUrl: '',\n\n    getInitialState() {\n      return {};\n    },\n\n    loadMessage(index, messageId) {\n      const { url } = ApiRoutes.MessagesController.single(index.trim(), messageId.trim());\n      const promise = fetch('GET', URLUtils.qualifyUrl(url))\n        .then(\n          (response) => MessageFormatter.formatResultMessage(response),\n          (errorThrown) => {\n            UserNotification.error(`Loading message information failed with status: ${errorThrown}`,\n              'Could not load message information');\n          },\n        );\n\n      MessagesActions.loadMessage.promise(promise);\n    },\n\n    fieldTerms(index, string) {\n      const { url } = ApiRoutes.MessagesController.analyze(index, encodeURIComponent(StringUtils.stringify(string)));\n      const promise = fetch('GET', URLUtils.qualifyUrl(url))\n        .then(\n          (response) => response.tokens,\n          (error) => {\n            UserNotification.error(`Loading field terms failed with status: ${error}`,\n              'Could not load field terms.');\n          },\n        );\n\n      MessagesActions.fieldTerms.promise(promise);\n    },\n\n    loadRawMessage(message, remoteAddress, codec, codecConfiguration) {\n      const { url } = ApiRoutes.MessagesController.parse();\n      const payload = {\n        message: message,\n        remote_address: remoteAddress,\n        codec: codec,\n        configuration: codecConfiguration,\n      };\n\n      const promise = fetch('POST', URLUtils.qualifyUrl(url), payload)\n        .then(\n          (response) => MessageFormatter.formatResultMessage(response),\n          (error) => {\n            if (error.additional && error.additional.status === 400) {\n              UserNotification.error('Please ensure the selected codec and its configuration are right. '\n              + 'Check your server logs for more information.', 'Could not load raw message');\n\n              return;\n            }\n\n            UserNotification.error(`Loading raw message failed with status: ${error}`,\n              'Could not load raw message');\n          },\n        );\n\n      MessagesActions.loadRawMessage.promise(promise);\n    },\n  }),\n);\n"],"names":["messageSummary","message","resultMessage","id","index","fields","highlightRanges","decorationStats","filteredFields","useStreams","streams","setStreams","allStreams","setAllStreams","newStreams","streamsMap","stream","useMessage","messageId","setMessage","inputs","setInputs","_message","input","newInputs","FieldTypesProvider","timestamp","children","fieldTypes","types","fieldTypesList","ShowMessagePage","isLoaded","view","executionState","messageStreams","fieldTypesStreams","streamId","Component","props","params","MessagesActions","MessagesStore","url","promise","response","errorThrown","string","error","remoteAddress","codec","codecConfiguration","payload"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy