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

web-interface.assets.e2f54bf1-5031.ee9a7b5a1965c924ff53.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.5
Show newest version
{"version":3,"file":"e2f54bf1-5031.ee9a7b5a1965c924ff53.js","mappings":"keAwBA,MAAMA,EAAsBC,EAAAA,QAAAA,IAAAA,WAAH,qFAAGA,EAAW,QAAC,MAAEC,GAAH,SAAeC,EAAAA,EAAAA,KAAd,CAAD,oLAKtBD,EAAME,MAAMC,KAAKC,MALK,IAuBvC,MAAMC,UAA6BC,EAAAA,UAAgB,kEAMzB,KACtBC,KAAKC,iBAAiB,MAAtB,IAP+C,+BAU1B,KACrBD,KAAKC,iBAAiB,KAAtB,IAX+C,2BAc7BC,IAClB,MAAM,SAAEC,EAAF,OAAYC,GAAWJ,KAAKK,MAG9BC,OAAOC,QAAQ,iIACjBC,EAAAA,GAAAA,OAAoBJ,EAAOK,GAAI,CAAEC,cAAeR,IAAaS,IAC3DR,IAEAS,EAAAA,EAAAA,QAA0B,oDAAgE,QAAbV,EAAqB,MAAQ,0BACxG,WAEKS,IAEV,GA3B8C,CA8BjDE,SACE,MAAM,OAAET,GAAWJ,KAAKK,MAExB,OACE,gBAACd,EAAD,KACE,2BACE,gBAAC,KAAD,CAAOkB,GAAG,2BACHK,KAAK,QACLC,MAAM,kDACNC,QAAkC,QAAzBZ,EAAOM,cAChBP,SAAUH,KAAKiB,wBACtB,gBAAC,KAAD,CAAOR,GAAG,0BACHK,KAAK,QACLC,MAAM,2DACNC,QAAkC,OAAzBZ,EAAOM,cAChBP,SAAUH,KAAKkB,wBAI7B,E,EAjDGpB,EAAAA,YACe,CACjBM,OAAQe,IAAAA,OAAAA,WACRhB,SAAUgB,IAAAA,KAAAA,aAiDd,U,4LCnEA,MAAMC,GAAoB5B,EAAAA,EAAAA,SAAO6B,EAAAA,GAAAA,SAAV,0FAAG7B,CAAH,uBAIjB8B,GAAY9B,EAAAA,EAAAA,UAAO,QAAG+B,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MAArC,KACPuB,kBAAmB,CACjBvB,MAAO,wBACPwB,KAAMC,EAAAA,EAAAA,MAAAA,UAElB,qIACyG,IADzG,0EAMDL,GAdP,C","sources":["webpack://graylog-web-interface/./src/components/streams/MatchingTypeSwitcher.jsx","webpack://graylog-web-interface/./src/components/streamrules/StreamRulesEditor.jsx","webpack://graylog-web-interface/./src/pages/StreamEditPage.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 PropTypes from 'prop-types';\nimport React from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Input } from 'components/bootstrap';\nimport UserNotification from 'util/UserNotification';\nimport StreamsStore from 'stores/streams/StreamsStore';\n\nconst StreamRuleConnector = styled.div(({ theme }) => css`\n  margin-top: 10px;\n  margin-bottom: 13px;\n\n  label {\n    font-size: ${theme.fonts.size.small};\n  }\n\n  .form-group {\n    margin-bottom: 5px;\n  }\n\n  .radio {\n    margin-top: 0;\n    margin-bottom: 0;\n  }\n\n  input[type=radio] {\n    margin-top: 2px;\n    margin-bottom: 2px;\n  }\n`);\n\nclass MatchingTypeSwitcher extends React.Component {\n  static propTypes = {\n    stream: PropTypes.object.isRequired,\n    onChange: PropTypes.func.isRequired,\n  };\n\n  handleTypeChangeToAnd = () => {\n    this.handleTypeChange('AND');\n  };\n\n  handleTypeChangeToOr = () => {\n    this.handleTypeChange('OR');\n  };\n\n  handleTypeChange = (newValue) => {\n    const { onChange, stream } = this.props;\n\n    // eslint-disable-next-line no-alert\n    if (window.confirm('You are about to change how rules are applied to this stream, do you want to continue? Changes will take effect immediately.')) {\n      StreamsStore.update(stream.id, { matching_type: newValue }, (response) => {\n        onChange();\n\n        UserNotification.success(`Messages will now be routed into the stream when ${newValue === 'AND' ? 'all' : 'any'} rules are matched`,\n          'Success');\n\n        return response;\n      });\n    }\n  };\n\n  render() {\n    const { stream } = this.props;\n\n    return (\n      \n        
\n \n \n
\n
\n );\n }\n}\n\nexport default MatchingTypeSwitcher;\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, { css } from 'styled-components';\n\nimport { LinkContainer } from 'components/common/router';\nimport Routes from 'routing/Routes';\nimport { Button, Col, Panel, Row } from 'components/bootstrap';\nimport { Icon } from 'components/common';\nimport LoaderTabs from 'components/messageloaders/LoaderTabs';\nimport MatchingTypeSwitcher from 'components/streams/MatchingTypeSwitcher';\nimport StreamRuleList from 'components/streamrules/StreamRuleList';\nimport StreamRuleForm from 'components/streamrules/StreamRuleForm';\nimport Spinner from 'components/common/Spinner';\nimport StreamsStore from 'stores/streams/StreamsStore';\nimport { StreamRulesStore } from 'stores/streams/StreamRulesStore';\n\nconst StreamAlertHeader = styled(Panel.Heading)`\n font-weight: bold;\n`;\n\nconst MatchIcon = styled(({ empty: _empty, matches: _matches, ...props }) => )(\n ({ empty, matches, theme }) => {\n const matchColor = matches ? theme.colors.variant.success : theme.colors.variant.danger;\n\n return css`\n color: ${empty ? theme.colors.variant.info : matchColor};\n margin-right: 3px;\n `;\n },\n);\n\nconst StyledSpinner = styled(Spinner)`\n margin-left: 10px;\n`;\n\nconst getListClassName = (matchData) => {\n return (matchData.matches ? 'success' : 'danger');\n};\n\nclass StreamRulesEditor extends React.Component {\n static propTypes = {\n currentUser: PropTypes.object.isRequired,\n streamId: PropTypes.string.isRequired,\n messageId: PropTypes.string,\n index: PropTypes.string,\n };\n\n static defaultProps = {\n messageId: '',\n index: '',\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n showStreamRuleForm: false,\n };\n }\n\n componentDidMount() {\n this.loadData();\n StreamsStore.onChange(this.loadData);\n StreamRulesStore.onChange(this.loadData);\n }\n\n componentWillUnmount() {\n StreamsStore.unregister(this.loadData);\n StreamRulesStore.unregister(this.loadData);\n }\n\n onMessageLoaded = (message) => {\n this.setState({ message: message });\n\n if (message !== undefined) {\n const { streamId } = this.props;\n\n StreamsStore.testMatch(streamId, { message: message.fields }, (resultData) => {\n this.setState({ matchData: resultData });\n });\n } else {\n this.setState({ matchData: undefined });\n }\n };\n\n loadData = () => {\n const { streamId } = this.props;\n const { message } = this.state;\n\n StreamRulesStore.types().then((types) => {\n this.setState({ streamRuleTypes: types });\n });\n\n StreamsStore.get(streamId, (stream) => {\n this.setState({ stream: stream });\n });\n\n if (message) {\n this.onMessageLoaded(message);\n }\n };\n\n _onStreamRuleFormSubmit = (streamRuleId, data) => {\n const { streamId } = this.props;\n\n StreamRulesStore.create(streamId, data, () => {});\n };\n\n _onAddStreamRule = (event) => {\n event.preventDefault();\n this.setState({ showStreamRuleForm: true });\n };\n\n _explainMatchResult = () => {\n const { matchData } = this.state;\n\n if (matchData) {\n if (matchData.matches) {\n return (\n <>\n This message would be routed to this stream!\n \n );\n }\n\n return (\n <>\n This message would not be routed to this stream.\n \n );\n }\n\n return (\n <>\n Please load a message in Step 1 above to check if it would match against these rules.\n \n );\n };\n\n render() {\n const { matchData, stream, streamRuleTypes, showStreamRuleForm } = this.state;\n const { currentUser, messageId, index } = this.props;\n const styles = (matchData ? getListClassName(matchData) : 'info');\n\n if (stream && streamRuleTypes) {\n return (\n \n \n

1. Load a message to test rules

\n\n
\n \n
\n\n
\n\n
\n \n {showStreamRuleForm && (\n this.setState({ showStreamRuleForm: false })}\n streamRuleTypes={streamRuleTypes}\n submitButtonText=\"Create Rule\"\n submitLoadingText=\"Creating Rule...\"\n onSubmit={this._onStreamRuleFormSubmit} />\n )}\n
\n\n

2. Manage stream rules

\n\n \n \n {this._explainMatchResult()}\n \n \n\n

\n \n \n \n

\n \n
\n );\n }\n\n return (\n \n \n \n );\n }\n}\n\nexport default StreamRulesEditor;\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';\nimport { useParams } from 'react-router-dom';\n\nimport { Alert } from 'components/bootstrap';\nimport StreamRulesEditor from 'components/streamrules/StreamRulesEditor';\nimport { DocumentTitle, PageHeader, Spinner } from 'components/common';\nimport StreamsStore from 'stores/streams/StreamsStore';\nimport useCurrentUser from 'hooks/useCurrentUser';\nimport useQuery from 'routing/useQuery';\nimport DocsHelper from 'util/DocsHelper';\n\nconst StreamEditPage = () => {\n const params = useParams<{ streamId: string }>();\n const query = useQuery();\n const currentUser = useCurrentUser();\n const [stream, setStream] = useState<{ is_default: boolean, title: string } | undefined>();\n\n useEffect(() => {\n StreamsStore.get(params.streamId, (newStream: { is_default: boolean, title: string }) => {\n setStream(newStream);\n });\n }, [params.streamId]);\n\n const isLoading = !currentUser || !stream;\n\n if (isLoading) {\n return ;\n }\n\n let content = (\n \n );\n\n if (stream.is_default) {\n content = (\n
\n
\n \n The default stream cannot be edited.\n \n
\n
\n );\n }\n\n return (\n \n
\n Rules of Stream »{stream.title}»}\n documentationLink={{\n title: 'Streams documentation',\n path: DocsHelper.PAGES.STREAMS,\n }}>\n \n This screen is dedicated to an easy and comfortable creation and manipulation of stream rules. You can{' '}\n see the effect configured stream rules have on message matching here.\n \n \n\n {content}\n
\n
\n );\n};\n\nexport default StreamEditPage;\n"],"names":["StreamRuleConnector","styled","theme","css","fonts","size","small","MatchingTypeSwitcher","React","this","handleTypeChange","newValue","onChange","stream","props","window","confirm","StreamsStore","id","matching_type","response","UserNotification","render","type","label","checked","handleTypeChangeToAnd","handleTypeChangeToOr","PropTypes","StreamAlertHeader","Panel","MatchIcon","empty","_empty","matches","_matches","matchColor","colors","variant","success","danger","info","StyledSpinner","Spinner","StreamRulesEditor","constructor","super","message","setState","undefined","streamId","fields","resultData","matchData","state","StreamRulesStore","then","types","streamRuleTypes","onMessageLoaded","streamRuleId","data","event","preventDefault","showStreamRuleForm","name","componentDidMount","loadData","componentWillUnmount","currentUser","messageId","index","styles","getListClassName","className","md","LoaderTabs","bsStyle","onClick","_onAddStreamRule","StreamRuleForm","title","onClose","submitButtonText","submitLoadingText","onSubmit","_onStreamRuleFormSubmit","_explainMatchResult","StreamRuleList","permissions","to","Routes","params","useParams","query","useQuery","useCurrentUser","setStream","useState","useEffect","newStream","content","message_id","is_default","documentationLink","path","DocsHelper"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy