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

web-interface.assets.b6fe2bb5-9221.2513b87fd30b643e509b.js Maven / Gradle / Ivy

"use strict";(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["b6fe2bb5-9221"],{sj4Vma9e:(t,e,r)=>{r.r(e),r.d(e,{default:()=>S});var o=r("ii0bleBb"),n=r.n(o),c=r("Z7aTuO5B"),a=r("D4SbLiE/"),i=r.n(a),s=r("JnTtTRmZ"),u=r.n(s),l=r("AdUszsMQ"),f=r("Mr++nPjW"),p=r("4af3+9mh"),d=r("OjsYU8Qj");function m(t){return m="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},m(t)}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var r=0;r{r.d(e,{e:()=>d,F:()=>y});var o=r("JnTtTRmZ"),n=r.n(o),c=r("YPyIcTeH"),a=r.n(c),i=r("rkoyttmq"),s=r("OqsMdpSm"),u=r("6KAdqMq6"),l=r("0wQfx7YJ"),f=r("4af3+9mh"),p=r("xc00RsLr"),d=(0,p.ei)("core.Extractors",(function(){return n().createActions({list:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},save:{asyncResult:!0},update:{asyncResult:!0},delete:{asyncResult:!0},order:{asyncResult:!0},import:{}})}));function m(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,p.dS)("core.Extractors",(function(){return n().createStore({listenables:[d],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,s.ZP)("GET",l.DC(l.em(this.sourceUrl,t,"extractors")));r.then((function(t){e.extractors=t.extractors,e.trigger({extractors:e.extractors})})),d.list.promise(r)},new:function(t,e){if(-1===u.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,o=(0,s.ZP)("GET",l.DC(l.em(this.sourceUrl,t,"extractors",e)));o.then((function(t){r.extractor=t,r.trigger({extractor:r.extractor})})),d.get.promise(o)},save:function(t,e){var r;r=e.id?this.update(t,e,!0):this.create(t,e,!0),d.save.promise(r)},_silentExtractorCreate:function(t,e){var r=l.DC(i.Z.ExtractorsController.create(t).url);return(0,s.ZP)("POST",r,m(e))},create:function(t,e,r){var o=this,n=this._silentExtractorCreate(t,e);return n.then((function(){f.Z.success("Extractor ".concat(e.title," created successfully")),o.extractor&&d.get.triggerPromise(t,e.id)})).catch((function(t){f.Z.error("Creating extractor failed: ".concat(t),"Could not create extractor")})),r||d.create.promise(n),n},update:function(t,e,r){var o=this,n=l.DC(i.Z.ExtractorsController.update(t,e.id).url),c=(0,s.ZP)("PUT",n,m(e));return c.then((function(){f.Z.success('Extractor "'.concat(e.title,'" updated successfully')),o.extractor&&d.get.triggerPromise(t,e.id)})).catch((function(t){f.Z.error("Updating extractor failed: ".concat(t),"Could not update extractor")})),r||d.update.promise(c),c},delete:function(t,e){var r=this,o=l.DC(i.Z.ExtractorsController.delete(t,e.id).url),n=(0,s.ZP)("DELETE",o);n.then((function(){f.Z.success('Extractor "'.concat(e.title,'" deleted successfully')),r.extractors&&d.list.triggerPromise(t)})).catch((function(t){f.Z.error("Deleting extractor failed: ".concat(t),"Could not delete extractor ".concat(e.title))})),d.delete.promise(n)},order:function(t,e){var r=this,o=l.DC(i.Z.ExtractorsController.order(t).url),n={};e.forEach((function(t,e){return n[e]=t.id}));var c=(0,s.ZP)("POST",o,{order:n});c.then((function(){f.Z.success("Extractor positions updated successfully"),r.extractors&&d.list.triggerPromise(t)})),c.catch((function(t){f.Z.error("Changing extractor positions failed: ".concat(t),"Could not update extractor positions")})),d.order.promise(c)},import:function(t,e){var r=this,o=0,n=0,c=[];e.forEach((function(e){var a=r._silentExtractorCreate(t,e);a.then((function(){return o++})).catch((function(){return n++})),c.push(a)})),a().settle(c).then((function(){0===n?f.Z.success("Import results: ".concat(o," extractor(s) imported."),"Import operation successful"):f.Z.warning("Import results: ".concat(o," extractor(s) imported, ").concat(n," error(s)."),"Import operation completed")}))}})}))}}]);
//# sourceMappingURL=b6fe2bb5-9221.2513b87fd30b643e509b.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy