2 lines
9.9 KiB
JavaScript
2 lines
9.9 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[9561],{23804:function(e,n,t){t(72791);var i=t(11135),r=t(25787),a=t(61889),s=t(80184);n.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 n=e.classes,t=e.iconComponent,i=e.title,r=e.help;return(0,s.jsx)("div",{className:n.root,children:(0,s.jsxs)(a.ZP,{container:!0,children:[(0,s.jsxs)(a.ZP,{item:!0,xs:12,className:n.leftItems,children:[t,i]}),(0,s.jsx)(a.ZP,{item:!0,xs:12,className:n.helpText,children:r})]})})}))},9505:function(e,n,t){var i=t(29439),r=t(72791),a=t(81207);n.Z=function(e,n){var t=(0,r.useState)(!1),s=(0,i.Z)(t,2),o=s[0],c=s[1];return[o,function(t,i,r){c(!0),a.Z.invoke(t,i,r).then((function(n){c(!1),e(n)})).catch((function(e){c(!1),n(e)}))}]}},79561:function(e,n,t){t.r(n);var i=t(93433),r=t(1413),a=t(29439),s=t(72791),o=t(93656),c=t(21435),l=t(61889),d=t(40986),p=t(64554),x=t(36151),u=t(40603),f=t(9505),h=t(60364),m=t(42649),g=t(32291),j=t(84669),Z=t(56087),v=t(74794),y=t(14917),b=t(23804),S=t(62666),C=t(80184),k=function(e){var n=!1;try{new URL(e),n=!0}catch(t){n=!1}return n||""===e?"":"Invalid Endpoint"},w=(0,h.$j)(null,{setErrorSnackMessage:m.Ih,setSnackBarMessage:m.y1});n.default=w((function(e){var n=e.setErrorSnackMessage,t=e.setSnackBarMessage,h=(0,s.useState)([]),m=(0,a.Z)(h,2),w=m[0],I=m[1],T=(0,s.useState)(""),N=(0,a.Z)(T,2),B=N[0],E=N[1],R=(0,s.useState)(""),P=(0,a.Z)(R,2),A=P[0],K=P[1],L=(0,s.useState)([]),W=(0,a.Z)(L,2),z=W[0],F=W[1],M=function(){var e=null!==w&&void 0!==w&&w.length?[{endpoint:"",name:""}]:[{endpoint:"",name:""},{endpoint:"",name:""}];F(e)},O=(0,f.Z)((function(e){var n=e.sites,t=e.name,i=n.findIndex((function(e){return e.name===t}));if(-1!==i){var a=n[i];a=(0,r.Z)((0,r.Z)({},a),{},{isCurrent:!0}),n.splice(i,1,a)}n.sort((function(e,n){return e.name===t?-1:n.name===t?1:0})),I(n)}),(function(e){I([])})),q=(0,a.Z)(O,2),_=q[0],D=q[1],H=function(){D("GET","api/v1/admin/site-replication")};(0,s.useEffect)((function(){H()}),[]),(0,s.useEffect)((function(){M()}),[w]);var G=z.reduce((function(e,n,t){var i=z[t].endpoint,r=k(i);return""===r&&""!==i&&e.push(r),e}),[]).length===z.length,U=(0,f.Z)((function(e){e.success?(t(e.status),J(),H(),S.Z.push(Z.gA.SITE_REPLICATION)):n({errorMessage:"Error",detailedError:e.status})}),(function(e){n(e)})),V=(0,a.Z)(U,2),Y=V[0],$=V[1],J=function(){E(""),K(""),M()};return(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)(g.Z,{label:(0,C.jsx)(j.Z,{to:Z.gA.SITE_REPLICATION,label:"Add Replication Site"})}),(0,C.jsxs)(v.Z,{children:[(0,C.jsx)(y.Z,{title:"Add Sites for Replication",icon:o.aW}),_||Y?(0,C.jsx)(d.Z,{}):null,(0,C.jsxs)(p.Z,{sx:{display:"grid",padding:"25px",gap:"25px",gridTemplateColumns:{md:"2fr 1.2fr",xs:"1fr"}},children:[(0,C.jsx)(p.Z,{children:(0,C.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){return e.preventDefault(),function(){var e=null===w||void 0===w?void 0:w.map((function(e,n){return{accessKey:B,secretKey:A,name:e.name,endpoint:e.endpoint}})),n=z.reduce((function(e,n,t){return n.endpoint&&e.push({accessKey:B,secretKey:A,name:n.name||"dr-site-".concat(t),endpoint:n.endpoint}),e}),[]);$("POST","api/v1/admin/site-replication",[].concat((0,i.Z)(e||[]),(0,i.Z)(n||[])))}()},children:[(0,C.jsx)(l.ZP,{item:!0,xs:12,marginBottom:"15px",children:(0,C.jsxs)(p.Z,{sx:{fontStyle:"italic",display:"flex",alignItems:"center",fontSize:"12px"},children:[(0,C.jsx)(p.Z,{sx:{fontWeight:600},children:"Note:"})," ",(0,C.jsx)(p.Z,{sx:{marginLeft:"8px"},children:"Access Key and Secret Key should be same on all sites."})]})}),(0,C.jsx)(l.ZP,{item:!0,xs:12,marginBottom:"15px",sx:{"& label span":{fontWeight:"normal"}},children:(0,C.jsx)(c.Z,{id:"add-rep-peer-accKey",name:"add-rep-peer-accKey",onChange:function(e){E(e.target.value)},label:"Access Key",required:!0,value:B,error:""===B?"Access Key is required.":"","data-test-id":"add-site-rep-acc-key"})}),(0,C.jsx)(l.ZP,{item:!0,xs:12,marginBottom:"30px",sx:{"& label span":{fontWeight:"normal"}},children:(0,C.jsx)(c.Z,{id:"add-rep-peer-secKey",name:"add-rep-peer-secKey",type:"password",required:!0,onChange:function(e){K(e.target.value)},error:""===A?"Secret Key is required.":"",label:"Secret Key",value:A,"data-test-id":"add-site-rep-sec-key"})}),(0,C.jsx)(l.ZP,{item:!0,xs:12,children:(0,C.jsx)(p.Z,{sx:{marginBottom:"15px",fontSize:"14px",fontWeight:600},children:"Peer Sites"})}),(0,C.jsxs)(p.Z,{sx:{display:"grid",gridTemplateColumns:".8fr 1.2fr .2fr",border:"1px solid #eaeaea",padding:"15px",gap:"10px",maxHeight:"430px",overflowY:"auto"},children:[(0,C.jsx)(p.Z,{sx:{fontSize:"14px",marginLeft:"5px"},children:"Site Name"}),(0,C.jsxs)(p.Z,{sx:{fontSize:"14px",marginLeft:"5px"},children:["Endpoint ","*"]}),(0,C.jsx)(p.Z,{children:" "}),null===w||void 0===w?void 0:w.map((function(e,n){return(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)(p.Z,{children:(0,C.jsx)(c.Z,{id:"add-rep-ex-peer-site-".concat(n),name:"add-rep-ex-peer-site-".concat(n),extraInputProps:{readOnly:!0},label:"",value:e.name,onChange:function(){}})}),(0,C.jsx)(p.Z,{children:(0,C.jsx)(c.Z,{id:"add-rep-ex-peer-site-ep-".concat(n),name:"add-rep-ex-peer-site-ep-".concat(n),extraInputProps:{readOnly:!0},label:"",value:e.endpoint,onChange:function(){}})}),(0,C.jsx)(l.ZP,{item:!0,xs:12,children:" "})]},e.name)})),z.map((function(e,n){var t=!1;return(null!==w&&void 0!==w&&w.length&&0===n||(null===w||void 0===w||!w.length)&&n<2)&&(t=!0),(0,C.jsxs)(s.Fragment,{children:[(0,C.jsx)(p.Z,{children:(0,C.jsx)(c.Z,{id:"add-rep-peer-site-".concat(n),name:"add-rep-peer-site-".concat(n),placeholder:"dr-site-".concat(n),label:"",value:"".concat(e.name),onChange:function(e){var t=e.target.value;F((function(e){return e.map((function(e,i){return i===n?(0,r.Z)((0,r.Z)({},e),{},{name:t}):e}))}))},"data-test-id":"add-site-rep-peer-site-".concat(n)})}),(0,C.jsx)(p.Z,{children:(0,C.jsx)(c.Z,{id:"add-rep-peer-site-ep-".concat(n),name:"add-rep-peer-site-ep-".concat(n),placeholder:"https://dr.minio-storage:900".concat(n),label:"",error:k(z[n].endpoint),value:"".concat(e.endpoint),onChange:function(e){var t=e.target.value;F((function(e){return e.map((function(e,i){return i===n?(0,r.Z)((0,r.Z)({},e),{},{endpoint:t}):e}))}))},"data-test-id":"add-site-rep-peer-ep-".concat(n)})}),(0,C.jsx)(l.ZP,{item:!0,xs:12,alignItems:"center",display:"flex",children:(0,C.jsxs)(p.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",alignSelf:"baseline",marginTop:"4px","& button":{borderColor:"#696969",color:"#696969",borderRadius:"50%"}},children:[(0,C.jsx)(u.Z,{tooltip:"Add a Row",text:"",variant:"outlined",color:"primary",icon:(0,C.jsx)(o.dt,{}),onClick:function(e){e.preventDefault();var t=(0,i.Z)(z);t.splice(n+1,0,{name:"",endpoint:""}),F(t)}}),(0,C.jsx)(u.Z,{tooltip:"Remove Row",text:"",variant:"outlined",disabled:t,color:"primary",icon:(0,C.jsx)(o.HF,{}),onClick:function(e){e.preventDefault(),F(z.filter((function(e,t){return t!==n})))}})]})})]},"".concat(n))}))]}),(0,C.jsx)(l.ZP,{item:!0,xs:12,children:(0,C.jsxs)(p.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",marginTop:"20px",gap:"15px"},children:[(0,C.jsx)(x.Z,{type:"button",variant:"outlined",color:"primary",disabled:Y,onClick:J,children:"Clear"}),(0,C.jsx)(x.Z,{type:"submit",variant:"contained",color:"primary",disabled:Y||!B||!A||!G,children:"Save"})]})})]})}),(0,C.jsx)(b.Z,{title:"",iconComponent:null,help:(0,C.jsxs)(s.Fragment,{children:[(0,C.jsxs)(p.Z,{sx:{marginTop:"-25px",fontSize:"16px",fontWeight:600,display:"flex",alignItems:"center",justifyContent:"flex-start",padding:"2px"},children:[(0,C.jsx)(p.Z,{sx:{backgroundColor:"#07193E",height:"15px",width:"15px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",marginRight:"18px",padding:"3px","& .min-icon":{height:"11px",width:"11px",fill:"#ffffff"}},children:(0,C.jsx)(o.aW,{})}),"About Site Replication"]}),(0,C.jsxs)(p.Z,{sx:{display:"flex",flexFlow:"column",fontSize:"14px",flex:"2","& .step-number":{color:"#ffffff",height:"25px",width:"25px",background:"#081C42",marginRight:"10px",textAlign:"center",fontWeight:600,borderRadius:"50%"},"& .step-row":{fontSize:"14px",display:"flex",marginTop:"15px",marginBottom:"15px","&.step-text":{fontWeight:400},"&:before":{content:"' '",height:"7px",width:"7px",backgroundColor:"#2781B0",marginRight:"10px",marginTop:"12px",flexShrink:0}}},children:[(0,C.jsx)(p.Z,{children:"The following changes are replicated to all other sites"}),(0,C.jsx)(p.Z,{className:"step-row",children:(0,C.jsx)("div",{className:"step-text",children:"Creation and deletion of buckets and objects"})}),(0,C.jsx)(p.Z,{className:"step-row",children:(0,C.jsx)("div",{className:"step-text",children:"Creation and deletion of all IAM users, groups, policies and their mappings to users or groups"})}),(0,C.jsx)(p.Z,{className:"step-row",children:(0,C.jsx)("div",{className:"step-text",children:"Creation of STS credentials"})}),(0,C.jsx)(p.Z,{className:"step-row",children:(0,C.jsx)("div",{className:"step-text",children:"Creation and deletion of service accounts (except those owned by the root user)"})}),(0,C.jsx)(p.Z,{className:"step-row",children:(0,C.jsxs)("div",{className:"step-text",children:["Changes to Bucket features such as",(0,C.jsxs)("ul",{children:[(0,C.jsx)("li",{children:"Bucket Policies"}),(0,C.jsx)("li",{children:"Bucket Tags"}),(0,C.jsx)("li",{children:"Bucket Object-Lock configurations"}),(0,C.jsx)("li",{children:"Bucket Encryption configuration"})]})]})}),(0,C.jsx)(p.Z,{className:"step-row",children:(0,C.jsxs)("div",{className:"step-text",children:["The following Bucket features will NOT be replicated",(0,C.jsxs)("ul",{children:[(0,C.jsx)("li",{children:"Bucket notification configuration"}),(0,C.jsx)("li",{children:"Bucket lifecycle (ILM) configuration"})]})]})})]})]})})]})]})]})}))}}]);
|
|
//# sourceMappingURL=9561.440983d7.chunk.js.map
|