web-interface.assets.1255d548-5372.f7f1344cf6047ca9ae26.js Maven / Gradle / Ivy
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["1255d548-5372"],{bw5WaAMC:(Q,P,e)=>{e.r(P),e.d(P,{default:()=>y});var M=e("ii0bleBb"),s=e.n(M),o=e("Z7aTuO5B"),b=e("ty2gyrHp"),L=e("8fnsnG21"),h=e("d4kzUuQm"),_=e("uZqmR+ju"),m=e("/GOzvPf6"),f=e("XyJ0Mvpg"),p=e("jgcyxQh5"),A=e("c9JM82dZ"),S=e("HCsT5Gmk"),c=e("xPjmrmtt"),C=e("w4Oqfrlu"),R=e("N6x7vnl1"),U=Object.defineProperty,B=(r,t,a)=>t in r?U(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a,E=(r,t,a)=>(B(r,typeof t!="symbol"?t+"":t,a),a);const I=r=>{r.push(h.ZP.SYSTEM.LOOKUPTABLES.OVERVIEW)},T=({action:r})=>r==="create",g=r=>{c.H.validate(r)};class d extends o.Component{constructor(){super(...arguments),E(this,"errorStatesTimer"),E(this,"errorStatesInterval",1e3),E(this,"_startErrorStatesTimer",()=>{const{tables:t,dataAdapters:a}=this.props;this._stopErrorStatesTimer(),this.errorStatesTimer=setInterval(()=>{let n=null;if(t&&(n=t.map(l=>l.name)),n){const l=Object.values(a).map(u=>u.name);c.H.getErrors(n,null,l||null)}},this.errorStatesInterval)}),E(this,"_stopErrorStatesTimer",()=>{this.errorStatesTimer&&(clearInterval(this.errorStatesTimer),this.errorStatesTimer=void 0)}),E(this,"_loadData",t=>{const{pagination:a}=this.props,{page:n,pageSize:l}=this.props.paginationQueryParameter;this._stopErrorStatesTimer(),t.params&&t.params.tableName?c.H.get(t.params.tableName):T(t)||(c.H.searchPaginated(n,l,a.query),this._startErrorStatesTimer())})}componentDidMount(){this._loadData(this.props)}componentDidUpdate(t){const{location:{pathname:a}}=this.props,{location:{pathname:n}}=t;a!==n&&this._loadData(this.props)}componentWillUnmount(){const{page:t,pageSize:a}=this.props.paginationQueryParameter;clearInterval(this.errorStatesTimer),c.H.searchPaginated(t,a)}render(){const{action:t,table:a,validationErrors:n,dataAdapter:l,cache:u,tables:O,caches:W,dataAdapters:K,pagination:j,errorStates:Z,history:H}=this.props;let i;const N=t==="show",v=t==="edit",D=()=>I(H);return N||v?a?v?i=o.createElement(_.Row,{className:"content"},o.createElement(_.Col,{lg:8},o.createElement("h2",null,"Lookup Table"),o.createElement(p.c1,{table:a,create:!1,saved:D,validate:g,validationErrors:n}))):i=o.createElement(p.QX,{dataAdapter:l,cache:u,table:a}):i=o.createElement(m.$j,{text:"Loading lookup table"}):T(this.props)?i=o.createElement(p.Rl,{saved:D,validate:g,validationErrors:n}):O?i=o.createElement(p.pP,{tables:O,caches:W,dataAdapters:K,pagination:j,errorStates:Z}):i=o.createElement(m.$j,{text:"Loading lookup tables"}),o.createElement(m.$4,{title:"Lookup Tables"},o.createElement(C.Z,null),o.createElement(m.mr,{title:"Lookup Tables",actions:o.createElement(b.J,{to:h.ZP.SYSTEM.LOOKUPTABLES.CREATE},o.createElement(_.Button,{bsStyle:"success",style:{marginLeft:5}},"Create lookup table"))},o.createElement("span",null,"Lookup tables can be used in extractors, converters and processing pipelines to translate message fields or to enrich messages.")),i)}}d.propTypes={table:s().object,validationErrors:s().object,dataAdapter:s().object,cache:s().object,tables:s().array,caches:s().object,dataAdapters:s().object,pagination:s().object,history:s().object.isRequired,location:s().object,errorStates:s().object,action:s().string,paginationQueryParameter:s().object.isRequired},d.defaultProps={errorStates:null,validationErrors:{},dataAdapters:null,table:null,cache:null,caches:null,tables:null,location:null,pagination:null,dataAdapter:null,action:void 0};const y=(0,L.Z)((0,R.Z)((0,A.Z)((0,S.Z)((0,f.Z)(d)))),{lookupTableStore:c.m},({lookupTableStore:r,...t})=>({...t,...r}))}}]);})();
//# sourceMappingURL=1255d548-5372.f7f1344cf6047ca9ae26.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy