"use strict";(self.webpackChunkgrafana_lokiexplore_app=self.webpackChunkgrafana_lokiexplore_app||[]).push([[594],{3594:(e,t,a)=>{a.r(t),a.d(t,{default:()=>y});var r=a(5959),l=a.n(r),o=a(1119),n=a(8531),u=a(3806),s=a(892),i=a(7781),g=a(7311),c=a(8835),p=a(2871),P=a(8315);function d(e){return new o.P1({body:new g.P({$timeRange:new o.JZ({from:"now-15m",to:"now"}),routeMatch:e})})}function b(){return new o.jD({title:"",url:s.Gy,getScene:()=>new o.P1({body:new o.G1({direction:"column",children:[]})}),hideFromBreadcrumbs:!0,routePath:"*",$behaviors:[()=>{(0,c.Ns)()}]})}function w(e,t,a){const{labelName:r,labelValue:l}=(0,s.XJ)(e);return new o.jD({title:(0,P.Zr)(a),layout:i.PageLayoutType.Custom,url:s.bw[a](l,r),preserveUrlKeys:s.tm,getParentPage:()=>t,getScene:e=>d(e)})}function f(e,t,a){const{labelName:r,labelValue:l,breakdownLabel:n}=(0,s.XJ)(e);if(!n){const e=new Error("Breakdown value missing!");throw p.v.error(e,{labelName:r,labelValue:l,breakdownLabel:null!=n?n:""}),e}return new o.jD({title:(0,P.Zr)(n),layout:i.PageLayoutType.Custom,url:s.mC[a](l,r,n),preserveUrlKeys:s.tm,getParentPage:()=>t,getScene:e=>d(e)})}var m=a(6949);const h=()=>new o.Oh({pages:[new o.jD({title:"Logs",url:(0,s._F)(s.G3.explore),layout:i.PageLayoutType.Custom,preserveUrlKeys:s.Zt,routePath:(0,s._F)(s.G3.explore),getScene:e=>d(e),drilldowns:[{routePath:s.HU.logs,getPage:(e,t)=>w(e,t,s.G3.logs),defaultRoute:!0},{routePath:s.HU.labels,getPage:(e,t)=>w(e,t,s.G3.labels)},{routePath:s.HU.patterns,getPage:(e,t)=>w(e,t,s.G3.patterns)},{routePath:s.HU.fields,getPage:(e,t)=>w(e,t,s.G3.fields)},{routePath:s.KL.label,getPage:(e,t)=>f(e,t,s._J.label)},{routePath:s.KL.field,getPage:(e,t)=>f(e,t,s._J.field)},{routePath:"*",getPage:()=>b()}]}),b()],urlSyncOptions:{createBrowserHistorySteps:!1,updateUrlOnInit:!0}}),y=function(){const[e,t]=l().useState(!1);(0,m.rX)();const a=(0,o.TG)(h);(0,r.useEffect)((()=>{e||t(!0)}),[a,e]);const s=n.config.bootData.user.permissions;return(null==s?void 0:s["grafana-lokiexplore-app:read"])||(null==s?void 0:s["datasources:explore"])?e?l().createElement(a.Component,{model:a}):null:l().createElement(u.Redirect,{to:"/"})}}}]);
//# sourceMappingURL=594.js.map