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

web-interface.assets.b6fe2bb5-8700.a99c00da5482f0dae841.js Maven / Gradle / Ivy

"use strict";(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["b6fe2bb5-8700"],{uUHW0N40:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n("Z7aTuO5B"),o=n("QTXsLZJF"),i=n("pjsNBHWI");function l(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 r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){a=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(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 a(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 a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?t:void 0};c((t=n.search,a=null!==(r=(0,i.parse)(t,{ignoreQueryPrefix:!0}))&&void 0!==r?r:{},u=a.page,s=a.perPage,f=a.query,{page:null!==(o=m(u))&&void 0!==o?o:e.page,perPage:null!==(l=m(s))&&void 0!==l?l:e.perPage,query:"string"==typeof f?f:e.query})),p(!0)}),[n.search,e]);return{isInitialized:f,pagination:u,setPagination:function(e){t.push({pathname:n.pathname,search:(0,i.stringify)(e)})}}}},Iw2FNJN9:(e,t,n)=>{n.r(t),n.d(t,{default:()=>fe});var r=n("Z7aTuO5B"),o=n("EfCpThZW"),i=n("EeAwn/0x"),l=n("Mr++nPjW"),a=n("AdUszsMQ"),u=n("G9VqAO1I"),c=n("4Js8dUPg"),s=n("ii0bleBb"),f=n.n(s),p=n("Y1Txt3Ie"),m=n("DeVaSktS"),d=n("L040zqI6"),y=o.default.td.withConfig({displayName:"RuleListEntry__LimitedTd",componentId:"sc-1m96wya-0"})((function(e){var t=e.theme;return(0,o.css)(["max-width:250px;min-width:250px;@media screen and (max-width:","){white-space:normal !important;}"],t.breakpoints.max.md)}));const g=function(e){var t=e.rule,n=e.onDelete,o=e.usingPipelines,u=t.id,c=t.title,s=t.description,f=t.created_at,g=t.modified_at,h=o.length,b=r.createElement(l.Si,null,r.createElement(l.zx,{bsStyle:"primary",bsSize:"xsmall",onClick:n(t),title:"Delete rule"},"Delete"),r.createElement(i.J,{to:m.ZP.SYSTEM.PIPELINES.RULE(u)},r.createElement(l.zx,{bsStyle:"info",bsSize:"xsmall"},"Edit")));return r.createElement("tr",{key:c},r.createElement("td",null,r.createElement(i.r,{to:m.ZP.SYSTEM.PIPELINES.RULE(u)},c)),r.createElement("td",{className:"limited"},s),r.createElement("td",{className:"limited"},r.createElement(a.ij,{dateTime:f})),r.createElement("td",{className:"limited"},r.createElement(a.ij,{dateTime:g})),r.createElement("td",null,r.createElement(p.CL,{name:"org.graylog.plugins.pipelineprocessor.ast.Rule.".concat(u,".executed"),zeroOnMissing:!0},r.createElement(p.qb,{suffix:"msg/s"}))),r.createElement("td",null,r.createElement(p.CL,{name:"org.graylog.plugins.pipelineprocessor.ast.Rule.".concat(u,".failed")},r.createElement(p.qb,{showTotal:!0,suffix:"errors/s",hideOnMissing:!0}))),r.createElement(y,null,r.createElement(a.Z2,null,h)," ",o.map((function(e,t){var n=e.id,o=e.title,c=r.createElement(l.u,{id:"".concat(u).concat(n),show:!0},o);return r.createElement(r.Fragment,{key:n},o.length>30?r.createElement(a.Ox,{placement:"top",trigger:"hover",overlay:c,rootClose:!0},r.createElement(i.r,{to:m.ZP.SYSTEM.PIPELINES.PIPELINE(n)},d.Z.truncateWithEllipses(o,30))):r.createElement(i.r,{to:m.ZP.SYSTEM.PIPELINES.PIPELINE(n)},o),te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?ce(b,n,P):E({page:Math.max(ee._.page,b.page-1),perPage:M,query:N})}))}},searchFilter:A}),s&&r.createElement(X,{onClose:function(){se(y),f(!1)}}))))))))}},UPjNKhGS:(e,t,n)=>{n.d(t,{_:()=>r});var r={page:1,perPage:10,query:""}},"0I+u03RB":(e,t,n)=>{n.d(t,{W:()=>m,G:()=>d});var r=n("JnTtTRmZ"),o=n.n(r),i=n("8FtKQWAV"),l=n.n(i),a=n("4af3+9mh"),u=n("0wQfx7YJ"),c=n("4sldgQy6"),s=n("rkoyttmq"),f=n("OqsMdpSm"),p=n("xc00RsLr"),m=(0,p.ei)("core.Rules",(function(){return o().createActions({delete:{asyncResult:!0},list:{asyncResult:!0},get:{asyncResult:!0},save:{asyncResult:!0},update:{asyncResult:!0},parse:{asyncResult:!0},multiple:{asyncResult:!0},loadFunctions:{asyncResult:!0},loadMetricsConfig:{asyncResult:!0},updateMetricsConfig:{asyncResult:!0},listPaginated:{asyncResult:!0}})})),d=(0,p.dS)("core.Rules",(function(){return o().createStore({listenables:[m],rules:void 0,rulesContext:void 0,functionDescriptors:void 0,metricsConfig:void 0,getInitialState:function(){return{rules:this.rules,rulesContext:this.rulesContext,functionDescriptors:this.functionDescriptors,metricsConfig:this.metricsConfig}},_updateRulesState:function(e){this.rules?this.rules.some((function(t){return t.id===e.id}))?this.rules=this.rules.map((function(t){return t.id===e.id?e:t})):this.rules.push(e):this.rules=[e];this.trigger({rules:this.rules,functionDescriptors:this.functionDescriptors})},_updateFunctionDescriptors:function(e){e&&(this.functionDescriptors=e.sort((function(e,t){return l()(e.name,t.name)}))),this.trigger({rules:this.rules,functionDescriptors:this.functionDescriptors})},list:function(){var e=this,t=(0,u.DC)(s.Z.RulesController.list().url);return(0,f.ZP)("GET",t).then((function(t){e.rules=t,e.trigger({rules:t,functionDescriptors:e.functionDescriptors})}),(function(e){a.Z.error("Fetching rules failed with status: ".concat(e.message),"Could not retrieve processing rules")}))},listPaginated:function(e){var t=e.page,n=e.perPage,r=e.query,o=(0,c.Z)(s.Z.RulesController.paginatedList().url,t,n,r),i=(0,f.ZP)("GET",(0,u.DC)(o)).then((function(e){return{list:e.rules,context:e.context,pagination:{count:e.count,total:e.total,page:e.page,perPage:e.per_page,query:e.query}}}),(function(e){e.additional&&404===e.additional.status||a.Z.error("Loading rules list failed with status: ".concat(e),"Could not load rules.")}));return m.listPaginated.promise(i),i},get:function(e){var t=(0,u.DC)(s.Z.RulesController.get(e).url),n=(0,f.ZP)("GET",t);return n.then(this._updateRulesState,(function(t){a.Z.error('Fetching rule "'.concat(e,'" failed with status: ').concat(t.message),'Could not retrieve processing rule "'.concat(e,'"'))})),m.get.promise(n),n},save:function(e){var t=this,n=(0,u.DC)(s.Z.RulesController.create().url),r={title:e.title,description:e.description,source:e.source},o=(0,f.ZP)("POST",n,r);return o.then((function(e){return t._updateRulesState(e),a.Z.success('Rule "'.concat(e.title,'" created successfully')),e}),(function(t){a.Z.error('Saving rule "'.concat(e.title,'" failed with status: ').concat(t.message),'Could not save processing rule "'.concat(e.title,'"'))})),m.save.promise(o),o},update:function(e){var t=this,n=(0,u.DC)(s.Z.RulesController.update(e.id).url),r={id:e.id,title:e.title,description:e.description,source:e.source},o=(0,f.ZP)("PUT",n,r);return o.then((function(e){return t._updateRulesState(e),a.Z.success('Rule "'.concat(e.title,'" updated successfully')),e}),(function(t){a.Z.error('Updating rule "'.concat(e.title,'" failed with status: ').concat(t.message),'Could not update processing rule "'.concat(e.title,'"'))})),m.update.promise(o),o},delete:function(e){var t=this,n=(0,u.DC)(s.Z.RulesController.delete(e.id).url),r=(0,f.ZP)("DELETE",n).then((function(){t.rules=t.rules.filter((function(t){return t.id!==e.id})),t.trigger({rules:t.rules,functionDescriptors:t.functionDescriptors}),a.Z.success('Rule "'.concat(e.title,'" was deleted successfully'))}),(function(t){a.Z.error('Deleting rule "'.concat(e.title,'" failed with status: ').concat(t.message),'Could not delete processing rule "'.concat(e.title,'"'))}));return m.delete.promise(r),r},parse:function(e,t){var n=(0,u.DC)(s.Z.RulesController.parse().url),r={title:e.title,description:e.description,source:e.source};return(0,f.ZP)("POST",n,r).then((function(e){return t([]),e}),(function(e){400===e.status&&t(e.additional.body)}))},multiple:function(e,t){var n=(0,u.DC)(s.Z.RulesController.multiple().url),r=(0,f.ZP)("POST",n,{rules:e});return r.then(t),r},loadFunctions:function(){if(!this.functionDescriptors){var e=(0,u.DC)(s.Z.RulesController.functions().url);return(0,f.ZP)("GET",e).then(this._updateFunctionDescriptors)}},loadMetricsConfig:function(){var e=this,t=(0,u.DC)(s.Z.RulesController.metricsConfig().url),n=(0,f.ZP)("GET",t);n.then((function(t){e.metricsConfig=t,e.trigger({rules:e.rules,functionDescriptors:e.functionDescriptors,metricsConfig:e.metricsConfig})}),(function(e){a.Z.error("Couldn't load rule metrics config: ".concat(e.message),"Couldn't load rule metrics config")})),m.loadMetricsConfig.promise(n)},updateMetricsConfig:function(e){var t=this,n=(0,u.DC)(s.Z.RulesController.metricsConfig().url),r=(0,f.ZP)("PUT",n,e);r.then((function(e){t.metricsConfig=e,t.trigger({rules:t.rules,functionDescriptors:t.functionDescriptors,metricsConfig:t.metricsConfig}),a.Z.success("Successfully updated rule metrics config")}),(function(e){a.Z.error("Couldn't update rule metrics config: ".concat(e.message),"Couldn't update rule metrics config")})),m.updateMetricsConfig.promise(r)}})}))}}]);
//# sourceMappingURL=b6fe2bb5-8700.a99c00da5482f0dae841.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy