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

web-interface.assets.b6fe2bb5-7355.bc9b2c3113b7782e0d9e.js Maven / Gradle / Ivy

"use strict";(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["b6fe2bb5-7355"],{s3k1XyJR:(e,t,n)=>{n.d(t,{uA:()=>c,zB:()=>u,Oi:()=>h,Go:()=>b});var r=n("ii0bleBb"),i=n.n(r),o=(i().shape({max_index_retention_period:i().string}),i().exact({type:i().string.isRequired,max_size:i().number.isRequired})),a=i().exact({type:i().string.isRequired,max_docs_per_index:i().number.isRequired}),s=i().exact({type:i().string.isRequired,rotation_period:i().string.isRequired,max_rotation_period:i().string,rotate_empty_index_set:i().bool}),c=i().oneOfType([o,a,s]),u=(i().string,i().exact({type:i().string.isRequired,max_number_of_indices:i().number,index_action:i().string})),l=i().exact({type:i().string.isRequired}),d=i().exact({type:i().string.isRequired,enum:i().arrayOf(i().string).isRequired}),m=i().exact({rotation_period:l,max_rotation_period:l,type:l.isRequired,max_size:l,max_docs_per_index:l,rotate_empty_index_set:l}),f=i().exact({type:i().string,id:i().string,properties:m.isRequired}),p=i().exact({max_number_of_indices:l.isRequired,type:l.isRequired,index_action:d}),y=i().exact({type:i().string,id:i().string,properties:p}),h=i().exact({type:i().string.isRequired,default_config:c.isRequired,json_schema:f.isRequired}),b=i().exact({type:i().string.isRequired,default_config:u.isRequired,json_schema:y.isRequired})},AMN5KEYp:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ye});var r=n("Z7aTuO5B"),i=n("D4SbLiE/"),o=n.n(i),a=n("JnTtTRmZ"),s=n.n(a),c=n("Mr++nPjW"),u=n("ii0bleBb"),l=n.n(u),d=n("MmvwRkvx"),m=n("AdUszsMQ"),f=n("YyiN4DLW"),p=n("90OB3LhT");function y(e){return y="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},y(e)}function h(e,t){for(var n=0;n0){var n=e.indexSets.find((function(e){return e.default}));n&&(t=n.id)}return{title:e.stream.title,description:e.stream.description,removeMatchesFromDefaultStream:e.stream.remove_matches_from_default_stream,indexSetId:t}},R=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&&b(e,t)}(a,e);var t,n,i,o=S(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),x(v(t=o.call(this,e)),"_resetValues",(function(){t.setState(E(t.props))})),x(v(t),"_onSubmit",(function(){var e=t.state,n=e.title,r=e.description,i=e.removeMatchesFromDefaultStream,o=e.indexSetId,a=t.props;(0,a.onSubmit)(a.stream.id,{title:n,description:r,remove_matches_from_default_stream:i,index_set_id:o}),t.modal.close()})),x(v(t),"open",(function(){t._resetValues(),p.p1.list(!1),t.modal.open()})),x(v(t),"close",(function(){t.modal.close()})),x(v(t),"_formatSelectOptions",(function(){return t.props.indexSets.filter((function(e){return e.can_be_default})).map((function(e){return{value:e.id,label:e.title}}))})),x(v(t),"_onIndexSetSelect",(function(e){t.setState({indexSetId:e})})),x(v(t),"handleChange",(function(e){var n={};n[e.target.name]=f.n6(e.target),t.setState(n)})),x(v(t),"_indexSetSelect",(function(){var e=t.state.indexSetId;return t.props.indexSets?r.createElement(c.II,{id:"index-set-selector",label:"Index Set",help:"Messages that match this stream will be written to the configured index set."},r.createElement(m.Ph,{inputId:"index-set-selector",placeholder:"Select index set",options:t._formatSelectOptions(),matchProp:"label",onChange:t._onIndexSetSelect,value:e})):r.createElement(m.$j,null,"Loading index sets...")})),t.state=E(e),t.modal=void 0,t}return t=a,(n=[{key:"render",value:function(){var e=this,t=this.state,n=t.title,i=t.description,o=t.removeMatchesFromDefaultStream,a=this.props.title;return r.createElement(d.Z,{ref:function(t){e.modal=t},title:a,onSubmitForm:this._onSubmit,submitButtonText:"Save"},r.createElement(c.II,{id:"Title",type:"text",required:!0,label:"Title",name:"title",value:n,onChange:this.handleChange,placeholder:"A descriptive name of the new stream",autoFocus:!0}),r.createElement(c.II,{id:"Description",type:"text",label:"Description",name:"description",value:i,onChange:this.handleChange,placeholder:"What kind of messages are routed into this stream?"}),this._indexSetSelect(),r.createElement(c.II,{id:"RemoveFromDefaultStream",type:"checkbox",label:"Remove matches from ‘All messages’ stream",name:"removeMatchesFromDefaultStream",checked:o,onChange:this.handleChange,help:r.createElement("span",null,"Remove messages that match this stream from the ‘All messages’ stream which is assigned to every message by default.")}))}}])&&h(t.prototype,n),i&&h(t,i),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Component);x(R,"propTypes",{onSubmit:l().func.isRequired,stream:l().object,title:l().string.isRequired,indexSets:l().array.isRequired}),x(R,"defaultProps",{stream:{title:"",description:"",remove_matches_from_default_stream:!1}});const w=R;function O(e){return O="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},O(e)}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var e=this.props.streams.map(this._formatStream);return r.createElement(Ze,null,e)}return r.createElement(c.bZ,{bsStyle:"info"},r.createElement(m.JO,{name:"info-circle"})," No streams match your search filter.")}});function Ae(e){return Ae="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},Ae(e)}function Ie(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 Me(e){for(var t=1;t{n.d(t,{wv:()=>f,p1:()=>p,Fp:()=>y});var r=n("JnTtTRmZ"),i=n.n(r),o=n("ii0bleBb"),a=n.n(o),s=n("rkoyttmq"),c=n("OqsMdpSm"),u=n("0wQfx7YJ"),l=n("4af3+9mh"),d=n("xc00RsLr"),m=n("s3k1XyJR"),f=a().shape({can_be_default:a().bool,id:a().string,title:a().string,description:a().string.isRequired,index_prefix:a().string.isRequired,shards:a().number.isRequired,replicas:a().number.isRequired,rotation_strategy_class:a().string.isRequired,rotation_strategy:m.uA.isRequired,retention_strategy_class:a().string.isRequired,retention_strategy:m.zB.isRequired,creation_date:a().string,index_analyzer:a().string.isRequired,index_optimization_max_num_segments:a().number.isRequired,index_optimization_disabled:a().bool.isRequired,field_type_refresh_interval:a().number.isRequired,index_template_type:a().string,writable:a().bool.isRequired,default:a().bool.isRequired}),p=(0,d.ei)("core.IndexSets",(function(){return i().createActions({list:{asyncResult:!0},listPaginated:{asyncResult:!0},get:{asyncResult:!0},update:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},setDefault:{asyncResult:!0},stats:{asyncResult:!0}})})),y=(0,d.dS)("core.IndexSets",(function(){return i().createStore({listenables:[p],indexSetsCount:void 0,indexSets:void 0,indexSetStats:void 0,indexSet:void 0,getInitialState:function(){return{indexSetsCount:this.indexSetsCount,indexSets:this.indexSets,indexSetStats:this.indexSetStats}},list:function(e){var t=this,n=(0,u.DC)(s.Z.IndexSetsApiController.list(e).url),r=(0,c.ZP)("GET",n);r.then((function(e){return t.trigger({indexSetsCount:e.total,indexSets:e.index_sets,indexSetStats:e.stats})}),(function(e){l.Z.error("Fetching index sets list failed: ".concat(e.message),"Could not retrieve index sets.")})),p.list.promise(r)},listPaginated:function(e,t,n){var r=this,i=(0,u.DC)(s.Z.IndexSetsApiController.listPaginated(e,t,n).url),o=(0,c.ZP)("GET",i);o.then((function(e){return r.trigger({indexSetsCount:e.total,indexSets:e.index_sets,indexSetStats:e.stats})}),(function(e){l.Z.error("Fetching index sets list failed: ".concat(r._errorMessage(e)),"Could not retrieve index sets.")})),p.listPaginated.promise(o)},get:function(e){var t=this,n=(0,u.DC)(s.Z.IndexSetsApiController.get(e).url),r=(0,c.ZP)("GET",n);r.then((function(e){return t.trigger({indexSet:e}),e}),(function(n){l.Z.error("Fetching index set '".concat(e,"' failed with status: ").concat(t._errorMessage(n)),"Could not retrieve index set.")})),p.get.promise(r)},update:function(e){var t=this,n=(0,u.DC)(s.Z.IndexSetsApiController.get(e.id).url),r=(0,c.ZP)("PUT",n,e);r.then((function(n){return l.Z.success("Successfully updated index set '".concat(e.title,"'"),"Success"),t.trigger({indexSet:n}),n}),(function(n){l.Z.error("Updating index set '".concat(e.title,"' failed with status: ").concat(t._errorMessage(n)),"Could not update index set.")})),p.update.promise(r)},create:function(e){var t=this,n=(0,u.DC)(s.Z.IndexSetsApiController.create().url),r=(0,c.ZP)("POST",n,e);r.then((function(n){return l.Z.success("Successfully created index set '".concat(e.title,"'"),"Success"),t.trigger({indexSet:n}),n}),(function(n){l.Z.error("Creating index set '".concat(e.title,"' failed with status: ").concat(t._errorMessage(n)),"Could not create index set.")})),p.create.promise(r)},delete:function(e,t){var n=this,r=(0,u.DC)(s.Z.IndexSetsApiController.delete(e.id,t).url),i=(0,c.ZP)("DELETE",r);i.then((function(){l.Z.success("Successfully deleted index set '".concat(e.title,"'"),"Success")}),(function(t){l.Z.error("Deleting index set '".concat(e.title,"' failed with status: ").concat(n._errorMessage(t)),"Could not delete index set.")})),p.delete.promise(i)},setDefault:function(e){var t=this,n=(0,u.DC)(s.Z.IndexSetsApiController.setDefault(e.id).url),r=(0,c.ZP)("PUT",n);r.then((function(){l.Z.success("Successfully set index set '".concat(e.title,"' as default"),"Success")}),(function(n){l.Z.error("Setting index set '".concat(e.title,"' as default failed with status: ").concat(t._errorMessage(n)),"Could not set default index set.")})),p.setDefault.promise(r)},stats:function(){var e=this,t=(0,u.DC)(s.Z.IndexSetsApiController.stats().url),n=(0,c.ZP)("GET",t);n.then((function(t){return e.trigger({globalIndexSetStats:{indices:t.indices,documents:t.documents,size:t.size}})}),(function(e){l.Z.error("Fetching global index stats failed: ".concat(e.message),"Could not retrieve global index stats.")})),p.stats.promise(n)},_errorMessage:function(e){try{return e.additional.body.message}catch(t){return e.message}}})}))}}]);
//# sourceMappingURL=b6fe2bb5-7355.bc9b2c3113b7782e0d9e.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy