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

web-interface.assets.b6fe2bb5-5666.8177e1813c24f9963dc8.js Maven / Gradle / Ivy

"use strict";(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["b6fe2bb5-5666"],{"k1+oENXy":(e,t,n)=>{n.d(t,{Z:()=>c});var r=n("nHcjWeCO"),o=n.n(r);const c={RUNNING:0,UNKNOWN:1,FAILING:2,STOPPED:3,properties:{0:{name:"running"},1:{name:"unknown"},2:{name:"failing"},3:{name:"stopped"}},isValidStatusCode:function(e){return Object.keys(this.properties).includes(String(e))},toStatusCode:function(e){var t=o().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:function(e){switch(o().toNumber(e)){case this.RUNNING:return"running";case this.FAILING:return"failing";case this.STOPPED:return"stopped";default:return"unknown"}}}},nEaP1vtY:(e,t,n)=>{n.r(t),n.d(t,{default:()=>re});var r=n("ii0bleBb"),o=n.n(r),c=n("Z7aTuO5B"),a=n("EeAwn/0x"),i=n("Mr++nPjW"),l=n("AdUszsMQ"),s=n("4Js8dUPg"),u=n("G9VqAO1I"),f=n("DeVaSktS"),d=n("BSHS2nUH"),p=n("D4SbLiE/"),m=n.n(p),h=n("nHcjWeCO"),y=n.n(h),g=n("k1+oENXy"),v=n("GfxhvOn/");function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var n=0;nt-6e4?"info":""})),P(A(e),"_dirFormatter",(function(e){return e.is_dir?c.createElement("span",null,c.createElement(l.JO,{name:"folder-open"}),"  ",e.path):c.createElement("span",null,c.createElement(l.JO,{name:"file",type:"regular"}),"  ",e.path)})),P(A(e),"_fileListFormatter",(function(t){return c.createElement("tr",{key:t.path,className:e._activityFormatter(t.mod_time)},c.createElement("td",{className:"limited"},c.createElement(l.EK,{dateTime:t.mod_time})),c.createElement("td",{className:"limited"},t.size),c.createElement("td",null,e._dirFormatter(t)))})),e}return t=a,(n=[{key:"render",value:function(){return c.createElement("div",null,c.createElement(l.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(t.prototype,n),r&&E(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(c.Component);P(N,"propTypes",{files:o().array.isRequired});const R=N;var T=n("UQF3Dyqs");function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D(e,t){for(var n=0;n"))),c.createElement(i.u_.Footer,null,c.createElement(i.zx,{type:"button",onClick:this.hide},"Close")))}}])&&D(t.prototype,n),r&&D(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(c.Component);U(z,"propTypes",{collectorName:o().string.isRequired,collectorVerbose:o().string.isRequired});const G=z;const L=m()({displayName:"SidecarStatus",propTypes:{sidecar:o().object.isRequired,collectors:o().array.isRequired},getInitialState:function(){return{collectorName:"",collectorVerbose:""}},formatNodeDetails:function(e){if(!e)return c.createElement("p",null,"Node details are currently unavailable. Please wait a moment and ensure the sidecar is correctly connected to the server.");var t=e.metrics||{};return c.createElement("dl",{className:"".concat(v.Z.deflist," ").concat(v.Z.topMargin)},c.createElement("dt",null,"IP Address"),c.createElement("dd",null,y().defaultTo(e.ip,"Not available")),c.createElement("dt",null,"Operating System"),c.createElement("dd",null,y().defaultTo(e.operating_system,"Not available")),c.createElement("dt",null,"CPU Idle"),c.createElement("dd",null,y().isNumber(t.cpu_idle)?"".concat(t.cpu_idle,"%"):"Not available"),c.createElement("dt",null,"Load"),c.createElement("dd",null,y().defaultTo(t.load_1,"Not available")),c.createElement("dt",null,"Volumes > 75% full"),void 0===t.disks_75?c.createElement("dd",null,"Not available"):c.createElement("dd",null,t.disks_75.length>0?t.disks_75.join(", "):"None"))},formatCollectorStatus:function(e,t){var n=this;if(!e||!t)return c.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 c.createElement("p",null,"Did not receive collectors status, set the option ",c.createElement("code",null,"send_status: true")," in the sidecar configuration to see this information.");var r=e.status.collectors;if(0===r.length)return c.createElement("p",null,"There are no collectors configured in this sidecar.");var o=[];return r.forEach((function(e){var r,a,s,u,f=t.find((function(t){return t.id===e.collector_id}));switch(e.status){case g.Z.RUNNING:r="Collector is running.",s="text-success",a=c.createElement(l.JO,{name:"play",fixedWidth:!0});break;case g.Z.FAILING:r=e.message,s="text-danger",a=c.createElement(l.JO,{name:"exclamation-triangle",fixedWidth:!0}),e.verbose_message&&(u=c.createElement(i.zx,{bsStyle:"link",bsSize:"xs",onClick:function(){return n._onShowVerbose(f.name,e.verbose_message)}},"Show Details"));break;case g.Z.STOPPED:r=e.message,s="text-danger",a=c.createElement(l.JO,{name:"stop",fixedWidth:!0});break;default:r="Collector status is currently unknown.",s="text-info",a=c.createElement(l.JO,{name:"question-circle",fixedWidth:!0})}f&&o.push(c.createElement("dt",{key:"".concat(f.id,"-key"),className:s},f.name),c.createElement("dd",{key:"".concat(f.id,"-description"),className:s},a," ",r," ",u))})),c.createElement("dl",{className:v.Z.deflist},o)},_onShowVerbose:function(e,t){this.setState({collectorName:e,collectorVerbose:t}),this.modal.open()},render:function(){var e=this,t=this.props.sidecar,n=t.node_details.log_file_list||[];return c.createElement("div",null,c.createElement(i.X2,{className:"content"},c.createElement(i.JX,{md:12},c.createElement("h2",null,"Node details"),this.formatNodeDetails(t.node_details))),c.createElement(i.X2,{className:"content"},c.createElement(i.JX,{md:12},c.createElement("h2",null,"Collectors status"),c.createElement("div",{className:v.Z.topMargin},this.formatCollectorStatus(t.node_details,this.props.collectors)))),c.createElement(i.X2,{className:"content",hidden:0===n.length},c.createElement(i.JX,{md:12},c.createElement("h2",null,"Log Files"),c.createElement("p",{className:v.Z.topMargin},"Recently modified files will be highlighted in blue."),c.createElement("div",null,c.createElement(R,{files:n})))),c.createElement(G,{ref:function(t){e.modal=t},collectorName:this.state.collectorName,collectorVerbose:this.state.collectorVerbose}))}});var W=n("CfS4XPvw"),B=n("dfn/QTgc"),M=n("fwWvm3G9");function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function J(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(e,t){for(var n=0;n{n.d(t,{v:()=>p,d:()=>m});var r=n("JnTtTRmZ"),o=n.n(r),c=n("oCSEoDew"),a=n.n(c),i=n("nHcjWeCO"),l=n.n(i),s=n("0wQfx7YJ"),u=n("OqsMdpSm"),f=n("4af3+9mh"),d=n("xc00RsLr"),p=(0,d.ei)("core.Collectors",(function(){return o().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}})})),m=(0,d.dS)("core.Collectors",(function(){return o().createStore({listenables:[p],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:function(){return{collectors:this.collectors}},propagateChanges:function(){this.trigger({collectors:this.collectors,paginatedCollectors:this.paginatedCollectors,query:this.query,total:this.total,pagination:this.pagination})},getCollector:function(e){var t=(0,u.ZP)("GET",s.DC("".concat(this.sourceUrl,"/collectors/").concat(e)));t.catch((function(t){var n="Fetching Collector failed with status: ".concat(t);404===t.status&&(n="Unable to find a collector with ID <".concat(e,">, please ensure it was not deleted.")),f.Z.error(n,"Could not retrieve Collector")})),p.getCollector.promise(t)},_fetchCollectors:function(e){var t={query:e.query,page:e.page,per_page:e.pageSize},n=a()("".concat(this.sourceUrl,"/collectors/summary")).search(t).toString();return(0,u.ZP)("GET",s.DC(n))},all:function(){var e=this,t=this._fetchCollectors({pageSize:0});t.then((function(t){return e.collectors=t.collectors,e.propagateChanges(),t.collectors}),(function(e){f.Z.error("Fetching collectors failed with status: ".concat(e),"Could not retrieve collectors")})),p.all.promise(t)},list:function(e){var t=this,n=e.query,r=void 0===n?"":n,o=e.page,c=void 0===o?1:o,a=e.pageSize,i=void 0===a?10:a,l=this._fetchCollectors({query:r,page:c,pageSize:i});l.then((function(e){return t.query=e.query,t.pagination={page:e.pagination.page,pageSize:e.pagination.per_page,total:e.pagination.total},t.total=e.total,t.paginatedCollectors=e.collectors,t.propagateChanges(),e.collectors}),(function(e){f.Z.error("Fetching collectors failed with status: ".concat(e),"Could not retrieve collectors")})),p.list.promise(l)},refreshList:function(){this.list({query:this.query,page:this.pagination.page,pageSize:this.pagination.pageSize})},create:function(e){var t=this,n=(0,u.ZP)("POST",s.DC("".concat(this.sourceUrl,"/collectors")),e);n.then((function(e){return f.Z.success("","Collector successfully created"),t.collectors=e.collectors,t.propagateChanges(),t.collectors}),(function(e){f.Z.error("Fetching collectors failed with status: ".concat(e),"Could not retrieve collectors")})),p.create.promise(n)},update:function(e){var t=this,n=(0,u.ZP)("PUT",s.DC("".concat(this.sourceUrl,"/collectors/").concat(e.id)),e);n.then((function(e){return f.Z.success("","Collector successfully updated"),t.collectors=e.collectors,t.propagateChanges(),t.collectors}),(function(e){f.Z.error("Fetching collectors failed with status: ".concat(e),"Could not retrieve collectors")})),p.update.promise(n)},delete:function(e){var t=this,n=s.DC("".concat(this.sourceUrl,"/collectors/").concat(e.id)),r=(0,u.ZP)("DELETE",n);r.then((function(n){return f.Z.success("",'Collector "'.concat(e.name,'" successfully deleted')),t.refreshList(),n}),(function(t){f.Z.error("Deleting Collector failed: ".concat(400===t.status?t.responseMessage:t.message),'Could not delete Collector "'.concat(e.name,'"'))})),p.delete.promise(r)},copy:function(e,t){var n=this,r=s.DC("".concat(this.sourceUrl,"/collectors/").concat(e,"/").concat(t)),o=(0,u.ZP)("POST",r);o.then((function(e){return f.Z.success("",'Collector "'.concat(t,'" successfully copied')),n.refreshList(),e}),(function(e){f.Z.error('Saving collector "'.concat(t,'" failed with status: ').concat(e.message),"Could not save Collector")})),p.copy.promise(o)},validate:function(e){var t={id:" ",service_type:"exec",executable_path:" ",default_template:" "};l().merge(t,e);var n=(0,u.ZP)("POST",s.DC("".concat(this.sourceUrl,"/collectors/validate")),t);n.then((function(e){return e}),(function(e){return f.Z.error('Validating collector "'.concat(t.name,'" failed with status: ').concat(e.message),"Could not validate collector")})),p.validate.promise(n)}})}))},fwWvm3G9:(e,t,n)=>{n.d(t,{V:()=>f,b:()=>d});var r=n("JnTtTRmZ"),o=n.n(r),c=n("oCSEoDew"),a=n.n(c),i=n("0wQfx7YJ"),l=n("4af3+9mh"),s=n("OqsMdpSm"),u=n("xc00RsLr"),f=(0,u.ei)("core.Sidecars",(function(){return o().createActions({listPaginated:{asyncResult:!0},getSidecar:{asyncResult:!0},getSidecarActions:{asyncResult:!0},restartCollector:{asyncResult:!0},assignConfigurations:{asyncResult:!0}})})),d=(0,u.dS)("core.Sidecars",(function(){return o().createStore({listenables:[f],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:function(){this.propagateChanges()},propagateChanges:function(){this.trigger({sidecars:this.sidecars,query:this.query,onlyActive:this.onlyActive,pagination:this.pagination,sort:this.sort})},listPaginated:function(e){var t=this,n=e.query,r=void 0===n?"":n,o=e.page,c=void 0===o?1:o,u=e.pageSize,d=void 0===u?50:u,p=e.onlyActive,m=void 0!==p&&p,h=e.sortField,y=void 0===h?"node_name":h,g=e.order,v={query:r,page:c,per_page:d,only_active:m,sort:y,order:void 0===g?"asc":g},b=a()(this.sourceUrl).search(v).toString(),S=(0,s.vl)("GET",i.DC(b));S.then((function(e){return t.sidecars=e.sidecars,t.query=e.query,t.onlyActive=e.only_active,t.pagination={total:e.pagination.total,count:e.pagination.count,page:e.pagination.page,pageSize:e.pagination.per_page},t.sort={field:e.sort,order:e.order},t.propagateChanges(),e}),(function(e){l.Z.error(400===e.status?e.responseMessage:"Fetching Sidecars failed with status: ".concat(e.message),"Could not retrieve Sidecars")})),f.listPaginated.promise(S)},getSidecar:function(e){var t=(0,s.vl)("GET",i.DC("".concat(this.sourceUrl,"/").concat(e)));t.catch((function(t){var n="Fetching Sidecar failed with status: ".concat(t);404===t.status&&(n="Unable to find a sidecar with ID <".concat(e,">, maybe it was inactive for too long.")),l.Z.error(n,"Could not retrieve Sidecar")})),f.getSidecar.promise(t)},restartCollector:function(e,t){var n={};n.collector=t,n.properties={},n.properties.restart=!0;var r=(0,s.ZP)("PUT",i.DC("".concat(this.sourceUrl,"/").concat(e,"/action")),[n]);r.catch((function(e){l.Z.error("Restarting Sidecar failed with status: ".concat(e),"Could not restart Sidecar")})),f.restartCollector.promise(r)},getSidecarActions:function(e){var t=(0,s.vl)("GET",i.DC("".concat(this.sourceUrl,"/").concat(e,"/action")));t.catch((function(e){l.Z.error("Fetching Sidecar actions failed with status: ".concat(e),"Could not retrieve Sidecar actions")})),f.getSidecarActions.promise(t)},toConfigurationAssignmentDto:function(e,t,n){return{node_id:e,collector_id:t,configuration_id:n}},assignConfigurations:function(e,t){var n=e.map((function(e){var n=e.sidecar,r=e.collector,o=n.assignments.filter((function(e){return e.collector_id!==r.id}));return t.forEach((function(e){o.push({collector_id:r.id,configuration_id:e.id})})),{node_id:n.node_id,assignments:o}})),r=(0,s.ZP)("PUT",i.DC("".concat(this.sourceUrl,"/configurations")),{nodes:n});r.then((function(t){return l.Z.success("","Configuration change for ".concat(e.length," collectors requested")),t}),(function(e){l.Z.error("Fetching Sidecar actions failed with status: ".concat(e),"Could not retrieve Sidecar actions")})),f.assignConfigurations.promise(r)}})}))},VxeqfDzo:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n("pmX897Fv"),o=n.n(r),c=n("DjJvgDaP"),a=n.n(c)()(o());a.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:""}]),a.locals={deflist:"zL2vwyqmPLuE_eSRQt1q",topMargin:"m4So8k7QXl39uuSoP2WS",greyedOut:"Bfhoisypey7je2baSbGs"};const i=a},"GfxhvOn/":(e,t,n)=>{n.d(t,{Z:()=>g});var r=n("dFpwyWHg"),o=n.n(r),c=n("C2ikvoS0"),a=n.n(c),i=n("1IntWRSu"),l=n.n(i),s=n("8nGWeFnd"),u=n.n(s),f=n("TeAcaicX"),d=n.n(f),p=n("eE3+5goe"),m=n.n(p),h=n("VxeqfDzo"),y={};y.styleTagTransform=m(),y.setAttributes=u(),y.insert=l().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=d();o()(h.Z,y);const g=h.Z&&h.Z.locals?h.Z.locals:void 0}}]);
//# sourceMappingURL=b6fe2bb5-5666.8177e1813c24f9963dc8.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy