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

web-interface.assets.b6fe2bb5-1442.fa4caae3f80bc0c9381c.js Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
"use strict";(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["b6fe2bb5-1442"],{kSWYIN6i:(t,e,r)=>{r.r(e),r.d(e,{default:()=>pt});var n=r("D4SbLiE/"),o=r.n(n),i=r("ii0bleBb"),a=r.n(i),c=r("Z7aTuO5B"),l=r("JnTtTRmZ"),s=r.n(l),u=r("EeAwn/0x"),f=r("AdUszsMQ"),m=r("j/+1GA3k"),p=r("8FtKQWAV"),d=r.n(p),y=r("Mr++nPjW"),h=r("8pZttqbT"),E=r("6MN7/oMt"),v=r("QQNFCPWy");function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function x(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){for(var r=0;r1&&(t=c.createElement(y.zx,{bsSize:"xsmall",bsStyle:"primary",className:"pull-right",onClick:this._openSortModal},"Sort extractors"));var r=this.state.extractors.sort((function(t,e){return d()(t.order,e.order)})).map(this._formatExtractor);return c.createElement("div",null,c.createElement(T,{inputId:this.props.input.id}),c.createElement(y.X2,{className:"content extractor-list"},c.createElement(y.JX,{md:12},c.createElement(y.X2,{className:"row-sm"},c.createElement(y.JX,{md:8},c.createElement("h2",null,"Configured extractors")),c.createElement(y.JX,{md:4},t)),c.createElement(R.Z,{bsNoItemsStyle:"info",noItemsText:"This input has no configured extractors.",items:r}))),c.createElement(it,{ref:function(t){e.sortModal=t},input:this.props.input,extractors:this.state.extractors}))}});var ct=r("G9VqAO1I"),lt=r("4Js8dUPg"),st=r("CfS4XPvw"),ut=r("/76yeLGv"),ft=r("b3xCUZUh"),mt=o()({displayName:"ExtractorsPage",propTypes:{params:a().object.isRequired},mixins:[s().listenTo(ft.S,"onNodesChange")],getInitialState:function(){return{node:void 0}},componentDidMount:function(){var t=this,e=this.props.params;ut.x.get(e.inputId).then((function(e){return t.setState({input:e})})),ft.h.list()},onNodesChange:function(t){var e=this.props.params,r=e.nodeId?t.nodes[e.nodeId]:Object.values(t.nodes).filter((function(t){return t.is_leader})),n=this.state.node;n&&n.node_id===r.node_id||this.setState({node:r})},_isLoading:function(){var t=this.state,e=t.node;return!(t.input&&e)},render:function(){if(this._isLoading())return c.createElement(f.$j,null);var t=this.state,e=t.node,r=t.input;return c.createElement(f.$4,{title:"Extractors of ".concat(r.title)},c.createElement("div",null,c.createElement(m.Z,{title:c.createElement("span",null,"Extractors of ",c.createElement("em",null,r.title))},c.createElement("span",null,"Extractors are applied on every message that is received by this input. Use them to extract and transform"," ","any text data into fields that allow you easy filtering and analysis later on."," ","Example: Extract the HTTP response code from a log message, transform it to a numeric field and attach it"," ","as ",c.createElement("em",null,"http_response_code")," to the message."),c.createElement("span",null,"Find more information about extractors in the"," ",c.createElement(ct.Z,{page:lt.Z.PAGES.EXTRACTORS,text:"documentation"}),"."),c.createElement(y.PS,{bsStyle:"info",bsSize:"large",id:"extractor-actions-dropdown",title:"Actions",pullRight:!0},c.createElement(u.J,{to:M.ZP.import_extractors(e.node_id,r.id)},c.createElement(y.sN,null,"Import extractors")),c.createElement(u.J,{to:M.ZP.export_extractors(e.node_id,r.id)},c.createElement(y.sN,null,"Export extractors")))),c.createElement(at,{input:r,node:e})))}});const pt=(0,st.Z)(mt)},OjsYU8Qj:(t,e,r)=>{r.d(e,{e:()=>p,F:()=>y});var n=r("JnTtTRmZ"),o=r.n(n),i=r("YPyIcTeH"),a=r.n(i),c=r("rkoyttmq"),l=r("OqsMdpSm"),s=r("6KAdqMq6"),u=r("0wQfx7YJ"),f=r("4af3+9mh"),m=r("xc00RsLr"),p=(0,m.ei)("core.Extractors",(function(){return o().createActions({list:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},save:{asyncResult:!0},update:{asyncResult:!0},delete:{asyncResult:!0},order:{asyncResult:!0},import:{}})}));function d(t){var e={};t.converters.forEach((function(t){e[t.type]=t.config}));var r=t.condition_type&&"none"!==t.condition_type?t.condition_value:"";return{title:t.title,cut_or_copy:t.cursor_strategy||"copy",source_field:t.source_field,target_field:t.target_field,extractor_type:t.type||t.extractor_type,extractor_config:t.extractor_config,converters:e,condition_type:t.condition_type||"none",condition_value:r,order:t.order}}var y=(0,m.dS)("core.Extractors",(function(){return o().createStore({listenables:[p],sourceUrl:"/system/inputs/",extractors:void 0,extractor:void 0,init:function(){this.trigger({extractors:this.extractors,extractor:this.extractor})},list:function(t){var e=this,r=(0,l.ZP)("GET",u.DC(u.em(this.sourceUrl,t,"extractors")));r.then((function(t){e.extractors=t.extractors,e.trigger({extractors:e.extractors})})),p.list.promise(r)},new:function(t,e){if(-1===s.Z.EXTRACTOR_TYPES.indexOf(t))throw new Error("Invalid extractor type provided: ".concat(t));return{type:t,source_field:e,converters:[],extractor_config:{},target_field:""}},get:function(t,e){var r=this,n=(0,l.ZP)("GET",u.DC(u.em(this.sourceUrl,t,"extractors",e)));n.then((function(t){r.extractor=t,r.trigger({extractor:r.extractor})})),p.get.promise(n)},save:function(t,e){var r;r=e.id?this.update(t,e,!0):this.create(t,e,!0),p.save.promise(r)},_silentExtractorCreate:function(t,e){var r=u.DC(c.Z.ExtractorsController.create(t).url);return(0,l.ZP)("POST",r,d(e))},create:function(t,e,r){var n=this,o=this._silentExtractorCreate(t,e);return o.then((function(){f.Z.success("Extractor ".concat(e.title," created successfully")),n.extractor&&p.get.triggerPromise(t,e.id)})).catch((function(t){f.Z.error("Creating extractor failed: ".concat(t),"Could not create extractor")})),r||p.create.promise(o),o},update:function(t,e,r){var n=this,o=u.DC(c.Z.ExtractorsController.update(t,e.id).url),i=(0,l.ZP)("PUT",o,d(e));return i.then((function(){f.Z.success('Extractor "'.concat(e.title,'" updated successfully')),n.extractor&&p.get.triggerPromise(t,e.id)})).catch((function(t){f.Z.error("Updating extractor failed: ".concat(t),"Could not update extractor")})),r||p.update.promise(i),i},delete:function(t,e){var r=this,n=u.DC(c.Z.ExtractorsController.delete(t,e.id).url),o=(0,l.ZP)("DELETE",n);o.then((function(){f.Z.success('Extractor "'.concat(e.title,'" deleted successfully')),r.extractors&&p.list.triggerPromise(t)})).catch((function(t){f.Z.error("Deleting extractor failed: ".concat(t),"Could not delete extractor ".concat(e.title))})),p.delete.promise(o)},order:function(t,e){var r=this,n=u.DC(c.Z.ExtractorsController.order(t).url),o={};e.forEach((function(t,e){return o[e]=t.id}));var i=(0,l.ZP)("POST",n,{order:o});i.then((function(){f.Z.success("Extractor positions updated successfully"),r.extractors&&p.list.triggerPromise(t)})),i.catch((function(t){f.Z.error("Changing extractor positions failed: ".concat(t),"Could not update extractor positions")})),p.order.promise(i)},import:function(t,e){var r=this,n=0,o=0,i=[];e.forEach((function(e){var a=r._silentExtractorCreate(t,e);a.then((function(){return n++})).catch((function(){return o++})),i.push(a)})),a().settle(i).then((function(){0===o?f.Z.success("Import results: ".concat(n," extractor(s) imported."),"Import operation successful"):f.Z.warning("Import results: ".concat(n," extractor(s) imported, ").concat(o," error(s)."),"Import operation completed")}))}})}))}}]);
//# sourceMappingURL=b6fe2bb5-1442.fa4caae3f80bc0c9381c.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy