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

web-interface.assets.57e33c6c-70.11b9f72925818240e61d.js Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
(window.webpackJsonp=window.webpackJsonp||[]).push([["57e33c6c-70"],{"7Hbo70Cc":function(e,t,n){"use strict";n.r(t);var a=n("ii0bleBb"),r=n.n(a),i=n("ivGQtwpr"),l=n.n(i),o=n("PcYM+wZ7"),s=n.n(o),c=n("4KF7VOU5"),u=n.n(c),p=n("X+7LuFrS"),m=n("qoq4u5Uq"),d=n("0tVB/fkh"),f=n("CzyxmveH"),g=n("hX+ZxOpo"),h=n("21p8kIWv"),b=n("kcvrazAT"),E=n("B4BR5PLd"),y=n("L8npJDrf"),v=n("/lavANvI");function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function j(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,a=new Array(t);ne.length)&&(t=e.length);for(var n=0,a=new Array(t);n dt{text-align:left;width:160px;}& > dt::after{content:':';}& > dd{margin-left:120px;}"]),K=function(e){var t=e.pipeline,n=e.create,a=e.onChange,r=e.onCancel;return n?l.a.createElement(W,{create:!0,save:a,onCancel:r,modal:!1}):l.a.createElement("div",null,l.a.createElement(m.L,null,l.a.createElement(m.j,{md:12},l.a.createElement("div",{className:"pull-right"},l.a.createElement(W,{pipeline:t,save:a})),l.a.createElement("h2",null,"Details"),l.a.createElement(V,{className:"dl-horizontal"},l.a.createElement("dt",null,"Title"),l.a.createElement("dd",null,t.title),l.a.createElement("dt",null,"Description"),l.a.createElement("dd",null,t.description),l.a.createElement("dt",null,"Created"),l.a.createElement("dd",null,l.a.createElement(d.hb,{dateTime:t.created_at,relative:!0})),l.a.createElement("dt",null,"Last modified"),l.a.createElement("dd",null,l.a.createElement(d.hb,{dateTime:t.modified_at,relative:!0})),l.a.createElement("dt",null,"Current throughput"),l.a.createElement("dd",null,l.a.createElement(g.g,{name:"org.graylog.plugins.pipelineprocessor.ast.Pipeline.".concat(t.id,".executed")},l.a.createElement(g.b,{suffix:"msg/s"})))))),l.a.createElement("hr",null))};K.propTypes={pipeline:r.a.object,create:r.a.bool,onChange:r.a.func.isRequired,onCancel:r.a.func},K.defaultProps={pipeline:void 0,create:!1,onCancel:function(){}};var Q=K,Z=n("8FtKQWAV"),J=n.n(Z),G=n("FOEh8xnd");function X(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],a=!0,r=!1,i=void 0;try{for(var l,o=e[Symbol.iterator]();!(a=(l=o.next()).done)&&(n.push(l.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==o.return||o.return()}finally{if(r)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ee(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 ee(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 ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n1?[t.slice(0,-1).join(", "),t.slice(-1)].join(" and "):t[0];return l.a.createElement("span",null,"This pipeline is processing messages from the"," ",l.a.createElement(d.R,{singular:"stream",plural:"streams",value:e.length})," ",n,".")},noConnectionsMessage:"Select streams that will be processed by this pipeline."})),l.a.createElement("hr",null))),l.a.createElement(le,{className:"row-sm"},l.a.createElement(m.j,{md:12},l.a.createElement("div",{className:"pull-right"},l.a.createElement(_,{key:f,pipeline:t,create:!0,save:function(e,n){var a=t.stages.slice();a.push(e),o(a,n)}})),l.a.createElement("h2",null,"Pipeline Stages"),l.a.createElement(oe,null,"Stages are groups of conditions and actions which need to run in order, and provide the necessary"," ","control flow to decide whether or not to run the rest of a pipeline."))),l.a.createElement(d.n,{bsNoItemsStyle:"info",noItemsText:"There are no rules on this stage.",items:p}))};se.propTypes={pipeline:r.a.object.isRequired,connections:r.a.array.isRequired,streams:r.a.array.isRequired,onConnectionsChange:r.a.func.isRequired,onStagesChange:r.a.func.isRequired,onPipelineChange:r.a.func.isRequired};var ce=se,ue=n("+CppQpVm"),pe=function(e){var t=e.onChange,n=function(e){ue.a.push(v.a.SYSTEM.PIPELINES.PIPELINE(e.id))};return l.a.createElement(m.L,null,l.a.createElement(m.j,{md:6},l.a.createElement("p",null,"Give a name and description to the new pipeline. You can add stages to it when you save the changes."),l.a.createElement(Q,{create:!0,onChange:function(e){t(e,n)},onCancel:function(){ue.a.goBack()}})))};pe.propTypes={onChange:r.a.func.isRequired};var me=pe,de={generatePipeline:function(e){var t='pipeline "'.concat(e.title,'"\n');return e.stages.forEach((function(e){var n;t+="stage ".concat(e.stage," match ").concat((null===(n=e.match)||void 0===n?void 0:n.toLowerCase())||"either","\n"),e.rules.forEach((function(e){t+='rule "'.concat(e,'"\n')}))})),t+="end"}},fe=n("s2hN4RJZ"),ge=n("1/asf7rI"),he=h.a.get("Pipelines"),be=he.PipelinesStore,Ee=he.PipelinesActions,ye=h.a.get("Rules").RulesStore,ve=h.a.get("PipelineConnections"),Se=ve.PipelineConnectionsStore,je=ve.PipelineConnectionsActions,we=h.a.get("Streams").StreamsStore;var Pe=s()({displayName:"PipelineDetailsPage",propTypes:{params:r.a.object.isRequired},mixins:[u.a.connectFilter(be,"pipeline",(function(e){var t=this;return e.pipelines?e.pipelines.filter((function(e){return e.id===t.props.params.pipelineId}))[0]:void 0})),u.a.connectFilter(Se,"connections",(function(e){var t=this;if(e.connections)return e.connections.filter((function(e){return e.pipeline_ids&&e.pipeline_ids.includes(t.props.params.pipelineId)}))}))],componentDidMount:function(){var e=this,t=this.props.params;this._isNewPipeline(t.pipelineId)||Ee.get(t.pipelineId),ye.list(),je.list(),we.listStreams().then((function(t){var n=t.filter((function(e){return e.is_editable}));e.setState({streams:n})}))},UNSAFE_componentWillReceiveProps:function(e){this._isNewPipeline(e.params.pipelineId)||Ee.get(e.params.pipelineId)},_onConnectionsChange:function(e,t){je.connectToPipeline(e),t()},_onStagesChange:function(e,t){var n=this.state.pipeline,a=fe.a.clone(n);a.stages=e,a.source=de.generatePipeline(a),Ee.update(a),"function"==typeof t&&t()},_savePipeline:function(e,t){var n=fe.a.clone(e);n.source=de.generatePipeline(e),(n.id?Ee.update(n):Ee.save(n)).then((function(e){return t(e)}))},_isNewPipeline:function(e){return"new"===e},_isLoading:function(){var e=this.props.params,t=this.state,n=t.connections,a=t.streams,r=t.pipeline;return!(this._isNewPipeline(e.pipelineId)||r&&n&&a)},render:function(){if(this._isLoading())return l.a.createElement(d.db,null);var e,t,n=this.props.params,a=this.state,r=a.connections,i=a.streams,o=a.pipeline,s=a.rules;e=this._isNewPipeline(n.pipelineId)?"New pipeline":l.a.createElement("span",null,"Pipeline ",l.a.createElement("em",null,o.title)),t=this._isNewPipeline(n.pipelineId)?l.a.createElement(me,{onChange:this._savePipeline}):l.a.createElement(ce,{pipeline:o,connections:r,streams:i,rules:s,onConnectionsChange:this._onConnectionsChange,onStagesChange:this._onStagesChange,onPipelineChange:this._savePipeline});var c=this._isNewPipeline(n.pipelineId)?"New pipeline":"Pipeline ".concat(o.title);return l.a.createElement(d.j,{title:c},l.a.createElement("div",null,l.a.createElement(d.M,{title:e},l.a.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."),l.a.createElement("span",null,"After each stage is completed, you can decide if messages matching all or one of the rules continue to the next stage."),l.a.createElement("span",null,l.a.createElement(p.b,{to:v.a.SYSTEM.PIPELINES.OVERVIEW},l.a.createElement(m.e,{bsStyle:"info"},"Manage pipelines"))," ",l.a.createElement(p.b,{to:v.a.SYSTEM.PIPELINES.RULES},l.a.createElement(m.e,{bsStyle:"info"},"Manage rules"))," ",l.a.createElement(p.b,{to:v.a.SYSTEM.PIPELINES.SIMULATOR},l.a.createElement(m.e,{bsStyle:"info"},"Simulator")))),l.a.createElement(m.L,{className:"content"},l.a.createElement(m.j,{md:12},t))))}});t.default=Object(ge.a)(Pe)},hz8arHzl:function(e,t,n){"use strict";var a=n("ii0bleBb"),r=n.n(a),i=n("ivGQtwpr"),l=n.n(i),o=n("8FtKQWAV"),s=n.n(o),c=function(e){var t=e.pipeline,n=e.connections,a=e.streams,r=e.streamsFormatter,i=e.noConnectionsMessage,o=n.filter((function(e){return e.pipeline_ids&&e.pipeline_ids.includes(t.id)})).filter((function(e){return a.some((function(t){return t.id===e.stream_id}))})).map((function(e){return a.find((function(t){return t.id===e.stream_id}))})).sort((function(e,t){return s()(e.title,t.title)}));return l.a.createElement("span",null,0===o.length?i:r(o))};c.propTypes={pipeline:r.a.object.isRequired,connections:r.a.array.isRequired,streams:r.a.array.isRequired,streamsFormatter:r.a.func.isRequired,noConnectionsMessage:r.a.node},c.defaultProps={noConnectionsMessage:"Pipeline not connected to any streams"},t.a=c}}]);
//# sourceMappingURL=57e33c6c-70.11b9f72925818240e61d.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy