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

web-interface.assets.NewDashboardPage.c12f36bf7a8d1c3d71f2.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-6618"],{"/UN9W/pr":(e,t,r)=>{r.d(t,{Z:()=>l});var a=r("Z7aTuO5B"),s=r("CVePKKXE"),o=r("XwJRVrBP"),n=r("RwbKyha4");const i=e=>{let{error:t}=e;return a.createElement(s.Z,{title:"Something went wrong",description:a.createElement("p",null,"An unknown error has occurred. Please have a look at the following message and the graylog server log for more information.")},a.createElement("pre",null,null==t?void 0:t.message))},l=(e,t)=>{const r=(0,n.Z)("views.hooks.loadingView"),s=(0,n.Z)("views.hooks.executingView"),[l,u]=(0,a.useState)(!1),[c,d]=(0,a.useState)(void 0);return(0,a.useEffect)((()=>{(0,o._)(e,r,s,t,(()=>{u(!0),d(void 0)})).catch((e=>{e instanceof Error?d(a.createElement(i,{error:e})):d(e)}))}),[s,r,e]),[l,c]}},zljFjDae:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var a=r("Z7aTuO5B"),s=r("2Ob2iJ3u"),o=r("8pZttqbT"),n=r("VPaD/Np4"),i=r("QGFRdiea");const l=e=>{const t=(0,n.Map)(e.search.queries.map((e=>[e.id,e]))),r=(e.state||(0,n.Map)()).map(((e,r)=>{const{timerange:a,query:s,filter:o=(0,n.Map)()}=t.get(r),i=(o?o.get("filters",(0,n.List)()):(0,n.List)()).filter((e=>n.Map.isMap(e)&&"stream"===e.get("type"))).map((e=>e.get("id"))).toList().toArray(),l=e.widgets.map((e=>e.toBuilder().timerange(a).query(s).streams(i).build())).toList();return e.toBuilder().widgets(l).build()})).toMap(),a=e.search.queries.map((e=>e.toBuilder().query({...e.query,query_string:""}).build())).toSet(),s=e.search.toBuilder().queries(a).build();return e.toBuilder().newId().type(i.Z.Type.Dashboard).state(r).search(s).build()};var u=r("kPlrIoxQ"),c=r("0zTRKSqx"),d=r("/UN9W/pr"),p=r("2LcCq8Nd");const g=e=>{let{location:t}=e;const{state:r={}}=t,{view:s}=r,n=(0,a.useMemo)((()=>{if(null!=s&&s.search){const e=l(s);return u.C.load(e,!0).then((()=>e))}return u.C.create(i.Z.Type.Dashboard).then((e=>{let{view:t}=e;return t}))}),[]),[g,m]=(0,d.Z)(n,t.query);return m||(g?a.createElement(c.AE,{permissions:"dashboards:create"},a.createElement(p.Z,null)):a.createElement(o.Z,null))};g.propTypes={};const m=(0,s.Z)(g)}}]);
//# sourceMappingURL=NewDashboardPage.c12f36bf7a8d1c3d71f2.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy