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

web-interface.assets.1255d548-9693.a6bd68487a9043109537.js.map Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
{"version":3,"file":"1255d548-9693.a6bd68487a9043109537.js","mappings":"0kBAiCA,MAAMA,EAAUC,GAAY,CAE1BA,EAAQ,KAAK,KAAO,OAAO,aAAa,cAAc,QAAQ,CAChE,EAEMC,EAAc,CAAC,CAAE,OAAAC,CAAO,IAAMA,IAAW,SAEzCC,EAAoBC,GAAY,CACpC,IAA+B,SAASA,CAAO,CACjD,EAEA,MAAMC,UAA4B,WAAgB,CAAlD,kCACE,2BAEA,6BAAsB,KAsBtB,gCAAyB,IAAM,CAC7B,KAAK,sBAAsB,EAE3B,KAAK,iBAAmB,YAAY,IAAM,CACxC,KAAM,CAAE,aAAAC,CAAa,EAAI,KAAK,MAC9B,IAAIC,EAAQ,KAERD,IACFC,EAAQD,EAAa,IAAKE,GAAMA,EAAE,IAAI,GAGpCD,GACF,IAAoB,UAAU,KAAM,KAAMA,GAAS,IAAI,CAE3D,EAAG,KAAK,mBAAmB,CAC7B,CAAC,EAED,+BAAwB,IAAM,CACxB,KAAK,mBACP,cAAc,KAAK,gBAAgB,EACnC,KAAK,iBAAmB,OAE5B,CAAC,EAED,mBAAaE,GAAU,CACrB,KAAM,CAAE,WAAAC,CAAW,EAAID,EACjB,CAAE,KAAAE,EAAM,SAAAC,CAAS,EAAI,KAAK,MAAM,yBAEtC,KAAK,sBAAsB,EAEvBH,EAAM,QAAUA,EAAM,OAAO,YAC/B,IAA+B,IAAIA,EAAM,OAAO,WAAW,EAClDR,EAAYQ,CAAK,EAC1B,IAA+B,SAAS,GAExC,IAA+B,gBAAgBE,EAAMC,EAAUF,EAAW,KAAK,EAC/E,KAAK,uBAAuB,EAEhC,CAAC,CAAD,CA1DA,mBAAoB,CAClB,KAAK,UAAU,KAAK,KAAK,CAC3B,CAEA,mBAAmBG,EAAW,CAC5B,KAAM,CAAE,SAAU,CA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C,EACnB,gBAAC,MAAW,MAAM,kCACN,QACE,gBAAC,IAAa,CAAC,GAAI,KAAO,OAAO,aAAa,cAAc,QAC1D,gBAAC,SAAM,CAAC,QAAQ,UAAU,MAAO,CAAE,WAAY,CAAE,GAAG,qBAAmB,CACzE,GAEZ,gBAAC,YAAK,2DAAyD,CACjE,EAECA,CACH,CAEJ,CACF,CAEAf,EAAoB,UAAY,CAC9B,YAAa,WACb,YAAa,WACb,iBAAkB,WAClB,MAAO,WACP,WAAY,WACZ,aAAc,UACd,SAAU,WAAiB,WAC3B,OAAQ,WACR,yBAA0B,WAAiB,WAC3C,QAAS,WAAiB,UAC5B,EAEAA,EAAoB,aAAe,CACjC,YAAa,KACb,iBAAkB,CAAC,EACnB,aAAc,KACd,MAAO,KACP,WAAY,KACZ,YAAa,KACb,OAAQ,MACV,EAEA,WAAe,QACb,QAAY,QAAW,QAAa,KAA6BA,CAAmB,CAAC,CAAC,CAAC,EACvF,CAAE,iBAAkB,IAAmB,kBAAmB,GAA6B,EACvF,CAAC,CAAE,kBAAAkB,EAAmB,iBAAAC,EAAkB,GAAGC,CAAW,KAAO,CAC3D,GAAGA,EACH,GAAGF,EACH,YAAaC,EAAiB,WAChC,EAAE,C","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 { Col, Row, Button } from 'components/bootstrap';\nimport { DocumentTitle, PageHeader, Spinner } from 'components/common';\nimport { DataAdapter, DataAdapterCreate, DataAdapterForm, DataAdaptersOverview } from 'components/lookup-tables';\nimport withPaginationQueryParameter from 'components/common/withPaginationQueryParameter';\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';\nimport LUTPageNavigation from 'components/lookup-tables/LUTPageNavigation';\nimport withHistory from 'routing/withHistory';\n\nconst _saved = (history) => {\n  // reset detail state\n  history.push(Routes.SYSTEM.LOOKUPTABLES.DATA_ADAPTERS.OVERVIEW);\n};\n\nconst _isCreating = ({ action }) => action === 'create';\n\nconst _validateAdapter = (adapter) => {\n  LookupTableDataAdaptersActions.validate(adapter);\n};\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    const { page, pageSize } = this.props.paginationQueryParameter;\n\n    clearInterval(this.errorStatesTimer);\n    LookupTableDataAdaptersActions.searchPaginated(page, pageSize);\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    const { page, pageSize } = this.props.paginationQueryParameter;\n\n    this._stopErrorStatesTimer();\n\n    if (props.params && props.params.adapterName) {\n      LookupTableDataAdaptersActions.get(props.params.adapterName);\n    } else if (_isCreating(props)) {\n      LookupTableDataAdaptersActions.getTypes();\n    } else {\n      LookupTableDataAdaptersActions.searchPaginated(page, pageSize, pagination.query);\n      this._startErrorStatesTimer();\n    }\n  };\n\n  render() {\n    const {\n      action,\n      errorStates,\n      dataAdapter,\n      validationErrors,\n      types,\n      dataAdapters,\n      pagination,\n      history,\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               _saved(history)}\n                               validate={_validateAdapter}\n                               validationErrors={validationErrors} />\n            \n          \n        );\n      } else {\n        content = ;\n      }\n    } else if (_isCreating(this.props)) {\n      if (!types) {\n        content = ;\n      } else {\n        content = (\n           _saved(history)}\n                             validate={_validateAdapter}\n                             validationErrors={validationErrors} />\n        );\n      }\n    } else if (!dataAdapters) {\n      content = ;\n    } else {\n      content = (\n        \n      );\n    }\n\n    return (\n      \n        \n        \n                        \n                      \n                    )}>\n          Data adapters provide the actual values for lookup tables\n        \n\n        {content}\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  paginationQueryParameter: PropTypes.object.isRequired,\n  history: PropTypes.object.isRequired,\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(\n  withHistory(withParams(withLocation(withPaginationQueryParameter(LUTDataAdaptersPage)))),\n  { lookupTableStore: LookupTablesStore, dataAdaptersStore: LookupTableDataAdaptersStore },\n  ({ dataAdaptersStore, lookupTableStore, ...otherProps }) => ({\n    ...otherProps,\n    ...dataAdaptersStore,\n    errorStates: lookupTableStore.errorStates,\n  }));\n"],"names":["_saved","history","_isCreating","action","_validateAdapter","adapter","LUTDataAdaptersPage","dataAdapters","names","t","props","pagination","page","pageSize","prevProps","pathname","prevPathname","errorStates","dataAdapter","validationErrors","types","content","isShowing","isEditing","dataAdaptersStore","lookupTableStore","otherProps"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy