web-interface.assets.bb8c8232-6862.1db08f0b2779d8f1d1d7.js Maven / Gradle / Ivy
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["bb8c8232-6862"],{Np3ug1OJ:(he,L,t)=>{t.d(L,{D:()=>fe});var e=t("Z7aTuO5B"),i=t("ii0bleBb"),A=t.n(i),G=t("An3GrFet"),D=t.n(G),d=t("J6y4/h8P"),N=t("QL8i6bcz");const x=1e3/10;class C{constructor(){this.eventMutex=null}throttle(y,h){this.eventMutex||(this.eventMutex=setTimeout(()=>{this.eventMutex=null,y()},h||x))}}const S=C;var I=t("zkmy/ViL"),T=t("8fnsnG21"),g=t("rIl5IEuP"),z=t("IOI9nV80"),$=t("JnTtTRmZ"),Y=t.n($),V=t("MdYBRjRJ"),q=t("eFxcQyPT"),W=t("IA3Ku5lS");const o=(0,W.rN)("core.ClusterTraffic",()=>Y().createActions({getTraffic:{asyncResult:!0}})),c=(0,W.Bv)("core.ClusterTraffic",()=>Y().createStore({listenables:[o],traffic:void 0,getInitialState(){return{traffic:this.traffic}},getTraffic(f){const y=(0,q.Ay)("GET",V.H3(`/system/cluster/traffic?days=${f}&daily=false`));return y.then(h=>{this.trigger({traffic:h})}),y}}));var E=t("Vg8s2y9S"),b=t("Pd5CUaTj"),p=t.n(b),O=t("FMrsY19w"),Q=t.n(O),j=t("7FTHePOw"),_=t.n(j),le=t("9oVghaOd"),ae=t.n(le),oe=t("TivnP0t5"),ie=t.n(oe);const Z=f=>{const w=ie()(p()(f,(P,re)=>({ts:re,bytes:P}))).dimension(P=>ae()(P.ts).format("YYYY-MM-DD")).group().reduceSum(P=>P.bytes),k=Q()(w.all(),P=>ae().utc(P.key,"YYYY-MM-DD").toISOString());return _()(k,P=>P.value)},ee={formatTrafficData:Z};var ce=t("yGRmSjYM"),me=t("q2j1bVbz"),ue=t("8OvTct/Z"),de=t("v4GbOr/o"),te=t("9RXNqxkm");const ne=({width:f,traffic:y,layoutExtension:h})=>{if(!y)return e.createElement(z.y$,null);const w=[{type:"bar",x:Object.keys(y),y:Object.values(y)}],k={showlegend:!1,margin:{l:60},xaxis:{type:"date",title:{text:"Time"}},hovermode:"x",hoverlabel:{namelength:-1},yaxis:{title:{text:"Bytes"},rangemode:"tozero",hoverformat:".4s",tickformat:"s"},...h};return e.createElement("div",{style:{height:"200px",width:f}},e.createElement(te.A,{chartData:w,layout:k}))};ne.propTypes={traffic:A().object.isRequired,width:A().number.isRequired,layoutExtension:A().object},ne.defaultProps={layoutExtension:{}};const a=ne,l=[30,90,180,365],m=d.default.div`
margin-bottom: 5px;
.control-label {
padding-top: 0;
}
.graph-days-select {
display: flex;
align-items: baseline;
select {
padding-top: 3px;
height: 28px;
}
}
`,v=d.default.dl`
margin-bottom: 0;
`,H=d.default.h2(({theme:f})=>(0,d.css)`
margin-bottom: ${f.spacings.sm};
`),U=d.default.h3(({theme:f})=>(0,d.css)`
margin-bottom: ${f.spacings.sm};
`),B=()=>e.createElement(H,null,"Graylog cluster"),K=()=>{const f=(0,T.P)(E.j);if(!f)return e.createElement(z.y$,null);const{clusterId:y,nodeCount:h}=f;return e.createElement(v,{className:"system-dl"},e.createElement("dt",null,"Cluster ID:"),e.createElement("dd",null,y||"Not available"),e.createElement("dt",null,"Number of nodes:"),e.createElement("dd",null,h))},se=()=>{var f;const{traffic:y}=(0,T.P)(c),[h,w]=(0,e.useState)(l[0]),[k,P]=(0,e.useState)(600),re=(0,e.useRef)(new S),Ee=(0,e.useRef)(null),Te=N.d.exports("license"),Se=(0,me.A)(),Ae=(0,ue.A)(),Ce=M=>{M.preventDefault();const J=Number(M.target.value);w(J),Ae(de.g.SYSTEM_OVERVIEW_OUTGOING_TRAFFIC_DAYS_CHANGED,{app_pathname:"system-overview",app_section:"outgoing-traffic",app_action_value:"trafficgraph-days-button",event_details:{value:J}})};(0,e.useEffect)(()=>{o.getTraffic(h)},[h]),(0,e.useEffect)(()=>{const M=()=>{const{clientWidth:ye}=Ee.current;P(ye)},J=()=>{re.current.throttle(()=>M())};return window.addEventListener("resize",J),Ee.current&&M(),()=>{window.removeEventListener("resize",J)}},[]);const xe=(0,ce.Nn)(Se.permissions,["licenses:read"])&&((f=Te[0])==null?void 0:f.EnterpriseTrafficGraph)||a;let ge=null,Ie=e.createElement(z.y$,null);if(y){const M=D()(y.output,(ye,pe)=>ye+pe);ge=e.createElement("small",null,"Last ",h," days: ",I.A.formatBytes(M));const J=Z(y.output);Ie=e.createElement(xe,{traffic:J,width:k})}return e.createElement(e.Fragment,null,e.createElement(m,{className:"form-inline graph-days pull-right"},e.createElement(g.Input,{id:"graph-days",type:"select",bsSize:"small",label:"Days",value:h,onChange:Ce,formGroupClassName:"graph-days-select"},l.map(M=>e.createElement("option",{key:`option-${M}`,value:M},M)))),e.createElement(U,{ref:Ee},"Outgoing traffic ",ge),Ie)},X=({layout:f,children:y})=>f==="compact"?e.createElement(g.Row,{className:"content"},e.createElement(g.Col,{md:12},e.createElement(B,null),e.createElement(g.Row,null,e.createElement(g.Col,{md:6},e.createElement(K,null),e.createElement("hr",null),y),e.createElement(g.Col,{md:6},e.createElement(se,null))))):e.createElement(g.Row,{className:"content"},e.createElement(g.Col,{md:12},e.createElement(B,null),e.createElement(K,null),e.createElement("hr",null),y,e.createElement(g.Row,null,e.createElement(g.Col,{md:12},e.createElement(se,null)))));X.propTypes={layout:A().oneOf(["default","compact"]),children:A().node},X.defaultProps={layout:"default",children:null};const fe=X},"y4tK+AhI":(he,L,t)=>{t.d(L,{A:()=>o});var e=t("Z7aTuO5B"),i=t("9pdI12pI"),A=t.n(i),G=t("9oVghaOd"),D=t.n(G),d=t("J6y4/h8P"),N=t("ty2gyrHp"),x=t("rIl5IEuP"),C=t("IOI9nV80"),S=t("E+CaPsQD"),I=t("d4kzUuQm"),T=t("fVisTAey"),g=t("l5XbR7Md"),z=Object.defineProperty,$=(c,E,b)=>E in c?z(c,E,{enumerable:!0,configurable:!0,writable:!0,value:b}):c[E]=b,Y=(c,E,b)=>($(c,typeof E!="symbol"?E+"":E,b),b);const V=d.default.div`
display: flex;
justify-content: space-between;
`,q=c=>c===0?"No failed indexing attempts in the last 24 hours.":e.createElement("strong",null,"There were ",A()(c).format("0,0")," failed indexing attempts in the last 24 hours.");class W extends e.Component{constructor(E){super(E),Y(this,"_formatFailuresSummary",()=>e.createElement(x.Alert,{bsStyle:this.state.total===0?"success":"danger"},q(this.state.total),e.createElement(N.m,{to:I.Ay.SYSTEM.INDICES.FAILURES},e.createElement(x.Button,{bsStyle:"info",bsSize:"xs",className:"pull-right"},"Show errors")))),this.state={}}componentDidMount(){const E=D()().subtract(24,"hours");g.a.count(E).then(b=>{this.setState({total:b.count})})}render(){let E;return this.state.total===void 0?E=e.createElement(C.y$,null):E=this._formatFailuresSummary(),e.createElement(x.Row,{className:"content"},e.createElement(x.Col,{md:12},e.createElement(V,null,e.createElement("h2",null,"Indexer failures"),e.createElement(T.$,{page:S.A.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."),E))}}const o=W},kEBMGmbZ:(he,L,t)=>{t.d(L,{gp:()=>b,g7:()=>_,O5:()=>ee,ht:()=>ne});var e=t("Z7aTuO5B"),i=t("DUKaTDO2"),A=t("J6y4/h8P"),G=t("yGRmSjYM"),D=t("IOI9nV80"),d=t("rIl5IEuP"),N=t("fVisTAey"),x=t("E+CaPsQD"),C=t("U1Iufsob"),S=t("eFxcQyPT"),I=t("MdYBRjRJ"),T=t("q2j1bVbz");const g=(0,A.default)(d.Alert)`
margin-top: 10px;
margin-bottom: 5px;
`,$=({error:a})=>e.createElement(g,{bsStyle:"danger"},"Could not retrieve Elasticsearch cluster health. Fetching Elasticsearch cluster health failed: ",a.message),Y=A.default.div`
display: flex;
justify-content: space-between;
`,V="indexerCluster.health",q="indexerCluster.name",W=()=>{const a=I.H3(C.A.IndexerClusterApiController.health().url);return(0,S.Ur)("GET",a)},o=()=>{const a=I.H3(C.A.IndexerClusterApiController.name().url);return(0,S.Ur)("GET",a)},c=a=>{const l={refetchInterval:5e3,retry:0,enabled:a},[{data:m,isFetching:v,error:H,isSuccess:U,isRefetching:B},{data:K,isFetching:se,error:X,isSuccess:fe,isRefetching:f}]=(0,i.useQueries)({queries:[{queryKey:[V],queryFn:W,...l},{queryKey:[q],queryFn:o,...l}]});return{health:m,name:K,error:H||X,loading:(v||se)&&!B&&!f,isSuccess:U&&fe}},E=({minimal:a})=>{const l=(0,T.A)(),m=(0,G.Nn)(l.permissions,"indexercluster:read"),{health:v,name:H,loading:U,error:B,isSuccess:K}=c(m);return m?e.createElement(d.Row,{className:"content"},e.createElement(d.Col,{md:12},!a&&e.createElement(Y,null,e.createElement("h2",null,"Elasticsearch cluster"),e.createElement(N.$,{page:x.A.PAGES.CONFIGURING_ES,text:"Elasticsearch setup documentation",displayIcon:!0})),K&&e.createElement(_,{health:v,name:H}),U&&e.createElement("p",null,e.createElement(D.y$,null)),B&&e.createElement($,{error:B}))):null};E.defaultProps={minimal:!1};const b=E;var p=t("ii0bleBb"),O=t.n(p);const Q=(0,A.default)(d.Alert)`
margin-top: 10px;
margin-bottom: 5px;
`,j=({health:a,name:l})=>{const m=a.status.toLowerCase(),v=()=>{switch(m){case"green":return"success";case"yellow":return"warning";case"red":return"danger";default:return"success"}},H=(0,e.useMemo)(()=>{const U=`Elasticsearch cluster ${(l==null?void 0:l.name)||""} is ${m}.`;switch(m){case"green":return U;case"yellow":case"red":return e.createElement("strong",null,U);default:return U}},[m,l]);return e.createElement(Q,{bsStyle:v()},H," ","Shards:"," ",a.shards.active," active,"," ",a.shards.initializing," initializing,"," ",a.shards.relocating," relocating,"," ",a.shards.unassigned," unassigned,"," ",e.createElement(N.$,{page:x.A.PAGES.CLUSTER_STATUS_EXPLAINED,text:"What does this mean?"}))};j.defaultProps={name:void 0},j.propTypes={health:O().object.isRequired,name:O().object};const _=j;var le=t("4IfE3Ihm"),ae=Object.defineProperty,oe=(a,l,m)=>l in a?ae(a,l,{enumerable:!0,configurable:!0,writable:!0,value:m}):a[l]=m,ie=(a,l,m)=>(oe(a,typeof l!="symbol"?l+"":l,m),m);class Z extends e.Component{render(){const{failure:l}=this.props;return e.createElement("tr",null,e.createElement("td",null,e.createElement(le.A,{dateTime:l.timestamp})),e.createElement("td",null,l.index),e.createElement("td",null,l.letter_id),e.createElement("td",null,l.message))}}ie(Z,"propTypes",{failure:O().object.isRequired});const ee=Z;var ce=t("y4tK+AhI"),me=Object.defineProperty,ue=(a,l,m)=>l in a?me(a,l,{enumerable:!0,configurable:!0,writable:!0,value:m}):a[l]=m,de=(a,l,m)=>(ue(a,typeof l!="symbol"?l+"":l,m),m);class te extends e.Component{render(){return this.props.failures.length===0?e.createElement(d.Alert,{bsStyle:"success"},e.createElement(D.In,{name:"check_circle"})," Hurray! There are not any indexer failures."):e.createElement("div",{className:"scrollable-table"},e.createElement(d.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(l=>e.createElement(ee,{key:`indexer-failure-${l.letter_id}`,failure:l})))))}}de(te,"propTypes",{failures:O().arrayOf(O().object).isRequired});const ne=te},IMwNIfWz:(he,L,t)=>{t.r(L),t.d(L,{default:()=>Je});var e=t("Z7aTuO5B"),i=t("IOI9nV80"),A=t("kEBMGmbZ"),G=t("0hhBr0/b"),D=t("JnTtTRmZ"),d=t.n(D),N=t("/yh+QgO6"),x=t.n(N),C=t("MdYBRjRJ"),S=t("jAGDuYSC"),I=t("eFxcQyPT"),T=t("IA3Ku5lS");const g=(0,T.rN)("core.Enterprise",()=>d().createActions({getLicenseInfo:{asyncResult:!0}})),z=(0,T.Bv)("core.Enterprise",()=>d().createStore({listenables:[g],sourceUrl:"/enterprise/license",licenseStatus:void 0,getInitialState(){return this.getState()},propagateChanges(){this.trigger(this.getState())},getState(){return{licenseStatus:this.licenseStatus}},enterpriseUrl(n=""){return(0,C.H3)(`${this.sourceUrl}/${n}`)},refresh(){this.getLicenseInfo()},getLicenseInfo(){const n=(0,I.Ay)("GET",this.enterpriseUrl("info"));n.then(s=>(this.licenseStatus=s.license_info.license_status,this.propagateChanges(),s),s=>{const r=x()(s,"additional.body.message",s.message);S.A.error(`Couldn't load license information: ${r}`,"Error")}),g.getLicenseInfo.promise(n)}}));var $=t("y4tK+AhI");const V=()=>{var n;const[s,r]=(0,e.useState)(e.createElement(i.y$,{text:"Looking for Index Failures..."})),u=(0,G.A)("systemOverview"),R=(n=u==null?void 0:u[0])==null?void 0:n.component;return(0,e.useEffect)(()=>{R?g.getLicenseInfo().then(F=>{r(F.license_info.license_status==="installed"?e.createElement(R,null):e.createElement($.A,null))}):r(e.createElement($.A,null))},[R,r]),s};var q=t("kyFu+5jg"),W=t("ii0bleBb"),o=t.n(W),c=t("J6y4/h8P"),E=t("AbA4Yk3R"),b=t.n(E),p=t("rIl5IEuP"),O=t("bpbGjAaT"),Q=t("8fnsnG21"),j=t("d4kzUuQm");class _{static getValuesForNotification(s){switch(s.type){case"legacy_ldap_config_migration":{const{auth_service_id:r}=s.details;return{values:{AUTHENTICATION_BACKEND:j.Ay.SYSTEM.AUTHENTICATION.BACKENDS.show(r)}}}case"no_input_running":case"input_failure_shutdown":case"input_failed":case"input_failed_to_start":return{values:{SYSTEM_INPUTS:j.Ay.SYSTEM.INPUTS}};case"data_node_needs_provisioning":return{values:{DATA_NODE_CONFIGURATION:j.Ay.SYSTEM.configurationsSection("Data Node")}};default:return}}}const le=_,oe=n=>{const{messages:s}=(0,Q.P)(O.G);(0,e.useEffect)(()=>{O.Q.getHtmlMessage(n.type,n.key,le.getValuesForNotification(n))},[]);const r=`${n.type}-${n.key}`;return s==null?void 0:s[r]},ie=(0,c.default)(p.Alert)(({theme:n})=>(0,c.css)`
margin-top: 10px;
i {
color: ${n.colors.gray[10]};
}
form {
margin-bottom: 0;
}
`),Z=c.default.span(({theme:n})=>(0,c.css)`
margin-left: 3px;
font-size: ${n.fonts.size.small};
`),ee=n=>b().sanitize(n),ce=({notification:n})=>{const s=oe(n),r=()=>{window.confirm("Really delete this notification?")&&O.Q.delete(n.type,n.key)};return s?e.createElement(ie,{bsStyle:"danger",title:e.createElement(e.Fragment,null,e.createElement("div",{dangerouslySetInnerHTML:{__html:ee(s==null?void 0:s.title)}}),e.createElement(Z,null,"(triggered ",e.createElement(i.sR,{dateTime:n.timestamp}),")")),onDismiss:r},e.createElement("div",{dangerouslySetInnerHTML:{__html:ee(s==null?void 0:s.description)},className:"notification-description"})):e.createElement(i.y$,null)};ce.propTypes={notification:o().exact({severity:o().string.isRequired,details:o().object,type:o().string.isRequired,key:o().string,timestamp:o().string.isRequired,node_id:o().string.isRequired}).isRequired};const me=ce,ue=n=>n===1?"is one notification":`are ${n} notifications`,de=n=>n===0?"No notifications":`There ${ue(n)}`,te=(n,s)=>n===0?e.createElement(p.Alert,{bsStyle:"success",className:"notifications-none"},"No notifications"):s==null?void 0:s.map(r=>e.createElement(me,{key:`${r.type}-${r==null?void 0:r.key}-${r.timestamp}`,notification:r})),a=()=>{const{notifications:n,total:s}=(0,Q.P)(O.G);return n?e.createElement(p.Row,{className:"content"},e.createElement(p.Col,{md:12},e.createElement("h2",null,de(s)),e.createElement("p",{className:"description"},"Notifications are triggered by Graylog and indicate a situation you should act upon. Many notification types will also provide a link to the Graylog documentation if you need more information or assistance."),te(s,n))):e.createElement(i.y$,null)};var l=t("l4nHKZ4j"),m=t("U1Iufsob");const v=(0,T.rN)("core.SystemJobs",()=>d().createActions({list:{asyncResult:!0},getJob:{asyncResult:!0},acknowledgeJob:{asyncResult:!0},cancelJob:{asyncResult:!0}})),H=(0,T.Bv)("core.SystemJobs",()=>d().createStore({listenables:[v],jobsById:{},getInitialState(){return{jobs:this.jobs,jobsById:this.jobsById}},list(){const n=C.H3(m.A.SystemJobsApiController.list().url),s=(0,I.Ur)("GET",n).then(r=>(this.jobs=r,this.trigger({jobs:r}),r));v.list.promise(s)},getJob(n){const s=C.H3(m.A.SystemJobsApiController.getJob(n).url),r=(0,I.Ay)("GET",s).then(u=>(this.jobsById={...this.jobsById,[u.id]:u},this.trigger({jobsById:this.jobsById}),u),()=>{const{[n]:u,...R}=this.jobsById;this.jobsById=R,this.trigger({jobsById:this.jobsById})});v.getJob.promise(r)},acknowledgeJob(n){const s=C.H3(m.A.SystemJobsApiController.acknowledgeJob(n).url),r=(0,I.Ay)("DELETE",s).then(u=>{delete this.jobsById[u.id]});v.acknowledgeJob.promise(r)},cancelJob(n){const s=C.H3(m.A.SystemJobsApiController.cancelJob(n).url),r=(0,I.Ay)("DELETE",s).then(u=>{delete this.jobsById[u.id]});v.cancelJob.promise(r)}}));var U=t("GwjzBeBD"),B=(n=>(n.Cancelled="cancelled",n.Complete="complete",n.Error="error",n.Paused="paused",n.Runnable="runnable",n.Running="running",n))(B||{});const K=(0,c.default)(U.A)(({status:n,theme:s})=>{var r;const{primary:u,success:R,info:F,warning:ve,danger:$e}=s.colors.variant.dark,Me=(r={cancelled:ve,complete:R,error:$e,queued:F,running:u}[n])!=null?r:F;return(0,c.css)`
margin-left: 4px;
background-color: ${Me};
color: ${s.utils.readableColor(Me)};
`}),se=(0,c.default)(i.z2)`
margin-top: 2px;
margin-bottom: 5px;
`,X=c.default.div`
margin-bottom: 5px;
`,fe=(0,c.default)(p.Button)(({theme:n})=>(0,c.css)`
&& {
color: ${n.colors.global.textDefault};
&:hover {
color: ${n.colors.variant.default};
}
}
`),f=({job:n})=>{const s=n.job_status==="complete"||n.percent_complete===100||n.job_status==="cancelled"||n.job_status==="error",r=n.job_status==="runnable"?"queued":n.job_status,u=()=>F=>{F.preventDefault(),v.acknowledgeJob(n.id).catch(ve=>{S.A.error(ve.responseMessage,"Unable to acknowledge the job")})},R=()=>F=>{F.preventDefault(),window.confirm(`Are you sure you want to cancel system job "${n.info}"?`)&&v.cancelJob(n.id).catch(ve=>{S.A.error(ve.responseMessage,"Unable to cancel the job")})};return e.createElement("div",null,e.createElement(X,null,e.createElement(i.In,{name:"settings"})," ",e.createElement("span",{"data-toggle":"tooltip",title:n.name},n.info)," ","- on ",e.createElement(i.Gk,{nodeId:n.node_id})," ",e.createElement(i.sR,{dateTime:n.started_at})," ",e.createElement("span",{"data-toggle":"tooltip",title:`runtime: ${n.execution_duration}`},e.createElement(K,{status:r},r)),!s&&n.is_cancelable?e.createElement(p.Button,{type:"button",bsSize:"xs",bsStyle:"primary",className:"pull-right",onClick:R()},"Cancel"):e.createElement(fe,{type:"button",bsStyle:"link",onClick:u(),bsSize:"xs",className:"pull-right",title:"Acknowledge"},e.createElement(i.In,{name:"close"}))),!s&&n.provides_progress&&e.createElement(se,{bars:[{value:n.percent_complete,bsStyle:"info",animated:!0}]}))};f.propTypes={job:o().shape({info:o().string,id:o().string,percent_complete:o().number,is_cancelable:o().bool,name:o().string,node_id:o().string,started_at:o().string,execution_duration:o().string,job_status:o().oneOf(Object.values(B))}).isRequired};const y=f,h=({jobs:n})=>{if((0,e.useEffect)(()=>{v.list();const r=setInterval(v.list,2e3);return()=>{clearInterval(r)}},[]),!n)return e.createElement(i.y$,null);const s=Object.keys(n).map(r=>n[r]?n[r].jobs:[]).reduce((r,u)=>r.concat(u),[]);return e.createElement(p.Row,{className:"content"},e.createElement(p.Col,{md:12},e.createElement("h2",null,"System jobs"),e.createElement("p",{className:"description"},"A system job is a long-running task a graylog-server node executes for maintenance reasons. Some jobs provide progress information or can be stopped."),e.createElement(Ee,{jobs:s})))};h.propTypes={jobs:o().objectOf(o().shape({jobs:o().array}))},h.defaultProps={jobs:void 0};const w=(0,Q.A)(h,{systemJobsStore:H},({systemJobsStore:n})=>({jobs:n.jobs})),k=c.default.div(({theme:n})=>(0,c.css)`
margin-top: 10px;
border-bottom: 1px solid ${n.colors.gray[80]};
.progress {
margin-top: 2px;
margin-bottom: 5px;
}
.finished {
display: none;
position: relative;
top: -1px;
left: 2px;
font-family: Arial, sans-serif;
font-size: ${n.fonts.size.small};
}
`),P=(0,c.default)(p.Alert)`
margin-top: 10px;
`,re=({jobs:n})=>{const s=u=>e.createElement(k,{key:`job-${u.id}`},e.createElement(y,{job:u})),r=n.map(s);return r.length===0?e.createElement(P,{bsStyle:"info"},"No active system jobs."):e.createElement("span",null,r)};re.propTypes={jobs:o().arrayOf(o().object).isRequired};const Ee=re;var Te=t("9oVghaOd"),Se=t.n(Te),Ae=Object.defineProperty,Ce=(n,s,r)=>s in n?Ae(n,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[s]=r,xe=(n,s,r)=>(Ce(n,typeof s!="symbol"?s+"":s,r),r);class ge extends e.Component{render(){const{message:s}=this.props;return e.createElement("tr",null,e.createElement("td",null,Se()(s.timestamp).format()),e.createElement("td",null,e.createElement(i.Gk,{nodeId:s.node_id})),e.createElement("td",null,s.content))}}xe(ge,"propTypes",{message:o().object.isRequired});const Ie=ge,M=(0,T.Bv)("core.SystemMessages",()=>d().createStore({listenables:[],all(n){const s=C.H3(m.A.SystemMessagesApiController.all(n).url);return(0,I.Ur)("GET",s)}}));var J=Object.defineProperty,ye=(n,s,r)=>s in n?J(n,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[s]=r,pe=(n,s,r)=>(ye(n,typeof s!="symbol"?s+"":s,r),r);class Re extends e.Component{constructor(s){super(s),pe(this,"PER_PAGE",30),pe(this,"loadMessages",r=>{M.all(r).then(u=>{this.setState(u)})}),pe(this,"_onSelected",r=>{this.setState({currentPage:r}),this.loadMessages(r)}),this.state={currentPage:1}}componentDidMount(){const{currentPage:s}=this.state;this.loadMessages(s),this.interval=setInterval(()=>{const{currentPage:r}=this.state;this.loadMessages(r)},1e3)}componentWillUnmount(){clearInterval(this.interval)}render(){const{currentPage:s,messages:r,total:u}=this.state;let R;if(u&&r){const F=Math.ceil(u/this.PER_PAGE);R=e.createElement("div",null,e.createElement(Ue,{messages:r}),e.createElement("nav",{style:{textAlign:"center"}},e.createElement(i.dK,{totalPages:F,currentPage:s,onChange:this._onSelected})))}else R=e.createElement(i.y$,null);return e.createElement(p.Row,{className:"content"},e.createElement(p.Col,{md:12},e.createElement("h2",null,"System messages"),e.createElement("p",{className:"description"},"System messages are generated by graylog-server nodes on certain events that may be interesting for the Graylog administrators. You don't need to actively act upon any message in here because notifications will be raised for any events that required action."),R))}}const Oe=Re,De=(0,c.default)(p.Table)(({theme:n})=>(0,c.css)`
font-size: ${n.fonts.size.body};
a {
color: ${n.colors.global.textDefault};
}
`),Ne=c.default.th`
width: 200px;
`,be=({messages:n})=>e.createElement(De,{striped:!0,hover:!0,condensed:!0},e.createElement("thead",null,e.createElement("tr",null,e.createElement(Ne,null,"Timestamp"),e.createElement("th",null,"Node"),e.createElement("th",null,"Message"))),e.createElement("tbody",null,n.map(s=>e.createElement(Ie,{key:`message-${Math.random().toString(36).substring(7)}`,message:s}))));be.propTypes={messages:o().arrayOf(o().object).isRequired};const Ue=be;var Le=t("D4SbLiE/"),Be=t.n(Le),Fe=t("J1ga+jW6"),Ge=t("9xj2LQzD");const je=Be()({displayName:"TimesList",mixins:[d().connect(Fe.y),d().connect(Ge.z)],getInitialState(){return{time:Se()()}},componentDidMount(){this.interval=setInterval(()=>this.setState(this.getInitialState()),1e3)},componentWillUnmount(){clearInterval(this.interval)},render(){if(!this.state.system)return e.createElement(i.y$,null);const{time:n}=this.state,s="withTz",{currentUser:r}=this.state,u=this.state.system.timezone;return e.createElement(p.Row,{className:"content"},e.createElement(p.Col,{md:12},e.createElement("h2",null,"Time configuration"),e.createElement("p",{className:"description"},"Dealing with timezones can be confusing. Here you can see the timezone applied to different components of your system. You can check timezone settings of specific graylog-server nodes on their respective detail page."),e.createElement("dl",{className:"system-dl"},e.createElement("dt",null,"User ",e.createElement("em",null,r.username),":"),e.createElement("dd",null,e.createElement(i.Dc,{dateTime:n,format:s})),e.createElement("dt",null,"Your web browser:"),e.createElement("dd",null,e.createElement(i.Ye,{dateTime:n,format:s})),e.createElement("dt",null,"Graylog server:"),e.createElement("dd",null,e.createElement(i.Dc,{dateTime:n,format:s,tz:u})))))}});var He=t("Np3ug1OJ"),Pe=t("8wYeYPUw");const Je=()=>e.createElement(i.Qc,{title:"System overview"},e.createElement("span",null,e.createElement(i.Wj,{permissions:"notifications:read"},e.createElement(a,null)),e.createElement(Pe.A,null,e.createElement(i.Wj,{permissions:"systemjobs:read"},e.createElement(w,null))),e.createElement(He.D,null),e.createElement(Pe.A,null,e.createElement(A.gp,null)),e.createElement(i.Wj,{permissions:"indices:failures"},e.createElement(V,null)),e.createElement(je,null),e.createElement(i.Wj,{permissions:"systemmessages:read"},e.createElement(Oe,null))))},l5XbR7Md:(he,L,t)=>{t.d(L,{a:()=>C});var e=t("JnTtTRmZ"),i=t.n(e),A=t("9oVghaOd"),G=t.n(A),D=t("MdYBRjRJ"),d=t("U1Iufsob"),N=t("eFxcQyPT"),x=t("IA3Ku5lS");const C=(0,x.Bv)("core.IndexerFailures",()=>i().createStore({listenables:[],list(S,I){const T=D.H3(d.A.IndexerFailuresApiController.list(S,I).url);return(0,N.Ay)("GET",T)},count(S){const T=(S.format?S:G()(S)).format("YYYY-MM-DDTHH:mm:ss.SSS"),g=D.H3(d.A.IndexerFailuresApiController.count(T).url);return(0,N.Ay)("GET",g)}}))}}]);})();
//# sourceMappingURL=bb8c8232-6862.1db08f0b2779d8f1d1d7.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy