"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[2929],{512:(P,_,t)=>{t.d(_,{Z:()=>s});var e=t(65237),E=t(6335),o=t(48389);function u({dashboards:i,onImport:l,onRemove:c}){function D(a){return a.revision!==a.importedRevision?"Update":"Re-import"}return e.createElement("table",{className:"filter-table"},e.createElement("tbody",null,i.map((a,r)=>e.createElement("tr",{key:`${a.dashboardId}-${r}`},e.createElement("td",{className:"width-1"},e.createElement(E.J,{name:"apps"})),e.createElement("td",null,a.imported?e.createElement("a",{href:a.importedUrl},a.title):e.createElement("span",null,a.title)),e.createElement("td",{style:{textAlign:"right"}},a.imported?e.createElement(o.zx,{variant:"secondary",size:"sm",onClick:()=>l(a,!0)},D(a)):e.createElement(o.zx,{variant:"secondary",size:"sm",onClick:()=>l(a,!1)},"Import"),a.imported&&e.createElement(o.zx,{"aria-label":"Delete dashboard",icon:"trash-alt",variant:"destructive",size:"sm",onClick:()=>c(a)}))))))}const s=u},70320:(P,_,t)=>{t.d(_,{Z:()=>c});var e=t(65237),E=t(42702),o=t(24950),u=t(1100),s=t(3315),i=t(512),l=t(66116);function c({uid:a}){(0,l.wi)(a);const r=(0,s.useDispatch)(),m=(0,s.useSelector)(n=>n.dataSources.dataSource),d=(0,s.useSelector)(n=>n.plugins.dashboards),p=(0,s.useSelector)(n=>n.plugins.isLoadingPluginDashboards);(0,e.useEffect)(()=>{m.id>0&&r((0,u.m3)())},[r,m]);const O=(n,v)=>{r((0,o.$j)({pluginId:n.pluginId,path:n.path,overwrite:v,inputs:[{name:"*",type:"datasource",pluginId:m.type,value:m.name}]},n.title))},M=({uid:n})=>{r((0,o.fG)(n))};return e.createElement(D,{dashboards:d,isLoading:p,onImportDashboard:O,onRemoveDashboard:M})}const D=({isLoading:a,dashboards:r,onImportDashboard:m,onRemoveDashboard:d})=>a?e.createElement(E.Z,null):e.createElement(i.Z,{dashboards:r,onImport:m,onRemove:d})},97632:(P,_,t)=>{t.r(_),t.d(_,{DataSourceDashboardsPage:()=>s,default:()=>i});var e=t(65237),E=t(38992),o=t(70320),u=t(66116);function s(l){const c=l.match.params.uid,D=(0,u.MF)(c,"dashboards");return e.createElement(E.T,{navId:"datasources",pageNav:D.main},e.createElement(E.T.Contents,null,e.createElement(o.Z,{uid:c})))}const i=s}}]);

//# sourceMappingURL=DataSourceDashboards.d0b4c06c6ea25eb6680f.js.map