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,EAAE,EAAE,EACxER,KAAU,MAAM,SAAUyB,CAAG,EAEnCzB,EACG,KAAMmB,IACL,IAAiB,QAAQ,GAAI,cAAcX,EAAU,IAAI,wBAAwB,EACjF,KAAK,YAAY,EAEVW,GACLzB,GAAU,CACZ,IAAiB,MAAM,8BAA8BA,EAAM,SAAW,IAAMA,EAAM,gBAAkBA,EAAM,OAAO,GAC/G,+BAA+Bc,EAAU,IAAI,GAAG,CACpD,CAAC,EAEHoB,EAAkB,OAAO,QAAQ5B,CAAO,CAC1C,EAEA,KAAK8B,EAAaJ,EAAM,CACtB,MAAMD,EAAM,KAAoB,GAAG,KAAK,SAAS,eAAeK,CAAW,IAAIJ,CAAI,EAAE,EAG/E1B,KAAU,MAFD,OAEeyB,CAAG,EAEjCzB,EACG,KAAMmB,IACL,IAAiB,QAAQ,GAAI,cAAcO,CAAI,uBAAuB,EACtE,KAAK,YAAY,EAEVP,GACLzB,GAAU,CACZ,IAAiB,MAAM,qBAAqBgC,CAAI,yBAAyBhC,EAAM,OAAO,GACpF,0BAA0B,CAC9B,CAAC,EAEHkC,EAAkB,KAAK,QAAQ5B,CAAO,CACxC,EAEA,SAASQ,EAAW,CAElB,MAAMmB,EAAU,CACd,GAAI,IACJ,aAAc,OACd,gBAAiB,IACjB,iBAAkB,GACpB,EAEA,IAAMA,EAASnB,CAAS,EAExB,MAAMR,KAAU,MAAM,OAAQ,KAAoB,GAAG,KAAK,SAAS,sBAAsB,EAAG2B,CAAO,EAEnG3B,EACG,KACEmB,GAAaA,EACbzB,GACC,IAAiB,MAAM,yBAAyBiC,EAAQ,IAAI,yBAAyBjC,EAAM,OAAO,GAChG,8BAA8B,CAEpC,EAEFkC,EAAkB,SAAS,QAAQ5B,CAAO,CAC5C,CACF,CAAC,CACH,C","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/components/sidecars/configuration-forms/CollectorForm.jsx","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 color: ${theme.colors.variant.darker.default};\n \n &:hover,\n &:focus {\n background: inherit;\n text-decoration: none;\n }\n\n &:hover {\n color: inherit;\n ${hoverIndicatorStyles(theme)}\n }\n\n &.active {\n color: ${theme.colors.global.textDefault};\n\n ${activeIndicatorStyles(theme)}\n\n &:hover,\n &:focus {\n ${activeIndicatorStyles(theme)}\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 { title: 'Failure Tracking', path: Routes.SYSTEM.SIDECARS.FAILURE_TRACKING },\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 PropTypes from 'prop-types';\nimport React from 'react';\nimport cloneDeep from 'lodash/cloneDeep';\nimport debounce from 'lodash/debounce';\nimport upperCase from 'lodash/upperCase';\n\nimport { FormSubmit, Select, SourceCodeEditor } from 'components/common';\nimport { Col, ControlLabel, FormGroup, HelpBlock, Row, Input } from 'components/bootstrap';\nimport Routes from 'routing/Routes';\nimport { CollectorConfigurationsActions } from 'stores/sidecars/CollectorConfigurationsStore';\nimport { CollectorsActions, CollectorsStore } from 'stores/sidecars/CollectorsStore';\nimport withHistory from 'routing/withHistory';\nimport { TELEMETRY_EVENT_TYPE } from 'logic/telemetry/Constants';\nimport withTelemetry from 'logic/telemetry/withTelemetry';\nimport connect from 'stores/connect';\n\nconst ValidationMessage = ({ validationErrors, fieldName, defaultText }) => {\n if (validationErrors[fieldName]) {\n return {validationErrors[fieldName][0]};\n }\n\n return {defaultText};\n};\n\nValidationMessage.propTypes = {\n validationErrors: PropTypes.object.isRequired,\n fieldName: PropTypes.string.isRequired,\n defaultText: PropTypes.string.isRequired,\n};\n\nconst formatServiceTypes = () => {\n const options = [];\n\n options.push({ value: 'exec', label: 'Foreground execution' });\n options.push({ value: 'svc', label: 'Windows service' });\n\n return options;\n};\n\nconst formatOperatingSystems = () => {\n const options = [];\n\n options.push({ value: 'linux', label: 'Linux' });\n options.push({ value: 'windows', label: 'Windows' });\n options.push({ value: 'darwin', label: 'Darwin' });\n options.push({ value: 'freebsd', label: 'FreeBSD' });\n\n return options;\n};\n\nclass CollectorForm extends React.Component {\n constructor(props) {\n super(props);\n const { collector } = this.props;\n\n this.state = {\n error: false,\n validation_errors: {},\n formData: {\n id: collector.id,\n name: collector.name,\n service_type: collector.service_type,\n node_operating_system: collector.node_operating_system,\n executable_path: collector.executable_path,\n execute_parameters: collector.execute_parameters,\n validation_parameters: collector.validation_parameters,\n default_template: String(collector.default_template),\n },\n };\n }\n\n UNSAFE_componentWillMount() {\n this._debouncedValidateFormData = debounce(this._validateFormData, 200);\n }\n\n componentDidMount() {\n CollectorsActions.all();\n CollectorConfigurationsActions.all();\n }\n\n hasErrors = () => {\n const { error } = this.state;\n\n return error;\n };\n\n _save = () => {\n const { action, history, sendTelemetry } = this.props;\n const { formData } = this.state;\n const isCreate = action === 'create';\n\n if (!this.hasErrors()) {\n let promise;\n\n if (isCreate) {\n promise = CollectorsActions.create(formData)\n .then(() => history.push(Routes.SYSTEM.SIDECARS.CONFIGURATION));\n } else {\n promise = CollectorsActions.update(formData);\n }\n\n promise.then(() => {\n sendTelemetry(TELEMETRY_EVENT_TYPE.SIDECARS[`LOG_COLLECTOR_${isCreate ? 'CREATED' : 'UPDATED'}`], {\n app_pathname: 'sidecars',\n app_section: 'configuration',\n });\n });\n }\n };\n\n handleSelectTelemetry = (key, value) => {\n const { sendTelemetry } = this.props;\n\n if (key === 'service_type' || key === 'node_operating_system') {\n sendTelemetry(TELEMETRY_EVENT_TYPE.SIDECARS[`LOG_COLLECTOR_${upperCase(key).replace(/\\s|\\//g, '_')}_CHANGED`], {\n app_pathname: 'sidecars',\n app_section: 'configuration',\n event_details: {\n [key]: value,\n },\n });\n }\n };\n\n _formDataUpdate = (key) => {\n const { formData } = this.state;\n\n return (nextValue) => {\n const nextFormData = cloneDeep(formData);\n this.handleSelectTelemetry(key, nextValue);\n\n nextFormData[key] = nextValue;\n this._debouncedValidateFormData(nextFormData);\n this.setState({ formData: nextFormData });\n };\n };\n\n _validateFormData = (nextFormData) => {\n if (nextFormData.name && nextFormData.node_operating_system) {\n CollectorsActions.validate(nextFormData).then((validation) => (\n this.setState({ validation_errors: validation.errors, error: validation.failed })\n ));\n }\n };\n\n _onNameChange = (event) => {\n const nextName = event.target.value;\n\n this._formDataUpdate('name')(nextName);\n };\n\n _onInputChange = (key) => (event) => {\n this._formDataUpdate(key)(event.target.value);\n };\n\n _onSubmit = (event) => {\n event.preventDefault();\n this._save();\n };\n\n _onCancel = () => {\n const { history } = this.props;\n history.goBack();\n };\n\n _validationState = (fieldName) => {\n const { validation_errors: validationErrors } = this.state;\n\n if (validationErrors[fieldName]) {\n return 'error';\n }\n\n return null;\n };\n\n render() {\n const { action } = this.props;\n const { formData, validation_errors: validationErrors } = this.state;\n\n let validationParameters = '';\n let executeParameters = '';\n\n if (formData.validation_parameters) {\n validationParameters = formData.validation_parameters;\n }\n\n if (formData.execute_parameters) {\n executeParameters = formData.execute_parameters;\n }\n\n return (\n \n \n \n );\n }\n}\n\nCollectorForm.propTypes = {\n action: PropTypes.oneOf(['create', 'edit']),\n collector: PropTypes.object,\n history: PropTypes.object.isRequired,\n sendTelemetry: PropTypes.func,\n};\n\nCollectorForm.defaultProps = {\n action: 'edit',\n collector: {\n default_template: '',\n },\n sendTelemetry: () => {},\n};\n\nexport default withTelemetry(withHistory(connect(CollectorForm, { collectors: CollectorsStore })));\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 merge from 'lodash/merge';\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 getConfiguration: { asyncResult: true },\n getConfigurationSidecars: { 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 getInitialState() {\n return {\n configurations: this.configurations,\n query: this.query,\n total: this.total,\n pagination: this.pagination,\n paginatedConfigurations: this.paginatedConfigurations,\n };\n },\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 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 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 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 merge from 'lodash/merge';\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 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","StyledButton","theme","items","path","title","permissions","exactPathMatch","NAV_ITEMS","ValidationMessage","validationErrors","fieldName","defaultText","formatServiceTypes","options","formatOperatingSystems","CollectorForm","props","error","action","history","sendTelemetry","formData","isCreate","promise","key","value","nextValue","nextFormData","validation","event","nextName","collector","validationParameters","executeParameters","CollectorConfigurationsActions","CollectorConfigurationsStore","query","page","pageSize","baseUrl","search","uri","response","configurationId","errorMessage","template","requestTemplate","configuration","url","name","payload","CollectorsActions","CollectorsStore","collectorId"],"sourceRoot":""}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy