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

web-interface.assets.325e2d4b-8214.48a77da8079e86789910.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-8214"],{Dz3KvXEI:(e,s,t)=>{t.d(s,{Z:()=>o});var a=t("9oVghaOd"),r=t.n(a),i=t("KOwA8QMh");const o={formatMessageSummary(e){const{message:s}=e;return this.formatMessage(s._id,e.index,s,s,e.highlight_ranges,e.decoration_stats)},formatResultMessage(e){const{message:s}=e;return this.formatMessage(s.id,e.index,s,s.fields,e.highlight_ranges,e.decoration_stats)},formatMessage(e,s,t,a,o,n){const l=i.Z.filterFields(a);return{id:e,timestamp:r()(t.timestamp).unix(),filtered_fields:l,formatted_fields:l,fields:a,index:s,source_node_id:a.gl2_source_node,source_input_id:a.gl2_source_input,stream_ids:t.streams,highlight_ranges:o,decoration_stats:n}}}},ybxWUUGW:(e,s,t)=>{t.r(s),t.d(s,{default:()=>b});var a=t("ii0bleBb"),r=t.n(a),i=t("Z7aTuO5B"),o=t("VPaD/Np4"),n=t("m2I+1w5Q"),l=t("8pZttqbT"),d=t("F9olzlTR"),m=t("A5qVt0Ki"),c=t("9MIdTfp1"),u=t("CfS4XPvw"),g=t("iZEbgYb9"),f=t("wVH8+4zN"),p=t("fhucVzps"),h=t("xxwliabF"),M=t("JNjM1tjZ"),Z=t("MkxSSB6f"),_=t("b3xCUZUh"),w=t("5tMhZP+E");const S=e=>{let{streams:s,timestamp:t,children:a}=e;const{data:r}=(0,g.Z)(s,{type:"absolute",from:t,to:t}),n=(0,i.useMemo)((()=>{const e=o.List(r);return{all:e,queryFields:o.Map({query:e})}}),[r]);return i.createElement(f.Z.Provider,{value:n},a)},E=e=>{let{params:{index:s,messageId:t}}=e;if(!s||!t)throw new Error("index and messageId need to be specified!");const{streams:a,allStreams:r}=(()=>{const[e,s]=(0,i.useState)(),[t,a]=(0,i.useState)();return(0,i.useEffect)((()=>{h.ZP.listStreams().then((e=>{if(e){const t=e.reduce(((e,s)=>({...e,[s.id]:s})),{});s(o.Map(t)),a(o.List(e))}}))}),[s,a]),{streams:e,allStreams:t}})(),{message:u,inputs:g}=((e,s)=>{const[t,a]=(0,i.useState)(),[r,n]=(0,i.useState)(o.Map());return(0,i.useEffect)((()=>{(async()=>{const t=await Z.q.loadMessage(e,s);if(a(t),t.source_input_id&&await(0,w.R)(t.fields.gl2_source_node)){const e=await M.x.get(t.source_input_id);if(e){const s=o.Map({[e.id]:e});n(s)}}})()}),[e,s,a,n]),{message:t,inputs:r}})(s,t);(0,i.useEffect)((()=>{_.h.list()}),[]);if((0,i.useMemo)((()=>void 0!==u&&void 0!==a&&void 0!==g&&void 0!==r),[u,a,g,r])){const{streams:e,timestamp:l}=u.fields,f=e.filter((e=>a.has(e)));return i.createElement(n.Z,{title:`Message ${t} on ${s}`},i.createElement(d.X2,{className:"content",id:"sticky-augmentations-container"},i.createElement(d.JX,{md:12},i.createElement(p.Z,null,i.createElement(S,{streams:f,timestamp:l},i.createElement(m.Z.Provider,{value:!1},i.createElement(c.Z,{fields:o.List(),streams:a,allStreams:r,disableSurroundingSearch:!0,inputs:g,message:u})))))))}return i.createElement(l.Z,{"data-testid":"spinner"})};E.propTypes={params:r().exact({index:r().string.isRequired,messageId:r().string.isRequired}).isRequired};const b=(0,u.Z)(E)},MkxSSB6f:(e,s,t)=>{t.d(s,{q:()=>u});var a=t("JnTtTRmZ"),r=t.n(a),i=t("OqsMdpSm"),o=t("Dz3KvXEI"),n=t("rkoyttmq"),l=t("0wQfx7YJ"),d=t("4af3+9mh"),m=t("L040zqI6"),c=t("xc00RsLr");const u=(0,c.ei)("core.Messages",(()=>r().createActions({loadMessage:{asyncResult:!0},fieldTerms:{asyncResult:!0},loadRawMessage:{asyncResult:!0}})));(0,c.dS)("core.Messages",(()=>r().createStore({listenables:[u],sourceUrl:"",getInitialState:()=>({}),loadMessage(e,s){const{url:t}=n.Z.MessagesController.single(e.trim(),s.trim()),a=(0,i.ZP)("GET",l.DC(t)).then((e=>o.Z.formatResultMessage(e)),(e=>{d.Z.error(`Loading message information failed with status: ${e}`,"Could not load message information")}));u.loadMessage.promise(a)},fieldTerms(e,s){const{url:t}=n.Z.MessagesController.analyze(e,encodeURIComponent(m.Z.stringify(s))),a=(0,i.ZP)("GET",l.DC(t)).then((e=>e.tokens),(e=>{d.Z.error(`Loading field terms failed with status: ${e}`,"Could not load field terms.")}));u.fieldTerms.promise(a)},loadRawMessage(e,s,t,a){const{url:r}=n.Z.MessagesController.parse(),m={message:e,remote_address:s,codec:t,configuration:a},c=(0,i.ZP)("POST",l.DC(r),m).then((e=>o.Z.formatResultMessage(e)),(e=>{e.additional&&400===e.additional.status?d.Z.error("Please ensure the selected codec and its configuration are right. Check your server logs for more information.","Could not load raw message"):d.Z.error(`Loading raw message failed with status: ${e}`,"Could not load raw message")}));u.loadRawMessage.promise(c)}})))}}]);
//# sourceMappingURL=325e2d4b-8214.48a77da8079e86789910.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy