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

web-interface.assets.b6fe2bb5-7738.8d52f61bbd65e2abf24e.js.map Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
{"version":3,"file":"b6fe2bb5-7738.8d52f61bbd65e2abf24e.js","mappings":"+2CAyHA,SAAeA,EAAAA,EAAAA,IAjFiB,SAAC,GAAsB,IAApBC,EAAoB,EAApBA,OAC3BC,GAAcC,EAAAA,EAAAA,YAAWC,EAAAA,GAC/B,KAA8CC,EAAAA,EAAAA,YAA9C,GAAOC,EAAP,KAAwBC,EAAxB,KACaC,GAAkBC,EAAAA,EAAAA,GAASC,EAAAA,GAAhCC,IA0BR,OAxBAC,EAAAA,EAAAA,YAAU,WACJV,IAAeW,EAAAA,EAAAA,IAAYX,EAAYY,YAAb,gCAAmDb,EAAOc,iBACtFC,EAAAA,EAAAA,IAA4Bf,EAAOc,cAChCE,MACC,SAACC,GACC,IAAMC,EAAsBD,EAASE,iBAKrCD,EAAoBE,OAAOC,cAAgBJ,EAASK,QAAQC,UAAUC,aACtElB,EAAmBY,MAErB,SAACO,GACsB,MAAjBA,EAAMC,QACRC,EAAAA,EAAAA,KAAaC,EAAAA,GAAAA,OAAAA,YAAAA,SAKrBC,EAAAA,EAAAA,aAED,CAAC5B,EAAaD,IAEZK,GAAoBE,EAcvB,gBAAC,KAAD,CAAeuB,MAAK,gBAAWzB,EAAgByB,MAA3B,uBAClB,4BACE,gBAAC,KAAD,CAAYA,MAAK,gBAAWzB,EAAgByB,MAA3B,uBACf,yHAIA,+HACwG,IACtG,gBAAC,IAAD,CAAmBC,KAAMC,EAAAA,EAAAA,MAAAA,OACNC,KAAK,mBAG1B,gBAAC,KAAD,KACE,gBAAC,IAAD,CAAeC,GAAIN,EAAAA,GAAAA,OAAAA,MACjB,gBAAC,KAAD,CAAQO,QAAQ,QAAhB,oBAEF,gBAAC,IAAD,CAAeD,GAAIN,EAAAA,GAAAA,OAAAA,YAAAA,MACjB,gBAAC,KAAD,CAAQO,QAAQ,QAAhB,sBAEF,gBAAC,IAAD,CAAeD,GAAIN,EAAAA,GAAAA,OAAAA,cAAAA,MACjB,gBAAC,KAAD,CAAQO,QAAQ,QAAhB,oBAKN,gBAAC,KAAD,CAAKC,UAAU,WACb,gBAAC,KAAD,CAAKC,GAAI,IACP,gBAAC,IAAD,CAAwBhC,gBAAiBA,EACjBJ,YAAaA,EACbM,cAAeA,QA1C7C,gBAAC,KAAD,CAAeuB,MAAM,yBACnB,4BACE,gBAAC,KAAD,CAAYA,MAAM,yBAChB,gBAAC,KAAD,CAASG,KAAK,gCACd","sources":["webpack://graylog-web-interface/./src/pages/ViewEventDefinitionPage.tsx"],"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 { useState, useEffect, useContext } from 'react';\n\nimport { useStore } from 'stores/connect';\nimport withParams from 'routing/withParams';\nimport { LinkContainer } from 'components/common/router';\nimport { ButtonToolbar, Col, Row, Button } from 'components/bootstrap';\nimport Routes from 'routing/Routes';\nimport DocsHelper from 'util/DocsHelper';\nimport { DocumentTitle, PageHeader, Spinner } from 'components/common';\nimport CurrentUserContext from 'contexts/CurrentUserContext';\nimport DocumentationLink from 'components/support/DocumentationLink';\nimport { isPermitted } from 'util/PermissionsMixin';\nimport history from 'util/History';\nimport EventDefinitionSummary from 'components/event-definitions/event-definition-form/EventDefinitionSummary';\nimport { EventDefinitionsActions } from 'stores/event-definitions/EventDefinitionsStore';\nimport { EventNotificationsActions, EventNotificationsStore } from 'stores/event-notifications/EventNotificationsStore';\n\ntype Props = {\n  params: {\n    definitionId: string,\n  },\n};\n\nconst ViewEventDefinitionPage = ({ params }: Props) => {\n  const currentUser = useContext(CurrentUserContext);\n  const [eventDefinition, setEventDefinition] = useState<{ title: string } | undefined>();\n  const { all: notifications } = useStore(EventNotificationsStore);\n\n  useEffect(() => {\n    if (currentUser && isPermitted(currentUser.permissions, `eventdefinitions:read:${params.definitionId}`)) {\n      EventDefinitionsActions.get(params.definitionId)\n        .then(\n          (response) => {\n            const eventDefinitionResp = response.event_definition;\n\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            eventDefinitionResp.config._is_scheduled = response.context.scheduler.is_scheduled;\n            setEventDefinition(eventDefinitionResp);\n          },\n          (error) => {\n            if (error.status === 404) {\n              history.push(Routes.ALERTS.DEFINITIONS.LIST);\n            }\n          },\n        );\n\n      EventNotificationsActions.listAll();\n    }\n  }, [currentUser, params]);\n\n  if (!eventDefinition || !notifications) {\n    return (\n      \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      \n    \n  );\n};\n\nexport default withParams(ViewEventDefinitionPage);\n"],"names":["withParams","params","currentUser","useContext","CurrentUserContext","useState","eventDefinition","setEventDefinition","notifications","useStore","EventNotificationsStore","all","useEffect","isPermitted","permissions","definitionId","EventDefinitionsActions","then","response","eventDefinitionResp","event_definition","config","_is_scheduled","context","scheduler","is_scheduled","error","status","history","Routes","EventNotificationsActions","title","page","DocsHelper","text","to","bsStyle","className","md"],"sourceRoot":""}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy