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

web-interface.assets.bb8c8232-4332.f6c7ce9b701df61cd38d.js Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["bb8c8232-4332"],{"lxV/WNDc":(D,v,e)=>{"use strict";e.d(v,{A:()=>h});var E=e("pmX897Fv"),n=e.n(E),t=e("DjJvgDaP"),i=e.n(t),d=i()(n());d.push([D.id,`.zL2vwyqmPLuE_eSRQt1q {
    margin-top: 10px;
}

.zL2vwyqmPLuE_eSRQt1q dt {
    float: left;
    clear: left;
}

.zL2vwyqmPLuE_eSRQt1q dd {
    margin-left: 160px;
}

.m4So8k7QXl39uuSoP2WS {
    margin-top: 10px;
}

.Bfhoisypey7je2baSbGs {
    opacity: 0.5;
    z-index: 20;
}
`,"",{version:3,sources:["webpack://./src/components/sidecars/common/CommonSidecarStyles.css"],names:[],mappings:"AAAA;IACI,gBAAgB;AACpB;;AAEA;IACI,WAAW;IACX,WAAW;AACf;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,YAAY;IACZ,WAAW;AACf",sourcesContent:[`:local(.deflist) {
    margin-top: 10px;
}

:local(.deflist) dt {
    float: left;
    clear: left;
}

:local(.deflist) dd {
    margin-left: 160px;
}

:local(.topMargin) {
    margin-top: 10px;
}

:local(.greyedOut) {
    opacity: 0.5;
    z-index: 20;
}
`],sourceRoot:""}]),d.locals={deflist:"zL2vwyqmPLuE_eSRQt1q",topMargin:"m4So8k7QXl39uuSoP2WS",greyedOut:"Bfhoisypey7je2baSbGs"};const h=d},SfPIQIJE:(D,v,e)=>{"use strict";e.d(v,{A:()=>S});var E=e("Z7aTuO5B"),n=e("J6y4/h8P"),t=e("rIl5IEuP"),i=e("ty2gyrHp"),d=e("IOI9nV80"),h=e("NV1/EHMi");const c=(0,n.default)(t.ButtonToolbar)`
  margin-bottom: 10px;
`,P=(0,n.default)(t.Button)(({theme:l})=>(0,n.css)`
  font-family: ${l.fonts.family.navigation};
  font-size: ${l.fonts.size.navigation};
  color: ${l.colors.variant.darker.default};
  
  &:hover,
  &:focus {
    background: inherit;
    text-decoration: none;
  }

  &:hover {
    color: inherit;
    ${(0,h.WS)(l)}
  }

  &.active {
    color: ${l.colors.global.textDefault};

    ${(0,h.at)(l)}

    &:hover,
    &:focus {
      ${(0,h.at)(l)}
    }
`);P.displayName="Button";const S=({items:l})=>E.createElement(c,null,l.map(({path:A,title:o,permissions:a,exactPathMatch:r})=>A?E.createElement(d.Wj,{permissions:a!=null?a:[],key:A},E.createElement(i.m,{to:A,relativeActive:!r},E.createElement(P,{bsStyle:"link"},E.createElement(h.Ay,null,o)))):null))},tBcsAR17:(D,v,e)=>{"use strict";e.d(v,{A:()=>c});var E=e("Z7aTuO5B"),n=e("SfPIQIJE"),t=e("d4kzUuQm"),i=e("rIl5IEuP");const d=[{title:"Overview",path:t.Ay.SYSTEM.SIDECARS.OVERVIEW,exactPathMatch:!0},{title:"Administration",path:t.Ay.SYSTEM.SIDECARS.ADMINISTRATION},{title:"Configuration",path:t.Ay.SYSTEM.SIDECARS.CONFIGURATION},{title:"Failure Tracking",path:t.Ay.SYSTEM.SIDECARS.FAILURE_TRACKING}],c=()=>E.createElement(i.Row,null,E.createElement(n.A,{items:d}))},GIeTfzK9:(D,v,e)=>{"use strict";e.d(v,{A:()=>_});var E=e("ii0bleBb"),n=e.n(E),t=e("Z7aTuO5B"),i=e("J6y4/h8P"),d=e("rIl5IEuP"),h=e("gqVHlIxA");const c=i.default.div`
  word-break: break-all;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  max-height: 500px;
`,P=({showModal:S,onHide:l,collectorName:A,collectorVerbose:o})=>t.createElement(h.A,{showModal:S,onHide:l,bsSize:"large"},t.createElement(d.Modal.Header,{closeButton:!0},t.createElement(d.Modal.Title,null,t.createElement("span",null,"Error Details for ",t.createElement("em",null,A)))),t.createElement(d.Modal.Body,null,t.createElement("pre",null,t.createElement(c,null,o||""))),t.createElement(d.Modal.Footer,null,t.createElement(d.Button,{type:"button",onClick:l},"Close")));P.propTypes={showModal:n().bool.isRequired,onHide:n().func.isRequired,collectorName:n().string.isRequired,collectorVerbose:n().string.isRequired};const _=P},Y7XN0VBN:(D,v,e)=>{"use strict";e.d(v,{A:()=>h});var E=e("PH5VRLCQ"),n=e.n(E),t=e("ueJll2OF"),i=e.n(t);const h={RUNNING:0,UNKNOWN:1,FAILING:2,STOPPED:3,properties:{0:{name:"running"},1:{name:"unknown"},2:{name:"failing"},3:{name:"stopped"}},isValidStatusCode(c){return Object.keys(this.properties).includes(String(c))},toStatusCode(c){const P=n()(c);return P===this.properties[this.RUNNING].name?this.RUNNING:P===this.properties[this.FAILING].name?this.FAILING:P===this.properties[this.STOPPED].name?this.STOPPED:this.UNKNOWN},toString(c){switch(i()(c)){case this.RUNNING:return"running";case this.FAILING:return"failing";case this.STOPPED:return"stopped";default:return"unknown"}}}},"qgOA+rtT":(D,v,e)=>{"use strict";e.r(v),e.d(v,{default:()=>H});var E=e("ii0bleBb"),n=e.n(E),t=e("Z7aTuO5B"),i=e("IOI9nV80"),d=e("E+CaPsQD"),h=e("d4kzUuQm"),c=e("D4SbLiE/"),P=e.n(c),_=e("WgCNywL/"),S=e.n(_),l=e("P5NcJT2c"),A=e.n(l),o=e("rIl5IEuP"),a=e("Y7XN0VBN"),r=e("kZOSo4r4"),m=Object.defineProperty,p=(u,s,g)=>s in u?m(u,s,{enumerable:!0,configurable:!0,writable:!0,value:g}):u[s]=g,f=(u,s,g)=>(p(u,typeof s!="symbol"?s+"":s,g),g);class I extends t.Component{constructor(){super(...arguments),f(this,"_headerCellFormatter",s=>t.createElement("th",null,s)),f(this,"_activityFormatter",s=>{const g=new Date().getTime();return new Date(s).getTime()>g-6e4?"info":""}),f(this,"_dirFormatter",s=>s.is_dir?t.createElement("span",null,t.createElement(i.In,{name:"folder_open"}),"\xA0\xA0",s.path):t.createElement("span",null,t.createElement(i.In,{name:"note",type:"regular"}),"\xA0\xA0",s.path)),f(this,"_fileListFormatter",s=>t.createElement("tr",{key:s.path,className:this._activityFormatter(s.mod_time)},t.createElement("td",{className:"limited"},t.createElement(i.Dc,{dateTime:s.mod_time})),t.createElement("td",{className:"limited"},s.size),t.createElement("td",null,this._dirFormatter(s))))}render(){const s=[],g=["Modified","Size","Path"];return t.createElement("div",null,t.createElement(i.bQ,{id:"log-file-list",className:"table-hover",headers:g,headerCellFormatter:this._headerCellFormatter,rows:this.props.files,dataRowFormatter:this._fileListFormatter,filterLabel:"Filter Files",filterKeys:s}))}}f(I,"propTypes",{files:n().array.isRequired});const C=I;var N=e("GIeTfzK9");const K=P()({propTypes:{sidecar:n().object.isRequired,collectors:n().array.isRequired},getInitialState(){return{collectorName:"",collectorVerbose:"",showVerboseModal:!1}},formatNodeDetails(u){if(!u)return t.createElement("p",null,"Node details are currently unavailable. Please wait a moment and ensure the sidecar is correctly connected to the server.");const s=u.metrics||{};return t.createElement("dl",{className:`${r.A.deflist} ${r.A.topMargin}`},t.createElement("dt",null,"IP Address"),t.createElement("dd",null,S()(u.ip,"Not available")),t.createElement("dt",null,"Operating System"),t.createElement("dd",null,S()(u.operating_system,"Not available")),t.createElement("dt",null,"CPU Idle"),t.createElement("dd",null,A()(s.cpu_idle)?`${s.cpu_idle}%`:"Not available"),t.createElement("dt",null,"Load"),t.createElement("dd",null,S()(s.load_1,"Not available")),t.createElement("dt",null,"Volumes > 75% full"),s.disks_75===void 0?t.createElement("dd",null,"Not available"):t.createElement("dd",null,s.disks_75.length>0?s.disks_75.join(", "):"None"))},formatCollectorStatus(u,s){if(!u||!s)return t.createElement("p",null,"Collectors status are currently unavailable. Please wait a moment and ensure the sidecar is correctly connected to the server.");if(!u.status)return t.createElement("p",null,"Did not receive collectors status, set the option ",t.createElement("code",null,"send_status: true")," in the sidecar configuration to see this information.");const g=u.status.collectors;if(g.length===0)return t.createElement("p",null,"There are no collectors configured in this sidecar.");const O=[];return g.forEach(M=>{const T=s.find(z=>z.id===M.collector_id);let R,U,y,W;switch(M.status){case a.A.RUNNING:R="Collector is running.",y="text-success",U=t.createElement(i.In,{name:"play_arrow"});break;case a.A.FAILING:R=M.message,y="text-danger",U=t.createElement(i.In,{name:"warning"}),M.verbose_message&&(W=t.createElement(o.Button,{bsStyle:"link",bsSize:"xs",onClick:()=>this._onShowVerbose(T.name,M.verbose_message)},"Show Details"));break;case a.A.STOPPED:R=M.message,y="text-danger",U=t.createElement(i.In,{name:"stop"});break;default:R="Collector status is currently unknown.",y="text-info",U=t.createElement(i.In,{name:"help"})}T&&O.push(t.createElement("dt",{key:`${T.id}-key`,className:y},T.name),t.createElement("dd",{key:`${T.id}-description`,className:y},U,"\u2002",R,"\u2002",W))}),t.createElement("dl",{className:r.A.deflist},O)},_onShowVerbose(u,s){this.setState({collectorName:u,collectorVerbose:s,showVerboseModal:!0})},_onHideVerbose(){this.setState({showVerboseModal:!1})},render(){const{sidecar:u}=this.props,s=u.node_details.log_file_list||[];return t.createElement("div",null,t.createElement(o.Row,{className:"content"},t.createElement(o.Col,{md:12},t.createElement("h2",null,"Node details"),this.formatNodeDetails(u.node_details))),t.createElement(o.Row,{className:"content"},t.createElement(o.Col,{md:12},t.createElement("h2",null,"Collectors status"),t.createElement("div",{className:r.A.topMargin},this.formatCollectorStatus(u.node_details,this.props.collectors)))),t.createElement(o.Row,{className:"content",hidden:s.length===0},t.createElement(o.Col,{md:12},t.createElement("h2",null,"Log Files"),t.createElement("p",{className:r.A.topMargin},"Recently modified files will be highlighted in blue."),t.createElement("div",null,t.createElement(C,{files:s})))),t.createElement(N.A,{showModal:this.state.showVerboseModal,onHide:this._onHideVerbose,collectorName:this.state.collectorName,collectorVerbose:this.state.collectorVerbose}))}});var $=e("c9JM82dZ"),F=e("kHvj/lAD"),x=e("r6oYOZXJ"),j=e("tBcsAR17"),V=e("N6x7vnl1"),b=Object.defineProperty,G=(u,s,g)=>s in u?b(u,s,{enumerable:!0,configurable:!0,writable:!0,value:g}):u[s]=g,B=(u,s,g)=>(G(u,typeof s!="symbol"?s+"":s,g),g);class L extends t.Component{constructor(s){super(s),B(this,"reloadSidecar",g=>{x.U.getSidecar(this.props.params.sidecarId).then(O=>this.setState({sidecar:O}),O=>{O.status===404&&g.push(h.Ay.SYSTEM.SIDECARS.OVERVIEW)})}),B(this,"reloadCollectors",()=>{F.C.all().then(g=>this.setState({collectors:g.collectors}))}),this.state={sidecar:void 0}}componentDidMount(){const s=()=>this.reloadSidecar(this.props.history);s(),this.reloadCollectors(),this.interval=setInterval(s,5e3)}componentWillUnmount(){this.interval&&clearInterval(this.interval)}render(){const{sidecar:s}=this.state,{collectors:g}=this.state;return!s||!g?t.createElement(i.Qc,{title:"Sidecar status"},t.createElement(i.y$,null)):t.createElement(i.Qc,{title:`Sidecar ${s.node_name} status`},t.createElement(j.A,null),t.createElement(i.zY,{title:t.createElement("span",null,"Sidecar ",t.createElement("em",null,s.node_name," status")),documentationLink:{title:"Sidecars documentation",path:d.A.PAGES.COLLECTOR_STATUS}},t.createElement("span",null,"A status overview of the Graylog Sidecar.")),t.createElement(K,{sidecar:s,collectors:g}))}}B(L,"propTypes",{params:n().object.isRequired,history:n().object.isRequired});const H=(0,V.A)((0,$.A)(L))},c9JM82dZ:(D,v,e)=>{"use strict";e.d(v,{A:()=>i});var E=e("Z7aTuO5B"),n=e("yAXMqwrl");const i=d=>h=>{const c=(0,n.useParams)();return E.createElement(d,{...h,params:c})}},"kHvj/lAD":(D,v,e)=>{"use strict";e.d(v,{C:()=>l,k:()=>A});var E=e("JnTtTRmZ"),n=e.n(E),t=e("oCSEoDew"),i=e.n(t),d=e("wXrUUKFq"),h=e.n(d),c=e("MdYBRjRJ"),P=e("eFxcQyPT"),_=e("jAGDuYSC"),S=e("IA3Ku5lS");const l=(0,S.rN)("core.Collectors",()=>n().createActions({getCollector:{asyncResult:!0},all:{asyncResult:!0},list:{asyncResult:!0},create:{asyncResult:!0},update:{asyncResult:!0},delete:{asyncResult:!0},copy:{asyncResult:!0},validate:{asyncResult:!0}})),A=(0,S.Bv)("core.Collectors",()=>n().createStore({listenables:[l],sourceUrl:"/sidecar",collectors:void 0,query:void 0,pagination:{page:void 0,pageSize:void 0,total:void 0},total:void 0,paginatedCollectors:void 0,getInitialState(){return{collectors:this.collectors}},propagateChanges(){this.trigger({collectors:this.collectors,paginatedCollectors:this.paginatedCollectors,query:this.query,total:this.total,pagination:this.pagination})},getCollector(o){const a=(0,P.Ay)("GET",c.H3(`${this.sourceUrl}/collectors/${o}`));a.catch(r=>{let m=`Fetching Collector failed with status: ${r}`;r.status===404&&(m=`Unable to find a collector with ID <${o}>, please ensure it was not deleted.`),_.A.error(m,"Could not retrieve Collector")}),l.getCollector.promise(a)},_fetchCollectors({query:o,page:a,pageSize:r}){const m={query:o,page:a,per_page:r},p=i()(`${this.sourceUrl}/collectors/summary`).search(m).toString();return(0,P.Ay)("GET",c.H3(p))},all(){const o=this._fetchCollectors({pageSize:0});o.then(a=>(this.collectors=a.collectors,this.propagateChanges(),a.collectors),a=>{_.A.error(`Fetching collectors failed with status: ${a}`,"Could not retrieve collectors")}),l.all.promise(o)},list({query:o="",page:a=1,pageSize:r=10}){const m=this._fetchCollectors({query:o,page:a,pageSize:r});m.then(p=>(this.query=p.query,this.pagination={page:p.pagination.page,pageSize:p.pagination.per_page,total:p.pagination.total},this.total=p.total,this.paginatedCollectors=p.collectors,this.propagateChanges(),p.collectors),p=>{_.A.error(`Fetching collectors failed with status: ${p}`,"Could not retrieve collectors")}),l.list.promise(m)},refreshList(){this.list({query:this.query,page:this.pagination.page,pageSize:this.pagination.pageSize})},create(o){const a=(0,P.Ay)("POST",c.H3(`${this.sourceUrl}/collectors`),o);a.then(r=>(_.A.success("","Collector successfully created"),this.collectors=r.collectors,this.propagateChanges(),this.collectors),r=>{_.A.error(`Fetching collectors failed with status: ${r}`,"Could not retrieve collectors")}),l.create.promise(a)},update(o){const a=(0,P.Ay)("PUT",c.H3(`${this.sourceUrl}/collectors/${o.id}`),o);a.then(r=>(_.A.success("","Collector successfully updated"),this.collectors=r.collectors,this.propagateChanges(),this.collectors),r=>{_.A.error(`Fetching collectors failed with status: ${r}`,"Could not retrieve collectors")}),l.update.promise(a)},delete(o){const a=c.H3(`${this.sourceUrl}/collectors/${o.id}`),r=(0,P.Ay)("DELETE",a);r.then(m=>(_.A.success("",`Collector "${o.name}" successfully deleted`),this.refreshList(),m),m=>{_.A.error(`Deleting Collector failed: ${m.status===400?m.responseMessage:m.message}`,`Could not delete Collector "${o.name}"`)}),l.delete.promise(r)},copy(o,a){const r=c.H3(`${this.sourceUrl}/collectors/${o}/${a}`),p=(0,P.Ay)("POST",r);p.then(f=>(_.A.success("",`Collector "${a}" successfully copied`),this.refreshList(),f),f=>{_.A.error(`Saving collector "${a}" failed with status: ${f.message}`,"Could not save Collector")}),l.copy.promise(p)},validate(o){const a={id:" ",service_type:"exec",executable_path:" ",default_template:" "};h()(a,o);const r=(0,P.Ay)("POST",c.H3(`${this.sourceUrl}/collectors/validate`),a);r.then(m=>m,m=>_.A.error(`Validating collector "${a.name}" failed with status: ${m.message}`,"Could not validate collector")),l.validate.promise(r)}}))},r6oYOZXJ:(D,v,e)=>{"use strict";e.d(v,{U:()=>_,W:()=>S});var E=e("JnTtTRmZ"),n=e.n(E),t=e("oCSEoDew"),i=e.n(t),d=e("MdYBRjRJ"),h=e("jAGDuYSC"),c=e("eFxcQyPT"),P=e("IA3Ku5lS");const _=(0,P.rN)("core.Sidecars",()=>n().createActions({listPaginated:{asyncResult:!0},getSidecar:{asyncResult:!0},getSidecarActions:{asyncResult:!0},restartCollector:{asyncResult:!0},assignConfigurations:{asyncResult:!0}})),S=(0,P.Bv)("core.Sidecars",()=>n().createStore({listenables:[_],sourceUrl:"/sidecars",sidecars:void 0,onlyActive:void 0,pagination:{count:void 0,page:void 0,pageSize:void 0,total:void 0},query:void 0,sort:{field:void 0,order:void 0},init(){this.propagateChanges()},propagateChanges(){this.trigger({sidecars:this.sidecars,query:this.query,onlyActive:this.onlyActive,pagination:this.pagination,sort:this.sort})},listPaginated({query:l="",page:A=1,pageSize:o=50,onlyActive:a=!1,sortField:r="node_name",order:m="asc"}){const p={query:l,page:A,per_page:o,only_active:a,sort:r,order:m},f=i()(this.sourceUrl).search(p).toString(),I=(0,c.Ur)("GET",d.H3(f));I.then(C=>(this.sidecars=C.sidecars,this.query=C.query,this.onlyActive=C.only_active,this.pagination={total:C.pagination.total,count:C.pagination.count,page:C.pagination.page,pageSize:C.pagination.per_page},this.sort={field:C.sort,order:C.order},this.propagateChanges(),C),C=>{h.A.error(C.status===400?C.responseMessage:`Fetching Sidecars failed with status: ${C.message}`,"Could not retrieve Sidecars")}),_.listPaginated.promise(I)},getSidecar(l){const A=(0,c.Ur)("GET",d.H3(`${this.sourceUrl}/${l}`));A.catch(o=>{let a=`Fetching Sidecar failed with status: ${o}`;o.status===404&&(a=`Unable to find a sidecar with ID <${l}>, maybe it was inactive for too long.`),h.A.error(a,"Could not retrieve Sidecar")}),_.getSidecar.promise(A)},restartCollector(l,A){const o={};o.collector=A,o.properties={},o.properties.restart=!0;const a=(0,c.Ay)("PUT",d.H3(`${this.sourceUrl}/${l}/action`),[o]);a.catch(r=>{h.A.error(`Restarting Sidecar failed with status: ${r}`,"Could not restart Sidecar")}),_.restartCollector.promise(a)},getSidecarActions(l){const A=(0,c.Ur)("GET",d.H3(`${this.sourceUrl}/${l}/action`));A.catch(o=>{h.A.error(`Fetching Sidecar actions failed with status: ${o}`,"Could not retrieve Sidecar actions")}),_.getSidecarActions.promise(A)},toConfigurationAssignmentDto(l,A,o){return{node_id:l,collector_id:A,configuration_id:o}},assignConfigurations(l,A){const o=l.map(({sidecar:r,collector:m})=>{const p=r.assignments.filter(f=>f.collector_id!==m.id);return A.forEach(f=>{p.push({collector_id:m.id,configuration_id:f.id})}),{node_id:r.node_id,assignments:p}}),a=(0,c.Ay)("PUT",d.H3(`${this.sourceUrl}/configurations`),{nodes:o});a.then(r=>(h.A.success("",`Configuration change for ${l.length} collectors requested`),r),r=>{h.A.error(`Fetching Sidecar actions failed with status: ${r}`,"Could not retrieve Sidecar actions")}),_.assignConfigurations.promise(a)}}))},PH5VRLCQ:(D,v,e)=>{var E=e("R+B8SaP1"),n=E(function(t,i,d){return t+(d?" ":"")+i.toLowerCase()});D.exports=n},kZOSo4r4:(D,v,e)=>{"use strict";e.d(v,{A:()=>m});var E=e("dFpwyWHg"),n=e.n(E),t=e("C2ikvoS0"),i=e.n(t),d=e("1IntWRSu"),h=e.n(d),c=e("8nGWeFnd"),P=e.n(c),_=e("TeAcaicX"),S=e.n(_),l=e("eE3+5goe"),A=e.n(l),o=e("lxV/WNDc"),a={};a.styleTagTransform=A(),a.setAttributes=P(),a.insert=h().bind(null,"head"),a.domAPI=i(),a.insertStyleElement=S();var r=n()(o.A,a);const m=o.A&&o.A.locals?o.A.locals:void 0}}]);})();

//# sourceMappingURL=bb8c8232-4332.f6c7ce9b701df61cd38d.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy