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