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

web-interface.assets.325e2d4b-5666.e21cb6c13937ace06a1e.js Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
"use strict";(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["325e2d4b-5666"],{pLLmkYy5:(e,t,r)=>{r.d(t,{Z:()=>u});var s=r("Z7aTuO5B"),a=r("J6y4/h8P"),l=r("F9olzlTR"),o=r("EeAwn/0x"),i=r("0zTRKSqx"),n=r("XR6lEGGZ");const c=(0,a.default)(l.Si).withConfig({displayName:"PageNavigation__Container",componentId:"sc-1if5i40-0"})(["margin-bottom:10px;"]),d=(0,a.default)(l.zx).withConfig({displayName:"PageNavigation__StyledButton",componentId:"sc-1if5i40-1"})((e=>{let{theme:t}=e;return(0,a.css)(["font-family:",";font-size:",";&&&&{color:",";:hover,:focus{text-decoration:none;}:hover{","}&.active{color:",";"," :hover,:focus{","}}}"],t.fonts.family.navigation,t.fonts.size.navigation,t.colors.variant.darker.default,(0,n.RF)(t),t.colors.global.textDefault,(0,n.A7)(t),(0,n.A7)(t))}));d.displayName="Button";const u=e=>{let{items:t}=e;return s.createElement(c,null,t.map((e=>{let{path:t,title:r,permissions:a,exactPathMatch:l}=e;return t?s.createElement(i.AE,{permissions:null!=a?a:[],key:t},s.createElement(o.J,{to:t,relativeActive:!l},s.createElement(d,{bsStyle:"link"},s.createElement(n.ZP,null,r)))):null})))}},b76tcxG5:(e,t,r)=>{r.d(t,{Z:()=>n});var s=r("Z7aTuO5B"),a=r("pLLmkYy5"),l=r("DeVaSktS"),o=r("F9olzlTR");const i=[{title:"Overview",path:l.ZP.SYSTEM.SIDECARS.OVERVIEW,exactPathMatch:!0},{title:"Administration",path:l.ZP.SYSTEM.SIDECARS.ADMINISTRATION},{title:"Configuration",path:l.ZP.SYSTEM.SIDECARS.CONFIGURATION}],n=()=>s.createElement(o.X2,null,s.createElement(a.Z,{items:i}))},"k1+oENXy":(e,t,r)=>{r.d(t,{Z:()=>l});var s=r("nHcjWeCO"),a=r.n(s);const l={RUNNING:0,UNKNOWN:1,FAILING:2,STOPPED:3,properties:{0:{name:"running"},1:{name:"unknown"},2:{name:"failing"},3:{name:"stopped"}},isValidStatusCode(e){return Object.keys(this.properties).includes(String(e))},toStatusCode(e){const t=a().lowerCase(e);return t===this.properties[this.RUNNING].name?this.RUNNING:t===this.properties[this.FAILING].name?this.FAILING:t===this.properties[this.STOPPED].name?this.STOPPED:this.UNKNOWN},toString(e){switch(a().toNumber(e)){case this.RUNNING:return"running";case this.FAILING:return"failing";case this.STOPPED:return"stopped";default:return"unknown"}}}},nEaP1vtY:(e,t,r)=>{r.r(t),r.d(t,{default:()=>I});var s=r("ii0bleBb"),a=r.n(s),l=r("Z7aTuO5B"),o=r("0zTRKSqx"),i=r("4Js8dUPg"),n=r("DeVaSktS"),c=r("BSHS2nUH"),d=r("D4SbLiE/"),u=r.n(d),m=r("nHcjWeCO"),h=r.n(m),p=r("F9olzlTR"),g=r("k1+oENXy"),f=r("GfxhvOn/");function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class S extends l.Component{constructor(){super(...arguments),E(this,"_headerCellFormatter",(e=>l.createElement("th",null,e))),E(this,"_activityFormatter",(e=>{const t=(new Date).getTime();return new Date(e).getTime()>t-6e4?"info":""})),E(this,"_dirFormatter",(e=>e.is_dir?l.createElement("span",null,l.createElement(o.JO,{name:"folder-open"}),"  ",e.path):l.createElement("span",null,l.createElement(o.JO,{name:"file",type:"regular"}),"  ",e.path))),E(this,"_fileListFormatter",(e=>l.createElement("tr",{key:e.path,className:this._activityFormatter(e.mod_time)},l.createElement("td",{className:"limited"},l.createElement(o.EK,{dateTime:e.mod_time})),l.createElement("td",{className:"limited"},e.size),l.createElement("td",null,this._dirFormatter(e)))))}render(){return l.createElement("div",null,l.createElement(o.wQ,{id:"log-file-list",className:"table-hover",headers:["Modified","Size","Path"],headerCellFormatter:this._headerCellFormatter,rows:this.props.files,dataRowFormatter:this._fileListFormatter,filterLabel:"Filter Files",filterKeys:[]}))}}E(S,"propTypes",{files:a().array.isRequired});const C=S;var v=r("UQF3Dyqs");function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class A extends l.Component{constructor(){super(...arguments),y(this,"open",(()=>{this.sourceModal.open()})),y(this,"hide",(()=>{this.sourceModal.close()}))}render(){return l.createElement(v.Z,{ref:e=>{this.sourceModal=e},bsSize:"large"},l.createElement(p.u_.Header,{closeButton:!0},l.createElement(p.u_.Title,null,l.createElement("span",null,"Error Details for ",l.createElement("em",null,this.props.collectorName)))),l.createElement(p.u_.Body,null,l.createElement("div",{className:"configuration"},l.createElement("pre",null,this.props.collectorVerbose||""))),l.createElement(p.u_.Footer,null,l.createElement(p.zx,{type:"button",onClick:this.hide},"Close")))}}y(A,"propTypes",{collectorName:a().string.isRequired,collectorVerbose:a().string.isRequired});const b=A,N=u()({displayName:"SidecarStatus",propTypes:{sidecar:a().object.isRequired,collectors:a().array.isRequired},getInitialState:()=>({collectorName:"",collectorVerbose:""}),formatNodeDetails(e){if(!e)return l.createElement("p",null,"Node details are currently unavailable. Please wait a moment and ensure the sidecar is correctly connected to the server.");const t=e.metrics||{};return l.createElement("dl",{className:`${f.Z.deflist} ${f.Z.topMargin}`},l.createElement("dt",null,"IP Address"),l.createElement("dd",null,h().defaultTo(e.ip,"Not available")),l.createElement("dt",null,"Operating System"),l.createElement("dd",null,h().defaultTo(e.operating_system,"Not available")),l.createElement("dt",null,"CPU Idle"),l.createElement("dd",null,h().isNumber(t.cpu_idle)?`${t.cpu_idle}%`:"Not available"),l.createElement("dt",null,"Load"),l.createElement("dd",null,h().defaultTo(t.load_1,"Not available")),l.createElement("dt",null,"Volumes > 75% full"),void 0===t.disks_75?l.createElement("dd",null,"Not available"):l.createElement("dd",null,t.disks_75.length>0?t.disks_75.join(", "):"None"))},formatCollectorStatus(e,t){if(!e||!t)return l.createElement("p",null,"Collectors status are currently unavailable. Please wait a moment and ensure the sidecar is correctly connected to the server.");if(!e.status)return l.createElement("p",null,"Did not receive collectors status, set the option ",l.createElement("code",null,"send_status: true")," in the sidecar configuration to see this information.");const r=e.status.collectors;if(0===r.length)return l.createElement("p",null,"There are no collectors configured in this sidecar.");const s=[];return r.forEach((e=>{const r=t.find((t=>t.id===e.collector_id));let a,i,n,c;switch(e.status){case g.Z.RUNNING:a="Collector is running.",n="text-success",i=l.createElement(o.JO,{name:"play",fixedWidth:!0});break;case g.Z.FAILING:a=e.message,n="text-danger",i=l.createElement(o.JO,{name:"exclamation-triangle",fixedWidth:!0}),e.verbose_message&&(c=l.createElement(p.zx,{bsStyle:"link",bsSize:"xs",onClick:()=>this._onShowVerbose(r.name,e.verbose_message)},"Show Details"));break;case g.Z.STOPPED:a=e.message,n="text-danger",i=l.createElement(o.JO,{name:"stop",fixedWidth:!0});break;default:a="Collector status is currently unknown.",n="text-info",i=l.createElement(o.JO,{name:"question-circle",fixedWidth:!0})}r&&s.push(l.createElement("dt",{key:`${r.id}-key`,className:n},r.name),l.createElement("dd",{key:`${r.id}-description`,className:n},i," ",a," ",c))})),l.createElement("dl",{className:f.Z.deflist},s)},_onShowVerbose(e,t){this.setState({collectorName:e,collectorVerbose:t}),this.modal.open()},render(){const{sidecar:e}=this.props,t=e.node_details.log_file_list||[];return l.createElement("div",null,l.createElement(p.X2,{className:"content"},l.createElement(p.JX,{md:12},l.createElement("h2",null,"Node details"),this.formatNodeDetails(e.node_details))),l.createElement(p.X2,{className:"content"},l.createElement(p.JX,{md:12},l.createElement("h2",null,"Collectors status"),l.createElement("div",{className:f.Z.topMargin},this.formatCollectorStatus(e.node_details,this.props.collectors)))),l.createElement(p.X2,{className:"content",hidden:0===t.length},l.createElement(p.JX,{md:12},l.createElement("h2",null,"Log Files"),l.createElement("p",{className:f.Z.topMargin},"Recently modified files will be highlighted in blue."),l.createElement("div",null,l.createElement(C,{files:t})))),l.createElement(b,{ref:e=>{this.modal=e},collectorName:this.state.collectorName,collectorVerbose:this.state.collectorVerbose}))}});var _=r("CfS4XPvw"),Z=r("dfn/QTgc"),w=r("fwWvm3G9"),P=r("b76tcxG5");function T(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class R extends l.Component{constructor(e){super(e),T(this,"reloadSidecar",(()=>{w.V.getSidecar(this.props.params.sidecarId).then((e=>this.setState({sidecar:e})),(e=>{404===e.status&&c.Z.push(n.ZP.SYSTEM.SIDECARS.OVERVIEW)}))})),T(this,"reloadCollectors",(()=>{Z.v.all().then((e=>this.setState({collectors:e.collectors})))})),this.state={sidecar:void 0}}componentDidMount(){this.reloadSidecar(),this.reloadCollectors(),this.interval=setInterval(this.reloadSidecar,5e3)}componentWillUnmount(){this.interval&&clearInterval(this.interval)}render(){const{sidecar:e}=this.state,{collectors:t}=this.state;return!e||!t?l.createElement(o.$4,{title:"Sidecar status"},l.createElement(o.$j,null)):l.createElement(o.$4,{title:`Sidecar ${e.node_name} status`},l.createElement(P.Z,null),l.createElement(o.mr,{title:l.createElement("span",null,"Sidecar ",l.createElement("em",null,e.node_name," status")),documentationLink:{title:"Sidecars documentation",path:i.Z.PAGES.COLLECTOR_STATUS}},l.createElement("span",null,"A status overview of the Graylog Sidecar.")),l.createElement(N,{sidecar:e,collectors:t}))}}T(R,"propTypes",{params:a().object.isRequired});const I=(0,_.Z)(R)},"dfn/QTgc":(e,t,r)=>{r.d(t,{d:()=>p,v:()=>h});var s=r("JnTtTRmZ"),a=r.n(s),l=r("oCSEoDew"),o=r.n(l),i=r("nHcjWeCO"),n=r.n(i),c=r("0wQfx7YJ"),d=r("OqsMdpSm"),u=r("4af3+9mh"),m=r("xc00RsLr");const h=(0,m.ei)("core.Collectors",(()=>a().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}}))),p=(0,m.dS)("core.Collectors",(()=>a().createStore({listenables:[h],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(e){const t=(0,d.ZP)("GET",c.DC(`${this.sourceUrl}/collectors/${e}`));t.catch((t=>{let r=`Fetching Collector failed with status: ${t}`;404===t.status&&(r=`Unable to find a collector with ID <${e}>, please ensure it was not deleted.`),u.Z.error(r,"Could not retrieve Collector")})),h.getCollector.promise(t)},_fetchCollectors(e){let{query:t,page:r,pageSize:s}=e;const a={query:t,page:r,per_page:s},l=o()(`${this.sourceUrl}/collectors/summary`).search(a).toString();return(0,d.ZP)("GET",c.DC(l))},all(){const e=this._fetchCollectors({pageSize:0});e.then((e=>(this.collectors=e.collectors,this.propagateChanges(),e.collectors)),(e=>{u.Z.error(`Fetching collectors failed with status: ${e}`,"Could not retrieve collectors")})),h.all.promise(e)},list(e){let{query:t="",page:r=1,pageSize:s=10}=e;const a=this._fetchCollectors({query:t,page:r,pageSize:s});a.then((e=>(this.query=e.query,this.pagination={page:e.pagination.page,pageSize:e.pagination.per_page,total:e.pagination.total},this.total=e.total,this.paginatedCollectors=e.collectors,this.propagateChanges(),e.collectors)),(e=>{u.Z.error(`Fetching collectors failed with status: ${e}`,"Could not retrieve collectors")})),h.list.promise(a)},refreshList(){this.list({query:this.query,page:this.pagination.page,pageSize:this.pagination.pageSize})},create(e){const t=(0,d.ZP)("POST",c.DC(`${this.sourceUrl}/collectors`),e);t.then((e=>(u.Z.success("","Collector successfully created"),this.collectors=e.collectors,this.propagateChanges(),this.collectors)),(e=>{u.Z.error(`Fetching collectors failed with status: ${e}`,"Could not retrieve collectors")})),h.create.promise(t)},update(e){const t=(0,d.ZP)("PUT",c.DC(`${this.sourceUrl}/collectors/${e.id}`),e);t.then((e=>(u.Z.success("","Collector successfully updated"),this.collectors=e.collectors,this.propagateChanges(),this.collectors)),(e=>{u.Z.error(`Fetching collectors failed with status: ${e}`,"Could not retrieve collectors")})),h.update.promise(t)},delete(e){const t=c.DC(`${this.sourceUrl}/collectors/${e.id}`),r=(0,d.ZP)("DELETE",t);r.then((t=>(u.Z.success("",`Collector "${e.name}" successfully deleted`),this.refreshList(),t)),(t=>{u.Z.error(`Deleting Collector failed: ${400===t.status?t.responseMessage:t.message}`,`Could not delete Collector "${e.name}"`)})),h.delete.promise(r)},copy(e,t){const r=c.DC(`${this.sourceUrl}/collectors/${e}/${t}`),s=(0,d.ZP)("POST",r);s.then((e=>(u.Z.success("",`Collector "${t}" successfully copied`),this.refreshList(),e)),(e=>{u.Z.error(`Saving collector "${t}" failed with status: ${e.message}`,"Could not save Collector")})),h.copy.promise(s)},validate(e){const t={id:" ",service_type:"exec",executable_path:" ",default_template:" "};n().merge(t,e);const r=(0,d.ZP)("POST",c.DC(`${this.sourceUrl}/collectors/validate`),t);r.then((e=>e),(e=>u.Z.error(`Validating collector "${t.name}" failed with status: ${e.message}`,"Could not validate collector"))),h.validate.promise(r)}})))},fwWvm3G9:(e,t,r)=>{r.d(t,{V:()=>u,b:()=>m});var s=r("JnTtTRmZ"),a=r.n(s),l=r("oCSEoDew"),o=r.n(l),i=r("0wQfx7YJ"),n=r("4af3+9mh"),c=r("OqsMdpSm"),d=r("xc00RsLr");const u=(0,d.ei)("core.Sidecars",(()=>a().createActions({listPaginated:{asyncResult:!0},getSidecar:{asyncResult:!0},getSidecarActions:{asyncResult:!0},restartCollector:{asyncResult:!0},assignConfigurations:{asyncResult:!0}}))),m=(0,d.dS)("core.Sidecars",(()=>a().createStore({listenables:[u],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(e){let{query:t="",page:r=1,pageSize:s=50,onlyActive:a=!1,sortField:l="node_name",order:d="asc"}=e;const m={query:t,page:r,per_page:s,only_active:a,sort:l,order:d},h=o()(this.sourceUrl).search(m).toString(),p=(0,c.vl)("GET",i.DC(h));p.then((e=>(this.sidecars=e.sidecars,this.query=e.query,this.onlyActive=e.only_active,this.pagination={total:e.pagination.total,count:e.pagination.count,page:e.pagination.page,pageSize:e.pagination.per_page},this.sort={field:e.sort,order:e.order},this.propagateChanges(),e)),(e=>{n.Z.error(400===e.status?e.responseMessage:`Fetching Sidecars failed with status: ${e.message}`,"Could not retrieve Sidecars")})),u.listPaginated.promise(p)},getSidecar(e){const t=(0,c.vl)("GET",i.DC(`${this.sourceUrl}/${e}`));t.catch((t=>{let r=`Fetching Sidecar failed with status: ${t}`;404===t.status&&(r=`Unable to find a sidecar with ID <${e}>, maybe it was inactive for too long.`),n.Z.error(r,"Could not retrieve Sidecar")})),u.getSidecar.promise(t)},restartCollector(e,t){const r={};r.collector=t,r.properties={},r.properties.restart=!0;const s=(0,c.ZP)("PUT",i.DC(`${this.sourceUrl}/${e}/action`),[r]);s.catch((e=>{n.Z.error(`Restarting Sidecar failed with status: ${e}`,"Could not restart Sidecar")})),u.restartCollector.promise(s)},getSidecarActions(e){const t=(0,c.vl)("GET",i.DC(`${this.sourceUrl}/${e}/action`));t.catch((e=>{n.Z.error(`Fetching Sidecar actions failed with status: ${e}`,"Could not retrieve Sidecar actions")})),u.getSidecarActions.promise(t)},toConfigurationAssignmentDto:(e,t,r)=>({node_id:e,collector_id:t,configuration_id:r}),assignConfigurations(e,t){const r=e.map((e=>{let{sidecar:r,collector:s}=e;const a=r.assignments.filter((e=>e.collector_id!==s.id));return t.forEach((e=>{a.push({collector_id:s.id,configuration_id:e.id})})),{node_id:r.node_id,assignments:a}})),s=(0,c.ZP)("PUT",i.DC(`${this.sourceUrl}/configurations`),{nodes:r});s.then((t=>(n.Z.success("",`Configuration change for ${e.length} collectors requested`),t)),(e=>{n.Z.error(`Fetching Sidecar actions failed with status: ${e}`,"Could not retrieve Sidecar actions")})),u.assignConfigurations.promise(s)}})))},VxeqfDzo:(e,t,r)=>{r.d(t,{Z:()=>i});var s=r("pmX897Fv"),a=r.n(s),l=r("DjJvgDaP"),o=r.n(l)()(a());o.push([e.id,".zL2vwyqmPLuE_eSRQt1q {\n    margin-top: 10px;\n}\n\n.zL2vwyqmPLuE_eSRQt1q dt {\n    float: left;\n    clear: left;\n}\n\n.zL2vwyqmPLuE_eSRQt1q dd {\n    margin-left: 160px;\n}\n\n.m4So8k7QXl39uuSoP2WS {\n    margin-top: 10px;\n}\n\n.Bfhoisypey7je2baSbGs {\n    opacity: 0.5;\n    z-index: 20;\n}\n","",{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) {\n    margin-top: 10px;\n}\n\n:local(.deflist) dt {\n    float: left;\n    clear: left;\n}\n\n:local(.deflist) dd {\n    margin-left: 160px;\n}\n\n:local(.topMargin) {\n    margin-top: 10px;\n}\n\n:local(.greyedOut) {\n    opacity: 0.5;\n    z-index: 20;\n}\n"],sourceRoot:""}]),o.locals={deflist:"zL2vwyqmPLuE_eSRQt1q",topMargin:"m4So8k7QXl39uuSoP2WS",greyedOut:"Bfhoisypey7je2baSbGs"};const i=o},"GfxhvOn/":(e,t,r)=>{r.d(t,{Z:()=>E});var s=r("dFpwyWHg"),a=r.n(s),l=r("C2ikvoS0"),o=r.n(l),i=r("1IntWRSu"),n=r.n(i),c=r("8nGWeFnd"),d=r.n(c),u=r("TeAcaicX"),m=r.n(u),h=r("eE3+5goe"),p=r.n(h),g=r("VxeqfDzo"),f={};f.styleTagTransform=p(),f.setAttributes=d(),f.insert=n().bind(null,"head"),f.domAPI=o(),f.insertStyleElement=m();a()(g.Z,f);const E=g.Z&&g.Z.locals?g.Z.locals:void 0}}]);
//# sourceMappingURL=325e2d4b-5666.e21cb6c13937ace06a1e.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy