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

web-interface.assets.1255d548-5226.894068cf0729ec9c720d.js.map Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
{"version":3,"file":"1255d548-5226.894068cf0729ec9c720d.js","mappings":"0mBA6BA,MAAMA,EAAyBC,GACzBA,IAAS,OACJ,CAAC,EAGH,IAAY,QAAQ,wBAAwB,EAAE,KAAMC,GAAMA,EAAE,OAASD,CAAI,GAAK,CAAC,EAGlFE,EAAkC,IAAM,IAAY,QAAQ,wBAAwB,EACvF,IAAKF,IAAU,CAAE,MAAOA,EAAK,YAAa,MAAOA,EAAK,IAAK,EAAE,EAEhE,MAAMG,UAA8B,WAAgB,CAyBlD,YAAYC,EAAO,CACjB,MAAMA,CAAK,EAOb,4BAAsBC,GAAY,CAChC,KAAK,SAAS,CAAE,gBAAiBA,CAAQ,CAAC,CAC5C,CAAC,EAED,sBAAgBC,GAAU,CACxB,KAAM,CAAE,aAAAC,EAAc,SAAAC,EAAU,cAAAC,EAAe,OAAAC,EAAQ,SAAAC,CAAS,EAAI,KAAK,MAEzEF,EACEC,IAAW,SACP,IAAqB,cAAc,eACnC,IAAqB,cAAc,aAAc,CACnD,gBAAc,MAAqBC,EAAS,QAAQ,EACpD,YAAa,qBACb,iBAAkB,GAAGD,CAAM,SAC7B,CAAC,EAEHJ,EAAM,eAAe,EAErBE,EAASD,CAAY,CACvB,CAAC,EAED,sBAAgBD,GAAU,CACxB,KAAM,CAAE,KAAAM,CAAK,EAAIN,EAAM,OACjB,CAAE,SAAAO,CAAS,EAAI,KAAK,MAE1BA,EAASD,KAAM,MAAkBN,EAAM,MAAM,CAAC,CAChD,CAAC,EAED,4BAAsBQ,GAAe,CACnC,KAAM,CAAE,SAAAD,CAAS,EAAI,KAAK,MAE1BA,EAAS,SAAUC,CAAU,CAC/B,CAAC,EAED,0BAAoBC,GAAa,CAC/B,KAAM,CAAE,cAAAN,EAAe,SAAAE,CAAS,EAAI,KAAK,MAEzCF,EAA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B,GACV,gBAAC,YAAK,+JAGN,CACF,EAEA,gBAAC,MAAG,CAAC,UAAU,WACb,gBAAC,MAAG,CAAC,GAAI,IACP,gBAAC,IAA8B,CAAC,OAAO,QAAS,EAClD,CACF,CACF,CAEJ,C,uFCzBA,QANkDU,GAAiGxC,GAAU,CAC3J,MAAM8B,KAAU,KAAW,EAE3B,OAAO,gBAACU,EAAA,CAAW,GAAGxC,EAAgB,QAAA8B,CAAA,CAAkB,CAC1D,C,qBC9BA,IAAIW,EAAY,EAAQ,UAAc,EAGlCC,EAAqB,EA4BzB,SAASC,EAAMf,EAAO,CACpB,OAAOa,EAAUb,EAAOc,CAAkB,CAC5C,CAEAE,EAAO,QAAUD,C","sources":["webpack://graylog-web-interface/./src/components/event-notifications/event-notification-form/EventNotificationForm.jsx","webpack://graylog-web-interface/./src/components/event-notifications/event-notification-form/EventNotificationFormContainer.jsx","webpack://graylog-web-interface/./src/pages/CreateEventNotificationPage.tsx","webpack://graylog-web-interface/./src/routing/withHistory.tsx","webpack://graylog-web-interface/./node_modules/lodash/clone.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 React from 'react';\nimport PropTypes from 'prop-types';\nimport get from 'lodash/get';\nimport { PluginStore } from 'graylog-web-plugin/plugin';\n\nimport { FormSubmit, Select, Spinner } from 'components/common';\nimport { Alert, Button, Col, ControlLabel, FormControl, FormGroup, HelpBlock, Row, Input } from 'components/bootstrap';\nimport { getValueFromInput } from 'util/FormsUtils';\nimport withTelemetry from 'logic/telemetry/withTelemetry';\nimport { getPathnameWithoutId } from 'util/URLUtils';\nimport { TELEMETRY_EVENT_TYPE } from 'logic/telemetry/Constants';\nimport withLocation from 'routing/withLocation';\n\nconst getNotificationPlugin = (type) => {\n  if (type === undefined) {\n    return {};\n  }\n\n  return PluginStore.exports('eventNotificationTypes').find((n) => n.type === type) || {};\n};\n\nconst formattedEventNotificationTypes = () => PluginStore.exports('eventNotificationTypes')\n  .map((type) => ({ label: type.displayName, value: type.type }));\n\nclass EventNotificationForm extends React.Component {\n  static propTypes = {\n    action: PropTypes.oneOf(['create', 'edit']),\n    notification: PropTypes.object.isRequired,\n    validation: PropTypes.object.isRequired,\n    testResult: PropTypes.shape({\n      isLoading: PropTypes.bool,\n      error: PropTypes.bool,\n      message: PropTypes.string,\n    }).isRequired,\n    formId: PropTypes.string,\n    embedded: PropTypes.bool.isRequired,\n    onChange: PropTypes.func.isRequired,\n    onCancel: PropTypes.func.isRequired,\n    onSubmit: PropTypes.func.isRequired,\n    onTest: PropTypes.func.isRequired,\n    sendTelemetry: PropTypes.func.isRequired,\n    location: PropTypes.object.isRequired,\n  };\n\n  static defaultProps = {\n    action: 'edit',\n    formId: undefined,\n  };\n\n  constructor(props) {\n    super(props);\n\n    this.state = {\n      isSubmitEnabled: true,\n    };\n  }\n\n  setIsSubmitEnabled = (enabled) => {\n    this.setState({ isSubmitEnabled: enabled });\n  };\n\n  handleSubmit = (event) => {\n    const { notification, onSubmit, sendTelemetry, action, location } = this.props;\n\n    sendTelemetry(\n      action === 'create'\n        ? TELEMETRY_EVENT_TYPE.NOTIFICATIONS.CREATE_CLICKED\n        : TELEMETRY_EVENT_TYPE.NOTIFICATIONS.EDIT_CLICKED, {\n        app_pathname: getPathnameWithoutId(location.pathname),\n        app_section: 'event-notification',\n        app_action_value: `${action}-button`,\n      });\n\n    event.preventDefault();\n\n    onSubmit(notification);\n  };\n\n  handleChange = (event) => {\n    const { name } = event.target;\n    const { onChange } = this.props;\n\n    onChange(name, getValueFromInput(event.target));\n  };\n\n  handleConfigChange = (nextConfig) => {\n    const { onChange } = this.props;\n\n    onChange('config', nextConfig);\n  };\n\n  handleTypeChange = (nextType) => {\n    const { sendTelemetry, location } = this.props;\n\n    sendTelemetry(TELEMETRY_EVENT_TYPE.EVENTDEFINITION_NOTIFICATIONS.NOTIFICATION_TYPE_SELECTED, {\n      app_pathname: getPathnameWithoutId(location.pathname),\n      app_section: 'event-definition-notifications',\n      app_action_value: 'notification-type-select',\n      notification_type: nextType,\n    });\n\n    const notificationPlugin = getNotificationPlugin(nextType);\n    const defaultConfig = notificationPlugin.defaultConfig || {};\n\n    this.handleConfigChange({ ...defaultConfig, type: nextType });\n  };\n\n  handleTestTrigger = () => {\n    const { notification, onTest, sendTelemetry, location } = this.props;\n\n    sendTelemetry(TELEMETRY_EVENT_TYPE.NOTIFICATIONS.EXECUTE_TEST_CLICKED, {\n      app_pathname: getPathnameWithoutId(location.pathname),\n      app_section: 'event-notification',\n      app_action_value: 'execute-test-button',\n    });\n\n    onTest(notification);\n  };\n\n  render() {\n    const { action, embedded, formId, notification, onCancel, validation, testResult } = this.props;\n    const { isSubmitEnabled } = this.state;\n\n    const notificationPlugin = getNotificationPlugin(notification.config.type);\n    const notificationFormComponent = notificationPlugin.formComponent\n      ? React.createElement(notificationPlugin.formComponent, {\n        config: notification.config,\n        onChange: this.handleConfigChange,\n        validation: validation,\n        setIsSubmitEnabled: this.setIsSubmitEnabled,\n      })\n      : null;\n\n    const testButtonText = testResult.isLoading ?  : 'Execute Test Notification';\n\n    return (\n      \n        \n          
\n \n\n Description (Optional)}\n type=\"textarea\"\n help=\"Longer description for this Notification.\"\n value={notification.description}\n onChange={this.handleChange}\n rows={2} />\n\n \n Notification Type\n