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

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

There is a newer version: 6.0.2
Show newest version
{"version":3,"sources":["webpack:///./src/components/extractors/AddExtractorWizard.jsx","webpack:///./src/components/extractors/ExtractorsListItem.jsx","webpack:///./src/components/extractors/ExtractorSortModal.jsx","webpack:///./src/components/extractors/ExtractorsList.jsx","webpack:///./src/pages/ExtractorsPage.jsx"],"names":["AddExtractorWizard","showExtractorForm","setState","state","extractorForm","this","extractorFieldActions","MessageFieldExtractorActions","fieldName","message","className","LoaderTabs","selectedInputId","props","inputId","customFieldActions","md","style","marginBottom","bsStyle","bsSize","onClick","_showAddExtractorForm","disabled","React","Component","PropTypes","string","ExtractorsActions","ActionsProvider","getActions","ExtractorsListItem","showDetails","extractor","window","confirm","title","triggerPromise","source_field","target_field","cursor_strategy","condition_type","condition_value","actions","nodeId","push","key","id","_toggleDetails","to","Routes","edit_input_extractor","_deleteExtractor","options","Object","keys","map","attribute","extractorConfig","formattedOptions","_formatOptions","length","converter","type","config","converters","formattedConverters","converterKey","_formatConverter","timing","numeral","format","std_dev","mean","min","max","metrics","totalRate","total","rate","one_minute","five_minute","fifteen_minute","totalTime","conditionTime","executionTime","convertersTime","conditionCounts","condition_hits","condition_misses","time","_formatTimingMetrics","condition","execution","display","_formatCondition","_formatConfiguration","extractor_config","_formatConverters","_formatMetrics","EntityListItem","titleSuffix","ExtractorUtils","getReadableExtractorTypeName","description","_formatExtractorSubtitle","_formatActions","contentRow","_formatDetails","object","isRequired","ExtractorSortModal","modal","open","close","extractors","sortedExtractors","newSorting","input","order","then","BootstrapModalWrapper","ref","onHide","_cancel","Header","closeButton","Title","Body","SortableList","items","onMoveItem","_updateSorting","displayOverlayInPortal","Footer","_saveSorting","array","ExtractorsStore","StoreProvider","getStore","ExtractorsList","createReactClass","displayName","propTypes","node","mixins","Reflux","connect","ListenerMethods","componentDidMount","list","_formatExtractor","node_id","_isLoading","_openSortModal","sortModal","render","sortExtractorsButton","Spinner","formattedExtractors","sort","extractor1","extractor2","naturalSort","EntityList","bsNoItemsStyle","noItemsText","NodesActions","InputsActions","NodesStore","ExtractorsPage","params","listenTo","getInitialState","undefined","get","onNodesChange","nodes","newNode","values","filter","is_master","PageHeader","DocumentationLink","page","DocsHelper","PAGES","EXTRACTORS","text","pullRight","import_extractors","export_extractors","withParams"],"mappings":"8wDAuBMA,E,kaAKI,CACNC,mBAAmB,I,gCAGG,WACtB,EAAKC,SAAS,CAAED,mBAAoB,EAAKE,MAAMF,uB,qCAGjD,WACE,IAAIG,EAEJ,GAAIC,KAAKF,MAAMF,kBAAmB,CAEhC,IAAMK,EAAwB,kBAACC,EAAA,EAAD,CAA8BC,UAAU,GAAGC,QAAS,KAElFL,EACE,yBAAKM,UAAU,iBACb,kBAACC,EAAA,EAAD,CAAYC,gBAAiBP,KAAKQ,MAAMC,QAASC,mBAAoBT,KAK3E,OACE,kBAAC,IAAD,CAAKI,UAAU,WACb,kBAAC,IAAD,CAAKM,GAAI,IACP,wBAAIC,MAAO,CAAEC,aAAc,IAA3B,iBAEA,4MAIA,2BACE,kBAAC,IAAD,CAAQC,QAAQ,OAAOC,OAAO,QAAQC,QAAShB,KAAKiB,sBAAuBC,SAAUlB,KAAKF,MAAMF,mBAAhG,gBAKDG,S,8BA1CsBoB,IAAMC,W,EAAjCzB,E,YACe,CACjBc,QAASY,IAAUC,SA+CR3B,Q,giDC7Cf,IAAM4B,EAAoBC,IAAgBC,WAAW,cAE/CC,E,kaAOI,CACNC,aAAa,I,yBAGE,WAAM,IACbA,EAAgB,EAAK7B,MAArB6B,YAER,EAAK9B,SAAS,CAAE8B,aAAcA,O,2BAGb,WAAM,MACQ,EAAKnB,MAA5BoB,EADe,EACfA,UAAWnB,EADI,EACJA,QAGfoB,OAAOC,QAAP,mCAA2CF,EAAUG,MAArD,QACFR,EAAiB,OAAQS,eAAevB,EAASmB,M,mCAI1B,WAAM,IACvBA,EAAc,EA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,KAER,QAHW,EACG1B,OAEI0B,IAGpBY,OAvCsC,WAwCpC,GAAIvJ,KAAKoJ,aACP,OAAO,kBAAC,KAAD,MAFF,MAKiBpJ,KAAKF,MAArB6I,EALD,EAKCA,KAAM1B,EALP,EAKOA,MAEd,OACE,kBAAC,IAAD,CAAelF,MAAK,wBAAmBkF,EAAMlF,QAC3C,6BACE,kBAACkJ,EAAA,EAAD,CAAYlJ,MAAO,+CAAoB,4BAAKkF,EAAMlF,SAChD,0IAC4G,IAD5G,iFAEiF,IAFjF,4GAG4G,IAH5G,MAIK,kDAJL,oBAOA,8EAEG,IAAI,kBAACmJ,GAAA,EAAD,CAAmBC,KAAMC,KAAWC,MAAMC,WAAYC,KAAK,kBAFlE,KAKA,kBAAC,IAAD,CAAgBzK,QAAQ,OAAOC,OAAO,QAAQ2B,GAAG,6BAA6BX,MAAM,UAAUyJ,WAAS,GACrG,kBAAC,IAAD,CAAe5I,GAAIC,IAAO4I,kBAAkB9C,EAAKQ,QAASlC,EAAMvE,KAC9D,kBAAC,IAAD,2BAEF,kBAAC,IAAD,CAAeE,GAAIC,IAAO6I,kBAAkB/C,EAAKQ,QAASlC,EAAMvE,KAC9D,kBAAC,IAAD,6BAIN,kBAAC,GAAD,CAAgBuE,MAAOA,EAAO0B,KAAMA,SAO/BgD,uBAAWtB","file":"57e33c6c-94.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 from 'react';\n\nimport { Row, Col, Button } from 'components/graylog';\nimport LoaderTabs from 'components/messageloaders/LoaderTabs';\nimport MessageFieldExtractorActions from 'components/search/MessageFieldExtractorActions';\n\nclass AddExtractorWizard extends React.Component {\n  static propTypes = {\n    inputId: PropTypes.string,\n  };\n\n  state = {\n    showExtractorForm: false,\n  };\n\n  _showAddExtractorForm = () => {\n    this.setState({ showExtractorForm: !this.state.showExtractorForm });\n  };\n\n  render() {\n    let extractorForm;\n\n    if (this.state.showExtractorForm) {\n      // Components using this component, will give it a proper fieldName and message\n      const extractorFieldActions = ;\n\n      extractorForm = (\n        
\n \n
\n );\n }\n\n return (\n \n \n

Add extractor

\n\n

\n Start by loading a message to have an example to work on. You can decide whether to load a recent message\n received by this input, or manually select a message giving its ID.\n

\n

\n \n

\n\n {extractorForm}\n \n
\n );\n }\n}\n\nexport default AddExtractorWizard;\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 numeral from 'numeral';\n\nimport { LinkContainer } from 'components/graylog/router';\nimport { Button, Row, Col, Well } from 'components/graylog';\nimport EntityListItem from 'components/common/EntityListItem';\nimport ExtractorUtils from 'util/ExtractorUtils';\nimport ActionsProvider from 'injection/ActionsProvider';\nimport Routes from 'routing/Routes';\n\nconst ExtractorsActions = ActionsProvider.getActions('Extractors');\n\nclass ExtractorsListItem extends React.Component {\n static propTypes = {\n extractor: PropTypes.object.isRequired,\n inputId: PropTypes.string.isRequired,\n nodeId: PropTypes.string.isRequired,\n };\n\n state = {\n showDetails: false,\n };\n\n _toggleDetails = () => {\n const { showDetails } = this.state;\n\n this.setState({ showDetails: !showDetails });\n };\n\n _deleteExtractor = () => {\n const { extractor, inputId } = this.props;\n\n // eslint-disable-next-line no-alert\n if (window.confirm(`Really remove extractor \"${extractor.title}?\"`)) {\n ExtractorsActions.delete.triggerPromise(inputId, extractor);\n }\n };\n\n _formatExtractorSubtitle = () => {\n const { extractor } = this.props;\n\n return (\n \n Trying to extract data from {extractor.source_field} into{' '}\n {extractor.target_field},{' '}\n {extractor.cursor_strategy === 'cut' && 'not'}{' '}\n leaving the original intact.\n \n );\n };\n\n _formatCondition = () => {\n const { extractor } = this.props;\n\n if (extractor.condition_type === 'none') {\n return
;\n }\n\n return (\n
\n

Condition

\n
    \n
  • \n Will only attempt to run if the message{' '}\n {extractor.condition_type === 'string' ? 'includes the string' : 'matches the regular expression'}{' '}\n {extractor.condition_value}\n
  • \n
\n
\n );\n };\n\n _formatActions = () => {\n const actions = [];\n const { extractor, nodeId, inputId } = this.props;\n\n actions.push(\n ,\n );\n\n actions.push(\n \n \n ,\n );\n\n actions.push();\n\n return actions;\n };\n\n _formatOptions = (options) => {\n const { extractor } = this.props;\n\n const attributes = Object.keys(options);\n\n return attributes.map((attribute) => {\n return
  • {attribute}: {options[attribute]}
  • ;\n });\n };\n\n _formatConfiguration = (extractorConfig) => {\n let formattedOptions = this._formatOptions(extractorConfig);\n\n if (formattedOptions.length === 0) {\n formattedOptions =
  • No configuration options
  • ;\n }\n\n return (\n
    \n

    Configuration

    \n
      \n {formattedOptions}\n
    \n
    \n );\n };\n\n _formatConverter = (key, converter) => {\n return (\n
  • \n {converter.type}\n {converter.config &&
      {this._formatOptions(converter.config)}
    }\n
  • \n );\n };\n\n _formatConverters = (converters) => {\n const converterKeys = Object.keys(converters);\n const formattedConverters = converterKeys.map((converterKey) => this._formatConverter(converterKey, converters[converterKey]));\n\n if (formattedConverters.length === 0) {\n return
    ;\n }\n\n return (\n
    \n

    Converters

    \n
      \n {formattedConverters}\n
    \n
    \n );\n };\n\n _formatTimingMetrics = (timing) => {\n return (\n
    \n
    95th percentile:
    \n
    {numeral(timing['95th_percentile']).format('0,0.[00]')}μs
    \n\n
    98th percentile:
    \n
    {numeral(timing['98th_percentile']).format('0,0.[00]')}μs
    \n\n
    99th percentile:
    \n
    {numeral(timing['99th_percentile']).format('0,0.[00]')}μs
    \n\n
    Standard deviation:
    \n
    {numeral(timing.std_dev).format('0,0.[00]')}μs
    \n\n
    Mean:
    \n
    {numeral(timing.mean).format('0,0.[00]')}μs
    \n\n
    Minimum:
    \n
    {numeral(timing.min).format('0,0.[00]')}μs
    \n\n
    Maximum:
    \n
    {numeral(timing.max).format('0,0.[00]')}μs
    \n
    \n );\n };\n\n _formatMetrics = (metrics) => {\n let totalRate;\n\n if (metrics.total.rate) {\n totalRate = (\n
    \n {numeral(metrics.total.rate.total).format('0,0')} total invocations since boot,{' '}\n averages:{' '}\n {numeral(metrics.total.rate.one_minute).format('0,0.[00]')},{' '}\n {numeral(metrics.total.rate.five_minute).format('0,0.[00]')},{' '}\n {numeral(metrics.total.rate.fifteen_minute).format('0,0.[00]')}.\n
    \n );\n }\n\n const conditionCounts = (\n
    \n {metrics.condition_hits} hits,{' '}\n {metrics.condition_misses} misses\n
    \n );\n\n let totalTime;\n\n if (metrics.total.time) {\n totalTime = this._formatTimingMetrics(metrics.total.time);\n } else {\n totalTime = 'No message passed through here yet.';\n }\n\n let conditionTime;\n\n if (metrics.condition.time) {\n conditionTime = this._formatTimingMetrics(metrics.condition.time);\n } else {\n conditionTime = 'No message passed through here yet.';\n }\n\n let executionTime;\n\n if (metrics.execution.time) {\n executionTime = this._formatTimingMetrics(metrics.execution.time);\n } else {\n executionTime = 'No message passed through here yet.';\n }\n\n let convertersTime;\n\n if (metrics.converters.time) {\n convertersTime = this._formatTimingMetrics(metrics.converters.time);\n } else {\n convertersTime = 'No message passed through here yet.';\n }\n\n return (\n
    \n {totalRate}\n {conditionCounts}\n \n \n

    Total time


    \n {totalTime}\n \n \n

    Condition time


    \n {conditionTime}\n \n \n

    Execution time


    \n {executionTime}\n \n \n

    Converter time


    \n {convertersTime}\n \n
    \n
    \n );\n };\n\n _formatDetails = () => {\n const { extractor } = this.props;\n\n return (\n
    \n \n \n {this._formatCondition()}\n {this._formatConfiguration(extractor.extractor_config)}\n {this._formatConverters(extractor.converters)}\n \n \n \n
    \n

    Metrics

    \n {this._formatMetrics(extractor.metrics)}\n
    \n \n
    \n );\n };\n\n render() {\n const { extractor } = this.props;\n const { showDetails } = this.state;\n\n return (\n \n );\n }\n}\n\nexport default ExtractorsListItem;\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, Modal, Button } from 'components/graylog';\nimport BootstrapModalWrapper from 'components/bootstrap/BootstrapModalWrapper';\nimport SortableList from 'components/common/SortableList';\nimport ActionsProvider from 'injection/ActionsProvider';\n\nconst ExtractorsActions = ActionsProvider.getActions('Extractors');\n\nclass ExtractorSortModal extends React.Component {\n static propTypes = {\n input: PropTypes.object.isRequired,\n extractors: PropTypes.array.isRequired,\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n sortedExtractors: props.extractors,\n };\n }\n\n open = () => {\n this.modal.open();\n };\n\n close = () => {\n this.modal.close();\n };\n\n _cancel = () => {\n const { extractors } = this.props;\n\n this.close();\n\n this.setState({\n sortedExtractors: extractors,\n });\n }\n\n _updateSorting = (newSorting) => {\n this.setState({\n sortedExtractors: newSorting,\n });\n };\n\n _saveSorting = () => {\n const { input } = this.props;\n const { sortedExtractors } = this.state;\n\n if (!sortedExtractors) {\n this.close();\n }\n\n const promise = ExtractorsActions.order.triggerPromise(input.id, sortedExtractors);\n\n promise.then(() => this.close());\n };\n\n render() {\n const { sortedExtractors } = this.state;\n const { input } = this.props;\n\n return (\n { this.modal = modal; }} onHide={this._cancel}>\n \n \n Sort extractors for {input.title}\n \n \n \n

    Drag and drop the extractors on the list to change the order in which they will be applied.

    \n \n \n \n \n \n
    \n \n \n \n \n
    \n );\n }\n}\n\nexport default ExtractorSortModal;\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 createReactClass from 'create-react-class';\nimport Reflux from 'reflux';\nimport naturalSort from 'javascript-natural-sort';\n\nimport { Row, Col, Button } from 'components/graylog';\nimport Spinner from 'components/common/Spinner';\nimport AddExtractorWizard from 'components/extractors/AddExtractorWizard';\nimport EntityList from 'components/common/EntityList';\nimport ActionsProvider from 'injection/ActionsProvider';\nimport StoreProvider from 'injection/StoreProvider';\n\nimport ExtractorsListItem from './ExtractorsListItem';\nimport ExtractorsSortModal from './ExtractorSortModal';\n\nconst ExtractorsActions = ActionsProvider.getActions('Extractors');\nconst ExtractorsStore = StoreProvider.getStore('Extractors');\n\nconst ExtractorsList = createReactClass({\n displayName: 'ExtractorsList',\n\n propTypes: {\n input: PropTypes.object.isRequired,\n node: PropTypes.object.isRequired,\n },\n\n mixins: [Reflux.connect(ExtractorsStore), Reflux.ListenerMethods],\n\n componentDidMount() {\n ExtractorsActions.list.triggerPromise(this.props.input.id);\n },\n\n _formatExtractor(extractor) {\n return (\n \n );\n },\n\n _isLoading() {\n return !this.state.extractors;\n },\n\n _openSortModal() {\n this.sortModal.open();\n },\n\n render() {\n if (this._isLoading()) {\n return ;\n }\n\n let sortExtractorsButton;\n\n if (this.state.extractors.length > 1) {\n sortExtractorsButton = (\n \n );\n }\n\n const formattedExtractors = this.state.extractors\n .sort((extractor1, extractor2) => naturalSort(extractor1.order, extractor2.order))\n .map(this._formatExtractor);\n\n return (\n
    \n \n \n \n \n \n

    Configured extractors

    \n \n \n {sortExtractorsButton}\n \n
    \n \n \n
    \n { this.sortModal = sortModal; }} input={this.props.input} extractors={this.state.extractors} />\n
    \n );\n },\n});\n\nexport default ExtractorsList;\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 createReactClass from 'create-react-class';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport Reflux from 'reflux';\n\nimport { LinkContainer } from 'components/graylog/router';\nimport { DocumentTitle, Spinner } from 'components/common';\nimport PageHeader from 'components/common/PageHeader';\nimport ExtractorsList from 'components/extractors/ExtractorsList';\nimport DocumentationLink from 'components/support/DocumentationLink';\nimport ActionsProvider from 'injection/ActionsProvider';\nimport StoreProvider from 'injection/StoreProvider';\nimport { DropdownButton, MenuItem } from 'components/graylog';\nimport Routes from 'routing/Routes';\nimport DocsHelper from 'util/DocsHelper';\nimport withParams from 'routing/withParams';\n\nconst NodesActions = ActionsProvider.getActions('Nodes');\nconst InputsActions = ActionsProvider.getActions('Inputs');\nconst NodesStore = StoreProvider.getStore('Nodes');\n\nconst ExtractorsPage = createReactClass({\n displayName: 'ExtractorsPage',\n\n propTypes: {\n params: PropTypes.object.isRequired,\n },\n\n mixins: [Reflux.listenTo(NodesStore, 'onNodesChange')],\n\n getInitialState() {\n return {\n node: undefined,\n };\n },\n\n componentDidMount() {\n const { params } = this.props;\n\n InputsActions.get(params.inputId).then((input) => this.setState({ input }));\n NodesActions.list();\n },\n\n onNodesChange(nodes) {\n const { params } = this.props;\n const newNode = params.nodeId ? nodes.nodes[params.nodeId] : Object.values(nodes.nodes).filter((node) => node.is_master);\n\n const { node } = this.state;\n\n if (!node || node.node_id !== newNode.node_id) {\n this.setState({ node: newNode });\n }\n },\n\n _isLoading() {\n const { node, input } = this.state;\n\n return !(input && node);\n },\n\n render() {\n if (this._isLoading()) {\n return ;\n }\n\n const { node, input } = this.state;\n\n return (\n \n
    \n Extractors of {input.title}}>\n \n Extractors are applied on every message that is received by this input. Use them to extract and transform{' '}\n any text data into fields that allow you easy filtering and analysis later on.{' '}\n Example: Extract the HTTP response code from a log message, transform it to a numeric field and attach it{' '}\n as http_response_code to the message.\n \n\n \n Find more information about extractors in the\n {' '}.\n \n\n \n \n Import extractors\n \n \n Export extractors\n \n \n \n \n
    \n
    \n );\n },\n});\n\nexport default withParams(ExtractorsPage);\n"],"sourceRoot":""}




    © 2015 - 2024 Weber Informatics LLC | Privacy Policy