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

web-interface.assets.325e2d4b-296.07c32b0713a0a2795f8c.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-296"],{VRwsQcBF:(t,e,s)=>{s.r(e),s.d(e,{default:()=>E});var n=s("ii0bleBb"),i=s.n(n),r=s("Z7aTuO5B"),o=s("D4SbLiE/"),l=s.n(o),a=s("JnTtTRmZ"),u=s.n(a),p=s("T9uEq15A"),c=s("0zTRKSqx"),h=s("CfS4XPvw"),d=s("QyOjLTDh"),m=s("CTjt89g5"),g=s("up7V834Q"),S=s("b3xCUZUh"),T=s("0wQfx7YJ"),f=s("4af3+9mh"),y=s("OqsMdpSm");const v=(0,s("xc00RsLr").dS)("core.Plugins",(()=>u().createStore({sourceUrl:t=>`/cluster/${t}/plugins`,list(t){return(0,y.ZP)("GET",T.DC(this.sourceUrl(t))).then((t=>t.plugins),(e=>f.Z.error(`Getting plugins on node "${t}" failed: ${e}`,"Could not get plugins")))}})));const C=l()({displayName:"ShowNodePage",propTypes:{params:i().object.isRequired},mixins:[u().connectFilter(S.S,"node",(function(t){return t.nodes?t.nodes[this.props.params.nodeId]:t.nodes})),u().connectFilter(d.i,"systemOverview",(function(t){return t.clusterOverview?t.clusterOverview[this.props.params.nodeId]:void 0})),u().connect(g.W)],getInitialState:()=>({jvmInformation:void 0,plugins:void 0}),UNSAFE_componentWillMount(){Promise.all([d.i.jvm(this.props.params.nodeId).then((t=>this.setState({jvmInformation:t}))),v.list(this.props.params.nodeId).then((t=>this.setState({plugins:t}))),m.c.list().then((t=>{const e=Object.keys(t),s=[];e.forEach((e=>{const n=t[e][this.props.params.nodeId];n&&s.push(n)})),this.setState({inputStates:s})}))]).then((()=>{}),(t=>this.setState({errors:t})))},_isLoading(){return!(this.state.node&&this.state.systemOverview)},render(){if(this.state.errors)return r.createElement(c.nR,{errors:[this.state.errors]});if(this._isLoading())return r.createElement(c.$j,null);const{node:t}=this.state,e=r.createElement("span",null,"Node ",t.short_node_id," / ",t.hostname);return r.createElement(c.$4,{title:`Node ${t.short_node_id} / ${t.hostname}`},r.createElement("div",null,r.createElement(c.mr,{title:e,actions:r.createElement(p.sV,{node:t})},r.createElement("span",null,"This page shows details of a Graylog server node that is active and reachable in your cluster.",r.createElement("br",null),t.is_leader?r.createElement("span",null,"This is the leader node."):r.createElement("span",null,"This is ",r.createElement("em",null,"not")," the leader node."))),r.createElement(p.$2,{node:t,systemOverview:this.state.systemOverview,jvmInformation:this.state.jvmInformation,plugins:this.state.plugins,inputStates:this.state.inputStates,inputDescriptions:this.state.inputDescriptions})))}}),E=(0,h.Z)(C)},CTjt89g5:(t,e,s)=>{s.d(e,{c:()=>u});var n=s("JnTtTRmZ"),i=s.n(n),r=s("4af3+9mh"),o=s("0wQfx7YJ"),l=s("rkoyttmq"),a=s("OqsMdpSm");const u=(0,s("xc00RsLr").dS)("core.InputStates",(()=>i().createStore({listenables:[],init(){this.list()},getInitialState(){return{inputStates:this.inputStates}},list(){const t=o.DC(l.Z.ClusterInputStatesController.list().url);return(0,a.ZP)("GET",t).then((t=>{const e={};return Object.keys(t).forEach((s=>{t[s]&&t[s].forEach((t=>{e[t.id]||(e[t.id]={}),e[t.id][s]=t}))})),this.inputStates=e,this.trigger({inputStates:this.inputStates}),e}))},_checkInputStateChangeResponse(t,e,s){const n=Object.keys(e).filter((e=>!!t.global||e===t.node)),i=n.filter((t=>null===e[t]));0===i.length?r.Z.success(`Request to ${s.toLowerCase()} input '${t.title}' was sent successfully.`,`Input '${t.title}' will be ${"START"===s?"started":"stopped"} shortly`):i.length===n.length?r.Z.error(`Request to ${s.toLowerCase()} input '${t.title}' failed. Check your Graylog logs for more information.`,`Input '${t.title}' could not be ${"START"===s?"started":"stopped"}`):r.Z.warning(`Request to ${s.toLowerCase()} input '${t.title}' failed in some nodes. Check your Graylog logs for more information.`,`Input '${t.title}' could not be ${"START"===s?"started":"stopped"} in all nodes`)},start(t){const e=o.DC(l.Z.ClusterInputStatesController.start(t.id).url);return(0,a.ZP)("PUT",e).then((e=>(this._checkInputStateChangeResponse(t,e,"START"),this.list(),e)),(e=>{r.Z.error(`Error starting input '${t.title}': ${e}`,`Input '${t.title}' could not be started`)}))},stop(t){const e=o.DC(l.Z.ClusterInputStatesController.stop(t.id).url);return(0,a.ZP)("DELETE",e).then((e=>(this._checkInputStateChangeResponse(t,e,"STOP"),this.list(),e)),(e=>{r.Z.error(`Error stopping input '${t.title}': ${e}`,`Input '${t.title}' could not be stopped`)}))}})))},up7V834Q:(t,e,s)=>{s.d(e,{W:()=>p,_:()=>u});var n=s("JnTtTRmZ"),i=s.n(n),r=s("0wQfx7YJ"),o=s("OqsMdpSm"),l=s("4af3+9mh"),a=s("xc00RsLr");const u=(0,a.ei)("core.InputTypes",(()=>i().createActions({list:{asyncResult:!0},get:{asyncResult:!0}}))),p=(0,a.dS)("core.InputTypes",(()=>i().createStore({listenables:[u],sourceUrl:"/system/inputs/types",inputTypes:void 0,inputDescriptions:void 0,init(){this.list()},getInitialState(){return{inputTypes:this.inputTypes,inputDescriptions:this.inputDescriptions}},list(){const t=(0,o.ZP)("GET",(0,r.DC)(this.sourceUrl)),e=(0,o.ZP)("GET",(0,r.DC)(`${this.sourceUrl}/all`)),s=Promise.all([t,e]);s.then((t=>{let[e,s]=t;this.inputTypes=e.types,this.inputDescriptions=s,this.trigger(this.getInitialState())}),(t=>{l.Z.error(`Fetching Input Types failed with status: ${t}`,"Could not retrieve Inputs")})),u.list.promise(s)},get(t){const e=(0,o.ZP)("GET",(0,r.DC)(`${this.sourceUrl}/${t}`));e.catch((e=>{l.Z.error(`Fetching input ${t} failed with status: ${e}`,"Could not retrieve input")})),u.get.promise(e)}})))}}]);
//# sourceMappingURL=325e2d4b-296.07c32b0713a0a2795f8c.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy