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

web-interface.assets.1255d548-5210.d5fe7cb305627a6a2ce0.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([["1255d548-5210"],{tfpL87kt:(A,g,r)=>{r.d(g,{Z:()=>a});var t=r("pmX897Fv"),s=r.n(t),f=r("DjJvgDaP"),u=r.n(f),d=u()(s());d.push([A.id,`.oBBPz1W1Ve8zrIW1EhLx {
    width: 180px;
}

.Uy6cIiz2HPwJUfHF23rT {
    display: inline-block;
}

.N7A6sOU7fwW7K9doSh1C {
    margin-top: 15px;
}

.JQvkDnZLohwwSnO2DCEQ .pagination {
    margin: 5px 0;
}`,"",{version:3,sources:["webpack://./src/components/sidecars/configurations/CollectorList.css"],names:[],mappings:"AAAA;IACI,YAAY;AAChB;;AAEA;IACI,qBAAqB;AACzB;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,aAAa;AACjB",sourcesContent:[`:local(.actionsColumn) {
    width: 180px;
}

:local(.inline) {
    display: inline-block;
}

:local(.collectorTable) {
    margin-top: 15px;
}

:local(.collectorRow) .pagination {
    margin: 5px 0;
}`],sourceRoot:""}]),d.locals={actionsColumn:"oBBPz1W1Ve8zrIW1EhLx",inline:"Uy6cIiz2HPwJUfHF23rT",collectorTable:"N7A6sOU7fwW7K9doSh1C",collectorRow:"JQvkDnZLohwwSnO2DCEQ"};const a=d},Fqq8xeUu:(A,g,r)=>{r.d(g,{Z:()=>a});var t=r("pmX897Fv"),s=r.n(t),f=r("DjJvgDaP"),u=r.n(f),d=u()(s());d.push([A.id,`.rjtck9Gfr9GNUFzhUqZK {
    width: 180px;
}

.YWOWMRbsDHf2sgfZ_8LL {
    display: inline-block;
}

.yWGTiCbbSqkYcleYMNwV {
    margin-top: 15px;
}

.H91qQ905vkDDGR_P260g .pagination {
    margin: 5px 0;
}`,"",{version:3,sources:["webpack://./src/components/sidecars/configurations/ConfigurationList.css"],names:[],mappings:"AAAA;IACI,YAAY;AAChB;;AAEA;IACI,qBAAqB;AACzB;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,aAAa;AACjB",sourcesContent:[`:local(.actionsColumn) {
    width: 180px;
}

:local(.inline) {
    display: inline-block;
}

:local(.configurationTable) {
    margin-top: 15px;
}

:local(.configurationRow) .pagination {
    margin: 5px 0;
}`],sourceRoot:""}]),d.locals={actionsColumn:"rjtck9Gfr9GNUFzhUqZK",inline:"YWOWMRbsDHf2sgfZ_8LL",configurationTable:"yWGTiCbbSqkYcleYMNwV",configurationRow:"H91qQ905vkDDGR_P260g"};const a=d},oddMG95e:(A,g,r)=>{r.d(g,{Z:()=>a});var t=r("pmX897Fv"),s=r.n(t),f=r("DjJvgDaP"),u=r.n(f),d=u()(s());d.push([A.id,`.ek5vqiB5F5i2uw7NmpOW {
    width: 350px;
}

.mlO7JmpTi1WLCWGu4IBT {
    width: 160px;
}`,"",{version:3,sources:["webpack://./src/components/sidecars/configurations/ConfigurationRow.css"],names:[],mappings:"AAAA;IACI,YAAY;AAChB;;AAEA;IACI,YAAY;AAChB",sourcesContent:[`:local(.name) {
    width: 350px;
}

:local(.actions) {
    width: 160px;
}`],sourceRoot:""}]),d.locals={name:"ek5vqiB5F5i2uw7NmpOW",actions:"mlO7JmpTi1WLCWGu4IBT"};const a=d},"Lm/630hr":(A,g,r)=>{r.r(g),r.d(g,{default:()=>je});var t=r("Z7aTuO5B"),s=r("uZqmR+ju"),f=r("E+CaPsQD"),u=r("/GOzvPf6"),d=r("ii0bleBb"),a=r.n(d),C=r("kHvj/lAD"),h=r("djwd899R"),b=r("BqxuktKK"),_=r("v4GbOr/o"),q=r("8fnsnG21"),D=r("ty2gyrHp"),T=r("d4kzUuQm"),ee=r("kj1rMO+m"),te=r("1LOzeRr1");const N=({error:n,id:e,showModal:o,onClose:l,name:i,onChange:c,onSave:m,onSelect:p})=>t.createElement(t.Fragment,null,t.createElement(s.MenuItem,{onSelect:p},"Clone"),t.createElement(s.BootstrapModalForm,{show:o,title:"Clone",onSubmitForm:m,onCancel:l,submitButtonDisabled:!!n,submitButtonText:"Done"},t.createElement("fieldset",null,t.createElement(s.Input,{type:"text",id:e,label:"Name",defaultValue:i,onChange:c,bsStyle:n?"error":null,help:n||"Type a name for the new collector",autoFocus:!0,required:!0}))));N.propTypes={error:a().string,id:a().string.isRequired,showModal:a().bool.isRequired,name:a().string.isRequired,onChange:a().func.isRequired,onSave:a().func.isRequired,onSelect:a().func.isRequired,onClose:a().func.isRequired},N.defaultProps={error:void 0};const J=N;var oe=Object.defineProperty,ne=(n,e,o)=>e in n?oe(n,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[e]=o,E=(n,e,o)=>(ne(n,typeof e!="symbol"?e+"":e,o),o);class H extends t.Component{constructor(e){super(e),E(this,"openModal",()=>{this.setState({showModal:!0})}),E(this,"_getId",o=>{const{id:l}=this.state;return`${o}-${l}`}),E(this,"_closeModal",()=>{this.setState({showModal:!1})}),E(this,"_saved",()=>{this._closeModal(),this.setState({name:""})}),E(this,"_save",()=>{const{copyConfiguration:o}=this.props,{errorMessage:l,id:i,name:c}=this.state;l||o(i,c,this._saved)}),E(this,"_changeName",o=>{const{validateConfiguration:l}=this.props,i=o.target.value;this.setState({name:i,errorMessage:void 0}),l({name:i}).then(c=>{c.errors.name&&this.setState({errorMessage:c.errors.name[0]})})}),this.state={showModal:!1,id:e.configuration.id,name:"",errorMessage:void 0}}render(){const{errorMessage:e,name:o,showModal:l}=this.state;return t.createElement(J,{onSelect:this.openModal,onClose:this._closeModal,onSave:this._save,id:this._getId("configuration-name"),onChange:this._changeName,error:e,name:o,showModal:l})}}E(H,"propTypes",{configuration:a().object.isRequired,copyConfiguration:a().func.isRequired,validateConfiguration:a().func.isRequired});const re=H;var ae=r("dFpwyWHg"),F=r.n(ae),le=r("C2ikvoS0"),Z=r.n(le),se=r("1IntWRSu"),w=r.n(se),ie=r("8nGWeFnd"),W=r.n(ie),ce=r("TeAcaicX"),x=r.n(ce),ue=r("eE3+5goe"),U=r.n(ue),M=r("oddMG95e"),y={};y.styleTagTransform=U(),y.setAttributes=W(),y.insert=w().bind(null,"head"),y.domAPI=Z(),y.insertStyleElement=x();var ze=F()(M.Z,y);const j=M.Z&&M.Z.locals?M.Z.locals:void 0;var de=Object.defineProperty,me=(n,e,o)=>e in n?de(n,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[e]=o,z=(n,e,o)=>(me(n,typeof e!="symbol"?e+"":e,o),o);class G extends t.Component{constructor(){super(...arguments),z(this,"_handleDelete",async()=>{const{configuration:e,onDelete:o,sendTelemetry:l}=this.props;l(_.A.SIDECARS.CONFIGURATION_DELETED,{app_pathname:"sidecars",app_section:"configuration"}),window.confirm(`You are about to delete configuration "${e.name}". Are you sure?`)&&await o(e)})}render(){const{collector:e,configuration:o,validateConfiguration:l,onCopy:i}=this.props;return t.createElement("tr",null,t.createElement("td",{className:j.name},o.name),t.createElement("td",{className:j.color},t.createElement(te.Z,{color:o.color,size:"small"})),t.createElement("td",null,t.createElement(ee.Z,{collector:e.name||"Unknown collector",operatingSystem:e.node_operating_system})),t.createElement("td",{className:j.actions},t.createElement(s.ButtonToolbar,null,t.createElement(D.J,{to:T.ZP.SYSTEM.SIDECARS.EDIT_CONFIGURATION(o.id)},t.createElement(s.Button,{onClick:this.openModal,bsStyle:"info",bsSize:"xsmall"},"Edit")),t.createElement(s.DropdownButton,{id:`more-actions-${o.id}`,title:"More actions",bsSize:"xsmall",pullRight:!0},t.createElement(re,{configuration:o,validateConfiguration:l,copyConfiguration:i}),t.createElement(s.MenuItem,{divider:!0}),t.createElement(s.MenuItem,{onSelect:this._handleDelete},"Delete")))))}}z(G,"propTypes",{configuration:a().object.isRequired,collector:a().object,onCopy:a().func.isRequired,validateConfiguration:a().func.isRequired,onDelete:a().func.isRequired,sendTelemetry:a().func}),z(G,"defaultProps",{collector:{},sendTelemetry:()=>{}});const Ce=(0,b.Z)(G);var P=r("Fqq8xeUu"),R={};R.styleTagTransform=U(),R.setAttributes=W(),R.insert=w().bind(null,"head"),R.domAPI=Z(),R.insertStyleElement=x();var Ge=F()(P.Z,R);const L=P.Z&&P.Z.locals?P.Z.locals:void 0;var ge=Object.defineProperty,pe=(n,e,o)=>e in n?ge(n,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[e]=o,$=(n,e,o)=>(pe(n,typeof e!="symbol"?e+"":e,o),o);const fe=n=>{const e=n==="Actions"?L.actionsColumn:"";return t.createElement("th",{className:e},n)};class X extends t.Component{constructor(){super(...arguments),$(this,"_collectorConfigurationFormatter",e=>{const{collectors:o,onClone:l,onDelete:i,validateConfiguration:c}=this.props,m=o.find(p=>p.id===e.collector_id);return t.createElement(Ce,{key:e.id,configuration:e,collector:m,onCopy:l,validateConfiguration:c,onDelete:i})})}render(){const{configurations:e,pagination:o,query:l,total:i,onPageChange:c,onQueryChange:m}=this.props,p=["Configuration","Color","Collector","Actions"];return t.createElement("div",null,t.createElement(s.Row,null,t.createElement(s.Col,{md:12},t.createElement("div",{className:"pull-right"},t.createElement(D.J,{to:T.ZP.SYSTEM.SIDECARS.NEW_CONFIGURATION},t.createElement(s.Button,{onClick:this.openModal,bsStyle:"success",bsSize:"small"},"Create Configuration"))),t.createElement("h2",null,"Configurations ",t.createElement("small",null,i," total"))),t.createElement(s.Col,{md:12},t.createElement("p",null,"These are the Configurations to use in your Collectors. Remember to apply new configurations to Collectors in the Administration page."))),t.createElement(s.Row,{className:`row-sm ${L.configurationRow}`},t.createElement(s.Col,{md:12},t.createElement(u.UI,{query:l,onSearch:m,onReset:m,placeholder:"Find configurations",wrapperClass:L.inline,topMargin:0,useLoadingState:!0}),t.createElement(u.l9,{activePage:o.page,pageSize:o.pageSize,pageSizes:[10,25],totalItems:o.total,onChange:c,useQueryParameter:!1},t.createElement("div",{className:L.configurationTable},t.createElement(u.wQ,{id:"collector-configurations-list",className:"table-hover",headers:p,headerCellFormatter:fe,rows:e,rowClassName:"row-sm",dataRowFormatter:this._collectorConfigurationFormatter,noDataText:"There are no configurations to display, try creating one or changing your query.",filterLabel:"",filterKeys:[],useResponsiveTable:!1}))))))}}$(X,"propTypes",{collectors:a().array.isRequired,configurations:a().array.isRequired,pagination:a().object.isRequired,query:a().string.isRequired,total:a().number.isRequired,onPageChange:a().func.isRequired,onQueryChange:a().func.isRequired,onClone:a().func.isRequired,onDelete:a().func.isRequired,validateConfiguration:a().func.isRequired});const he=X;var Ee=Object.defineProperty,ve=(n,e,o)=>e in n?Ee(n,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[e]=o,K=(n,e,o)=>(ve(n,typeof e!="symbol"?e+"":e,o),o);const Ae=n=>h.Z.delete(n),ye=()=>{h.Z.list({}),C.v.all()},Re=n=>h.Z.validate(n);class Q extends t.Component{constructor(){super(...arguments),K(this,"handlePageChange",(e,o)=>{const{query:l}=this.props.configurations;h.Z.list({query:l,page:e,pageSize:o})}),K(this,"handleQueryChange",(e="",o=()=>{})=>{const{pageSize:l}=this.props.configurations.pagination;h.Z.list({query:e,pageSize:l}).finally(o)}),K(this,"handleClone",(e,o,l)=>{const{sendTelemetry:i}=this.props;i(_.A.SIDECARS.CONFIGURATION_CLONED,{app_pathname:"sidecars",app_section:"configuration"}),h.Z.copyConfiguration(e,o).then(c=>(l(),c))})}componentDidMount(){ye()}render(){const{collectors:e,configurations:o}=this.props;return!e||!o||!o.paginatedConfigurations?t.createElement(u.$j,null):t.createElement(he,{collectors:e,query:o.query,pagination:o.pagination,total:o.total,configurations:o.paginatedConfigurations,onPageChange:this.handlePageChange,onQueryChange:this.handleQueryChange,onClone:this.handleClone,onDelete:Ae,validateConfiguration:Re})}}Q.propTypes={configurations:a().object,collectors:a().array,sendTelemetry:a().func},Q.defaultProps={configurations:void 0,collectors:void 0,sendTelemetry:()=>{}};const Se=(0,b.Z)((0,q.Z)(Q,{configurations:h.m,collectorsState:C.d},({configurations:n,collectorsState:e})=>({collectors:e.collectors,configurations:n})));var _e=r("D4SbLiE/"),V=r.n(_e),De=r("Dg7SLLbb"),Te=r.n(De),Me=r("UXJZ+NkS"),Pe=r("IW7priiX"),Le=r.n(Pe),Ie=Object.defineProperty,Oe=(n,e,o)=>e in n?Ie(n,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[e]=o,v=(n,e,o)=>(Oe(n,typeof e!="symbol"?e+"":e,o),o);class k extends t.Component{constructor(e){super(e),v(this,"openModal",()=>{this.setState({showModal:!0})}),v(this,"_getId",o=>{const{id:l}=this.state;return`${o}-${l}`}),v(this,"_closeModal",()=>{this.setState({showModal:!1})}),v(this,"_saved",()=>{this._closeModal(),this.setState({name:""})}),v(this,"_save",()=>{const{errorMessage:o,id:l,name:i}=this.state,{copyCollector:c}=this.props;o||c(l,i,this._saved)}),v(this,"_changeName",o=>{const{collector:l,validateCollector:i}=this.props,c=o.target.value;this.setState({name:c,errorMessage:void 0});const m=Le()(l);m.name=c,m.id="",i(m).then(p=>{p.errors.name&&this.setState({errorMessage:p.errors.name[0]})})}),this.state={showModal:!1,id:e.collector.id,name:"",errorMessage:void 0}}render(){const{errorMessage:e,name:o,showModal:l}=this.state;return t.createElement(J,{onSelect:this.openModal,onClose:this._closeModal,onSave:this._save,id:this._getId("collector-name"),onChange:this._changeName,error:e,name:o,showModal:l})}}v(k,"propTypes",{collector:a().object.isRequired,copyCollector:a().func.isRequired,validateCollector:a().func.isRequired});const Be=k,be=V()({propTypes:{collector:a().object.isRequired,onClone:a().func.isRequired,onDelete:a().func.isRequired,validateCollector:a().func.isRequired},handleDelete(){const{onDelete:n,collector:e}=this.props;window.confirm(`You are about to delete collector "${e.name}". Are you sure?`)&&n(e)},render(){const{collector:n,validateCollector:e,onClone:o}=this.props;return t.createElement("tr",null,t.createElement("td",null,n.name),t.createElement("td",null,t.createElement(Me.Z,{operatingSystem:n.node_operating_system})," ",Te()(n.node_operating_system)),t.createElement("td",null,t.createElement(s.ButtonToolbar,null,t.createElement(D.J,{to:T.ZP.SYSTEM.SIDECARS.EDIT_COLLECTOR(n.id)},t.createElement(s.Button,{bsSize:"xsmall"},"Edit")),t.createElement(s.DropdownButton,{id:`more-actions-${n.id}`,title:"More actions",bsSize:"xsmall",pullRight:!0},t.createElement(Be,{collector:n,validateCollector:e,copyCollector:o}),t.createElement(s.MenuItem,{divider:!0}),t.createElement(s.MenuItem,{onSelect:this.handleDelete},"Delete")))))}});var I=r("tfpL87kt"),S={};S.styleTagTransform=U(),S.setAttributes=W(),S.insert=w().bind(null,"head"),S.domAPI=Z(),S.insertStyleElement=x();var Qe=F()(I.Z,S);const O=I.Z&&I.Z.locals?I.Z.locals:void 0,Ne=V()({propTypes:{collectors:a().array.isRequired,pagination:a().object.isRequired,query:a().string.isRequired,total:a().number.isRequired,onClone:a().func.isRequired,onDelete:a().func.isRequired,onPageChange:a().func.isRequired,onQueryChange:a().func.isRequired,validateCollector:a().func.isRequired},headerCellFormatter(n){const e=n==="Actions"?O.actionsColumn:"";return t.createElement("th",{className:e},n)},collectorFormatter(n){const{onClone:e,onDelete:o,validateCollector:l}=this.props;return t.createElement(be,{collector:n,onClone:e,onDelete:o,validateCollector:l})},render(){const{collectors:n,pagination:e,query:o,total:l,onPageChange:i,onQueryChange:c}=this.props,m=["Name","Operating System","Actions"];return t.createElement("div",null,t.createElement(s.Row,null,t.createElement(s.Col,{md:12},t.createElement("div",{className:"pull-right"},t.createElement(D.J,{to:T.ZP.SYSTEM.SIDECARS.NEW_COLLECTOR},t.createElement(s.Button,{bsStyle:"success",bsSize:"small"},"Create Log Collector"))),t.createElement("h2",null,"Log Collectors ",t.createElement("small",null,l," total"))),t.createElement(s.Col,{md:12},t.createElement("p",null,"Manage Log Collectors that you can configure and supervise through Graylog Sidecar and Graylog Web Interface."))),t.createElement(s.Row,{className:`row-sm ${O.collectorRow}`},t.createElement(s.Col,{md:12},t.createElement(u.UI,{query:o,onSearch:c,onReset:c,placeholder:"Find collectors",wrapperClass:O.inline,topMargin:0,useLoadingState:!0}),t.createElement(u.l9,{activePage:e.page,pageSize:e.pageSize,pageSizes:[10,25],totalItems:e.total,onChange:i,useQueryParameter:!1},t.createElement("div",{className:O.collectorTable},t.createElement(u.wQ,{id:"collector-list",className:"table-hover",headers:m,headerCellFormatter:this.headerCellFormatter,rows:n,dataRowFormatter:this.collectorFormatter,noDataText:"There are no log collectors to display, why don't you create one?",filterLabel:"",filterKeys:[],useResponsiveTable:!1}))))))}});var Fe=Object.defineProperty,Ze=(n,e,o)=>e in n?Fe(n,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[e]=o,B=(n,e,o)=>(Ze(n,typeof e!="symbol"?e+"":e,o),o);const we=n=>C.v.validate(n),We=()=>{C.v.list({})};class Y extends t.Component{constructor(){super(...arguments),B(this,"handleClone",(e,o,l)=>{const{sendTelemetry:i}=this.props;i(_.A.SIDECARS.LOG_COLLECTOR_CLONED,{app_pathname:"sidecars",app_section:"configuration"}),C.v.copy(e,o).then(()=>{l()})}),B(this,"handleDelete",async e=>{const{sendTelemetry:o}=this.props;o(_.A.SIDECARS.LOG_COLLECTOR_DELETED,{app_pathname:"sidecars",app_section:"configuration"}),await C.v.delete(e)}),B(this,"handlePageChange",(e,o)=>{const{query:l}=this.props.collectors;C.v.list({query:l,page:e,pageSize:o})}),B(this,"handleQueryChange",(e="",o=()=>{})=>{const{pageSize:l}=this.props.collectors.pagination;C.v.list({query:e,pageSize:l}).finally(o)})}componentDidMount(){We()}render(){const{collectors:e}=this.props;return!e||!e.paginatedCollectors?t.createElement(u.$j,null):t.createElement(Ne,{collectors:e.paginatedCollectors,pagination:e.pagination,query:e.query,total:e.total,onPageChange:this.handlePageChange,onQueryChange:this.handleQueryChange,onClone:this.handleClone,onDelete:this.handleDelete,validateCollector:we})}}Y.propTypes={collectors:a().object,sendTelemetry:a().func},Y.defaultProps={collectors:void 0,sendTelemetry:()=>{}};const xe=(0,b.Z)((0,q.Z)(Y,{collectors:C.d}));var Ue=r("tBcsAR17");const je=()=>t.createElement(u.$4,{title:"Collectors Configuration"},t.createElement(Ue.Z,null),t.createElement(u.mr,{title:"Collectors Configuration",documentationLink:{title:"Sidecar documentation",path:f.Z.PAGES.COLLECTOR_SIDECAR}},t.createElement("span",null,"The Collector Sidecar runs next to your favourite log collector and configures it for you. Here you can manage the Sidecar configurations.")),t.createElement(s.Row,{className:"content"},t.createElement(s.Col,{md:12},t.createElement(Se,null))),t.createElement(s.Row,{className:"content"},t.createElement(s.Col,{md:12},t.createElement(xe,null))))}}]);})();

//# sourceMappingURL=1255d548-5210.d5fe7cb305627a6a2ce0.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy