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

web-interface.assets.6e61897c-96.472622149827c1587209.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
{"version":3,"sources":["webpack:///./src/components/extractors/ImportExtractors.jsx","webpack:///./src/pages/ImportExtractorsPage.jsx"],"names":["ExtractorsActions","ActionsProvider","getActions","ImportExtractors","event","preventDefault","extractors","JSON","parse","extractorsInput","getValue","props","input","id","error","UserNotification","className","md","onSubmit","this","_onSubmit","type","ref","rows","bsStyle","React","Component","PropTypes","object","isRequired","InputsActions","InputsStore","StoreProvider","getStore","ImportExtractorsPage","createReactClass","displayName","propTypes","params","mixins","Reflux","connect","componentDidMount","get","triggerPromise","inputId","then","setState","_isLoading","state","render","title","href","rel","target","withParams"],"mappings":"mtDAwBA,IAAMA,EAAoBC,IAAgBC,WAAW,cAE/CC,E,uaAKQ,SAACC,GACXA,EAAMC,iBAEN,IACE,IACQC,EADiBC,KAAKC,MAAM,EAAKC,gBAAgBC,YACjDJ,WAERN,EAAiB,OAAQ,EAAKW,MAAMC,MAAMC,GAAIP,GAC9C,MAAOQ,GACPC,IAAiBD,MAAjB,gFAAgGA,GAC9F,mC,qCAIN,WAAS,WACP,OACE,kBAAC,IAAD,CAAKE,UAAU,WACb,kBAAC,IAAD,CAAKC,GAAI,IACP,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAKA,GAAI,IACP,iDAGJ,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAKA,GAAI,IACP,0BAAMC,SAAUC,KAAKC,WACnB,kBAAC,IAAD,CAAOC,KAAK,WAAWC,IAAK,SAACb,GAAsB,EAAKA,gBAAkBA,GAAoBI,GAAG,4BAA4BU,KAAM,KACnI,kBAAC,IAAD,CAAQF,KAAK,SAASG,QAAQ,WAA9B,qC,8BAhCeC,IAAMC,W,EAA/BvB,E,YACe,CACjBS,MAAOe,IAAUC,OAAOC,aAwCb1B,Q,gCCzCT2B,EAAgB7B,IAAgBC,WAAW,UAC3C6B,EAAcC,IAAcC,SAAS,UAErCC,EAAuBC,IAAiB,CAC5CC,YAAa,uBAEbC,UAAW,CACTC,OAAQX,IAAUC,OAAOC,YAG3BU,OAAQ,CAACC,IAAOC,QAAQV,IAExBW,kBAT4C,WASxB,WACVJ,EAAWnB,KAAKR,MAAhB2B,OAERR,EAAca,IAAIC,eAAeN,EAAOO,SAASC,MAAK,SAAClC,GAAD,OAAW,EAAKmC,SAAS,CAAEnC,MAAOA,QAG1FoC,WAf4C,WAiB1C,OAAQ7B,KAAK8B,MAAMrC,OAGrBsC,OApB4C,WAqB1C,GAAI/B,KAAK6B,aACP,OAAO,kBAAC,KAAD,MAFF,IAKCpC,EAAUO,KAAK8B,MAAfrC,MAER,OACE,kBAAC,IAAD,CAAeuC,MAAK,+BAA0BvC,EAAMuC,QAClD,6BACE,kBAAC,IAAD,CAAYA,MAAO,sDAA2B,4BAAKvC,EAAMuC,SACvD,oKAE8B,IAC5B,uBAAGC,KAAK,mCAAmCC,IAAI,sBAAsBC,OAAO,UAA5E,2BAHF,MAQF,kBAAC,EAAD,CAAkB1C,MAAOA,SAOpB2C,sBAAWrB","file":"6e61897c-96.472622149827c1587209.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 { Input } from 'components/bootstrap';\nimport ActionsProvider from 'injection/ActionsProvider';\nimport UserNotification from 'util/UserNotification';\n\nconst ExtractorsActions = ActionsProvider.getActions('Extractors');\n\nclass ImportExtractors extends React.Component {\n  static propTypes = {\n    input: PropTypes.object.isRequired,\n  };\n\n  _onSubmit = (event) => {\n    event.preventDefault();\n\n    try {\n      const parsedExtractors = JSON.parse(this.extractorsInput.getValue());\n      const { extractors } = parsedExtractors;\n\n      ExtractorsActions.import(this.props.input.id, extractors);\n    } catch (error) {\n      UserNotification.error(`There was an error while parsing extractors. Are they in JSON format? ${error}`,\n        'Could not import extractors');\n    }\n  };\n\n  render() {\n    return (\n      \n        \n          \n            \n              

Extractors JSON

\n \n
\n \n \n
\n { this.extractorsInput = extractorsInput; }} id=\"extractor-export-textarea\" rows={30} />\n \n
\n \n
\n \n
\n );\n }\n}\n\nexport default ImportExtractors;\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';\n\nimport { DocumentTitle, PageHeader, Spinner } from 'components/common';\nimport ImportExtractors from 'components/extractors/ImportExtractors';\nimport ActionsProvider from 'injection/ActionsProvider';\nimport StoreProvider from 'injection/StoreProvider';\nimport withParams from 'routing/withParams';\n\nconst InputsActions = ActionsProvider.getActions('Inputs');\nconst InputsStore = StoreProvider.getStore('Inputs');\n\nconst ImportExtractorsPage = createReactClass({\n displayName: 'ImportExtractorsPage',\n\n propTypes: {\n params: PropTypes.object.isRequired,\n },\n\n mixins: [Reflux.connect(InputsStore)],\n\n componentDidMount() {\n const { params } = this.props;\n\n InputsActions.get.triggerPromise(params.inputId).then((input) => this.setState({ input: input }));\n },\n\n _isLoading() {\n // eslint-disable-next-line react/destructuring-assignment\n return !this.state.input;\n },\n\n render() {\n if (this._isLoading()) {\n return ;\n }\n\n const { input } = this.state;\n\n return (\n \n
\n Import extractors to {input.title}}>\n \n Exported extractors can be imported to an input. All you need is the JSON export of extractors from any\n other Graylog setup or from{' '}\n \n the Graylog Marketplace\n .\n \n \n \n
\n
\n );\n },\n});\n\nexport default withParams(ImportExtractorsPage);\n"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy