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

web-interface.assets.b6fe2bb5-8585.263cb3ed50ef3899e2cf.js.map Maven / Gradle / Ivy

{"version":3,"file":"b6fe2bb5-8585.263cb3ed50ef3899e2cf.js","mappings":"maAqIA,QArG8BA,GAAAA,CAAiB,CAC7CC,YAAa,wBACbC,OAAQ,CAACC,IAAAA,QAAeC,EAAAA,IAExBC,gBAJ6C,WAK3C,MAAO,CACLC,YAAaC,EAAAA,EAAAA,UAAsBC,QACnCC,iBAAkB,GAClBC,iBAAkB,GAClBC,iBAAaC,IAIjBC,kBAb6C,WAc3CC,EAAAA,EAAAA,mBAGFC,gBAjB6C,SAiB7BC,GACd,MAA4DC,KAAKC,MAAzDZ,EAAR,EAAQA,YAAaI,EAArB,EAAqBA,iBAAkBD,EAAvC,EAAuCA,iBAEvCQ,KAAKE,SAAS,CACZb,YAAaU,EAASV,aAAeA,EACrCI,iBAAkBM,EAASN,kBAAoBA,EAC/CD,iBAAkBO,EAASP,kBAAoBA,KAInDW,QA3B6C,WA4B3C,IAAQd,EAAgBW,KAAKC,MAArBZ,YAERe,EAAAA,EAAAA,OAAAA,eAA0Cf,EAAYgB,UACnDC,MACC,WACEC,EAAAA,EAAAA,QAAyB,qCAAsC,YAC/DC,EAAAA,EAAAA,KAAaC,EAAAA,GAAAA,OAAAA,aAAAA,SAEf,SAACC,GACC,IAGIC,EAAe,GAEfD,EAASE,YAAcF,EAASE,WAAWC,MAAQH,EAASE,WAAWC,KAAKC,UAC9EH,EAAe,gBAAH,OAAmBD,EAASE,WAAWC,KAAKC,QAA5C,aAGdP,EAAAA,EAAAA,MATgB,qHASiBI,EAPnB,qCAYtBI,aAnD6C,SAmDhCtB,GAAkB,WACrBJ,EAAgBW,KAAKC,MAArBZ,YAERQ,EAAAA,EAAAA,oBAAmCJ,GAAkBa,MAAK,SAACU,GACzD,IAAMC,EAAiB5B,EAAY6B,YAEhCC,SAASH,EAAOG,SAASC,KAAI,SAACC,GAAD,OAAOC,EAAAA,EAAAA,SAAgBD,GAAG,EAAMhC,EAAYkC,gBACzEhC,QACGiC,EAAkBR,EAAOG,SAASC,KAAI,SAACC,GAAD,OAAOC,EAAAA,EAAAA,SAAgBD,GAAG,EAAOhC,EAAYkC,eAEzF,EAAKrB,SAAS,CAAEb,YAAa4B,EAAgBO,gBAAAA,QAIjDC,OAjE6C,WAkE3C,MAA0FzB,KAAKC,MAAvFZ,EAAR,EAAQA,YAAamC,EAArB,EAAqBA,gBAAiB/B,EAAtC,EAAsCA,iBAAkBD,EAAxD,EAAwDA,iBAAkBE,EAA1E,EAA0EA,YAE1E,OACE,gBAAC,KAAD,CAAegC,MAAM,iBACnB,4BACE,gBAAC,KAAD,CAAYA,MAAM,wBAChB,8KAIA,0DAC8B,IAC5B,qBAAGC,KAAK,mCAAmCC,OAAO,SAASC,IAAI,uBAA/D,2BAFF,KAKA,2BACE,gBAAC,IAAD,CAAeC,GAAIrB,EAAAA,GAAAA,OAAAA,aAAAA,MACjB,gBAAC,KAAD,CAAQsB,QAAQ,QAAhB,oBAIN,gBAAC,IAAD,CAAiB1C,YAAaA,EACb2C,cAAehC,KAAKe,aACpBkB,cAAejC,KAAKF,gBACpB0B,gBAAiBA,EACjB/B,iBAAkBA,EAClBD,iBAAkBA,EAClBE,YAAaA,EACbwC,OAAQlC,KAAKG","sources":["webpack://graylog-web-interface/./src/pages/CreateContentPackPage.jsx"],"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 React from 'react';\nimport Reflux from 'reflux';\nimport createReactClass from 'create-react-class';\n\nimport { LinkContainer } from 'components/common/router';\nimport Routes from 'routing/Routes';\nimport { Button } from 'components/bootstrap';\nimport history from 'util/History';\nimport UserNotification from 'util/UserNotification';\nimport { DocumentTitle, PageHeader } from 'components/common';\nimport ContentPackEdit from 'components/content-packs/ContentPackEdit';\nimport ContentPack from 'logic/content-packs/ContentPack';\nimport Entity from 'logic/content-packs/Entity';\nimport { CatalogStore, CatalogActions } from 'stores/content-packs/CatalogStore';\nimport { ContentPacksActions } from 'stores/content-packs/ContentPacksStore';\n\nconst CreateContentPackPage = createReactClass({\n  displayName: 'CreateContentPackPage',\n  mixins: [Reflux.connect(CatalogStore)],\n\n  getInitialState() {\n    return {\n      contentPack: ContentPack.builder().build(),\n      appliedParameter: {},\n      selectedEntities: {},\n      entityIndex: undefined,\n    };\n  },\n\n  componentDidMount() {\n    CatalogActions.showEntityIndex();\n  },\n\n  _onStateChanged(newState) {\n    const { contentPack, selectedEntities, appliedParameter } = this.state;\n\n    this.setState({\n      contentPack: newState.contentPack || contentPack,\n      selectedEntities: newState.selectedEntities || selectedEntities,\n      appliedParameter: newState.appliedParameter || appliedParameter,\n    });\n  },\n\n  _onSave() {\n    const { contentPack } = this.state;\n\n    ContentPacksActions.create.triggerPromise(contentPack.toJSON())\n      .then(\n        () => {\n          UserNotification.success('Content pack imported successfully', 'Success!');\n          history.push(Routes.SYSTEM.CONTENTPACKS.LIST);\n        },\n        (response) => {\n          const message = 'Error importing content pack, please ensure it is a valid JSON file. Check your '\n            + 'Graylog logs for more information.';\n          const title = 'Could not import content pack';\n          let smallMessage = '';\n\n          if (response.additional && response.additional.body && response.additional.body.message) {\n            smallMessage = `
${response.additional.body.message}`;\n }\n\n UserNotification.error(message + smallMessage, title);\n },\n );\n },\n\n _getEntities(selectedEntities) {\n const { contentPack } = this.state;\n\n CatalogActions.getSelectedEntities(selectedEntities).then((result) => {\n const newContentPack = contentPack.toBuilder()\n /* Mark entities from server */\n .entities(result.entities.map((e) => Entity.fromJSON(e, true, contentPack.parameters)))\n .build();\n const fetchedEntities = result.entities.map((e) => Entity.fromJSON(e, false, contentPack.parameters));\n\n this.setState({ contentPack: newContentPack, fetchedEntities });\n });\n },\n\n render() {\n const { contentPack, fetchedEntities, selectedEntities, appliedParameter, entityIndex } = this.state;\n\n return (\n \n \n \n \n Content packs accelerate the set up process for a specific data source. A content pack can include inputs/extractors, streams, and dashboards.\n \n\n \n Find more content packs in {' '}\n the Graylog Marketplace.\n \n\n
\n \n \n \n
\n
\n \n
\n
\n );\n },\n});\n\nexport default CreateContentPackPage;\n"],"names":["createReactClass","displayName","mixins","Reflux","CatalogStore","getInitialState","contentPack","ContentPack","build","appliedParameter","selectedEntities","entityIndex","undefined","componentDidMount","CatalogActions","_onStateChanged","newState","this","state","setState","_onSave","ContentPacksActions","toJSON","then","UserNotification","history","Routes","response","smallMessage","additional","body","message","_getEntities","result","newContentPack","toBuilder","entities","map","e","Entity","parameters","fetchedEntities","render","title","href","target","rel","to","bsStyle","onGetEntities","onStateChange","onSave"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy