web-interface.assets.bb8c8232-3122.0e228dd30d25ae450889.js Maven / Gradle / Ivy
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["bb8c8232-3122"],{rDZEPRYo:(J,b,s)=>{s.d(b,{A:()=>_});var e=s("Z7aTuO5B"),n=s("P98ee3gW"),g=s("HhRuy6uH");const i=({children:a,disabled:y})=>e.createElement(n.A,{title:g.$N,bsSize:"xsmall",pullRight:!0,buttonTitle:g.qE,disabled:y},a);i.defaultProps={disabled:!1};const _=i},"6bzBY7Xo":(J,b,s)=>{s.d(b,{Pd:()=>o,V$:()=>C,lc:()=>h,pr:()=>A});var e=s("ii0bleBb"),n=s.n(e);const g=n().exact({max_index_retention_period:n().string}),i=n().exact({type:n().string,max_size:n().number}),_=n().exact({type:n().string,max_docs_per_index:n().number}),a=n().exact({type:n().string,rotation_period:n().string,max_rotation_period:n().string,rotate_empty_index_set:n().bool}),y=n().exact({type:n().string,index_lifetime_max:n().string,index_lifetime_min:n().string}),h=n().oneOfType([i,_,a,y]),T=n().string,A=n().shape({type:n().string.isRequired,max_number_of_indices:n().number,index_action:n().string}),c=n().exact({type:n().string.isRequired}),M=n().exact({type:n().string.isRequired,enum:n().arrayOf(n().string).isRequired}),v=n().exact({rotation_period:c,max_rotation_period:c,type:c.isRequired,max_size:c,max_docs_per_index:c,rotate_empty_index_set:c,index_lifetime_max:c,index_lifetime_min:c}),f=n().exact({type:n().string.isRequired,id:n().string,properties:v.isRequired}),x=n().exact({max_number_of_indices:c.isRequired,type:c.isRequired,index_action:M}),m=n().exact({type:n().string.isRequired,id:n().string,properties:x}),C=n().exact({type:n().string.isRequired,default_config:h.isRequired,json_schema:f.isRequired}),o=n().exact({type:n().string.isRequired,default_config:A.isRequired,json_schema:m.isRequired})},FBcshu83:(J,b,s)=>{s.d(b,{A:()=>A});var e=s("ii0bleBb"),n=s.n(e),g=s("Z7aTuO5B"),i=s("r3NKmxcf"),_=s("JOCOSU54");const a="",y=(c,M)=>{if(M.type===i.A.MATCH_INPUT){const v=c.find(({id:f})=>f===M.value);return v?`${v.title} (${v.name}: ${v.id})`:`: ${M.value})`}return M.type!==i.A.FIELD_PRESENCE?M.value?M.value:a:null},h=c=>c.field?c.field:c.type===i.A.MATCH_INPUT?"gl_source_input":a,T=({streamRule:c,inputs:M=[]})=>{const{data:v}=(0,_.A)(),f=v==null?void 0:v.find(({id:C})=>C===c.type),x=c.inverted?"not ":null,m=f?f.long_desc:null;return c.type===i.A.ALWAYS_MATCHES?g.createElement("span",null,"Rule always matches"):g.createElement("span",null,g.createElement("em",null,h(c))," ",g.createElement("strong",null,"must ",x),m," ",g.createElement("em",null,y(M,c)))};T.propTypes={streamRule:n().object.isRequired,inputs:n().array.isRequired};const A=T},RfX2tXzp:(J,b,s)=>{s.d(b,{A:()=>O});var e=s("ii0bleBb"),n=s.n(e),g=s("Z7aTuO5B"),i=s("oc9db6Tt"),_=s.n(i),a=s("J6y4/h8P"),y=s("FBcshu83"),h=s("8fnsnG21"),T=s("IOI9nV80"),A=s("rIl5IEuP"),c=s("yGRmSjYM"),M=s("0CyR/E1C"),v=s("jAGDuYSC"),f=s("W/ejv//U"),x=s("apKKh8n6"),m=s("q2j1bVbz");const C=a.default.span`
margin-right: 6px;
`,o=({matchData:L,stream:N,streamRule:$,onSubmit:F,onDelete:X})=>{const{permissions:q}=(0,m.A)(),[ne,W]=(0,g.useState)(!1),{inputs:Q}=(0,h.P)(f.s);(0,g.useEffect)(()=>{f.M.list()},[]);const te=D=>{D.preventDefault(),W(!0)},V=D=>{D.preventDefault(),window.confirm("Do you really want to delete this stream rule?")&&x.D.remove(N.id,$.id,()=>{X&&X($.id),v.A.success("Stream rule has been successfully deleted.","Success")})},Y=(D,ie)=>x.D.update(N.id,D,ie,()=>{F&&F(D,ie),v.A.success("Stream rule has been successfully updated.","Success")}),ee=()=>g.createElement(C,null,g.createElement(A.Button,{bsStyle:"link",bsSize:"xsmall",onClick:V,title:"Delete stream rule"},g.createElement(T.In,{name:"delete",type:"regular"})),g.createElement(A.Button,{bsStyle:"link",bsSize:"xsmall",onClick:te,title:"Edit stream rule"},g.createElement(T.In,{name:"edit_square"}))),w=()=>L.rules[$.id]?"success":"danger",j=(0,c.Nn)(q,[`streams:edit:${N.id}`])?ee():null,Z=$.description?g.createElement("small",null," ","(",$.description,")"):null,k=_()(L)?null:w();return g.createElement(A.ListGroupItem,{bsStyle:k},j,g.createElement(y.A,{streamRule:$,inputs:Q}),ne&&g.createElement(M.A,{initialValues:$,onClose:()=>W(!1),title:"Edit Stream Rule",submitButtonText:"Update Rule",submitLoadingText:"Updating Rule...",onSubmit:Y}),Z)};o.propTypes={matchData:n().shape({matches:n().bool,rules:n().object}),onDelete:n().func,onSubmit:n().func,stream:n().object.isRequired,streamRule:n().object.isRequired},o.defaultProps={matchData:{},onSubmit:()=>{},onDelete:()=>{}};const S=o,H=({matchData:L,onDelete:N,onSubmit:$,stream:F})=>{if(!F)return g.createElement(T.y$,null);const X=!!F.rules.length;return g.createElement(A.ListGroup,{componentClass:"ul"},X&&F.rules.map(q=>g.createElement(S,{key:q.id,matchData:L,onSubmit:$,onDelete:N,stream:F,streamRule:q})),!X&&g.createElement(A.ListGroupItem,null,"No rules defined."))};H.propTypes={matchData:n().shape({matches:n().bool,rules:n().object}),onSubmit:n().func,onDelete:n().func,stream:n().object.isRequired},H.defaultProps={matchData:{},onSubmit:()=>{},onDelete:()=>{}};const O=H},"0CyR/E1C":(J,b,s)=>{s.d(b,{A:()=>C});var e=s("Z7aTuO5B"),n=s("UiXZqrDE"),g=s("kbGtT3aS"),i=s("IOI9nV80"),_=s("FBcshu83"),a=s("rIl5IEuP"),y=s("fVisTAey"),h=s("E+CaPsQD"),T=s("8fnsnG21"),A=s("W/ejv//U"),c=s("r3NKmxcf"),M=s("JOCOSU54");const v=o=>o!==c.A.FIELD_PRESENCE&&o!==c.A.ALWAYS_MATCHES,f=o=>o!==c.A.ALWAYS_MATCHES&&o!==c.A.MATCH_INPUT,x=o=>{let S={};return o.type||(S={...S,type:"Type is required"}),v(o.type)&&!o.value&&(S={...S,value:"Value is required"}),f(o.type)&&!o.field&&(S={...S,field:"Field is required"}),S},m=({title:o,onClose:S,submitButtonText:H,submitLoadingText:O,onSubmit:L,initialValues:N})=>{const{inputs:$}=(0,T.P)(A.s),{data:F}=(0,M.A)();(0,e.useEffect)(()=>{A.M.list()},[]);const X=(0,e.useCallback)(W=>L(N==null?void 0:N.id,W).then(()=>S()),[L,N==null?void 0:N.id,S]),q=(0,e.useMemo)(()=>F==null?void 0:F.map(({id:W,short_desc:Q})=>({value:W,label:Q})),[F]),ne=(0,e.useMemo)(()=>$==null?void 0:$.map(({id:W,title:Q,name:te})=>({label:`${Q} (${te})`,value:W})),[$]);return e.createElement(a.Modal,{title:o,onHide:S,show:!0},e.createElement(n.Formik,{initialValues:N,onSubmit:X,validate:x},({values:W,setFieldValue:Q,isSubmitting:te,isValidating:V})=>e.createElement(n.Form,null,e.createElement(a.Modal.Header,{closeButton:!0},e.createElement(a.Modal.Title,null,o)),e.createElement(a.Modal.Body,null,F!=null&&F.length?e.createElement(a.Row,null,e.createElement(a.Col,{md:8},f(W.type)&&e.createElement(n.Field,{name:"field"},({field:{name:Y,value:ee,onChange:w,onBlur:j},meta:{error:Z,touched:k}})=>e.createElement(i.ci,{id:Y,onBlur:j,type:"text",label:"Field",name:Y,error:Z&&k?Z:void 0,defaultValue:ee,onChange:w})),e.createElement(n.Field,{name:"type"},({field:{name:Y,value:ee,onChange:w,onBlur:j},meta:{error:Z,touched:k}})=>e.createElement(a.Input,{label:"Type",id:"type",error:Z&&k?Z:void 0},e.createElement(i.l6,{onBlur:j,onChange:D=>((D===c.A.MATCH_INPUT||D===c.A.ALWAYS_MATCHES)&&(Q("value",""),Q("field","")),w({target:{value:D,name:Y}})),options:q,inputId:Y,placeholder:"Select a type",inputProps:{"aria-label":"Select a type"},value:ee}))),v(W.type)&&(W.type===c.A.MATCH_INPUT?e.createElement(n.Field,{name:"value"},({field:{name:Y,value:ee,onChange:w,onBlur:j},meta:{error:Z,touched:k}})=>e.createElement(a.Input,{id:"value",label:"Input",error:Z&&k?Z:void 0},e.createElement(i.l6,{onBlur:j,onChange:D=>{w({target:{value:D,name:Y}})},options:ne,inputId:Y,placeholder:"Select an input",inputProps:{"aria-label":"Select an input"},value:ee}))):e.createElement(i.jF,{id:"value",label:"Value",name:"value"})),e.createElement(i.jF,{id:"inverted",label:"Inverted",name:"inverted",type:"checkbox"}),e.createElement(i.jF,{id:"description",label:e.createElement(e.Fragment,null,"Description ",e.createElement(i.Bt,null)),name:"description",type:"textarea"}),e.createElement("p",null,e.createElement("strong",null,"Result:")," ",e.createElement(_.A,{streamRule:W,inputs:$}))),e.createElement(a.Col,{md:4},e.createElement(a.Well,{bsSize:"small",className:"matcher-github"},"The server will try to convert to strings or numbers based on the matcher type as well as it can.",e.createElement("br",null),e.createElement("br",null),e.createElement(i.rK,{name:"github"}),"\xA0",e.createElement("a",{href:`https://github.com/Graylog2/graylog2-server/tree/${g.Ay.getMajorAndMinorVersion()}/graylog2-server/src/main/java/org/graylog2/streams/matchers`,target:"_blank",rel:"noopener noreferrer"}," Take a look at the matcher code on GitHub"),e.createElement("br",null),e.createElement("br",null),"Regular expressions use Java syntax. ",e.createElement(y.$,{page:h.A.PAGES.STREAMS,title:"More information",text:e.createElement(i.In,{name:"lightbulb_circle",type:"regular"})})))):e.createElement(i.y$,null)),e.createElement(a.Modal.Footer,null,e.createElement(i.E6,{submitButtonText:H,submitLoadingText:O,onCancel:S,disabledSubmit:V,isSubmitting:te})))))};m.defaultProps={initialValues:{field:"",type:1,value:"",inverted:!1,description:""}};const C=m},JOCOSU54:(J,b,s)=>{s.d(b,{A:()=>_});var e=s("DUKaTDO2"),n=s("apKKh8n6"),g=s("jAGDuYSC");const _=()=>{const{data:a}=(0,e.useQuery)(["streams","rule-types"],()=>n.D.types(),{onError:y=>{g.A.error(`Loading stream rule types failed with status: ${y}`,"Could not load stream rule types")},keepPreviousData:!0,staleTime:36e5});return{data:a}}},ugRSZVzh:(J,b,s)=>{s.d(b,{A:()=>y});var e=s("DUKaTDO2"),n=s("jAGDuYSC"),g=s("pUKP3+Pg"),i=s("6gJIQhoE");const _={pagination:{total:0},elements:[],attributes:[]},y=(h,{enabled:T}={enabled:!0})=>{const{data:A,refetch:c,isInitialLoading:M}=(0,e.useQuery)(["streams","overview",h],()=>g.Ay.searchPaginated(h.page,h.pageSize,h.query,{sort:h==null?void 0:h.sort.attributeId,order:h==null?void 0:h.sort.direction,filters:(0,i.A)(h.filters)}),{onError:v=>{n.A.error(`Loading streams failed with status: ${v}`,"Could not load streams")},keepPreviousData:!0,enabled:T});return{data:A!=null?A:_,refetch:c,isInitialLoading:M}}},r3NKmxcf:(J,b,s)=>{s.d(b,{A:()=>n});const n={FIELD_PRESENCE:5,ALWAYS_MATCHES:7,MATCH_INPUT:8}},"4BCWu7kv":(J,b,s)=>{s.r(b),s.d(b,{default:()=>ft});var e=s("Z7aTuO5B"),n=s("rIl5IEuP"),g=s("ii0bleBb"),i=s.n(g),_=s("UiXZqrDE"),a=s("IOI9nV80"),y=s("hhdCSTZj");const h=({indexSets:t,help:l})=>{const r=(0,e.useMemo)(()=>t.filter(u=>u.can_be_default).map(({id:u,title:d})=>({value:u,label:d})),[t]);return e.createElement(_.Field,{name:"index_set_id"},({field:{name:u,value:d,onChange:p,onBlur:E},meta:{error:R,touched:P}})=>e.createElement(n.Input,{label:"Index Set",help:l,id:u,error:R&&P?R:void 0},e.createElement(y.A,{onBlur:E,onChange:I=>p({target:{value:I,name:u}}),options:r,inputId:u,placeholder:"Select an index set",inputProps:{"aria-label":"Select an index set"},value:d})))};h.defaultProps={help:"Messages that match this stream will be written to the configured index set."};const T=h,A=(t,l)=>{var r,u,d,p,E;return{index_set_id:(u=t.index_set_id)!=null?u:(r=l==null?void 0:l.find(R=>R.default))==null?void 0:r.id,description:(d=t.description)!=null?d:void 0,title:(p=t.title)!=null?p:void 0,remove_matches_from_default_stream:(E=t.remove_matches_from_default_stream)!=null?E:void 0}},c=t=>{let l={};return t.title||(l={...l,title:"Title is required"}),t.index_set_id||(l={...l,index_set_id:"Index set is required"}),l},M=({initialValues:t,title:l,submitButtonText:r,submitLoadingText:u,onClose:d,onSubmit:p,indexSets:E})=>{const R=(0,e.useMemo)(()=>A(t,E),[E,t]),P=(0,e.useCallback)(I=>p(I).then(()=>d()),[d,p]);return e.createElement(n.Modal,{title:l,onHide:d,show:!0},e.createElement(_.Formik,{initialValues:R,onSubmit:P,validate:c},({isSubmitting:I,isValidating:U})=>e.createElement(_.Form,null,e.createElement(n.Modal.Header,{closeButton:!0},e.createElement(n.Modal.Title,null,l)),e.createElement(n.Modal.Body,null,e.createElement(a.jF,{label:"Title",name:"title",id:"title",help:"A descriptive name of the new stream"}),e.createElement(a.jF,{label:e.createElement(e.Fragment,null,"Description ",e.createElement(a.Bt,null)),name:"description",id:"description",help:"What kind of messages are routed into this stream?"}),e.createElement(T,{indexSets:E}),e.createElement(a.jF,{label:e.createElement(e.Fragment,null,"Remove matches from \u2018Default Stream\u2019"),help:e.createElement("span",null,"Don't assign messages that match this stream to the \u2018Default Stream\u2019."),name:"remove_matches_from_default_stream",id:"remove_matches_from_default_stream",type:"checkbox"})),e.createElement(n.Modal.Footer,null,e.createElement(a.E6,{submitButtonText:r,submitLoadingText:u,onCancel:d,disabledSubmit:U,isSubmitting:I})))))};M.defaultProps={initialValues:{title:"",description:"",remove_matches_from_default_stream:!1}};const v=M;var f=s("8OvTct/Z"),x=s("v4GbOr/o");const m=({bsSize:t,bsStyle:l,buttonText:r,className:u,indexSets:d,onCreate:p})=>{const[E,R]=(0,e.useState)(!1),P=(0,f.A)(),I=(0,e.useCallback)(()=>(P(x.g.STREAMS.CREATE_FORM_MODAL_OPENED,{app_pathname:"streams"}),R(U=>!U)),[P]);return e.createElement(e.Fragment,null,e.createElement(n.Button,{bsSize:t,bsStyle:l,className:u,onClick:I},r),E&&e.createElement(v,{title:"Create stream",submitButtonText:"Create stream",submitLoadingText:"Creating stream...",indexSets:d,onSubmit:p,onClose:I}))};m.propTypes={buttonText:i().string,bsStyle:i().string,bsSize:i().string,className:i().string,onCreate:i().func.isRequired,indexSets:i().array.isRequired},m.defaultProps={buttonText:"Create stream",bsSize:void 0,bsStyle:void 0,className:void 0};const C=m;var o=s("ZaccISJq"),S=s("dsvqAVKU"),H=s("rlwexfKi"),O=s("pUKP3+Pg"),L=s("apKKh8n6"),N=s("rVdVsuGH"),$=s("MZSqcZgA"),F=s("ugRSZVzh"),X=s("qO9czYNI"),q=s("Dg3D5NJi");const ne="streams",W={pageSize:20,sort:{attributeId:"title",direction:"asc"},displayedColumns:["title","description","index_set_title","rules","throughput","disabled"],columnsOrder:["title","description","index_set_title","rules","throughput","disabled","created_at"]},Q=[{id:"index_set_title",title:"Index Set",sortable:!0,permissions:["indexsets:read"]},{id:"throughput",title:"Throughput"},{id:"rules",title:"Rules"}];var te=s("gjuIj59j"),V=s("J6y4/h8P");const Y=V.default.div(({$disabled:t,theme:l})=>(0,V.css)`
display: inline-flex;
border-radius: 50%;
height: 10px;
width: 10px;
background-color: ${t==="true"?l.colors.variant.warning:l.colors.variant.success};
margin-right: 3px;
border: 1px solid ${l.colors.gray[70]};
`),w={disabled:(t,l)=>e.createElement(e.Fragment,null,e.createElement(Y,{$disabled:t}),l)};var j=s("d4kzUuQm"),Z=s("8wYeYPUw"),k=s("YTcgvcFD"),D=s("jAGDuYSC"),ie=s("0CyR/E1C"),Ue=s("HqzDVmZB"),_e=s("q2j1bVbz"),le=s("JNPySgKz"),Be=s("rDZEPRYo");const ae=()=>e.createElement(a.Zf,{displayLeftMargin:!0},"Action not available for the default stream"),Le=({stream:t,indexSets:l})=>{const r=(0,_e.A)(),{deselectEntity:u}=(0,le.A)(),[d,p]=(0,e.useState)(!1),[E,R]=(0,e.useState)(!1),[P,I]=(0,e.useState)(!1),[U,ue]=(0,e.useState)(!1),[G,se]=(0,e.useState)(!1),K=(0,f.A)(),de=(0,e.useCallback)(()=>k.j.set(r.id,"stream",t.id),[t.id,r.id]),z=t.is_default,ce=!t.is_editable,Te=(0,e.useCallback)(async()=>{K(x.g.STREAMS.STREAM_ITEM_STATUS_TOGGLED,{app_pathname:"streams",app_action_value:" stream-item-status",event_details:{enabled:!t.disabled}}),se(!0),t.disabled&&await O.Ay.resume(t.id,B=>B),!t.disabled&&window.confirm(`Do you really want to pause stream '${t.title}'?`)&&await O.Ay.pause(t.id,B=>B),se(!1)},[K,t.disabled,t.id,t.title]),Se=(0,e.useCallback)(()=>{K(x.g.STREAMS.STREAM_ITEM_SHARE_MODAL_OPENED,{app_pathname:"streams"}),p(B=>!B)},[K]),pe=(0,e.useCallback)(()=>{I(B=>!B)},[]),ge=(0,e.useCallback)(()=>{ue(B=>!B)},[]),Ae=(0,e.useCallback)(()=>{R(B=>!B)},[]),me=(0,e.useCallback)(()=>{window.confirm("Do you really want to remove this stream?")&&(K(x.g.STREAMS.STREAM_ITEM_DELETED,{app_pathname:"streams",app_action_value:"stream-item-delete"}),O.Ay.remove(t.id).then(()=>{u(t.id),D.A.success(`Stream '${t.title}' was deleted successfully.`,"Success")}).catch(B=>{D.A.error(`An error occurred while deleting the stream. ${B}`)}))},[u,K,t.id,t.title]),Me=(0,e.useCallback)((B,Ee)=>L.D.create(t.id,Ee,()=>{K(x.g.STREAMS.STREAM_ITEM_RULE_SAVED,{app_pathname:"streams",app_action_value:"stream-item-rule"}),D.A.success("Stream rule was created successfully.","Success")}),[K,t.id]),Pe=(0,e.useCallback)(B=>O.Ay.update(t.id,B,Ee=>(K(x.g.STREAMS.STREAM_ITEM_UPDATED,{app_pathname:"streams"}),D.A.success(`Stream '${B.title}' was updated successfully.`,"Success"),Ee)),[K,t.id]),re=(0,e.useCallback)(B=>(K(x.g.STREAMS.STREAM_ITEM_CLONED,{app_pathname:"streams"}),O.Ay.cloneStream(t.id,B,Ee=>(D.A.success(`Stream was successfully cloned as '${B.title}'.`,"Success"),Ee))),[K,t.id]);return e.createElement(n.ButtonToolbar,null,e.createElement(a.wD,{entityId:t.id,entityType:"stream",onClick:Se,bsSize:"xsmall"}),e.createElement(Be.A,{disabled:ce},e.createElement(a.Wj,{permissions:[`streams:changestate:${t.id}`,`streams:edit:${t.id}`],anyPermissions:!0},e.createElement(n.MenuItem,{onSelect:Te,disabled:z||ce},G?e.createElement("span",null,t.disabled?"Starting Stream...":"Stopping Stream..."):e.createElement("span",null,t.disabled?"Start Stream":"Stop Stream"),z&&e.createElement(ae,null))),e.createElement(a.Wj,{permissions:`streams:edit:${t.id}`},e.createElement(n.MenuItem,{onSelect:Ae,disabled:z},"Quick add rule ",z&&e.createElement(ae,null))),e.createElement(a.Wj,{permissions:`streams:edit:${t.id}`},e.createElement(n.MenuItem,{onSelect:pe,disabled:z},"Edit stream ",z&&e.createElement(ae,null))),e.createElement(a.Wj,{permissions:[`streams:edit:${t.id}`]},e.createElement(n.MenuItem,{divider:!0})),e.createElement(a.Wj,{permissions:[`streams:edit:${t.id}`]},e.createElement(n.MenuItem,{disabled:z||ce,href:j.Ay.stream_edit(t.id)},"Manage Rules ",z&&e.createElement(ae,null))),e.createElement(Z.A,null,e.createElement(a.Wj,{permissions:"stream_outputs:read"},e.createElement(n.MenuItem,{href:j.Ay.stream_outputs(t.id)},"Manage Outputs"))),e.createElement(a.Wj,{permissions:`streams:edit:${t.id}`},e.createElement(n.MenuItem,{href:j.Ay.stream_alerts(t.id)},"Manage Alerts")),e.createElement(a.Wj,{permissions:`streams:edit:${t.id}`},e.createElement(n.MenuItem,{divider:!0})),e.createElement(n.MenuItem,{onSelect:de,disabled:r.readOnly},"Set as startpage"),e.createElement(a.Wj,{permissions:["streams:create",`streams:read:${t.id}`]},e.createElement(n.MenuItem,{onSelect:ge,disabled:z},"Clone this stream ",z&&e.createElement(ae,null))),e.createElement(a.Wj,{permissions:`streams:edit:${t.id}`},e.createElement(n.MenuItem,{onSelect:me,disabled:z},"Delete this stream ",z&&e.createElement(ae,null)))),P&&e.createElement(v,{title:"Editing Stream",onSubmit:Pe,onClose:pe,submitButtonText:"Update stream",submitLoadingText:"Updating stream...",initialValues:t,indexSets:l}),U&&e.createElement(v,{title:"Cloning Stream",onSubmit:re,onClose:ge,submitButtonText:"Clone stream",submitLoadingText:"Cloning stream...",indexSets:l}),E&&e.createElement(ie.A,{onClose:Ae,title:"New Stream Rule",submitButtonText:"Create Rule",submitLoadingText:"Creating Rule...",onSubmit:Me}),d&&e.createElement(Ue.A,{entityId:t.id,entityType:"stream",entityTitle:t.title,description:"Search for a User or Team to add as collaborator on this stream.",onClose:Se}))};var We=s("DUKaTDO2"),he=s("TJOheZRu"),fe=s("eFxcQyPT"),ye=s("MdYBRjRJ"),ve=s("U1Iufsob"),oe=s("cB7h3AEX"),Ke=s("Z2BtcgLJ");const De=({handleFailures:t,refetchStreams:l,descriptor:r,onSelect:u})=>{const{selectedEntities:d}=(0,le.A)(),p=(0,e.useCallback)(()=>{typeof u=="function"&&u(),(0,fe.Ay)("POST",(0,ye.H3)(ve.A.StreamsApiController.bulk_pause().url),{entity_ids:d}).then(({failures:E})=>t(E,"stopped")).catch(E=>{D.A.error(`An error occurred while stopping streams. ${E}`)}).finally(()=>{l()})},[t,u,l,d]);return e.createElement(oe.A,{onSelect:p},"Stop ",r)};De.defaultProps={onSelect:void 0};const $e=De;var Fe=s("nxMFMmDQ"),He=s("/8lbhT5j"),je=s("CHWvwBKE");const ze=t=>He.A.builder().timerange(Fe.Zl).query((0,je.P$)()).streams(t).build().toURL(),Ne=()=>{const{selectedEntities:t}=(0,le.A)(),l=ze(t);return e.createElement(oe.A,{href:l,target:"_blank"},"Search in streams")};var Ge=s("rzOX6PZw");const xe=({handleFailures:t,refetchStreams:l,descriptor:r,onSelect:u})=>{const{selectedEntities:d}=(0,le.A)(),p=(0,e.useCallback)(()=>{typeof u=="function"&&u(),(0,fe.Ay)("POST",(0,ye.H3)(ve.A.StreamsApiController.bulk_resume().url),{entity_ids:d}).then(({failures:E})=>t(E,"started")).catch(E=>{D.A.error(`An error occurred while starting streams. ${E}`)}).finally(()=>{l()})},[t,u,l,d]);return e.createElement(oe.A,{onSelect:p},"Start ",r)};xe.defaultProps={onSelect:void 0};const Ye=xe;var Ze=s("xAuw/bbM"),Je=s("rp7UD7rK");const Ve=({toggleShowModal:t,indexSets:l,refetchStreams:r,descriptor:u})=>{const{selectedEntities:d,setSelectedEntities:p}=(0,le.A)(),E=`Assign Index Set To ${d.length} ${he.A.capitalizeFirstLetter(u)}`,R=({index_set_id:I})=>Ze.Ee.assignToIndexSet(I,d).then(()=>{r(),D.A.success(`Index set was assigned to ${d.length} ${u} successfully.`,"Success"),p([]),t()}).catch(U=>{D.A.error(`Assigning index set failed with status: ${U}`,"Error")}),P=({index_set_id:I})=>{let U={};return I||(U={...U,index_set_id:"Index set is required"}),U};return e.createElement(n.Modal,{title:E,onHide:t,show:!0},e.createElement(_.Formik,{initialValues:{index_set_id:void 0},onSubmit:R,validate:P},({isSubmitting:I,isValidating:U})=>e.createElement(_.Form,null,e.createElement(n.Modal.Header,{closeButton:!0},e.createElement(n.Modal.Title,null,E)),e.createElement(n.Modal.Body,null,e.createElement(T,{indexSets:l,help:"Messages that match the selected streams will be written to the configured index set."})),e.createElement(n.Modal.Footer,null,e.createElement(Je.A,{submitButtonText:"Assign index set",submitLoadingText:"Assigning index set...",onCancel:t,disabledSubmit:U,isSubmitting:I})))))},Qe=({indexSets:t})=>{const l=(0,We.useQueryClient)(),{selectedEntities:r,setSelectedEntities:u}=(0,le.A)(),[d,p]=(0,e.useState)(!1),E=r==null?void 0:r.length,R=he.A.pluralize(E,"stream","streams"),P=(0,e.useCallback)(()=>l.invalidateQueries(["streams","overview"]),[l]),I=(0,e.useCallback)(()=>{p(G=>!G)},[]),U=(0,e.useCallback)((G,se)=>{if(G!=null&&G.length){const K=G.map(({entity_id:de})=>de);u(K),D.A.error(`${K.length} out of ${E} selected ${R} could not be ${se}.`)}else u([]),D.A.success(`${E} ${R} ${he.A.pluralize(E,"was","were")} ${se} successfully.`,"Success")},[R,E,u]),ue=(0,e.useCallback)(()=>{window.confirm(`Do you really want to remove ${E} ${R}? This action cannot be undone.`)&&(0,fe.Ay)("POST",(0,ye.H3)(ve.A.StreamsApiController.bulk_delete().url),{entity_ids:r}).then(({failures:G})=>U(G,"deleted")).catch(G=>{D.A.error(`An error occurred while deleting streams. ${G}`)}).finally(()=>{P()})},[R,U,P,E,r]);return e.createElement(e.Fragment,null,d&&e.createElement(Ve,{toggleShowModal:I,indexSets:t,descriptor:R,refetchStreams:P}),e.createElement(Ke.A,null,e.createElement(Ge.A,{permissions:"indexsets:read"},e.createElement(oe.A,{onSelect:I},"Assign index set")),e.createElement(Ne,null),e.createElement(Ye,{handleFailures:U,refetchStreams:P,descriptor:R}),e.createElement($e,{handleFailures:U,refetchStreams:P,descriptor:R}),e.createElement(oe.A,{onSelect:ue},"Delete")))};var Xe=s("RfX2tXzp");const we=t=>{switch(t){case"OR":return"at least one";case"AND":default:return"all"}},ke=({stream:t})=>e.createElement(e.Fragment,null,e.createElement("p",null,"Must match ",we(t.matching_type)," of the ",t.rules.length," configured stream ",e.createElement(a.Fb,{value:t.rules.length,plural:"rules",singular:"rule"}),"."),e.createElement(Xe.A,{stream:t}));var Ce=s("ty2gyrHp");const qe=({stream:t})=>{const[l,r]=(0,e.useState)(!1),u=t.is_default,d=!t.is_editable,p=(0,e.useCallback)(()=>{r(R=>!R)},[]),E=(0,e.useCallback)((R,P)=>L.D.create(t.id,P,()=>D.A.success("Stream rule was created successfully.","Success")),[t.id]);return e.createElement(e.Fragment,null,e.createElement(a.Wj,{permissions:[`streams:edit:${t.id}`]},e.createElement(Ce.m,{to:j.Ay.stream_edit(t.id)},e.createElement(n.Button,{bsStyle:"link",bsSize:"xsmall",disabled:u||d},"Manage Rules"))),e.createElement(a.Wj,{permissions:[`streams:edit:${t.id}`]},e.createElement(n.Button,{bsStyle:"info",bsSize:"xsmall",disabled:u||d,onClick:p},"Quick add rule")),l&&e.createElement(ie.A,{onClose:p,title:"New Stream Rule",submitButtonText:"Create Rule",submitLoadingText:"Creating Rule...",onSubmit:E}))},et=({indexSets:t})=>{const l=(0,e.useCallback)(p=>e.createElement(Le,{stream:p,indexSets:t}),[t]),r=(0,e.useCallback)(p=>e.createElement(ke,{stream:p}),[]),u=(0,e.useCallback)(p=>e.createElement(qe,{stream:p}),[]),d=(0,e.useMemo)(()=>({rules:{title:"Rules",content:r,actions:u}}),[r,u]);return{entityActions:l,bulkActions:e.createElement(Qe,{indexSets:t}),expandedSections:d}};var tt=s("f6qZmSzy"),st=s("yGRmSjYM");const nt=({stream:t,indexSets:l})=>{const r=(0,_e.A)();if(!(0,st.Nn)(r.permissions,["indexsets:read"]))return null;const u=l.find(d=>d.id===t.index_set_id)||l.find(d=>d.default);return u?e.createElement(Ce.N,{to:j.Ay.SYSTEM.INDEX_SETS.SHOW(u.id)},u.title):e.createElement("i",null,"not found")};var Re=s("woUyHGxd"),Ie=s("8fnsnG21");const lt=({stream:t})=>{const{metrics:l}=(0,Ie.P)(Re.$),r=`org.graylog2.plugin.streams.Stream.${t.id}.incomingMessages.1-sec-rate`;if((0,e.useEffect)(()=>(Re.p.addGlobal(r),()=>{Re.p.removeGlobal(r)})),!l)return e.createElement(a.y$,null);const u=Object.keys(l).map(d=>{var p;const E=(p=l[d])==null?void 0:p[r];return E!=null&&E.metric&&"value"in E.metric?E.metric.value:0}).reduce((d,p)=>d+p,0);return e.createElement(e.Fragment,null,u," msg/s")},at=(0,V.default)(n.Label)(({$clickable:t})=>(0,V.css)`
cursor: ${t?"pointer":"default"};
display: inline-flex;
justify-content: center;
gap: 4px;
`),rt=V.default.div`
border-left: 1px solid currentColor;
height: 1em;
`,it=(t,l,r)=>l?r:t?"Start stream":"Pause stream",ot=({stream:t})=>{const l=t.is_default||!t.is_editable,r=t.disabled?"Paused":"Running",u=it(t.disabled,l,r),d=(0,f.A)(),p=(0,e.useCallback)(async()=>{d(x.g.STREAMS.STREAM_ITEM_STATUS_TOGGLED,{app_pathname:"streams",app_action_value:"stream-item-status",event_details:{enabled:!t.disabled}}),t.disabled&&await O.hZ.resume(t.id,E=>E),!t.disabled&&window.confirm(`Do you really want to pause stream '${t.title}'?`)&&await O.hZ.pause(t.id,E=>E)},[d,t.disabled,t.id,t.title]);return e.createElement(at,{bsStyle:t.disabled?"warning":"success",onClick:l?void 0:p,title:u,"aria-label":u,role:"button",$clickable:!l},t.disabled?"Paused":"Running",!l&&e.createElement(e.Fragment,null,e.createElement(rt,null),e.createElement(a.In,{name:t.disabled?"play_arrow":"pause"})))};var ut=s("LQfvSgYI");const dt=(0,V.default)(a.xz)`
cursor: pointer;
`,ct=({stream:t})=>{var l;const r=(0,e.useRef)(),{toggleSection:u,expandedSections:d}=(0,ut.A)(),p=(0,e.useCallback)(()=>u(t.id,"rules"),[t.id,u]);if(t.is_default||!t.is_editable)return null;const E=(l=d==null?void 0:d[t.id])==null?void 0:l.includes("rules");return e.createElement(dt,{onClick:p,ref:r,title:`${E?"Hide":"Show"} stream rules`},t.rules.length)},mt=(0,V.default)(n.Label)`
display: inline-flex;
margin-left: 5px;
vertical-align: inherit;
`,Et=t=>({attributes:{title:{renderCell:(l,r)=>e.createElement(e.Fragment,null,e.createElement(Ce.N,{to:j.Ay.stream_search(r.id)},l),r.is_default&&e.createElement(mt,{bsStyle:"primary",bsSize:"xsmall"},"Default"))},index_set_title:{renderCell:(l,r)=>e.createElement(nt,{indexSets:t,stream:r}),width:.7},throughput:{renderCell:(l,r)=>e.createElement(lt,{stream:r}),staticWidth:120},disabled:{renderCell:(l,r)=>e.createElement(ot,{stream:r}),staticWidth:100},rules:{renderCell:(l,r)=>e.createElement(ct,{stream:r}),staticWidth:70}}}),St=({updateTableLayout:t,paginationQueryParameter:l,setQuery:r})=>{const u=(0,e.useCallback)(P=>{l.setPagination({page:1,pageSize:P}),t({perPage:P})},[l,t]),d=(0,e.useCallback)(P=>{l.resetPage(),r(P)},[l,r]),p=(0,e.useCallback)(()=>{d("")},[d]),E=(0,e.useCallback)(P=>{t({displayedAttributes:P})},[t]),R=(0,e.useCallback)(P=>{l.resetPage(),t({sort:P})},[l,t]);return{onPageSizeChange:u,onSearch:d,onSearchReset:p,onColumnsChange:E,onSortChange:R}},pt=t=>{(0,e.useEffect)(()=>(O.Ay.onChange(()=>t()),L.D.onChange(()=>t()),()=>{O.Ay.unregister(()=>t()),L.D.unregister(()=>t())}),[t])},be=({indexSets:t})=>{const[l,r]=(0,tt.A)(),[u,d]=(0,o.useQueryParam)("query",o.StringParam),{layoutConfig:p,isInitialLoading:E}=(0,q.A)({entityTableId:ne,defaultPageSize:W.pageSize,defaultDisplayedAttributes:W.displayedColumns,defaultSort:W.sort}),R=(0,N.Ay)(void 0,p.pageSize,!1),{mutate:P}=(0,X.A)(ne),{data:I,isInitialLoading:U,refetch:ue}=(0,F.A)({query:u,page:R.page,pageSize:p.pageSize,sort:p.sort,filters:l},{enabled:!E}),{entityActions:G,expandedSections:se,bulkActions:K}=et({indexSets:t}),{onPageSizeChange:de,onSearch:z,onSearchReset:ce,onColumnsChange:Te,onSortChange:Se}=St({paginationQueryParameter:R,updateTableLayout:P,setQuery:d}),pe=(0,e.useCallback)(re=>{R.resetPage(),r(re)},[R,r]);pt(ue);const ge=(0,e.useMemo)(()=>Et(t),[t]),Ae=(0,e.useMemo)(()=>{var re;return[...(re=I==null?void 0:I.attributes)!=null?re:[],...Q]},[I==null?void 0:I.attributes]);if(E||U)return e.createElement(S.A,null);const{elements:me,attributes:Me,pagination:{total:Pe}}=I;return e.createElement(a.OW,{pageSize:p.pageSize,showPageSizeSelect:!1,totalItems:Pe},e.createElement("div",{style:{marginBottom:5}},e.createElement(a.B9,{onSearch:z,onReset:ce,query:u,queryHelpComponent:e.createElement(H.A,{entityName:"stream"})},e.createElement(te.A,{attributes:Me,urlQueryFilters:l,setUrlQueryFilters:pe,filterValueRenderers:w}))),e.createElement("div",null,(me==null?void 0:me.length)===0?e.createElement(a.EO,null,"No streams have been found"):e.createElement($.A,{data:me,visibleColumns:p.displayedAttributes,columnsOrder:W.columnsOrder,onColumnsChange:Te,onSortChange:Se,onPageSizeChange:de,pageSize:p.pageSize,bulkSelection:{actions:K},expandedSectionsRenderer:se,activeSort:p.sort,rowActions:G,actionsCellWidth:160,columnRenderers:ge,columnDefinitions:Ae,entityAttributesAreCamelCase:!1})))};be.propTypes={indexSets:i().array.isRequired};const gt=be;var At=s("/W/x1zfW"),ht=s("E+CaPsQD"),Oe=s("PhRf2fIG");const ft=()=>{const{indexSets:t}=(0,Ie.P)(Oe.zE),l=(0,f.A)(),r=d=>(l(x.g.STREAMS.NEW_STREAM_CREATED,{app_pathname:"streams"}),O.Ay.save(d,()=>{D.A.success("Stream has been successfully created.","Success")}));return(0,e.useEffect)(()=>{Oe.pG.list(!1)},[]),t?e.createElement(a.Qc,{title:"Streams"},e.createElement(At.A,{title:"Streams",documentationLink:{title:"Streams documentation",path:ht.A.PAGES.STREAMS},actions:e.createElement(a.Wj,{permissions:"streams:create"},e.createElement(C,{bsStyle:"success",onCreate:r,indexSets:t}))},e.createElement("span",null,"You can route incoming messages into streams by applying rules against them. Messages matching the rules of a stream are routed into it. A message can also be routed into multiple streams.")),e.createElement(n.Row,{className:"content"},e.createElement(n.Col,{md:12},e.createElement(gt,{indexSets:t})))):e.createElement(a.y$,null)}},PhRf2fIG:(J,b,s)=>{s.d(b,{pG:()=>f,qg:()=>v,zE:()=>x});var e=s("JnTtTRmZ"),n=s.n(e),g=s("ii0bleBb"),i=s.n(g),_=s("8u9vblRK"),a=s.n(_),y=s("U1Iufsob"),h=s("eFxcQyPT"),T=s("MdYBRjRJ"),A=s("jAGDuYSC"),c=s("IA3Ku5lS"),M=s("6bzBY7Xo");const v=i().shape({can_be_default:i().bool,id:i().string,title:i().string,description:i().string.isRequired,index_prefix:i().string.isRequired,shards:i().number.isRequired,replicas:i().number.isRequired,rotation_strategy_class:i().string.isRequired,rotation_strategy:M.lc.isRequired,retention_strategy_class:i().string.isRequired,retention_strategy:M.pr.isRequired,creation_date:i().string,index_analyzer:i().string.isRequired,index_optimization_max_num_segments:i().number.isRequired,index_optimization_disabled:i().bool.isRequired,field_type_refresh_interval:i().number.isRequired,index_template_type:i().string,writable:i().bool.isRequired,default:i().bool.isRequired}),f=(0,c.rN)("core.IndexSets",()=>n().createActions({list:{asyncResult:!0},listPaginated:{asyncResult:!0},get:{asyncResult:!0},update:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},searchPaginated:{asyncResult:!0},setDefault:{asyncResult:!0},stats:{asyncResult:!0}})),x=(0,c.Bv)("core.IndexSets",()=>n().createStore({listenables:[f],indexSetsCount:void 0,indexSets:void 0,indexSetStats:void 0,indexSet:void 0,globalIndexSetStats:void 0,getInitialState(){return this.getState()},getState(){return{indexSetsCount:this.indexSetsCount,indexSets:this.indexSets,indexSetStats:this.indexSetStats,indexSet:this.indexSet,globalIndexSetStats:this.globalIndexSetStats}},propagateChanges(){this.trigger(this.getState())},list(m){const C=(0,T.H3)(y.A.IndexSetsApiController.list(m).url),o=(0,h.Ay)("GET",C);o.then(S=>(this.indexSetsCount=S.total,this.indexSets=S.index_sets,this.indexSetStats=S.stats,this.propagateChanges(),S),S=>{A.A.error(`Fetching index sets list failed: ${S.message}`,"Could not retrieve index sets.")}),f.list.promise(o)},listPaginated(m,C,o){const S=(0,T.H3)(y.A.IndexSetsApiController.listPaginated(m,C,o).url),H=(0,h.Ay)("GET",S);H.then(O=>(this.indexSetsCount=O.total,this.indexSets=O.index_sets,this.indexSetStats=O.stats,this.propagateChanges(),O),O=>{A.A.error(`Fetching index sets list failed: ${this._errorMessage(O)}`,"Could not retrieve index sets.")}),f.listPaginated.promise(H)},searchPaginated(m,C,o,S){const H=(0,T.H3)(y.A.IndexSetsApiController.searchPaginated(m,C,o,S).url),O=(0,h.Ay)("GET",H);O.then(L=>(this.indexSetsCount=L.total,this.indexSets=L.index_sets,this.indexSetStats=L.stats,this.propagateChanges(),L),L=>{A.A.error(`Fetching index sets list failed: ${this._errorMessage(L)}`,"Could not retrieve index sets.")}),f.searchPaginated.promise(O)},get(m){const C=(0,T.H3)(y.A.IndexSetsApiController.get(m).url),o=(0,h.Ay)("GET",C);o.then(S=>(this.indexSet=S,this.propagateChanges(),S),S=>{A.A.error(`Fetching index set '${m}' failed with status: ${this._errorMessage(S)}`,"Could not retrieve index set.")}),f.get.promise(o)},update(m){const C=(0,T.H3)(y.A.IndexSetsApiController.get(m.id).url),o=(0,h.Ay)("PUT",C,m);o.then(S=>(A.A.success(`Successfully updated index set '${m.title}'`,"Success"),this.indexSet=S,this.propagateChanges(),S),S=>{A.A.error(`Updating index set '${m.title}' failed with status: ${this._errorMessage(S)}`,"Could not update index set.")}),f.update.promise(o)},create(m){const C=(0,T.H3)(y.A.IndexSetsApiController.create().url),o=(0,h.Ay)("POST",C,m);o.then(S=>(A.A.success(`Successfully created index set '${m.title}'`,"Success"),this.indexSet=S,this.propagateChanges(),S),S=>{A.A.error(`Creating index set '${m.title}' failed with status: ${this._errorMessage(S)}`,"Could not create index set.")}),f.create.promise(o)},delete(m,C){const o=(0,T.H3)(y.A.IndexSetsApiController.delete(m.id,C).url),S=(0,h.Ay)("DELETE",o);S.then(()=>{A.A.success(`Successfully deleted index set '${m.title}'`,"Success")},H=>{A.A.error(`Deleting index set '${m.title}' failed with status: ${this._errorMessage(H)}`,"Could not delete index set.")}),f.delete.promise(S)},setDefault(m){const C=(0,T.H3)(y.A.IndexSetsApiController.setDefault(m.id).url),o=(0,h.Ay)("PUT",C);o.then(()=>{A.A.success(`Successfully set index set '${m.title}' as default`,"Success")},S=>{A.A.error(`Setting index set '${m.title}' as default failed with status: ${this._errorMessage(S)}`,"Could not set default index set.")}),f.setDefault.promise(o)},stats(){const m=(0,T.H3)(y.A.IndexSetsApiController.stats().url),C=(0,h.Ay)("GET",m);C.then(o=>(this.globalIndexSetStats={indices:o.indices,documents:o.documents,size:o.size},this.propagateChanges(),o),o=>{A.A.error(`Fetching global index stats failed: ${o.message}`,"Could not retrieve global index stats.")}),f.stats.promise(C)},_errorMessage(m){try{return a()(m.additional.body)?m.additional.body.map(({message:C,path:o})=>`${o!=null?o:""} ${C}.`).join(" "):m.additional.body.message}catch{return m.message}}}))},"W/ejv//U":(J,b,s)=>{s.d(b,{M:()=>y,s:()=>h});var e=s("JnTtTRmZ"),n=s.n(e),g=s("jAGDuYSC"),i=s("MdYBRjRJ"),_=s("eFxcQyPT"),a=s("IA3Ku5lS");const y=(0,a.rN)("core.StreamRulesInputs",()=>n().createActions({list:{asyncResult:!0}})),h=(0,a.Bv)("core.StreamRulesInputs",()=>n().createStore({listenables:[y],sourceUrl:"/streams/rules/inputs",inputs:void 0,init(){this.list()},_state(){return{inputs:this.inputs}},getInitialState(){return this._state()},list(){const T=(0,_.Ay)("GET",(0,i.H3)(this.sourceUrl));T.then(A=>(this.inputs=A.inputs,this.trigger(this._state()),this.inputs),A=>{g.A.error(`Fetching Stream Rule Inputs List failed with status: ${A}`,"Could not retrieve Stream Rule Inputs")}),y.list.promise(T)}}))},apKKh8n6:(J,b,s)=>{s.d(b,{D:()=>A});var e=s("JnTtTRmZ"),n=s.n(e),g=s("XYSsaeV4"),i=s.n(g),_=s("eFxcQyPT"),a=s("U1Iufsob"),y=s("MdYBRjRJ"),h=s("jAGDuYSC"),T=s("IA3Ku5lS");const A=(0,T.Bv)("core.StreamRules",()=>n().createStore({callbacks:[],types(){return(0,_.Ay)("GET",y.H3("/streams/null/rules/types"))},update(c,M,v,f){const x=o=>{h.A.error(`Updating Stream Rule failed with status: ${o}`,"Could not update Stream Rule")},m=y.H3(a.A.StreamRulesApiController.update(c,M).url),C={field:v.field,type:v.type,value:v.value,inverted:v.inverted,description:v.description};return(0,_.Ay)("PUT",m,C).then(f,x).then(this._emitChange.bind(this))},remove(c,M,v){const f=m=>{h.A.error(`Deleting Stream Rule failed with status: ${m}`,"Could not delete Stream Rule")},x=y.H3(a.A.StreamRulesApiController.delete(c,M).url);(0,_.Ay)("DELETE",x).then(v,f).then(this._emitChange.bind(this))},create(c,M,v){const f=m=>{h.A.error(`Creating Stream Rule failed with status: ${m}`,"Could not create Stream Rule")},x=y.H3(a.A.StreamRulesApiController.create(c).url);return(0,_.Ay)("POST",x,M).then(v,f).then(this._emitChange.bind(this))},onChange(c){this.callbacks.push(c)},_emitChange(){this.callbacks.forEach(c=>c())},unregister(c){i()(this.callbacks,c)}}))}}]);})();
//# sourceMappingURL=bb8c8232-3122.0e228dd30d25ae450889.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy