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

web-interface.assets.325e2d4b-906.d93e549562250634d7a5.js Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
"use strict";(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["325e2d4b-906"],{pLLmkYy5:(e,t,n)=>{n.d(t,{Z:()=>d});var i=n("Z7aTuO5B"),s=n("J6y4/h8P"),l=n("F9olzlTR"),a=n("EeAwn/0x"),o=n("0zTRKSqx"),r=n("XR6lEGGZ");const c=(0,s.default)(l.Si).withConfig({displayName:"PageNavigation__Container",componentId:"sc-1if5i40-0"})(["margin-bottom:10px;"]),p=(0,s.default)(l.zx).withConfig({displayName:"PageNavigation__StyledButton",componentId:"sc-1if5i40-1"})((e=>{let{theme:t}=e;return(0,s.css)(["font-family:",";font-size:",";&&&&{color:",";:hover,:focus{text-decoration:none;}:hover{","}&.active{color:",";"," :hover,:focus{","}}}"],t.fonts.family.navigation,t.fonts.size.navigation,t.colors.variant.darker.default,(0,r.RF)(t),t.colors.global.textDefault,(0,r.A7)(t),(0,r.A7)(t))}));p.displayName="Button";const d=e=>{let{items:t}=e;return i.createElement(c,null,t.map((e=>{let{path:t,title:n,permissions:s,exactPathMatch:l}=e;return t?i.createElement(o.AE,{permissions:null!=s?s:[],key:t},i.createElement(a.J,{to:t,relativeActive:!l},i.createElement(p,{bsStyle:"link"},i.createElement(r.ZP,null,n)))):null})))}},HaF9mmRp:(e,t,n)=>{n.d(t,{Z:()=>r});var i=n("ii0bleBb"),s=n.n(i),l=n("Z7aTuO5B"),a=n("6n4dw8v3");const o=e=>{let{pipeline:t,connections:n,streams:i,streamsFormatter:s,noConnectionsMessage:o}=e;const r=n.filter((e=>e.pipeline_ids&&e.pipeline_ids.includes(t.id))).filter((e=>i.some((t=>t.id===e.stream_id)))).map((e=>i.find((t=>t.id===e.stream_id)))).sort(((e,t)=>(0,a.S)(e.title,t.title)));return l.createElement("span",null,0===r.length?o:s(r))};o.propTypes={pipeline:s().object.isRequired,connections:s().array.isRequired,streams:s().array.isRequired,streamsFormatter:s().func.isRequired,noConnectionsMessage:s().node},o.defaultProps={noConnectionsMessage:"Pipeline not connected to any streams"};const r=o},MOgDWHS8:(e,t,n)=>{n.d(t,{Z:()=>r});var i=n("Z7aTuO5B"),s=n("pLLmkYy5"),l=n("DeVaSktS"),a=n("F9olzlTR");const o=[{title:"Manage pipelines",path:l.ZP.SYSTEM.PIPELINES.OVERVIEW,exactPathMatch:!0},{title:"Manage rules",path:l.ZP.SYSTEM.PIPELINES.RULES},{title:"Simulator",path:l.ZP.SYSTEM.PIPELINES.SIMULATOR}],r=()=>i.createElement(a.X2,null,i.createElement(s.Z,{items:o}))},PReZE9pk:(e,t,n)=>{n.r(t),n.d(t,{default:()=>O});var i=n("Z7aTuO5B"),s=n("F9olzlTR"),l=n("0zTRKSqx"),a=n("J6y4/h8P"),o=n("VPaD/Np4"),r=n.n(o),c=n("6n4dw8v3"),p=n("EeAwn/0x"),d=n("Y1Txt3Ie"),m=n("DeVaSktS"),u=n("b/6pmtOr"),g=n("xxwliabF"),h=n("uaoWrOBD"),P=n("UPjNKhGS"),E=n("3kMHuq+3"),f=n("CTSsa1wm"),S=n("j7/yTk5n"),y=n("EUJYvlA3"),v=n("0zEavvpT"),C=n("HaF9mmRp");const Z=(0,a.default)(l.l9).withConfig({displayName:"ProcessingTimelineComponent__StyledPaginatedList",componentId:"sc-16dbvvv-0"})([".pagination{margin:0;}"]),w=a.default.div.withConfig({displayName:"ProcessingTimelineComponent__SpinnerWrapper",componentId:"sc-16dbvvv-1"})((e=>{let{theme:t}=e;return(0,a.css)(["font-size:",";padding:"," ",";"],t.fonts.size.h3,t.spacings.xxs,t.spacings.sm)})),T=a.default.div.withConfig({displayName:"ProcessingTimelineComponent__Header",componentId:"sc-16dbvvv-2"})(["display:flex;"]),_=a.default.div.withConfig({displayName:"ProcessingTimelineComponent__PipelineStage",componentId:"sc-16dbvvv-3"})((e=>{let{$idle:t,theme:n}=e;return(0,a.css)(["border:1px solid ",";border-radius:4px;display:inline-block;margin-right:15px;padding:20px;text-align:center;width:120px;background-color:",";"],n.colors.gray[t?"50px":"70px"],t?n.utils.colorLevel(n.colors.global.contentBackground,10):n.colors.global.contentBackground)})),x=a.default.td.withConfig({displayName:"ProcessingTimelineComponent__PipelineNameTD",componentId:"sc-16dbvvv-4"})(["max-width:300px;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;width:300px;"]),b=a.default.td.withConfig({displayName:"ProcessingTimelineComponent__StreamListTD",componentId:"sc-16dbvvv-5"})(["max-width:150px;width:150px;word-wrap:break-word;"]),I=e=>{let{query:t,onSearch:n}=e;return i.createElement(l.UI,{query:t,onSearch:n,queryWidth:400,queryHelpComponent:i.createElement(l.y8,{entityName:"Pipeline"}),wrapperClass:"has-bm",onReset:()=>n(""),topMargin:0})},R=e=>e.map((e=>e.title)).join(", "),N=(e,t,n)=>{t(!0),h.o.listPaginated(e).then((e=>{n(e),t(!1)}))},k=()=>{const e=(0,S.Z)(),{connections:t}=(0,u.o)(f.V),{page:n,pageSize:a,resetPage:o,setPage:k}=(0,E.ZP)(),[q,L]=(0,i.useState)(""),[D,M]=(0,i.useState)(),[O,z]=(0,i.useState)(),[F,A]=(0,i.useState)(!1),{list:J=r().List(),pagination:{total:U=0}={}}=O||{};(0,i.useEffect)((()=>{N({page:n,perPage:a,query:q},A,z),f.q.list(),g.ZP.listStreams().then(M)}),[n,a,q]);if(!J||!D||!t)return i.createElement(l.$j,null);const Y=i.createElement(T,null,i.createElement(I,{query:q,onSearch:e=>{o(),L(e)}}),F&&i.createElement(w,null,i.createElement(l.$j,{text:"",delay:0}))),B=e=>()=>{window.confirm(`Do you really want to delete pipeline "${e.title}"? This action cannot be undone.`)&&h.o.delete(e.id).then((()=>{N({page:n,perPage:a,query:q},A,z),k(Math.max(P._.page,n-1))}))};return i.createElement("div",null,i.createElement(Z,{totalItems:U},i.createElement(l.wQ,{id:"processing-timeline",className:"table-hover",headers:["Pipeline","Connected to Streams","Processing Timeline","Actions"],headerCellFormatter:e=>{let t;return"Actions"===e&&(t="actions"),i.createElement("th",{className:t},e)},rows:J.toJS(),customFilter:Y,filterKeys:[],filterLabel:"Filter Pipelines",dataRowFormatter:n=>{const{id:l,title:a,description:o,stages:r}=n;return i.createElement("tr",{key:l},i.createElement(x,null,i.createElement(p.r,{to:m.ZP.SYSTEM.PIPELINES.PIPELINE(l),title:a},a),i.createElement("br",null),o,i.createElement("br",null),i.createElement(d.CL,{name:`org.graylog.plugins.pipelineprocessor.ast.Pipeline.${l}.executed`},i.createElement(d.qb,{prefix:"Throughput:",suffix:"msg/s"}))),i.createElement(b,null,i.createElement(C.Z,{pipeline:n,connections:t,streams:D,streamsFormatter:R,noConnectionsMessage:i.createElement("em",null,"Not connected")})),i.createElement("td",null,((e,t)=>{const n=t.map((e=>e.stage));return J.map((e=>{let{stages:t}=e;return t.map((e=>{let{stage:t}=e;return t}))})).reduce(((e,t)=>Array.from(new Set([...e,...t]))),[]).sort(c.S).map((t=>-1===n.indexOf(t)?i.createElement(_,{key:`${e.id}-stage${t}`,$idle:!0},"Idle"):i.createElement(_,{key:`${e.id}-stage${t}`},"Stage ",t)))})(n,r)),i.createElement("td",null,i.createElement(v.Z,null,i.createElement(p.J,{to:m.ZP.SYSTEM.PIPELINES.PIPELINE(l)},i.createElement(s.zx,{disabled:!(0,y.rq)(e.permissions,"pipeline:edit"),bsSize:"xsmall"},"Edit")),i.createElement(s.zx,{disabled:!(0,y.rq)(e.permissions,"pipeline:delete"),bsStyle:"danger",bsSize:"xsmall",onClick:B(n)},"Delete"))))}})))};k.propTypes={};const q=k;var L=n("4Js8dUPg");const D=()=>{const e=(0,S.Z)();return i.createElement("div",{className:"pull-right"},i.createElement(p.J,{to:m.ZP.SYSTEM.PIPELINES.PIPELINE("new")},i.createElement(s.zx,{disabled:!(0,y.rq)(e.permissions,"pipeline:create"),bsStyle:"success"},"Add new pipeline")))};var M=n("MOgDWHS8");const O=()=>i.createElement(l.$4,{title:"Pipelines"},i.createElement(M.Z,null),i.createElement(l.mr,{title:"Pipelines overview",actions:i.createElement(D,null),documentationLink:{title:"Pipelines documentation",path:L.Z.PAGES.PIPELINES}},i.createElement("span",null,"Pipelines let you transform and process messages coming from streams. Pipelines consist of stages where rules are evaluated and applied. Messages can go through one or more stages.")),i.createElement(s.X2,{className:"content"},i.createElement(s.JX,{md:12},i.createElement(q,null))))},UPjNKhGS:(e,t,n)=>{n.d(t,{_:()=>i});const i={page:1,perPage:10,query:""}},CTSsa1wm:(e,t,n)=>{n.d(t,{V:()=>d,q:()=>p});var i=n("JnTtTRmZ"),s=n.n(i),l=n("4af3+9mh"),a=n("rkoyttmq"),o=n("0wQfx7YJ"),r=n("OqsMdpSm"),c=n("xc00RsLr");const p=(0,c.ei)("core.PipelineConnections",(()=>s().createActions({list:{asyncResult:!0},connectToStream:{asyncResult:!0},connectToPipeline:{asyncResult:!0}}))),d=(0,c.dS)("core.PipelineConnections",(()=>s().createStore({listenables:[p],connections:void 0,getInitialState(){return{connections:this.connections}},list(){const e=(0,o.DC)(a.Z.ConnectionsController.list().url);(0,r.ZP)("GET",e).then((e=>{this.connections=e,this.trigger({connections:e})}),(e=>{l.Z.error(`Fetching pipeline connections failed with status: ${e.message}`,"Could not retrieve pipeline connections")}))},connectToStream(e){const t=(0,o.DC)(a.Z.ConnectionsController.to_stream().url),n={stream_id:e.stream,pipeline_ids:e.pipelines};(0,r.ZP)("POST",t,n).then((e=>{this.connections.filter((t=>t.stream_id===e.stream_id))[0]?this.connections=this.connections.map((t=>t.stream_id===e.stream_id?e:t)):this.connections.push(e),this.trigger({connections:this.connections}),l.Z.success("Pipeline connections updated successfully")}),this._failUpdateCallback)},connectToPipeline(e){const t=(0,o.DC)(a.Z.ConnectionsController.to_pipeline().url),n={pipeline_id:e.pipeline,stream_ids:e.streams};(0,r.ZP)("POST",t,n).then((e=>{e.forEach((e=>{this.connections.filter((t=>t.stream_id===e.stream_id))[0]?this.connections=this.connections.map((t=>t.stream_id===e.stream_id?e:t)):this.connections.push(e)})),this.trigger({connections:this.connections}),l.Z.success("Pipeline connections updated successfully")}),this._failUpdateCallback)},_failUpdateCallback(e){l.Z.error(`Updating pipeline connections failed with status: ${e.message}`,"Could not update pipeline connections")}})))},uaoWrOBD:(e,t,n)=>{n.d(t,{X:()=>h,o:()=>u});var i=n("JnTtTRmZ"),s=n.n(i),l=n("VPaD/Np4"),a=n.n(l),o=n("4af3+9mh"),r=n("0wQfx7YJ"),c=n("rkoyttmq"),p=n("OqsMdpSm"),d=n("4sldgQy6"),m=n("xc00RsLr");const u=(0,m.ei)("core.Pipelines",(()=>s().createActions({delete:{asyncResult:!0},list:{asyncResult:!0},listPaginated:{asyncResult:!0},get:{asyncResult:!0},save:{asyncResult:!0},update:{asyncResult:!0},parse:{asyncResult:!0}}))),g=e=>{o.Z.error(`Fetching pipelines failed with status: ${e.message}`,"Could not retrieve processing pipelines")},h=(0,m.dS)("core.Pipelines",(()=>s().createStore({listenables:[u],pipelines:void 0,getInitialState(){return{pipelines:this.pipelines}},_updatePipelinesState(e){if(this.pipelines){this.pipelines.some((t=>t.id===e.id))?this.pipelines=this.pipelines.map((t=>t.id===e.id?e:t)):this.pipelines.push(e)}else this.pipelines=[e];this.trigger({pipelines:this.pipelines})},list(){const e=(0,r.DC)(c.Z.PipelinesController.list().url);return(0,p.ZP)("GET",e).then((e=>{this.pipelines=e,this.trigger({pipelines:e})}),g)},listPaginated(e){let{page:t,perPage:n,query:i}=e;const s=(0,d.Z)(c.Z.PipelinesController.paginatedList().url,t,n,i),l=(0,p.ZP)("GET",(0,r.DC)(s)).then((e=>({list:a().List(e.pipelines),pagination:{page:e.page,perPage:e.per_page,query:e.query,count:e.count,total:e.total}})),g);return u.listPaginated.promise(l),l},get(e){const t=(0,r.DC)(c.Z.PipelinesController.get(e).url);(0,p.ZP)("GET",t).then(this._updatePipelinesState,(t=>{o.Z.error(`Fetching pipeline failed with status: ${t.message}`,`Could not retrieve processing pipeline "${e}"`)}))},save(e){const t=(0,r.DC)(c.Z.PipelinesController.create().url),n={title:e.title,description:e.description,source:e.source},i=(0,p.ZP)("POST",t,n);i.then((e=>{this._updatePipelinesState(e),o.Z.success(`Pipeline "${n.title}" created successfully`)}),(e=>{o.Z.error(`Saving pipeline failed with status: ${e.message}`,"Could not save processing pipeline")})),u.save.promise(i)},update(e){const t=(0,r.DC)(c.Z.PipelinesController.update(e.id).url),n={id:e.id,title:e.title,description:e.description,source:e.source},i=(0,p.ZP)("PUT",t,n);i.then((e=>{this._updatePipelinesState(e),o.Z.success(`Pipeline "${n.title}" updated successfully`)}),(e=>{o.Z.error(`Updating pipeline failed with status: ${e.message}`,"Could not update processing pipeline")})),u.update.promise(i)},delete(e){const t=(0,r.DC)(c.Z.PipelinesController.delete(e).url),n=(0,p.ZP)("DELETE",t).then((()=>{const t=this.pipelines||[];this.pipelines=t.filter((t=>t.id!==e)),this.trigger({pipelines:this.pipelines}),o.Z.success(`Pipeline "${e}" deleted successfully`)}),(t=>{o.Z.error(`Deleting pipeline failed with status: ${t.message}`,`Could not delete processing pipeline "${e}"`)}));return u.delete.promise(n),n},parse(e,t){const n=(0,r.DC)(c.Z.PipelinesController.parse().url),i={title:e.title,description:e.description,source:e.source};return(0,p.ZP)("POST",n,i).then((()=>{t([])}),(e=>{400===e.status&&t(e.additional.body)}))}})))}}]);
//# sourceMappingURL=325e2d4b-906.d93e549562250634d7a5.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy