web-interface.assets.bb8c8232-2809.da3dedf0b54dfff95a03.js Maven / Gradle / Ivy
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["bb8c8232-2809"],{"/kPfgGki":(B,m,t)=>{t.r(m),t.d(m,{default:()=>R});var e=t("Z7aTuO5B"),D=t("yAXMqwrl"),f=t("oCSEoDew"),O=t.n(f),u=t("jvpdvVQ7"),d=t("rIl5IEuP"),o=t("IOI9nV80"),M=t("xtK/Ddao"),_=t("d4kzUuQm"),A=t("E+CaPsQD"),l=t("yGRmSjYM"),I=t("q2j1bVbz"),C=t("cd5HAK44"),T=t("/7OuCFNo"),g=t("brbjQOmY"),L=t("CYFwYmkW");const R=()=>{const E=(0,D.useParams)(),{step:U}=(0,g.A)(),a=(0,I.A)(),[i,S]=e.useState(void 0),r=(0,T.A)(),v=(0,D.useNavigate)(),c=(0,e.useCallback)(()=>{v(_.Ay.ALERTS.DEFINITIONS.LIST)},[v]);e.useEffect(()=>{(0,l.Nn)(a.permissions,`eventdefinitions:edit:${E.definitionId}`)&&C.a.get(E.definitionId).then(n=>{const s=n.event_definition;s.config._is_scheduled=n.context.scheduler.is_scheduled,S(s)},n=>{n.status===404&&r.push(_.Ay.ALERTS.DEFINITIONS.LIST)})},[E,a,r]);const K=()=>{var n;return(((n=i==null?void 0:i.config)==null?void 0:n.streams)||[]).filter(h=>!(0,l.Nn)(a.permissions,`streams:read:${h}`))};(0,l.Nn)(a.permissions,`eventdefinitions:edit:${E.definitionId}`)||r.push(_.Ay.NOTFOUND);const P=K(),W=n=>{const s=new(O())(window.location.href).removeSearch("step").addQuery("step",n);r.replace(s.resource())};return P.length>0?e.createElement(L.A,{error:null,missingStreamIds:P}):i?e.createElement(o.Qc,{title:`Edit "${i.title}" Event Definition`},e.createElement(u.A,null),e.createElement(o.zY,{title:`Edit "${i.title}" Event Definition`,documentationLink:{title:"Alerts documentation",path:A.A.PAGES.ALERTS}},e.createElement("span",null,"Event Definitions allow you to create Events from different Conditions and alert on them.")),e.createElement(d.Row,{className:"content"},e.createElement(d.Col,{md:12},e.createElement(M.A,{action:"edit",initialStep:U,onChangeStep:W,eventDefinition:i,onSubmit:c,onCancel:c})))):e.createElement(o.Qc,{title:"Edit Event Definition"},e.createElement("span",null,e.createElement(o.zY,{title:"Edit Event Definition"},e.createElement(o.y$,{text:"Loading Event Definition..."}))))}}}]);})();
//# sourceMappingURL=bb8c8232-2809.da3dedf0b54dfff95a03.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy