web-interface.assets.1255d548-9693.a6bd68487a9043109537.js Maven / Gradle / Ivy
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["1255d548-9693"],{yrynJauy:(Z,P,a)=>{a.r(P),a.d(P,{default:()=>K});var S=a("ii0bleBb"),s=a.n(S),r=a("Z7aTuO5B"),f=a("ty2gyrHp"),L=a("8fnsnG21"),u=a("d4kzUuQm"),m=a("uZqmR+ju"),E=a("/GOzvPf6"),_=a("jgcyxQh5"),y=a("XyJ0Mvpg"),R=a("c9JM82dZ"),C=a("HCsT5Gmk"),T=a("xPjmrmtt"),l=a("xg2EYAWP"),U=a("w4Oqfrlu"),B=a("N6x7vnl1"),I=Object.defineProperty,W=(o,t,e)=>t in o?I(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,p=(o,t,e)=>(W(o,typeof t!="symbol"?t+"":t,e),e);const D=o=>{o.push(u.ZP.SYSTEM.LOOKUPTABLES.DATA_ADAPTERS.OVERVIEW)},g=({action:o})=>o==="create",h=o=>{l.e.validate(o)};class c extends r.Component{constructor(){super(...arguments),p(this,"errorStatesTimer"),p(this,"errorStatesInterval",1e3),p(this,"_startErrorStatesTimer",()=>{this._stopErrorStatesTimer(),this.errorStatesTimer=setInterval(()=>{const{dataAdapters:t}=this.props;let e=null;t&&(e=t.map(n=>n.name)),e&&T.H.getErrors(null,null,e||null)},this.errorStatesInterval)}),p(this,"_stopErrorStatesTimer",()=>{this.errorStatesTimer&&(clearInterval(this.errorStatesTimer),this.errorStatesTimer=void 0)}),p(this,"_loadData",t=>{const{pagination:e}=t,{page:n,pageSize:d}=this.props.paginationQueryParameter;this._stopErrorStatesTimer(),t.params&&t.params.adapterName?l.e.get(t.params.adapterName):g(t)?l.e.getTypes():(l.e.searchPaginated(n,d,e.query),this._startErrorStatesTimer())})}componentDidMount(){this._loadData(this.props)}componentDidUpdate(t){const{location:{pathname:e}}=this.props,{location:{pathname:n}}=t;e!==n&&this._loadData(this.props)}componentWillUnmount(){const{page:t,pageSize:e}=this.props.paginationQueryParameter;clearInterval(this.errorStatesTimer),l.e.searchPaginated(t,e)}render(){const{action:t,errorStates:e,dataAdapter:n,validationErrors:d,types:A,dataAdapters:O,pagination:b,history:v}=this.props;let i;const j=t==="show",M=t==="edit";return j||M?n?M?i=r.createElement(m.Row,{className:"content"},r.createElement(m.Col,{lg:12},r.createElement(_.$G,{dataAdapter:n,type:n.config.type,create:!1,title:"Data Adapter",saved:()=>D(v),validate:h,validationErrors:d}))):i=r.createElement(_.s$,{dataAdapter:n}):i=r.createElement(E.$j,{text:"Loading data adapter"}):g(this.props)?A?i=r.createElement(_.UG,{types:A,saved:()=>D(v),validate:h,validationErrors:d}):i=r.createElement(E.$j,{text:"Loading data adapter types"}):O?i=r.createElement(_.s8,{dataAdapters:O,pagination:b,errorStates:e}):i=r.createElement(E.$j,{text:"Loading data adapters"}),r.createElement(E.$4,{title:"Lookup Tables - Data Adapters"},r.createElement(U.Z,null),r.createElement(E.mr,{title:"Data adapters for Lookup Tables",actions:r.createElement(f.J,{to:u.ZP.SYSTEM.LOOKUPTABLES.DATA_ADAPTERS.CREATE},r.createElement(m.Button,{bsStyle:"success",style:{marginLeft:5}},"Create data adapter"))},r.createElement("span",null,"Data adapters provide the actual values for lookup tables")),i)}}c.propTypes={errorStates:s().object,dataAdapter:s().object,validationErrors:s().object,types:s().object,pagination:s().object,dataAdapters:s().array,location:s().object.isRequired,action:s().string,paginationQueryParameter:s().object.isRequired,history:s().object.isRequired},c.defaultProps={errorStates:null,validationErrors:{},dataAdapters:null,types:null,pagination:null,dataAdapter:null,action:void 0};const K=(0,L.Z)((0,B.Z)((0,R.Z)((0,C.Z)((0,y.Z)(c)))),{lookupTableStore:T.m,dataAdaptersStore:l.m},({dataAdaptersStore:o,lookupTableStore:t,...e})=>({...e,...o,errorStates:t.errorStates}))}}]);})();
//# sourceMappingURL=1255d548-9693.a6bd68487a9043109537.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy