"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[7785],{19393(O,u,s){s.d(u,{Ay:()=>i});var r=s(74848),o=s(29675),_=s(99528),n=s(12786);const c=({uid:e})=>((0,n.oU)(e),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_.Iz,{featureName:"data source permissions",featureId:"data-source-permissions"}),(0,r.jsx)(D,{})]})),D=({action:e})=>{const P=(0,o.$j)();return(0,r.jsx)(_.El,{action:e,featureName:"data source permissions",description:"With data source permissions, you can protect sensitive data by limiting access to this data source to specific users, teams, and roles.",listItems:["Protect sensitive data, like security logs, production databases, and personally-identifiable information","Clean up users\u2019 experience by hiding data sources they don\u2019t need to use","Share Grafana access more freely, knowing that users will not unwittingly see sensitive data"],image:`ds-permissions-${P.isLight?"light":"dark"}.png`,featureUrl:"https://grafana.com/docs/grafana/latest/enterprise/datasource_permissions"})},i=c},67072(O,u,s){s.r(u),s.d(u,{UpgradePage:()=>e,default:()=>P});var r=s(74848),o=s(54148),_=s(54122),n=s(12636),c=s(12786),D=s(61491),i=s(19393);const e=()=>{const{uid:M=""}=(0,o.g)(),U=(0,c.$m)("permissions"),d=(0,D.useSelector)(p=>p.navIndex),S=(0,n.tc)(d,`datasource-permissions-${M}`,U);return(0,r.jsx)(_.Y,{navId:"datasources",pageNav:S.main,children:(0,r.jsx)(_.Y.Contents,{children:(0,r.jsx)(i.Ay,{uid:M})})})},P=e},802(O,u,s){s.d(u,{$k:()=>B,BY:()=>C,S4:()=>L,Tn:()=>I,US:()=>m,Um:()=>g,_e:()=>R,hx:()=>A,k9:()=>T,oU:()=>v,u1:()=>W,xw:()=>h});var r,o,_,n=s(96540),c=s(40449),D=s(22492),i=s(87638),e=s(61491),P=s(91830),M=s(61674),U=s(47310),d=s(46760),S=s(26629),p=s(2196);const v=t=>{const a=(0,e.useDispatch)();(0,n.useEffect)(()=>(a((0,d.PK)(t)),function(){a((0,c.N)({cleanupAction:E=>E.dataSourceSettings=S.IJ}))}),[t,a])},C=t=>{const a=(0,e.useDispatch)();return()=>a((0,d.Ge)(t,M.b.DataSourcesEdit))},m=()=>{const t=(0,e.useDispatch)(),a=(0,e.useSelector)(E=>E.dataSources.isLoadingDataSources),l=(0,e.useSelector)(E=>E.dataSources.dataSources);return(0,n.useEffect)(()=>{t((0,d.bn)())},[t]),{isLoading:a,dataSources:l}},K=t=>{const a=o();r(()=>{a(_(t))},[a,t])},A=()=>{const t=(0,e.useDispatch)();(0,n.useEffect)(()=>{t((0,d.G2)())},[t])},g=()=>{const t=(0,e.useDispatch)();return a=>{t((0,d.du)(a,M.b.DataSourcesEdit))}},T=()=>{const t=(0,e.useDispatch)();return async a=>t((0,d.jB)(a))},B=()=>{const t=(0,e.useDispatch)(),{name:a}=(0,e.useSelector)(l=>l.dataSources.dataSource);return()=>{D.A.publish(new P.bY({title:"Delete",text:`Are you sure you want to delete the "${a}" data source?`,yesText:"Delete",icon:"trash-alt",onConfirm:()=>t((0,d.Qq)())}))}},h=t=>(0,e.useSelector)(a=>(0,p.U4)(a.dataSources,t)),I=t=>{const a=h(t);return(0,U.h)(a)},L=t=>(0,e.useSelector)(a=>(0,p.Fj)(a.dataSources,t)),R=()=>(0,e.useSelector)(t=>t.dataSourceSettings),W=t=>{const a=h(t),l=a.readOnly===!0,E=i.TP.hasPermissionInMetadata(e.AccessControlAction.DataSourcesWrite,a),f=i.TP.hasPermissionInMetadata(e.AccessControlAction.DataSourcesDelete,a);return{readOnly:l,hasWriteRights:E,hasDeleteRights:f}}},12786(O,u,s){s.d(u,{$k:()=>o.$k,$m:()=>_.$m,BY:()=>o.BY,Bs:()=>n.Bs,C_:()=>n.C_,S4:()=>o.S4,Tk:()=>n.Tk,Tn:()=>o.Tn,US:()=>o.US,Um:()=>o.Um,_e:()=>o._e,du:()=>r.du,eB:()=>n.eB,hp:()=>c.hp,hx:()=>o.hx,jz:()=>n.jz,k9:()=>o.k9,lv:()=>c.lv,oU:()=>o.oU,rb:()=>n.rb,u1:()=>o.u1,wC:()=>c.wC,xs:()=>c.xs,xw:()=>o.xw,zC:()=>c.zC});var r=s(46760),o=s(802),_=s(96326),n=s(26629),c=s(2196)},47310(O,u,s){s.d(u,{h:()=>_});var r=s(2567),o=s(93407);const _=n=>{const c=JSON.stringify({datasource:n.name,context:"explore"});return o.kM.renderUrl(r.I.assureBaseUrl("/explore"),{left:c})}}}]);

//# sourceMappingURL=DatasourcePermissionsUpgradePage.f5ad7be10396e516a96d.js.map