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

web-interface.assets.b6fe2bb5-116.cbd607df19efa536929b.js.map Maven / Gradle / Ivy

{"version":3,"file":"b6fe2bb5-116.cbd607df19efa536929b.js","mappings":"i4FA+BMA,EAAAA,SAAAA,I,wdACeC,G,6BAEG,K,iCAmBG,WACvB,EAAKC,wBAEL,EAAKC,iBAAmBC,aAAY,WAClC,IAAQC,EAAiB,EAAKC,MAAtBD,aACJE,EAAQ,KAERF,IACFE,EAAQF,EAAaG,KAAI,SAACC,GAAD,OAAOA,EAAEC,SAGhCH,GACFI,EAAAA,EAAAA,UAA8B,KAAM,KAAMJ,GAAS,QAEpD,EAAKK,wB,gCAGc,WAClB,EAAKT,mBACPU,cAAc,EAAKV,kBACnB,EAAKA,sBAAmBF,M,oBAIhB,SAACK,GACX,IAAQQ,EAAeR,EAAfQ,WAER,EAAKZ,wBAEDI,EAAMS,QAAUT,EAAMS,OAAOC,YAC/BC,EAAAA,EAAAA,IAAmCX,EAAMS,OAAOC,aACvC,EAAKE,YAAYZ,GAC1BW,EAAAA,EAAAA,YAEAA,EAAAA,EAAAA,gBAA+CH,EAAWK,KAAML,EAAWM,SAAUN,EAAWO,OAChG,EAAKC,6B,iBAIA,WAEPC,EAAAA,EAAAA,KAAaC,EAAAA,GAAAA,OAAAA,aAAAA,cAAAA,a,sBAGD,YACZ,MAAkB,WADU,EAAbC,U,2BAIE,SAACC,GAClBT,EAAAA,EAAAA,SAAwCS,M,gDAlE1C,WACEC,KAAKC,UAAUD,KAAKrB,S,gCAGtB,SAAmBuB,GACkBF,KAAKrB,MAAhCwB,SAAYC,WAC6BF,EAAzCC,SAAYC,UAGlBJ,KAAKC,UAAUD,KAAKrB,S,kCAIxB,WACEO,cAAcc,KAAKxB,oB,oBAuDrB,WACE,IASI6B,EATJ,EAQIL,KAAKrB,MAPPmB,EADF,EACEA,OACAQ,EAFF,EAEEA,YACAC,EAHF,EAGEA,YACAC,EAJF,EAIEA,iBACAC,EALF,EA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amB,IAAAA,OACblB,iBAAkBkB,IAAAA,OAClBjB,MAAOiB,IAAAA,OACPvC,WAAYuC,IAAAA,OACZhD,aAAcgD,IAAAA,MACdvB,SAAUuB,IAAAA,OAAAA,WACV5B,OAAQ4B,IAAAA,QAGVrD,EAAoBsD,aAAe,CACjCrB,YAAa,KACbE,iBAAkB,GAClB9B,aAAc,KACd+B,MAAO,KACPtB,WAAY,KACZoB,YAAa,KACbT,YAAQxB,GAGV,SAAesD,EAAAA,EAAAA,IAAQC,EAAAA,EAAAA,IAAWC,EAAAA,EAAAA,GAAazD,IAAuB,CAAE0D,iBAAkBC,EAAAA,EAAmBC,kBAAmBC,EAAAA,IAAgC,gBAAGD,EAAH,EAAGA,kBAAmBF,EAAtB,EAAsBA,iBAAtB,wBAE3JE,GAF2J,IAG9J3B,YAAayB,EAAiBzB","sources":["webpack://graylog-web-interface/./src/pages/LUTDataAdaptersPage.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 PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { LinkContainer } from 'components/common/router';\nimport connect from 'stores/connect';\nimport Routes from 'routing/Routes';\nimport history from 'util/History';\nimport { ButtonToolbar, Col, Row, Button } from 'components/bootstrap';\nimport { DocumentTitle, PageHeader, Spinner } from 'components/common';\nimport { DataAdapter, DataAdapterCreate, DataAdapterForm, DataAdaptersOverview } from 'components/lookup-tables';\nimport withParams from 'routing/withParams';\nimport withLocation from 'routing/withLocation';\nimport { LookupTablesActions, LookupTablesStore } from 'stores/lookup-tables/LookupTablesStore';\nimport { LookupTableDataAdaptersActions, LookupTableDataAdaptersStore } from 'stores/lookup-tables/LookupTableDataAdaptersStore';\n\nclass LUTDataAdaptersPage 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    this._stopErrorStatesTimer();\n\n    this.errorStatesTimer = setInterval(() => {\n      const { dataAdapters } = this.props;\n      let names = null;\n\n      if (dataAdapters) {\n        names = dataAdapters.map((t) => t.name);\n      }\n\n      if (names) {\n        LookupTablesActions.getErrors(null, null, names || 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 } = props;\n\n    this._stopErrorStatesTimer();\n\n    if (props.params && props.params.adapterName) {\n      LookupTableDataAdaptersActions.get(props.params.adapterName);\n    } else if (this._isCreating(props)) {\n      LookupTableDataAdaptersActions.getTypes();\n    } else {\n      LookupTableDataAdaptersActions.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.DATA_ADAPTERS.OVERVIEW);\n  };\n\n  _isCreating = ({ action }) => {\n    return action === 'create';\n  };\n\n  _validateAdapter = (adapter) => {\n    LookupTableDataAdaptersActions.validate(adapter);\n  };\n\n  render() {\n    const {\n      action,\n      errorStates,\n      dataAdapter,\n      validationErrors,\n      types,\n      dataAdapters,\n      pagination,\n    } = this.props;\n    let content;\n    const isShowing = action === 'show';\n    const isEditing = action === 'edit';\n\n    if (isShowing || isEditing) {\n      if (!dataAdapter) {\n        content = ;\n      } else if (isEditing) {\n        content = (\n          \n            \n              \n            \n          \n        );\n      } else {\n        content = ;\n      }\n    } else if (this._isCreating(this.props)) {\n      if (!types) {\n        content = ;\n      } else {\n        content = (\n          \n        );\n      }\n    } else if (!dataAdapters) {\n      content = ;\n    } else {\n      content = (\n        \n      );\n    }\n\n    return (\n      \n        \n          \n            Data adapters provide the actual values for lookup tables\n            {null}\n            \n              \n                \n                  \n                \n                \n                  \n                \n                \n                  \n                \n              \n            \n          \n\n          {content}\n        \n      \n    );\n  }\n}\n\nLUTDataAdaptersPage.propTypes = {\n  errorStates: PropTypes.object,\n  dataAdapter: PropTypes.object,\n  validationErrors: PropTypes.object,\n  types: PropTypes.object,\n  pagination: PropTypes.object,\n  dataAdapters: PropTypes.array,\n  location: PropTypes.object.isRequired,\n  action: PropTypes.string,\n};\n\nLUTDataAdaptersPage.defaultProps = {\n  errorStates: null,\n  validationErrors: {},\n  dataAdapters: null,\n  types: null,\n  pagination: null,\n  dataAdapter: null,\n  action: undefined,\n};\n\nexport default connect(withParams(withLocation(LUTDataAdaptersPage)), { lookupTableStore: LookupTablesStore, dataAdaptersStore: LookupTableDataAdaptersStore }, ({ dataAdaptersStore, lookupTableStore, ...otherProps }) => ({\n  ...otherProps,\n  ...dataAdaptersStore,\n  errorStates: lookupTableStore.errorStates,\n}));\n"],"names":["LUTDataAdaptersPage","undefined","_stopErrorStatesTimer","errorStatesTimer","setInterval","dataAdapters","props","names","map","t","name","LookupTablesActions","errorStatesInterval","clearInterval","pagination","params","adapterName","LookupTableDataAdaptersActions","_isCreating","page","per_page","query","_startErrorStatesTimer","history","Routes","action","adapter","this","_loadData","prevProps","location","pathname","content","errorStates","dataAdapter","validationErrors","types","isEditing","className","lg","type","config","create","title","saved","_saved","validate","_validateAdapter","text","to","bsStyle","React","propTypes","PropTypes","defaultProps","connect","withParams","withLocation","lookupTableStore","LookupTablesStore","dataAdaptersStore","LookupTableDataAdaptersStore"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy