"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[7643],{87643:(e,t,s)=>{s.r(t),s.d(t,{default:()=>A});var n=s(65043),a=s(73216),c=s(89923),i=s(22166),l=s(99161),o=s(77938),d=s(72237),r=s(64159),_=s(39947),b=s(20554),u=s(6681),h=s(48793),T=s(56629),x=s(53518),O=s(92452),C=s(70579);const j=(0,d.A)(n.lazy((()=>s.e(3851).then(s.bind(s,3851))))),S=(0,d.A)(n.lazy((()=>s.e(9965).then(s.bind(s,19965))))),p=(0,d.A)(n.lazy((()=>s.e(6065).then(s.bind(s,76065))))),E=(0,d.A)(n.lazy((()=>s.e(12).then(s.bind(s,40012))))),I=(0,d.A)(n.lazy((()=>s.e(8010).then(s.bind(s,78010))))),f=(0,d.A)(n.lazy((()=>s.e(2689).then(s.bind(s,62689))))),m=(0,d.A)(n.lazy((()=>s.e(872).then(s.bind(s,30872))))),A=()=>{var e;const t=(0,b.jL)(),s=(0,a.Zp)(),d=(0,a.g)(),A=(0,a.zy)(),N=(0,i.d4)(r.Rq),k=(0,i.d4)(_.Nx),y=(0,i.d4)(_.fT),U=(0,i.d4)(r.nM),[V,g]=(0,n.useState)(!1),[L,v]=(0,n.useState)(!1),R=d.bucketName||"",B=(0,o._)(R,l.Sg),G=(0,o._)(R,l.Nt);(0,n.useEffect)((()=>{t((0,r.ph)("bucket_details"))}),[]),(0,n.useEffect)((()=>{V||(t((0,_.ZU)(!0)),g(!0))}),[V,t,g]),(0,n.useEffect)((()=>{k&&T.F.buckets.bucketInfo(R).then((e=>{t((0,_.ZU)(!1)),t((0,_.$T)(e.data))})).catch((e=>{t((0,_.ZU)(!1)),t((0,r.C9)((0,x.S)(e)))}))}),[R,k,t]);let w="/buckets/".concat(R);const F={events:"/admin/events",replication:"/admin/replication",lifecycle:"/admin/lifecycle",access:"/admin/access",prefix:"/admin/prefix"},P=e=>{let t=F[e];return t=t?"".concat(w).concat(t):"".concat(w).concat("/admin/summary"),t};return(0,C.jsxs)(n.Fragment,{children:[L&&(0,C.jsx)(j,{deleteOpen:L,selectedBucket:R,closeDeleteModalAndRefresh:e=>{(e=>{v(!1),e&&s("/buckets")})(e)}}),(0,C.jsx)(h.A,{label:(0,C.jsx)(c.EGL,{label:"Buckets",onClick:()=>s("/buckets")}),actions:(0,C.jsxs)(n.Fragment,{children:[(0,C.jsx)(u.A,{tooltip:G?"Browse Bucket":(0,l.vj)(l.pC[l.ac.BUCKET_VIEWER],"browsing this bucket"),children:(0,C.jsx)(c.$nd,{id:"switch-browse-view","aria-label":"Browse Bucket",onClick:()=>{s("/browser/".concat(R))},icon:(0,C.jsx)(c.sjq,{style:{width:20,height:20,marginTop:-3}}),style:{padding:"0 10px"},disabled:!G})}),(0,C.jsx)(O.A,{})]})}),(0,C.jsxs)(c.Mxu,{children:[(0,C.jsx)(c.lcx,{icon:(0,C.jsx)(n.Fragment,{children:(0,C.jsx)(c.brV,{width:40})}),title:R,subTitle:(0,C.jsxs)(o.R,{scopes:[l.OV.S3_GET_BUCKET_POLICY,l.OV.S3_GET_ACTIONS],resource:R,children:[(0,C.jsx)("span",{style:{fontSize:15},children:"Access: "}),(0,C.jsx)("span",{style:{fontWeight:600,fontSize:15,textTransform:"capitalize"},children:null===y||void 0===y||null===(e=y.access)||void 0===e?void 0:e.toLowerCase()})]}),actions:(0,C.jsxs)(n.Fragment,{children:[(0,C.jsx)(o.R,{scopes:l.Sg,resource:R,errorProps:{disabled:!0},children:(0,C.jsx)(u.A,{tooltip:B?"":(0,l.vj)([l.OV.S3_DELETE_BUCKET,l.OV.S3_FORCE_DELETE_BUCKET],"deleting this bucket"),children:(0,C.jsx)(c.$nd,{id:"delete-bucket-button",onClick:()=>{v(!0)},label:"Delete Bucket",icon:(0,C.jsx)(c.ucK,{}),variant:"secondary",disabled:!B})})}),(0,C.jsx)(c.$nd,{id:"refresh-bucket-info",onClick:()=>{t((0,_.ZU)(!0))},label:"Refresh",icon:(0,C.jsx)(c.fNY,{})})]}),sx:{marginBottom:15}}),(0,C.jsx)(c.azJ,{children:(0,C.jsx)(c.tUM,{currentTabOrPath:A.pathname,useRouteTabs:!0,onTabClick:e=>{s(e)},options:[{tabConfig:{label:"Summary",id:"summary",to:P("summary")}},{tabConfig:{label:"Events",id:"events",disabled:!(0,o._)(R,[l.OV.S3_GET_BUCKET_NOTIFICATIONS,l.OV.S3_PUT_BUCKET_NOTIFICATIONS,l.OV.S3_GET_ACTIONS,l.OV.S3_PUT_ACTIONS]),to:P("events")}},{tabConfig:{label:"Replication",id:"replication",disabled:!N||U.enabled&&U.curSite||!(0,o._)(R,[l.OV.S3_GET_REPLICATION_CONFIGURATION,l.OV.S3_PUT_REPLICATION_CONFIGURATION,l.OV.S3_GET_ACTIONS,l.OV.S3_PUT_ACTIONS]),to:P("replication")}},{tabConfig:{label:"Lifecycle",id:"lifecycle",disabled:!N||!(0,o._)(R,[l.OV.S3_GET_LIFECYCLE_CONFIGURATION,l.OV.S3_PUT_LIFECYCLE_CONFIGURATION,l.OV.S3_GET_ACTIONS,l.OV.S3_PUT_ACTIONS]),to:P("lifecycle")}},{tabConfig:{label:"Access",id:"access",disabled:!(0,o._)(R,[l.OV.ADMIN_GET_POLICY,l.OV.ADMIN_LIST_USER_POLICIES,l.OV.ADMIN_LIST_USERS]),to:P("access")}},{tabConfig:{label:"Anonymous",id:"anonymous",disabled:!(0,o._)(R,[l.OV.S3_GET_BUCKET_POLICY,l.OV.S3_GET_ACTIONS]),to:P("prefix")}}],routes:(0,C.jsxs)(a.BV,{children:[(0,C.jsx)(a.qh,{path:"summary",element:(0,C.jsx)(E,{})}),(0,C.jsx)(a.qh,{path:"events",element:(0,C.jsx)(I,{})}),N&&(0,C.jsx)(a.qh,{path:"replication",element:(0,C.jsx)(f,{})}),N&&(0,C.jsx)(a.qh,{path:"lifecycle",element:(0,C.jsx)(m,{})}),(0,C.jsx)(a.qh,{path:"access",element:(0,C.jsx)(p,{})}),(0,C.jsx)(a.qh,{path:"prefix",element:(0,C.jsx)(S,{})}),(0,C.jsx)(a.qh,{path:"*",element:(0,C.jsx)(a.C5,{to:"/buckets/".concat(R,"/admin/summary")})})]})})})]})]})}},72237:(e,t,s)=>{s.d(t,{A:()=>c});var n=s(65043),a=s(70579);const c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(s){return(0,a.jsx)(n.Suspense,{fallback:t,children:(0,a.jsx)(e,{...s})})}}}}]);
//# sourceMappingURL=7643.bc0ec1d5.chunk.js.map