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

web-interface.assets.b6fe2bb5-9221.2513b87fd30b643e509b.js.map Maven / Gradle / Ivy

{"version":3,"file":"b6fe2bb5-9221.2513b87fd30b643e509b.js","mappings":"k2DAuBMA,EAAAA,SAAAA,I,6cAKQ,SAACC,GACXA,EAAMC,iBAEN,IACE,IACQC,EADiBC,KAAKC,MAAM,EAAKC,gBAAgBC,YACjDJ,WAERK,EAAAA,EAAAA,OAAyB,EAAKC,MAAMC,MAAMC,GAAIR,GAC9C,MAAOS,GACPC,EAAAA,EAAAA,MAAA,gFAAgGD,GAC9F,mC,qCAIN,WAAS,WACP,OACE,gBAAC,KAAD,CAAKE,UAAU,WACb,gBAAC,KAAD,CAAKC,GAAI,IACP,gBAAC,KAAD,KACE,gBAAC,KAAD,CAAKA,GAAI,IACP,+CAGJ,gBAAC,KAAD,KACE,gBAAC,KAAD,CAAKA,GAAI,IACP,wBAAMC,SAAUC,KAAKC,WACnB,gBAAC,KAAD,CAAOC,KAAK,WAAWC,IAAK,SAACd,GAAsB,EAAKA,gBAAkBA,GAAoBK,GAAG,4BAA4BU,KAAM,KACnI,gBAAC,KAAD,CAAQF,KAAK,SAASG,QAAQ,WAA9B,qC,gFAhCVtB,CAAyBuB,EAAAA,W,EAAzBvB,EAAAA,YACe,CACjBU,MAAOc,IAAAA,OAAAA,aAwCX,U,oCCvCMC,EAAuBC,GAAAA,CAAiB,CAC5CC,YAAa,uBAEbC,UAAW,CACTC,OAAQL,IAAAA,OAAAA,YAGVM,OAAQ,CAACC,IAAAA,QAAeC,EAAAA,IAExBC,kBAT4C,WASxB,WACVJ,EAAWZ,KAAKR,MAAhBoB,OAERK,EAAAA,EAAAA,IAAAA,eAAiCL,EAAOM,SAASC,MAAK,SAAC1B,GAAD,OAAW,EAAK2B,SAAS,CAAE3B,MAAOA,QAG1F4B,WAf4C,WAgB1C,OAAQrB,KAAKsB,MAAM7B,OAGrB8B,OAnB4C,WAoB1C,GAAIvB,KAAK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A,GAAoBQ,EAAAA,EAAAA,qBAAAA,MAAqCrD,GAASoD,KACxEK,EAAuB,GAE7BD,EAAkBhC,SAAQ,SAACF,EAAWoC,GAAZ,OAAoBD,EAAqBC,GAAOpC,EAAU9C,MAEpF,IAAMmE,GAAUC,EAAAA,EAAAA,IAAM,OAAQQ,EAAK,CAAEjC,MAAOsC,IAE5Cd,EAAQ1C,MAAK,WACXvB,EAAAA,EAAAA,QAAyB,4CAErB,EAAKV,YACPK,EAAkBuC,KAAK2C,eAAevD,MAI1C2C,EAAO,OAAO,SAAClE,GACbC,EAAAA,EAAAA,MAAA,+CAA+DD,GAC7D,2CAGJJ,EAAkB8C,MAAMwB,QAAQA,IA3JX,gBA8JhB3C,EAAShC,GAAY,WACtB2F,EAAoB,EACpBC,EAAgB,EACdC,EAAW,GAEjB7F,EAAWwD,SAAQ,SAACF,GAClB,IAAMqB,EAAU,EAAKQ,uBAAuBnD,EAASsB,GAErDqB,EACG1C,MAAK,kBAAM0D,OADd,OAES,kBAAMC,OAEfC,EAASC,KAAKnB,MAGhBoB,IAAAA,OAAeF,GAAU5D,MAAK,WACN,IAAlB2D,EACFlF,EAAAA,EAAAA,QAAA,0BAA4CiF,EAA5C,2BACE,+BAEFjF,EAAAA,EAAAA,QAAA,0BAA4CiF,EAA5C,mCAAwFC,EAAxF,cACE","sources":["webpack://graylog-web-interface/./src/components/extractors/ImportExtractors.jsx","webpack://graylog-web-interface/./src/pages/ImportExtractorsPage.jsx","webpack://graylog-web-interface/./src/stores/extractors/ExtractorsStore.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, Input } from 'components/bootstrap';\nimport UserNotification from 'util/UserNotification';\nimport { ExtractorsActions } from 'stores/extractors/ExtractorsStore';\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 withParams from 'routing/withParams';\nimport { InputsActions, InputsStore } from 'stores/inputs/InputsStore';\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 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","/*\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 Promise from 'bluebird';\n\nimport ApiRoutes from 'routing/ApiRoutes';\nimport fetch from 'logic/rest/FetchProvider';\nimport ExtractorUtils from 'util/ExtractorUtils';\nimport * as URLUtils from 'util/URLUtils';\nimport UserNotification from 'util/UserNotification';\nimport { singletonStore, singletonActions } from 'logic/singleton';\n\nexport const ExtractorsActions = singletonActions(\n 'core.Extractors',\n () => Reflux.createActions({\n list: { asyncResult: true },\n get: { asyncResult: true },\n create: { asyncResult: true },\n save: { asyncResult: true },\n update: { asyncResult: true },\n delete: { asyncResult: true },\n order: { asyncResult: true },\n import: {},\n }),\n);\n\nfunction getExtractorDTO(extractor) {\n const converters = {};\n\n extractor.converters.forEach((converter) => {\n converters[converter.type] = converter.config;\n });\n\n const conditionValue = extractor.condition_type && extractor.condition_type !== 'none' ? extractor.condition_value : '';\n\n return {\n title: extractor.title,\n cut_or_copy: extractor.cursor_strategy || 'copy',\n source_field: extractor.source_field,\n target_field: extractor.target_field,\n extractor_type: extractor.type || extractor.extractor_type, // \"extractor_type\" needed for imports\n extractor_config: extractor.extractor_config,\n converters: converters,\n condition_type: extractor.condition_type || 'none',\n condition_value: conditionValue,\n order: extractor.order,\n };\n}\n\nexport const ExtractorsStore = singletonStore(\n 'core.Extractors',\n () => Reflux.createStore({\n listenables: [ExtractorsActions],\n sourceUrl: '/system/inputs/',\n extractors: undefined,\n extractor: undefined,\n\n init() {\n this.trigger({ extractors: this.extractors, extractor: this.extractor });\n },\n\n list(inputId) {\n const promise = fetch('GET', URLUtils.qualifyUrl(URLUtils.concatURLPath(this.sourceUrl, inputId, 'extractors')));\n\n promise.then((response) => {\n this.extractors = response.extractors;\n this.trigger({ extractors: this.extractors });\n });\n\n ExtractorsActions.list.promise(promise);\n },\n\n // Creates an basic extractor object that we can use to create new extractors.\n new(type, field) {\n if (ExtractorUtils.EXTRACTOR_TYPES.indexOf(type) === -1) {\n throw new Error(`Invalid extractor type provided: ${type}`);\n }\n\n return {\n type: type,\n source_field: field,\n converters: [],\n extractor_config: {},\n target_field: '',\n };\n },\n\n get(inputId, extractorId) {\n const promise = fetch('GET', URLUtils.qualifyUrl(URLUtils.concatURLPath(this.sourceUrl, inputId, 'extractors', extractorId)));\n\n promise.then((response) => {\n this.extractor = response;\n this.trigger({ extractor: this.extractor });\n });\n\n ExtractorsActions.get.promise(promise);\n },\n\n save(inputId, extractor) {\n let promise;\n\n if (extractor.id) {\n promise = this.update(inputId, extractor, true);\n } else {\n promise = this.create(inputId, extractor, true);\n }\n\n ExtractorsActions.save.promise(promise);\n },\n\n _silentExtractorCreate(inputId, extractor) {\n const url = URLUtils.qualifyUrl(ApiRoutes.ExtractorsController.create(inputId).url);\n\n return fetch('POST', url, getExtractorDTO(extractor));\n },\n\n create(inputId, extractor, calledFromMethod) {\n const promise = this._silentExtractorCreate(inputId, extractor);\n\n promise\n .then(() => {\n UserNotification.success(`Extractor ${extractor.title} created successfully`);\n\n if (this.extractor) {\n ExtractorsActions.get.triggerPromise(inputId, extractor.id);\n }\n })\n .catch((error) => {\n UserNotification.error(`Creating extractor failed: ${error}`,\n 'Could not create extractor');\n });\n\n if (!calledFromMethod) {\n ExtractorsActions.create.promise(promise);\n }\n\n return promise;\n },\n\n update(inputId, extractor, calledFromMethod) {\n const url = URLUtils.qualifyUrl(ApiRoutes.ExtractorsController.update(inputId, extractor.id).url);\n\n const promise = fetch('PUT', url, getExtractorDTO(extractor));\n\n promise\n .then(() => {\n UserNotification.success(`Extractor \"${extractor.title}\" updated successfully`);\n\n if (this.extractor) {\n ExtractorsActions.get.triggerPromise(inputId, extractor.id);\n }\n })\n .catch((error) => {\n UserNotification.error(`Updating extractor failed: ${error}`,\n 'Could not update extractor');\n });\n\n if (!calledFromMethod) {\n ExtractorsActions.update.promise(promise);\n }\n\n return promise;\n },\n\n delete(inputId, extractor) {\n const url = URLUtils.qualifyUrl(ApiRoutes.ExtractorsController.delete(inputId, extractor.id).url);\n\n const promise = fetch('DELETE', url);\n\n promise\n .then(() => {\n UserNotification.success(`Extractor \"${extractor.title}\" deleted successfully`);\n\n if (this.extractors) {\n ExtractorsActions.list.triggerPromise(inputId);\n }\n })\n .catch((error) => {\n UserNotification.error(`Deleting extractor failed: ${error}`,\n `Could not delete extractor ${extractor.title}`);\n });\n\n ExtractorsActions.delete.promise(promise);\n },\n\n order(inputId, orderedExtractors) {\n const url = URLUtils.qualifyUrl(ApiRoutes.ExtractorsController.order(inputId).url);\n const orderedExtractorsMap = {};\n\n orderedExtractors.forEach((extractor, idx) => orderedExtractorsMap[idx] = extractor.id);\n\n const promise = fetch('POST', url, { order: orderedExtractorsMap });\n\n promise.then(() => {\n UserNotification.success('Extractor positions updated successfully');\n\n if (this.extractors) {\n ExtractorsActions.list.triggerPromise(inputId);\n }\n });\n\n promise.catch((error) => {\n UserNotification.error(`Changing extractor positions failed: ${error}`,\n 'Could not update extractor positions');\n });\n\n ExtractorsActions.order.promise(promise);\n },\n\n import(inputId, extractors) {\n let successfulImports = 0;\n let failedImports = 0;\n const promises = [];\n\n extractors.forEach((extractor) => {\n const promise = this._silentExtractorCreate(inputId, extractor);\n\n promise\n .then(() => successfulImports++)\n .catch(() => failedImports++);\n\n promises.push(promise);\n });\n\n Promise.settle(promises).then(() => {\n if (failedImports === 0) {\n UserNotification.success(`Import results: ${successfulImports} extractor(s) imported.`,\n 'Import operation successful');\n } else {\n UserNotification.warning(`Import results: ${successfulImports} extractor(s) imported, ${failedImports} error(s).`,\n 'Import operation completed');\n }\n });\n },\n }),\n);\n"],"names":["ImportExtractors","event","preventDefault","extractors","JSON","parse","extractorsInput","getValue","ExtractorsActions","props","input","id","error","UserNotification","className","md","onSubmit","this","_onSubmit","type","ref","rows","bsStyle","React","PropTypes","ImportExtractorsPage","createReactClass","displayName","propTypes","params","mixins","Reflux","InputsStore","componentDidMount","InputsActions","inputId","then","setState","_isLoading","state","render","title","href","rel","target","withParams","singletonActions","list","asyncResult","get","create","save","update","delete","order","import","getExtractorDTO","extractor","converters","forEach","converter","config","conditionValue","condition_type","condition_value","cut_or_copy","cursor_strategy","source_field","target_field","extractor_type","extractor_config","ExtractorsStore","singletonStore","listenables","sourceUrl","undefined","init","trigger","promise","fetch","URLUtils","response","field","ExtractorUtils","Error","extractorId","_silentExtractorCreate","url","ApiRoutes","calledFromMethod","triggerPromise","orderedExtractors","orderedExtractorsMap","idx","successfulImports","failedImports","promises","push","Promise"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy