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

web-interface.assets.bac204ae-94.3818e69b9cf5e41372c4.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.5
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","newSorting","sortedExtractors","order","input","then","BootstrapModalWrapper","ref","Header","closeButton","Title","Body","SortableList","items","extractors","onMoveItem","_updateSorting","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":"ywDAuBMA,E,kaAKI,CACNC,mBAAmB,I,gCAGG,WACtB,EAAKC,SAAS,CAAED,mBAAoB,EAAKE,MAAMF,uB,gDAI/C,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,2hDC7Cf,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,EAAKpB,MAAnBoB,UAER,OACE,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AA,EAAD,CAAmBC,KAAMC,KAAWC,MAAMC,WAAYC,KAAK,kBAFlE,KAKA,kBAAC,IAAD,CAAgBtK,QAAQ,OAAOC,OAAO,QAAQ2B,GAAG,6BAA6BX,MAAM,UAAUsJ,WAAS,GACrG,kBAAC,IAAD,CAAezI,GAAIC,IAAOyI,kBAAkB9C,EAAKQ,QAAS/B,EAAMvE,KAC9D,kBAAC,IAAD,2BAEF,kBAAC,IAAD,CAAeE,GAAIC,IAAO0I,kBAAkB/C,EAAKQ,QAAS/B,EAAMvE,KAC9D,kBAAC,IAAD,6BAIN,kBAAC,GAAD,CAAgBuE,MAAOA,EAAOuB,KAAMA,SAO/BgD,uBAAWtB","file":"bac204ae-94.3818e69b9cf5e41372c4.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 open = () => {\n this.modal.open();\n };\n\n close = () => {\n this.modal.close();\n };\n\n _updateSorting = (newSorting) => {\n this.sortedExtractors = newSorting;\n };\n\n _saveSorting = () => {\n if (!this.sortedExtractors) {\n this.close();\n }\n\n const promise = ExtractorsActions.order.triggerPromise(this.props.input.id, this.sortedExtractors);\n\n promise.then(() => this.close());\n };\n\n render() {\n return (\n { this.modal = modal; }}>\n \n \n Sort extractors for {this.props.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