Files
openmaxio-object-browser/web-app/build/static/js/3400.f4b8f3e0.chunk.js
2024-02-16 13:58:01 -08:00

2 lines
2.8 KiB
JavaScript

"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[3400],{3400:(e,t,s)=>{s.r(t),s.d(t,{default:()=>x});var c=s(69060),i=s(66152),n=s(19536),a=s(51560),o=s(61180),l=s(78256),r=s(21124),u=s(3992),d=s(95705),_=s(2432),p=s(66156),h=s(99748),m=s(84612),C=s(82496);const O=(0,h.c)(c.lazy((()=>s.e(4916).then(s.bind(s,74916))))),S=(0,h.c)(c.lazy((()=>s.e(1024).then(s.bind(s,11024))))),b=(0,h.c)(c.lazy((()=>s.e(9460).then(s.bind(s,29460))))),x=()=>{const e=(0,p.Ab)(),t=(0,a.W4)(),s=(0,n.w1)(_.qO),[h,x]=(0,c.useState)(!0),[T,f]=(0,c.useState)([]),[E,A]=(0,c.useState)(!1),[k,j]=(0,c.useState)(!1),[y,P]=(0,c.useState)(""),[B,I]=(0,c.useState)(!1),[K,U]=(0,c.useState)(""),[w,L]=(0,c.useState)(""),g=t.bucketName||"",N=(0,u.i)(g,[r.Oi.S3_GET_BUCKET_POLICY,r.Oi.S3_GET_ACTIONS]),Y=(0,u.i)(g,[r.Oi.S3_DELETE_BUCKET_POLICY]),F=(0,u.i)(g,[r.Oi.S3_PUT_BUCKET_POLICY,r.Oi.S3_PUT_ACTIONS]);(0,c.useEffect)((()=>{s&&x(!0)}),[s,x]);const G=[{type:"delete",disableButtonFunction:()=>!Y,onClick:e=>{j(!0),P(e.prefix)}},{type:"view",disableButtonFunction:()=>!F,onClick:e=>{U(e.prefix),L(e.access),I(!0)}}];(0,c.useEffect)((()=>{e((0,d.i8)("bucket_detail_prefix"))}),[]),(0,c.useEffect)((()=>{h&&(N?o.m.bucket.listAccessRulesWithBucket(g).then((e=>{f(e.data.accessRules),x(!1)})).catch((t=>{e((0,d.aW)((0,l.K)(t))),x(!1)})):x(!1))}),[h,e,N,g]);return(0,C.jsxs)(c.Fragment,{children:[E&&(0,C.jsx)(O,{modalOpen:E,onClose:()=>{A(!1),x(!0)},bucket:g}),k&&(0,C.jsx)(S,{modalOpen:k,onClose:()=>{j(!1),x(!0)},bucket:g,toDelete:y}),B&&(0,C.jsx)(b,{modalOpen:B,onClose:()=>{I(!1),x(!0)},bucket:g,toEdit:K,initial:w}),(0,C.jsx)(i.eCc,{separator:!0,sx:{marginBottom:15},actions:(0,C.jsx)(u.K,{scopes:[r.Oi.S3_GET_BUCKET_POLICY,r.Oi.S3_PUT_BUCKET_POLICY,r.Oi.S3_GET_ACTIONS,r.Oi.S3_PUT_ACTIONS],resource:g,matchAll:!0,errorProps:{disabled:!0},children:(0,C.jsx)(m.c,{tooltip:"Add Access Rule",children:(0,C.jsx)(i.qaq,{id:"add-bucket-access-rule",onClick:()=>{A(!0)},label:"Add Access Rule",icon:(0,C.jsx)(i.EgV,{}),variant:"callAction"})})}),children:(0,C.jsx)(i.M5Y,{content:(0,C.jsxs)(c.Fragment,{children:["Setting an"," ",(0,C.jsx)("a",{href:"https://min.io/docs/minio/linux/reference/minio-mc/mc-anonymous-set.html",target:"blank",children:"Anonymous"})," ","policy allows clients to access the Bucket or prefix contents and perform actions consistent with the specified policy without authentication."]}),placement:"right",children:"Anonymous Access"})}),(0,C.jsx)(u.K,{scopes:[r.Oi.S3_GET_BUCKET_POLICY,r.Oi.S3_GET_ACTIONS],resource:g,errorProps:{disabled:!0},children:(0,C.jsx)(i.iSL,{itemActions:G,columns:[{label:"Prefix",elementKey:"prefix",renderFunction:e=>e||"/"},{label:"Access",elementKey:"access"}],isLoading:h,records:T||[],entityName:"Access Rules",idField:"prefix"})})]})}}}]);
//# sourceMappingURL=3400.f4b8f3e0.chunk.js.map