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.
{"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","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","string","defaultProps","connect","withParams","withLocation","lookupTableStore"],"mappings":"2qFA8BmDA,IAAiBC,IAAI,gBAAhEC,E,EAAAA,kBAAmBC,E,EAAAA,oBAErBC,E,kbACeC,G,6BAEG,K,iCAmBG,WAAM,MACI,EAAKC,MAA9BC,EADqB,EACrBA,OAAQC,EADa,EACbA,aAEhB,EAAKC,wBAEL,EAAKC,iBAAmBC,aAAY,WAClC,IAAIC,EAAa,KAMjB,GAJIL,IACFK,EAAaL,EAAOM,KAAI,SAACC,GAAD,OAAOA,EAAEC,SAG/BH,EAAY,CACd,IAAMI,EAAeC,OAAOC,OAAOV,GAAcK,KAAI,SAACM,GAAD,OAAOA,EAAEJ,QAE9DZ,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,WAER,EAAKd,wBAEDH,EAAMkB,QAAUlB,EAAMkB,OAAOC,UAC/BtB,EAAoBF,IAAIK,EAAMkB,OAAOC,WAC5B,EAAKC,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ASQ,KAAK,0BAYxB,kBAAC,IAAD,CAAeC,MAAM,iBACnB,8BACE,kBAAC,IAAD,CAAYA,MAAM,iBAChB,iKACC,KACD,8BACE,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAeC,GAAI3B,IAAOC,OAAOC,aAAaC,UAC5C,kBAAC,IAAD,CAAQyB,QAAQ,QAAhB,kBAEF,kBAAC,IAAD,CAAeD,GAAI3B,IAAOC,OAAOC,aAAa2B,OAAO1B,UACnD,kBAAC,IAAD,CAAQyB,QAAQ,QAAhB,WAEF,kBAAC,IAAD,CAAeD,GAAI3B,IAAOC,OAAOC,aAAa4B,cAAc3B,UAC1D,kBAAC,IAAD,CAAQyB,QAAQ,QAAhB,qBAMPhB,S,8BA5JiBmB,IAAMC,WAmKlC9D,EAAc+D,UAAY,CACxB5B,MAAO6B,IAAUC,OACjBtB,iBAAkBqB,IAAUC,OAC5BrB,YAAaoB,IAAUC,OACvBpB,MAAOmB,IAAUC,OACjB9D,OAAQ6D,IAAUE,MAClBpB,OAAQkB,IAAUC,OAClB7D,aAAc4D,IAAUC,OACxB9C,WAAY6C,IAAUC,OACtBzB,SAAUwB,IAAUC,OACpBlB,YAAaiB,IAAUC,OACvB/B,OAAQ8B,IAAUG,QAGpBnE,EAAcoE,aAAe,CAC3BrB,YAAa,KACbJ,iBAAkB,GAClBvC,aAAc,KACd+B,MAAO,KACPU,MAAO,KACPC,OAAQ,KACR3C,OAAQ,KACRqC,SAAU,KACVrB,WAAY,KACZyB,YAAa,KACbV,YAAQjC,GAGKoE,sBAAQC,YAAWC,YAAavE,IAAiB,CAAEwE,iBAAkB1E,IAAqB,gBAAG0E,EAAH,EAAGA,iBAAH,yCAEpGA","file":"628bc5f1-103.8082683cbeb94d06c5f9.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 { LinkContainer } from 'components/graylog/router';\nimport connect from 'stores/connect';\nimport Routes from 'routing/Routes';\nimport history from 'util/History';\nimport { ButtonToolbar, Col, Row, Button } from 'components/graylog';\nimport { DocumentTitle, PageHeader, Spinner } from 'components/common';\nimport { LookupTable, LookupTableCreate, LookupTableForm, LookupTablesOverview } from 'components/lookup-tables';\nimport CombinedProvider from 'injection/CombinedProvider';\nimport withParams from 'routing/withParams';\nimport withLocation from 'routing/withLocation';\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\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\n this._stopErrorStatesTimer();\n\n this.errorStatesTimer = setInterval(() => {\n let tableNames = null;\n\n if (tables) {\n tableNames = tables.map((t) => t.name);\n }\n\n if (tableNames) {\n const adapterNames = Object.values(dataAdapters).map((a) => a.name);\n\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\n this._stopErrorStatesTimer();\n\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 = ({ action }) => {\n return action === 'create';\n }\n\n _validateTable = (table) => {\n LookupTablesActions.validate(table);\n }\n\n render() {\n const {\n 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