Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
web-interface.assets.89d844bd-92.120606867f8b5ef63117.js.map Maven / Gradle / Ivy
{"version":3,"sources":["webpack:///./src/pages/LUTTablesPage.jsx"],"names":["CombinedProvider","get","LookupTablesStore","LookupTablesActions","LUTTablesPage","undefined","props","tables","dataAdapters","_stopErrorStatesTimer","errorStatesTimer","setInterval","tableNames","map","t","name","adapterNames","Object","values","a","getErrors","errorStatesInterval","clearInterval","pagination","params","tableName","_isCreating","searchPaginated","page","per_page","query","_startErrorStatesTimer","history","push","Routes","SYSTEM","LOOKUPTABLES","OVERVIEW","route","action","table","validate","this","_loadData","prevProps","location","pathname","content","validationErrors","dataAdapter","cache","caches","errorStates","isEditing","className","lg","create","saved","_saved","_validateTable","text","title","to","bsStyle","CACHES","DATA_ADAPTERS","React","Component","propTypes","PropTypes","object","array","isRequired","defaultProps","connect","lookupTableStore"],"mappings":"g4DAamDA,EAAiBC,IAAI,gBAAhEC,E,EAAAA,kBAAmBC,E,EAAAA,oBAErBC,E,40BACeC,G,6BAEG,K,iCAkBG,WAAM,MACI,EAAKC,MAA9BC,EADqB,EACrBA,OAAQC,EADa,EACbA,aAChB,EAAKC,wBACL,EAAKC,iBAAmBC,aAAY,WAClC,IAAIC,EAAa,KAIjB,GAHIL,IACFK,EAAaL,EAAOM,KAAI,SAACC,GAAD,OAAOA,EAAEC,SAE/BH,EAAY,CACd,IAAMI,EAAeC,OAAOC,OAAOV,GAAcK,KAAI,SAACM,GAAD,OAAOA,EAAEJ,QAC9DZ,EAAoBiB,UAAUR,EAAY,KAAMI,GAAgB,SAEjE,EAAKK,wB,gCAGc,WAClB,EAAKX,mBACPY,cAAc,EAAKZ,kBACnB,EAAKA,sBAAmBL,M,oBAIhB,SAACC,GAAU,IACbiB,EAAe,EAAKjB,MAApBiB,WACR,EAAKd,wBACDH,EAAMkB,QAAUlB,EAAMkB,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QA,EACR3C,aAAcA,EACde,WAAYA,EACZ6B,YAAaA,IAP3B,kBAAC,IAAD,CAASQ,KAAK,0BAYxB,kBAAC,IAAD,CAAeC,MAAM,iBACnB,8BACE,kBAAC,IAAD,CAAYA,MAAM,iBAChB,iKACC,KACD,8BACE,kBAAC,IAAD,KACE,kBAAC,gBAAD,CAAeC,GAAI5B,IAAOC,OAAOC,aAAaC,UAC5C,kBAAC,IAAD,CAAQ0B,QAAQ,OAAOT,UAAU,UAAjC,kBAEF,kBAAC,gBAAD,CAAeQ,GAAI5B,IAAOC,OAAOC,aAAa4B,OAAO3B,UACnD,kBAAC,IAAD,CAAQ0B,QAAQ,QAAhB,WAEF,kBAAC,gBAAD,CAAeD,GAAI5B,IAAOC,OAAOC,aAAa6B,cAAc5B,UAC1D,kBAAC,IAAD,CAAQ0B,QAAQ,QAAhB,qBAMPhB,S,8BApJiBmB,IAAMC,WA2JlC/D,EAAcgE,UAAY,CACxB5B,MAAO6B,IAAUC,OACjBtB,iBAAkBqB,IAAUC,OAC5BrB,YAAaoB,IAAUC,OACvBpB,MAAOmB,IAAUC,OACjB/D,OAAQ8D,IAAUE,MAClBpB,OAAQkB,IAAUC,OAClB9D,aAAc6D,IAAUC,OACxB/C,WAAY8C,IAAUC,OACtBzB,SAAUwB,IAAUC,OACpBlB,YAAaiB,IAAUC,OACvBhC,MAAO+B,IAAUC,OAAOE,YAE1BpE,EAAcqE,aAAe,CAC3BrB,YAAa,KACbJ,iBAAkB,GAClBxC,aAAc,KACdgC,MAAO,KACPU,MAAO,KACPC,OAAQ,KACR5C,OAAQ,KACRsC,SAAU,KACVtB,WAAY,KACZ0B,YAAa,MAGAyB,sBAAQtE,EAAe,CAAEuE,iBAAkBzE,IAAqB,gBAAGyE,EAAH,EAAGA,iBAAH,O,+VAAA,iCAE1EA","file":"89d844bd-92.120606867f8b5ef63117.js","sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport { LinkContainer } from 'react-router-bootstrap';\nimport connect from 'stores/connect';\nimport Routes from 'routing/Routes';\nimport history from 'util/History';\n\nimport { ButtonToolbar, Col, Row, Button } from 'components/graylog';\nimport { DocumentTitle, PageHeader, Spinner } from 'components/common';\nimport { LookupTable, LookupTableCreate, LookupTableForm, LookupTablesOverview } from 'components/lookup-tables';\n\nimport CombinedProvider from 'injection/CombinedProvider';\n\nconst { LookupTablesStore, LookupTablesActions } = CombinedProvider.get('LookupTables');\n\nclass LUTTablesPage extends React.Component {\n errorStatesTimer = undefined;\n\n errorStatesInterval = 1000;\n\n componentDidMount() {\n this._loadData(this.props);\n }\n\n componentDidUpdate(prevProps) {\n const { location: { pathname } } = this.props;\n const { location: { pathname: prevPathname } } = prevProps;\n if (pathname !== prevPathname) {\n this._loadData(this.props);\n }\n }\n\n componentWillUnmount() {\n clearInterval(this.errorStatesTimer);\n }\n\n _startErrorStatesTimer = () => {\n const { tables, dataAdapters } = this.props;\n this._stopErrorStatesTimer();\n this.errorStatesTimer = setInterval(() => {\n let tableNames = null;\n if (tables) {\n tableNames = tables.map((t) => t.name);\n }\n if (tableNames) {\n const adapterNames = Object.values(dataAdapters).map((a) => a.name);\n LookupTablesActions.getErrors(tableNames, null, adapterNames || null);\n }\n }, this.errorStatesInterval);\n }\n\n _stopErrorStatesTimer = () => {\n if (this.errorStatesTimer) {\n clearInterval(this.errorStatesTimer);\n this.errorStatesTimer = undefined;\n }\n }\n\n _loadData = (props) => {\n const { pagination } = this.props;\n this._stopErrorStatesTimer();\n if (props.params && props.params.tableName) {\n LookupTablesActions.get(props.params.tableName);\n } else if (this._isCreating(props)) {\n // nothing to do, the intermediate data container will take care of loading the caches and adapters\n } else {\n LookupTablesActions.searchPaginated(pagination.page, pagination.per_page, pagination.query);\n this._startErrorStatesTimer();\n }\n }\n\n _saved = () => {\n // reset detail state\n history.push(Routes.SYSTEM.LOOKUPTABLES.OVERVIEW);\n }\n\n _isCreating = (props) => {\n return props.route.action === 'create';\n }\n\n _validateTable = (table) => {\n LookupTablesActions.validate(table);\n }\n\n render() {\n const {\n route: { action },\n table,\n validationErrors,\n dataAdapter,\n cache,\n tables,\n caches,\n dataAdapters,\n pagination,\n errorStates,\n } = this.props;\n let content;\n const isShowing = action === 'show';\n const isEditing = action === 'edit';\n\n if (isShowing || isEditing) {\n if (!table) {\n content = ;\n } else if (isEditing) {\n content = (\n \n \n Lookup Table \n \n \n
\n );\n } else {\n content = (\n \n );\n }\n } else if (this._isCreating(this.props)) {\n content = (\n \n );\n } else if (!tables) {\n content = ;\n } else {\n content = (\n \n );\n }\n\n return (\n \n \n \n Lookup tables can be used in extractors, converters and processing pipelines to translate message fields or to enrich messages. \n {null}\n \n \n \n Lookup Tables \n \n \n Caches \n \n \n Data Adapters \n \n \n \n \n\n {content}\n \n \n );\n }\n}\n\nLUTTablesPage.propTypes = {\n table: PropTypes.object,\n validationErrors: PropTypes.object,\n dataAdapter: PropTypes.object,\n cache: PropTypes.object,\n tables: PropTypes.array,\n caches: PropTypes.object,\n dataAdapters: PropTypes.object,\n pagination: PropTypes.object,\n location: PropTypes.object,\n errorStates: PropTypes.object,\n route: PropTypes.object.isRequired,\n};\nLUTTablesPage.defaultProps = {\n errorStates: null,\n validationErrors: {},\n dataAdapters: null,\n table: null,\n cache: null,\n caches: null,\n tables: null,\n location: null,\n pagination: null,\n dataAdapter: null,\n};\n\nexport default connect(LUTTablesPage, { lookupTableStore: LookupTablesStore }, ({ lookupTableStore, ...otherProps }) => ({\n ...otherProps,\n ...lookupTableStore,\n}));\n"],"sourceRoot":""}