"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[5296],{26684:(g,e,a)=>{a.r(e),a.d(e,{default:()=>f});var t=a(85960),_=a(81502),u=a(90857),l=a(91),r=a(20989),c=a(95162),o=a(77705),P=a(3273);function f(M){const[O,h]=(0,t.useState)(null),{datasourceUid:n}=M.match.params,E=(0,c.useDispatch)();return(0,t.useEffect)(()=>{const s=(0,_.F)().getInstanceSettings(n);if(!s){h("Data source not found");return}if(u.config.featureToggles.emptyDashboardPage)E((0,P.Rd)(n));else{const d=(0,o.ZQ)(),{dashboard:D}=d;D.panels[0]={...D.panels[0],datasource:{uid:s.uid,type:s.type}},(0,o.$M)(d)}l.E1.replace("/dashboard/new")},[n,E]),O?t.createElement(r.T,{navId:"dashboards"},t.createElement(r.T.Contents,null,t.createElement("div",null,'Data source with UID "',n,'" not found.'))):null}}}]);

//# sourceMappingURL=DashboardPage.00196cf67e6cb74f7fd4.js.map