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