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

web-interface.assets.57e33c6c-70.11b9f72925818240e61d.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
{"version":3,"sources":["webpack:///./src/components/pipelines/StageForm.tsx","webpack:///./src/components/pipelines/StageRules.tsx","webpack:///./src/components/pipelines/Stage.tsx","webpack:///./src/components/pipelines/PipelineForm.tsx","webpack:///./src/components/pipelines/PipelineDetails.tsx","webpack:///./src/components/pipelines/PipelineConnectionsForm.tsx","webpack:///./src/components/pipelines/Pipeline.tsx","webpack:///./src/components/pipelines/NewPipeline.tsx","webpack:///./src/logic/pipelines/SourceGenerator.js","webpack:///./src/pages/PipelineDetailsPage.jsx","webpack:///./src/components/pipelines/PipelineConnectionsList.tsx"],"names":["RulesStore","CombinedProvider","get","StageForm","pipeline","stage","create","save","modalRef","useRef","_initialStageNumber","useMemo","Math","max","stages","map","s","useState","nextStage","setNextStage","rules","useStore","_onChange","target","currentStage","name","getValueFromInput","_onSaved","current","close","isOverridingStage","some","_formatRuleOption","title","value","label","_getFormattedOptions","useCallback","chosenRules","filter","rule","includes","_filterChosenRules","rulesHelp","to","Routes","SYSTEM","PIPELINES","RULES","onClick","open","bsStyle","ref","onSubmitForm","submitButtonText","type","id","autoFocus","onChange","help","checked","match","options","isLoading","newRules","selectedOptions","propTypes","PropTypes","object","isRequired","bool","func","defaultProps","TitleTd","styled","td","StageRules","className","headers","headerCellFormatter","header","rows","dataRowFormatter","ruleArg","ruleIdx","ruleTitle","RULE","description","key","zeroOnMissing","suffix","showTotal","noDataText","filterLabel","filterKeys","array","Stage","isLastStage","onUpdate","onDelete","allRules","length","throughput","prefix","actions","matchText","block","content","r","titleSuffix","contentRow","md","SaveButton","Button","PipelineForm","modal","onCancel","cloneDeep","nextPipeline","setNextPipeline","currentPipeline","_handleSubmit","event","preventDefault","required","onSubmit","undefined","PipelineDl","dl","PipelineDetails","dateTime","created_at","relative","modified_at","formatStreams","streams","sort","s1","s2","naturalSort","PipelineConnectionsForm","connections","initialStreamConnections","c","pipeline_ids","stream_id","find","connectedStreams","setConnectedStreams","notConnectedStreams","cs","toLowerCase","_closeModal","streamsHelp","STREAMS","BootstrapModalForm","streamIds","newConnection","newStreams","selectedOptionsType","ConnectionWarning","Alert","StyledRow","Row","StyledP","p","Pipeline","onConnectionsChange","onStagesChange","onPipelineChange","_updateStage","prevStage","callback","newStages","push","_deleteStage","window","confirm","formattedStages","maxStage","reduce","Infinity","stageKey","join","PipelineConnectionsList","streamsFormatter","formattedStreams","streamList","slice","singular","plural","noConnectionsMessage","bsNoItemsStyle","noItemsText","items","NewPipeline","_goToPipeline","history","PIPELINE","newPipeline","goBack","SourceGenerator","generatePipeline","source","forEach","PipelinesStore","PipelinesActions","PipelineConnectionsStore","PipelineConnectionsActions","StreamsStore","PipelineDetailsPage","createReactClass","displayName","params","mixins","Reflux","connectFilter","state","pipelines","props","pipelineId","componentDidMount","this","_isNewPipeline","list","listStreams","then","filteredStreams","is_editable","setState","UNSAFE_componentWillReceiveProps","nextProps","_onConnectionsChange","updatedConnections","connectToPipeline","_onStagesChange","ObjectUtils","clone","update","_savePipeline","requestPipeline","_isLoading","render","pageTitle","OVERVIEW","SIMULATOR","withParams","streamsUsingPipeline","node"],"mappings":"40EA6BQA,EAAeC,IAAiBC,IAAI,SAApCF,WASFG,EAAY,SAAC,GAA6C,IAA3CC,EAA2C,EAA3CA,SAAUC,EAAiC,EAAjCA,MAAOC,EAA0B,EAA1BA,OAAQC,EAAkB,EAAlBA,KACtCC,EAAWC,mBAEXC,EAAsBC,mBAAQ,kBAClCL,EAASM,KAAKC,IAAL,MAAAD,KAAI,EAAQR,EAASU,OAAOC,KAAI,SAACC,GAAD,OAAOA,EAAEX,WAAU,EAAIA,EAAMA,QACrE,CAACC,EAAQF,EAASU,OAAQT,EAAMA,QAL2B,IAO5BY,mBAAQ,OAAiBZ,GAAjB,IAAwBA,MAAOK,KAPX,GAOvDQ,EAPuD,KAO5CC,EAP4C,KAQt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MAAK,SAACf,GAAD,OAAOA,EAAEwC,KAAOuF,EAAEE,gBAC7ClI,KAAI,SAACgI,GAAD,OAAOR,EAAQW,MAAK,SAAClI,GAAD,OAAOA,EAAEwC,KAAOuF,EAAEE,gBAC1CT,MAAK,SAACC,EAAIC,GAAL,OAAYC,IAAYF,EAAGxG,MAAOyG,EAAGzG,UAE7C,OACE,8BACmC,IAAhCsN,EAAqBlJ,OAAe0F,EAAuBN,EAAiB8D,KAKnF/D,EAAwBtH,UAAY,CAClC9D,SAAU+D,IAAUC,OAAOC,WAC3BwE,YAAa1E,IAAU4B,MAAM1B,WAC7BkE,QAASpE,IAAU4B,MAAM1B,WACzBoH,iBAAkBtH,IAAUI,KAAKF,WACjC0H,qBAAsB5H,IAAUqL,MAGlChE,EAAwBhH,aAAe,CACrCuH,qBAAsB,yCAGTP","file":"57e33c6c-70.11b9f72925818240e61d.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 PropTypes from 'prop-types';\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\n\nimport { useStore } from 'stores/connect';\nimport { Link } from 'components/graylog/router';\nimport { Button, ControlLabel, FormGroup } from 'components/graylog';\nimport { SelectableList } from 'components/common';\nimport { BootstrapModalForm, Input } from 'components/bootstrap';\nimport { getValueFromInput } from 'util/FormsUtils';\nimport Routes from 'routing/Routes';\nimport CombinedProvider from 'injection/CombinedProvider';\nimport { PipelineType, StageType } from 'stores/pipelines/PipelinesStore';\n\nconst { RulesStore } = CombinedProvider.get('Rules');\n\ntype Props = {\n  pipeline: PipelineType,\n  stage?: StageType,\n  create: boolean,\n  save: (nextStage: StageType, callback: () => void) => void,\n};\n\nconst StageForm = ({ pipeline, stage, create, save }: Props) => {\n  const modalRef = useRef();\n\n  const _initialStageNumber = useMemo(() => (\n    create ? Math.max(...pipeline.stages.map((s) => s.stage)) + 1 : stage.stage\n  ), [create, pipeline.stages, stage.stage]);\n\n  const [nextStage, setNextStage] = useState({ ...stage, stage: _initialStageNumber });\n  const { rules } = useStore(RulesStore);\n\n  const openModal = () => {\n    if (modalRef.current) {\n      modalRef.current.open();\n    }\n  };\n\n  const _onChange = ({ target }) => {\n    setNextStage((currentStage) => ({ ...currentStage, [target.name]: getValueFromInput(target) }));\n  };\n\n  const _onRulesChange = (newRules) => {\n    setNextStage((currentStage) => ({ ...currentStage, rules: newRules }));\n  };\n\n  const _closeModal = () => {\n    if (modalRef.current) {\n      modalRef.current.close();\n    }\n  };\n\n  const _onSaved = () => {\n    _closeModal();\n  };\n\n  const isOverridingStage = useMemo(() => (\n    nextStage.stage !== _initialStageNumber && pipeline.stages.some(({ stage: s }) => s === nextStage.stage)\n  ), [nextStage.stage, _initialStageNumber, pipeline.stages]);\n\n  const _handleSave = () => {\n    if (!isOverridingStage) {\n      save(nextStage, _onSaved);\n    }\n  };\n\n  const _formatRuleOption = ({ title }) => {\n    return { value: title, label: title };\n  };\n\n  const _filterChosenRules = (rule, chosenRules) => {\n    return !chosenRules.includes(rule.title);\n  };\n\n  const _getFormattedOptions = useCallback(() => {\n    const chosenRules = nextStage.rules;\n\n    return rules ? rules.filter((rule) => _filterChosenRules(rule, chosenRules)).map(_formatRuleOption) : [];\n  }, [nextStage.rules, rules]);\n\n  const rulesHelp = (\n    \n      Select the rules evaluated on this stage, or create one in the{' '}\n      Pipeline Rules page.\n    \n  );\n\n  return (\n    \n      \n      \n        
\n \n\n \n Continue processing on next stage when\n \n\n \n\n \n\n \n\n \n \n \n
\n
\n
\n );\n};\n\nStageForm.propTypes = {\n pipeline: PropTypes.object.isRequired,\n stage: PropTypes.object,\n create: PropTypes.bool,\n save: PropTypes.func.isRequired,\n};\n\nStageForm.defaultProps = {\n create: false,\n stage: {\n stage: 0,\n match: 'EITHER',\n rules: [],\n },\n};\n\nexport default StageForm;\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 from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\n\nimport { DataTable, Icon } from 'components/common';\nimport { Link } from 'components/graylog/router';\nimport Routes from 'routing/Routes';\nimport { MetricContainer, CounterRate } from 'components/metrics';\nimport { PipelineType, StageType } from 'stores/pipelines/PipelinesStore';\nimport { RuleType } from 'stores/rules/RulesStore';\n\nconst TitleTd = styled.td`\n width: 400px;\n`;\n\ntype Props = {\n pipeline: PipelineType,\n stage: StageType,\n rules: RuleType[],\n};\n\nconst StageRules = ({ pipeline, stage, rules }: Props) => {\n const headers = ['Title', 'Description', 'Throughput', 'Errors'];\n\n const _ruleRowFormatter = (ruleArg, ruleIdx) => {\n let rule = ruleArg;\n\n let ruleTitle;\n\n // this can happen when a rule has been renamed, but not all references are updated\n if (!rule) {\n rule = {\n id: `invalid-${ruleIdx}`,\n description: `Rule ${stage.rules[ruleIdx]} has been renamed or removed. This rule will be skipped.`,\n };\n\n ruleTitle = {stage.rules[ruleIdx]};\n } else {\n ruleTitle = (\n \n {rule.title}\n \n );\n }\n\n return (\n \n \n {ruleTitle}\n \n {rule.description}\n \n \n \n \n \n \n \n \n \n \n \n );\n };\n\n return (\n ({header})}\n rows={rules}\n dataRowFormatter={_ruleRowFormatter}\n noDataText=\"This stage has no rules yet. Click on edit to add some.\"\n filterLabel=\"\"\n filterKeys={[]} />\n );\n};\n\nStageRules.propTypes = {\n pipeline: PropTypes.object.isRequired,\n stage: PropTypes.object.isRequired,\n rules: PropTypes.array,\n};\n\nStageRules.defaultProps = {\n rules: [],\n};\n\nexport default StageRules;\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 from 'react';\n\nimport { Col, Button } from 'components/graylog';\nimport { EntityListItem, Spinner } from 'components/common';\nimport { MetricContainer, CounterRate } from 'components/metrics';\nimport CombinedProvider from 'injection/CombinedProvider';\nimport { PipelineType, StageType } from 'stores/pipelines/PipelinesStore';\nimport { useStore } from 'stores/connect';\nimport { RuleType } from 'stores/rules/RulesStore';\n\nimport StageForm from './StageForm';\nimport StageRules from './StageRules';\n\nconst { RulesStore } = CombinedProvider.get('Rules');\n\ntype Props = {\n stage: StageType,\n pipeline: PipelineType,\n isLastStage: boolean,\n onUpdate: (nextStage: StageType, callback: () => void) => void,\n onDelete: () => void,\n};\n\nconst Stage = ({ stage, pipeline, isLastStage, onUpdate, onDelete }: Props) => {\n const { rules: allRules }: { rules: RuleType[] } = useStore(RulesStore);\n\n const suffix = `Contains ${(stage.rules.length === 1 ? '1 rule' : `${stage.rules.length} rules`)}`;\n\n const throughput = (\n \n \n \n );\n\n const actions = [\n ,\n ,\n ];\n\n let description;\n\n if (isLastStage) {\n description = 'There are no further stages in this pipeline. Once rules in this stage are applied, the pipeline will have finished processing.';\n } else {\n let matchText;\n\n switch (stage.match) {\n case 'ALL':\n matchText = 'all rules';\n break;\n case 'EITHER':\n matchText = 'at least one rule';\n break;\n case 'PASS':\n matchText = 'none or more rules';\n break;\n default:\n matchText = 'UNKNOWN';\n break;\n }\n\n description = (\n \n Messages satisfying {matchText}{' '}\n in this stage, will continue to the next stage.\n \n );\n }\n\n const block = (\n \n {description}\n
\n {throughput}\n
\n );\n\n const content = (allRules\n ? (\n allRules.filter((r) => r.title === name)[0])} />\n )\n : );\n\n return (\n {content}} />\n );\n};\n\nStage.propTypes = {\n stage: PropTypes.object.isRequired,\n pipeline: PropTypes.object.isRequired,\n isLastStage: PropTypes.bool.isRequired,\n onUpdate: PropTypes.func.isRequired,\n onDelete: PropTypes.func.isRequired,\n};\n\nexport default Stage;\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, { useRef, useState } from 'react';\nimport { cloneDeep } from 'lodash';\nimport styled from 'styled-components';\n\nimport { Row, Col, Button } from 'components/graylog';\nimport { BootstrapModalForm, Input } from 'components/bootstrap';\nimport { getValueFromInput } from 'util/FormsUtils';\nimport { PipelineType } from 'stores/pipelines/PipelinesStore';\n\nconst SaveButton = styled(Button)`\n margin-right: 10px;\n`;\n\ntype Props = {\n pipeline: PipelineType,\n create: boolean,\n modal: boolean,\n save: (pipeline: PipelineType, callback: () => void) => void,\n onCancel?: () => void,\n};\n\nconst PipelineForm = ({ pipeline, create, modal, save, onCancel }: Props) => {\n const modalRef = useRef();\n const [nextPipeline, setNextPipeline] = useState(cloneDeep(pipeline));\n\n const _openModal = () => {\n if (modalRef.current) {\n modalRef.current.open();\n }\n };\n\n const _onChange = ({ target }) => {\n setNextPipeline((currentPipeline) => ({ ...currentPipeline, [target.name]: getValueFromInput(target) }));\n };\n\n const _closeModal = () => {\n if (modalRef.current) {\n modalRef.current.close();\n }\n };\n\n const _onSaved = () => {\n _closeModal();\n\n if (create) {\n setNextPipeline(cloneDeep(pipeline));\n }\n };\n\n const _handleSubmit = (event) => {\n if (event) {\n event.preventDefault();\n }\n\n save(nextPipeline, _onSaved);\n };\n\n const content = (\n
\n \n\n \n
\n );\n\n if (modal) {\n return (\n \n \n \n {content}\n \n \n );\n }\n\n return (\n
\n {content}\n \n \n Save\n \n \n \n
\n );\n};\n\nPipelineForm.propTypes = {\n pipeline: PropTypes.object,\n create: PropTypes.bool,\n modal: PropTypes.bool,\n save: PropTypes.func.isRequired,\n onCancel: PropTypes.func,\n};\n\nPipelineForm.defaultProps = {\n modal: true,\n create: false,\n pipeline: {\n id: undefined,\n title: '',\n description: '',\n stages: [{ stage: 0, rules: [] }],\n },\n onCancel: () => {},\n};\n\nexport default PipelineForm;\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 from 'react';\nimport styled from 'styled-components';\n\nimport { Row, Col } from 'components/graylog';\nimport { Timestamp } from 'components/common';\nimport { MetricContainer, CounterRate } from 'components/metrics';\nimport { PipelineType } from 'stores/pipelines/PipelinesStore';\n\nimport PipelineForm from './PipelineForm';\n\nconst PipelineDl = styled.dl`\n & {\n margin-bottom: 0;\n margin-top: 10px;\n }\n\n & > dt {\n text-align: left;\n width: 160px;\n }\n\n & > dt::after {\n content: ':';\n }\n\n & > dd {\n margin-left: 120px;\n }\n`;\n\ntype Props = {\n pipeline?: PipelineType,\n create?: boolean,\n onChange: (event) => void,\n onCancel?: () => void,\n};\n\nconst PipelineDetails = ({ pipeline, create, onChange, onCancel }: Props) => {\n if (create) {\n return ;\n }\n\n return (\n
\n \n \n
\n \n
\n

Details

\n \n
Title
\n
{pipeline.title}
\n
Description
\n
{pipeline.description}
\n
Created
\n
\n
Last modified
\n
\n
Current throughput
\n
\n \n \n \n
\n
\n \n
\n
\n
\n );\n};\n\nPipelineDetails.propTypes = {\n pipeline: PropTypes.object,\n create: PropTypes.bool,\n onChange: PropTypes.func.isRequired,\n onCancel: PropTypes.func,\n};\n\nPipelineDetails.defaultProps = {\n pipeline: undefined,\n create: false,\n onCancel: () => {},\n};\n\nexport default PipelineDetails;\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, { useMemo, useRef, useState } from 'react';\nimport naturalSort from 'javascript-natural-sort';\n\nimport { Link } from 'components/graylog/router';\nimport { ControlLabel, FormGroup, HelpBlock, Button } from 'components/graylog';\nimport { SelectableList } from 'components/common';\nimport BootstrapModalForm from 'components/bootstrap/BootstrapModalForm';\nimport Routes from 'routing/Routes';\nimport { PipelineType } from 'stores/pipelines/PipelinesStore';\nimport { Stream } from 'stores/streams/StreamsStore';\nimport { PipelineConnectionsType } from 'stores/pipelines/PipelineConnectionsStore';\n\ntype Props = {\n pipeline: PipelineType,\n connections: PipelineConnectionsType[],\n streams: Stream[],\n save: (newConnection, callback) => void,\n};\n\ntype FormattedStream = {\n value: string,\n label: string,\n}\n\nconst formatStreams = (streams: Stream[]): FormattedStream[] => {\n return streams\n .map((s) => ({ value: s.id, label: s.title }))\n .sort((s1, s2) => naturalSort(s1.label, s2.label));\n};\n\nconst PipelineConnectionsForm = ({ pipeline, connections, streams, save }: Props) => {\n const modalRef = useRef();\n\n const initialStreamConnections = useMemo(() => {\n return connections\n .filter((c) => c.pipeline_ids && c.pipeline_ids.includes(pipeline.id)) // Get connections for this pipeline\n .filter((c) => streams.some((s) => s.id === c.stream_id)) // Filter out deleted streams\n .map((c) => streams.find((s) => s.id === c.stream_id));\n }, [pipeline, connections, streams]);\n\n const [connectedStreams, setConnectedStreams] = useState(formatStreams(initialStreamConnections));\n\n const notConnectedStreams = useMemo(() => {\n return streams.filter((s) => !connectedStreams.some((cs) => cs.value.toLowerCase() === s.id.toLowerCase()));\n }, [streams, connectedStreams]);\n\n const _openModal = () => {\n if (modalRef.current) {\n modalRef.current.open();\n }\n };\n\n const _onStreamsChange = (newStreams) => {\n setConnectedStreams(newStreams.sort((s1, s2) => naturalSort(s1.label, s2.label)));\n };\n\n const _closeModal = () => {\n if (modalRef.current) {\n modalRef.current.close();\n }\n };\n\n const _save = () => {\n const streamIds = connectedStreams.map((cs) => cs.value);\n const newConnection = {\n pipeline: pipeline.id,\n streams: streamIds,\n };\n\n save(newConnection, _closeModal);\n };\n\n const streamsHelp = (\n \n Select the streams you want to connect to this pipeline, or create one in the{' '}\n Streams page.\n \n );\n\n return (\n \n \n Edit connections for {pipeline.title}}\n onSubmitForm={_save}\n submitButtonText=\"Save\">\n
\n \n Streams\n \n {streamsHelp}\n \n
\n
\n \n );\n};\n\nPipelineConnectionsForm.propTypes = {\n pipeline: PropTypes.object.isRequired,\n connections: PropTypes.array.isRequired,\n streams: PropTypes.array.isRequired,\n save: PropTypes.func.isRequired,\n};\n\nexport default PipelineConnectionsForm;\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, { useCallback, useMemo } from 'react';\nimport styled from 'styled-components';\n\nimport { Row, Col, Alert } from 'components/graylog';\nimport { EntityList, Pluralize } from 'components/common';\nimport { PipelineType, StageType } from 'stores/pipelines/PipelinesStore';\nimport { Stream } from 'stores/streams/StreamsStore';\nimport { PipelineConnectionsType } from 'stores/pipelines/PipelineConnectionsStore';\n\nimport Stage from './Stage';\nimport StageForm from './StageForm';\nimport PipelineDetails from './PipelineDetails';\nimport PipelineConnectionsForm from './PipelineConnectionsForm';\nimport PipelineConnectionsList from './PipelineConnectionsList';\n\nconst ConnectionWarning = styled(Alert)`\n margin-bottom: 13px;\n`;\n\nconst StyledRow = styled(Row)`\n margin-top: 10px;\n`;\n\nconst StyledP = styled.p`\n margin-top: 5px;\n`;\n\ntype Props = {\n pipeline: PipelineType,\n connections: PipelineConnectionsType[],\n streams: Stream[],\n onConnectionsChange: (updatedConnections, callback?) => void,\n onStagesChange: (newStages: StageType[], callback?) => void,\n onPipelineChange: (pipeline: PipelineType, callback?) => void,\n};\n\nconst Pipeline = ({ pipeline, connections, streams, onConnectionsChange, onStagesChange, onPipelineChange }: Props) => {\n const _connectionsWarning = () => {\n if (connections.length === 0) {\n return (\n \n This pipeline is currently not connected to any streams. You have to connect a pipeline to at least one\n stream to make it process incoming messages. Note that this is not required if you intend to use this\n pipeline only for search result transformation using decorators.\n \n );\n }\n\n return null;\n };\n\n const _saveStage = (stage, callback) => {\n const newStages = pipeline.stages.slice();\n\n newStages.push(stage);\n onStagesChange(newStages, callback);\n };\n\n const _updateStage = useCallback((prevStage) => {\n return (stage, callback) => {\n const newStages = pipeline.stages.filter((s) => s.stage !== prevStage.stage);\n\n newStages.push(stage);\n onStagesChange(newStages, callback);\n };\n }, [pipeline, onStagesChange]);\n\n const _deleteStage = useCallback((stage) => {\n return () => {\n // eslint-disable-next-line no-alert\n if (window.confirm(`You are about to delete stage ${stage.stage}, are you sure you want to proceed?`)) {\n const newStages = pipeline.stages.filter((s) => s.stage !== stage.stage);\n\n onStagesChange(newStages);\n }\n };\n }, [pipeline, onStagesChange]);\n\n const _formatConnectedStreams = (connectedStreams) => {\n const formattedStreams = connectedStreams.map((s) => `\"${s.title}\"`);\n const streamList = connectedStreams.length > 1 ? [formattedStreams.slice(0, -1).join(', '), formattedStreams.slice(-1)].join(' and ') : formattedStreams[0];\n\n return (\n \n This pipeline is processing messages from the{' '}\n {' '}\n {streamList}.\n \n );\n };\n\n const formattedStages = useMemo(() => {\n const maxStage = pipeline.stages.reduce((max, currentStage) => Math.max(max, currentStage.stage), -Infinity);\n\n return pipeline.stages\n .sort((s1, s2) => s1.stage - s2.stage)\n .map((stage) => (\n \n ));\n }, [pipeline, _updateStage, _deleteStage]);\n\n const stageKey = useMemo(() => {\n return pipeline.stages.map((s) => s.stage).join('-');\n }, [pipeline.stages]);\n\n return (\n
\n {_connectionsWarning()}\n \n \n \n
\n \n
\n

Pipeline connections

\n \n \n \n
\n \n
\n \n \n
\n \n
\n

Pipeline Stages

\n \n Stages are groups of conditions and actions which need to run in order, and provide the necessary{' '}\n control flow to decide whether or not to run the rest of a pipeline.\n \n \n
\n \n
\n );\n};\n\nPipeline.propTypes = {\n pipeline: PropTypes.object.isRequired,\n connections: PropTypes.array.isRequired,\n streams: PropTypes.array.isRequired,\n onConnectionsChange: PropTypes.func.isRequired,\n onStagesChange: PropTypes.func.isRequired,\n onPipelineChange: PropTypes.func.isRequired,\n};\n\nexport default Pipeline;\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 from 'react';\n\nimport { Row, Col } from 'components/graylog';\nimport history from 'util/History';\nimport Routes from 'routing/Routes';\nimport { PipelineType } from 'stores/pipelines/PipelinesStore';\n\nimport PipelineDetails from './PipelineDetails';\n\ntype Props = {\n onChange: (pipeline: PipelineType, callback?: (pipeline: PipelineType) => void) => void;\n};\n\nconst NewPipeline = ({ onChange }: Props) => {\n const _goToPipeline = (pipeline) => {\n history.push(Routes.SYSTEM.PIPELINES.PIPELINE(pipeline.id));\n };\n\n const _goBack = () => {\n history.goBack();\n };\n\n const _onChange = (newPipeline) => {\n onChange(newPipeline, _goToPipeline);\n };\n\n return (\n \n \n

\n Give a name and description to the new pipeline. You can add stages to it when you save the changes.\n

\n \n \n
\n );\n};\n\nNewPipeline.propTypes = {\n onChange: PropTypes.func.isRequired,\n};\n\nexport default NewPipeline;\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 SourceGenerator = {\n generatePipeline(pipeline) {\n let source = `pipeline \"${pipeline.title}\"\\n`;\n\n pipeline.stages.forEach((stage) => {\n source += `stage ${stage.stage} match ${stage.match?.toLowerCase() || 'either'}\\n`;\n\n stage.rules.forEach((rule) => {\n source += `rule \"${rule}\"\\n`;\n });\n });\n\n source += 'end';\n\n return source;\n },\n};\n\nexport default SourceGenerator;\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 from 'react';\n// eslint-disable-next-line no-restricted-imports\nimport createReactClass from 'create-react-class';\nimport Reflux from 'reflux';\n\nimport { LinkContainer } from 'components/graylog/router';\nimport { Button, Col, Row } from 'components/graylog';\nimport { DocumentTitle, PageHeader, Spinner } from 'components/common';\nimport Pipeline from 'components/pipelines/Pipeline';\nimport NewPipeline from 'components/pipelines/NewPipeline';\nimport SourceGenerator from 'logic/pipelines/SourceGenerator';\nimport ObjectUtils from 'util/ObjectUtils';\nimport Routes from 'routing/Routes';\nimport CombinedProvider from 'injection/CombinedProvider';\nimport withParams from 'routing/withParams';\n\nconst { PipelinesStore, PipelinesActions } = CombinedProvider.get('Pipelines');\nconst { RulesStore } = CombinedProvider.get('Rules');\nconst { PipelineConnectionsStore, PipelineConnectionsActions } = CombinedProvider.get('PipelineConnections');\nconst { StreamsStore } = CombinedProvider.get('Streams');\n\nfunction filterPipeline(state) {\n return state.pipelines ? state.pipelines.filter((p) => p.id === this.props.params.pipelineId)[0] : undefined;\n}\n\nfunction filterConnections(state) {\n if (!state.connections) {\n return undefined;\n }\n\n return state.connections.filter((c) => c.pipeline_ids && c.pipeline_ids.includes(this.props.params.pipelineId));\n}\n\nconst PipelineDetailsPage = createReactClass({\n displayName: 'PipelineDetailsPage',\n\n propTypes: {\n params: PropTypes.object.isRequired,\n },\n\n mixins: [Reflux.connectFilter(PipelinesStore, 'pipeline', filterPipeline), Reflux.connectFilter(PipelineConnectionsStore, 'connections', filterConnections)],\n\n componentDidMount() {\n const { params } = this.props;\n\n if (!this._isNewPipeline(params.pipelineId)) {\n PipelinesActions.get(params.pipelineId);\n }\n\n RulesStore.list();\n PipelineConnectionsActions.list();\n\n StreamsStore.listStreams().then((streams) => {\n const filteredStreams = streams.filter((s) => s.is_editable);\n\n this.setState({ streams: filteredStreams });\n });\n },\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (!this._isNewPipeline(nextProps.params.pipelineId)) {\n PipelinesActions.get(nextProps.params.pipelineId);\n }\n },\n\n _onConnectionsChange(updatedConnections, callback) {\n PipelineConnectionsActions.connectToPipeline(updatedConnections);\n callback();\n },\n\n _onStagesChange(newStages, callback) {\n const { pipeline } = this.state;\n const newPipeline = ObjectUtils.clone(pipeline);\n\n newPipeline.stages = newStages;\n newPipeline.source = SourceGenerator.generatePipeline(newPipeline);\n PipelinesActions.update(newPipeline);\n\n if (typeof callback === 'function') {\n callback();\n }\n },\n\n _savePipeline(pipeline, callback) {\n const requestPipeline = ObjectUtils.clone(pipeline);\n\n requestPipeline.source = SourceGenerator.generatePipeline(pipeline);\n let promise;\n\n if (requestPipeline.id) {\n promise = PipelinesActions.update(requestPipeline);\n } else {\n promise = PipelinesActions.save(requestPipeline);\n }\n\n promise.then((p) => callback(p));\n },\n\n _isNewPipeline(pipelineId) {\n return pipelineId === 'new';\n },\n\n _isLoading() {\n const { params } = this.props;\n const { connections, streams, pipeline } = this.state;\n\n return !this._isNewPipeline(params.pipelineId) && (!pipeline || !connections || !streams);\n },\n\n render() {\n if (this._isLoading()) {\n return ;\n }\n\n const { params } = this.props;\n const { connections, streams, pipeline, rules } = this.state;\n\n let title;\n\n if (this._isNewPipeline(params.pipelineId)) {\n title = 'New pipeline';\n } else {\n title = Pipeline {pipeline.title};\n }\n\n let content;\n\n if (this._isNewPipeline(params.pipelineId)) {\n content = ;\n } else {\n content = (\n \n );\n }\n\n const pageTitle = (this._isNewPipeline(params.pipelineId) ? 'New pipeline' : `Pipeline ${pipeline.title}`);\n\n return (\n \n
\n \n \n Pipelines let you transform and process messages coming from streams. Pipelines consist of stages where\n rules are evaluated and applied. Messages can go through one or more stages.\n \n \n After each stage is completed, you can decide if messages matching all or one of the rules continue to\n the next stage.\n \n\n \n \n \n \n  \n \n \n \n  \n \n \n \n \n \n\n \n \n {content}\n \n \n
\n
\n );\n },\n});\n\nexport default withParams(PipelineDetailsPage);\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 from 'react';\nimport naturalSort from 'javascript-natural-sort';\n\nimport { PipelineType } from 'stores/pipelines/PipelinesStore';\nimport { PipelineConnectionsType } from 'stores/pipelines/PipelineConnectionsStore';\nimport { Stream } from 'stores/streams/StreamsStore';\n\ntype Props = {\n pipeline: PipelineType,\n connections: PipelineConnectionsType[],\n streams: Stream[],\n streamsFormatter: (streams: Stream[]) => React.ReactNode,\n noConnectionsMessage?: React.ReactNode,\n}\n\nconst PipelineConnectionsList = ({ pipeline, connections, streams, streamsFormatter, noConnectionsMessage }: Props) => {\n const streamsUsingPipeline = connections\n .filter((c) => c.pipeline_ids && c.pipeline_ids.includes(pipeline.id)) // Get connections for this pipeline\n .filter((c) => streams.some((s) => s.id === c.stream_id)) // Filter out deleted streams\n .map((c) => streams.find((s) => s.id === c.stream_id))\n .sort((s1, s2) => naturalSort(s1.title, s2.title));\n\n return (\n \n {streamsUsingPipeline.length === 0 ? noConnectionsMessage : streamsFormatter(streamsUsingPipeline)}\n \n );\n};\n\nPipelineConnectionsList.propTypes = {\n pipeline: PropTypes.object.isRequired,\n connections: PropTypes.array.isRequired,\n streams: PropTypes.array.isRequired,\n streamsFormatter: PropTypes.func.isRequired,\n noConnectionsMessage: PropTypes.node,\n};\n\nPipelineConnectionsList.defaultProps = {\n noConnectionsMessage: 'Pipeline not connected to any streams',\n};\n\nexport default PipelineConnectionsList;\n"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy