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

web-interface.assets.1255d548-3486.b431fb9741ed8c9604ee.js Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["1255d548-3486"],{leXY1Rul:(A,E,e)=>{e.d(E,{Z:()=>a});var t=e("DUKaTDO2"),P=e("eFxcQyPT"),d=e("MdYBRjRJ"),D=e("U1Iufsob"),n=e("jAGDuYSC");function i(){return(0,P.ZP)("GET",(0,d.DC)(D.Z.EntityScopeController.getScope().url))}const a=l=>{var r;const{data:v,isLoading:_,error:f}=(0,t.useQuery)(["scope-permissions"],i,{onError:()=>n.Z.error(f.message),retry:1,cacheTime:108e5,staleTime:108e5}),u=((r=l==null?void 0:l._scope)==null?void 0:r.toUpperCase())||"DEFAULT",C=_?{is_mutable:!1}:v.entity_scopes[u];return{loadingScopePermissions:_,scopePermissions:C}}},"/kPfgGki":(A,E,e)=>{e.r(E),e.d(E,{default:()=>U});var t=e("Z7aTuO5B"),P=e("yAXMqwrl"),d=e("jvpdvVQ7"),D=e("leXY1Rul"),n=e("uZqmR+ju"),i=e("/GOzvPf6"),T=e("4FHtc+Yb"),a=e("d4kzUuQm"),l=e("E+CaPsQD"),r=e("0TVxnHwi"),v=e("q2j1bVbz"),_=e("cd5HAK44"),f=e("/7OuCFNo"),u=e("CYFwYmkW");const U=()=>{const m=(0,P.useParams)(),c=(0,v.Z)(),[s,g]=t.useState(void 0),O=(0,f.Z)();t.useEffect(()=>{(0,r.rq)(c.permissions,`eventdefinitions:edit:${m.definitionId}`)&&_.y.get(m.definitionId).then(o=>{const M=o.event_definition;M.config._is_scheduled=o.context.scheduler.is_scheduled,g(M)},o=>{o.status===404&&O.push(a.ZP.ALERTS.DEFINITIONS.LIST)})},[m,c,O]);const{loadingScopePermissions:L,scopePermissions:I}=(0,D.Z)(s),B=()=>{var o;return(((o=s==null?void 0:s.config)==null?void 0:o.streams)||[]).filter(h=>!(0,r.rq)(c.permissions,`streams:read:${h}`))};(0,r.rq)(c.permissions,`eventdefinitions:edit:${m.definitionId}`)||O.push(a.ZP.NOTFOUND);const R=B();return R.length>0?t.createElement(u.Z,{error:null,missingStreamIds:R}):!s||L?t.createElement(i.$4,{title:"Edit Event Definition"},t.createElement("span",null,t.createElement(i.mr,{title:"Edit Event Definition"},t.createElement(i.$j,{text:"Loading Event Definition..."})))):t.createElement(i.$4,{title:`Edit "${s.title}" Event Definition`},t.createElement(d.Z,null),t.createElement(i.mr,{title:`Edit "${s.title}" Event Definition`,documentationLink:{title:"Alerts documentation",path:l.Z.PAGES.ALERTS}},t.createElement("span",null,"Event Definitions allow you to create Events from different Conditions and alert on them.")),I.is_mutable?t.createElement(n.Row,{className:"content"},t.createElement(n.Col,{md:12},t.createElement(T.Z,{action:"edit",eventDefinition:s}))):t.createElement(n.Row,{className:"content"},t.createElement(n.Col,{md:12},t.createElement(n.Row,null,t.createElement(n.Col,{md:6,mdOffset:3,lg:4,lgOffset:4},t.createElement("div",{style:{textAlign:"center"}},t.createElement("p",null,"This particular Event Definition has been marked as immutable when it was created, therefore it cannot be edited.")))))))}}}]);})();

//# sourceMappingURL=1255d548-3486.b431fb9741ed8c9604ee.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy