web-interface.assets.1255d548-8592.3e82e3aef6f553a592e5.js.map Maven / Gradle / Ivy
{"version":3,"file":"1255d548-8592.3e82e3aef6f553a592e5.js","mappings":"qVAyEA,QA5CkC,IAAM,CACtC,MAAMA,KAAc,KAAe,EAC7BC,KAAW,eAAY,EACvB,CAACC,EAAsBC,CAAuB,KAAI,YAAS,EAE3DC,KAA8B,eAAaC,GAAoB,CAC/DA,EAAgB,QAAUH,GAC5BC,EAAwBE,EAAgB,KAAK,CAEjD,EAAG,CAACH,CAAoB,CAAC,EAEnBI,KAAY,WAAQ,IAAOJ,EAAuB,yBAAyBA,CAAoB,IAAM,uBAAyB,CAACA,CAAoB,CAAC,EAE1J,sBAAU,IAAM,IACT,MAAYF,EAAY,YAAa,yBAAyB,GACjEC,EAAS,KAAO,QAAQ,CAE5B,EAAG,CAACD,EAAY,YAAaC,CAAQ,CAAC,EAGpC,gBAAC,KAAa,CAAC,MAAOK,CAAA,EACpB,gBAAC,IAAoB,IAAC,EAEtB,gBAAC,MAAW,MAAOA,EACP,kBAAmB,CACjB,MAAO,uBACP,KAAM,IAAW,MAAM,MACzB,GACV,gBAAC,YAAK,2FAEN,CACF,EAEA,gBAAC,MAAG,CAAC,UAAU,WACb,gBAAC,MAAG,CAAC,GAAI,IACP,gBAAC,KAA6B,OAAO,SACP,wBAAyBF,CAAA,CAA6B,CACtF,CACF,CAEF,CAEJ,C","sources":["webpack://graylog-web-interface/./src/pages/CreateEventDefinitionPage.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 React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\n\nimport { Col, Row } from 'components/bootstrap';\nimport { DocumentTitle, PageHeader } from 'components/common';\nimport EventDefinitionFormContainer\n from 'components/event-definitions/event-definition-form/EventDefinitionFormContainer';\nimport Routes from 'routing/Routes';\nimport DocsHelper from 'util/DocsHelper';\nimport { isPermitted } from 'util/PermissionsMixin';\nimport EventsPageNavigation from 'components/events/EventsPageNavigation';\nimport useCurrentUser from 'hooks/useCurrentUser';\n\nconst CreateEventDefinitionPage = () => {\n const currentUser = useCurrentUser();\n const navigate = useNavigate();\n const [eventDefinitionTitle, setEventDefinitionTitle] = useState();\n\n const handleEventDefinitionChange = useCallback((eventDefinition) => {\n if (eventDefinition.title !== eventDefinitionTitle) {\n setEventDefinitionTitle(eventDefinition.title);\n }\n }, [eventDefinitionTitle]);\n\n const pageTitle = useMemo(() => (eventDefinitionTitle ? `New Event Definition \"${eventDefinitionTitle}\"` : 'New Event Definition'), [eventDefinitionTitle]);\n\n useEffect(() => {\n if (!isPermitted(currentUser.permissions, 'eventdefinitions:create')) {\n navigate(Routes.NOTFOUND);\n }\n }, [currentUser.permissions, navigate]);\n\n return (\n \n \n\n \n \n Event Definitions allow you to create Alerts from different Conditions and alert on them.\n \n \n\n \n \n \n \n
\n\n \n );\n};\n\nexport default CreateEventDefinitionPage;\n"],"names":["currentUser","navigate","eventDefinitionTitle","setEventDefinitionTitle","handleEventDefinitionChange","eventDefinition","pageTitle"],"sourceRoot":""}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy