web-interface.assets.1255d548-1727.c8a9ffcdf2640e93737f.js Maven / Gradle / Ivy
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["1255d548-1727"],{SfPIQIJE:(D,p,s)=>{s.d(p,{Z:()=>g});var u=s("Z7aTuO5B"),d=s("J6y4/h8P"),_=s("uZqmR+ju"),h=s("ty2gyrHp"),f=s("/GOzvPf6"),E=s("NV1/EHMi");const c=(0,d.default)(_.ButtonToolbar)`
margin-bottom: 10px;
`,n=(0,d.default)(_.Button)(({theme:a})=>(0,d.css)`
font-family: ${a.fonts.family.navigation};
font-size: ${a.fonts.size.navigation};
&&&& {
color: ${a.colors.variant.darker.default};
&:hover,
&:focus {
text-decoration: none;
}
> div {
&:hover,
&:focus {
color: ${a.colors.variant.darker.default};
}
}
&:hover {
${(0,E.RF)(a)}
}
&.active {
color: ${a.colors.global.textDefault};
${(0,E.A7)(a)}
&:hover,
&:focus {
${(0,E.A7)(a)}
}
}
}
`);n.displayName="Button";const g=({items:a})=>u.createElement(c,null,a.map(({path:C,title:e,permissions:t,exactPathMatch:i})=>C?u.createElement(f.AE,{permissions:t!=null?t:[],key:C},u.createElement(h.J,{to:C,relativeActive:!i},u.createElement(n,{bsStyle:"link"},u.createElement(E.ZP,null,e)))):null))},"kj1rMO+m":(D,p,s)=>{s.d(p,{Z:()=>g});var u=s("Z7aTuO5B"),d=s("D4SbLiE/"),_=s.n(d),h=s("ii0bleBb"),f=s.n(h),E=s("Dg7SLLbb"),c=s.n(E),n=s("UXJZ+NkS");const g=_()({propTypes:{collector:f().string.isRequired,operatingSystem:f().string},getDefaultProps(){return{operatingSystem:void 0}},render(){const{collector:a,operatingSystem:C}=this.props;return u.createElement("span",null,u.createElement(n.Z,{operatingSystem:C})," ",a,C&&u.createElement("span",null," on ",c()(C)))}})},"UXJZ+NkS":(D,p,s)=>{s.d(p,{Z:()=>l});var u=s("Z7aTuO5B"),d=s("ii0bleBb"),_=s.n(d),h=s("J6y4/h8P"),f=s("/GOzvPf6");const E=(0,h.default)(f.JO)`
margin-right: 5px;
margin-left: 2px;
`,c=g=>g.includes("darwin")||g.includes("mac os")?{iconName:"apple",iconType:"brand"}:g.includes("linux")?{iconName:"linux",iconType:"brand"}:g.includes("win")?{iconName:"windows",iconType:"brand"}:g.includes("freebsd")?{iconName:"freebsd",iconType:"brand"}:{iconName:"question-circle",iconType:"solid"},n=({operatingSystem:g})=>{const{iconName:a,iconType:C}=c(g.trim().toLowerCase());return u.createElement(E,{name:a,type:C,fixedWidth:!0})};n.propTypes={operatingSystem:_().string},n.defaultProps={operatingSystem:void 0};const l=n},tBcsAR17:(D,p,s)=>{s.d(p,{Z:()=>c});var u=s("Z7aTuO5B"),d=s("SfPIQIJE"),_=s("d4kzUuQm"),h=s("uZqmR+ju");const f=[{title:"Overview",path:_.ZP.SYSTEM.SIDECARS.OVERVIEW,exactPathMatch:!0},{title:"Administration",path:_.ZP.SYSTEM.SIDECARS.ADMINISTRATION},{title:"Configuration",path:_.ZP.SYSTEM.SIDECARS.CONFIGURATION},{title:"Failure Tracking",path:_.ZP.SYSTEM.SIDECARS.FAILURE_TRACKING}],c=()=>u.createElement(h.Row,null,u.createElement(d.Z,{items:f}))},djwd899R:(D,p,s)=>{s.d(p,{Z:()=>a,m:()=>C});var u=s("JnTtTRmZ"),d=s.n(u),_=s("oCSEoDew"),h=s.n(_),f=s("wXrUUKFq"),E=s.n(f),c=s("MdYBRjRJ"),n=s("jAGDuYSC"),l=s("eFxcQyPT"),g=s("IA3Ku5lS");const a=(0,g.ei)("core.CollectorConfigurations",()=>d().createActions({all:{asyncResult:!0},list:{asyncResult:!0},listUploads:{asyncResult:!0},getConfiguration:{asyncResult:!0},getConfigurationSidecars:{asyncResult:!0},getUploads:{asyncResult:!0},createConfiguration:{asyncResult:!0},updateConfiguration:{asyncResult:!0},renderPreview:{asyncResult:!0},copyConfiguration:{asyncResult:!0},delete:{asyncResult:!0},validate:{asyncResult:!0}})),C=(0,g.dS)("core.CollectorConfigurations",()=>d().createStore({listenables:[a],sourceUrl:"/sidecar",configurations:void 0,pagination:{page:void 0,pageSize:void 0,total:void 0},total:void 0,paginatedConfigurations:void 0,query:void 0,getInitialState(){return{configurations:this.configurations,query:this.query,total:this.total,pagination:this.pagination,paginatedConfigurations:this.paginatedConfigurations}},propagateChanges(){this.trigger({configurations:this.configurations,query:this.query,total:this.total,pagination:this.pagination,paginatedConfigurations:this.paginatedConfigurations})},_fetchConfigurations({query:e,page:t,pageSize:i}){const o=`${this.sourceUrl}/configurations`,r={query:e,page:t,per_page:i},P=h()(o).search(r).toString();return(0,l.ZP)("GET",c.DC(P))},_fetchUploads({page:e}){const t=`${this.sourceUrl}/configurations/uploads`,i={page:e},o=h()(t).search(i).toString();return(0,l.ZP)("GET",c.DC(o))},all(){const e=this._fetchConfigurations({pageSize:0});e.then(t=>(this.configurations=t.configurations,this.propagateChanges(),t.configurations),t=>{n.Z.error(`Fetching collector configurations failed with status: ${t}`,"Could not retrieve configurations")}),a.all.promise(e)},list({query:e="",page:t=1,pageSize:i=10}){const o=this._fetchConfigurations({query:e,page:t,pageSize:i});o.then(r=>(this.query=r.query,this.pagination={page:r.pagination.page,pageSize:r.pagination.per_page,total:r.pagination.total},this.total=r.total,this.paginatedConfigurations=r.configurations,this.propagateChanges(),r.configurations),r=>{n.Z.error(`Fetching collector configurations failed with status: ${r}`,"Could not retrieve configurations")}),a.list.promise(o)},listUploads({page:e=1}){const t=this._fetchUploads({page:e});t.catch(i=>{n.Z.error(`Fetching configuration uploads failed with status: ${i}`,"Could not retrieve configurations")}),a.listUploads.promise(t)},refreshList(){this.list({query:this.query,page:this.page,pageSize:this.pageSize})},getConfiguration(e){const t=(0,l.ZP)("GET",c.DC(`${this.sourceUrl}/configurations/${e}`));t.catch(i=>{let o=`Fetching Configuration failed with status: ${i}`;i.status===404&&(o=`Unable to find a Configuration with ID <${e}>, please ensure it was not deleted.`),n.Z.error(o,"Could not retrieve Configuration")}),a.getConfiguration.promise(t)},getConfigurationSidecars(e){const t=(0,l.ZP)("GET",c.DC(`${this.sourceUrl}/configurations/${e}/sidecars`));t.catch(i=>{let o=`Fetching Configuration failed with status: ${i}`;i.status===404&&(o=`Unable to find a Configuration with ID <${e}>, please ensure it was not deleted.`),n.Z.error(o,"Could not retrieve Configuration")}),a.getConfigurationSidecars.promise(t)},renderPreview(e){const t={template:e},i=(0,l.ZP)("POST",c.DC(`${this.sourceUrl}/configurations/render/preview`),t);i.catch(o=>{n.Z.error(`Fetching configuration preview failed with status: ${o}`,"Could not retrieve preview")}),a.renderPreview.promise(i)},createConfiguration(e){const t=c.DC(`${this.sourceUrl}/configurations`),i="POST",o=(0,l.ZP)(i,t,e);o.then(r=>(n.Z.success("","Configuration successfully created"),r),r=>{n.Z.error(r.status===400?r.responseMessage:`Creating configuration failed with status: ${r.message}`,"Could not save configuration")}),a.createConfiguration.promise(o)},updateConfiguration(e){const t=c.DC(`${this.sourceUrl}/configurations/${e.id}`),i=(0,l.ZP)("PUT",t,e);i.then(o=>(n.Z.success("","Configuration successfully updated"),this.refreshList(),o),o=>{n.Z.error(`Updating Configuration failed: ${o.status===400?o.responseMessage:o.message}`,`Could not update Configuration ${e.name}`)}),a.updateConfiguration.promise(i)},copyConfiguration(e,t){const i=c.DC(`${this.sourceUrl}/configurations/${e}/${t}`),o="POST",r=(0,l.ZP)(o,i);r.then(P=>(n.Z.success("",`Configuration "${t}" successfully copied`),this.refreshList(),P),P=>{n.Z.error(`Saving configuration "${t}" failed with status: ${P.message}`,"Could not save Configuration")}),a.copyConfiguration.promise(r)},delete(e){const t=c.DC(`${this.sourceUrl}/configurations/${e.id}`),i=(0,l.ZP)("DELETE",t);i.then(o=>(n.Z.success("",`Configuration "${e.name}" successfully deleted`),this.refreshList(),o),o=>{n.Z.error(`Deleting Configuration failed: ${o.status===400?o.responseMessage:o.message}`,`Could not delete Configuration ${e.name}`)}),a.delete.promise(i)},validate(e){const t={name:" ",collector_id:" ",color:" ",template:" "};E()(t,e);const i=(0,l.ZP)("POST",c.DC(`${this.sourceUrl}/configurations/validate`),t);i.then(o=>o,o=>n.Z.error(`Validating configuration "${t.name}" failed with status: ${o.message}`,"Could not validate configuration")),a.validate.promise(i)}}))},"kHvj/lAD":(D,p,s)=>{s.d(p,{d:()=>C,v:()=>a});var u=s("JnTtTRmZ"),d=s.n(u),_=s("oCSEoDew"),h=s.n(_),f=s("wXrUUKFq"),E=s.n(f),c=s("MdYBRjRJ"),n=s("eFxcQyPT"),l=s("jAGDuYSC"),g=s("IA3Ku5lS");const a=(0,g.ei)("core.Collectors",()=>d().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}})),C=(0,g.dS)("core.Collectors",()=>d().createStore({listenables:[a],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,n.ZP)("GET",c.DC(`${this.sourceUrl}/collectors/${e}`));t.catch(i=>{let o=`Fetching Collector failed with status: ${i}`;i.status===404&&(o=`Unable to find a collector with ID <${e}>, please ensure it was not deleted.`),l.Z.error(o,"Could not retrieve Collector")}),a.getCollector.promise(t)},_fetchCollectors({query:e,page:t,pageSize:i}){const o={query:e,page:t,per_page:i},r=h()(`${this.sourceUrl}/collectors/summary`).search(o).toString();return(0,n.ZP)("GET",c.DC(r))},all(){const e=this._fetchCollectors({pageSize:0});e.then(t=>(this.collectors=t.collectors,this.propagateChanges(),t.collectors),t=>{l.Z.error(`Fetching collectors failed with status: ${t}`,"Could not retrieve collectors")}),a.all.promise(e)},list({query:e="",page:t=1,pageSize:i=10}){const o=this._fetchCollectors({query:e,page:t,pageSize:i});o.then(r=>(this.query=r.query,this.pagination={page:r.pagination.page,pageSize:r.pagination.per_page,total:r.pagination.total},this.total=r.total,this.paginatedCollectors=r.collectors,this.propagateChanges(),r.collectors),r=>{l.Z.error(`Fetching collectors failed with status: ${r}`,"Could not retrieve collectors")}),a.list.promise(o)},refreshList(){this.list({query:this.query,page:this.pagination.page,pageSize:this.pagination.pageSize})},create(e){const t=(0,n.ZP)("POST",c.DC(`${this.sourceUrl}/collectors`),e);t.then(i=>(l.Z.success("","Collector successfully created"),this.collectors=i.collectors,this.propagateChanges(),this.collectors),i=>{l.Z.error(`Fetching collectors failed with status: ${i}`,"Could not retrieve collectors")}),a.create.promise(t)},update(e){const t=(0,n.ZP)("PUT",c.DC(`${this.sourceUrl}/collectors/${e.id}`),e);t.then(i=>(l.Z.success("","Collector successfully updated"),this.collectors=i.collectors,this.propagateChanges(),this.collectors),i=>{l.Z.error(`Fetching collectors failed with status: ${i}`,"Could not retrieve collectors")}),a.update.promise(t)},delete(e){const t=c.DC(`${this.sourceUrl}/collectors/${e.id}`),i=(0,n.ZP)("DELETE",t);i.then(o=>(l.Z.success("",`Collector "${e.name}" successfully deleted`),this.refreshList(),o),o=>{l.Z.error(`Deleting Collector failed: ${o.status===400?o.responseMessage:o.message}`,`Could not delete Collector "${e.name}"`)}),a.delete.promise(i)},copy(e,t){const i=c.DC(`${this.sourceUrl}/collectors/${e}/${t}`),o="POST",r=(0,n.ZP)(o,i);r.then(P=>(l.Z.success("",`Collector "${t}" successfully copied`),this.refreshList(),P),P=>{l.Z.error(`Saving collector "${t}" failed with status: ${P.message}`,"Could not save Collector")}),a.copy.promise(r)},validate(e){const t={id:" ",service_type:"exec",executable_path:" ",default_template:" "};E()(t,e);const i=(0,n.ZP)("POST",c.DC(`${this.sourceUrl}/collectors/validate`),t);i.then(o=>o,o=>l.Z.error(`Validating collector "${t.name}" failed with status: ${o.message}`,"Could not validate collector")),a.validate.promise(i)}}))}}]);})();
//# sourceMappingURL=1255d548-1727.c8a9ffcdf2640e93737f.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy