Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
{"version":3,"sources":["webpack:///./src/pages/EditEventDefinitionPage.jsx"],"names":["EventDefinitionsActions","CombinedProvider","get","CurrentUserStore","isPermitted","PermissionsMixin","EditEventDefinitionPage","eventDefinition","undefined","this","props","params","currentUser","permissions","definitionId","then","response","event_definition","config","_is_scheduled","context","scheduler","is_scheduled","setState","error","status","history","push","Routes","ALERTS","DEFINITIONS","LIST","route","state","NOTFOUND","title","page","DocsHelper","PAGES","text","to","bsStyle","NOTIFICATIONS","className","md","action","React","Component","PropTypes","object","isRequired","connect"],"mappings":"81CAiBQA,EAA4BC,IAAiBC,IAAI,oBAAjDF,wBACAG,EAAqBF,IAAiBC,IAAI,eAA1CC,iBAEAC,EAAgBC,IAAhBD,YAEFE,E,4zBAOI,CACNC,qBAAiBC,I,2DAGC,aACcC,KAAKC,MAA7BC,EADU,EACVA,OAAQC,EADE,EACFA,YAEZR,EAAYQ,EAAYC,YAAb,gCAAmDF,EAAOG,gBACvEd,EAAwBE,IAAIS,EAAOG,cAChCC,MACC,SAACC,GACC,IAAMT,EAAkBS,EAASC,iBAIjCV,EAAgBW,OAAOC,cAAgBH,EAASI,QAAQC,UAAUC,aAClE,EAAKC,SAAS,CAAEhB,uBAElB,SAACiB,GACsB,MAAjBA,EAAMC,QACRC,IAAQC,KAAKC,IAAOC,OAAOC,YAAYC,W,+BAO1C,MACgCtB,KAAKC,MAApCC,EADD,EACCA,OAAQC,EADT,EACSA,YAAaoB,EADtB,EACsBA,MACrBzB,EAAoBE,KAAKwB,MAAzB1B,gBAMR,OAJKH,EAAYQ,EAAYC,YAAb,gCAAmDF,EAAOG,gBACxEY,IAAQC,KAAKC,IAAOM,UAGjB3B,EAaH,kBAAC,IAAD,CAAe4B,MAAK,gBAAW5B,EAAgB4B,MAA3B,uBAClB,8BACE,kBAAC,IAAD,CAAYA,MAAK,gBAAW5B,EAAgB4B,MAA3B,uBACf,2HAIA,iIACwG,IACtG,kBAAC,IAAD,CAAmBC,KAAMC,IAAWC,MAAMT,OACvBU,KAAK,mBAG1B,kBAAC,IAAD,KACE,kBAAC,gBAAD,CAAeC,GAAIZ,IAAOC,OAAOE,MAC/B,kBAAC,IAAD,CAAQU,QAAQ,QAAhB,oBAEF,kBAAC,IAAD,CAAa5B,YAAY,yBACvB,kBAAC,gBAAD,CAAe2B,GAAIZ,IAAOC,OAAOC,YAAYC,MAC3C,kBAAC,IAAD,CAAQU,QAAQ,QAAhB,uBAGJ,kBAAC,IAAD,CAAa5B,YAAY,2BACvB,kBAAC,gBAAD,CAAe2B,GAAIZ,IAAOC,OAAOa,cAAcX,MAC7C,kBAAC,IAAD,CAAQU,QAAQ,QAAhB,qBAMR,kBAAC,IAAD,CAAKE,UAAU,WACb,kBAAC,IAAD,CAAKC,GAAI,IACP,kBAAC,IAAD,CAA8BC,OAAO,OAAOtC,gBAAiBA,EAAiByB,MAAOA,QA3C3F,kBAAC,IAAD,CAAeG,MAAM,yBACnB,8BACE,kBAAC,IAAD,CAAYA,MAAM,yBAChB,kBAAC,IAAD,CAASI,KAAK,wC,8BA/CUO,IAAMC,W,EAAtCzC,E,YACe,CACjBK,OAAQqC,IAAUC,OAAOC,WACzBtC,YAAaoC,IAAUC,OAAOC,WAC9BlB,MAAOgB,IAAUC,OAAOC,aA4FbC,sBAAQ7C,EAAyB,CAC9CM,YAAaT,IAEf,kBAAsB,CAAES,YAAxB,EAAGA,YAA8CA","file":"b999a7e7-80.9472d5d0a285679cf68d.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { LinkContainer } from 'react-router-bootstrap';\n\nimport { ButtonToolbar, Col, Row, Button } from 'components/graylog';\nimport { DocumentTitle, IfPermitted, PageHeader, Spinner } from 'components/common';\nimport EventDefinitionFormContainer\n from 'components/event-definitions/event-definition-form/EventDefinitionFormContainer';\nimport DocumentationLink from 'components/support/DocumentationLink';\n\nimport connect from 'stores/connect';\nimport CombinedProvider from 'injection/CombinedProvider';\nimport Routes from 'routing/Routes';\nimport DocsHelper from 'util/DocsHelper';\nimport PermissionsMixin from 'util/PermissionsMixin';\nimport history from 'util/History';\n\nconst { EventDefinitionsActions } = CombinedProvider.get('EventDefinitions');\nconst { CurrentUserStore } = CombinedProvider.get('CurrentUser');\n\nconst { isPermitted } = PermissionsMixin;\n\nclass EditEventDefinitionPage extends React.Component {\n static propTypes = {\n params: PropTypes.object.isRequired,\n currentUser: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n };\n\n state = {\n eventDefinition: undefined,\n };\n\n componentDidMount() {\n const { params, currentUser } = this.props;\n\n if (isPermitted(currentUser.permissions, `eventdefinitions:edit:${params.definitionId}`)) {\n EventDefinitionsActions.get(params.definitionId)\n .then(\n (response) => {\n const eventDefinition = response.event_definition;\n // Inject an internal \"_is_scheduled\" field to indicate if the event definition should be scheduled in the\n // backend. This field will be removed in the event definitions store before sending an event definition\n // back to the server.\n eventDefinition.config._is_scheduled = response.context.scheduler.is_scheduled;\n this.setState({ eventDefinition });\n },\n (error) => {\n if (error.status === 404) {\n history.push(Routes.ALERTS.DEFINITIONS.LIST);\n }\n },\n );\n }\n }\n\n render() {\n const { params, currentUser, route } = this.props;\n const { eventDefinition } = this.state;\n\n if (!isPermitted(currentUser.permissions, `eventdefinitions:edit:${params.definitionId}`)) {\n history.push(Routes.NOTFOUND);\n }\n\n if (!eventDefinition) {\n return (\n \n \n \n \n \n \n \n );\n }\n\n return (\n \n \n \n \n Event Definitions allow you to create Events from different Conditions and alert on them.\n \n\n \n Graylog's new Alerting system let you define more flexible and powerful rules. Learn more in the{' '}\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n