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

web-interface.assets.b6fe2bb5-906.227b668fc100d3112167.js Maven / Gradle / Ivy

"use strict";(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["b6fe2bb5-906"],{HaF9mmRp:(e,t,n)=>{n.d(t,{Z:()=>c});var i=n("ii0bleBb"),r=n.n(i),o=n("Z7aTuO5B"),a=n("8FtKQWAV"),s=n.n(a),l=function(e){var t=e.pipeline,n=e.connections,i=e.streams,r=e.streamsFormatter,a=e.noConnectionsMessage,l=n.filter((function(e){return e.pipeline_ids&&e.pipeline_ids.includes(t.id)})).filter((function(e){return i.some((function(t){return t.id===e.stream_id}))})).map((function(e){return i.find((function(t){return t.id===e.stream_id}))})).sort((function(e,t){return s()(e.title,t.title)}));return o.createElement("span",null,0===l.length?a:r(l))};l.propTypes={pipeline:r().object.isRequired,connections:r().array.isRequired,streams:r().array.isRequired,streamsFormatter:r().func.isRequired,noConnectionsMessage:r().node},l.defaultProps={noConnectionsMessage:"Pipeline not connected to any streams"};const c=l},uUHW0N40:(e,t,n)=>{n.d(t,{Z:()=>l});var i=n("Z7aTuO5B"),r=n("QTXsLZJF"),o=n("pjsNBHWI");function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var i,r,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n0?t:void 0};c((t=n.search,s=null!==(i=(0,o.parse)(t,{ignoreQueryPrefix:!0}))&&void 0!==i?i:{},l=s.page,u=s.perPage,p=s.query,{page:null!==(r=f(l))&&void 0!==r?r:e.page,perPage:null!==(a=f(u))&&void 0!==a?a:e.perPage,query:"string"==typeof p?p:e.query})),d(!0)}),[n.search,e]);return{isInitialized:p,pagination:l,setPagination:function(e){t.push({pathname:n.pathname,search:(0,o.stringify)(e)})}}}},PReZE9pk:(e,t,n)=>{n.r(t),n.d(t,{default:()=>z});var i=n("Z7aTuO5B"),r=n("EeAwn/0x"),o=n("Mr++nPjW"),a=n("AdUszsMQ"),s=n("G9VqAO1I"),l=n("EfCpThZW"),c=n("8FtKQWAV"),u=n.n(c),p=n("VPaD/Np4"),d=n.n(p),f=n("Y1Txt3Ie"),m=n("DeVaSktS"),g=n("b/6pmtOr"),y=n("xxwliabF"),h=n("uaoWrOBD"),P=n("UPjNKhGS"),v=n("uUHW0N40"),E=n("CTSsa1wm"),b=n("HaF9mmRp");function S(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function w(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?L(G,I,p):Q({page:Math.max(P._.page,G.page-1),perPage:K,query:H})}))}};return i.createElement("div",null,i.createElement(x,{onChange:function(e,t){return X(w(w({},G),{},{page:e,perPage:t}))},activePage:Y,totalItems:z},i.createElement(a.wQ,{id:"processing-timeline",className:"table-hover",headers:["Pipeline","Connected to Streams","Processing Timeline","Actions"],headerCellFormatter:function(e){var t;return"Actions"===e&&(t="actions"),i.createElement("th",{className:t},e)},rows:k.toJS(),customFilter:ee,filterKeys:[],filterLabel:"Filter Pipelines",dataRowFormatter:function(t){var a=t.id,s=t.title,l=t.description,c=t.stages;return i.createElement("tr",{key:a},i.createElement(j,null,i.createElement(r.r,{to:m.ZP.SYSTEM.PIPELINES.PIPELINE(a),title:s},s),i.createElement("br",null),l,i.createElement("br",null),i.createElement(f.CL,{name:"org.graylog.plugins.pipelineprocessor.ast.Pipeline.".concat(a,".executed")},i.createElement(f.qb,{prefix:"Throughput:",suffix:"msg/s"}))),i.createElement(q,null,i.createElement(b.Z,{pipeline:t,connections:e,streams:n,streamsFormatter:D,noConnectionsMessage:i.createElement("em",null,"Not connected")})),i.createElement("td",null,function(e,t){var n=t.map((function(e){return e.stage}));return k.map((function(e){return e.stages.map((function(e){return e.stage}))})).reduce((function(e,t){return Array.from(new Set([].concat(S(e),S(t))))}),[]).sort(u()).map((function(t){return-1===n.indexOf(t)?i.createElement(A,{key:"".concat(e.id,"-stage").concat(t),$idle:!0},"Idle"):i.createElement(A,{key:"".concat(e.id,"-stage").concat(t)},"Stage ",t)}))}(t,c)),i.createElement("td",null,i.createElement(o.zx,{bsStyle:"primary",bsSize:"xsmall",onClick:te(t)},"Delete")," ",i.createElement(r.J,{to:m.ZP.SYSTEM.PIPELINES.PIPELINE(a)},i.createElement(o.zx,{bsStyle:"info",bsSize:"xsmall"},"Edit"))))}})))};M.propTypes={};const k=M;var U=n("4Js8dUPg");const F=function(){return i.createElement("div",{className:"pull-right"},i.createElement(r.J,{to:m.ZP.SYSTEM.PIPELINES.PIPELINE("new")},i.createElement(o.zx,{bsStyle:"success"},"Add new pipeline")))};const z=function(){return i.createElement(a.$4,{title:"Pipelines"},i.createElement("div",null,i.createElement(a.mr,{title:"Pipelines overview",subactions:i.createElement(F,null)},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("span",null,"Read more about Graylog pipelines in the ",i.createElement(s.Z,{page:U.Z.PAGES.PIPELINES,text:"documentation"}),"."),i.createElement("span",null,i.createElement(r.J,{to:m.ZP.SYSTEM.PIPELINES.OVERVIEW},i.createElement(o.zx,{bsStyle:"info"},"Manage pipelines"))," ",i.createElement(r.J,{to:m.ZP.SYSTEM.PIPELINES.RULES},i.createElement(o.zx,{bsStyle:"info"},"Manage rules"))," ",i.createElement(r.J,{to:m.ZP.SYSTEM.PIPELINES.SIMULATOR},i.createElement(o.zx,{bsStyle:"info"},"Simulator")))),i.createElement(o.X2,{className:"content"},i.createElement(o.JX,{md:12},i.createElement(k,null)))))}},UPjNKhGS:(e,t,n)=>{n.d(t,{_:()=>i});var i={page:1,perPage:10,query:""}},CTSsa1wm:(e,t,n)=>{n.d(t,{q:()=>u,V:()=>p});var i=n("JnTtTRmZ"),r=n.n(i),o=n("4af3+9mh"),a=n("rkoyttmq"),s=n("0wQfx7YJ"),l=n("OqsMdpSm"),c=n("xc00RsLr"),u=(0,c.ei)("core.PipelineConnections",(function(){return r().createActions({list:{asyncResult:!0},connectToStream:{asyncResult:!0},connectToPipeline:{asyncResult:!0}})})),p=(0,c.dS)("core.PipelineConnections",(function(){return r().createStore({listenables:[u],connections:void 0,getInitialState:function(){return{connections:this.connections}},list:function(){var e=this,t=(0,s.DC)(a.Z.ConnectionsController.list().url);(0,l.ZP)("GET",t).then((function(t){e.connections=t,e.trigger({connections:t})}),(function(e){o.Z.error("Fetching pipeline connections failed with status: ".concat(e.message),"Could not retrieve pipeline connections")}))},connectToStream:function(e){var t=this,n=(0,s.DC)(a.Z.ConnectionsController.to_stream().url),i={stream_id:e.stream,pipeline_ids:e.pipelines};(0,l.ZP)("POST",n,i).then((function(e){t.connections.filter((function(t){return t.stream_id===e.stream_id}))[0]?t.connections=t.connections.map((function(t){return t.stream_id===e.stream_id?e:t})):t.connections.push(e),t.trigger({connections:t.connections}),o.Z.success("Pipeline connections updated successfully")}),this._failUpdateCallback)},connectToPipeline:function(e){var t=this,n=(0,s.DC)(a.Z.ConnectionsController.to_pipeline().url),i={pipeline_id:e.pipeline,stream_ids:e.streams};(0,l.ZP)("POST",n,i).then((function(e){e.forEach((function(e){t.connections.filter((function(t){return t.stream_id===e.stream_id}))[0]?t.connections=t.connections.map((function(t){return t.stream_id===e.stream_id?e:t})):t.connections.push(e)})),t.trigger({connections:t.connections}),o.Z.success("Pipeline connections updated successfully")}),this._failUpdateCallback)},_failUpdateCallback:function(e){o.Z.error("Updating pipeline connections failed with status: ".concat(e.message),"Could not update pipeline connections")}})}))},uaoWrOBD:(e,t,n)=>{n.d(t,{o:()=>f,X:()=>g});var i=n("JnTtTRmZ"),r=n.n(i),o=n("VPaD/Np4"),a=n.n(o),s=n("4af3+9mh"),l=n("0wQfx7YJ"),c=n("rkoyttmq"),u=n("OqsMdpSm"),p=n("4sldgQy6"),d=n("xc00RsLr"),f=(0,d.ei)("core.Pipelines",(function(){return r().createActions({delete:{asyncResult:!0},list:{asyncResult:!0},listPaginated:{asyncResult:!0},get:{asyncResult:!0},save:{asyncResult:!0},update:{asyncResult:!0},parse:{asyncResult:!0}})})),m=function(e){s.Z.error("Fetching pipelines failed with status: ".concat(e.message),"Could not retrieve processing pipelines")},g=(0,d.dS)("core.Pipelines",(function(){return r().createStore({listenables:[f],pipelines:void 0,getInitialState:function(){return{pipelines:this.pipelines}},_updatePipelinesState:function(e){this.pipelines?this.pipelines.some((function(t){return t.id===e.id}))?this.pipelines=this.pipelines.map((function(t){return t.id===e.id?e:t})):this.pipelines.push(e):this.pipelines=[e];this.trigger({pipelines:this.pipelines})},list:function(){var e=this,t=(0,l.DC)(c.Z.PipelinesController.list().url);return(0,u.ZP)("GET",t).then((function(t){e.pipelines=t,e.trigger({pipelines:t})}),m)},listPaginated:function(e){var t=e.page,n=e.perPage,i=e.query,r=(0,p.Z)(c.Z.PipelinesController.paginatedList().url,t,n,i),o=(0,u.ZP)("GET",(0,l.DC)(r)).then((function(e){return{list:a().List(e.pipelines),pagination:{page:e.page,perPage:e.per_page,query:e.query,count:e.count,total:e.total}}}),m);return f.listPaginated.promise(o),o},get:function(e){var t=(0,l.DC)(c.Z.PipelinesController.get(e).url);(0,u.ZP)("GET",t).then(this._updatePipelinesState,(function(t){s.Z.error("Fetching pipeline failed with status: ".concat(t.message),'Could not retrieve processing pipeline "'.concat(e,'"'))}))},save:function(e){var t=this,n=(0,l.DC)(c.Z.PipelinesController.create().url),i={title:e.title,description:e.description,source:e.source},r=(0,u.ZP)("POST",n,i);r.then((function(e){t._updatePipelinesState(e),s.Z.success('Pipeline "'.concat(i.title,'" created successfully'))}),(function(e){s.Z.error("Saving pipeline failed with status: ".concat(e.message),"Could not save processing pipeline")})),f.save.promise(r)},update:function(e){var t=this,n=(0,l.DC)(c.Z.PipelinesController.update(e.id).url),i={id:e.id,title:e.title,description:e.description,source:e.source},r=(0,u.ZP)("PUT",n,i);r.then((function(e){t._updatePipelinesState(e),s.Z.success('Pipeline "'.concat(i.title,'" updated successfully'))}),(function(e){s.Z.error("Updating pipeline failed with status: ".concat(e.message),"Could not update processing pipeline")})),f.update.promise(r)},delete:function(e){var t=this,n=(0,l.DC)(c.Z.PipelinesController.delete(e).url),i=(0,u.ZP)("DELETE",n).then((function(){var n=t.pipelines||[];t.pipelines=n.filter((function(t){return t.id!==e})),t.trigger({pipelines:t.pipelines}),s.Z.success('Pipeline "'.concat(e,'" deleted successfully'))}),(function(t){s.Z.error("Deleting pipeline failed with status: ".concat(t.message),'Could not delete processing pipeline "'.concat(e,'"'))}));return f.delete.promise(i),i},parse:function(e,t){var n=(0,l.DC)(c.Z.PipelinesController.parse().url),i={title:e.title,description:e.description,source:e.source};return(0,u.ZP)("POST",n,i).then((function(){t([])}),(function(e){400===e.status&&t(e.additional.body)}))}})}))}}]);
//# sourceMappingURL=b6fe2bb5-906.227b668fc100d3112167.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy