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

web-interface.assets.d5f85445-48.a49ba8ace624afae35ed.js Maven / Gradle / Ivy

There is a newer version: 6.0.6
Show newest version
(window.webpackJsonp=window.webpackJsonp||[]).push([["d5f85445-48"],{"7Hbo70Cc":function(e,t,n){"use strict";n.r(t);var a=n("ii0bleBb"),i=n.n(a),r=n("ivGQtwpr"),o=n.n(r),s=n("PcYM+wZ7"),l=n.n(s),c=n("4KF7VOU5"),p=n.n(c),u=n("qoq4u5Uq"),m=n("wkvtUUMm"),f=n("oBIKikY9"),h=n("ZX4j5H1r"),d=n("hX+ZxOpo"),g=n("W+sNG9T1"),y=n("21p8kIWv"),E=n("nHcjWeCO"),b=n("B4BR5PLd"),v=n("L8npJDrf"),S=y.a.get("Rules").RulesStore,_=l()({displayName:"StageForm",propTypes:{stage:i.a.object,create:i.a.bool,save:i.a.func.isRequired},mixins:[p.a.connect(S)],getDefaultProps:function(){return{create:!1,stage:{stage:0,match_all:!1,rules:[]}}},getInitialState:function(){var e=this.props.stage;return{stage:{stage:(e=Object(E.cloneDeep)(e)).stage,match_all:e.match_all,rules:e.rules}}},openModal:function(){this.modal.open()},_onChange:function(e){var t=this.state.stage;(t=Object(E.cloneDeep)(t))[e.target.name]=v.a.getValueFromInput(e.target),this.setState({stage:t})},_onRulesChange:function(e){var t=this.state.stage;(t=Object(E.cloneDeep)(t)).rules=e,this.setState({stage:t})},_closeModal:function(){this.modal.close()},_saved:function(){this._closeModal(),this.props.create&&this.setState(this.getInitialState())},_save:function(){var e=this.state.stage;(0,this.props.save)(e,this._saved)},_getFormattedOptions:function(e){var t=this,n=this.state.stage.rules;return e?e.filter((function(e){return t._filterChosenRules(e,n)})).map(this._formatRuleOption):[]},_formatRuleOption:function(e){return{value:e.title,label:e.title}},_filterChosenRules:function(e,t){return!t.includes(e.title)},render:function(){var e,t=this,n=this.props.create,a=this.state,i=a.stage,r=a.rules;e=n?"Add new stage":o.a.createElement("span",null,"Edit");var s=o.a.createElement("span",null,"Select the rules evaluated on this stage, or create one in the"," ",o.a.createElement(h.Link,{to:g.a.SYSTEM.PIPELINES.RULES},"Pipeline Rules page"),".");return o.a.createElement("span",null,o.a.createElement(u.c,{onClick:this.openModal,bsStyle:n?"success":"info"},e),o.a.createElement(b.b,{ref:function(e){t.modal=e},title:"".concat(n?"Add new":"Edit"," stage ").concat(i.stage),onSubmitForm:this._save,submitButtonText:"Save"},o.a.createElement("fieldset",null,o.a.createElement(b.d,{type:"number",id:"stage",name:"stage",label:"Stage",autoFocus:!0,onChange:this._onChange,help:"Stage priority. The lower the number, the earlier it will execute.",value:i.stage}),o.a.createElement(u.n,null,o.a.createElement(u.j,null,"Continue processing on next stage when")),o.a.createElement(b.d,{type:"radio",id:"match_all",name:"match_all",value:"true",label:"All rules on this stage match the message",onChange:this._onChange,checked:i.match_all}),o.a.createElement(b.d,{type:"radio",id:"match_any",name:"match_all",value:"false",label:"At least one of the rules on this stage matches the message",onChange:this._onChange,checked:!i.match_all}),o.a.createElement(b.d,{id:"stage-rules-select",label:"Stage rules",help:s},o.a.createElement(f.I,{options:this._getFormattedOptions(r),isLoading:!r,onChange:this._onRulesChange,selectedOptions:i.rules})))))}}),C=y.a.get("Rules").RulesStore,w=l()({displayName:"Stage",propTypes:{stage:i.a.object.isRequired,pipeline:i.a.object.isRequired,isLastStage:i.a.bool.isRequired,onUpdate:i.a.func.isRequired,onDelete:i.a.func.isRequired},mixins:[p.a.connect(C)],_ruleHeaderFormatter:function(e){return o.a.createElement("th",null,e)},_ruleRowFormatter:function(e,t,n){var a,i=t;return i?a=o.a.createElement(h.Link,{to:g.a.SYSTEM.PIPELINES.RULE(i.id)},i.title):(i={id:"invalid-".concat(n),description:"Rule ".concat(e.rules[n]," has been renamed or removed. This rule will be skipped.")},a=o.a.createElement("span",null,o.a.createElement(f.r,{name:"warning",className:"text-danger"})," ",e.rules[n])),o.a.createElement("tr",{key:i.id},o.a.createElement("td",{style:{width:400}},a),o.a.createElement("td",null,i.description),o.a.createElement("td",null,o.a.createElement(d.g,{name:"org.graylog.plugins.pipelineprocessor.ast.Rule.".concat(i.id,".").concat(this.props.pipeline.id,".").concat(e.stage,".executed")},o.a.createElement(d.b,{zeroOnMissing:!0,suffix:"msg/s"}))),o.a.createElement("td",null,o.a.createElement(d.g,{name:"org.graylog.plugins.pipelineprocessor.ast.Rule.".concat(i.id,".").concat(this.props.pipeline.id,".").concat(e.stage,".failed")},o.a.createElement(d.b,{showTotal:!0,zeroOnMissing:!0,suffix:"errors/s"}))))},_formatRules:function(e,t){var n=this;return o.a.createElement(f.g,{id:"processing-timeline",className:"table-hover",headers:["Title","Description","Throughput","Errors"],headerCellFormatter:this._ruleHeaderFormatter,rows:t,dataRowFormatter:function(t,a){return n._ruleRowFormatter(e,t,a)},noDataText:"This stage has no rules yet. Click on edit to add some.",filterLabel:"",filterKeys:[]})},render:function(){var e,t=this,n=this.props.stage,a="Contains ".concat(1===n.rules.length?"1 rule":"".concat(n.rules.length," rules")),i=o.a.createElement(d.g,{name:"org.graylog.plugins.pipelineprocessor.ast.Pipeline.".concat(this.props.pipeline.id,".stage.").concat(n.stage,".executed")},o.a.createElement(d.b,{showTotal:!1,prefix:"Throughput: ",suffix:"msg/s"})),r=[o.a.createElement(u.c,{key:"delete-stage",bsStyle:"primary",onClick:this.props.onDelete},"Delete"),o.a.createElement(_,{key:"edit-stage",stage:n,save:this.props.onUpdate})];e=this.props.isLastStage?"There are no further stages in this pipeline. Once rules in this stage are applied, the pipeline will have finished processing.":o.a.createElement("span",null,"Messages satisfying ",o.a.createElement("strong",null,n.match_all?"all rules":"at least one rule")," ","in this stage, will continue to the next stage.");var s,l=o.a.createElement("span",null,e,o.a.createElement("br",null),i);return s=this.state.rules?this._formatRules(n,this.props.stage.rules.map((function(e){return t.state.rules.filter((function(t){return t.title===e}))[0]}))):o.a.createElement(f.L,null),o.a.createElement(f.l,{title:"Stage ".concat(n.stage),titleSuffix:a,actions:r,description:l,contentRow:o.a.createElement(u.h,{md:12},s)})}}),P=n("s2hN4RJZ"),R=l()({displayName:"PipelineForm",propTypes:{pipeline:i.a.object,create:i.a.bool,modal:i.a.bool,save:i.a.func.isRequired,validatePipeline:i.a.func.isRequired,onCancel:i.a.func},getDefaultProps:function(){return{modal:!0,pipeline:{id:void 0,title:"",description:"",stages:[{stage:0,rules:[]}]}}},getInitialState:function(){var e=P.a.clone(this.props.pipeline);return{pipeline:{id:e.id,title:e.title,description:e.description,stages:e.stages}}},openModal:function(){this.modal.open()},_onChange:function(e){var t=P.a.clone(this.state.pipeline);t[e.target.name]=v.a.getValueFromInput(e.target),this.setState({pipeline:t})},_closeModal:function(){this.modal.close()},_saved:function(){this.props.modal&&this._closeModal(),this.props.create&&this.setState(this.getInitialState())},_save:function(e){e&&e.preventDefault(),this.props.save(this.state.pipeline,this._saved)},render:function(){var e,t=this;e=this.props.create?"Add new pipeline":"Edit pipeline details";var n=o.a.createElement("fieldset",null,o.a.createElement(b.d,{type:"text",id:"title",name:"title",label:"Title",autoFocus:!0,required:!0,onChange:this._onChange,help:"Pipeline name.",value:this.state.pipeline.title}),o.a.createElement(b.d,{type:"text",id:"description",name:"description",label:"Description",onChange:this._onChange,help:"Pipeline description.",value:this.state.pipeline.description}));return this.props.modal?o.a.createElement("span",null,o.a.createElement(u.c,{onClick:this.openModal,bsStyle:"success"},e),o.a.createElement(b.b,{ref:function(e){t.modal=e},title:"".concat(this.props.create?"Add new":"Edit"," pipeline ").concat(this.state.pipeline.title),onSubmitForm:this._save,submitButtonText:"Save"},n)):o.a.createElement("form",{onSubmit:this._save},n,o.a.createElement(u.I,null,o.a.createElement(u.h,{md:12},o.a.createElement(u.c,{type:"submit",bsStyle:"primary",style:{marginRight:10}},"Save"),o.a.createElement(u.c,{type:"button",onClick:this.props.onCancel},"Cancel"))))}});function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){for(var n=0;n1?[t.slice(0,-1).join(", "),t.slice(-1)].join(" and "):t[0];return o.a.createElement("span",null,"This pipeline is processing messages from the"," ",o.a.createElement(f.C,{singular:"stream",plural:"streams",value:e.length})," ",n,".")},_formatStage:function(e,t){return o.a.createElement(w,{key:"stage-".concat(e.stage),pipeline:this.props.pipeline,stage:e,isLastStage:e.stage===t,onUpdate:this._updateStage(e),onDelete:this._deleteStage(e)})},render:function(){var e=this,t=this.props.pipeline,n=t.stages.reduce((function(e,t){return Math.max(e,t.stage)}),-1/0),a=t.stages.sort((function(e,t){return e.stage-t.stage})).map((function(t){return e._formatStage(t,n)}));return o.a.createElement("div",null,this._connections_warning(),o.a.createElement(q,{pipeline:t,onChange:this.props.onPipelineChange}),o.a.createElement(u.I,{className:"row-sm row-margin-top"},o.a.createElement(u.h,{md:12},o.a.createElement("div",{className:"pull-right"},o.a.createElement(Y,{pipeline:t,connections:this.props.connections,streams:this.props.streams,save:this.props.onConnectionsChange})),o.a.createElement("h2",null,"Pipeline connections"),o.a.createElement("p",{className:"description-margin-top"},o.a.createElement(B.a,{pipeline:t,connections:this.props.connections,streams:this.props.streams,streamsFormatter:this._formatConnectedStreams,noConnectionsMessage:"Select streams that will be processed by this pipeline."})),o.a.createElement("hr",null))),o.a.createElement(u.I,{className:"row-sm row-margin-top"},o.a.createElement(u.h,{md:12},o.a.createElement("div",{className:"pull-right"},o.a.createElement(_,{create:!0,save:this._saveStage})),o.a.createElement("h2",null,"Pipeline Stages"),o.a.createElement("p",{className:"description-margin-top"},"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."))),o.a.createElement(f.k,{bsNoItemsStyle:"info",noItemsText:"There are no rules on this stage.",items:a}))}}),G=n("+CppQpVm");function V(e){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;ndt{text-align:left;width:140px}dl.pipeline-dl>dt:after{content:":"}dl.pipeline-dl>dd{margin-left:100px}.row-margin-top{margin-top:10px}.description-margin-top{margin-top:5px}.pipeline-no-connections-warning{margin-bottom:13px}',""])},bzA7IatG:function(e,exports,t){var n,a=0,i=t("7TL5WG1w");"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(exports.locals=i.locals),exports.use=exports.ref=function(){return a++||(n=t("HkU00dYq")(i,{hmr:!0})),exports},exports.unuse=exports.unref=function(){a>0&&!--a&&(n(),n=null)}},jnXsgakn:function(e,t,n){"use strict";var a=n("ii0bleBb"),i=n.n(a),r=n("ivGQtwpr"),o=n.n(r),s=n("8FtKQWAV"),l=n.n(s);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n




© 2015 - 2024 Weber Informatics LLC | Privacy Policy