Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
"use strict";(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["e508fb3d-4875"],{"0+pgPwY9":(e,t,n)=>{n.d(t,{Z:()=>x});var r=n("Z7aTuO5B"),o=n("ii0bleBb"),i=n.n(o),a=n("EfCpThZW"),l=n("Mr++nPjW"),c=n("Mygg+ecz"),s=n("dFpwyWHg"),u=n.n(s),f=n("C2ikvoS0"),p=n.n(f),d=n("1IntWRSu"),m=n.n(d),h=n("8nGWeFnd"),y=n.n(h),g=n("TeAcaicX"),b=n.n(g),v=n("eE3+5goe"),E=n.n(v),O=n("vdoirfHG"),w={};w.styleTagTransform=E(),w.setAttributes=y(),w.insert=m().bind(null,"head"),w.domAPI=p(),w.insertStyleElement=b();u()(O.Z,w);const P=O.Z&&O.Z.locals?O.Z.locals:void 0;var C=(0,a.default)(c.JO).withConfig({displayName:"HelpPanel__IconHeader",componentId:"sc-1ghigo2-0"})(["margin-right:9px;"]),S=function(e){var t=e.condition,n=e.wrapper,r=e.children;return t?n(r):r},j=function(e){var t=e.bsStyle,n=e.children,o=e.className,i=e.collapsible,a=e.header,c=e.title,s=e.defaultExpanded,u=r.createElement("h3",null,r.createElement(C,{name:"info-circle"}),c);return r.createElement(l.s_,{defaultExpanded:s,className:"".concat(P.helpPanel," ").concat(o),bsStyle:t},r.createElement(l.s_.Heading,null,r.createElement(l.s_.Title,{toggle:i},a||u)),r.createElement(S,{condition:i,wrapper:function(e){return r.createElement(l.s_.Collapse,null,e)}},r.createElement(l.s_.Body,null,n)))};j.propTypes={bsStyle:i().oneOf(["success","warning","danger","info","default","primary"]),children:i().node,className:i().string,collapsible:i().bool,header:i().node,title:i().string,defaultExpanded:i().bool},j.defaultProps={bsStyle:"info",children:void 0,className:"",collapsible:!1,header:void 0,title:"",defaultExpanded:!1};const x=j},nRMrOfDS:(e,t,n)=>{var r=n("AztyBNMT"),o=n("Z7aTuO5B"),i=n("ii0bleBb"),a=n.n(i),l=n("nHcjWeCO"),c=n.n(l),s=n("Mr++nPjW"),u=n("YyiN4DLW"),f=n("x7QKyhPE"),p=n.n(f),d=n("9oVghaOd"),m=n.n(d),h=n("Mygg+ecz"),y=n("b/6pmtOr"),g=n("DH+PEhYn"),b=n("99ipeflJ"),v=n("V/MyycIc"),E=n("Y6AP5Vf8"),O=n("dFKAafZY"),w=n("EUJYvlA3"),P=n("lYmGaP4J"),C=n("Lzn6DvfV"),S=n("EfCpThZW"),j=n("ovJfI32G"),x=n("8pZttqbT"),_=(0,S.default)("code").withConfig({displayName:"LookupTableParameterEdit__StyledInlineCode",componentId:"sc-16mba38-0"})(["margin:0 0.25em;white-space:nowrap;"]),A=function(e){var t,n,r,i,a,l=e.validationState,c=e.onChange,u=e.lookupTables,f=e.identifier,p=e.parameter,d=e.defaultExpandHelp,m=p.lookupTable,h=p.key,y=p.defaultValue,g=p.name,b="$".concat(g,"$"),v=function(e){return function(t){c(e,t)}},O=function(e){return function(t){var n=t.target.value;return v(e)(n)}};if(!u)return o.createElement(x.Z,{text:"Loading lookup tables"});var w=u.sort((function(e,t){return(0,E.Q)(e.title,t.title)})).map((function(e){return{label:e.title,value:e.name}}));return o.createElement(o.Fragment,null,o.createElement(s.II,{id:"lookup-table-parameter-table-".concat(f),name:"query-param-table-name",label:"Lookup Table",bsStyle:null==l||null===(t=l.lookupTable)||void 0===t?void 0:t[0],error:null==l||null===(n=l.lookupTable)||void 0===n?void 0:n[1],help:"Select the lookup table Graylog should use to get the values."},o.createElement(j.Z,{placeholder:"Select lookup table",inputProps:{"aria-label":"Select lookup table"},onChange:v("lookupTable"),options:w,value:m,autoFocus:!0,clearable:!1,required:!0})),o.createElement(s.II,{type:"text",id:"lookup-table-parameter-key-".concat(f),label:"Lookup Table Key",name:"key",defaultValue:h,onChange:O("key"),bsStyle:null==l||null===(r=l.key)||void 0===r?void 0:r[0],help:"Select the lookup table key",error:"error"===(null==l||null===(i=l.key)||void 0===i?void 0:i[0])?null==l||null===(a=l.key)||void 0===a?void 0:a[1]:void 0,spellCheck:!1,required:!0}),o.createElement(s.II,{id:"lookup-table-parameter-default-value-".concat(f),type:"text",name:"defaultValue",label:"Default Value",help:"Select a default value in case the lookup result is empty",defaultValue:y,spellCheck:!1,onChange:O("defaultValue")}),o.createElement(s.s_,{id:"lookup-table-parameter-help",defaultExpanded:d},o.createElement(s.s_.Heading,null,o.createElement(s.s_.Title,{toggle:!0},"How to use lookup table parameters")),o.createElement(s.s_.Collapse,null,o.createElement(s.s_.Body,null,o.createElement("h5",null,"General Usage"),o.createElement("p",null,"After declaring it, the parameter",o.createElement(_,null,b),"in your query, will be replaced with the list of results from the lookup table. The list of results will be presented in the form of a Lucene BooleanQuery. E.g.:",o.createElement(_,null,'("foo" OR "bar" OR "baz")')),o.createElement("h5",null,"Behaviour on empty lookup result list"),o.createElement("p",null,"The event definition query is only executed if a value for the parameter is present. If the lookup result is empty, the execution will be skipped and treated as if the ",o.createElement("i",null,"Search Query")," found no messages. If an execution is desired a ",o.createElement("i",null,"Default Value")," that yields the desired search result needs to be provided. For example, (depending on the use case) a wildcard like",o.createElement(_,null,"*"),"can be a meaningful Default Value."),o.createElement("h5",null,"Limitations"),o.createElement("p",null,"Please note that maximum number of supported results is 1024. If the lookup table returns more results, the query is not executed.")))))};A.defaultProps={parameter:{},validationState:{},defaultExpandHelp:!0};const k=A;function R(e){return R="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},R(e)}function T(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return D(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 D(e,t)}(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 D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{};return t.messages&&0!==t.messages.length?o.createElement(s.iA,{striped:!0,condensed:!0,bordered:!0},o.createElement("thead",null,o.createElement("tr",null,o.createElement("th",null,"Timestamp"),o.createElement("th",null,"Message"))),o.createElement("tbody",null,e.renderMessages(t.messages))):o.createElement("p",null,"Could not find any messages with the current search criteria.")})),e}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.isFetchingData,n=e.searchResult,r=e.errors,i=e.displayPreview,a=t?o.createElement(h.$j,{text:"Loading filter preview..."}):this.renderSearchResult(n);return o.createElement(o.Fragment,null,o.createElement(ve.Z,{collapsible:!0,defaultExpanded:!i,title:"How many Events will Filter & Aggregation create?"},o.createElement("p",null,"The Filter & Aggregation Condition will generate different number of Events, depending on how it is configured:"),o.createElement("ul",null,o.createElement("li",null,o.createElement("b",null,"Filter:")," One Event per message matching the filter"),o.createElement("li",null,o.createElement("b",null,"Aggregation without groups:")," One Event every time the aggregation result satisfies the condition"),o.createElement("li",null,o.createElement("b",null,"Aggregation with groups:")," One Event per group whose aggregation result satisfies the condition"))),i&&o.createElement(s.s_,{className:qe.filterPreview,bsStyle:"default"},o.createElement(s.s_.Heading,null,o.createElement(s.s_.Title,null,"Filter Preview")),o.createElement(s.s_.Body,null,r.length>0?o.createElement("p",{className:"text-danger"},r[0].description):a)))}}])&&Be(t.prototype,n),r&&Be(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Component);Ve(ze,"propTypes",{searchResult:a().object,errors:a().array,isFetchingData:a().bool,displayPreview:a().bool}),Ve(ze,"defaultProps",{searchResult:{},errors:[],isFetchingData:!1,displayPreview:!1});const Qe=ze;function Ge(e){return Ge="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},Ge(e)}var We=["currentUser"];function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:[];return t.message?(0,l.union)(n,[t.message]):t.left?(0,l.union)(n,e(t.left),e(t.right)):t.child?(0,l.union)(n,e(t.child)):n},yt=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};switch(t.expr){case"number":return Number.isFinite(t.value)?{}:{message:"Threshold must be a valid number"};case"number-ref":var o={message:"Function must be set"};if(!t.ref)return o;var i=n.find((function(e){return e.id===t.ref}));return i&&i.function?{}:o;case"&&":case"||":case"<":case"<=":case">":case">=":case"==":return{left:e(t.left,n,r),right:e(t.right,n,r)};case"group":return{child:e(t.child,n,r)};default:return{message:"Condition must be set"}}};const gt=function(e,t){var n={};return e?(n.validationTree=yt(e,t),n.errors=ht(n.validationTree),n.isValid=0===n.errors.length,n):(n.isValid=!0,n)};var bt=a().shape({expr:a().string,left:a().object,right:a().object}),vt=a().shape({expr:a().string,value:a().oneOfType([a().number,a().string])}),Et=a().shape({expr:a().string,ref:a().string}),Ot=function(e){var t=e.expression,n=e.onChange,r=e.renderLabel,i=e.validation;return o.createElement(s.JX,{md:3},o.createElement(s.II,{id:"aggregation-threshold",name:"threshold",label:r?"Threshold":"",type:"number",value:c().get(t,"value"),bsStyle:i.message?"error":null,help:i.message,onChange:function(e){var r=c().cloneDeep(t);r.value=""===e.target.value?"":u.n6(e.target),n({conditions:r})}}))};Ot.propTypes={expression:vt.isRequired,onChange:a().func.isRequired,renderLabel:a().bool.isRequired,validation:a().object},Ot.defaultProps={validation:{}};const wt=Ot;var Pt=n("8FtKQWAV"),Ct=n.n(Pt),St=function(e){var t,n=e.aggregationFunctions,r=e.formattedFields,i=e.eventDefinition,a=e.expression,l=e.onChange,u=e.renderLabel,f=e.validation,p=function(e){return i.config.series.find((function(t){return t.id===e}))},d=function(e){return p(e)||{id:a.ref}},m=function(e){var t,n,r,o=e.nextFunction,s=e.nextField,u=c().cloneDeep(i.config.series),f=c().cloneDeep(d(a.ref)),p=(t=f,n=o,r=s,"".concat(c().defaultTo(n,t.function),"-").concat(c().defaultTo(r,t.field||"")));void 0!==o&&(f.function=o),void 0!==s&&(f.field=s),f.id=p;var m=u.findIndex((function(e){return e.id===f.id}));m>=0?u[m]=f:u.push(f);var h=c().cloneDeep(a);h.ref=p,l({series:u,conditions:h})},y=p(a.ref)||{};return o.createElement(s.JX,{md:6},o.createElement(s.cw,{controlId:"aggregation-function",validationState:f.message?"error":null},u&&o.createElement(s.J$,null,"If"),o.createElement(s.X2,{className:"row-sm"},o.createElement(s.JX,{md:6},o.createElement(h.Ph,{className:"aggregation-function",matchProp:"label",placeholder:"Select Function",onChange:function(e){m({nextFunction:e})},options:(t=n,t.sort(Ct()).map((function(e){return{label:"".concat(e.toLowerCase(),"()"),value:e}}))),clearable:!1,value:y.function})),o.createElement(s.JX,{md:6},o.createElement(h.Ph,{className:"aggregation-function-field",ignoreAccents:!1,matchProp:"label",placeholder:"Select Field (Optional)",onChange:function(e){m({nextField:e})},options:r,value:y.field,allowCreate:!0}))),f.message&&o.createElement(s.Qb,null,f.message)))};St.propTypes={aggregationFunctions:a().array.isRequired,eventDefinition:a().object.isRequired,expression:Et.isRequired,formattedFields:a().array.isRequired,onChange:a().func.isRequired,renderLabel:a().bool.isRequired,validation:a().object},St.defaultProps={validation:{}};const jt=St;var xt=["isFirstElement"];function _t(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var At=S.default.div.withConfig({displayName:"BooleanOperatorSelector__OperatorSelector",componentId:"sc-sflinp-0"})((function(e){var t=e.theme;return(0,S.css)(["margin-bottom:15px;font-size:",";"],t.fonts.size.body)})),kt=(0,S.default)((function(e){e.isFirstElement;var t=_t(e,xt);return o.createElement(s.cw,t)})).withConfig({displayName:"BooleanOperatorSelector__BooleanOperatorSelect",componentId:"sc-sflinp-1"})(["width:100px;margin-left:",";margin-right:1em;"],(function(e){return e.isFirstElement?"":"1em"})),Rt=function(e){var t=e.initialText,n=e.operator,r=e.onOperatorChange;return o.createElement(s.JX,{md:12},o.createElement(At,{className:"form-inline"},t&&o.createElement(s.cw,null,o.createElement(s.NI.Static,null,t," ")),o.createElement(kt,{isFirstElement:!t},o.createElement(h.Ph,{className:"boolean-operator",matchProp:"label",size:"small",onChange:r,options:[{label:"all",value:"&&"},{label:"any",value:"||"}],value:n,clearable:!1})),o.createElement(s.cw,null,o.createElement(s.NI.Static,null," of the following rules:"))))};Rt.propTypes={initialText:a().string,operator:a().string.isRequired,onOperatorChange:a().func.isRequired},Rt.defaultProps={initialText:""};const Tt=Rt;function Dt(){return Dt=Object.assign||function(e){for(var t=1;t",value:">"},{label:">=",value:">="},{label:"=",value:"=="}],value:t.expr,clearable:!1}),l.message&&o.createElement(s.Qb,null,l.message))),o.createElement(an,Zt({},e,{expression:t.right,validation:l.right,parent:t,onChange:r("right"),level:n+1}))))};Bt.propTypes={expression:bt.isRequired,level:a().number.isRequired,onChange:a().func.isRequired,onChildChange:a().func.isRequired,renderLabel:a().bool.isRequired,validation:a().object},Bt.defaultProps={validation:{}};const Ft=Bt;function Ut(){return Ut=Object.assign||function(e){for(var t=1;t":case">=":case"==":return o.createElement(o.Fragment,null,e(t.left)," ",o.createElement("strong",{className:"text-primary"},t.expr," "),e(t.right));default:return"No condition configured"}}(t.expression)};ln.propTypes={conditions:a().object.isRequired,series:a().array.isRequired};const cn=ln;var sn=(0,S.default)(s.s_).withConfig({displayName:"AggregationConditionsFormSummary__StyledPanel",componentId:"sc-1dh2bk3-0"})(["margin-top:10px;"]),un=(0,S.default)(s.zx).withConfig({displayName:"AggregationConditionsFormSummary__StyledButton",componentId:"sc-1dh2bk3-1"})(["margin-left:15px;vertical-align:baseline;"]),fn=function(e){var t=e.conditions,n=e.series,r=e.expressionValidation,i=e.showInlineValidation,a=e.toggleShowValidation;return o.createElement("div",null,o.createElement(sn,{header:"Condition summary"},r.isValid?o.createElement("p",{className:"text-success"},o.createElement(h.JO,{name:"check-square"})," Condition is valid"):o.createElement("p",{className:"text-danger"},o.createElement(h.JO,{name:"exclamation-triangle"})," Condition is not valid",o.createElement(un,{bsSize:"xsmall",onClick:a},i?"Hide errors":"Show errors")),o.createElement("b",null,"Preview:")," ",o.createElement(cn,{series:n,conditions:t})))};fn.propTypes={conditions:a().object.isRequired,series:a().array.isRequired,expressionValidation:a().object,showInlineValidation:a().bool,toggleShowValidation:a().func.isRequired},fn.defaultProps={expressionValidation:{isValid:!0},showInlineValidation:!1};const pn=fn;function dn(e){return dn="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},dn(e)}function mn(){return mn=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[];return"number-ref"===t.expr&&n.push(t.ref),t.left&&t.right?e(t.left).concat(e(t.right)):t.child?e(t.child):n},jn=(0,S.default)(s.bZ).withConfig({displayName:"AggregationConditionsForm__StyledAlert",componentId:"sc-1y58muo-0"})(["margin-bottom:10px !important;"]),xn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bn(e,t)}(a,e);var t,n,r,i=vn(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),Pn(On(t=i.call(this,e)),"toggleShowInlineValidation",(function(){var e=t.state.showInlineValidation;t.setState({showInlineValidation:!e})})),Pn(On(t),"handleChange",(function(e){var n=t.props,r=n.eventDefinition,o=n.onChange;if(Object.keys(e).includes("conditions")){var i,a=e.conditions;if(a){var l=Sn(a);i=(e.series||r.config.series).filter((function(e){return l.includes(e.id)}))}else i=[];o(yn(yn({},e),{},{conditions:{expression:a},series:i}))}else o(e)})),t.state={showInlineValidation:!1},t}return t=a,(n=[{key:"render",value:function(){var e=this.state.showInlineValidation,t=this.props,n=t.eventDefinition,r=t.validation,i=n.config.conditions.expression||Cn,a=gt(i,n.config.series);return o.createElement(o.Fragment,null,o.createElement("h3",{className:V.Z.title},"Create Events for Definition"),r.errors.conditions&&o.createElement(jn,{bsStyle:"danger"},o.createElement("h4",null,o.createElement(h.JO,{name:"exclamation-triangle"})," Errors found"),o.createElement("p",null,(0,l.get)(r,"errors.conditions[0]"))),o.createElement(s.X2,null,o.createElement(an,mn({expression:i},this.props,{validation:e?a.validationTree:{},onChange:this.handleChange}))),o.createElement(pn,{conditions:n.config.conditions,series:n.config.series,expressionValidation:a,showInlineValidation:e,toggleShowValidation:this.toggleShowInlineValidation}))}}])&&gn(t.prototype,n),r&&gn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Component);Pn(xn,"propTypes",{eventDefinition:a().object.isRequired,validation:a().object.isRequired,formattedFields:a().array.isRequired,aggregationFunctions:a().array.isRequired,onChange:a().func.isRequired});const _n=xn;function An(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kn(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],n=e.displayName||e.name||"Component",r=function(n){tr(i,n);var r=rr(i);function i(e){var t;return $n(this,i),(t=r.call(this,e)).state={streams:void 0},t}return er(i,[{key:"componentDidMount",value:function(){var e=this;Hn.sH.load((function(n){var r=n.filter((function(e){return e.is_editable}));0!==t.length&&(r=n.filter((function(e){return!t.includes(e.id)}))),e.setState({streams:r})}))}},{key:"render",value:function(){var t=this.state.streams;return t?o.createElement(e,Yn({streams:t},this.props)):o.createElement(h.$j,{text:"Loading Streams Information..."})}}]),i}(o.Component);return r.displayName="withStreams(".concat(n,")"),r}var lr=function(e){return o.createElement(Mn,e)};lr.propTypes={action:a().oneOf(["create","edit"]).isRequired,validation:a().object.isRequired,eventDefinition:a().object.isRequired,onChange:a().func.isRequired,currentUser:a().object.isRequired};const cr=ar(lr);var sr=n("EeAwn/0x"),ur=n("DeVaSktS"),fr=n("cx+ZNuS7"),pr={};pr.styleTagTransform=Re(),pr.setAttributes=xe(),pr.insert=Se().bind(null,"head"),pr.domAPI=Pe(),pr.insertStyleElement=Ae();Oe()(fr.Z,pr);const dr=fr.Z&&fr.Z.locals?fr.Z.locals:void 0;function mr(e){return mr="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},mr(e)}function hr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yr(e,t){for(var n=0;n0?o.createElement(s.bZ,{bsStyle:"warning"},"Missing Stream Permissions for:",o.createElement("br",null),n.join(", ")):null,a=t.map((function(e){return r.find((function(t){return t.id===e}))||e})).sort((function(e,t){return(0,E.Q)(e.title||e,t.title||t)})).map(e.formatStreamOrId);return o.createElement(o.Fragment,null,i,a)})),wr(Er(e),"renderQueryParameters",(function(e){if(e.some((function(e){return e.embryonic}))){var t=e.filter((function(e){return e.embryonic})).map((function(e){return e.name})).join(", ");return o.createElement(s.bZ,{bsStyle:"danger"},o.createElement(h.JO,{name:"exclamation-triangle"})," There are undeclared query parameters: ",t)}return o.createElement("dd",null,e.map((function(e){return e.name})).join(", "))})),e}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.config,n=e.currentUser,r=t.query,i=t.query_parameters,a=t.streams,l=t.search_within_ms,u=t.execute_every_ms,f=t._is_scheduled,p=t.group_by,d=t.series,m=t.conditions,y=this.getConditionType(t),g=(0,v.l)(l,te),b=(0,v.l)(u,te),E=a.filter((function(e){return(0,w.rq)(n.permissions,"streams:read:".concat(e))})),O=a.filter((function(e){return!E.includes(e)})),P=gt(m.expression,d);return o.createElement("dl",null,o.createElement("dt",null,"Type"),o.createElement("dd",null,c().upperFirst(y)),o.createElement("dt",null,"Search Query"),o.createElement("dd",null,r||"*"),i.length>0&&this.renderQueryParameters(i),o.createElement("dt",null,"Streams"),o.createElement("dd",{className:dr.streamList},this.renderStreams(E,O)),o.createElement("dt",null,"Search within"),o.createElement("dd",null,g.duration," ",g.unit.toLowerCase()),o.createElement("dt",null,"Execute search every"),o.createElement("dd",null,b.duration," ",b.unit.toLowerCase()),o.createElement("dt",null,"Enable scheduling"),o.createElement("dd",null,f?"yes":"no"),"aggregation"===y&&o.createElement(o.Fragment,null,o.createElement("dt",null,"Group by Field(s)"),o.createElement("dd",null,p&&p.length>0?p.join(", "):"No Group by configured"),o.createElement("dt",null,"Create Events if"),o.createElement("dd",null,P.isValid?o.createElement(cn,{series:d,conditions:m}):o.createElement(s.bZ,{bsSize:"small",bsStyle:"danger"},o.createElement(h.JO,{name:"exclamation-triangle"})," Condition is not valid: ",P.errors.join(", ")))))}}])&&yr(t.prototype,n),r&&yr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Component);wr(Pr,"propTypes",{config:a().object.isRequired,currentUser:a().object.isRequired,streams:a().array.isRequired});const Cr=ar(Pr);r.PluginStore.register(new r.PluginManifest({},{eventDefinitionTypes:[{type:"aggregation-v1",displayName:"Filter & Aggregation",sortOrder:0,description:"Create Events from log messages by filtering them and (optionally) aggregating their results to match a given condition. These Events can be used as input for a Correlation Rule.",formComponent:cr,summaryComponent:Cr,defaultConfig:Mn.defaultConfig}]}))},vxGQ9flp:(e,t,n)=>{n.d(t,{y:()=>y,B:()=>g});var r=n("JnTtTRmZ"),o=n.n(r),i=n("oCSEoDew"),a=n.n(i),l=n("nHcjWeCO"),c=n.n(l),s=n("0wQfx7YJ"),u=n("4af3+9mh"),f=n("OqsMdpSm"),p=n("xc00RsLr");function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t, please ensure it wasn't deleted."),"Could not retrieve Event Definition")})),y.get.promise(t)},setAlertFlag:function(e){var t=e.notifications.length>0;return m(m({},e),{},{alert:t})},extractSchedulerInfo:function(e){var t=c().cloneDeep(e),n=c().pick(t.config,["_is_scheduled"])._is_scheduled;return t.config=c().omit(t.config,["_is_scheduled"]),{eventDefinition:t,isScheduled:c().defaultTo(n,!0)}},create:function(e){var t=this,n=this.extractSchedulerInfo(e),r=n.eventDefinition,o=n.isScheduled,i=(0,f.ZP)("POST",this.eventDefinitionsUrl({query:{schedule:o}}),this.setAlertFlag(r));i.then((function(e){return u.Z.success("Event Definition created successfully",'Event Definition "'.concat(r.title,'" was created successfully.')),t.refresh(),e}),(function(e){400===e.status&&e.additional.body&&e.additional.body.failed||u.Z.error('Creating Event Definition "'.concat(r.title,'" failed with status: ').concat(e),"Could not save Event Definition")})),y.create.promise(i)},update:function(e,t){var n=this,r=this.extractSchedulerInfo(t),o=r.eventDefinition,i=r.isScheduled,a=(0,f.ZP)("PUT",this.eventDefinitionsUrl({segments:[e],query:{schedule:i}}),this.setAlertFlag(o));a.then((function(e){return u.Z.success("Event Definition updated successfully",'Event Definition "'.concat(o.title,'" was updated successfully.')),n.refresh(),e}),(function(e){400===e.status&&e.additional.body&&e.additional.body.failed||u.Z.error('Updating Event Definition "'.concat(o.title,'" failed with status: ').concat(e),"Could not update Event Definition")})),y.update.promise(a)},delete:function(e){var t=this,n=(0,f.ZP)("DELETE",this.eventDefinitionsUrl({segments:[e.id]}));n.then((function(){u.Z.success("Event Definition deleted successfully",'Event Definition "'.concat(e.title,'" was deleted successfully.')),t.refresh()}),(function(t){u.Z.error('Deleting Event Definition "'.concat(e.title,'" failed with status: ').concat(t),"Could not delete Event Definition")})),y.delete.promise(n)},enable:function(e){var t=this,n=(0,f.ZP)("PUT",this.eventDefinitionsUrl({segments:[e.id,"schedule"]}));n.then((function(n){return u.Z.success("Event Definition successfully enabled",'Event Definition "'.concat(e.title,'" was successfully enabled.')),t.refresh(),n}),(function(t){400===t.status&&t.additional.body&&t.additional.body.failed||u.Z.error('Enabling Event Definition "'.concat(e.title,'" failed with status: ').concat(t),"Could not enable Event Definition")})),y.enable.promise(n)},disable:function(e){var t=this,n=(0,f.ZP)("PUT",this.eventDefinitionsUrl({segments:[e.id,"unschedule"]}));n.then((function(n){return u.Z.success("Event Definition successfully disabled",'Event Definition "'.concat(e.title,'" was successfully disabled.')),t.refresh(),n}),(function(t){400===t.status&&t.additional.body&&t.additional.body.failed||u.Z.error('Disabling Event Definition "'.concat(e.title,'" failed with status: ').concat(t),"Could not disable Event Definition")})),y.disable.promise(n)},clearNotificationQueue:function(e){var t=this,n=(0,f.ZP)("PUT",this.eventDefinitionsUrl({segments:[e.id,"clear-notification-queue"]}));n.then((function(e){return u.Z.success("Queued notifications cleared.","Queued notifications were successfully cleared."),t.refresh(),e}),(function(e){400===e.status&&e.additional.body&&e.additional.body.failed||u.Z.error("Clearing queued notifications failed with status: ".concat(e),"Could not clear queued notifications")})),y.clearNotificationQueue.promise(n)}})}))},Lzn6DvfV:(e,t,n)=>{n.d(t,{H:()=>u,m:()=>f});var r=n("JnTtTRmZ"),o=n.n(r),i=n("4af3+9mh"),a=n("4sldgQy6"),l=n("0wQfx7YJ"),c=n("OqsMdpSm"),s=n("xc00RsLr"),u=(0,s.ei)("core.LookupTables",(function(){return o().createActions({searchPaginated:{asyncResult:!0},reloadPage:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},update:{asyncResult:!0},getErrors:{asyncResult:!0},lookup:{asyncResult:!0},purgeKey:{asyncResult:!0},purgeAll:{asyncResult:!0},validate:{asyncResult:!0}})})),f=(0,s.dS)("core.LookupTables",(function(){return o().createStore({listenables:[u],pagination:{page:1,per_page:10,total:0,count:0,query:null},errorStates:{tables:{},caches:{},dataAdapters:{}},table:null,cache:null,dataAdapter:null,tables:null,caches:null,dataAdapters:null,lookupResult:null,validationErrors:{},getInitialState:function(){return this.getState()},getState:function(){return{errorStates:this.errorStates,table:this.table,cache:this.cache,dataAdapter:this.dataAdapter,tables:this.tables,caches:this.caches,dataAdapters:this.dataAdapters,lookupResult:this.lookupResult,validationErrors:this.validationErrors,pagination:this.pagination}},propagateChanges:function(){this.trigger(this.getState())},reloadPage:function(){var e=this.searchPaginated(this.pagination.page,this.pagination.per_page,this.pagination.query);return u.reloadPage.promise(e),e},searchPaginated:function(e,t,n){var r=this,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=this._url((0,a.Z)("tables",e,t,n,{resolve:o})),l=(0,c.ZP)("GET",i);return l.then((function(e){r.pagination={count:e.count,total:e.total,page:e.page,per_page:e.per_page,query:e.query},r.tables=e.lookup_tables,r.caches=e.caches,r.dataAdapters=e.data_adapters,r.propagateChanges()}),this._errorHandler("Fetching lookup tables failed","Could not retrieve the lookup tables")),u.searchPaginated.promise(l),l},get:function(e){var t=this,n=this._url("tables/".concat(e,"?resolve=true")),r=(0,c.ZP)("GET",n);return r.then((function(e){var n=e.lookup_tables[0];t.table=n,t.cache=e.caches[n.cache_id],t.dataAdapter=e.data_adapters[n.data_adapter_id],t.propagateChanges()}),this._errorHandler("Fetching lookup table ".concat(e," failed"),"Could not retrieve lookup table")),u.get.promise(r),r},create:function(e){var t=this._url("tables"),n=(0,c.ZP)("POST",t,e);return n.catch(this._errorHandler("Creating lookup table failed",'Could not create lookup table "'.concat(e.name,'"'))),u.create.promise(n),n},update:function(e){var t=this._url("tables/".concat(e.id)),n=(0,c.ZP)("PUT",t,e);return n.catch(this._errorHandler("Updating lookup table failed",'Could not update lookup table "'.concat(e.name,'"'))),u.update.promise(n),n},delete:function(e){var t=this._url("tables/".concat(e)),n=(0,c.ZP)("DELETE",t);return n.catch(this._errorHandler("Deleting lookup table failed",'Could not delete lookup table "'.concat(e,'"'))),u.delete.promise(n),n},getErrors:function(e,t,n){var r=this,o={};e&&(o.tables=e),t&&(o.caches=t),n&&(o.data_adapters=n);var i=(0,c.ZP)("POST",this._url("errorstates"),o);return i.then((function(e){r.errorStates={tables:e.tables||{},caches:e.caches||{},dataAdapters:e.data_adapters||{}},r.propagateChanges()}),this._errorHandler("Fetching lookup table error state failed.","Could not error states")),u.getErrors.promise(i),i},lookup:function(e,t){var n=this,r=(0,c.ZP)("GET",this._url("tables/".concat(e,"/query?key=").concat(encodeURIComponent(t))));return r.then((function(e){n.lookupResult=e,n.propagateChanges()}),this._errorHandler("Lookup failed",'Could not lookup value for key "'.concat(t,'" in lookup table "').concat(e,'"'))),u.lookup.promise(r),r},purgeKey:function(e,t){var n=(0,c.ZP)("POST",this._urlClusterWise("tables/".concat(e.id,"/purge?key=").concat(encodeURIComponent(t))));return n.then((function(){i.Z.success('Purging cache key "'.concat(t,'" for lookup table "').concat(e.name,'"'),"Success!")}),this._errorHandler('Could not purge cache for key "'.concat(t,'" in lookup table "').concat(e.name,'"'),"Failed!")),u.purgeKey.promise(n),n},purgeAll:function(e){var t=(0,c.ZP)("POST",this._urlClusterWise("tables/".concat(e.id,"/purge")));return t.then((function(){i.Z.success('Purging cache for lookup table "'.concat(e.name,'"'),"Success!")}),this._errorHandler('Could not purge cache for lookup table "'.concat(e.name,'"'),"Failed!")),u.purgeAll.promise(t),t},validate:function(e){var t=this,n=this._url("tables/validate"),r=(0,c.ZP)("POST",n,e);return r.then((function(e){t.validationErrors=e.errors,t.propagateChanges()}),this._errorHandler("Lookup table validation failed",'Could not validate lookup table "'.concat(e.name,'"'))),u.validate.promise(r),r},_errorHandler:function(e,t,n){return function(r){try{if(r.additional.body[0].message_template)return}catch(e){}var o;try{o=r.additional.body.message}catch(e){o=r.message}i.Z.error("".concat(e,": ").concat(o),t),n&&n(r)}},_url:function(e){return(0,l.DC)("/system/lookup/".concat(e))},_urlClusterWise:function(e){return(0,l.DC)("/cluster/system/lookup/".concat(e))}})}))},Y6AP5Vf8:(e,t,n)=>{n.d(t,{d:()=>l,Q:()=>c});var r=n("9oVghaOd"),o=n.n(r),i=n("8FtKQWAV"),a=n.n(i);function l(e,t,n){var r=n||"asc",i=o()(e),a=o()(t);return"asc"===r?i.isBefore(a)?-1:a.isBefore(i)?1:0:a.isBefore(i)?-1:i.isBefore(a)?1:0}function c(e,t,n){return"asc"===(n||"asc")?a()(e.toLowerCase(),t.toLowerCase()):a()(t.toLowerCase(),e.toLowerCase())}},vdoirfHG:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n("pmX897Fv"),o=n.n(r),i=n("DjJvgDaP"),a=n.n(i)()(o());a.push([e.id,".z6LAsSk67C9Z9TP6Sw_Z .panel-title {\n font-size: 1rem; /* theme.fonts.size.body */\n}\n\n.z6LAsSk67C9Z9TP6Sw_Z .panel-title > a {\n cursor: pointer;\n display: block;\n}\n\n.z6LAsSk67C9Z9TP6Sw_Z .panel-body {\n padding: 10px;\n}\n\n.z6LAsSk67C9Z9TP6Sw_Z ul {\n padding-left: 0;\n}\n","",{version:3,sources:["webpack://./src/components/event-definitions/common/HelpPanel.css"],names:[],mappings:"AAAA;IACI,eAAe,EAAE,0BAA0B;AAC/C;;AAEA;IACI,eAAe;IACf,cAAc;AAClB;;AAEA;IACI,aAAa;AACjB;;AAEA;IACI,eAAe;AACnB",sourcesContent:[":local(.helpPanel) .panel-title {\n font-size: 1rem; /* theme.fonts.size.body */\n}\n\n:local(.helpPanel) .panel-title > a {\n cursor: pointer;\n display: block;\n}\n\n:local(.helpPanel) .panel-body {\n padding: 10px;\n}\n\n:local(.helpPanel) ul {\n padding-left: 0;\n}\n"],sourceRoot:""}]),a.locals={helpPanel:"z6LAsSk67C9Z9TP6Sw_Z"};const l=a},p73eydaJ:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n("pmX897Fv"),o=n.n(r),i=n("DjJvgDaP"),a=n.n(i)()(o());a.push([e.id,".Q3IGkFIUvJ2Wg6SvuD4K {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n\n.IsgkvOxhQSEsv8gRjrL3 {\n table-layout: fixed;\n}\n\n.A9wyo101mpbrg9i57cBz.alert {\n margin-bottom: 10px;\n}\n\n.A9wyo101mpbrg9i57cBz h4 {\n font-size: 1.44rem; /* theme.fonts.size.body h4 */\n margin-bottom: 0.5em;\n}\n\n.A9wyo101mpbrg9i57cBz ul {\n list-style: disc;\n margin: 0.5em 0;\n}\n","",{version:3,sources:["webpack://./src/components/event-definitions/common/commonStyles.css"],names:[],mappings:"AAAA;IACI,gBAAgB;IAChB,mBAAmB;AACvB;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,kBAAkB,EAAE,6BAA6B;IACjD,oBAAoB;AACxB;;AAEA;IACI,gBAAgB;IAChB,eAAe;AACnB",sourcesContent:[":local(.title) {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n\n:local(.fixedTable) {\n table-layout: fixed;\n}\n\n:local(.validationSummary).alert {\n margin-bottom: 10px;\n}\n\n:local(.validationSummary) h4 {\n font-size: 1.44rem; /* theme.fonts.size.body h4 */\n margin-bottom: 0.5em;\n}\n\n:local(.validationSummary) ul {\n list-style: disc;\n margin: 0.5em 0;\n}\n"],sourceRoot:""}]),a.locals={title:"Q3IGkFIUvJ2Wg6SvuD4K",fixedTable:"IsgkvOxhQSEsv8gRjrL3",validationSummary:"A9wyo101mpbrg9i57cBz"};const l=a},"3saCUhRt":(e,t,n)=>{n.d(t,{Z:()=>l});var r=n("pmX897Fv"),o=n.n(r),i=n("DjJvgDaP"),a=n.n(i)()(o());a.push([e.id,".Rm5RJaCv9xhyX2lY9jI3 {\n margin-top: 25px;\n height: 34px;\n}\n","",{version:3,sources:["webpack://./src/components/event-definitions/event-definition-types/AggregationConditionExpression.css"],names:[],mappings:"AAAA;IACI,gBAAgB;IAChB,YAAY;AAChB",sourcesContent:[":local(.formControlNoLabel) {\n margin-top: 25px;\n height: 34px;\n}\n"],sourceRoot:""}]),a.locals={formControlNoLabel:"Rm5RJaCv9xhyX2lY9jI3"};const l=a},"cx+ZNuS7":(e,t,n)=>{n.d(t,{Z:()=>l});var r=n("pmX897Fv"),o=n.n(r),i=n("DjJvgDaP"),a=n.n(i)()(o());a.push([e.id,".wp9nUw71uYu2kck_XycC span:not(:last-child)::after {\n content: ', ';\n}\n","",{version:3,sources:["webpack://./src/components/event-definitions/event-definition-types/FilterAggregationSummary.css"],names:[],mappings:"AAAA;IACI,aAAa;AACjB",sourcesContent:[":local(.streamList) span:not(:last-child)::after {\n content: ', ';\n}\n"],sourceRoot:""}]),a.locals={streamList:"wp9nUw71uYu2kck_XycC"};const l=a},nmGMLleu:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n("pmX897Fv"),o=n.n(r),i=n("DjJvgDaP"),a=n.n(i)()(o());a.push([e.id,".YV9VLhWAF0dOTkZvWqvg .panel-body {\n max-height: 400px;\n overflow-y: auto;\n padding: 20px 10px;\n}\n\n.YV9VLhWAF0dOTkZvWqvg table {\n table-layout: fixed;\n word-wrap: break-word;\n}\n","",{version:3,sources:["webpack://./src/components/event-definitions/event-definition-types/FilterPreview.css"],names:[],mappings:"AAAA;IACI,iBAAiB;IACjB,gBAAgB;IAChB,kBAAkB;AACtB;;AAEA;IACI,mBAAmB;IACnB,qBAAqB;AACzB",sourcesContent:[":local(.filterPreview) .panel-body {\n max-height: 400px;\n overflow-y: auto;\n padding: 20px 10px;\n}\n\n:local(.filterPreview) table {\n table-layout: fixed;\n word-wrap: break-word;\n}\n"],sourceRoot:""}]),a.locals={filterPreview:"YV9VLhWAF0dOTkZvWqvg"};const l=a},"4kW3fUUU":(e,t,n)=>{n.d(t,{Z:()=>g});var r=n("dFpwyWHg"),o=n.n(r),i=n("C2ikvoS0"),a=n.n(i),l=n("1IntWRSu"),c=n.n(l),s=n("8nGWeFnd"),u=n.n(s),f=n("TeAcaicX"),p=n.n(f),d=n("eE3+5goe"),m=n.n(d),h=n("p73eydaJ"),y={};y.styleTagTransform=m(),y.setAttributes=u(),y.insert=c().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=p();o()(h.Z,y);const g=h.Z&&h.Z.locals?h.Z.locals:void 0}}]);
//# sourceMappingURL=e508fb3d-4875.ca56f99d43fd9528c6da.js.map