github.com/minio/console@v1.4.1/web-app/build/static/js/8715.1422d39d.chunk.js (about) 1 "use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[8715],{78715:(e,t,a)=>{a.r(t),a.d(t,{default:()=>x});var n=a(65043),i=a(73216),s=a(89923),l=a(99161),c=a(64159),r=a(20554),o=a(48793),d=a(55968),p=a(56629),h=a(53518),u=a(96512),g=a(70579);const x=()=>{const e=(0,r.jL)(),t=(0,i.Zp)();let a=new URLSearchParams(document.location.search);const x=a.get("bucketName")||"",m=a.get("ruleID")||"";(0,n.useEffect)((()=>{e((0,c.ph)("bucket-replication-edit"))}),[]);const f=l.zZ.BUCKETS+"/".concat(x,"/admin/replication"),[j,b]=(0,n.useState)(!0),[k,S]=(0,n.useState)(!1),[v,y]=(0,n.useState)("1"),[C,w]=(0,n.useState)(""),[E,D]=(0,n.useState)(""),[I,R]=(0,n.useState)(!1),[O,M]=(0,n.useState)(!1),[B,_]=(0,n.useState)(""),[A,T]=(0,n.useState)(""),[N,z]=(0,n.useState)(""),[P,F]=(0,n.useState)(!1),[G,J]=(0,n.useState)(!1),[L,V]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{j&&x&&m&&p.F.buckets.getBucketReplicationRule(x,m).then((e=>{var t;y(e.data.priority?e.data.priority.toString():"");const a=e.data.prefix||"",n=e.data.tags||"";D(a),_(n),T(n),w((null===(t=e.data.destination)||void 0===t?void 0:t.bucket)||""),R(e.data.delete_marker_replication||!1),z(e.data.storageClass||""),F(!!e.data.existingObjects),J(!!e.data.deletes_replication),V("Enabled"===e.data.status),M(!!e.data.metadata_replication),b(!1)})).catch((t=>{e((0,c.C9)((0,h.S)(t.error))),b(!1)}))}),[j,e,x,m]),(0,n.useEffect)((()=>{if(k&&x&&m){const a={arn:C,ruleState:L,prefix:E,tags:A,replicateDeleteMarkers:I,replicateDeletes:G,replicateExistingObjects:P,replicateMetadata:O,priority:parseInt(v),storageClass:N};p.F.buckets.updateMultiBucketReplication(x,m,a).then((()=>{t(f)})).catch((t=>{e((0,c.C9)((0,h.S)(t.error))),S(!1)}))}}),[k,x,m,C,E,A,I,v,G,P,L,O,N,e]),(0,g.jsxs)(n.Fragment,{children:[(0,g.jsx)(o.A,{label:(0,g.jsx)(s.EGL,{label:"Edit Bucket Replication",onClick:()=>t(f)}),actions:(0,g.jsx)(d.A,{})}),(0,g.jsx)(s.Mxu,{children:(0,g.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:e=>{e.preventDefault(),S(!0)},children:(0,g.jsxs)(s.Hbc,{containerPadding:!1,withBorders:!1,helpBox:(0,g.jsx)(s.lVp,{iconComponent:(0,g.jsx)(s.WBh,{}),title:"Bucket Replication Configuration",help:(0,g.jsxs)(n.Fragment,{children:[(0,g.jsx)(s.azJ,{sx:{paddingTop:"10px"},children:"For each write operation to the bucket, MinIO checks all configured replication rules for the bucket and applies the matching rule with highest configured priority."}),(0,g.jsx)(s.azJ,{sx:{paddingTop:"10px"},children:"MinIO supports enabling replication of existing objects in a bucket."}),(0,g.jsx)(s.azJ,{sx:{paddingTop:"10px"},children:"MinIO does not enable existing object replication by default. Objects created before replication was configured or while replication is disabled are not synchronized to the target deployment unless replication of existing objects is enabled."}),(0,g.jsx)(s.azJ,{sx:{paddingTop:"10px"},children:"MinIO supports replicating delete operations, where MinIO synchronizes deleting specific object versions and new delete markers. Delete operation replication uses the same replication process as all other replication operations."})," "]})}),children:[(0,g.jsx)(s.dOG,{checked:L,id:"ruleState",name:"ruleState",label:"Rule State",onChange:e=>{V(e.target.checked)}}),(0,g.jsx)(s.EmB,{label:"Destination",sx:{width:"100%"},children:C}),(0,g.jsx)(s.cl_,{id:"priority",name:"priority",onChange:e=>{e.target.validity.valid&&y(e.target.value)},label:"Priority",value:v,pattern:"[0-9]*"}),(0,g.jsx)(s.cl_,{id:"storageClass",name:"storageClass",onChange:e=>{z(e.target.value)},placeholder:"STANDARD_IA,REDUCED_REDUNDANCY etc",label:"Storage Class",value:N}),(0,g.jsxs)("fieldset",{className:"inputItem",children:[(0,g.jsx)("legend",{children:"Object Filters"}),(0,g.jsx)(s.cl_,{id:"prefix",name:"prefix",onChange:e=>{D(e.target.value)},placeholder:"prefix",label:"Prefix",value:E}),(0,g.jsx)(u.A,{name:"tags",label:"Tags",elements:B,onChange:e=>{T(e)},keyPlaceholder:"Tag Key",valuePlaceholder:"Tag Value",withBorder:!0})]}),(0,g.jsxs)("fieldset",{className:"inputItem",children:[(0,g.jsx)("legend",{children:"Replication Options"}),(0,g.jsx)(s.dOG,{checked:P,id:"repExisting",name:"repExisting",label:"Existing Objects",onChange:e=>{F(e.target.checked)},description:"Replicate existing objects"}),(0,g.jsx)(s.dOG,{checked:O,id:"metadatataSync",name:"metadatataSync",label:"Metadata Sync",onChange:e=>{M(e.target.checked)},description:"Metadata Sync"}),(0,g.jsx)(s.dOG,{checked:I,id:"deleteMarker",name:"deleteMarker",label:"Delete Marker",onChange:e=>{R(e.target.checked)},description:"Replicate soft deletes"}),(0,g.jsx)(s.dOG,{checked:G,id:"repDelete",name:"repDelete",label:"Deletes",onChange:e=>{J(e.target.checked)},description:"Replicate versioned deletes"})]}),(0,g.jsxs)(s.xA9,{item:!0,xs:12,sx:{display:"flex",flexDirection:"row",justifyContent:"end",gap:10,paddingTop:10},children:[(0,g.jsx)(s.$nd,{id:"cancel-edit-replication",type:"button",variant:"regular",disabled:j||k,onClick:()=>{t(f)},label:"Cancel"}),(0,g.jsx)(s.$nd,{id:"save-replication",type:"submit",variant:"callAction",disabled:j||k,label:"Save"})]})]})})})]})}},96512:(e,t,a)=>{a.d(t,{A:()=>d});var n=a(65043),i=a(33097),s=a.n(i),l=a(93950),c=a.n(l),r=a(89923),o=a(70579);const d=e=>{let{elements:t,name:a,label:i,tooltip:l="",keyPlaceholder:d="",valuePlaceholder:p="",onChange:h,withBorder:u=!1}=e;const[g,x]=(0,n.useState)([""]),[m,f]=(0,n.useState)([""]),j=(0,n.createRef)();(0,n.useEffect)((()=>{if(1===g.length&&""===g[0]&&1===m.length&&""===m[0]&&t&&""!==t){const e=t.split("&");let a=[],n=[];e.forEach((e=>{const t=e.split("=");2===t.length&&(a.push(t[0]),n.push(t[1]))})),a.push(""),n.push(""),x(a),f(n)}}),[g,m,t]),(0,n.useEffect)((()=>{const e=j.current;e&&g.length>1&&e.scrollIntoView(!1)}),[g]);const b=(0,n.useRef)(!0);(0,n.useLayoutEffect)((()=>{b.current?b.current=!1:v()}),[g,m]);const k=e=>{e.persist();let t=[...g];const a=s()(e.target,"dataset.index","0");t[parseInt(a)]=e.target.value,x(t)},S=e=>{e.persist();let t=[...m];const a=s()(e.target,"dataset.index","0");t[parseInt(a)]=e.target.value,f(t)},v=c()((()=>{let e="";g.forEach(((t,a)=>{if(g[a]&&m[a]){let n="".concat(t,"=").concat(m[a]);0!==a&&(n="&".concat(n)),e="".concat(e).concat(n)}})),h(e)}),500),y=m.map(((e,t)=>(0,o.jsxs)(r.xA9,{item:!0,xs:12,className:"lineInputBoxes inputItem",children:[(0,o.jsx)(r.cl_,{id:"".concat(a,"-key-").concat(t.toString()),label:"",name:"".concat(a,"-").concat(t.toString()),value:g[t],onChange:k,index:t,placeholder:d}),(0,o.jsx)("span",{className:"queryDiv",children:":"}),(0,o.jsx)(r.cl_,{id:"".concat(a,"-value-").concat(t.toString()),label:"",name:"".concat(a,"-").concat(t.toString()),value:m[t],onChange:S,index:t,placeholder:p,overlayIcon:t===m.length-1?(0,o.jsx)(r.REV,{}):null,overlayAction:()=>{(()=>{if(""!==g[g.length-1].trim()&&""!==m[m.length-1].trim()){const e=[...g],t=[...m];e.push(""),t.push(""),x(e),f(t)}})()}})]},"query-pair-".concat(a,"-").concat(t.toString()))));return(0,o.jsx)(n.Fragment,{children:(0,o.jsxs)(r.xA9,{item:!0,xs:12,sx:{"& .lineInputBoxes":{display:"flex"},"& .queryDiv":{alignSelf:"center",margin:"-15px 4px 0",fontWeight:600}},className:"inputItem",children:[(0,o.jsxs)(r.l1Y,{children:[i,""!==l&&(0,o.jsx)(r.azJ,{sx:{marginLeft:5,display:"flex",alignItems:"center","& .min-icon":{width:13}},children:(0,o.jsx)(r.m_M,{tooltip:l,placement:"top",children:(0,o.jsx)(r.NTw,{style:{width:13,height:13}})})})]}),(0,o.jsxs)(r.azJ,{withBorders:u,sx:{padding:15,height:150,overflowY:"auto",position:"relative",marginTop:15},children:[y,(0,o.jsx)("div",{ref:j})]})]})})}}}]); 2 //# sourceMappingURL=8715.1422d39d.chunk.js.map