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

web-interface.assets.07ba022f-3519.28d81b61c382a5939d72.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([["07ba022f-3519"],{Np3ug1OJ:(he,L,t)=>{t.d(L,{O:()=>fe});var e=t("Z7aTuO5B"),i=t("ii0bleBb"),I=t.n(i),B=t("An3GrFet"),A=t.n(B),d=t("J6y4/h8P"),N=t("QL8i6bcz");const P=1e3/10;class x{constructor(){this.eventMutex=null}throttle(p,h){this.eventMutex||(this.eventMutex=setTimeout(()=>{this.eventMutex=null,p()},h||P))}}const S=x;var T=t("zkmy/ViL"),C=t("8fnsnG21"),g=t("uZqmR+ju"),z=t("/GOzvPf6"),$=t("JnTtTRmZ"),W=t.n($),Y=t("MdYBRjRJ"),q=t("eFxcQyPT"),H=t("IA3Ku5lS");const o=(0,H.ei)("core.ClusterTraffic",()=>W().createActions({getTraffic:{asyncResult:!0}})),c=(0,H.dS)("core.ClusterTraffic",()=>W().createStore({listenables:[o],traffic:void 0,getInitialState(){return{traffic:this.traffic}},getTraffic(f){const p=(0,q.ZP)("GET",Y.DC(`/system/cluster/traffic?days=${f}&daily=false`));return p.then(h=>{this.trigger({traffic:h})}),p}}));var E=t("Vg8s2y9S"),b=t("Pd5CUaTj"),y=t.n(b),R=t("FMrsY19w"),V=t.n(R),G=t("7FTHePOw"),_=t.n(G),re=t("9oVghaOd"),le=t.n(re),ae=t("TivnP0t5"),oe=t.n(ae);const Q=f=>{const w=oe()(y()(f,(O,se)=>({ts:se,bytes:O}))).dimension(O=>le()(O.ts).format("YYYY-MM-DD")).group().reduceSum(O=>O.bytes),k=V()(w.all(),O=>le().utc(O.key,"YYYY-MM-DD").toISOString());return _()(k,O=>O.value)},ie={formatTrafficData:Q};var ce=t("0TVxnHwi"),me=t("q2j1bVbz"),ue=t("8OvTct/Z"),de=t("v4GbOr/o"),ee=t("9RXNqxkm");const te=({width:f,traffic:p,layoutExtension:h})=>{if(!p)return e.createElement(z.$j,null);const w=[{type:"bar",x:Object.keys(p),y:Object.values(p)}],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(ee.Z,{chartData:w,layout:k}))};te.propTypes={traffic:I().object.isRequired,width:I().number.isRequired,layoutExtension:I().object},te.defaultProps={layoutExtension:{}};const a=te,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;
`,Z=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};
`),j=()=>e.createElement(Z,null,"Graylog cluster"),K=()=>{const f=(0,C.o)(E.S);if(!f)return e.createElement(z.$j,null);const{clusterId:p,nodeCount:h}=f;return e.createElement(v,{className:"system-dl"},e.createElement("dt",null,"Cluster ID:"),e.createElement("dd",null,p||"Not available"),e.createElement("dt",null,"Number of nodes:"),e.createElement("dd",null,h))},ne=()=>{var f;const{traffic:p}=(0,C.o)(c),[h,w]=(0,e.useState)(l[0]),[k,O]=(0,e.useState)(600),se=(0,e.useRef)(new S),Ee=(0,e.useRef)(null),Ce=N.G.exports("license"),Se=(0,me.Z)(),Ie=(0,ue.Z)(),xe=D=>{D.preventDefault();const J=Number(D.target.value);w(J),Ie(de.A.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 D=()=>{const{clientWidth:pe}=Ee.current;O(pe)},J=()=>{se.current.throttle(()=>D())};return window.addEventListener("resize",J),Ee.current&&D(),()=>{window.removeEventListener("resize",J)}},[]);const Pe=(0,ce.rq)(Se.permissions,["licenses:read"])&&((f=Ce[0])==null?void 0:f.EnterpriseTrafficGraph)||a;let ge=null,Te=e.createElement(z.$j,null);if(p){const D=A()(p.output,(pe,ye)=>pe+ye);ge=e.createElement("small",null,"Last ",h," days: ",T.Z.formatBytes(D));const J=Q(p.output);Te=e.createElement(Pe,{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:xe,formGroupClassName:"graph-days-select"},l.map(D=>e.createElement("option",{key:`option-${D}`,value:D},D)))),e.createElement(U,{ref:Ee},"Outgoing traffic ",ge),Te)},X=({layout:f,children:p})=>f==="compact"?e.createElement(g.Row,{className:"content"},e.createElement(g.Col,{md:12},e.createElement(j,null),e.createElement(g.Row,null,e.createElement(g.Col,{md:6},e.createElement(K,null),e.createElement("hr",null),p),e.createElement(g.Col,{md:6},e.createElement(ne,null))))):e.createElement(g.Row,{className:"content"},e.createElement(g.Col,{md:12},e.createElement(j,null),e.createElement(K,null),e.createElement("hr",null),p,e.createElement(g.Row,null,e.createElement(g.Col,{md:12},e.createElement(ne,null)))));X.propTypes={layout:I().oneOf(["default","compact"]),children:I().node},X.defaultProps={layout:"default",children:null};const fe=X},"y4tK+AhI":(he,L,t)=>{t.d(L,{Z:()=>o});var e=t("Z7aTuO5B"),i=t("9pdI12pI"),I=t.n(i),B=t("9oVghaOd"),A=t.n(B),d=t("J6y4/h8P"),N=t("ty2gyrHp"),P=t("uZqmR+ju"),x=t("/GOzvPf6"),S=t("E+CaPsQD"),T=t("d4kzUuQm"),C=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,W=(c,E,b)=>($(c,typeof E!="symbol"?E+"":E,b),b);const Y=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 ",I()(c).format("0,0")," failed indexing attempts in the last 24 hours.");class H extends e.Component{constructor(E){super(E),W(this,"_formatFailuresSummary",()=>e.createElement(P.Alert,{bsStyle:this.state.total===0?"success":"danger"},q(this.state.total),e.createElement(N.J,{to:T.ZP.SYSTEM.INDICES.FAILURES},e.createElement(P.Button,{bsStyle:"info",bsSize:"xs",className:"pull-right"},"Show errors")))),this.state={}}componentDidMount(){const E=A()().subtract(24,"hours");g.X.count(E).then(b=>{this.setState({total:b.count})})}render(){let E;return this.state.total===void 0?E=e.createElement(x.$j,null):E=this._formatFailuresSummary(),e.createElement(P.Row,{className:"content"},e.createElement(P.Col,{md:12},e.createElement(Y,null,e.createElement("h2",null,"Indexer failures"),e.createElement(C.eb,{page:S.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."),E))}}const o=H},kEBMGmbZ:(he,L,t)=>{t.d(L,{NM:()=>b,Mn:()=>_,OK:()=>ie,nV:()=>te});var e=t("Z7aTuO5B"),i=t("DUKaTDO2"),I=t("J6y4/h8P"),B=t("0TVxnHwi"),A=t("/GOzvPf6"),d=t("uZqmR+ju"),N=t("fVisTAey"),P=t("E+CaPsQD"),x=t("U1Iufsob"),S=t("eFxcQyPT"),T=t("MdYBRjRJ"),C=t("q2j1bVbz");const g=(0,I.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),W=I.default.div`
  display: flex;
  justify-content: space-between;
`,Y="indexerCluster.health",q="indexerCluster.name",H=()=>{const a=T.DC(x.Z.IndexerClusterApiController.health().url);return(0,S.vl)("GET",a)},o=()=>{const a=T.DC(x.Z.IndexerClusterApiController.name().url);return(0,S.vl)("GET",a)},c=a=>{const l={refetchInterval:5e3,retry:0,enabled:a},[{data:m,isFetching:v,error:Z,isSuccess:U,isRefetching:j},{data:K,isFetching:ne,error:X,isSuccess:fe,isRefetching:f}]=(0,i.useQueries)({queries:[{queryKey:[Y],queryFn:H,...l},{queryKey:[q],queryFn:o,...l}]});return{health:m,name:K,error:Z||X,loading:(v||ne)&&!j&&!f,isSuccess:U&&fe}},E=({minimal:a})=>{const l=(0,C.Z)(),m=(0,B.rq)(l.permissions,"indexercluster:read"),{health:v,name:Z,loading:U,error:j,isSuccess:K}=c(m);return m?e.createElement(d.Row,{className:"content"},e.createElement(d.Col,{md:12},!a&&e.createElement(W,null,e.createElement("h2",null,"Elasticsearch cluster"),e.createElement(N.eb,{page:P.Z.PAGES.CONFIGURING_ES,text:"Elasticsearch setup documentation",displayIcon:!0})),K&&e.createElement(_,{health:v,name:Z}),U&&e.createElement("p",null,e.createElement(A.$j,null)),j&&e.createElement($,{error:j}))):null};E.defaultProps={minimal:!1};const b=E;var y=t("ii0bleBb"),R=t.n(y);const V=(0,I.default)(d.Alert)`
  margin-top: 10px;
  margin-bottom: 5px;
`,G=({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"}},Z=(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(V,{bsStyle:v()},Z," ","Shards:"," ",a.shards.active," active,"," ",a.shards.initializing," initializing,"," ",a.shards.relocating," relocating,"," ",a.shards.unassigned," unassigned,"," ",e.createElement(N.eb,{page:P.Z.PAGES.CLUSTER_STATUS_EXPLAINED,text:"What does this mean?"}))};G.defaultProps={name:void 0},G.propTypes={health:R().object.isRequired,name:R().object};const _=G;var re=t("4IfE3Ihm"),le=Object.defineProperty,ae=(a,l,m)=>l in a?le(a,l,{enumerable:!0,configurable:!0,writable:!0,value:m}):a[l]=m,oe=(a,l,m)=>(ae(a,typeof l!="symbol"?l+"":l,m),m);class Q extends e.Component{render(){const{failure:l}=this.props;return e.createElement("tr",null,e.createElement("td",null,e.createElement(re.Z,{dateTime:l.timestamp})),e.createElement("td",null,l.index),e.createElement("td",null,l.letter_id),e.createElement("td",null,l.message))}}oe(Q,"propTypes",{failure:R().object.isRequired});const ie=Q;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 ee extends e.Component{render(){return this.props.failures.length===0?e.createElement(d.Alert,{bsStyle:"success"},e.createElement(A.JO,{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(ie,{key:`indexer-failure-${l.letter_id}`,failure:l})))))}}de(ee,"propTypes",{failures:R().arrayOf(R().object).isRequired});const te=ee},IMwNIfWz:(he,L,t)=>{t.r(L),t.d(L,{default:()=>Je});var e=t("Z7aTuO5B"),i=t("/GOzvPf6"),I=t("kEBMGmbZ"),B=t("0hhBr0/b"),A=t("JnTtTRmZ"),d=t.n(A),N=t("/yh+QgO6"),P=t.n(N),x=t("MdYBRjRJ"),S=t("jAGDuYSC"),T=t("eFxcQyPT"),C=t("IA3Ku5lS");const g=(0,C.ei)("core.Enterprise",()=>d().createActions({getLicenseInfo:{asyncResult:!0}})),z=(0,C.dS)("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,x.DC)(`${this.sourceUrl}/${n}`)},refresh(){this.getLicenseInfo()},getLicenseInfo(){const n=(0,T.ZP)("GET",this.enterpriseUrl("info"));n.then(s=>(this.licenseStatus=s.license_info.license_status,this.propagateChanges(),s),s=>{const r=P()(s,"additional.body.message",s.message);S.Z.error(`Couldn't load license information: ${r}`,"Error")}),g.getLicenseInfo.promise(n)}}));var $=t("y4tK+AhI");const Y=()=>{var n;const[s,r]=(0,e.useState)(e.createElement(i.$j,{text:"Looking for Index Failures..."})),u=(0,B.Z)("systemOverview"),M=(n=u==null?void 0:u[0])==null?void 0:n.component;return(0,e.useEffect)(()=>{M?g.getLicenseInfo().then(F=>{r(F.license_info.license_status==="installed"?e.createElement(M,null):e.createElement($.Z,null))}):r(e.createElement($.Z,null))},[M,r]),s};var q=t("kyFu+5jg"),H=t("ii0bleBb"),o=t.n(H),c=t("J6y4/h8P"),E=t("AbA4Yk3R"),b=t.n(E),y=t("uZqmR+ju"),R=t("bpbGjAaT"),V=t("8fnsnG21"),G=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:G.ZP.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:G.ZP.SYSTEM.INPUTS}};case"data_node_needs_provisioning":return{values:{DATA_NODE_CONFIGURATION:G.ZP.SYSTEM.configurationsSection("Data Node")}};default:return}}}const re=_,ae=n=>{const{messages:s}=(0,V.o)(R.p);(0,e.useEffect)(()=>{R.x.getHtmlMessage(n.type,n.key,re.getValuesForNotification(n))},[]);const r=`${n.type}-${n.key}`;return s==null?void 0:s[r]},oe=(0,c.default)(y.Alert)(({theme:n})=>(0,c.css)`
  margin-top: 10px;

  i {
    color: ${n.colors.gray[10]};
  }

  form {
    margin-bottom: 0;
  }
`),Q=c.default.span(({theme:n})=>(0,c.css)`
  margin-left: 3px;
  font-size: ${n.fonts.size.small};
`),ie=n=>b().sanitize(n),ce=({notification:n})=>{const s=ae(n),r=()=>{window.confirm("Really delete this notification?")&&R.x.delete(n.type,n.key)};return s?e.createElement(oe,{bsStyle:"danger",title:e.createElement(e.Fragment,null,s.title," ",e.createElement(Q,null,"(triggered ",e.createElement(i.ij,{dateTime:n.timestamp}),")")),onDismiss:r},e.createElement("div",{dangerouslySetInnerHTML:{__html:ie(s==null?void 0:s.description)},className:"notification-description"})):e.createElement(i.$j,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)}`,ee=(n,s)=>n===0?e.createElement(y.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,V.o)(R.p);return n?e.createElement(y.Row,{className:"content"},e.createElement(y.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."),ee(s,n))):e.createElement(i.$j,null)};var l=t("l4nHKZ4j"),m=t("U1Iufsob");const v=(0,C.ei)("core.SystemJobs",()=>d().createActions({list:{asyncResult:!0},getJob:{asyncResult:!0},acknowledgeJob:{asyncResult:!0},cancelJob:{asyncResult:!0}})),Z=(0,C.dS)("core.SystemJobs",()=>d().createStore({listenables:[v],jobsById:{},getInitialState(){return{jobs:this.jobs,jobsById:this.jobsById}},list(){const n=x.DC(m.Z.SystemJobsApiController.list().url),s=(0,T.vl)("GET",n).then(r=>(this.jobs=r,this.trigger({jobs:r}),r));v.list.promise(s)},getJob(n){const s=x.DC(m.Z.SystemJobsApiController.getJob(n).url),r=(0,T.ZP)("GET",s).then(u=>(this.jobsById={...this.jobsById,[u.id]:u},this.trigger({jobsById:this.jobsById}),u),()=>{const{[n]:u,...M}=this.jobsById;this.jobsById=M,this.trigger({jobsById:this.jobsById})});v.getJob.promise(r)},acknowledgeJob(n){const s=x.DC(m.Z.SystemJobsApiController.acknowledgeJob(n).url),r=(0,T.ZP)("DELETE",s).then(u=>{delete this.jobsById[u.id]});v.acknowledgeJob.promise(r)},cancelJob(n){const s=x.DC(m.Z.SystemJobsApiController.cancelJob(n).url),r=(0,T.ZP)("DELETE",s).then(u=>{delete this.jobsById[u.id]});v.cancelJob.promise(r)}}));var U=t("sUEzN8pX"),j=(n=>(n.Cancelled="cancelled",n.Complete="complete",n.Error="error",n.Paused="paused",n.Runnable="runnable",n.Running="running",n))(j||{});const K=(0,c.default)(U.j)(({status:n,theme:s})=>{var r;const{primary:u,success:M,info:F,warning:ve,danger:$e}=s.colors.variant.dark,De=(r={cancelled:ve,complete:M,error:$e,queued:F,running:u}[n])!=null?r:F;return(0,c.css)`
    margin-left: 4px;
    background-color: ${De};
    color: ${s.utils.readableColor(De)};
`}),ne=(0,c.default)(i.ko)`
  margin-top: 2px;
  margin-bottom: 5px;
`,X=c.default.div`
  margin-bottom: 5px;
`,fe=(0,c.default)(y.Button)(({theme:n})=>(0,c.css)`
  && {
    color: ${n.colors.variant.light.default};
    
    &: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.Z.error(ve.responseMessage,"Unable to acknowledge the job")})},M=()=>F=>{F.preventDefault(),window.confirm(`Are you sure you want to cancel system job "${n.info}"?`)&&v.cancelJob(n.id).catch(ve=>{S.Z.error(ve.responseMessage,"Unable to cancel the job")})};return e.createElement("div",null,e.createElement(X,null,e.createElement(i.JO,{name:"cog"})," ",e.createElement("span",{"data-toggle":"tooltip",title:n.name},n.info)," ","- on ",e.createElement(i.Zv,{nodeId:n.node_id})," ",e.createElement(i.ij,{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(y.Button,{type:"button",bsSize:"xs",bsStyle:"primary",className:"pull-right",onClick:M()},"Cancel"):e.createElement(fe,{type:"button",bsStyle:"link",onClick:u(),bsSize:"xs",className:"pull-right",title:"Acknowledge"},e.createElement(i.JO,{name:"x"}))),!s&&e.createElement(ne,{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(j))}).isRequired};const p=f,h=({jobs:n})=>{if((0,e.useEffect)(()=>{v.list();const r=setInterval(v.list,2e3);return()=>{clearInterval(r)}},[]),!n)return e.createElement(i.$j,null);const s=Object.keys(n).map(r=>n[r]?n[r].jobs:[]).reduce((r,u)=>r.concat(u),[]);return e.createElement(y.Row,{className:"content"},e.createElement(y.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,V.Z)(h,{systemJobsStore:Z},({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};
  }
`),O=(0,c.default)(y.Alert)`
  margin-top: 10px;
`,se=({jobs:n})=>{const s=u=>e.createElement(k,{key:`job-${u.id}`},e.createElement(p,{job:u})),r=n.map(s);return r.length===0?e.createElement(O,{bsStyle:"info"},"No active system jobs."):e.createElement("span",null,r)};se.propTypes={jobs:o().arrayOf(o().object).isRequired};const Ee=se;var Ce=t("9oVghaOd"),Se=t.n(Ce),Ie=Object.defineProperty,xe=(n,s,r)=>s in n?Ie(n,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[s]=r,Pe=(n,s,r)=>(xe(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.Zv,{nodeId:s.node_id})),e.createElement("td",null,s.content))}}Pe(ge,"propTypes",{message:o().object.isRequired});const Te=ge,D=(0,C.dS)("core.SystemMessages",()=>d().createStore({listenables:[],all(n){const s=x.DC(m.Z.SystemMessagesApiController.all(n).url);return(0,T.vl)("GET",s)}}));var J=Object.defineProperty,pe=(n,s,r)=>s in n?J(n,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[s]=r,ye=(n,s,r)=>(pe(n,typeof s!="symbol"?s+"":s,r),r);class Me extends e.Component{constructor(s){super(s),ye(this,"PER_PAGE",30),ye(this,"loadMessages",r=>{D.all(r).then(u=>{this.setState(u)})}),ye(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 M;if(u&&r){const F=Math.ceil(u/this.PER_PAGE);M=e.createElement("div",null,e.createElement(Ue,{messages:r}),e.createElement("nav",{style:{textAlign:"center"}},e.createElement(i.tl,{totalPages:F,currentPage:s,onChange:this._onSelected})))}else M=e.createElement(i.$j,null);return e.createElement(y.Row,{className:"content"},e.createElement(y.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."),M))}}const Re=Me,Ae=(0,c.default)(y.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(Ae,{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(Te,{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/"),je=t.n(Le),Fe=t("J1ga+jW6"),Be=t("9xj2LQzD");const Ge=je()({displayName:"TimesList",mixins:[d().connect(Fe.D),d().connect(Be.B)],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.$j,null);const{time:n}=this.state,s="withTz",{currentUser:r}=this.state,u=this.state.system.timezone;return e.createElement(y.Row,{className:"content"},e.createElement(y.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.EK,{dateTime:n,format:s})),e.createElement("dt",null,"Your web browser:"),e.createElement("dd",null,e.createElement(i.a$,{dateTime:n,format:s})),e.createElement("dt",null,"Graylog server:"),e.createElement("dd",null,e.createElement(i.EK,{dateTime:n,format:s,tz:u})))))}});var Ze=t("Np3ug1OJ"),Oe=t("8wYeYPUw");const Je=()=>e.createElement(i.$4,{title:"System overview"},e.createElement("span",null,e.createElement(i.AE,{permissions:"notifications:read"},e.createElement(a,null)),e.createElement(Oe.Z,null,e.createElement(i.AE,{permissions:"systemjobs:read"},e.createElement(w,null))),e.createElement(Ze.O,null),e.createElement(Oe.Z,null,e.createElement(I.NM,null)),e.createElement(i.AE,{permissions:"indices:failures"},e.createElement(Y,null)),e.createElement(Ge,null),e.createElement(i.AE,{permissions:"systemmessages:read"},e.createElement(Re,null))))},l5XbR7Md:(he,L,t)=>{t.d(L,{X:()=>x});var e=t("JnTtTRmZ"),i=t.n(e),I=t("9oVghaOd"),B=t.n(I),A=t("MdYBRjRJ"),d=t("U1Iufsob"),N=t("eFxcQyPT"),P=t("IA3Ku5lS");const x=(0,P.dS)("core.IndexerFailures",()=>i().createStore({listenables:[],list(S,T){const C=A.DC(d.Z.IndexerFailuresApiController.list(S,T).url);return(0,N.ZP)("GET",C)},count(S){const C=(S.format?S:B()(S)).format("YYYY-MM-DDTHH:mm:ss.SSS"),g=A.DC(d.Z.IndexerFailuresApiController.count(C).url);return(0,N.ZP)("GET",g)}}))}}]);})();

//# sourceMappingURL=07ba022f-3519.28d81b61c382a5939d72.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy