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

web-interface.assets.1255d548-4499.9d933f584c94fdb917c7.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-4499"],{"y4tK+AhI":(G,x,t)=>{t.d(x,{Z:()=>Z});var e=t("Z7aTuO5B"),g=t("9pdI12pI"),d=t.n(g),P=t("9oVghaOd"),I=t.n(P),c=t("J6y4/h8P"),v=t("ty2gyrHp"),a=t("uZqmR+ju"),E=t("/GOzvPf6"),m=t("E+CaPsQD"),O=t("d4kzUuQm"),p=t("fVisTAey"),S=t("l5XbR7Md"),b=Object.defineProperty,U=(u,l,f)=>l in u?b(u,l,{enumerable:!0,configurable:!0,writable:!0,value:f}):u[l]=f,L=(u,l,f)=>(U(u,typeof l!="symbol"?l+"":l,f),f);const y=c.default.div`
  display: flex;
  justify-content: space-between;
`,F=u=>u===0?"No failed indexing attempts in the last 24 hours.":e.createElement("strong",null,"There were ",d()(u).format("0,0")," failed indexing attempts in the last 24 hours.");class B extends e.Component{constructor(l){super(l),L(this,"_formatFailuresSummary",()=>e.createElement(a.Alert,{bsStyle:this.state.total===0?"success":"danger"},F(this.state.total),e.createElement(v.J,{to:O.ZP.SYSTEM.INDICES.FAILURES},e.createElement(a.Button,{bsStyle:"info",bsSize:"xs",className:"pull-right"},"Show errors")))),this.state={}}componentDidMount(){const l=I()().subtract(24,"hours");S.X.count(l).then(f=>{this.setState({total:f.count})})}render(){let l;return this.state.total===void 0?l=e.createElement(E.$j,null):l=this._formatFailuresSummary(),e.createElement(a.Row,{className:"content"},e.createElement(a.Col,{md:12},e.createElement(y,null,e.createElement("h2",null,"Indexer failures"),e.createElement(p.eb,{page:m.Z.PAGES.INDEXER_FAILURES,text:"Indexer failures documentation",displayIcon:!0})),e.createElement("p",{className:"description"},"Every message that was not successfully indexed will be logged as an indexer failure."),l))}}const Z=B},kEBMGmbZ:(G,x,t)=>{t.d(x,{NM:()=>f,Mn:()=>M,OK:()=>T,nV:()=>Q});var e=t("Z7aTuO5B"),g=t("DUKaTDO2"),d=t("J6y4/h8P"),P=t("0TVxnHwi"),I=t("/GOzvPf6"),c=t("uZqmR+ju"),v=t("fVisTAey"),a=t("E+CaPsQD"),E=t("U1Iufsob"),m=t("eFxcQyPT"),O=t("MdYBRjRJ"),p=t("q2j1bVbz");const S=(0,d.default)(c.Alert)`
  margin-top: 10px;
  margin-bottom: 5px;
`,U=({error:r})=>e.createElement(S,{bsStyle:"danger"},"Could not retrieve Elasticsearch cluster health. Fetching Elasticsearch cluster health failed: ",r.message),L=d.default.div`
  display: flex;
  justify-content: space-between;
`,y="indexerCluster.health",F="indexerCluster.name",B=()=>{const r=O.DC(E.Z.IndexerClusterApiController.health().url);return(0,m.vl)("GET",r)},Z=()=>{const r=O.DC(E.Z.IndexerClusterApiController.name().url);return(0,m.vl)("GET",r)},u=r=>{const n={refetchInterval:5e3,retry:0,enabled:r},[{data:o,isFetching:H,error:W,isSuccess:R,isRefetching:$},{data:V,isFetching:_,error:q,isSuccess:k,isRefetching:ee}]=(0,g.useQueries)({queries:[{queryKey:[y],queryFn:B,...n},{queryKey:[F],queryFn:Z,...n}]});return{health:o,name:V,error:W||q,loading:(H||_)&&!$&&!ee,isSuccess:R&&k}},l=({minimal:r})=>{const n=(0,p.Z)(),o=(0,P.rq)(n.permissions,"indexercluster:read"),{health:H,name:W,loading:R,error:$,isSuccess:V}=u(o);return o?e.createElement(c.Row,{className:"content"},e.createElement(c.Col,{md:12},!r&&e.createElement(L,null,e.createElement("h2",null,"Elasticsearch cluster"),e.createElement(v.eb,{page:a.Z.PAGES.CONFIGURING_ES,text:"Elasticsearch setup documentation",displayIcon:!0})),V&&e.createElement(M,{health:H,name:W}),R&&e.createElement("p",null,e.createElement(I.$j,null)),$&&e.createElement(U,{error:$}))):null};l.defaultProps={minimal:!1};const f=l;var j=t("ii0bleBb"),D=t.n(j);const Y=(0,d.default)(c.Alert)`
  margin-top: 10px;
  margin-bottom: 5px;
`,K=({health:r,name:n})=>{const o=r.status.toLowerCase(),H=()=>{switch(o){case"green":return"success";case"yellow":return"warning";case"red":return"danger";default:return"success"}},W=(0,e.useMemo)(()=>{const R=`Elasticsearch cluster ${(n==null?void 0:n.name)||""} is ${o}.`;switch(o){case"green":return R;case"yellow":case"red":return e.createElement("strong",null,R);default:return R}},[o,n]);return e.createElement(Y,{bsStyle:H()},W," ","Shards:"," ",r.shards.active," active,"," ",r.shards.initializing," initializing,"," ",r.shards.relocating," relocating,"," ",r.shards.unassigned," unassigned,"," ",e.createElement(v.eb,{page:a.Z.PAGES.CLUSTER_STATUS_EXPLAINED,text:"What does this mean?"}))};K.defaultProps={name:void 0},K.propTypes={health:D().object.isRequired,name:D().object};const M=K;var z=t("4IfE3Ihm"),C=Object.defineProperty,s=(r,n,o)=>n in r?C(r,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[n]=o,i=(r,n,o)=>(s(r,typeof n!="symbol"?n+"":n,o),o);class h extends e.Component{render(){const{failure:n}=this.props;return e.createElement("tr",null,e.createElement("td",null,e.createElement(z.Z,{dateTime:n.timestamp})),e.createElement("td",null,n.index),e.createElement("td",null,n.letter_id),e.createElement("td",null,n.message))}}i(h,"propTypes",{failure:D().object.isRequired});const T=h;var w=t("y4tK+AhI"),J=Object.defineProperty,X=(r,n,o)=>n in r?J(r,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[n]=o,N=(r,n,o)=>(X(r,typeof n!="symbol"?n+"":n,o),o);class A extends e.Component{render(){return this.props.failures.length===0?e.createElement(c.Alert,{bsStyle:"success"},e.createElement(I.JO,{name:"check-circle"})," Hurray! There are not any indexer failures."):e.createElement("div",{className:"scrollable-table"},e.createElement(c.Table,{className:"indexer-failures",striped:!0,hover:!0,condensed:!0},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",{style:{width:200}},"Timestamp"),e.createElement("th",null,"Index"),e.createElement("th",null,"Letter ID"),e.createElement("th",null,"Error message"))),e.createElement("tbody",null,this.props.failures.map(n=>e.createElement(T,{key:`indexer-failure-${n.letter_id}`,failure:n})))))}}N(A,"propTypes",{failures:D().arrayOf(D().object).isRequired});const Q=A},QImtDXel:(G,x,t)=>{t.r(x),t.d(x,{default:()=>z});var e=t("Z7aTuO5B"),g=t("ii0bleBb"),d=t.n(g),P=t("9pdI12pI"),I=t.n(P),c=t("8wYeYPUw"),v=t("ty2gyrHp"),a=t("uZqmR+ju"),E=t("/GOzvPf6"),m=t("6Wzh2oiG"),O=t("kEBMGmbZ"),p=t("E+CaPsQD"),S=t("d4kzUuQm"),b=t("c9JM82dZ"),U=t("8fnsnG21"),L=t("JnTtTRmZ"),y=t.n(L),F=t("MdYBRjRJ"),B=t("U1Iufsob"),Z=t("eFxcQyPT"),u=t("IA3Ku5lS");const l=(0,u.ei)("core.IndexerOverview",()=>y().createActions({list:{asyncResult:!0}})),f=(0,u.dS)("core.IndexerOverview",()=>y().createStore({listenables:[l],indexerOverview:void 0,indexerOverviewError:void 0,getInitialState(){return{indexerOverview:this.indexerOverview,indexerOverviewError:this.indexerOverviewError}},list(C){const s=(0,F.DC)(B.Z.IndexerOverviewApiResource.list(C).url),i=(0,Z.vl)("GET",s);return i.then(h=>{this.trigger({indexerOverview:h,indexerOverviewError:void 0})},h=>{if(h.additional&&h.additional.status===503){const T=h.additional.body&&h.additional.body.message?h.additional.body.message:"Elasticsearch is unavailable. Check your configuration and logs for more information.";this.trigger({indexerOverviewError:T})}}),l.list.promise(i),i}}));var j=t("PhRf2fIG"),D=t("aHNeFNVd");const Y=2e3,K=()=>e.createElement(a.Row,{className:"content"},e.createElement(a.Col,{md:8,mdOffset:2},e.createElement("div",{className:"top-margin"},e.createElement(a.Panel,{bsStyle:"danger",header:e.createElement("span",null,e.createElement(E.JO,{name:"exclamation-triangle"})," Indices overview unavailable")},e.createElement("p",null,"We could not get the indices overview information. This usually means there was a problem connecting to Elasticsearch, and ",e.createElement("strong",null,"you should ensure Elasticsearch is up and reachable from Graylog"),"."),e.createElement("p",null,"Graylog will continue storing your messages in its journal, but you will not be able to search on them until Elasticsearch is reachable again.")))));class M extends e.Component{constructor(s){super(s),this._totalIndexCount=()=>{const{indexerOverview:{indices:i=[]}}=this.props;return i.length},this._isLoading=()=>{const{indexSet:i}=this.props;return!i},this.state={timerId:void 0}}componentDidMount(){const{params:{indexSetId:s}}=this.props;j.p1.get(s),D.$F.list(s);const i=setInterval(()=>{D.$F.multiple(),l.list(s)},Y);this.setState({timerId:i})}componentWillUnmount(){const{timerId:s}=this.state;s&&clearInterval(s)}render(){if(this._isLoading())return e.createElement(E.$j,null);const{indexSet:s,indexerOverview:i,indexerOverviewError:h,params:{indexSetId:T},indexDetails:{indices:w,closedIndices:J}}=this.props,X=s&&e.createElement(E.mr,{title:`Index Set: ${s.title}`,topActions:e.createElement(v.J,{to:S.ZP.SYSTEM.INDICES.LIST},e.createElement(a.Button,{bsStyle:"info"},"Index sets overview")),documentationLink:{title:"Index model documentation",path:p.Z.PAGES.INDEX_MODEL},actions:e.createElement(a.ButtonToolbar,null,e.createElement(v.J,{to:S.ZP.SYSTEM.INDEX_SETS.CONFIGURATION(s.id,"details")},e.createElement(a.Button,{bsStyle:"info"},"Edit Index Set")),e.createElement(m.bP,{indexSetId:T,indexSet:s}))},e.createElement("span",null,"This is an overview of all indices (message stores) in this index set Graylog is currently taking in account for searches and analysis."));if(h)return e.createElement("span",null,X,e.createElement(K,null));let N,A;if(i&&J){const Q=i.deflector;N=e.createElement("span",null,e.createElement(a.Alert,{bsStyle:"success",style:{marginTop:"10"}},this._totalIndexCount()," indices with a total of"," ",I()(i.counts.events).format("0,0")," messages under management, current write-active index is ",e.createElement("i",null,Q.current_target),"."),e.createElement(c.Z,null,e.createElement(O.Mn,{health:i.indexer_cluster.health}))),A=e.createElement(m.YD,{indices:i.indices,indexDetails:w,indexSetId:T,closedIndices:J,deflector:i.deflector})}else N=e.createElement(E.$j,null),A=e.createElement(E.$j,null);return e.createElement(E.$4,{title:`Index Set - ${s?s.title:""}`},e.createElement("div",null,X,e.createElement(a.Row,{className:"content"},e.createElement(a.Col,{md:12},e.createElement(m.qS,{indexSet:s}))),e.createElement(a.Row,{className:"content"},e.createElement(a.Col,{md:12},N)),A))}}M.propTypes={params:d().shape({indexSetId:d().string}).isRequired,indexSet:d().object,indexerOverview:d().object,indexerOverviewError:d().object,indexDetails:d().object},M.defaultProps={indexerOverview:void 0,indexerOverviewError:void 0,indexSet:void 0,indexDetails:{indices:void 0,closedIndices:void 0}};const z=(0,U.Z)((0,b.Z)(M),{indexSets:j.Fp,indexerOverview:f,indices:D.b$},({indexSets:C,indexerOverview:s,indices:i})=>({indexSet:C?C.indexSet:void 0,indexerOverview:s&&s.indexerOverview,indexerOverviewError:s&&s.indexerOverviewError,indexDetails:i}))},c9JM82dZ:(G,x,t)=>{t.d(x,{Z:()=>P});var e=t("Z7aTuO5B"),g=t("yAXMqwrl");const P=I=>c=>{const v=(0,g.useParams)();return e.createElement(I,{...c,params:v})}},l5XbR7Md:(G,x,t)=>{t.d(x,{X:()=>E});var e=t("JnTtTRmZ"),g=t.n(e),d=t("9oVghaOd"),P=t.n(d),I=t("MdYBRjRJ"),c=t("U1Iufsob"),v=t("eFxcQyPT"),a=t("IA3Ku5lS");const E=(0,a.dS)("core.IndexerFailures",()=>g().createStore({listenables:[],list(m,O){const p=I.DC(c.Z.IndexerFailuresApiController.list(m,O).url);return(0,v.ZP)("GET",p)},count(m){const p=(m.format?m:P()(m)).format("YYYY-MM-DDTHH:mm:ss.SSS"),S=I.DC(c.Z.IndexerFailuresApiController.count(p).url);return(0,v.ZP)("GET",S)}}))}}]);})();

//# sourceMappingURL=1255d548-4499.9d933f584c94fdb917c7.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy