Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
{"version":3,"file":"325e2d4b-8214.48a77da8079e86789910.js","mappings":"2MAoBA,MAgCA,EAhCyB,CACvBA,qBAAqBC,GACnB,MAAM,QAAEC,GAAYD,EAEpB,OAAOE,KAAKC,cAAcF,EAAQG,IAAKJ,EAAeK,MAAOJ,EAASA,EAASD,EAAeM,iBAAkBN,EAAeO,iBAChI,EAEDC,oBAAoBC,GAClB,MAAM,QAAER,GAAYQ,EAEpB,OAAOP,KAAKC,cAAcF,EAAQS,GAAID,EAAcJ,MAAOJ,EAASA,EAAQU,OAAQF,EAAcH,iBAAkBG,EAAcF,iBACnI,EAEDJ,cAAcO,EAAIL,EAAOJ,EAASU,EAAQC,EAAiBC,GACzD,MAAMC,EAAiBC,EAAAA,EAAAA,aAAiCJ,GAExD,MAAO,CACLD,GAAIA,EACJM,UAAWC,IAAOhB,EAAQe,WAAWE,OACrCC,gBAAiBL,EACjBM,iBAAkBN,EAClBH,OAAQA,EACRN,MAAOA,EACPgB,eAAgBV,EAAOW,gBACvBC,gBAAiBZ,EAAOa,iBACxBC,WAAYxB,EAAQyB,QACpBpB,iBAAkBM,EAClBL,iBAAkBM,EAErB,E,gVCJH,MAkDMc,EAAqB,IAA+D,IAA9D,QAAED,EAAF,UAAWV,EAAX,SAAsBY,GAAwC,EACxF,MAAQC,KAAMC,IAAeC,EAAAA,EAAAA,GAAcL,EAAS,CAAEM,KAAM,WAAYC,KAAMjB,EAAWkB,GAAIlB,IACvFmB,GAAQC,EAAAA,EAAAA,UAAQ,KACpB,MAAMC,EAAiBC,EAAAA,KAAeR,GAEtC,MAAQ,CAAES,IAAKF,EAAgBG,YAAaF,EAAAA,IAAc,CAAEG,MAAOJ,IAAnE,GACC,CAACP,IAEJ,OACE,gBAAC,aAAD,CAA4BY,MAAOP,GAChCP,EAFL,EAYIe,EAAkB,IAA6C,IAA1CC,QAAQ,MAAEvC,EAA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GAAaC,EAAAA,EAAAA,oBAAqCD,KAClDE,IACCC,EAAAA,EAAAA,MAAwB,mDAAkDD,IACxE,qCADF,IAKNxC,EAAgBwB,YAAYW,QAAQA,EACrC,EAEDT,WAAWtF,EAAOsG,GAChB,MAAM,IAAEV,GAAQC,EAAAA,EAAAA,mBAAAA,QAAqC7F,EAAOuG,mBAAmBC,EAAAA,EAAAA,UAAsBF,KAC/FP,GAAUC,EAAAA,EAAAA,IAAM,MAAOC,EAAAA,GAAoBL,IAC9C5C,MACEkD,GAAaA,EAASO,SACtBC,IACCL,EAAAA,EAAAA,MAAwB,2CAA0CK,IAChE,8BADF,IAKN9C,EAAgB0B,WAAWS,QAAQA,EACpC,EAEDR,eAAe3F,EAAS+G,EAAeC,EAAOC,GAC5C,MAAM,IAAEjB,GAAQC,EAAAA,EAAAA,mBAAAA,QACViB,EAAU,CACdlH,QAASA,EACTmH,eAAgBJ,EAChBC,MAAOA,EACPI,cAAeH,GAGXd,GAAUC,EAAAA,EAAAA,IAAM,OAAQC,EAAAA,GAAoBL,GAAMkB,GACrD9D,MACEkD,GAAaC,EAAAA,EAAAA,oBAAqCD,KAClDQ,IACKA,EAAMO,YAA0C,MAA5BP,EAAMO,WAAWC,OACvCb,EAAAA,EAAAA,MAAuB,iHAC2B,8BAKpDA,EAAAA,EAAAA,MAAwB,2CAA0CK,IAChE,6BADF,IAKN9C,EAAgB2B,eAAeQ,QAAQA,EACxC,K","sources":["webpack://graylog-web-interface/./src/logic/message/MessageFormatter.js","webpack://graylog-web-interface/./src/pages/ShowMessagePage.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';\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 = newStreams.reduce((prev, stream) => ({ ...prev, [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 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 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 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":["formatMessageSummary","messageSummary","message","this","formatMessage","_id","index","highlight_ranges","decoration_stats","formatResultMessage","resultMessage","id","fields","highlightRanges","decorationStats","filteredFields","MessageFieldsFilter","timestamp","moment","unix","filtered_fields","formatted_fields","source_node_id","gl2_source_node","source_input_id","gl2_source_input","stream_ids","streams","FieldTypesProvider","children","data","fieldTypes","useFieldTypes","type","from","to","types","useMemo","fieldTypesList","Immutable","all","queryFields","query","value","ShowMessagePage","params","messageId","Error","allStreams","setStreams","useState","setAllStreams","useEffect","StreamsStore","then","newStreams","streamsMap","reduce","prev","stream","useStreams","inputs","setMessage","setInputs","async","_message","MessagesActions","isLocalNode","input","InputsActions","newInputs","fetchData","useMessage","NodesActions","undefined","messageStreams","fieldTypesStreams","filter","streamId","has","title","className","md","disableSurroundingSearch","propTypes","PropTypes","isRequired","withParams","singletonActions","Reflux","loadMessage","asyncResult","fieldTerms","loadRawMessage","singletonStore","listenables","sourceUrl","getInitialState","url","ApiRoutes","trim","promise","fetch","URLUtils","response","MessageFormatter","errorThrown","UserNotification","string","encodeURIComponent","StringUtils","tokens","error","remoteAddress","codec","codecConfiguration","payload","remote_address","configuration","additional","status"],"sourceRoot":""}