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

web-interface.assets.bb8c8232-5069.e183cee7d2da85bb663a.js.map Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
{"version":3,"file":"bb8c8232-5069.e183cee7d2da85bb663a.js","mappings":"wQA2BA,MAAMA,KAAY,WAAO,eAAa;AAAA;AAAA,EAIhCC,KAAe,WAAO,QAAM,EAAE,CAAC,CAAE,MAAAC,CAAM,OAAM;AAAA,iBAClCA,EAAM,MAAM,OAAO,UAAU;AAAA,eAC/BA,EAAM,MAAM,KAAK,UAAU;AAAA,WAC/BA,EAAM,OAAO,QAAQ,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAUxC,MAAqBA,CAAK,CAAC;AAAA;AAAA;AAAA;AAAA,aAIpBA,EAAM,OAAO,OAAO,WAAW;AAAA;AAAA,SAEtC,MAAsBA,CAAK,CAAC;AAAA;AAAA;AAAA;AAAA,WAI1B,MAAsBA,CAAK,CAAC;AAAA;AAAA,CAEnC,EAEDD,EAAa,YAAc,SAyC3B,QAtBuB,CAAC,CAAE,MAAAE,CAAM,IAC9B,gBAACH,EAAA,KACEG,EAAM,IAAI,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,YAAAC,EAAa,eAAAC,CAAe,IAChDH,EAKH,gBAAC,KAAW,CAAC,YAAaE,GAAA,KAAAA,EAAe,CAAC,EAAG,IAAKF,CAAA,EAChD,gBAAC,IAAa,CAAC,GAAIA,EAAM,eAAgB,CAACG,CAAA,EACxC,gBAACN,EAAA,CAAa,QAAQ,QACpB,gBAAC,KAAqB,KACnBI,CACH,CACF,CACF,CACF,EAZO,IAcV,CACH,C,gKCxEF,MAAMG,EAA+B,CAAC,CAAE,eAAAC,CAAe,IACrD,gBAAC,gBAAa,KACZ,gBAAC,KAAW,CAAC,YAAa,2BAA2BA,CAAc,IACjE,gBAAC,IAAa,CAAC,GAAI,KAAO,OAAO,cAAc,KAAKA,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BAAC,KAAU,CAAC,MAAM,qBAChB,gBAAC,KAAO,CAAC,KAAK,qCAAsC,EACtD,CACF,CACF,CA0BN,CACF,CA1EE,EADIqC,EACG,YAAY,CACjB,OAAQ,WAAiB,WACzB,YAAa,WAAiB,WAC9B,QAAS,WAAiB,UAC5B,CAAC,EAwEH,WAAe,QAAQ,QAAY,KAAWA,CAAuB,CAAC,EAAG,CACvE,YAAa,GACf,EAAG,CAAC,CAAE,YAAAE,CAAY,KAAO,CAAE,YAAaA,EAAY,WAAY,EAAE,C,uFChFlE,QANiDE,GAAgG5C,GAAU,CACzJ,MAAMyC,KAAS,aAAU,EAEzB,OAAO,gBAACG,EAAA,CAAW,GAAG5C,EAAgB,OAAAyC,CAAA,CAAgB,CACxD,C,qBC9BA,IAAII,EAAY,EAAQ,UAAc,EAGlCC,EAAqB,EA4BzB,SAASC,EAAMnB,EAAO,CACpB,OAAOiB,EAAUjB,EAAOkB,CAAkB,CAC5C,CAEAE,EAAO,QAAUD,C","sources":["webpack://graylog-web-interface/./src/components/common/PageNavigation.tsx","webpack://graylog-web-interface/./src/components/event-notifications/event-notification-details/EventNotificationActionLinks.jsx","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/components/events/EventsPageNavigation.tsx","webpack://graylog-web-interface/./src/pages/EditEventNotificationPage.jsx","webpack://graylog-web-interface/./src/routing/withParams.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 * 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';\nimport PropTypes from 'prop-types';\n\nimport { LinkContainer } from 'components/common/router';\nimport { Button, ButtonToolbar } from 'components/bootstrap';\nimport { IfPermitted } from 'components/common';\nimport Routes from 'routing/Routes';\n\nconst EventNotificationActionLinks = ({ notificationId }) => (\n  \n    \n      \n        \n      \n    \n    \n      \n        \n      \n    \n  \n);\n\nEventNotificationActionLinks.propTypes = {\n  notificationId: PropTypes.string.isRequired,\n};\n\nexport default EventNotificationActionLinks;\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 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