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

web-interface.assets.1255d548-3668.525adc6179220a48b5b0.js Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["1255d548-3668"],{hVkUd7xY:(H,L,n)=>{n.d(L,{Z:()=>ne});var S=n("ii0bleBb"),l=n.n(S),i=n("Z7aTuO5B"),e=n("UiXZqrDE"),c=n("J6y4/h8P"),y=n("QL8i6bcz"),d=n("aHNeFNVd"),v=n("uZqmR+ju"),U=n("/GOzvPf6"),T=n("Ku7G6vFc");const u=(f,s)=>s in f,C=c.default.h3`
  margin-bottom: 10px;
`,g=(0,c.default)(U.Ph)`
  margin-bottom: 10px;
`,N=(0,c.default)(v.Alert)`
  overflow: auto;
  margin-right: 15px;
  margin-left: 15px;
`,a=(f,s)=>{const h=s.filter(I=>I.type===f)[0];return h?h.json_schema:void 0},b=(f,s)=>{const h=s.filter(I=>I.type===f)[0];return h?h.default_config:void 0},p=(f,s)=>{const h=b(d.Bh,s);return{...f,max_rotation_period:h==null?void 0:h.max_rotation_period}},$=(f,s,h,I,P)=>s===d.zG&&f==="retention"?I:h===s?h===d.Bh?p(I,P):I:b(s,P),V=(f,s,h,I,P,D,K,Z)=>{if(!s||s.length<1)return null;const F=h.filter(z=>z.type===s)[0];if(!F)return null;const w=typeof P=="string"?P:P.type;let Y={config:$(f,s,w,D,I),jsonSchema:a(s,I),updateConfig:K};s===d.Xd&&(Y={...Y,useMaxNumberOfIndices:Z});const X=i.createElement(F.configComponent,Y);return i.createElement("span",{key:w},X)},W=({title:f,name:s,description:h,selectPlaceholder:I,pluginExports:P,strategies:D,retentionStrategiesContext:{max_index_retention_period:K},activeConfig:{strategy:Z,config:F},getState:w})=>{const[j,Y]=(0,i.useState)(Z),{setValues:X,values:z,values:{rotation_strategy:oe,rotation_strategy_class:Q,retention_strategy_class:se}}=(0,e.useFormikContext)(),[ae,q]=(0,T.v)().useMaxNumberOfIndices;(0,i.useEffect)(()=>{F&&u(F,"max_number_of_indices")&&q(F.max_number_of_indices)},[F,q]);const ie=se!==d.mF,le=se!==d.Xd,pe=K&&Q===d.Bh&&ie,k=Q===d.zG,_e=k&&s==="retention"&&ie,A=!k||s==="retention"&&(!ie||!le),de=k&&s==="rotation"?"The Time Based Size Optimizing Rotation Strategy tries to rotate the index daily. It can however skip the rotation to achieve optimal sized indices by keeping the shard size between 20 and 50 GB. The optimization can delay the rotation within the range of the configured retention min/max lifetime. If an index is older than the range between min/max, it will be rotated regardless of its current size.":null,ee=O=>{if(!O||O.length<1){Y(void 0);return}const o=$(s,O,Z,F,D);Y(O),X({...z,...w(O,o)})},ce=(0,i.useCallback)(O=>{const t=((r,m)=>{const R=D.filter(E=>E.type===r)[0],_=m;return R&&(_.type=R.default_config.type),_})(j,O);X({...z,...w(j,t)})},[w,j,X,D,z]),re=(0,i.useCallback)(O=>{k&&X({...z,rotation_strategy_class:Q,rotation_strategy:{...O,type:d.dp}})},[k,Q,X,z]),me=()=>{const O=P.filter(t=>D.find(({type:r})=>r===t.type));return O.filter(t=>t.type===j).length>0?O.map(t=>({value:t.type,label:t.displayName})):[...O,P.find(t=>t.type===j)].map(t=>({value:t.type,label:t.displayName}))},ye=()=>P.find(O=>O.type===j).displayName,te=()=>j,ue=()=>s===d.Xt&&!a(te(),D);return i.createElement("span",null,i.createElement(C,null,f),h&&i.createElement(N,null,h),de&&i.createElement(N,null,de),pe&&i.createElement(N,{bsStyle:"warning"},"The effective retention period value calculated from the",i.createElement("b",null,"Rotation period")," and the ",i.createElement("b",null,"max number of indices")," should not be greater than the",i.createElement("b",null,"Max retention period ")," of ",i.createElement("b",null,K)," set by the Administrator."),ue()&&i.createElement(N,{bsStyle:"danger"},ye()," strategy was deactivated. Please configure a valid retention strategy."),i.createElement(v.Row,null,i.createElement(v.Col,{md:12},i.createElement(v.Input,{id:"strategy-select",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",label:I},i.createElement(g,{placeholder:I,options:me(),matchProp:"label",value:te(),onChange:ee,clearable:!1})))),i.createElement(v.Row,null,i.createElement(v.Col,{md:12},_e&&V(s,d.zG,y.G.exports("indexRotationConfig"),[oe],oe,oe,re,()=>[ae,q]),A&&V(s,te(),P,D,Z,F,ce,()=>[ae,q]))))};W.propTypes={title:l().string.isRequired,name:l().string.isRequired,description:l().string,selectPlaceholder:l().string.isRequired,pluginExports:l().array.isRequired,strategies:l().array.isRequired,retentionStrategiesContext:l().shape({max_index_retention_period:l().string}),activeConfig:l().object.isRequired,getState:l().func.isRequired},W.defaultProps={description:void 0,retentionStrategiesContext:{max_index_retention_period:void 0}};const ne=W},"PSa/+Uus":(H,L,n)=>{n.d(L,{Z:()=>T});var S=n("ii0bleBb"),l=n.n(S),i=n("Z7aTuO5B"),e=n("uZqmR+ju"),c=n("dsvqAVKU"),y=Object.defineProperty,d=(u,C,g)=>C in u?y(u,C,{enumerable:!0,configurable:!0,writable:!0,value:g}):u[C]=g,v=(u,C,g)=>(d(u,typeof C!="symbol"?C+"":C,g),g);class U extends i.Component{render(){if(!this.props.config)return i.createElement(c.Z,null);const C=this.props.config.strategy,g=this.props.pluginExports.filter(a=>a.type===C)[0];if(!g||!g.summaryComponent)return i.createElement(e.Alert,{bsStyle:"danger"},"Summary for strategy ",C," not found!");const N=i.createElement(g.summaryComponent,{config:this.props.config.config});return i.createElement("span",{key:g.type},N)}}v(U,"propTypes",{config:l().object.isRequired,pluginExports:l().array.isRequired});const T=U},Ku7G6vFc:(H,L,n)=>{n.d(L,{Z:()=>e,v:()=>i});var S=n("Z7aTuO5B");const l=S.createContext(null),i=()=>{try{const c=(0,S.useContext)(l);if(!c)throw new Error("useIndexRetention must be used within a IndexRetentionProvider");return c}catch{return{useMaxNumberOfIndices:[9999,()=>{}]}}},e=l},"zJwTQ5+g":(H,L,n)=>{n.d(L,{Z:()=>e});var S=n("Z7aTuO5B"),l=n("Ku7G6vFc");const e=({children:c})=>{const[y,d]=(0,S.useState)(void 0),v=(0,S.useMemo)(()=>({useMaxNumberOfIndices:[y,d]}),[y]);return S.createElement(l.Z.Provider,{value:v},c)}},aozvvWC3:(H,L,n)=>{var S=n("QL8i6bcz"),l=n("ii0bleBb"),i=n.n(l),e=n("Z7aTuO5B"),c=n("S6FuRS7B"),y=n("uZqmR+ju"),d=n("Ku7G6vFc");const v=({updateConfig:f})=>{const[s,h]=(0,d.v)().useMaxNumberOfIndices,I=P=>D=>{const K={},Z=(0,c.n6)(D.target);K[P]=Z,h(Z),f(K)};return e.createElement("div",null,e.createElement(y.Input,{type:"number",id:"max-number-of-indices",label:"Max number of indices",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",onChange:I("max_number_of_indices"),value:s,help:e.createElement("span",null,"Maximum number of indices to keep before ",e.createElement("strong",null,"deleting")," the oldest ones"),required:!0}))};v.propTypes={updateConfig:i().func.isRequired};const U=v,T=({config:f})=>e.createElement("div",null,e.createElement("dl",null,e.createElement("dt",null,"Index retention strategy:"),e.createElement("dd",null,"Delete"),e.createElement("dt",null,"Max number of indices:"),e.createElement("dd",null,f.max_number_of_indices)));T.propTypes={config:i().object.isRequired};const u=T,C=({updateConfig:f})=>{const[s,h]=(0,d.v)().useMaxNumberOfIndices,I=P=>D=>{const K={},Z=(0,c.n6)(D.target);K[P]=Z,h(Z),f(K)};return e.createElement("div",null,e.createElement(y.Input,{type:"number",id:"max-number-of-indices",label:"Max number of indices",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",onChange:I("max_number_of_indices"),value:s,help:e.createElement("span",null,"Maximum number of indices to keep before ",e.createElement("strong",null,"closing")," the oldest ones"),required:!0}))};C.propTypes={updateConfig:i().func.isRequired};const g=C,N=({config:f})=>e.createElement("div",null,e.createElement("dl",null,e.createElement("dt",null,"Index retention strategy:"),e.createElement("dd",null,"Close"),e.createElement("dt",null,"Max number of indices:"),e.createElement("dd",null,f.max_number_of_indices)));N.propTypes={config:i().object.isRequired};const a=N;var b=n("J6y4/h8P");const p=(0,b.default)(y.Alert)`
  overflow: auto;
  margin-right: 15px;
  margin-left: 15px;
`,V=()=>e.createElement(p,null,"This retention strategy is not configurable because it does not do anything."),ne=()=>e.createElement("div",null,e.createElement("dl",null,e.createElement("dt",null,"Index retention strategy:"),e.createElement("dd",null,"Do nothing")));S.G.register(new S.h({},{indexRetentionConfig:[{type:"org.graylog2.indexer.retention.strategies.DeletionRetentionStrategy",displayName:"Delete Index",configComponent:U,summaryComponent:u},{type:"org.graylog2.indexer.retention.strategies.ClosingRetentionStrategy",displayName:"Close Index",configComponent:g,summaryComponent:a},{type:"org.graylog2.indexer.retention.strategies.NoopRetentionStrategy",displayName:"Do nothing",configComponent:V,summaryComponent:ne}]}))},"g0VYa/Z8":(H,L,n)=>{var S=n("QL8i6bcz"),l=n("ii0bleBb"),i=n.n(l),e=n("Z7aTuO5B"),c=n("S6FuRS7B"),y=n("uZqmR+ju");const d=({config:o,updateConfig:t})=>{const{max_docs_per_index:r}=o,[m,R]=(0,e.useState)(r),_=E=>x=>{const M={},G=(0,c.n6)(x.target);M[E]=G,R(G),t(M)};return e.createElement("div",null,e.createElement(y.Input,{type:"number",id:"max-docs-per-index",label:"Max documents per index",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",onChange:_("max_docs_per_index"),value:m,help:"Maximum number of documents in an index before it gets rotated",required:!0}))};d.propTypes={config:i().object.isRequired,updateConfig:i().func.isRequired};const v=d,U=({config:o})=>e.createElement("div",null,e.createElement("dl",null,e.createElement("dt",null,"Index rotation strategy:"),e.createElement("dd",null,"Message Count"),e.createElement("dt",null,"Max docs per index:"),e.createElement("dd",null,o.max_docs_per_index)));U.propTypes={config:i().object.isRequired};const T=U;var u=n("zkmy/ViL");const C=({config:o,updateConfig:t})=>{const{max_size:r}=o,[m,R]=(0,e.useState)(r),_=x=>M=>{const G={},ge=(0,c.n6)(M.target);G[x]=ge,R(ge),t(G)},E=()=>u.Z.formatBytes(m);return e.createElement("div",null,e.createElement(y.Input,{type:"number",id:"max-size",label:"Max size per index (in bytes)",onChange:_("max_size"),labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",value:m,help:"Maximum size of an index before it gets rotated",addonAfter:E(),required:!0}))};C.propTypes={config:i().object.isRequired,updateConfig:i().func.isRequired};const g=C,N=({config:o})=>{const{max_size:t}=o;return e.createElement("div",null,e.createElement("dl",null,e.createElement("dt",null,"Index rotation strategy:"),e.createElement("dd",null,"Index Size"),e.createElement("dt",null,"Max index size:"),e.createElement("dd",null,t," bytes (",u.Z.formatBytes(t),")")))};N.propTypes={config:i().object.isRequired};const a=N;var b=n("9oVghaOd"),p=n.n(b),$=Object.defineProperty,V=(o,t,r)=>t in o?$(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,W=(o,t,r)=>(V(o,typeof t!="symbol"?t+"":t,r),r);const ne=(o,t)=>o<=p().duration(t).asMilliseconds();class f extends e.Component{constructor(t){super(t),W(this,"inputs",{}),W(this,"_onPeriodUpdate",_=>{const{updateConfig:E}=this.props;return()=>{const x={};let M=this.inputs[_].getValue().toUpperCase();M.startsWith("P")||(M=`P${M}`),x[_]=M,this.setState(x),this._isValidPeriod(x[_])&&E({rotation_period:M,rotate_empty_index_set:this.state.rotate_empty_index_set})}}),W(this,"_onRotateEmptyIndexSetUpdate",_=>{const{updateConfig:E}=this.props;return()=>{const x={},M=this.inputs[_].getValue();x[_]=M,this.setState(x),E({rotation_period:this.state.rotation_period,rotate_empty_index_set:M})}}),W(this,"_isValidPeriod",_=>{const{rotation_period:E,rotationLimit:x}=this.state,M=_||E,G=p().duration(M).asMilliseconds();return G>=36e5&&(x?ne(G,x):!0)}),W(this,"_validationState",()=>{if(!this._isValidPeriod())return"error"}),W(this,"_formatDuration",()=>{const{rotation_period:_,rotationLimit:E}=this.state,x=E?` and max ${p().duration(E).humanize()}`:"";return this._isValidPeriod()?p().duration(_).humanize():`invalid (min 1 hour${x})`});const{config:{rotation_period:r,max_rotation_period:m,rotate_empty_index_set:R}}=this.props;this.state={rotation_period:r,rotationLimit:m,rotate_empty_index_set:R}}render(){const{rotation_period:t,rotate_empty_index_set:r,rotationLimit:m}=this.state,R=m?` The max rotation period is set to ${p().duration(m).humanize()} by Administrator.`:"";return e.createElement("div",null,e.createElement(y.Input,{id:"rotation-period",type:"text",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",ref:_=>{this.inputs.rotation_period=_},label:"Rotation period (ISO8601 Duration)",onChange:this._onPeriodUpdate("rotation_period"),value:t,help:`How long an index gets written to before it is rotated. (i.e. "P1D" for 1 day, "PT6H" for 6 hours).${R}`,addonAfter:this._formatDuration(),bsStyle:this._validationState(),required:!0}),e.createElement(y.Input,{id:"rotate-empty-index-sets",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",label:"Empty index set"},e.createElement(y.Input,{id:"rotate-empty-index-sets-checkbox",type:"checkbox",ref:_=>{this.inputs.rotate_empty_index_set=_},label:"Rotate empty index set",onChange:this._onRotateEmptyIndexSetUpdate("rotate_empty_index_set"),checked:r,help:"Apply the rotation strategy even when the index set is empty (not recommended)."})))}}W(f,"propTypes",{config:i().object.isRequired,updateConfig:i().func.isRequired});const s=f;var h=n("gtXNkEXl"),I=Object.defineProperty,P=(o,t,r)=>t in o?I(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,D=(o,t,r)=>(P(o,typeof t!="symbol"?t+"":t,r),r);class K extends e.Component{constructor(){super(...arguments),D(this,"_humanizedPeriod",()=>{const t=p().duration(this.props.config.rotation_period);return`${t.format()}, ${t.humanize()}`})}render(){return e.createElement("div",null,e.createElement("dl",null,e.createElement("dt",null,"Index rotation strategy:"),e.createElement("dd",null,"Index Time"),e.createElement("dt",null,"Rotation period:"),e.createElement("dd",null,this.props.config.rotation_period," (",this._humanizedPeriod(),")"),e.createElement("dt",null,"Rotate empty index set:"),e.createElement("dd",null,this.props.config.rotate_empty_index_set?"Yes":"No")))}}D(K,"propTypes",{config:i().object.isRequired});const Z=K;var F=n("8fnsnG21"),w=n("vJyCiK5D");const Y=()=>{const{retentionStrategiesContext:o}=(0,F.o)(w.X),t=o==null?void 0:o.max_index_retention_period;return(0,e.useEffect)(()=>{w.A.loadRetentionStrategies()},[]),t};var X=n("+tRdaXwG"),z=n("J6y4/h8P"),oe=n("ys/4WHo5");const Q=(0,z.default)(X.Z)(({theme:o})=>(0,z.css)`
  width: 100%;
  height: 10px;
  margin: ${o.spacings.md} 0;
`),se=z.default.div(({theme:o})=>(0,z.css)`
  height: auto;
  min-height: 25px;
  line-height: 25px;
  width: auto;
  min-width: 25px;
  text-align: center;
  background-color: #5082bc;
  color: ${o.colors.input.color};
  border-radius: 50%;
  cursor: grab;
  top: -5px;
`),ae=(o,t)=>{const r=e.createElement(y.Tooltip,{id:`${t.valueNow}-tooltip`,show:!0},t.valueNow);return e.createElement(se,{...o,className:`${t.valueNow}-tooltip`},e.createElement(oe.Z,{placement:"top",trigger:"hover",overlay:r,rootClose:!0},e.createElement("span",{className:"value"},t.valueNow)))},q=z.default.div(({theme:o})=>(0,z.css)`
  top: ${o.spacings.xxs};
  bottom: 0;
  background: ${t=>t.index===1?"#5082bc":o.colors.variant.default};
  border-radius: 999px;
`),ie=(o,t)=>e.createElement(q,{...o,index:t.index}),le=({id:o,label:t,help:r,error:m,bsStyle:R,labelClassName:_,wrapperClassName:E,...x})=>e.createElement(y.Input,{labelClassName:_,id:o,wrapperClassName:E,help:r,bsStyle:R,error:m,label:t},e.createElement(Q,{renderTrack:ie,renderThumb:ae,className:m,...x}));le.defaultProps={label:void 0,help:void 0,error:void 0,bsStyle:void 0,labelClassName:void 0,wrapperClassName:void 0};const pe=le,_e=()=>{const{rotationStrategiesContext:o}=(0,F.o)(w.X),t=o==null?void 0:o.time_size_optimizing_retention_fixed_leeway;return(0,e.useEffect)(()=>{w.A.loadRotationStrategies()},[]),t},A=o=>Math.round(p().duration(o).asDays()),de=(o,t,r)=>r?[A(o),A(o)+A(r)]:[A(o),A(t)],ee=365,ce=(o,t,r)=>o?r?o-r:o:t>=ee?t+ee:ee,re=o=>p().duration(o,"days").toISOString(),me=({config:{index_lifetime_max:o,index_lifetime_min:t},updateConfig:r})=>{const m=_e(),[R,_]=(0,e.useState)(de(t,o,m)),E=Y(),[x,M]=(0,e.useState)(ce(A(E),R[1],A(m))),G=(0,e.useCallback)(B=>B[0]G(B)?null:"error",fe="There needs to be at least 1 day between the minimum and maximum lifetime.",Ee=(B,J)=>{!E&&B<=J&&M(B+ee)},he=B=>{const J=Array.isArray(B)?B:[B,B+A(m)];_(J),Ee(x,J[1]),G(J)&&r({index_lifetime_min:re(J[0]),index_lifetime_max:re(J[1])})},xe=E?` The max rotation period is set to ${A(E)} days by the Administrator.`:"",Se=m?"minimum":"minimum / maximum",Ce=m?` The maximum number of days is ${re(R[1])} because the fixed number of days between min and max is set to ${m}.`:"";return e.createElement("div",null,e.createElement(pe,{label:"Lifetime in days",id:"lifetime-range",labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",value:m?R[0]:R,help:G(R)?`The ${Se} number of days the data in this index is kept before it is retained. ${xe} ${Ce}`:fe,min:1,step:1,bsStyle:ge(R),max:ce(A(E),R[1],A(m)),onAfterChange:B=>he(B)}))};me.propTypes={config:i().object.isRequired,updateConfig:i().func.isRequired};const ye=me;var te=n("/GOzvPf6");const ue=({config:{index_lifetime_max:o,index_lifetime_min:t}})=>{const r=A(t),m=A(o);return e.createElement("div",null,e.createElement("dl",null,e.createElement("dt",null,"Index rotation strategy:"),e.createElement("dd",null,"Index Time Size Optimizing"),e.createElement("dt",null,"Minimum lifetime:"),e.createElement("dd",null,t," (",r," ",e.createElement(te.qX,{singular:"day",plural:"days",value:r})," )"),e.createElement("dt",null,"Maximum lifetime:"),e.createElement("dd",null,o," (",m," ",e.createElement(te.qX,{singular:"day",plural:"days",value:m}),")")))};ue.propTypes={config:i().object.isRequired};const O=ue;S.G.register(new S.h({},{indexRotationConfig:[{type:"org.graylog2.indexer.rotation.strategies.MessageCountRotationStrategy",displayName:"Index Message Count",configComponent:v,summaryComponent:T},{type:"org.graylog2.indexer.rotation.strategies.SizeBasedRotationStrategy",displayName:"Index Size",configComponent:g,summaryComponent:a},{type:"org.graylog2.indexer.rotation.strategies.TimeBasedRotationStrategy",displayName:"Index Time",configComponent:s,summaryComponent:Z},{type:"org.graylog2.indexer.rotation.strategies.TimeBasedSizeOptimizingStrategy",displayName:"Index Time Size Optimizing",configComponent:ye,summaryComponent:O}]}))},vJyCiK5D:(H,L,n)=>{n.d(L,{A:()=>d,X:()=>U});var S=n("JnTtTRmZ"),l=n.n(S),i=n("jAGDuYSC"),e=n("MdYBRjRJ"),c=n("eFxcQyPT"),y=n("IA3Ku5lS");const d=(0,y.ei)("core.IndicesConfiguration",()=>l().createActions({loadRotationStrategies:{asyncResult:!0},loadRetentionStrategies:{asyncResult:!0}})),v="/system/indices",U=(0,y.dS)("core.IndicesConfiguration",()=>l().createStore({listenables:[d],rotationStrategies:void 0,retentionStrategies:void 0,retentionStrategiesContext:void 0,rotationStrategiesContext:void 0,getInitialState(){return{activeRotationConfig:void 0,rotationStrategies:void 0,activeRetentionConfig:void 0,retentionStrategies:void 0,retentionStrategiesContext:void 0}},getState(){return{activeRotationConfig:this.activeRotationConfig,rotationStrategies:this.rotationStrategies,activeRetentionConfig:this.activeRetentionConfig,retentionStrategies:this.retentionStrategies,retentionStrategiesContext:this.retentionStrategiesContext,rotationStrategiesContext:this.rotationStrategiesContext}},_url(T){return e.DC(v+T)},loadRotationStrategies(){const T=(0,c.ZP)("GET",this._url("/rotation/strategies"));T.then(u=>{this.rotationStrategies=u.strategies,this.rotationStrategiesContext=u.context,this.trigger(this.getState())},u=>{i.Z.error(`Fetching rotation strategies failed: ${u}`,"Could not retrieve rotation strategies")}),d.loadRotationStrategies.promise(T)},loadRetentionStrategies(){const T=(0,c.ZP)("GET",this._url("/retention/strategies"));T.then(u=>{this.retentionStrategiesContext=u.context,this.retentionStrategies=u.strategies,this.trigger(this.getState())},u=>{i.Z.error(`Fetching retention strategies failed: ${u}`,"Could not retrieve retention strategies")}),d.loadRetentionStrategies.promise(T)}}))},aHNeFNVd:(H,L,n)=>{n.d(L,{$F:()=>g,Bh:()=>d,Xd:()=>T,Xt:()=>C,b$:()=>N,dp:()=>u,mF:()=>v,zG:()=>U});var S=n("JnTtTRmZ"),l=n.n(S),i=n("MdYBRjRJ"),e=n("U1Iufsob"),c=n("eFxcQyPT"),y=n("IA3Ku5lS");const d="org.graylog2.indexer.rotation.strategies.TimeBasedRotationStrategy",v="org.graylog2.indexer.retention.strategies.NoopRetentionStrategy",U="org.graylog2.indexer.rotation.strategies.TimeBasedSizeOptimizingStrategy",T="org.graylog.plugins.archive.indexer.retention.strategies.ArchiveRetentionStrategy",u="org.graylog2.indexer.rotation.strategies.TimeBasedSizeOptimizingStrategyConfig",C="retention",g=(0,y.ei)("core.Indices",()=>l().createActions({list:{asyncResult:!0},listAll:{asyncResult:!0},close:{asyncResult:!0},delete:{asyncResult:!0},multiple:{asyncResult:!0},reopen:{asyncResult:!0},subscribe:{asyncResult:!1},unsubscribe:{asyncResult:!1}})),N=(0,y.dS)("core.Indices",()=>l().createStore({listenables:[g],indices:void 0,closedIndices:void 0,registrations:{},getInitialState(){return{indices:this.indices,closedIndices:this.closedIndices}},list(a){const b=(0,i.DC)(e.Z.IndicesApiController.list(a).url),p=(0,c.ZP)("GET",b).then($=>(this.indices=$.all.indices,this.closedIndices=$.closed.indices,this.trigger({indices:this.indices,closedIndices:this.closedIndices}),{indices:this.indices,closedIndices:this.closedIndices}));g.list.promise(p)},listAll(){const a=(0,i.DC)(e.Z.IndicesApiController.listAll().url),b=(0,c.ZP)("GET",a).then(p=>(this.indices=p.all.indices,this.closedIndices=p.closed.indices,this.trigger({indices:this.indices,closedIndices:this.closedIndices}),{indices:this.indices,closedIndices:this.closedIndices}));g.listAll.promise(b)},multiple(){const a=Object.keys(this.registrations);if(!a.length)return;const b=(0,i.DC)(e.Z.IndicesApiController.multiple().url),p={indices:a},$=(0,c.vl)("POST",b,p).then(V=>(this.indices=[...this.indices,...V],this.trigger({indices:this.indices,closedIndices:this.closedIndices}),{indices:this.indices,closedIndices:this.closedIndices}));g.multiple.promise($)},close(a){const b=(0,i.DC)(e.Z.IndicesApiController.close(a).url),p=(0,c.ZP)("POST",b);g.close.promise(p)},delete(a){const b=(0,i.DC)(e.Z.IndicesApiController.delete(a).url),p=(0,c.ZP)("DELETE",b);g.delete.promise(p)},reopen(a){const b=(0,i.DC)(e.Z.IndicesApiController.reopen(a).url),p=(0,c.ZP)("POST",b);g.reopen.promise(p)},subscribe(a){this.registrations[a]=this.registrations[a]?this.registrations[a]+1:1},unsubscribe(a){this.registrations[a]=this.registrations[a]>0?this.registrations[a]-1:0,this.registrations[a]===0&&delete this.registrations[a]}}))}}]);})();

//# sourceMappingURL=1255d548-3668.525adc6179220a48b5b0.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy