"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[2929],{27786:(P,_,t)=>{t.d(_,{Z:()=>s});var e=t(68404),E=t(39904),o=t(31403);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},81960:(P,_,t)=>{t.d(_,{Z:()=>c});var e=t(68404),E=t(2555),o=t(86977),u=t(85805),s=t(81168),i=t(27786),l=t(25e3);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})},46144:(P,_,t)=>{t.r(_),t.d(_,{DataSourceDashboardsPage:()=>s,default:()=>i});var e=t(68404),E=t(79396),o=t(81960),u=t(25e3);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.6a50b10ce477555cd3ab.js.map