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

web-interface.assets.1255d548-3913.8cdac0c5f1edc0c8dd2a.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-3913"],{HntqvQkd:(g,h,t)=>{t.r(h),t.d(h,{default:()=>U});var E=t("ii0bleBb"),p=t.n(E),n=t("Z7aTuO5B"),a=t("D4SbLiE/"),d=t.n(a),c=t("JnTtTRmZ"),i=t.n(c),m=t("/7uHmzM0"),e=t("/GOzvPf6"),o=t("c9JM82dZ"),s=t("WE0xQIRH"),l=t("h0mKhxLv"),u=t("wToqYuKZ"),T=t("Vg8s2y9S"),S=t("MdYBRjRJ"),I=t("jAGDuYSC"),D=t("eFxcQyPT"),O=t("IA3Ku5lS");const C=(0,O.dS)("core.Plugins",()=>i().createStore({sourceUrl:r=>`/cluster/${r}/plugins`,list(r){return(0,D.ZP)("GET",S.DC(this.sourceUrl(r))).then(v=>v.plugins,v=>I.Z.error(`Getting plugins on node "${r}" failed: ${v}`,"Could not get plugins"))}}));function R(r){return r.nodes?r.nodes[this.props.params.nodeId]:r.nodes}function y(r){return r.clusterOverview?r.clusterOverview[this.props.params.nodeId]:void 0}const M=d()({displayName:"ShowNodePage",propTypes:{params:p().object.isRequired},mixins:[i().connectFilter(T.S,"node",R),i().connectFilter(s.i,"systemOverview",y),i().connect(u.W)],getInitialState(){return{jvmInformation:void 0,plugins:void 0}},UNSAFE_componentWillMount(){Promise.all([s.i.jvm(this.props.params.nodeId).then(r=>this.setState({jvmInformation:r})),C.list(this.props.params.nodeId).then(r=>this.setState({plugins:r})),l.c.list().then(r=>{const f=Object.keys(r),v=[];f.forEach(A=>{const P=r[A][this.props.params.nodeId];P&&v.push(P)}),this.setState({inputStates:v})})]).then(()=>{},r=>this.setState({errors:r}))},_isLoading(){return!(this.state.node&&this.state.systemOverview)},render(){if(this.state.errors)return n.createElement(e.nR,{errors:[this.state.errors]});if(this._isLoading())return n.createElement(e.$j,null);const{node:r}=this.state,f=n.createElement("span",null,"Node ",r.short_node_id," / ",r.hostname);return n.createElement(e.$4,{title:`Node ${r.short_node_id} / ${r.hostname}`},n.createElement("div",null,n.createElement(e.mr,{title:f,actions:n.createElement(m.sV,{node:r})},n.createElement("span",null,"This page shows details of a Graylog server node that is active and reachable in your cluster.",n.createElement("br",null),r.is_leader?n.createElement("span",null,"This is the leader node."):n.createElement("span",null,"This is ",n.createElement("em",null,"not")," the leader node."))),n.createElement(m.$2,{node:r,systemOverview:this.state.systemOverview,jvmInformation:this.state.jvmInformation,plugins:this.state.plugins,inputStates:this.state.inputStates,inputDescriptions:this.state.inputDescriptions})))}}),U=(0,o.Z)(M)},c9JM82dZ:(g,h,t)=>{t.d(h,{Z:()=>a});var E=t("Z7aTuO5B"),p=t("yAXMqwrl");const a=d=>c=>{const i=(0,p.useParams)();return E.createElement(d,{...c,params:i})}},h0mKhxLv:(g,h,t)=>{t.d(h,{c:()=>m});var E=t("JnTtTRmZ"),p=t.n(E),n=t("jAGDuYSC"),a=t("MdYBRjRJ"),d=t("U1Iufsob"),c=t("eFxcQyPT"),i=t("IA3Ku5lS");const m=(0,i.dS)("core.InputStates",()=>p().createStore({listenables:[],init(){this.list()},getInitialState(){return{inputStates:this.inputStates}},list(){const e=a.DC(d.Z.ClusterInputStatesController.list().url);return(0,c.ZP)("GET",e).then(o=>{const s={};return Object.keys(o).forEach(l=>{o[l]&&o[l].forEach(u=>{s[u.id]||(s[u.id]={}),s[u.id][l]=u})}),this.inputStates=s,this.trigger({inputStates:this.inputStates}),s})},_checkInputStateChangeResponse(e,o,s){const l=Object.keys(o).filter(T=>e.global?!0:T===e.node),u=l.filter(T=>o[T]===null);u.length===0?n.Z.success(`Request to ${s.toLowerCase()} input '${e.title}' was sent successfully.`,`Input '${e.title}' will be ${s==="START"?"started":"stopped"} shortly`):u.length===l.length?n.Z.error(`Request to ${s.toLowerCase()} input '${e.title}' failed. Check your Graylog logs for more information.`,`Input '${e.title}' could not be ${s==="START"?"started":"stopped"}`):n.Z.warning(`Request to ${s.toLowerCase()} input '${e.title}' failed in some nodes. Check your Graylog logs for more information.`,`Input '${e.title}' could not be ${s==="START"?"started":"stopped"} in all nodes`)},start(e){const o=a.DC(d.Z.ClusterInputStatesController.start(e.id).url);return(0,c.ZP)("PUT",o).then(s=>(this._checkInputStateChangeResponse(e,s,"START"),this.list(),s),s=>{n.Z.error(`Error starting input '${e.title}': ${s}`,`Input '${e.title}' could not be started`)})},stop(e){const o=a.DC(d.Z.ClusterInputStatesController.stop(e.id).url);return(0,c.ZP)("DELETE",o).then(s=>(this._checkInputStateChangeResponse(e,s,"STOP"),this.list(),s),s=>{n.Z.error(`Error stopping input '${e.title}': ${s}`,`Input '${e.title}' could not be stopped`)})}}))},wToqYuKZ:(g,h,t)=>{t.d(h,{W:()=>m,_:()=>i});var E=t("JnTtTRmZ"),p=t.n(E),n=t("MdYBRjRJ"),a=t("eFxcQyPT"),d=t("jAGDuYSC"),c=t("IA3Ku5lS");const i=(0,c.ei)("core.InputTypes",()=>p().createActions({list:{asyncResult:!0},get:{asyncResult:!0}})),m=(0,c.dS)("core.InputTypes",()=>p().createStore({listenables:[i],sourceUrl:"/system/inputs/types",inputTypes:void 0,inputDescriptions:void 0,init(){this.list()},getInitialState(){return{inputTypes:this.inputTypes,inputDescriptions:this.inputDescriptions}},list(){const e=(0,a.ZP)("GET",(0,n.DC)(this.sourceUrl)),o=(0,a.ZP)("GET",(0,n.DC)(`${this.sourceUrl}/all`)),s=Promise.all([e,o]);s.then(([l,u])=>{this.inputTypes=l.types,this.inputDescriptions=u,this.trigger(this.getInitialState())},l=>{d.Z.error(`Fetching Input Types failed with status: ${l}`,"Could not retrieve Inputs")}),i.list.promise(s)},get(e){const o=(0,a.ZP)("GET",(0,n.DC)(`${this.sourceUrl}/${e}`));o.catch(s=>{d.Z.error(`Fetching input ${e} failed with status: ${s}`,"Could not retrieve input")}),i.get.promise(o)}}))}}]);})();

//# sourceMappingURL=1255d548-3913.8cdac0c5f1edc0c8dd2a.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy