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

web-interface.assets.e2f54bf1-1076.8e8e52e90967f67c5959.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.5
Show newest version
{"version":3,"file":"e2f54bf1-1076.8e8e52e90967f67c5959.js","mappings":"mUAmBA,MAAMA,UAAgCC,EAAAA,UAAgB,qDACxC,WADwC,kCAGzB,GAHyB,gCAK3B,GAL2B,qBAOtC,GAPsC,6BAS/B,CAACC,EAAMC,KAC1B,GAAIA,EACF,OAAOA,EAAgBC,QAAQC,GACtBC,OAAOD,EAAeE,MAAQD,OAAOJ,KAC3C,EAGL,IAhBkD,qBAmBtCM,IACZ,MAAM,OAAEC,GAAWC,KAAKC,MAExB,OAAOF,EAAOG,MAAMC,GAAUA,EAAMN,KAAOC,GAA3C,IAtBkD,2BAyBhCM,IAClB,GAAIR,OAAOQ,EAAWZ,QAAUI,OAAOI,KAAKK,aAAc,CACxD,MAAMF,EAAQH,KAAKM,WAAWF,EAAWG,OAEzC,OAAIJ,EACM,GAAEA,EAAMK,UAAUL,EAAMM,SAASN,EAAMN,MAGzC,oBAAmBO,EAAWG,QACvC,CAED,OAAIX,OAAOQ,EAAWZ,QAAUI,OAAOI,KAAKU,0BACtCN,EAAWG,MACNH,EAAWG,MAGbP,KAAKW,UAGP,IAAP,IA5CkD,2BA+ChCP,GACdA,EAAWQ,MACNR,EAAWQ,MAGhBhB,OAAOQ,EAAWZ,QAAUI,OAAOI,KAAKK,aACnC,kBAGFL,KAAKW,WAxDsC,CA2DpDE,SACE,MAAM,WAAET,EAAF,gBAAcX,GAAoBO,KAAKC,MACvCN,EAAiBK,KAAKc,mBAAmBV,EAAWZ,KAAMC,GAC1DsB,EAAYX,EAAWY,SAAW,OAAS,KAC3CC,EAAYtB,EAAiBA,EAAeuB,UAAY,KAE9D,OAAItB,OAAOQ,EAAWZ,QAAUI,OAAOI,KAAKmB,wBAExC,mDAKF,4BACE,0BAAKnB,KAAKoB,iBAAiBhB,IAD7B,IAC+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EAAKrC,GAChBwC,KAAKJ,GARc5G,IACpBgE,EAAAA,EAAAA,MAAwB,4CAA2ChE,IACjE,+BADF,IAQCgH,KAAKnJ,KAAKoJ,YAAYC,KAAKrJ,MAC/B,EACDkD,SAAS6F,GACP/I,KAAKyI,UAAUe,KAAKT,EACrB,EACDK,cACEpJ,KAAKyI,UAAUgB,SAASV,GAAaA,KACtC,EACDW,WAAWX,GACTY,IAAAA,KAAY3J,KAAKyI,UAAWM,EAC7B,K","sources":["webpack://graylog-web-interface/./src/components/streamrules/HumanReadableStreamRule.jsx","webpack://graylog-web-interface/./src/components/streamrules/StreamRuleForm.tsx","webpack://graylog-web-interface/./src/components/streamrules/StreamRule.jsx","webpack://graylog-web-interface/./src/components/streamrules/StreamRuleList.jsx","webpack://graylog-web-interface/./src/components/support/SupportLink.tsx","webpack://graylog-web-interface/./src/components/support/SmallSupportLink.tsx","webpack://graylog-web-interface/./src/stores/streams/StreamRulesStore.ts"],"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';\n\nclass HumanReadableStreamRule extends React.Component {\n  EMPTY_TAG = '';\n\n  FIELD_PRESENCE_RULE_TYPE = 5;\n\n  ALWAYS_MATCH_RULE_TYPE = 7;\n\n  MATCH_INPUT = 8;\n\n  _getTypeForInteger = (type, streamRuleTypes) => {\n    if (streamRuleTypes) {\n      return streamRuleTypes.filter((streamRuleType) => {\n        return String(streamRuleType.id) === String(type);\n      })[0];\n    }\n\n    return undefined;\n  };\n\n  _findInput = (inputId) => {\n    const { inputs } = this.props;\n\n    return inputs.find((input) => input.id === inputId);\n  };\n\n  _formatRuleValue = (streamRule) => {\n    if (String(streamRule.type) === String(this.MATCH_INPUT)) {\n      const input = this._findInput(streamRule.value);\n\n      if (input) {\n        return `${input.title} (${input.name}: ${input.id})`;\n      }\n\n      return `: ${streamRule.value})`;\n    }\n\n    if (String(streamRule.type) !== String(this.FIELD_PRESENCE_RULE_TYPE)) {\n      if (streamRule.value) {\n        return streamRule.value;\n      }\n\n      return this.EMPTY_TAG;\n    }\n\n    return null;\n  };\n\n  _formatRuleField = (streamRule) => {\n    if (streamRule.field) {\n      return streamRule.field;\n    }\n\n    if (String(streamRule.type) === String(this.MATCH_INPUT)) {\n      return 'gl_source_input';\n    }\n\n    return this.EMPTY_TAG;\n  };\n\n  render() {\n    const { streamRule, streamRuleTypes } = this.props;\n    const streamRuleType = this._getTypeForInteger(streamRule.type, streamRuleTypes);\n    const negation = (streamRule.inverted ? 'not ' : null);\n    const longDesc = (streamRuleType ? streamRuleType.long_desc : null);\n\n    if (String(streamRule.type) === String(this.ALWAYS_MATCH_RULE_TYPE)) {\n      return (\n        Rule always matches\n      );\n    }\n\n    return (\n      \n        {this._formatRuleField(streamRule)} must {negation}{longDesc} {this._formatRuleValue(streamRule)}\n      \n    );\n  }\n}\n\nHumanReadableStreamRule.propTypes = {\n  streamRule: PropTypes.object.isRequired,\n  streamRuleTypes: PropTypes.array.isRequired,\n  inputs: PropTypes.array,\n};\n\nHumanReadableStreamRule.defaultProps = {\n  inputs: [],\n};\n\nexport default HumanReadableStreamRule;\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 { Icon, TypeAheadFieldInput } from 'components/common';\nimport { Col, Well, BootstrapModalForm, Input } from 'components/bootstrap';\nimport { DocumentationLink } from 'components/support';\nimport HumanReadableStreamRule from 'components/streamrules//HumanReadableStreamRule';\nimport connect from 'stores/connect';\nimport DocsHelper from 'util/DocsHelper';\nimport Version from 'util/Version';\nimport * as FormsUtils from 'util/FormsUtils';\nimport type { Store } from 'stores/StoreTypes';\nimport { InputsActions, InputsStore } from 'stores/inputs/InputsStore';\n\nconst formatStreamRuleType = (streamRuleType) => (\n  \n);\n\nconst formatInputOptions = (input) => (\n  \n);\n\ntype StreamRule = {\n  type: number,\n  field: string,\n  value: string,\n  id?: string,\n  inverted: boolean,\n  description: string,\n};\n\ntype StreamRuleType = {\n  id: number,\n  short_desc: string,\n  long_desc: string,\n  name: string,\n};\n\ntype Props = {\n  onSubmit: (streamRuleId: string | undefined | null, currentStreamRule: StreamRule) => void,\n  streamRule?: StreamRule,\n  streamRuleTypes: Array,\n  title: string,\n  inputs?: Array,\n  onClose: () => void,\n  submitButtonText: string\n  submitLoadingText: string\n};\n\ntype State = {\n  streamRule: StreamRule,\n  error: string,\n};\n\nclass StreamRuleForm extends React.Component {\n  static defaultProps = {\n    // eslint-disable-next-line react/default-props-match-prop-types\n    streamRule: { field: '', type: 1, value: '', inverted: false, description: '' },\n    // eslint-disable-next-line react/default-props-match-prop-types\n    inputs: [],\n    onClose: () => {},\n  };\n\n  static propTypes = {\n    onSubmit: PropTypes.func.isRequired,\n    streamRuleTypes: PropTypes.array.isRequired,\n    title: PropTypes.string.isRequired,\n    onClose: PropTypes.func,\n    submitButtonText: PropTypes.string.isRequired,\n    submitLoadingText: PropTypes.string.isRequired,\n  };\n\n  FIELD_PRESENCE_RULE_TYPE = 5;\n\n  ALWAYS_MATCH_RULE_TYPE = 7;\n\n  MATCH_INPUT = 8;\n\n  PLACEHOLDER_INPUT = 0;\n\n  constructor(props) {\n    super(props);\n\n    this.state = {\n      streamRule: props.streamRule,\n      error: '',\n    };\n  }\n\n  componentDidMount() {\n    InputsActions.list();\n  }\n\n  _validateMatchInput = () => {\n    const { streamRule: { value } } = this.state;\n\n    if (String(value) === String(this.PLACEHOLDER_INPUT)) {\n      this.setState({ error: 'Please choose an input' });\n\n      return false;\n    }\n\n    this.setState({ error: '' });\n\n    return true;\n  };\n\n  _onSubmit = () => {\n    const { streamRule: currentStreamRule } = this.state;\n    const { type } = currentStreamRule;\n    const { streamRule, onSubmit } = this.props;\n    const { onClose } = this.props;\n\n    if (type === this.ALWAYS_MATCH_RULE_TYPE) {\n      currentStreamRule.field = '';\n      this.setState({ streamRule: currentStreamRule });\n    }\n\n    if (type === this.FIELD_PRESENCE_RULE_TYPE || type === this.ALWAYS_MATCH_RULE_TYPE) {\n      currentStreamRule.value = '';\n      this.setState({ streamRule: currentStreamRule });\n    }\n\n    if (String(type) === String(this.MATCH_INPUT)) {\n      if (!this._validateMatchInput()) {\n        return;\n      }\n    }\n\n    onSubmit(streamRule.id, currentStreamRule);\n    onClose();\n  };\n\n  handleChange = (event) => {\n    const { streamRule } = this.state;\n    const updatedStreamRule = { ...streamRule };\n\n    updatedStreamRule[event.target.name] = FormsUtils.getValueFromInput(event.target);\n\n    if (event.target.name === 'type' && String(updatedStreamRule.type) === String(this.MATCH_INPUT)) {\n      updatedStreamRule.value = String(this.PLACEHOLDER_INPUT);\n    }\n\n    this.setState({ streamRule: updatedStreamRule });\n  };\n\n  valueBox = () => {\n    const { streamRule: { value, type }, error } = this.state;\n    const { inputs } = this.props;\n\n    switch (String(type)) {\n      case String(this.FIELD_PRESENCE_RULE_TYPE):\n      case String(this.ALWAYS_MATCH_RULE_TYPE):\n        return '';\n\n      case String(this.MATCH_INPUT): {\n        const bsStyle = error && error.length > 0 ? 'error' : undefined;\n\n        return (\n          \n            \n            {inputs.map(formatInputOptions)}\n          \n        );\n      }\n\n      default:\n        return ;\n    }\n  };\n\n  fieldBox = () => {\n    const { streamRule: { field, type } } = this.state;\n\n    switch (String(type)) {\n      case String(this.ALWAYS_MATCH_RULE_TYPE):\n      case String(this.MATCH_INPUT):\n        return '';\n      default:\n        return ;\n    }\n  };\n\n  render() {\n    const { streamRule } = this.state;\n    const { type, inverted, description } = streamRule;\n    const { streamRuleTypes: ruleTypes, title, onClose, inputs, submitButtonText, submitLoadingText } = this.props;\n\n    const streamRuleTypes = ruleTypes.map(formatStreamRuleType);\n    const fieldBox = this.fieldBox();\n    const valueBox = this.valueBox();\n\n    return (\n      \n        
\n \n {fieldBox}\n \n {streamRuleTypes}\n \n {valueBox}\n \n\n \n\n

\n Result:\n {' '}\n \n

\n \n \n \n The server will try to convert to strings or numbers based on the matcher type as well as it can.\n\n

\n  \n Take a look at the matcher code on GitHub\n \n

\n Regular expressions use Java syntax. } />\n
\n \n
\n
\n );\n }\n}\n\ntype InputsStoreState = {\n inputs: Array;\n};\n\nexport default connect(StreamRuleForm,\n { inputs: InputsStore as Store },\n ({ inputs }) => ({ inputs: inputs.inputs }));\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, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { isEmpty } from 'lodash';\nimport styled from 'styled-components';\n\nimport { useStore } from 'stores/connect';\nimport { Icon } from 'components/common';\nimport { Button, ListGroupItem } from 'components/bootstrap';\nimport { isPermitted } from 'util/PermissionsMixin';\nimport StreamRuleForm from 'components/streamrules/StreamRuleForm';\nimport HumanReadableStreamRule from 'components/streamrules/HumanReadableStreamRule';\nimport UserNotification from 'util/UserNotification';\nimport { InputsActions, InputsStore } from 'stores/inputs/InputsStore';\nimport { StreamRulesStore } from 'stores/streams/StreamRulesStore';\n\nconst ActionButtonsWrap = styled.span`\n margin-right: 6px;\n`;\n\nconst StreamRule = ({ matchData, permissions, stream, streamRule, streamRuleTypes, onSubmit, onDelete }) => {\n const [showStreamRuleForm, setShowStreamRuleForm] = useState(false);\n const { inputs } = useStore(InputsStore);\n\n useEffect(() => {\n InputsActions.list();\n }, []);\n\n const _onEdit = (event) => {\n event.preventDefault();\n setShowStreamRuleForm(true);\n };\n\n const _onDelete = (event) => {\n event.preventDefault();\n\n /* TODO: Replace with custom confirmation dialog */\n // eslint-disable-next-line no-alert\n if (window.confirm('Do you really want to delete this stream rule?')) {\n StreamRulesStore.remove(stream.id, streamRule.id, () => {\n if (onDelete) {\n onDelete(streamRule.id);\n }\n\n UserNotification.success('Stream rule has been successfully deleted.', 'Success');\n });\n }\n };\n\n const _onSubmit = (streamRuleId, data) => {\n StreamRulesStore.update(stream.id, streamRuleId, data, () => {\n if (onSubmit) {\n onSubmit(streamRuleId, data);\n }\n\n UserNotification.success('Stream rule has been successfully updated.', 'Success');\n });\n };\n\n const _formatActionItems = () => {\n return (\n \n \n \n \n );\n };\n\n const matchDataStyle = () => (matchData.rules[streamRule.id] ? 'success' : 'danger');\n const actionItems = isPermitted(permissions, [`streams:edit:${stream.id}`]) ? _formatActionItems() : null;\n const description = streamRule.description ? {' '}({streamRule.description}) : null;\n const listGroupStyle = !isEmpty(matchData) ? matchDataStyle() : null;\n\n return (\n \n {actionItems}\n \n {showStreamRuleForm && (\n setShowStreamRuleForm(false)}\n streamRuleTypes={streamRuleTypes}\n title=\"Edit Stream Rule\"\n submitButtonText=\"Update Rule\"\n submitLoadingText=\"Updating Rule...\"\n onSubmit={_onSubmit} />\n )}\n {description}\n \n );\n};\n\nStreamRule.propTypes = {\n matchData: PropTypes.shape({\n matches: PropTypes.bool,\n rules: PropTypes.object,\n }),\n onDelete: PropTypes.func,\n onSubmit: PropTypes.func,\n permissions: PropTypes.array.isRequired,\n stream: PropTypes.object.isRequired,\n streamRule: PropTypes.object.isRequired,\n streamRuleTypes: PropTypes.array.isRequired,\n};\n\nStreamRule.defaultProps = {\n matchData: {},\n onSubmit: () => {},\n onDelete: () => {},\n};\n\nexport default StreamRule;\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 StreamRule from 'components/streamrules/StreamRule';\nimport { Spinner } from 'components/common';\nimport { ListGroup, ListGroupItem } from 'components/bootstrap';\n\nclass StreamRuleList extends React.Component {\n static propTypes = {\n matchData: PropTypes.shape({\n matches: PropTypes.bool,\n rules: PropTypes.object,\n }),\n onSubmit: PropTypes.func,\n onDelete: PropTypes.func,\n permissions: PropTypes.array.isRequired,\n stream: PropTypes.object.isRequired,\n streamRuleTypes: PropTypes.array.isRequired,\n };\n\n static defaultProps = {\n matchData: {},\n onSubmit: () => {},\n onDelete: () => {},\n };\n\n _formatStreamRules = (streamRules) => {\n if (streamRules && streamRules.length > 0) {\n const {\n matchData,\n onDelete,\n onSubmit,\n permissions,\n stream,\n streamRuleTypes,\n } = this.props;\n\n return streamRules.map((streamRule) => (\n \n ));\n }\n\n return No rules defined.;\n };\n\n render() {\n const { stream } = this.props;\n\n if (stream) {\n const streamRules = this._formatStreamRules(stream.rules);\n\n return (\n \n {streamRules}\n \n );\n }\n\n return ;\n }\n}\n\nexport default StreamRuleList;\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 PropTypes from 'prop-types';\nimport styled, { css } from 'styled-components';\n\nimport Icon from 'components/common/Icon';\n\ntype Props = {\n children: React.ReactNode,\n small: boolean,\n};\n\nconst IconStack = styled.div<{ small: boolean }>(({ small, theme }) => css`\n position: relative;\n min-width: 2.5em;\n font-size: ${small ? theme.fonts.size.body : theme.fonts.size.large};\n \n .fa-stack-1x {\n color: ${theme.colors.global.textAlt};\n }\n \n .fa-stack-2x {\n color: ${theme.colors.global.textDefault};\n }\n`);\n\nconst SupportLink = ({ small, children }: Props) => {\n return (\n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n {children}\n \n
\n );\n};\n\nSupportLink.propTypes = {\n small: PropTypes.bool,\n children: PropTypes.node.isRequired,\n};\n\nSupportLink.defaultProps = {\n small: false,\n};\n\nexport default SupportLink;\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 * as React from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Icon } from 'components/common';\n\ntype Props = {\n children: React.ReactNode,\n className?: string,\n};\n\nconst Description = styled.div`\n display: inline-flex;\n justify-content: center;\n align-items: center;\n`;\n\nconst IconStack = styled.div(({ theme }) => css`\n position: relative;\n min-width: 2.5em;\n \n .fa-stack-1x {\n color: ${theme.colors.global.textAlt};\n }\n \n .fa-stack-2x {\n color: ${theme.colors.global.textDefault};\n }\n`);\n\nconst Content = styled.p`\n font-weight: bold;\n margin: 0;\n`;\n\nconst SmallSupportLink = ({ children, className }: Props) => {\n return (\n \n \n \n \n \n\n \n {children}\n \n \n );\n};\n\nSmallSupportLink.propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string,\n};\n\nSmallSupportLink.defaultProps = {\n className: undefined,\n};\n\nexport default SmallSupportLink;\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 lodash from 'lodash';\n\nimport fetch from 'logic/rest/FetchProvider';\nimport ApiRoutes from 'routing/ApiRoutes';\nimport * as URLUtils from 'util/URLUtils';\nimport UserNotification from 'util/UserNotification';\nimport { singletonStore } from 'logic/singleton';\n\ntype StreamRule = {\n field: string,\n type: number,\n value: string,\n inverted: boolean,\n description: string,\n};\n\ntype Callback = {\n (): void,\n};\n\n// eslint-disable-next-line import/prefer-default-export\nexport const StreamRulesStore = singletonStore(\n 'core.StreamRules',\n () => Reflux.createStore({\n callbacks: [],\n\n types() {\n const url = '/streams/null/rules/types';\n const promise = fetch('GET', URLUtils.qualifyUrl(url));\n\n return promise;\n },\n update(streamId: string, streamRuleId: string, data: StreamRule, callback: (() => void)) {\n const failCallback = (error) => {\n UserNotification.error(`Updating Stream Rule failed with status: ${error}`,\n 'Could not update Stream Rule');\n };\n\n const url = URLUtils.qualifyUrl(ApiRoutes.StreamRulesApiController.update(streamId, streamRuleId).url);\n const request = {\n field: data.field,\n type: data.type,\n value: data.value,\n inverted: data.inverted,\n description: data.description,\n };\n\n fetch('PUT', url, request)\n .then(callback, failCallback)\n .then(this._emitChange.bind(this));\n },\n remove(streamId: string, streamRuleId: string, callback: (() => void)) {\n const failCallback = (error) => {\n UserNotification.error(`Deleting Stream Rule failed with status: ${error}`,\n 'Could not delete Stream Rule');\n };\n\n const url = URLUtils.qualifyUrl(ApiRoutes.StreamRulesApiController.delete(streamId, streamRuleId).url);\n\n fetch('DELETE', url)\n .then(callback, failCallback)\n .then(this._emitChange.bind(this));\n },\n create(streamId: string, data: StreamRule, callback: (() => void)) {\n const failCallback = (error) => {\n UserNotification.error(`Creating Stream Rule failed with status: ${error}`,\n 'Could not create Stream Rule');\n };\n\n const url = URLUtils.qualifyUrl(ApiRoutes.StreamRulesApiController.create(streamId).url);\n\n fetch('POST', url, data)\n .then(callback, failCallback)\n .then(this._emitChange.bind(this));\n },\n onChange(callback: Callback) {\n this.callbacks.push(callback);\n },\n _emitChange() {\n this.callbacks.forEach((callback) => callback());\n },\n unregister(callback: Callback) {\n lodash.pull(this.callbacks, callback);\n },\n }),\n);\n"],"names":["HumanReadableStreamRule","React","type","streamRuleTypes","filter","streamRuleType","String","id","inputId","inputs","this","props","find","input","streamRule","MATCH_INPUT","_findInput","value","title","name","FIELD_PRESENCE_RULE_TYPE","EMPTY_TAG","field","render","_getTypeForInteger","negation","inverted","longDesc","long_desc","ALWAYS_MATCH_RULE_TYPE","_formatRuleField","_formatRuleValue","propTypes","PropTypes","defaultProps","formatStreamRuleType","key","short_desc","formatInputOptions","StreamRuleForm","constructor","super","state","PLACEHOLDER_INPUT","setState","error","currentStreamRule","onSubmit","onClose","_validateMatchInput","event","updatedStreamRule","target","FormsUtils","bsStyle","length","undefined","help","required","label","onChange","handleChange","map","defaultValue","autoFocus","componentDidMount","InputsActions","description","ruleTypes","submitButtonText","submitLoadingText","fieldBox","valueBox","show","onCancel","onModalClose","onSubmitForm","_onSubmit","formProps","md","checked","bsSize","className","href","Version","rel","page","DocsHelper","text","connect","InputsStore","ActionButtonsWrap","styled","StreamRule","matchData","permissions","stream","onDelete","showStreamRuleForm","setShowStreamRuleForm","useState","useStore","useEffect","_onEdit","preventDefault","_onDelete","window","confirm","StreamRulesStore","UserNotification","actionItems","isPermitted","onClick","listGroupStyle","isEmpty","rules","streamRuleId","data","matches","StreamRuleList","streamRules","_formatStreamRules","componentClass","IconStack","small","theme","css","fonts","size","body","large","colors","global","textAlt","textDefault","SupportLink","children","style","marginBottom","display","width","inverse","Description","Content","SmallSupportLink","singletonStore","Reflux","callbacks","types","fetch","URLUtils","update","streamId","callback","url","ApiRoutes","request","then","_emitChange","bind","remove","create","push","forEach","unregister","lodash"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy