2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[8277],{23804:function(e,t,n){n(72791);var i=n(11135),r=n(25787),s=n(61889),a=n(80184);t.Z=(0,r.Z)((function(e){return(0,i.Z)({root:{border:"1px solid #E2E2E2",borderRadius:2,backgroundColor:"#FBFAFA",paddingLeft:25,paddingTop:31,paddingBottom:21,paddingRight:30},leftItems:{fontSize:16,fontWeight:"bold",marginBottom:15,display:"flex",alignItems:"center","& .min-icon":{marginRight:15,height:28,width:38}},helpText:{fontSize:16,paddingLeft:5}})}))((function(e){var t=e.classes,n=e.iconComponent,i=e.title,r=e.help;return(0,a.jsx)("div",{className:t.root,children:(0,a.jsxs)(s.ZP,{container:!0,children:[(0,a.jsxs)(s.ZP,{item:!0,xs:12,className:t.leftItems,children:[n,i]}),(0,a.jsx)(s.ZP,{item:!0,xs:12,className:t.helpText,children:r})]})})}))},38277:function(e,t,n){n.r(t),n.d(t,{default:function(){return K}});var i=n(29439),r=n(1413),s=n(72791),a=n(61889),l=n(40986),o=n(16871),c=n(75952),d=n(11135),u=n(25787),x=n(23814),h=n(21435),f=n(83679),j=n(45248),m=n(25469),g=n(60364),b=n(37516),p=n(32291),v=n(84669),k=n(56096),Z=n(87995),T=n(81207),y=n(74794),C=n(56578),B=n(25739),_=n(23804),P=n(27454),w=n(50896),E=n(64561),F=n(92717),N=n(80184),L=function(e){var t=e.hasErrors,n=(0,m.TL)(),i=(0,g.v9)((function(e){return e.addBucket.name}));return(0,N.jsx)(h.Z,{id:"bucket-name",name:"bucket-name",error:t?"Invalid bucket name":"",onFocus:function(){n((0,E.hU)(!0))},onChange:function(e){n((0,E.qC)(e.target.value))},label:"Bucket Name",value:i,required:!0})},R=n(56087),S=n(38442),z=function(e){return(0,N.jsx)("svg",(0,r.Z)((0,r.Z)({xmlns:"http://www.w3.org/2000/svg",className:"min-icon",fill:"currentcolor",viewBox:"0 0 15 15"},e),{},{children:(0,N.jsxs)("g",{id:"OpenListIcon-full",transform:"translate(4 4.984)",children:[(0,N.jsx)("g",{id:"noun_chevron_2320228",transform:"translate(0.167 4.016) rotate(-90)",children:(0,N.jsx)("path",{id:"Trazado_6842","data-name":"Trazado 6842",d:"M.422,0a.433.433,0,0,0-.3.117.37.37,0,0,0,0,.557L2.983,3.325.126,5.986a.37.37,0,0,0,0,.557.443.443,0,0,0,.6,0L3.889,3.609a.373.373,0,0,0,.126-.274.344.344,0,0,0-.126-.274L.727.127A.443.443,0,0,0,.422,0Z",transform:"translate(0 0)"})}),(0,N.jsx)("rect",{id:"Rect\xe1ngulo_896","data-name":"Rect\xe1ngulo 896",width:"0.462",height:"0.462",transform:"translate(0 1.75)",fill:"none"})]})}))},I=function(e){return(0,N.jsx)("svg",(0,r.Z)((0,r.Z)({xmlns:"http://www.w3.org/2000/svg",className:"min-icon",fill:"currentcolor",viewBox:"0 0 15 15"},e),{},{children:(0,N.jsx)("g",{id:"Grupo_2449","data-name":"Grupo 2449",transform:"translate(-140 -181)",children:(0,N.jsxs)("g",{id:"OpenListIcon-full",transform:"translate(144 250.612)",children:[(0,N.jsx)("g",{id:"noun_chevron_2320228",transform:"translate(6.827 -63.612) rotate(90)",children:(0,N.jsx)("path",{id:"Trazado_6842","data-name":"Trazado 6842",d:"M.422,6.661a.433.433,0,0,1-.3-.117.37.37,0,0,1,0-.557L2.983,3.335.126.675a.37.37,0,0,1,0-.557.443.443,0,0,1,.6,0L3.889,3.052a.373.373,0,0,1,.126.274.344.344,0,0,1-.126.274L.727,6.533a.443.443,0,0,1-.306.127Z",transform:"translate(0 0)"})}),(0,N.jsx)("rect",{id:"Rect\xe1ngulo_896","data-name":"Rect\xe1ngulo 896",width:"0.462",height:"0.462",transform:"translate(0 -61.808)",fill:"none"})]})})}))},O=function(e){var t=e.ruleText;return(0,N.jsx)(s.Fragment,{children:(0,N.jsxs)(a.ZP,{container:!0,style:{display:"flex",justifyContent:"flex-start"},children:[(0,N.jsx)(a.ZP,{item:!0,xs:1,paddingRight:1,children:(0,N.jsx)(k.EjK,{width:"16px",height:"16px",style:{color:"#18BF42"}})}),(0,N.jsx)(a.ZP,{item:!0,xs:9,paddingLeft:1,style:{color:"#8f949c",display:"flex",justifyContent:"flex-start"},children:t})]})})},U=function(e){var t=e.ruleText;return(0,N.jsx)(s.Fragment,{children:(0,N.jsxs)(a.ZP,{container:!0,style:{color:"#C83B51",display:"flex",justifyContent:"flex-start"},children:[(0,N.jsx)(a.ZP,{item:!0,xs:1,paddingRight:1,children:(0,N.jsx)(k.NvT,{width:"16px",height:"16px"})}),(0,N.jsx)(a.ZP,{item:!0,xs:9,paddingLeft:1,style:{color:"#C83B51",display:"flex",justifyContent:"flex-start"},children:t})]})})},q=function(e){var t=e.ruleText;return(0,N.jsx)(s.Fragment,{children:(0,N.jsxs)(a.ZP,{container:!0,style:{display:"flex",justifyContent:"flex-start"},children:[(0,N.jsx)(a.ZP,{item:!0,xs:1,paddingRight:1,children:(0,N.jsx)(k.J$M,{width:"12px",height:"12px",style:{color:"#8f949c"}})}),(0,N.jsx)(a.ZP,{item:!0,xs:9,paddingLeft:1,style:{color:"#8f949c",display:"flex",justifyContent:"flex-start"},children:t})]})})},V=function(e){var t=e.errorList,n="Bucket names must be between 3 (min) and 63 (max) characters long.",r="Bucket names can consist only of lowercase letters, numbers, dots (.), and hyphens (-).",o="Bucket names must not contain two adjacent periods, or a period adjacent to a hyphen.",d="Bucket names must not be formatted as an IP address (for example, 192.168.5.4).",u="Bucket names must not start with the prefix xn--.",x="Bucket names must not end with the suffix -s3alias. This suffix is reserved for access point alias names.",h="Bucket names must be unique within a partition.",f=(0,g.v9)((function(e){return e.addBucket.name})),j=(0,s.useState)(!1),m=(0,i.Z)(j,2),b=m[0],p=m[1],v=(0,g.v9)((function(e){return e.addBucket.loading})),k=(0,i.Z)(t,7),Z=k[0],T=k[1],y=k[2],C=k[3],B=k[4],_=k[5],P=k[6];return(0,N.jsxs)(s.Fragment,{children:[(0,N.jsx)(c.zx,{type:"button",id:"toggle-naming-rules",onClick:function(){p(!b)},icon:b?(0,N.jsx)(z,{}):(0,N.jsx)(I,{}),label:(b?"Hide":"View")+" Bucket Naming Rules",style:{height:"10px",width:"200px",textAlign:"left",paddingLeft:0,fontSize:"9px",border:"none"}}),b&&(0,N.jsxs)(a.ZP,{container:!0,fontSize:14,paddingTop:2,children:[(0,N.jsxs)(a.ZP,{item:!0,xs:6,children:[0===f.length?(0,N.jsx)(q,{ruleText:n}):Z?(0,N.jsx)(O,{ruleText:n}):(0,N.jsx)(U,{ruleText:n}),0===f.length?(0,N.jsx)(q,{ruleText:r}):T?(0,N.jsx)(O,{ruleText:r}):(0,N.jsx)(U,{ruleText:r}),0===f.length?(0,N.jsx)(q,{ruleText:o}):y?(0,N.jsx)(O,{ruleText:o}):(0,N.jsx)(U,{ruleText:o}),0===f.length?(0,N.jsx)(q,{ruleText:d}):C?(0,N.jsx)(O,{ruleText:d}):(0,N.jsx)(U,{ruleText:d})]}),(0,N.jsxs)(a.ZP,{item:!0,xs:6,children:[0===f.length?(0,N.jsx)(q,{ruleText:u}):B?(0,N.jsx)(O,{ruleText:u}):(0,N.jsx)(U,{ruleText:u}),0===f.length?(0,N.jsx)(q,{ruleText:x}):_?(0,N.jsx)(O,{ruleText:x}):(0,N.jsx)(U,{ruleText:x}),0===f.length?(0,N.jsx)(q,{ruleText:h}):P?(0,N.jsx)(O,{ruleText:h}):(0,N.jsx)(U,{ruleText:h})]})]}),v&&(0,N.jsx)(a.ZP,{item:!0,xs:12,children:(0,N.jsx)(l.Z,{})})]})},K=(0,u.Z)((function(e){return(0,d.Z)((0,r.Z)({buttonContainer:{marginTop:24,display:"flex",justifyContent:"flex-end","& button":{marginLeft:8}},error:{color:"#b53b4b",border:"1px solid #b53b4b",padding:8,borderRadius:3},alertVersioning:{border:"#E2E2E2 1px solid",backgroundColor:"#FBFAFA",borderRadius:3,display:"flex",alignItems:"center",padding:"10px",color:"#767676","& > .min-icon ":{width:20,height:20,marginRight:10}},title:{marginBottom:8},headTitle:{fontWeight:"bold",fontSize:16,paddingLeft:8},h6title:{fontWeight:"bold",color:"#000000",fontSize:20}},(0,x.Bz)(e.spacing(4))))}))((function(e){var t=e.classes,n=(0,m.TL)(),r=(0,o.s0)(),d=new RegExp("^[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]$"),u=new RegExp("^(\\d+\\.){3}\\d+$"),x=(0,g.v9)((function(e){return e.addBucket.name})),z=(0,g.v9)((function(e){return e.addBucket.isDirty})),I=(0,s.useState)([]),O=(0,i.Z)(I,2),U=O[0],q=O[1],K=U.filter((function(e){return!e})).length>0,A=(0,s.useState)([]),G=(0,i.Z)(A,2),M=G[0],D=G[1],W=(0,g.v9)((function(e){return e.addBucket.versioningEnabled})),J=(0,g.v9)((function(e){return e.addBucket.lockingEnabled})),Q=(0,g.v9)((function(e){return e.addBucket.quotaEnabled})),Y=(0,g.v9)((function(e){return e.addBucket.quotaSize})),$=(0,g.v9)((function(e){return e.addBucket.quotaUnit})),H=(0,g.v9)((function(e){return e.addBucket.retentionEnabled})),X=(0,g.v9)((function(e){return e.addBucket.retentionMode})),ee=(0,g.v9)((function(e){return e.addBucket.retentionUnit})),te=(0,g.v9)((function(e){return e.addBucket.retentionValidity})),ne=(0,g.v9)((function(e){return e.addBucket.loading})),ie=(0,g.v9)((function(e){return e.addBucket.invalidFields})),re=(0,g.v9)((function(e){return e.addBucket.lockingFieldDisabled})),se=(0,g.v9)(Z.N5),ae=(0,g.v9)(Z.gw),le=(0,g.v9)((function(e){return e.addBucket.navigateTo})),oe=(0,S.F)("*",[R.Ft.S3_PUT_BUCKET_VERSIONING,R.Ft.S3_PUT_BUCKET_OBJECT_LOCK_CONFIGURATION],!0),ce=(0,S.F)("*",[R.Ft.S3_PUT_BUCKET_VERSIONING]);(0,s.useEffect)((function(){var e=[!(z&&(x.length<3||x.length>63)),d.test(x),!(x.includes(".-")||x.includes("-.")||x.includes("..")),!u.test(x),!x.startsWith("xn--"),!x.endsWith("-s3alias"),!M.includes(x)];q(e)}),[x,z]),(0,s.useEffect)((function(){n((0,E.qC)("")),n((0,E.hU)(!1));T.Z.invoke("GET","/api/v1/buckets").then((function(e){var t=[];null!=e.buckets&&e.buckets.length>0&&e.buckets.forEach((function(e){t.push(e.name)})),D(t)})).catch((function(e){n((0,Z.Ih)(e))}))}),[n]);return(0,s.useEffect)((function(){if(""!==le){var e="".concat(le);n((0,E.Fx)()),r(e)}}),[le,r,n]),(0,N.jsxs)(s.Fragment,{children:[(0,N.jsx)(p.Z,{label:(0,N.jsx)(v.Z,{to:"/buckets",label:"Buckets"})}),(0,N.jsx)(y.Z,{children:(0,N.jsx)(B.Z,{title:"Create Bucket",icon:(0,N.jsx)(k.wNb,{}),helpbox:(0,N.jsx)(_.Z,{iconComponent:(0,N.jsx)(k.wNb,{}),title:"Buckets",help:(0,N.jsxs)(s.Fragment,{children:["MinIO uses buckets to organize objects. A bucket is similar to a folder or directory in a filesystem, where each bucket can hold an arbitrary number of objects.",(0,N.jsx)("br",{}),(0,N.jsx)("br",{}),(0,N.jsx)("b",{children:"Versioning"})," allows to keep multiple versions of the same object under the same key.",(0,N.jsx)("br",{}),(0,N.jsx)("br",{}),(0,N.jsx)("b",{children:"Object Locking"})," prevents objects from being deleted. Required to support retention and legal hold. Can only be enabled at bucket creation.",(0,N.jsx)("br",{}),(0,N.jsx)("br",{}),(0,N.jsx)("b",{children:"Quota"})," limits the amount of data in the bucket.",oe&&(0,N.jsxs)(s.Fragment,{children:[(0,N.jsx)("br",{}),(0,N.jsx)("br",{}),(0,N.jsx)("b",{children:"Retention"})," imposes rules to prevent object deletion for a period of time. Versioning must be enabled in order to set bucket retention policies."]}),(0,N.jsx)("br",{}),(0,N.jsx)("br",{})]})}),children:(0,N.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),n((0,F.I)())},children:[(0,N.jsxs)(a.ZP,{container:!0,marginTop:1,spacing:2,children:[(0,N.jsx)(a.ZP,{item:!0,xs:12,children:(0,N.jsx)(L,{hasErrors:K})}),(0,N.jsx)(a.ZP,{item:!0,xs:12,children:(0,N.jsx)(V,{errorList:U})}),(0,N.jsxs)(a.ZP,{item:!0,xs:12,children:[(0,N.jsx)(w.Z,{children:"Features"}),!se&&(0,N.jsxs)(s.Fragment,{children:[(0,N.jsxs)("div",{className:t.error,children:["These features are unavailable in a single-disk setup.",(0,N.jsx)("br",{}),"Please deploy a server in"," ",(0,N.jsx)("a",{href:"https://min.io/docs/minio/linux/operations/install-deploy-manage/deploy-minio-multi-node-multi-drive.html?ref=con",target:"_blank",rel:"noreferrer",children:"Distributed Mode"})," ","to use these features."]}),(0,N.jsx)("br",{}),(0,N.jsx)("br",{})]})]}),(0,N.jsxs)(a.ZP,{item:!0,xs:12,spacing:2,children:[ae.enabled&&(0,N.jsxs)(s.Fragment,{children:[(0,N.jsx)("br",{}),(0,N.jsxs)("div",{className:t.alertVersioning,children:[(0,N.jsx)(k.szr,{})," Versioning setting cannot be changed as cluster replication is enabled for this site."]}),(0,N.jsx)("br",{})]}),(0,N.jsx)(P.Z,{tooltip:ce?J&&W?"You must disable Locking before Versioning can be disabled":"":(0,R.MK)([R.Ft.S3_PUT_BUCKET_VERSIONING],"Versioning"),children:(0,N.jsx)(b.Z,{value:"versioned",id:"versioned",name:"versioned",checked:W,onChange:function(e){n((0,E.E2)(e.target.checked))},label:"Versioning",disabled:!se||J||ae.enabled||!ce})})]}),(0,N.jsx)(a.ZP,{item:!0,xs:12,children:(0,N.jsx)(P.Z,{tooltip:oe?"":(0,R.MK)([R.Ft.S3_PUT_BUCKET_VERSIONING,R.Ft.S3_PUT_BUCKET_OBJECT_LOCK_CONFIGURATION],"Locking"),children:(0,N.jsx)(b.Z,{value:"locking",id:"locking",name:"locking",disabled:re||!se||!oe,checked:J,onChange:function(e){n((0,E.j9)(e.target.checked)),e.target.checked&&!ae.enabled&&n((0,E.E2)(!0))},label:"Object Locking"})})}),(0,N.jsx)(a.ZP,{item:!0,xs:12,children:(0,N.jsx)(b.Z,{value:"bucket_quota",id:"bucket_quota",name:"bucket_quota",checked:Q,onChange:function(e){n((0,E.WC)(e.target.checked))},label:"Quota",disabled:!se})}),Q&&se&&(0,N.jsx)(s.Fragment,{children:(0,N.jsx)(a.ZP,{item:!0,xs:12,children:(0,N.jsx)(h.Z,{type:"string",id:"quota_size",name:"quota_size",onChange:function(e){n((0,E.Rj)(e.target.value))},label:"Capacity",value:Y,required:!0,min:"1",overlayObject:(0,N.jsx)(C.Z,{id:"quota_unit",onUnitChange:function(e){n((0,E.ND)(e))},unitSelected:$,unitsList:(0,j.zQ)(["Ki"]),disabled:!1}),error:ie.includes("quotaSize")?"Please enter a valid quota":""})})}),W&&se&&oe&&(0,N.jsx)(a.ZP,{item:!0,xs:12,children:(0,N.jsx)(b.Z,{value:"bucket_retention",id:"bucket_retention",name:"bucket_retention",checked:H,onChange:function(e){n((0,E.bc)(e.target.checked))},label:"Retention"})}),H&&se&&(0,N.jsxs)(s.Fragment,{children:[(0,N.jsx)(a.ZP,{item:!0,xs:12,children:(0,N.jsx)(f.Z,{currentSelection:X,id:"retention_mode",name:"retention_mode",label:"Mode",onChange:function(e){n((0,E.VK)(e.target.value))},selectorOptions:[{value:"compliance",label:"Compliance"},{value:"governance",label:"Governance"}]})}),(0,N.jsx)(a.ZP,{item:!0,xs:12,children:(0,N.jsx)(h.Z,{type:"number",id:"retention_validity",name:"retention_validity",onChange:function(e){n((0,E.Mn)(e.target.valueAsNumber))},label:"Validity",value:String(te),required:!0,overlayObject:(0,N.jsx)(C.Z,{id:"retention_unit",onUnitChange:function(e){n((0,E.hx)(e))},unitSelected:ee,unitsList:[{value:"days",label:"Days"},{value:"years",label:"Years"}],disabled:!1})})})]})]}),(0,N.jsxs)(a.ZP,{item:!0,xs:12,className:t.buttonContainer,children:[(0,N.jsx)(c.zx,{id:"clear",type:"button",variant:"regular",className:t.clearButton,onClick:function(){n((0,E.Fx)())},label:"Clear"}),(0,N.jsx)(P.Z,{tooltip:ie.length>0||!z||K?"You must apply a valid name to the bucket":"",children:(0,N.jsx)(c.zx,{id:"create-bucket",type:"submit",variant:"callAction",color:"primary",disabled:ne||ie.length>0||!z||K,label:"Create Bucket"})})]}),ne&&(0,N.jsx)(a.ZP,{item:!0,xs:12,children:(0,N.jsx)(l.Z,{})})]})})})]})}))},25739:function(e,t,n){n(72791);var i=n(64554),r=n(50896),s=n(80184);t.Z=function(e){var t=e.children,n=e.title,a=e.helpbox,l=e.icon;return(0,s.jsxs)(i.Z,{sx:{display:"grid",padding:"25px",gap:"25px",gridTemplateColumns:{md:"2fr 1.2fr",xs:"1fr"},border:"1px solid #eaeaea"},children:[(0,s.jsxs)(i.Z,{children:[(0,s.jsx)(r.Z,{icon:l,children:n}),(0,s.jsx)(i.Z,{sx:{height:16}}),t]}),a]})}}}]);
|
|
//# sourceMappingURL=8277.e772e8bd.chunk.js.map
|