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

web-interface.assets.325e2d4b-2870.66dafa3dc54ddf8321c5.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
{"version":3,"file":"325e2d4b-2870.66dafa3dc54ddf8321c5.js","mappings":"kQA2BA,MAAMA,GAAYC,EAAAA,EAAAA,SAAOC,EAAAA,IAAV,gFAAGD,CAAH,yBAITE,GAAeF,EAAAA,EAAAA,SAAOG,EAAAA,IAAV,mFAAGH,EAAe,QAAC,MAAEI,GAAH,SAAeC,EAAAA,EAAAA,KAAd,CAAD,2IACnBD,EAAME,MAAMC,OAAOC,WACrBJ,EAAME,MAAMG,KAAKD,WAGnBJ,EAAMM,OAAOC,QAAQC,OAAOC,SAOjCC,EAAAA,EAAAA,IAAqBV,GAIdA,EAAMM,OAAOK,OAAOC,aAE3BC,EAAAA,EAAAA,IAAsBb,IAGpBa,EAAAA,EAAAA,IAAsBb,GArBI,IA2BpCF,EAAagB,YAAc,SAmB3B,MAsBA,EAtBuB,QAAC,MAAEC,GAAH,SACrB,gBAACpB,EAAD,KACGoB,EAAMC,KAAI,IAAkD,IAAjD,KAAEC,EAAF,MAAQC,EAAR,YAAeC,EAAf,eAA4BC,GAAqB,EAC3D,OAAKH,EAKH,gBAAC,KAAD,CAAaE,YAAaA,QAAAA,EAAe,GAAIE,IAAKJ,GAChD,gBAAC,IAAD,CAAeK,GAAIL,EAAMM,gBAAiBH,GACxC,gBAACtB,EAAD,CAAc0B,QAAQ,QACpB,gBAAC,KAAD,KACGN,MARF,IAGT,IAPiB,C,0GCvDvB,MAAMO,EAAY,CAChB,CAAEP,MAAO,WAAYD,KAAMS,EAAAA,GAAAA,OAAAA,SAAAA,SAAiCN,gBAAgB,GAC5E,CAAEF,MAAO,iBAAkBD,KAAMS,EAAAA,GAAAA,OAAAA,SAAAA,gBACjC,CAAER,MAAO,gBAAiBD,KAAMS,EAAAA,GAAAA,OAAAA,SAAAA,gBASlC,EAN+B,IAC7B,gBAA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Ac,OACdC,gBAAiB,IACjBC,iBAAkB,KAGpBf,IAAAA,MAAaH,EAASe,GAEtB,MAAMjC,GAAUH,EAAAA,EAAAA,IAAM,OAAQC,EAAAA,GAAqB,GAAEV,KAAKV,iCAAkCwC,GAE5FlB,EACGC,MACEC,GAAaA,IACbC,GACCC,EAAAA,EAAAA,MAAwB,yBAAwBc,EAAQD,6BAA6Bd,EAAMY,UACzF,kCAIRO,EAAkBhD,SAAS0B,QAAQA,EACpC,K","sources":["webpack://graylog-web-interface/./src/components/common/PageNavigation.tsx","webpack://graylog-web-interface/./src/components/sidecars/common/SidecarsPageNavigation.tsx","webpack://graylog-web-interface/./src/stores/sidecars/CollectorConfigurationsStore.js","webpack://graylog-web-interface/./src/stores/sidecars/CollectorsStore.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 * as React from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Button, ButtonToolbar } from 'components/bootstrap';\nimport { LinkContainer } from 'components/common/router';\nimport { IfPermitted } from 'components/common';\nimport NavItemStateIndicator, {\n  hoverIndicatorStyles,\n  activeIndicatorStyles,\n} from 'components/common/NavItemStateIndicator';\n\nconst Container = styled(ButtonToolbar)`\n  margin-bottom: 10px;\n`;\n\nconst StyledButton = styled(Button)(({ theme }) => css`\n  font-family: ${theme.fonts.family.navigation};\n  font-size: ${theme.fonts.size.navigation};\n\n  &&&& {\n    color: ${theme.colors.variant.darker.default};\n    \n    :hover, :focus {\n      text-decoration: none;  \n    }\n\n    :hover {\n      ${hoverIndicatorStyles(theme)}\n    }\n\n    &.active {\n      color: ${theme.colors.global.textDefault};\n\n      ${activeIndicatorStyles(theme)}\n\n      :hover, :focus {\n        ${activeIndicatorStyles(theme)}\n      }\n    }\n  }\n`);\n\nStyledButton.displayName = 'Button';\n\ntype Props = {\n  /**\n   * List of nav items. Define permissions, if the item should only be displayed for users with specific permissions.\n   * By default, an item is active if the current URL starts with the item URL.\n   * If you only want to display an item as active only when its path matches exactly, set `exactPathMatch` to true.\n   */\n  items: Array<{\n    title: string,\n    path: string,\n    permissions?: string | Array\n    exactPathMatch?: boolean,\n  }>\n}\n\n/**\n * Simple tab navigation to allow navigating to subareas of a page.\n */\nconst PageNavigation = ({ items }: Props) => (\n  \n    {items.map(({ path, title, permissions, exactPathMatch }) => {\n      if (!path) {\n        return null;\n      }\n\n      return (\n        \n          \n            \n              \n                {title}\n              \n            \n          \n        \n      );\n    })}\n  \n);\n\nexport default PageNavigation;\n","/*\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 * as React from 'react';\n\nimport PageNavigation from 'components/common/PageNavigation';\nimport Routes from 'routing/Routes';\nimport { Row } from 'components/bootstrap';\n\nconst NAV_ITEMS = [\n  { title: 'Overview', path: Routes.SYSTEM.SIDECARS.OVERVIEW, exactPathMatch: true },\n  { title: 'Administration', path: Routes.SYSTEM.SIDECARS.ADMINISTRATION },\n  { title: 'Configuration', path: Routes.SYSTEM.SIDECARS.CONFIGURATION },\n];\n\nconst SidecarsPageNavigation = () => (\n  \n    \n  \n);\n\nexport default SidecarsPageNavigation;\n","/*\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 Reflux from 'reflux';\nimport URI from 'urijs';\nimport lodash from 'lodash';\n\nimport * as URLUtils from 'util/URLUtils';\nimport UserNotification from 'util/UserNotification';\nimport fetch from 'logic/rest/FetchProvider';\nimport { singletonStore, singletonActions } from 'logic/singleton';\n\nexport const CollectorConfigurationsActions = singletonActions(\n  'core.CollectorConfigurations',\n  () => Reflux.createActions({\n    all: { asyncResult: true },\n    list: { asyncResult: true },\n    listUploads: { asyncResult: true },\n    getConfiguration: { asyncResult: true },\n    getConfigurationSidecars: { asyncResult: true },\n    getUploads: { asyncResult: true },\n    createConfiguration: { asyncResult: true },\n    updateConfiguration: { asyncResult: true },\n    renderPreview: { asyncResult: true },\n    copyConfiguration: { asyncResult: true },\n    delete: { asyncResult: true },\n    validate: { asyncResult: true },\n  }),\n);\n\nexport const CollectorConfigurationsStore = singletonStore(\n  'core.CollectorConfigurations',\n  () => Reflux.createStore({\n    listenables: [CollectorConfigurationsActions],\n    sourceUrl: '/sidecar',\n    configurations: undefined,\n    pagination: {\n      page: undefined,\n      pageSize: undefined,\n      total: undefined,\n    },\n    total: undefined,\n    paginatedConfigurations: undefined,\n    query: undefined,\n\n    propagateChanges() {\n      this.trigger({\n        configurations: this.configurations,\n        query: this.query,\n        total: this.total,\n        pagination: this.pagination,\n        paginatedConfigurations: this.paginatedConfigurations,\n      });\n    },\n\n    _fetchConfigurations({ query, page, pageSize }) {\n      const baseUrl = `${this.sourceUrl}/configurations`;\n      const search = {\n        query: query,\n        page: page,\n        per_page: pageSize,\n      };\n\n      const uri = URI(baseUrl).search(search).toString();\n\n      return fetch('GET', URLUtils.qualifyUrl(uri));\n    },\n\n    _fetchUploads({ page }) {\n      const baseUrl = `${this.sourceUrl}/configurations/uploads`;\n      const search = {\n        page: page,\n      };\n\n      const uri = URI(baseUrl).search(search).toString();\n\n      return fetch('GET', URLUtils.qualifyUrl(uri));\n    },\n\n    all() {\n      const promise = this._fetchConfigurations({ pageSize: 0 });\n\n      promise\n        .then(\n          (response) => {\n            this.configurations = response.configurations;\n            this.propagateChanges();\n\n            return response.configurations;\n          },\n          (error) => {\n            UserNotification.error(`Fetching collector configurations failed with status: ${error}`,\n              'Could not retrieve configurations');\n          },\n        );\n\n      CollectorConfigurationsActions.all.promise(promise);\n    },\n\n    list({ query = '', page = 1, pageSize = 10 }) {\n      const promise = this._fetchConfigurations({ query: query, page: page, pageSize: pageSize });\n\n      promise\n        .then(\n          (response) => {\n            this.query = response.query;\n\n            this.pagination = {\n              page: response.pagination.page,\n              pageSize: response.pagination.per_page,\n              total: response.pagination.total,\n            };\n\n            this.total = response.total;\n            this.paginatedConfigurations = response.configurations;\n            this.propagateChanges();\n\n            return response.configurations;\n          },\n          (error) => {\n            UserNotification.error(`Fetching collector configurations failed with status: ${error}`,\n              'Could not retrieve configurations');\n          },\n        );\n\n      CollectorConfigurationsActions.list.promise(promise);\n    },\n\n    listUploads({ page = 1 }) {\n      const promise = this._fetchUploads({ page: page });\n\n      promise\n        .catch(\n          (error) => {\n            UserNotification.error(`Fetching configuration uploads failed with status: ${error}`,\n              'Could not retrieve configurations');\n          },\n        );\n\n      CollectorConfigurationsActions.listUploads.promise(promise);\n    },\n\n    refreshList() {\n      this.list({ query: this.query, page: this.page, pageSize: this.pageSize });\n    },\n\n    getConfiguration(configurationId) {\n      const promise = fetch('GET', URLUtils.qualifyUrl(`${this.sourceUrl}/configurations/${configurationId}`));\n\n      promise.catch((error) => {\n        let errorMessage = `Fetching Configuration failed with status: ${error}`;\n\n        if (error.status === 404) {\n          errorMessage = `Unable to find a Configuration with ID <${configurationId}>, please ensure it was not deleted.`;\n        }\n\n        UserNotification.error(errorMessage, 'Could not retrieve Configuration');\n      });\n\n      CollectorConfigurationsActions.getConfiguration.promise(promise);\n    },\n\n    getConfigurationSidecars(configurationId) {\n      const promise = fetch('GET', URLUtils.qualifyUrl(`${this.sourceUrl}/configurations/${configurationId}/sidecars`));\n\n      promise.catch((error) => {\n        let errorMessage = `Fetching Configuration failed with status: ${error}`;\n\n        if (error.status === 404) {\n          errorMessage = `Unable to find a Configuration with ID <${configurationId}>, please ensure it was not deleted.`;\n        }\n\n        UserNotification.error(errorMessage, 'Could not retrieve Configuration');\n      });\n\n      CollectorConfigurationsActions.getConfigurationSidecars.promise(promise);\n    },\n\n    renderPreview(template) {\n      const requestTemplate = {\n        template: template,\n      };\n\n      const promise = fetch(\n        'POST',\n        URLUtils.qualifyUrl(`${this.sourceUrl}/configurations/render/preview`),\n        requestTemplate,\n      );\n\n      promise\n        .catch(\n          (error) => {\n            UserNotification.error(`Fetching configuration preview failed with status: ${error}`,\n              'Could not retrieve preview');\n          },\n        );\n\n      CollectorConfigurationsActions.renderPreview.promise(promise);\n    },\n\n    createConfiguration(configuration) {\n      const url = URLUtils.qualifyUrl(`${this.sourceUrl}/configurations`);\n      const method = 'POST';\n\n      const promise = fetch(method, url, configuration);\n\n      promise\n        .then((response) => {\n          UserNotification.success('', 'Configuration successfully created');\n\n          return response;\n        }, (error) => {\n          UserNotification.error(error.status === 400 ? error.responseMessage : `Creating configuration failed with status: ${error.message}`,\n            'Could not save configuration');\n        });\n\n      CollectorConfigurationsActions.createConfiguration.promise(promise);\n    },\n\n    updateConfiguration(configuration) {\n      const url = URLUtils.qualifyUrl(`${this.sourceUrl}/configurations/${configuration.id}`);\n\n      const promise = fetch('PUT', url, configuration);\n\n      promise\n        .then((response) => {\n          UserNotification.success('', 'Configuration successfully updated');\n          this.refreshList();\n\n          return response;\n        }, (error) => {\n          UserNotification.error(`Updating Configuration failed: ${error.status === 400 ? error.responseMessage : error.message}`,\n            `Could not update Configuration ${configuration.name}`);\n        });\n\n      CollectorConfigurationsActions.updateConfiguration.promise(promise);\n    },\n\n    copyConfiguration(configurationId, name) {\n      const url = URLUtils.qualifyUrl(`${this.sourceUrl}/configurations/${configurationId}/${name}`);\n      const method = 'POST';\n\n      const promise = fetch(method, url);\n\n      promise\n        .then((response) => {\n          UserNotification.success('', `Configuration \"${name}\" successfully copied`);\n          this.refreshList();\n\n          return response;\n        }, (error) => {\n          UserNotification.error(`Saving configuration \"${name}\" failed with status: ${error.message}`,\n            'Could not save Configuration');\n        });\n\n      CollectorConfigurationsActions.copyConfiguration.promise(promise);\n    },\n\n    delete(configuration) {\n      const url = URLUtils.qualifyUrl(`${this.sourceUrl}/configurations/${configuration.id}`);\n      const promise = fetch('DELETE', url);\n\n      promise\n        .then((response) => {\n          UserNotification.success('', `Configuration \"${configuration.name}\" successfully deleted`);\n          this.refreshList();\n\n          return response;\n        }, (error) => {\n          UserNotification.error(`Deleting Configuration failed: ${error.status === 400 ? error.responseMessage : error.message}`,\n            `Could not delete Configuration ${configuration.name}`);\n        });\n\n      CollectorConfigurationsActions.delete.promise(promise);\n    },\n\n    validate(configuration) {\n    // set minimum api defaults for faster validation feedback\n      const payload = {\n        name: ' ',\n        collector_id: ' ',\n        color: ' ',\n        template: ' ',\n      };\n\n      lodash.merge(payload, configuration);\n\n      const promise = fetch('POST', URLUtils.qualifyUrl(`${this.sourceUrl}/configurations/validate`), payload);\n\n      promise\n        .then(\n          (response) => response,\n          (error) => (\n            UserNotification.error(`Validating configuration \"${payload.name}\" failed with status: ${error.message}`,\n              'Could not validate configuration')\n          ),\n        );\n\n      CollectorConfigurationsActions.validate.promise(promise);\n    },\n\n  }),\n);\n","/*\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 Reflux from 'reflux';\nimport URI from 'urijs';\nimport lodash from 'lodash';\n\nimport * as URLUtils from 'util/URLUtils';\nimport fetch from 'logic/rest/FetchProvider';\nimport UserNotification from 'util/UserNotification';\nimport { singletonStore, singletonActions } from 'logic/singleton';\n\nexport const CollectorsActions = singletonActions(\n  'core.Collectors',\n  () => Reflux.createActions({\n    getCollector: { asyncResult: true },\n    all: { asyncResult: true },\n    list: { asyncResult: true },\n    create: { asyncResult: true },\n    update: { asyncResult: true },\n    delete: { asyncResult: true },\n    copy: { asyncResult: true },\n    validate: { asyncResult: true },\n  }),\n);\n\nexport const CollectorsStore = singletonStore(\n  'core.Collectors',\n  () => Reflux.createStore({\n    listenables: [CollectorsActions],\n    sourceUrl: '/sidecar',\n    collectors: undefined,\n    query: undefined,\n    pagination: {\n      page: undefined,\n      pageSize: undefined,\n      total: undefined,\n    },\n    total: undefined,\n    paginatedCollectors: undefined,\n\n    getInitialState() {\n      return {\n        collectors: this.collectors,\n      };\n    },\n\n    propagateChanges() {\n      this.trigger({\n        collectors: this.collectors,\n        paginatedCollectors: this.paginatedCollectors,\n        query: this.query,\n        total: this.total,\n        pagination: this.pagination,\n      });\n    },\n\n    getCollector(collectorId) {\n      const promise = fetch('GET', URLUtils.qualifyUrl(`${this.sourceUrl}/collectors/${collectorId}`));\n\n      promise.catch((error) => {\n        let errorMessage = `Fetching Collector failed with status: ${error}`;\n\n        if (error.status === 404) {\n          errorMessage = `Unable to find a collector with ID <${collectorId}>, please ensure it was not deleted.`;\n        }\n\n        UserNotification.error(errorMessage, 'Could not retrieve Collector');\n      });\n\n      CollectorsActions.getCollector.promise(promise);\n    },\n\n    _fetchCollectors({ query, page, pageSize }) {\n      const search = {\n        query: query,\n        page: page,\n        per_page: pageSize,\n      };\n\n      const uri = URI(`${this.sourceUrl}/collectors/summary`).search(search).toString();\n\n      return fetch('GET', URLUtils.qualifyUrl(uri));\n    },\n\n    all() {\n      const promise = this._fetchCollectors({ pageSize: 0 });\n\n      promise\n        .then(\n          (response) => {\n            this.collectors = response.collectors;\n            this.propagateChanges();\n\n            return response.collectors;\n          },\n          (error) => {\n            UserNotification.error(`Fetching collectors failed with status: ${error}`,\n              'Could not retrieve collectors');\n          },\n        );\n\n      CollectorsActions.all.promise(promise);\n    },\n\n    list({ query = '', page = 1, pageSize = 10 }) {\n      const promise = this._fetchCollectors({ query: query, page: page, pageSize: pageSize });\n\n      promise\n        .then(\n          (response) => {\n            this.query = response.query;\n\n            this.pagination = {\n              page: response.pagination.page,\n              pageSize: response.pagination.per_page,\n              total: response.pagination.total,\n            };\n\n            this.total = response.total;\n            this.paginatedCollectors = response.collectors;\n\n            this.propagateChanges();\n\n            return response.collectors;\n          },\n          (error) => {\n            UserNotification.error(`Fetching collectors failed with status: ${error}`,\n              'Could not retrieve collectors');\n          },\n        );\n\n      CollectorsActions.list.promise(promise);\n    },\n\n    refreshList() {\n      this.list({ query: this.query, page: this.pagination.page, pageSize: this.pagination.pageSize });\n    },\n\n    create(collector) {\n      const promise = fetch('POST', URLUtils.qualifyUrl(`${this.sourceUrl}/collectors`), collector);\n\n      promise\n        .then(\n          (response) => {\n            UserNotification.success('', 'Collector successfully created');\n            this.collectors = response.collectors;\n            this.propagateChanges();\n\n            return this.collectors;\n          },\n          (error) => {\n            UserNotification.error(`Fetching collectors failed with status: ${error}`,\n              'Could not retrieve collectors');\n          },\n        );\n\n      CollectorsActions.create.promise(promise);\n    },\n\n    update(collector) {\n      const promise = fetch('PUT', URLUtils.qualifyUrl(`${this.sourceUrl}/collectors/${collector.id}`), collector);\n\n      promise\n        .then(\n          (response) => {\n            UserNotification.success('', 'Collector successfully updated');\n            this.collectors = response.collectors;\n            this.propagateChanges();\n\n            return this.collectors;\n          },\n          (error) => {\n            UserNotification.error(`Fetching collectors failed with status: ${error}`,\n              'Could not retrieve collectors');\n          },\n        );\n\n      CollectorsActions.update.promise(promise);\n    },\n\n    delete(collector) {\n      const url = URLUtils.qualifyUrl(`${this.sourceUrl}/collectors/${collector.id}`);\n      const promise = fetch('DELETE', url);\n\n      promise\n        .then((response) => {\n          UserNotification.success('', `Collector \"${collector.name}\" successfully deleted`);\n          this.refreshList();\n\n          return response;\n        }, (error) => {\n          UserNotification.error(`Deleting Collector failed: ${error.status === 400 ? error.responseMessage : error.message}`,\n            `Could not delete Collector \"${collector.name}\"`);\n        });\n\n      CollectorsActions.delete.promise(promise);\n    },\n\n    copy(collectorId, name) {\n      const url = URLUtils.qualifyUrl(`${this.sourceUrl}/collectors/${collectorId}/${name}`);\n      const method = 'POST';\n\n      const promise = fetch(method, url);\n\n      promise\n        .then((response) => {\n          UserNotification.success('', `Collector \"${name}\" successfully copied`);\n          this.refreshList();\n\n          return response;\n        }, (error) => {\n          UserNotification.error(`Saving collector \"${name}\" failed with status: ${error.message}`,\n            'Could not save Collector');\n        });\n\n      CollectorsActions.copy.promise(promise);\n    },\n\n    validate(collector) {\n    // set minimum api defaults for faster validation feedback\n      const payload = {\n        id: ' ',\n        service_type: 'exec',\n        executable_path: ' ',\n        default_template: ' ',\n      };\n\n      lodash.merge(payload, collector);\n\n      const promise = fetch('POST', URLUtils.qualifyUrl(`${this.sourceUrl}/collectors/validate`), payload);\n\n      promise\n        .then(\n          (response) => response,\n          (error) => (\n            UserNotification.error(`Validating collector \"${payload.name}\" failed with status: ${error.message}`,\n              'Could not validate collector')\n          ),\n        );\n\n      CollectorsActions.validate.promise(promise);\n    },\n  }),\n);\n"],"names":["Container","styled","ButtonToolbar","StyledButton","Button","theme","css","fonts","family","navigation","size","colors","variant","darker","default","hoverIndicatorStyles","global","textDefault","activeIndicatorStyles","displayName","items","map","path","title","permissions","exactPathMatch","key","to","relativeActive","bsStyle","NAV_ITEMS","Routes","CollectorConfigurationsActions","singletonActions","Reflux","all","asyncResult","list","listUploads","getConfiguration","getConfigurationSidecars","getUploads","createConfiguration","updateConfiguration","renderPreview","copyConfiguration","delete","validate","CollectorConfigurationsStore","singletonStore","listenables","sourceUrl","configurations","undefined","pagination","page","pageSize","total","paginatedConfigurations","query","propagateChanges","this","trigger","_fetchConfigurations","baseUrl","search","per_page","uri","URI","toString","fetch","URLUtils","_fetchUploads","promise","then","response","error","UserNotification","catch","refreshList","configurationId","errorMessage","status","template","requestTemplate","configuration","url","responseMessage","message","id","name","payload","collector_id","color","lodash","CollectorsActions","getCollector","create","update","copy","CollectorsStore","collectors","paginatedCollectors","getInitialState","collectorId","_fetchCollectors","collector","service_type","executable_path","default_template"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy