github.com/minio/console@v1.4.1/web-app/build/static/js/12.ab9b7ed0.chunk.js (about)

     1  "use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[12],{40012:(e,s,t)=>{t.r(s),t.d(s,{default:()=>R});var n=t(65043),i=t(33097),a=t.n(i),l=t(22166),r=t(73216),c=t(56629),o=t(53518),d=t(89923),u=t(77403),x=t(99161),h=t(77938),m=t(64159),p=t(39947),j=t(20554),f=t(25903),b=t(70579);const S=e=>{var s,t;let{versioningState:n={}}=e;return(0,b.jsxs)(d.azJ,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,b.jsx)(d.azJ,{sx:{fontWeight:"medium",display:"flex",gap:2},children:n.excludeFolders?(0,b.jsx)(f.A,{icon:n.excludeFolders?(0,b.jsx)(d.xhy,{style:{color:"green"}}):(0,b.jsx)(d.aaC,{}),label:(0,b.jsx)("label",{style:{textDecoration:"normal"},children:"Exclude Folders"})}):null}),null!==(s=n.excludedPrefixes)&&void 0!==s&&s.length?(0,b.jsxs)(d.azJ,{sx:{fontWeight:"medium",display:"flex",justifyItems:"end",placeItems:"flex-start",flexDirection:"column",gap:1},children:[(0,b.jsx)(d.azJ,{children:"Excluded Prefixes :"}),(0,b.jsx)("div",{style:{maxHeight:"200px",overflowY:"auto",placeItems:"flex-start",justifyItems:"end",flexDirection:"column",display:"flex"},children:null===(t=n.excludedPrefixes)||void 0===t?void 0:t.map((e=>(0,b.jsx)("div",{children:(0,b.jsx)("strong",{children:e.prefix})})))})]}):null]})};var g=t(72237);const T=e=>{let{disabled:s,onClick:t,...n}=e;return(0,b.jsx)(d.K0,{size:"small",disabled:s,onClick:t,...n,children:(0,b.jsx)(d.qUP,{})})},_=e=>{let{resourceName:s,iamScopes:t,secureCmpProps:n={},children:i}=e;return(0,b.jsx)(h.R,{scopes:t,resource:s,errorProps:{disabled:!0},...n,children:i})},O=e=>{let{isLoading:s=!0,resourceName:t="",iamScopes:n,secureCmpProps:i={},property:a=null,value:l=null,onEdit:r,disabled:c=!1,helpTip:o}=e;return(0,b.jsxs)(d.azJ,{sx:{display:"flex",alignItems:"baseline",justifyContent:"flex-start",gap:10},children:[(0,b.jsx)(d.mZW,{label:a,value:o?(0,b.jsx)(_,{resourceName:t,iamScopes:n,secureCmpProps:i,children:(0,b.jsx)(d.V7x,{placement:"left",content:o,children:(0,b.jsx)(d.t53,{isLoading:s,onClick:r,label:l,sx:{fontWeight:"bold",textTransform:"capitalize"},disabled:c})})}):(0,b.jsx)(_,{resourceName:t,iamScopes:n,secureCmpProps:i,children:(0,b.jsx)(d.t53,{isLoading:s,onClick:r,label:l,sx:{fontWeight:"bold",textTransform:"capitalize"},disabled:c})})}),(0,b.jsx)(_,{resourceName:t,iamScopes:n,secureCmpProps:i,children:(0,b.jsx)(T,{onClick:r,sx:{background:"#f8f8f8",marginLeft:"3px",top:3,"& .min-icon":{width:"16px",height:"16px"}},disabled:c})})]})};var E=t(56483);const C=e=>{let{bucketSize:s}=e;return(0,b.jsxs)(d.azJ,{sx:{display:"flex",alignItems:"center","& .min-icon":{height:37,width:37}},children:[(0,b.jsx)(d.fRK,{}),(0,b.jsxs)(d.azJ,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"center",flexFlow:"column",marginLeft:"20px",fontSize:"19px"},children:[(0,b.jsx)("label",{style:{fontWeight:600},children:"Reported Usage:"}),(0,b.jsx)("label",{children:(0,E.nO)(s)})]})]})},y=e=>{let{quota:s}=e;return(0,b.jsxs)(d.azJ,{sx:{display:"flex",alignItems:"center","& .min-icon":{height:37,width:37}},children:[(0,b.jsx)(d.rod,{}),(0,b.jsxs)(d.azJ,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"center",flexFlow:"column",marginLeft:"20px",fontSize:"19px"},children:[(0,b.jsxs)("label",{style:{fontWeight:600,textTransform:"capitalize"},children:[null===s||void 0===s?void 0:s.type," Quota"]}),(0,b.jsxs)("label",{children:[" ",(0,E.nO)("".concat(null===s||void 0===s?void 0:s.quota),!0)]})]})]})},I=(0,g.A)(n.lazy((()=>t.e(7659).then(t.bind(t,97659))))),N=(0,g.A)(n.lazy((()=>t.e(7515).then(t.bind(t,67515))))),k=(0,g.A)(n.lazy((()=>t.e(6654).then(t.bind(t,36654))))),A=(0,g.A)(n.lazy((()=>t.e(5311).then(t.bind(t,5311))))),v=(0,g.A)(n.lazy((()=>t.e(5809).then(t.bind(t,5809))))),z=(0,g.A)(n.lazy((()=>t.e(7264).then(t.bind(t,47264))))),R=()=>{var e;const s=(0,j.jL)(),t=(0,r.g)(),i=(0,l.d4)(p.Nx),g=(0,l.d4)(p.fT),T=(0,l.d4)(m.Rq),[_,E]=(0,n.useState)(null),[R,V]=(0,n.useState)("0"),[B,U]=(0,n.useState)(!1),[P,G]=(0,n.useState)(!1),[w,J]=(0,n.useState)(!1),[F,L]=(0,n.useState)(!0),[K,M]=(0,n.useState)(!0),[D,W]=(0,n.useState)(!0),[q,Y]=(0,n.useState)(!0),[Z,Q]=(0,n.useState)(!0),[H,X]=(0,n.useState)(!0),[$,ee]=(0,n.useState)(!0),[se,te]=(0,n.useState)(!0),[ne,ie]=(0,n.useState)(),[ae,le]=(0,n.useState)(!1),[re,ce]=(0,n.useState)(null),[oe,de]=(0,n.useState)(!1),[ue,xe]=(0,n.useState)(!1),[he,me]=(0,n.useState)(null),[pe,je]=(0,n.useState)(!1),[fe,be]=(0,n.useState)(!1),[Se,ge]=(0,n.useState)(!1),[Te,_e]=(0,n.useState)(!1);(0,n.useEffect)((()=>{s((0,m.ph)("bucket_detail_summary"))}),[]);const Oe=t.bucketName||"";let Ee="PRIVATE",Ce="";null!==g&&g.access&&g.definition&&(Ee=g.access,Ce=g.definition);const ye=(0,h._)(Oe,[x.OV.S3_GET_BUCKET_OBJECT_LOCK_CONFIGURATION,x.OV.S3_GET_ACTIONS]),Ie=(0,h._)(Oe,[x.OV.S3_GET_BUCKET_ENCRYPTION_CONFIGURATION,x.OV.S3_GET_ACTIONS]),Ne=(0,h._)(Oe,[x.OV.ADMIN_GET_BUCKET_QUOTA]);(0,n.useEffect)((()=>{W(!!i)}),[i,W]),(0,n.useEffect)((()=>{q&&(Ie?c.F.buckets.getBucketEncryptionInfo(Oe).then((e=>{e.data.algorithm&&(de(!0),E(e.data)),Y(!1)})).catch((e=>{"The server side encryption configuration was not found"===(e=(0,o.S)(e.error)).errorMessage&&(de(!1),E(null)),Y(!1)})):(de(!1),E(null),Y(!1)))}),[q,Oe,Ie]),(0,n.useEffect)((()=>{Z&&T&&c.F.buckets.getBucketVersioning(Oe).then((e=>{ie(e.data),Q(!1)})).catch((e=>{s((0,m.C9)((0,o.S)(e.error))),Q(!1)}))}),[Z,s,Oe,T]),(0,n.useEffect)((()=>{H&&T&&(Ne?c.F.buckets.getBucketQuota(Oe).then((e=>{ce(e.data),e.data.quota?le(!0):le(!1),X(!1)})).catch((e=>{s((0,m.C9)((0,o.S)(e.error))),le(!1),X(!1)})):(le(!1),X(!1)))}),[H,Q,s,Oe,T,Ne]),(0,n.useEffect)((()=>{Z&&T&&(ye?c.F.buckets.getBucketObjectLockingStatus(Oe).then((e=>{U(e.data.object_locking_enabled),L(!1)})).catch((e=>{s((0,m.C9)((0,o.S)(e.error))),L(!1)})):L(!1))}),[F,s,Oe,Z,T,ye]),(0,n.useEffect)((()=>{K&&c.F.buckets.listBuckets().then((e=>{const s=a()(e.data,"buckets",[]).find((e=>e.name===Oe)),t=a()(s,"size","0");M(!1),V(t)})).catch((e=>{M(!1),s((0,m.C9)((0,o.S)(e.error)))}))}),[K,s,Oe]),(0,n.useEffect)((()=>{$&&T&&c.F.buckets.getBucketReplication(Oe).then((e=>{const s=e.data.rules?e.data.rules:[];J(s.length>0),ee(!1)})).catch((e=>{s((0,m.C9)((0,o.S)(e.error))),ee(!1)}))}),[$,s,Oe,T]),(0,n.useEffect)((()=>{se&&B&&c.F.buckets.getBucketRetentionConfig(Oe).then((e=>{te(!1),xe(!0),me(e.data)})).catch((e=>{xe(!1),te(!1),me(null)}))}),[se,B,Oe]);const ke=()=>{s((0,p.ZU)(!0)),W(!0),M(!0),Q(!0),Y(!0),te(!0)};let Ae=null===ne||void 0===ne?void 0:ne.status,ve="Unversioned (Default)";return"Enabled"===Ae?ve="Versioned":"Suspended"===Ae&&(ve="Suspended"),(0,b.jsxs)(n.Fragment,{children:[fe&&(0,b.jsx)(k,{open:fe,selectedBucket:Oe,encryptionEnabled:oe,encryptionCfg:_,closeModalAndRefresh:()=>{be(!1),Y(!0)}}),Se&&(0,b.jsx)(z,{open:Se,selectedBucket:Oe,enabled:ae,cfg:re,closeModalAndRefresh:()=>{ge(!1),X(!0)}}),P&&(0,b.jsx)(I,{bucketName:Oe,open:P,actualPolicy:Ee,actualDefinition:Ce,closeModalAndRefresh:()=>{G(!1),ke()}}),pe&&(0,b.jsx)(N,{bucketName:Oe,open:pe,closeModalAndRefresh:()=>{je(!1),ke()}}),Te&&(0,b.jsx)(A,{closeVersioningModalAndRefresh:e=>{_e(!1),e&&ke()},modalOpen:Te,selectedBucket:Oe,versioningInfo:ne,objectLockingEnabled:!!B}),(0,b.jsx)(d._xt,{separator:!0,sx:{marginBottom:15},children:"Summary"}),(0,b.jsxs)(d.xA9,{container:!0,children:[(0,b.jsx)(h.R,{scopes:[x.OV.S3_GET_BUCKET_POLICY,x.OV.S3_GET_ACTIONS],resource:Oe,children:(0,b.jsx)(d.xA9,{item:!0,xs:12,children:(0,b.jsxs)(d.azJ,{sx:u.mA,children:[(0,b.jsxs)(d.azJ,{sx:u.mA,children:[(0,b.jsx)(h.R,{scopes:[x.OV.S3_GET_BUCKET_POLICY,x.OV.S3_GET_ACTIONS],resource:Oe,children:(0,b.jsx)(O,{iamScopes:[x.OV.S3_PUT_BUCKET_POLICY,x.OV.S3_PUT_ACTIONS],resourceName:Oe,property:"Access Policy:",value:Ee.toLowerCase(),onEdit:()=>{G(!0)},isLoading:D,helpTip:(0,b.jsxs)(n.Fragment,{children:[(0,b.jsx)("strong",{children:"Private"})," policy limits access to credentialled accounts with appropriate permissions",(0,b.jsx)("br",{}),(0,b.jsx)("strong",{children:"Public"})," policy anyone will be able to upload, download and delete files from this Bucket once logged in",(0,b.jsx)("br",{}),(0,b.jsx)("strong",{children:"Custom"})," policy can be written to define which accounts are authorized to access this Bucket",(0,b.jsx)("br",{}),(0,b.jsx)("br",{}),"To allow Bucket access without credentials, use the"," ",(0,b.jsx)("a",{href:"/buckets/".concat(Oe,"/admin/prefix"),children:"Anonymous"})," ","setting"]})})}),(0,b.jsx)(h.R,{scopes:[x.OV.S3_GET_BUCKET_ENCRYPTION_CONFIGURATION,x.OV.S3_GET_ACTIONS],resource:Oe,children:(0,b.jsx)(O,{iamScopes:[x.OV.S3_PUT_BUCKET_ENCRYPTION_CONFIGURATION,x.OV.S3_PUT_ACTIONS],resourceName:Oe,property:"Encryption:",value:oe?"Enabled":"Disabled",onEdit:()=>{be(!0)},isLoading:q,helpTip:(0,b.jsxs)(n.Fragment,{children:["MinIO supports enabling automatic"," ",(0,b.jsx)("a",{href:"https://min.io/docs/minio/kubernetes/upstream/administration/server-side-encryption/server-side-encryption-sse-kms.html",target:"blank",children:"SSE-KMS"})," ","and"," ",(0,b.jsx)("a",{href:"https://min.io/docs/minio/kubernetes/upstream/administration/server-side-encryption/server-side-encryption-sse-s3.html",target:"blank",children:"SSE-S3"})," ","encryption of all objects written to a bucket using a specific External Key (EK) stored on the external KMS."]})})}),(0,b.jsx)(h.R,{scopes:[x.OV.S3_GET_REPLICATION_CONFIGURATION,x.OV.S3_GET_ACTIONS],resource:Oe,children:(0,b.jsx)(d.mZW,{label:"Replication:",value:(0,b.jsx)(f.A,{icon:w?(0,b.jsx)(d.xhy,{}):(0,b.jsx)(d.aaC,{}),label:(0,b.jsx)("label",{className:"muted",children:w?"Enabled":"Disabled"})})})}),(0,b.jsx)(h.R,{scopes:[x.OV.S3_GET_BUCKET_OBJECT_LOCK_CONFIGURATION,x.OV.S3_GET_ACTIONS],resource:Oe,children:(0,b.jsx)(d.mZW,{label:"Object Locking:",value:(0,b.jsx)(f.A,{icon:B?(0,b.jsx)(d.xhy,{}):(0,b.jsx)(d.aaC,{}),label:(0,b.jsx)("label",{className:"muted",children:B?"Enabled":"Disabled"})})})}),(0,b.jsx)(d.azJ,{children:(0,b.jsx)(d.mZW,{label:"Tags:",value:(0,b.jsx)(v,{bucketName:Oe})})}),(0,b.jsx)(O,{iamScopes:[x.OV.ADMIN_SET_BUCKET_QUOTA],resourceName:Oe,property:"Quota:",value:ae?"Enabled":"Disabled",onEdit:()=>{ge(!0)},isLoading:H,helpTip:(0,b.jsxs)(n.Fragment,{children:["Setting a"," ",(0,b.jsx)("a",{href:"https://min.io/docs/minio/linux/reference/minio-mc/mc-quota-set.html",target:"blank",children:"quota"})," ","assigns a hard limit to a bucket beyond which MinIO does not allow writes."]})})]}),(0,b.jsxs)(d.azJ,{sx:{display:"grid",gridTemplateColumns:"1fr",alignItems:"flex-start"},children:[(0,b.jsx)(C,{bucketSize:"".concat(R)}),ae&&re?(0,b.jsx)(y,{quota:re}):null]})]})})}),T&&(0,b.jsx)(h.R,{scopes:[x.OV.S3_GET_BUCKET_VERSIONING,x.OV.S3_GET_ACTIONS],resource:Oe,children:(0,b.jsxs)(d.xA9,{item:!0,xs:12,sx:{marginTop:5},children:[(0,b.jsx)(d._xt,{separator:!0,sx:{marginBottom:15},children:"Versioning"}),(0,b.jsx)(d.azJ,{sx:u.mA,children:(0,b.jsxs)(d.azJ,{sx:u.mA,children:[(0,b.jsx)(O,{iamScopes:[x.OV.S3_PUT_BUCKET_VERSIONING,x.OV.S3_PUT_ACTIONS],resourceName:Oe,property:"Current Status:",value:(0,b.jsx)(d.azJ,{sx:{display:"flex",flexDirection:"column",textDecorationStyle:"initial",placeItems:"flex-start",justifyItems:"flex-start",gap:3},children:(0,b.jsxs)("div",{children:[" ",ve]})}),onEdit:()=>{_e(!0)},isLoading:Z,disabled:B}),"Enabled"===(null===ne||void 0===ne?void 0:ne.status)?(0,b.jsx)(S,{versioningState:ne}):null]})})]})}),B&&(0,b.jsx)(h.R,{scopes:[x.OV.S3_GET_OBJECT_RETENTION,x.OV.S3_GET_ACTIONS],resource:Oe,children:(0,b.jsxs)(d.xA9,{item:!0,xs:12,sx:{marginTop:5},children:[(0,b.jsx)(d._xt,{separator:!0,sx:{marginBottom:15},children:"Retention"}),(0,b.jsx)(d.azJ,{sx:u.mA,children:(0,b.jsxs)(d.azJ,{sx:u.mA,children:[(0,b.jsx)(O,{iamScopes:[x.OV.ADMIN_SET_BUCKET_QUOTA],resourceName:Oe,property:"Retention:",value:ue?"Enabled":"Disabled",onEdit:()=>{je(!0)},isLoading:se,helpTip:(0,b.jsxs)(n.Fragment,{children:["MinIO"," ",(0,b.jsx)("a",{target:"blank",href:"https://min.io/docs/minio/macos/administration/object-management.html#object-retention",children:"Object Locking"})," ","enforces Write-Once Read-Many (WORM) immutability to protect versioned objects from deletion."]})}),(0,b.jsx)(d.mZW,{label:"Mode:",value:(0,b.jsx)("label",{className:"muted",style:{textTransform:"capitalize"},children:he&&he.mode?he.mode:"-"})}),(0,b.jsx)(d.mZW,{label:"Validity:",value:(0,b.jsxs)("label",{className:"muted",style:{textTransform:"capitalize"},children:[he&&he.validity," ",he&&(1===he.validity?null===(e=he.unit)||void 0===e?void 0:e.slice(0,-1):he.unit)]})})]})})]})})]})]})}},25903:(e,s,t)=>{t.d(s,{A:()=>a});t(65043);var n=t(89923),i=t(70579);const a=e=>{let{icon:s=null,label:t=null}=e;return(0,i.jsxs)(n.azJ,{sx:{display:"flex",alignItems:"center",gap:5,marginTop:3},children:[(0,i.jsx)(n.azJ,{sx:{height:16,width:16,display:"flex",alignItems:"center"},children:s}),(0,i.jsx)(n.azJ,{children:t})]})}}}]);
     2  //# sourceMappingURL=12.ab9b7ed0.chunk.js.map