diff --git a/portal-ui/build/asset-manifest.json b/portal-ui/build/asset-manifest.json index 27521cd27..f94439067 100644 --- a/portal-ui/build/asset-manifest.json +++ b/portal-ui/build/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { "main.css": "./static/css/main.57e739f5.css", - "main.js": "./static/js/main.078385cd.js", + "main.js": "./static/js/main.46564223.js", "static/js/1260.a025e586.chunk.js": "./static/js/1260.a025e586.chunk.js", "static/js/6914.8835970e.chunk.js": "./static/js/6914.8835970e.chunk.js", "static/js/9121.4999947f.chunk.js": "./static/js/9121.4999947f.chunk.js", @@ -35,7 +35,7 @@ "static/js/191.b50b4104.chunk.js": "./static/js/191.b50b4104.chunk.js", "static/js/1329.98d80e22.chunk.js": "./static/js/1329.98d80e22.chunk.js", "static/js/7614.527036f5.chunk.js": "./static/js/7614.527036f5.chunk.js", - "static/js/5351.41f5c7df.chunk.js": "./static/js/5351.41f5c7df.chunk.js", + "static/js/1690.4e6b342c.chunk.js": "./static/js/1690.4e6b342c.chunk.js", "static/js/6491.83aa26f7.chunk.js": "./static/js/6491.83aa26f7.chunk.js", "static/js/4902.f064f175.chunk.js": "./static/js/4902.f064f175.chunk.js", "static/js/1432.6e142c2c.chunk.js": "./static/js/1432.6e142c2c.chunk.js", @@ -44,7 +44,7 @@ "static/js/6577.4b3c8b41.chunk.js": "./static/js/6577.4b3c8b41.chunk.js", "static/js/3875.5db2c08f.chunk.js": "./static/js/3875.5db2c08f.chunk.js", "static/js/3115.da3a98f3.chunk.js": "./static/js/3115.da3a98f3.chunk.js", - "static/js/5522.72ab8875.chunk.js": "./static/js/5522.72ab8875.chunk.js", + "static/js/5522.9c77c391.chunk.js": "./static/js/5522.9c77c391.chunk.js", "static/js/977.4c29a863.chunk.js": "./static/js/977.4c29a863.chunk.js", "static/js/6686.ede27280.chunk.js": "./static/js/6686.ede27280.chunk.js", "static/js/9059.155bb503.chunk.js": "./static/js/9059.155bb503.chunk.js", @@ -52,7 +52,7 @@ "static/js/6247.af0fb000.chunk.js": "./static/js/6247.af0fb000.chunk.js", "static/js/4414.ff5f95b9.chunk.js": "./static/js/4414.ff5f95b9.chunk.js", "static/js/8833.4ba5da15.chunk.js": "./static/js/8833.4ba5da15.chunk.js", - "static/js/1516.147495bb.chunk.js": "./static/js/1516.147495bb.chunk.js", + "static/js/1516.d1e7e873.chunk.js": "./static/js/1516.d1e7e873.chunk.js", "static/js/483.b039dcc0.chunk.js": "./static/js/483.b039dcc0.chunk.js", "static/js/4114.9ce1a962.chunk.js": "./static/js/4114.9ce1a962.chunk.js", "static/js/6895.143165e2.chunk.js": "./static/js/6895.143165e2.chunk.js", @@ -140,7 +140,7 @@ "static/media/Inter-Regular.woff2": "./static/media/Inter-Regular.c8ba52b05a9ef10f4758.woff2", "index.html": "./index.html", "main.57e739f5.css.map": "./static/css/main.57e739f5.css.map", - "main.078385cd.js.map": "./static/js/main.078385cd.js.map", + "main.46564223.js.map": "./static/js/main.46564223.js.map", "1260.a025e586.chunk.js.map": "./static/js/1260.a025e586.chunk.js.map", "6914.8835970e.chunk.js.map": "./static/js/6914.8835970e.chunk.js.map", "9121.4999947f.chunk.js.map": "./static/js/9121.4999947f.chunk.js.map", @@ -174,7 +174,7 @@ "191.b50b4104.chunk.js.map": "./static/js/191.b50b4104.chunk.js.map", "1329.98d80e22.chunk.js.map": "./static/js/1329.98d80e22.chunk.js.map", "7614.527036f5.chunk.js.map": "./static/js/7614.527036f5.chunk.js.map", - "5351.41f5c7df.chunk.js.map": "./static/js/5351.41f5c7df.chunk.js.map", + "1690.4e6b342c.chunk.js.map": "./static/js/1690.4e6b342c.chunk.js.map", "6491.83aa26f7.chunk.js.map": "./static/js/6491.83aa26f7.chunk.js.map", "4902.f064f175.chunk.js.map": "./static/js/4902.f064f175.chunk.js.map", "1432.6e142c2c.chunk.js.map": "./static/js/1432.6e142c2c.chunk.js.map", @@ -183,7 +183,7 @@ "6577.4b3c8b41.chunk.js.map": "./static/js/6577.4b3c8b41.chunk.js.map", "3875.5db2c08f.chunk.js.map": "./static/js/3875.5db2c08f.chunk.js.map", "3115.da3a98f3.chunk.js.map": "./static/js/3115.da3a98f3.chunk.js.map", - "5522.72ab8875.chunk.js.map": "./static/js/5522.72ab8875.chunk.js.map", + "5522.9c77c391.chunk.js.map": "./static/js/5522.9c77c391.chunk.js.map", "977.4c29a863.chunk.js.map": "./static/js/977.4c29a863.chunk.js.map", "6686.ede27280.chunk.js.map": "./static/js/6686.ede27280.chunk.js.map", "9059.155bb503.chunk.js.map": "./static/js/9059.155bb503.chunk.js.map", @@ -191,7 +191,7 @@ "6247.af0fb000.chunk.js.map": "./static/js/6247.af0fb000.chunk.js.map", "4414.ff5f95b9.chunk.js.map": "./static/js/4414.ff5f95b9.chunk.js.map", "8833.4ba5da15.chunk.js.map": "./static/js/8833.4ba5da15.chunk.js.map", - "1516.147495bb.chunk.js.map": "./static/js/1516.147495bb.chunk.js.map", + "1516.d1e7e873.chunk.js.map": "./static/js/1516.d1e7e873.chunk.js.map", "483.b039dcc0.chunk.js.map": "./static/js/483.b039dcc0.chunk.js.map", "4114.9ce1a962.chunk.js.map": "./static/js/4114.9ce1a962.chunk.js.map", "6895.143165e2.chunk.js.map": "./static/js/6895.143165e2.chunk.js.map", @@ -260,6 +260,6 @@ }, "entrypoints": [ "static/css/main.57e739f5.css", - "static/js/main.078385cd.js" + "static/js/main.46564223.js" ] } \ No newline at end of file diff --git a/portal-ui/build/index.html b/portal-ui/build/index.html index 011d234e1..f3e94760a 100644 --- a/portal-ui/build/index.html +++ b/portal-ui/build/index.html @@ -1 +1 @@ -MinIO Console
\ No newline at end of file +MinIO Console
\ No newline at end of file diff --git a/portal-ui/build/static/js/1516.147495bb.chunk.js b/portal-ui/build/static/js/1516.147495bb.chunk.js deleted file mode 100644 index 5d8639a50..000000000 --- a/portal-ui/build/static/js/1516.147495bb.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1516],{57314:function(e,t,n){"use strict";var i=n(1413),r=n(72791),o=n(61889),s=n(30829),a=n(20068),l=n(27391),c=n(11135),u=n(25787),d=n(23814),p=n(75952),x=n(80184);t.Z=(0,u.Z)((function(e){return(0,c.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},d.YI),d.Hr),{},{inputLabel:(0,i.Z)((0,i.Z)({},d.YI.inputLabel),{},{fontSize:14,margin:0,alignItems:"flex-start",paddingTop:"20px",flexWrap:"wrap",display:"flex"}),textBoxContainer:{flexGrow:1,position:"relative"},cssOutlinedInput:{borderColor:"#EAEAEA",padding:16},rootContainer:{"& .MuiOutlinedInput-inputMultiline":(0,i.Z)((0,i.Z)({},d.YI.inputLabel),{},{fontSize:13,minHeight:150}),"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#07193E",borderWidth:1},"& textarea":{color:"#07193E",fontSize:13,fontWeight:600,"&:placeholder":{color:"#858585",opacity:1,fontWeight:400}}}}))}))((function(e){var t=e.label,n=e.onChange,i=e.value,c=e.id,u=e.name,d=e.disabled,f=void 0!==d&&d,h=e.tooltip,g=void 0===h?"":h,m=e.index,b=void 0===m?0:m,v=e.error,y=void 0===v?"":v,j=e.required,Z=void 0!==j&&j,w=e.placeholder,C=void 0===w?"":w,k=e.classes,S={"data-index":b};return(0,x.jsx)(r.Fragment,{children:(0,x.jsxs)(o.ZP,{item:!0,xs:12,className:"".concat(k.fieldContainer," ").concat(""!==y?k.errorInField:""),children:[""!==t&&(0,x.jsxs)(s.Z,{htmlFor:c,className:k.inputLabel,children:[(0,x.jsxs)("span",{children:[t,Z?"*":""]}),""!==g&&(0,x.jsx)("div",{className:k.tooltipContainer,children:(0,x.jsx)(a.Z,{title:g,placement:"top-start",children:(0,x.jsx)("div",{className:k.tooltip,children:(0,x.jsx)(p.byK,{})})})})]}),(0,x.jsx)("div",{className:k.textBoxContainer,children:(0,x.jsx)(l.Z,{id:c,name:u,fullWidth:!0,value:i,disabled:f,onChange:n,multiline:!0,rows:5,inputProps:S,error:""!==y,helperText:y,placeholder:C,InputLabelProps:{shrink:!0},InputProps:{classes:{notchedOutline:k.cssOutlinedInput,root:k.rootContainer}},variant:"outlined"})})]})})}))},21435:function(e,t,n){"use strict";var i=n(29439),r=n(1413),o=n(72791),s=n(27391),a=n(61889),l=n(30829),c=n(20068),u=n(13400),d=n(20165),p=n(3579),x=n(11135),f=n(72455),h=n(25787),g=n(23814),m=n(75952),b=n(28182),v=n(80184),y=(0,f.Z)((function(e){return(0,x.Z)((0,r.Z)({},g.gM))}));function j(e){var t=y();return(0,v.jsx)(s.Z,(0,r.Z)({InputProps:{classes:t}},e))}t.Z=(0,h.Z)((function(e){return(0,x.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},g.YI),g.Hr),{},{textBoxContainer:{flexGrow:1,position:"relative"},overlayAction:{position:"absolute",right:5,top:6,"& svg":{maxWidth:15,maxHeight:15},"&.withLabel":{top:5}}}))}))((function(e){var t=e.label,n=e.onChange,s=e.value,x=e.id,f=e.name,h=e.type,g=void 0===h?"text":h,y=e.autoComplete,Z=void 0===y?"off":y,w=e.disabled,C=void 0!==w&&w,k=e.multiline,S=void 0!==k&&k,I=e.tooltip,T=void 0===I?"":I,P=e.index,O=void 0===P?0:P,L=e.error,z=void 0===L?"":L,E=e.required,F=void 0!==E&&E,R=e.placeholder,A=void 0===R?"":R,N=e.min,B=e.max,K=e.overlayId,_=e.overlayIcon,M=void 0===_?null:_,W=e.overlayObject,D=void 0===W?null:W,U=e.extraInputProps,H=void 0===U?{}:U,G=e.overlayAction,V=e.noLabelMinWidth,Y=void 0!==V&&V,q=e.pattern,Q=void 0===q?"":q,X=e.autoFocus,J=void 0!==X&&X,$=e.classes,ee=e.className,te=void 0===ee?"":ee,ne=e.onKeyPress,ie=e.onFocus,re=e.onPaste,oe=(0,r.Z)({"data-index":O},H),se=(0,o.useState)(!1),ae=(0,i.Z)(se,2),le=ae[0],ce=ae[1];"number"===g&&N&&(oe.min=N),"number"===g&&B&&(oe.max=B),""!==Q&&(oe.pattern=Q);var ue=M,de=g;return"password"===g&&null===M&&(ue=le?(0,v.jsx)(d.Z,{}):(0,v.jsx)(p.Z,{}),de=le?"text":"password"),(0,v.jsx)(o.Fragment,{children:(0,v.jsxs)(a.ZP,{container:!0,className:(0,b.Z)(""!==te?te:"",""!==z?$.errorInField:$.inputBoxContainer),children:[""!==t&&(0,v.jsxs)(l.Z,{htmlFor:x,className:Y?$.noMinWidthLabel:$.inputLabel,children:[(0,v.jsxs)("span",{children:[t,F?"*":""]}),""!==T&&(0,v.jsx)("div",{className:$.tooltipContainer,children:(0,v.jsx)(c.Z,{title:T,placement:"top-start",children:(0,v.jsx)("div",{className:$.tooltip,children:(0,v.jsx)(m.byK,{})})})})]}),(0,v.jsxs)("div",{className:$.textBoxContainer,children:[(0,v.jsx)(j,{id:x,name:f,fullWidth:!0,value:s,autoFocus:J,disabled:C,onChange:n,type:de,multiline:S,autoComplete:Z,inputProps:oe,error:""!==z,helperText:z,placeholder:A,className:$.inputRebase,onKeyPress:ne,onFocus:ie,onPaste:re}),ue&&(0,v.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==t?"withLabel":""),children:(0,v.jsx)(u.Z,{onClick:G?function(){G()}:function(){return ce(!le)},id:K,size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:ue})}),D&&(0,v.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==t?"withLabel":""),children:D})]})]})})}))},90673:function(e,t,n){"use strict";var i=n(1413),r=n(72791),o=n(61889),s=n(4834),a=n(30829),l=n(20068),c=n(68096),u=n(58406),d=n(77865),p=n(11135),x=n(25787),f=n(23814),h=n(75952),g=n(80184),m=(0,x.Z)((function(e){return(0,p.Z)({root:{height:38,lineHeight:1,"label + &":{marginTop:e.spacing(3)}},input:{height:38,position:"relative",color:"#07193E",fontSize:13,fontWeight:600,padding:"8px 20px 10px 10px",border:"#e5e5e5 1px solid",borderRadius:4,display:"flex",alignItems:"center","&:hover":{borderColor:"#393939"},"&:focus":{backgroundColor:"#fff"}}})}))(s.ZP);t.Z=(0,x.Z)((function(e){return(0,p.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},f.YI),f.Hr),{},{fieldContainer:{display:"flex","@media (max-width: 600px)":{flexFlow:"column"}}}))}))((function(e){var t=e.classes,n=e.id,i=e.name,s=e.onChange,p=e.options,x=e.label,f=e.tooltip,b=void 0===f?"":f,v=e.value,y=e.disabled,j=void 0!==y&&y;return(0,g.jsx)(r.Fragment,{children:(0,g.jsxs)(o.ZP,{item:!0,xs:12,className:t.fieldContainer,children:[""!==x&&(0,g.jsxs)(a.Z,{htmlFor:n,className:t.inputLabel,children:[(0,g.jsx)("span",{children:x}),""!==b&&(0,g.jsx)("div",{className:t.tooltipContainer,children:(0,g.jsx)(l.Z,{title:b,placement:"top-start",children:(0,g.jsx)("div",{className:t.tooltip,children:(0,g.jsx)(h.byK,{})})})})]}),(0,g.jsx)(c.Z,{fullWidth:!0,children:(0,g.jsx)(u.Z,{id:n,name:i,value:v,onChange:s,input:(0,g.jsx)(m,{}),disabled:j,children:p.map((function(e){return(0,g.jsx)(d.Z,{value:e.value,children:e.label},"select-".concat(i,"-").concat(e.label))}))})})]})})}))},51516:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return oe}});var i=n(29439),r=n(1413),o=n(72791),s=n(11135),a=n(23814),l=n(25787),c=n(64554),u=n(74794),d=n(81207),p=n(78687),x=n(87995),f=n(81551),h=n(18073),g=n(43896),m=n(19847),b=n(61889),v=n(50533),y=n(75952),j=n(81159),Z=n(21435),w=n(74440),C=n(80184),k=function(e){var t=e.icon,n=void 0===t?null:t,i=e.title;return(0,C.jsxs)(c.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:[n,(0,C.jsx)("div",{className:"title-text",children:i})]})},S=function(e){var t=e.email;return(0,C.jsxs)(o.Fragment,{children:[(0,C.jsx)(w.Z,{email:t}),(0,C.jsx)(b.ZP,{item:!0,xs:12,marginTop:"25px",children:(0,C.jsxs)(c.Z,{sx:{padding:"20px","& a":{color:"#2781B0",cursor:"pointer"}},children:["Login to"," ",(0,C.jsx)(v.Z,{href:"https://subnet.min.io",target:"_blank",style:{color:"#2781B0",cursor:"pointer"},children:"SUBNET"})," ","to avail support for this MinIO cluster"]})})]})},I=function(){var e="mc admin config set {alias} subnet proxy={proxy}",t=(0,o.useState)(!1),n=(0,i.Z)(t,2),r=n[0],s=n[1];return(0,C.jsx)(o.Fragment,{children:(0,C.jsxs)(c.Z,{sx:{border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",padding:"23px",marginTop:"40px",alignItems:"start",justifyContent:"space-between"},children:[(0,C.jsxs)(c.Z,{sx:{display:"flex",flexFlow:"column"},children:[(0,C.jsxs)(c.Z,{sx:{display:"flex","& .min-icon":{height:"22px",width:"22px"}},children:[(0,C.jsx)(y.ewm,{}),(0,C.jsx)("div",{style:{marginLeft:"10px",fontWeight:600},children:"Proxy Configuration"})]}),(0,C.jsxs)(c.Z,{sx:{marginTop:"10px",marginBottom:"10px",fontSize:"14px"},children:["For airgap/firewalled environments it is possible to"," ",(0,C.jsx)(v.Z,{style:{color:"#2781B0",cursor:"pointer"},href:"https://min.io/docs/minio/linux/reference/minio-mc-admin/mc-admin-config.html?ref=con",target:"_blank",children:"configure a proxy"})," ","to connect to SUBNET ."]}),(0,C.jsx)(c.Z,{children:r&&(0,C.jsx)(Z.Z,{disabled:!0,id:"subnetProxy",name:"subnetProxy",placeholder:"",onChange:function(){},label:"",value:e,overlayIcon:(0,C.jsx)(y.TIy,{}),extraInputProps:{readOnly:!0},overlayAction:function(){return navigator.clipboard.writeText(e)}})})]}),(0,C.jsx)(c.Z,{sx:{display:"flex"},children:(0,C.jsx)(j.Z,{value:"enableProxy",id:"enableProxy",name:"enableProxy",checked:r,onChange:function(e){s(e.target.checked)}})})]})})},T=n(3579),P=n(20165),O=n(30403),L=n(23508),z=n(9505),E=(0,l.Z)((function(e){return(0,s.Z)((0,r.Z)((0,r.Z)({sizedLabel:{minWidth:"75px"}},a.Bz),a.bK))}))((function(e){var t=e.open,n=e.closeModal,r=e.classes,s=e.onSet,a=(0,f.TL)(),l=(0,o.useState)(""),u=(0,i.Z)(l,2),d=u[0],p=u[1],h=(0,o.useState)(""),g=(0,i.Z)(h,2),m=g[0],b=g[1],v=(0,o.useState)(!1),j=(0,i.Z)(v,2),w=j[0],k=j[1],S=(0,o.useState)(""),I=(0,i.Z)(S,2),E=I[0],F=I[1],R=(0,o.useState)(""),A=(0,i.Z)(R,2),N=A[0],B=A[1],K=(0,z.Z)((function(e){e.mfa_token?F(e.mfa_token):e.access_token?W("GET","/api/v1/subnet/apikey?token=".concat(e.access_token)):(s(e.apiKey),n())}),(function(e){a((0,x.Ih)(e)),n(),p(""),b(""),k(!1),F(""),B("")})),_=(0,i.Z)(K,2),M=_[0],W=_[1],D=function(){return(0,C.jsxs)(c.Z,{sx:{width:500},children:[(0,C.jsx)(Z.Z,{className:r.spacerBottom,classes:{inputLabel:r.sizedLabel},id:"subnet-email",name:"subnet-email",onChange:function(e){return p(e.target.value)},label:"Email",value:d,overlayIcon:(0,C.jsx)(y.oyc,{})}),(0,C.jsx)(Z.Z,{className:r.spacerBottom,classes:{inputLabel:r.sizedLabel},id:"subnet-password",name:"subnet-password",onChange:function(e){return b(e.target.value)},label:"Password",type:w?"text":"password",value:m,overlayIcon:w?(0,C.jsx)(P.Z,{}):(0,C.jsx)(T.Z,{}),overlayAction:function(){return k(!w)}})]})},U=function(){return(0,C.jsx)(c.Z,{sx:{display:"flex"},children:(0,C.jsxs)(c.Z,{sx:{display:"flex",flexFlow:"column",flex:"2"},children:[(0,C.jsx)(c.Z,{sx:{fontSize:"16px",display:"flex",flexFlow:"column",marginTop:"30px",marginBottom:"30px"},children:"Two-Factor Authentication"}),(0,C.jsx)(c.Z,{children:"Please enter the 6-digit verification code that was sent to your email address. This code will be valid for 5 minutes."}),(0,C.jsx)(c.Z,{sx:{flex:"1",marginTop:"30px"},children:(0,C.jsx)(Z.Z,{overlayIcon:(0,C.jsx)(O.Z,{}),id:"subnet-otp",name:"subnet-otp",onChange:function(e){return B(e.target.value)},placeholder:"",label:"",value:N})}),(0,C.jsx)(c.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end"}})]})})};return t?(0,C.jsx)(L.Z,{title:"Get API Key from SUBNET",confirmText:"Get API Key",isOpen:t,titleIcon:(0,C.jsx)(y.szr,{}),isLoading:M,cancelText:"Cancel",onConfirm:function(){""!==E?W("POST","/api/v1/subnet/login/mfa",{username:d,otp:N,mfa_token:E}):W("POST","/api/v1/subnet/login",{username:d,password:m})},onClose:n,confirmButtonProps:{variant:"callAction",disabled:!d||!m||M,hidden:!0},cancelButtonProps:{disabled:M},confirmationContent:""===E?D():U()}):null})),F=function(e){var t=e.icon,n=e.description;return(0,C.jsxs)(c.Z,{sx:{display:"flex","& .min-icon":{marginRight:"10px",height:"23px",width:"23px",marginBottom:"10px"}},children:[t," ",(0,C.jsx)("div",{style:{fontSize:"14px",fontStyle:"italic",color:"#5E5E5E"},children:n})]})},R=function(e){var t=e.hasMargin,n=void 0===t||t;return(0,C.jsxs)(c.Z,{sx:{flex:1,border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"20px",marginLeft:{xs:"0px",sm:"0px",md:n?"30px":""},marginTop:{xs:"0px",sm:n?"30px":""}},children:[(0,C.jsxs)(c.Z,{sx:{fontSize:"16px",fontWeight:600,display:"flex",alignItems:"center",marginBottom:"16px","& .min-icon":{height:"21px",width:"21px",marginRight:"15px"}},children:[(0,C.jsx)(y.M9A,{}),(0,C.jsx)("div",{children:"Why should I register?"})]}),(0,C.jsx)(c.Z,{sx:{fontSize:"14px",marginBottom:"15px"},children:"Registering this cluster with the MinIO Subscription Network (SUBNET) provides the following benefits in addition to the commercial license and SLA backed support."}),(0,C.jsxs)(c.Z,{sx:{display:"flex",flexFlow:"column"},children:[(0,C.jsx)(F,{icon:(0,C.jsx)(y._qw,{}),description:"Call Home Monitoring"}),(0,C.jsx)(F,{icon:(0,C.jsx)(y.toM,{}),description:"Health Diagnostics"}),(0,C.jsx)(F,{icon:(0,C.jsx)(y.Fsz,{}),description:"Performance Analysis"}),(0,C.jsx)(F,{icon:(0,C.jsx)(y.EQx,{}),description:(0,C.jsx)(v.Z,{href:"https://min.io/signup?ref=con",target:"_blank",sx:{color:"#2781B0",cursor:"pointer"},children:"More Features"})})]})]})},A=n(57689),N=n(56087),B=(0,l.Z)((function(e){return(0,s.Z)((0,r.Z)({sizedLabel:{minWidth:"75px"}},a.bK))}))((function(e){var t=e.classes,n=e.registerEndpoint,r=(0,A.s0)(),s=(0,o.useState)(!1),a=(0,i.Z)(s,2),l=a[0],u=a[1],p=(0,o.useState)(""),h=(0,i.Z)(p,2),g=h[0],m=h[1],b=(0,o.useState)(!1),v=(0,i.Z)(b,2),j=v[0],w=v[1],S=(0,o.useState)(!1),I=(0,i.Z)(S,2),T=I[0],P=I[1],O=(0,f.TL)(),L=(0,o.useCallback)((function(){if(!j){w(!0);var e={apiKey:g};d.Z.invoke("POST",n,e).then((function(e){w(!1),e&&e.registered&&r(N.gA.LICENSE)})).catch((function(e){O((0,x.Ih)(e)),w(!1),z()}))}}),[g,O,j,n,r]);(0,o.useEffect)((function(){T&&L()}),[T,L]);var z=function(){m(""),P(!1)};return(0,C.jsxs)(o.Fragment,{children:[(0,C.jsx)(c.Z,{sx:{"& .title-text":{marginLeft:"27px",fontWeight:600}},children:(0,C.jsx)(k,{icon:(0,C.jsx)(y.dRy,{}),title:"Register cluster with API key"})}),(0,C.jsxs)(c.Z,{sx:{display:"flex",flexFlow:{xs:"column",md:"row"}},children:[(0,C.jsxs)(c.Z,{sx:{display:"flex",flexFlow:"column",flex:"2"},children:[(0,C.jsx)(c.Z,{sx:{fontSize:"16px",display:"flex",flexFlow:"column",marginTop:"30px",marginBottom:"30px"},children:"Use your MinIO Subscription Network API Key to register this cluster."}),(0,C.jsxs)(c.Z,{sx:{flex:"1"},children:[(0,C.jsx)(Z.Z,{className:t.spacerBottom,classes:{inputLabel:t.sizedLabel},id:"api-key",name:"api-key",onChange:function(e){return m(e.target.value)},label:"API Key",value:g}),(0,C.jsxs)(c.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end","& button":{marginLeft:"8px"}},children:[(0,C.jsx)(y.zxk,{id:"get-from-subnet",variant:"regular",className:t.spacerRight,disabled:j,onClick:function(){return u(!0)},label:"Get from SUBNET"}),(0,C.jsx)(y.zxk,{id:"register",type:"submit",variant:"callAction",disabled:j||0===g.trim().length,onClick:function(){return L()},label:"Register"}),(0,C.jsx)(E,{open:l,closeModal:function(){return u(!1)},onSet:function(e){m(e),P(!0)}})]})]})]}),(0,C.jsx)(R,{})]})]})})),K=n(74165),_=n(15861),M=n(36825),W=n(96382),D=n(38442),U=(0,W.hg)("register/fetchLicenseInfo",function(){var e=(0,_.Z)((0,K.Z)().mark((function e(t,n){var i,r,o,s;return(0,K.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.getState,r=n.dispatch,o=i(),s=(0,D.F)(N.C3,N.LC[N.gA.LICENSE],!0),!o.register.loadingLicenseInfo){e.next=6;break}return e.abrupt("return");case 6:s?(r((0,M.pI)(!0)),d.Z.invoke("GET","/api/v1/subnet/info").then((function(e){r((0,M.aO)(e)),r((0,M.Dr)(!0)),r((0,M.pI)(!1))})).catch((function(e){e.detailedError.toLowerCase()!=="License is not present".toLowerCase()&&e.detailedError.toLowerCase()!=="license not found".toLowerCase()&&r((0,x.Ih)(e)),r((0,M.Dr)(!1)),r((0,M.pI)(!1))}))):r((0,M.pI)(!1));case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),H=(0,W.hg)("register/callRegister",function(){var e=(0,_.Z)((0,K.Z)().mark((function e(t,n){var i,r;return(0,K.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=n.dispatch,r={token:t.token,account_id:t.account_id},d.Z.invoke("POST","/api/v1/subnet/register",r).then((function(){i((0,M.K4)(!1)),i((0,M.jS)()),i(U())})).catch((function(e){i((0,x.Ih)(e)),i((0,M.K4)(!1))}));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),G=(0,W.hg)("register/subnetLoginWithMFA",function(){var e=(0,_.Z)((0,K.Z)().mark((function e(t,n){var i,r,o,s,a,l,c;return(0,K.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.getState,n.rejectWithValue,r=n.dispatch,o=i(),s=o.register.subnetEmail,a=o.register.subnetMFAToken,l=o.register.subnetOTP,!o.register.loading){e.next=8;break}return e.abrupt("return");case 8:r((0,M.K4)(!0)),c={username:s,otp:l,mfa_token:a},d.Z.invoke("POST","/api/v1/subnet/login/mfa",c).then((function(e){r((0,M.K4)(!1)),e&&e.access_token&&e.organizations.length>0&&(1===e.organizations.length?r(H({token:e.access_token,account_id:e.organizations[0].accountId.toString()})):(r((0,M.t2)(e.access_token)),r((0,M.dl)(e.organizations)),r((0,M.wK)(e.organizations[0].accountId.toString()))))})).catch((function(e){r((0,x.Ih)(e)),r((0,M.K4)(!1)),r((0,M.Z7)(""))}));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),V=(0,W.hg)("register/subnetLogin",function(){var e=(0,_.Z)((0,K.Z)().mark((function e(t,n){var i,r,o,s,a,l,c;return(0,K.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.getState,n.rejectWithValue,r=n.dispatch,o=i(),s=o.register.license,a=o.register.subnetPassword,l=o.register.subnetEmail,!o.register.loading){e.next=8;break}return e.abrupt("return");case 8:r((0,M.K4)(!0)),c={username:l,password:a,apiKey:s},d.Z.invoke("POST","/api/v1/subnet/login",c).then((function(e){r((0,M.K4)(!1)),e&&e.registered?(r((0,M.jS)()),r(U())):e&&e.mfa_token?r((0,M.dK)(e.mfa_token)):e&&e.access_token&&e.organizations.length>0&&(r((0,M.t2)(e.access_token)),r((0,M.dl)(e.organizations)),r((0,M.wK)(e.organizations[0].accountId.toString())))})).catch((function(e){r((0,x.Ih)(e)),r((0,M.K4)(!1)),r((0,M.jS)())}));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),Y=n(27454),q=n(78029),Q=n.n(q),X=n(57314),J=function(){var e=(0,f.TL)(),t=(0,p.v9)((function(e){return e.register.subnetRegToken})),n=(0,p.v9)((function(e){return e.register.clusterRegistered})),r=(0,p.v9)((function(e){return e.register.licenseInfo})),s="https://subnet.min.io/cluster/register?token=".concat(t),a=(0,o.useState)(""),l=(0,i.Z)(a,2),u=l[0],d=l[1],h=(0,z.Z)((function(){e(U())}),(function(t){e((0,x.Ih)(t))})),g=(0,i.Z)(h,2),m=g[0],b=g[1];return(0,C.jsx)(o.Fragment,{children:(0,C.jsx)(c.Z,{sx:{border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"43px"},children:n&&r?(0,C.jsx)(S,{email:r.email}):(0,C.jsxs)(o.Fragment,{children:[(0,C.jsx)(c.Z,{sx:{"& .title-text":{marginLeft:"27px",fontWeight:600}},children:(0,C.jsx)(k,{icon:(0,C.jsx)(y.YL8,{}),title:"Register cluster in an Air-gap environment"})}),(0,C.jsxs)(c.Z,{sx:{display:"flex"},children:[(0,C.jsx)(c.Z,{sx:{display:"flex",flexFlow:"column",flex:"2",marginTop:"15px","& .step-number":{color:"#ffffff",height:"25px",width:"25px",background:"#081C42",marginRight:"10px",textAlign:"center",fontWeight:600,borderRadius:"50%"},"& .step-row":{fontSize:"16px",display:"flex",marginTop:"15px",marginBottom:"15px"}},children:(0,C.jsxs)(c.Z,{children:[(0,C.jsx)(c.Z,{className:"step-row",children:(0,C.jsx)("div",{className:"step-text",children:"Click on the link to register this cluster in SUBNET and get a License Key for this Air-Gap deployment"})}),(0,C.jsxs)(c.Z,{sx:{flex:"1",display:"flex",alignItems:"center",gap:3},children:[(0,C.jsx)(v.Z,{style:{color:"#2781B0",cursor:"pointer"},color:"inherit",href:s,target:"_blank",children:"https://subnet.min.io/cluster/register"}),(0,C.jsx)(Y.Z,{tooltip:"Copy to Clipboard",children:(0,C.jsx)(Q(),{text:s,children:(0,C.jsx)(y.zxk,{type:"button",id:"copy-ult-to-clip-board",icon:(0,C.jsx)(y.TIy,{}),color:"primary",variant:"regular"})})})]}),(0,C.jsx)("div",{style:{marginTop:"25px",fontSize:"14px",fontStyle:"italic",color:"#5E5E5E"},children:"Note: If this machine does not have internet connection, Copy paste the following URL in a browser where you access SUBNET and follow the instructions to complete the registration"}),(0,C.jsxs)(c.Z,{sx:{marginTop:"25px",display:"flex",flexDirection:"column"},children:[(0,C.jsxs)("label",{style:{fontWeight:"bold",marginBottom:"10px"},children:["Paste the License Key"," "]}),(0,C.jsx)(X.Z,{value:u,disabled:m,label:"",id:"licenseKey",name:"licenseKey",placeholder:"License Key",onChange:function(e){d(e.target.value)}})]}),(0,C.jsx)(c.Z,{sx:{marginTop:"25px"},children:(0,C.jsx)(y.zxk,{id:"apply-license-key",onClick:function(){b("PUT","/api/v1/configs/subnet",{key_values:[{key:"license",value:u}]})},variant:"callAction",disabled:!u||m,label:"Apply Cluster License"})})]})}),(0,C.jsx)(R,{})]})]})})})},$=function(){var e=(0,f.TL)(),t=(0,p.v9)((function(e){return e.register.subnetMFAToken})),n=(0,p.v9)((function(e){return e.register.subnetOTP})),i=(0,p.v9)((function(e){return e.register.loading}));return(0,C.jsxs)(c.Z,{sx:{display:"flex"},children:[(0,C.jsxs)(c.Z,{sx:{display:"flex",flexFlow:"column",flex:"2"},children:[(0,C.jsx)(c.Z,{sx:{fontSize:"16px",display:"flex",flexFlow:"column",marginTop:"30px",marginBottom:"30px"},children:"Two-Factor Authentication"}),(0,C.jsx)(c.Z,{children:"Please enter the 6-digit verification code that was sent to your email address. This code will be valid for 5 minutes."}),(0,C.jsx)(c.Z,{sx:{flex:"1",marginTop:"30px"},children:(0,C.jsx)(Z.Z,{overlayIcon:(0,C.jsx)(O.Z,{}),id:"subnet-otp",name:"subnet-otp",onChange:function(t){return e((0,M.Z7)(t.target.value))},placeholder:"",label:"",value:n})}),(0,C.jsx)(c.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end"},children:(0,C.jsx)(y.zxk,{id:"verify",onClick:function(){return e(G())},disabled:i||0===n.trim().length||0===t.trim().length,variant:"callAction",label:"Verify"})})]}),(0,C.jsx)(R,{})]})},ee=n(90673),te=function(){var e=(0,f.TL)(),t=(0,p.v9)((function(e){return e.register.subnetAccessToken})),n=(0,p.v9)((function(e){return e.register.selectedSubnetOrganization})),i=(0,p.v9)((function(e){return e.register.subnetOrganizations})),r=(0,p.v9)((function(e){return e.register.loading}));return(0,C.jsxs)(c.Z,{sx:{display:"flex"},children:[(0,C.jsxs)(c.Z,{sx:{display:"flex",flexFlow:"column",flex:"2"},children:[(0,C.jsx)(c.Z,{sx:{marginTop:"15px",marginBottom:"15px","& .title-text":{marginLeft:"0px"}},children:(0,C.jsx)(k,{title:"Register MinIO cluster"})}),(0,C.jsxs)(c.Z,{children:[(0,C.jsx)(ee.Z,{id:"subnet-organization",name:"subnet-organization",onChange:function(t){return e((0,M.wK)(t.target.value))},label:"Select an organization",value:n,options:i.map((function(e){return{label:e.company,value:e.accountId.toString()}}))}),(0,C.jsx)(c.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",marginTop:"15px"},children:(0,C.jsx)(y.zxk,{id:"register-cluster",onClick:function(){return function(){r||(e((0,M.K4)(!0)),t&&n&&e(H({token:t,account_id:n})))}},disabled:r||0===t.trim().length,variant:"callAction",label:"Register"})})]})]}),(0,C.jsx)(R,{})]})},ne=(0,n(72455).Z)((function(e){return(0,s.Z)((0,r.Z)({sizedLabel:{minWidth:"75px"}},a.bK))})),ie=function(){var e=ne(),t=(0,f.TL)(),n=(0,p.v9)((function(e){return e.register.subnetPassword})),i=(0,p.v9)((function(e){return e.register.subnetEmail})),r=(0,p.v9)((function(e){return e.register.showPassword})),s=(0,p.v9)((function(e){return e.register.loading}));return(0,C.jsxs)(o.Fragment,{children:[(0,C.jsx)(c.Z,{sx:{"& .title-text":{marginLeft:"27px",fontWeight:600}},children:(0,C.jsx)(k,{icon:(0,C.jsx)(y.dRy,{}),title:"Online activation of MinIO Subscription Network License"})}),(0,C.jsxs)(c.Z,{sx:{display:"flex",flexFlow:{xs:"column",md:"row"}},children:[(0,C.jsxs)(c.Z,{sx:{display:"flex",flexFlow:"column",flex:"2"},children:[(0,C.jsx)(c.Z,{sx:{fontSize:"16px",display:"flex",flexFlow:"column",marginTop:"30px",marginBottom:"30px"},children:"Use your MinIO Subscription Network login credentials to register this cluster."}),(0,C.jsxs)(c.Z,{sx:{flex:"1"},children:[(0,C.jsx)(Z.Z,{className:e.spacerBottom,classes:{inputLabel:e.sizedLabel},id:"subnet-email",name:"subnet-email",onChange:function(e){return t((0,M.Ze)(e.target.value))},label:"Email",value:i,overlayIcon:(0,C.jsx)(y.oyc,{})}),(0,C.jsx)(Z.Z,{className:e.spacerBottom,classes:{inputLabel:e.sizedLabel},id:"subnet-password",name:"subnet-password",onChange:function(e){return t((0,M.lr)(e.target.value))},label:"Password",type:r?"text":"password",value:n,overlayIcon:r?(0,C.jsx)(P.Z,{}):(0,C.jsx)(T.Z,{}),overlayAction:function(){return t((0,M.R5)(!r))}}),(0,C.jsxs)(c.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end","& button":{marginLeft:"8px"}},children:[(0,C.jsx)(y.zxk,{id:"sign-up",type:"submit",className:e.spacerRight,variant:"regular",onClick:function(e){e.preventDefault(),window.open("https://min.io/signup?ref=con","_blank")},label:"Sign up"}),(0,C.jsx)(y.zxk,{id:"register-credentials",type:"submit",variant:"callAction",disabled:s||0===i.trim().length||0===n.trim().length,onClick:function(){return t(V())},label:"Register"})]})]})]}),(0,C.jsx)(R,{})]})]})},re=n(47974),oe=(0,l.Z)((function(e){return(0,s.Z)((0,r.Z)({sizedLabel:{minWidth:"75px"}},a.bK))}))((function(e){e.classes;var t=(0,f.TL)(),n=(0,p.v9)((function(e){return e.register.subnetMFAToken})),r=(0,p.v9)((function(e){return e.register.subnetAccessToken})),s=(0,p.v9)((function(e){return e.register.subnetRegToken})),a=(0,p.v9)((function(e){return e.register.subnetOrganizations})),l=(0,p.v9)((function(e){return e.register.loading})),b=(0,p.v9)((function(e){return e.register.loadingLicenseInfo})),v=(0,p.v9)((function(e){return e.register.clusterRegistered})),y=(0,p.v9)((function(e){return e.register.licenseInfo})),j=(0,p.v9)((function(e){return e.register.curTab})),Z=(0,o.useState)(!0),w=(0,i.Z)(Z,2),k=w[0],T=w[1];(0,o.useEffect)((function(){return function(){t((0,M.jS)())}}),[t]);(0,o.useEffect)((function(){k&&(t(U()),T(!1))}),[k,T,t]);var P=(0,C.jsx)(o.Fragment,{});P=r&&a.length>0?(0,C.jsx)(te,{}):n?(0,C.jsx)($,{}):(0,C.jsx)(ie,{});var O=(0,C.jsxs)(o.Fragment,{children:[(0,C.jsx)(c.Z,{sx:{border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"43px"},children:v&&y?(0,C.jsx)(S,{email:y.email}):(0,C.jsx)(B,{registerEndpoint:"/api/v1/subnet/login"})}),(0,C.jsx)(I,{})]}),L=(0,C.jsx)(J,{}),z=(0,C.jsxs)(o.Fragment,{children:[(0,C.jsx)(c.Z,{sx:{border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"43px"},children:v&&y?(0,C.jsx)(S,{email:y.email}):P}),!v&&(0,C.jsx)(I,{})]}),E=b?(0,C.jsx)("div",{children:"Loading.."}):z;return(0,C.jsxs)(o.Fragment,{children:[(0,C.jsx)(re.Z,{label:"Register to MinIO Subscription Network",actions:(0,C.jsx)(o.Fragment,{})}),(0,C.jsxs)(u.Z,{children:[(0,C.jsxs)(h.Z,{value:j,onChange:function(e,n){t((0,M.m)(n))},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[(0,C.jsx)(g.Z,{label:"Credentials",id:"simple-tab-0","aria-controls":"simple-tab-panel-0"}),(0,C.jsx)(g.Z,{label:"API Key",id:"simple-tab-1","aria-controls":"simple-tab-panel-1"}),(0,C.jsx)(g.Z,{label:"Air-Gap",id:"simple-tab-2","aria-controls":"simple-tab-panel-2",onClick:function(){l||s||(t((0,M.K4)(!0)),d.Z.invoke("GET","/api/v1/subnet/registration-token").then((function(e){t((0,M.K4)(!1)),e&&e.regToken&&t((0,M.wz)(e.regToken))})).catch((function(e){console.error(e),t((0,x.Ih)(e)),t((0,M.K4)(!1))})))}})]}),(0,C.jsx)(m.x,{index:0,value:j,children:E}),(0,C.jsx)(m.x,{index:1,value:j,children:O}),(0,C.jsx)(m.x,{index:2,value:j,children:L})]})]})}))},74440:function(e,t,n){"use strict";n(72791);var i=n(64554),r=n(75952),o=n(80184);t.Z=function(e){var t=e.email,n=void 0===t?"":t;return(0,o.jsxs)(i.Z,{sx:{height:"67px",color:"#ffffff",display:"flex",position:"relative",top:"-30px",left:"-32px",width:"calc(100% + 64px)",alignItems:"center",justifyContent:"space-between",backgroundColor:"#2781B0",padding:"0 25px 0 25px","& .registered-box, .reg-badge-box":{display:"flex",alignItems:"center",justifyContent:"flex-start"},"& .reg-badge-box":{marginLeft:"20px","& .min-icon":{fill:"#2781B0"}}},children:[(0,o.jsxs)(i.Z,{className:"registered-box",children:[(0,o.jsx)(i.Z,{sx:{fontSize:"16px",fontWeight:400},children:"Register status:"}),(0,o.jsxs)(i.Z,{className:"reg-badge-box",children:[(0,o.jsx)(r.SA,{}),(0,o.jsx)(i.Z,{sx:{fontWeight:600},children:"Registered"})]})]}),(0,o.jsxs)(i.Z,{className:"registered-acc-box",sx:{alignItems:"center",justifyContent:"flex-start",display:{sm:"flex",xs:"none"}},children:[(0,o.jsx)(i.Z,{sx:{fontSize:"16px",fontWeight:400},children:"Registered to:"}),(0,o.jsx)(i.Z,{sx:{marginLeft:"8px",fontWeight:600},children:n})]})]})}},19847:function(e,t,n){"use strict";n.d(t,{x:function(){return l}});var i=n(1413),r=n(45987),o=n(72791),s=n(80184),a=["children","value","index"],l=function(e){var t=e.children,n=e.value,l=e.index,c=(0,r.Z)(e,a);return(0,s.jsx)("div",(0,i.Z)((0,i.Z)({role:"tabpanel",hidden:n!==l,id:"simple-tabpanel-".concat(l),"aria-labelledby":"simple-tab-".concat(l),style:{marginTop:"5px"}},c),{},{children:n===l&&(0,s.jsx)(o.Fragment,{children:t})}))}},30403:function(e,t,n){"use strict";var i=n(64836);t.Z=void 0;var r=i(n(45649)),o=n(80184),s=(0,r.default)((0,o.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"}),"LockOutlined");t.Z=s},3579:function(e,t,n){"use strict";var i=n(64836);t.Z=void 0;var r=i(n(45649)),o=n(80184),s=(0,r.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"RemoveRedEye");t.Z=s},20165:function(e,t,n){"use strict";var i=n(64836);t.Z=void 0;var r=i(n(45649)),o=n(80184),s=(0,r.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff");t.Z=s},76998:function(e,t,n){"use strict";var i=n(42458),r={"text/plain":"Text","text/html":"Url",default:"Text"},o="Copy to clipboard: #{key}, Enter";e.exports=function(e,t){var n,s,a,l,c,u,d=!1;t||(t={}),n=t.debug||!1;try{if(a=i(),l=document.createRange(),c=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(i){if(i.stopPropagation(),t.format)if(i.preventDefault(),"undefined"===typeof i.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=r[t.format]||r.default;window.clipboardData.setData(o,e)}else i.clipboardData.clearData(),i.clipboardData.setData(t.format,e);t.onCopy&&(i.preventDefault(),t.onCopy(i.clipboardData))})),document.body.appendChild(u),l.selectNodeContents(u),c.addRange(l),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");d=!0}catch(p){n&&console.error("unable to copy using execCommand: ",p),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),d=!0}catch(p){n&&console.error("unable to copy using clipboardData: ",p),n&&console.error("falling back to prompt"),s=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:o),window.prompt(s,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(l):c.removeAllRanges()),u&&document.body.removeChild(u),a()}return d}},568:function(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var r=a(n(72791)),o=a(n(76998)),s=["text","onCopy","options","children"];function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function d(e,t){for(var n=0;n.\n\nimport React from \"react\";\nimport { Grid, InputLabel, TextField, Tooltip } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport { HelpIcon } from \"mds\";\n\ninterface CommentBoxProps {\n label: string;\n classes: any;\n onChange: (e: React.ChangeEvent) => void;\n value: string | boolean;\n id: string;\n name: string;\n disabled?: boolean;\n tooltip?: string;\n index?: number;\n error?: string;\n required?: boolean;\n placeholder?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n inputLabel: {\n ...fieldBasic.inputLabel,\n fontSize: 14,\n margin: 0,\n alignItems: \"flex-start\",\n paddingTop: \"20px\",\n flexWrap: \"wrap\",\n display: \"flex\",\n },\n textBoxContainer: {\n flexGrow: 1,\n position: \"relative\",\n },\n cssOutlinedInput: {\n borderColor: \"#EAEAEA\",\n padding: 16,\n },\n rootContainer: {\n \"& .MuiOutlinedInput-inputMultiline\": {\n ...fieldBasic.inputLabel,\n fontSize: 13,\n minHeight: 150,\n },\n \"&.Mui-focused .MuiOutlinedInput-notchedOutline\": {\n borderColor: \"#07193E\",\n borderWidth: 1,\n },\n \"& textarea\": {\n color: \"#07193E\",\n fontSize: 13,\n fontWeight: 600,\n \"&:placeholder\": {\n color: \"#858585\",\n opacity: 1,\n fontWeight: 400,\n },\n },\n },\n });\n\nconst CommentBoxWrapper = ({\n label,\n onChange,\n value,\n id,\n name,\n disabled = false,\n tooltip = \"\",\n index = 0,\n error = \"\",\n required = false,\n placeholder = \"\",\n classes,\n}: CommentBoxProps) => {\n let inputProps: any = { \"data-index\": index };\n\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n )}\n\n
\n \n
\n \n
\n );\n};\n\nexport default withStyles(styles)(CommentBoxWrapper);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React, { ClipboardEvent, useState } from \"react\";\nimport {\n Grid,\n IconButton,\n InputLabel,\n TextField,\n TextFieldProps,\n Tooltip,\n} from \"@mui/material\";\nimport { OutlinedInputProps } from \"@mui/material/OutlinedInput\";\nimport { InputProps as StandardInputProps } from \"@mui/material/Input\";\nimport VisibilityOffIcon from \"@mui/icons-material/VisibilityOff\";\nimport RemoveRedEyeIcon from \"@mui/icons-material/RemoveRedEye\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n fieldBasic,\n inputFieldStyles,\n tooltipHelper,\n} from \"../common/styleLibrary\";\nimport { HelpIcon } from \"mds\";\nimport clsx from \"clsx\";\n\ninterface InputBoxProps {\n label: string;\n classes: any;\n onChange: (e: React.ChangeEvent) => void;\n onKeyPress?: (e: any) => void;\n onFocus?: () => void;\n onPaste?: (e: ClipboardEvent) => void;\n value: string | boolean;\n id: string;\n name: string;\n disabled?: boolean;\n multiline?: boolean;\n type?: string;\n tooltip?: string;\n autoComplete?: string;\n index?: number;\n error?: string;\n required?: boolean;\n placeholder?: string;\n min?: string;\n max?: string;\n overlayId?: string;\n overlayIcon?: any;\n overlayAction?: () => void;\n overlayObject?: any;\n extraInputProps?: StandardInputProps[\"inputProps\"];\n noLabelMinWidth?: boolean;\n pattern?: string;\n autoFocus?: boolean;\n className?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n textBoxContainer: {\n flexGrow: 1,\n position: \"relative\",\n },\n overlayAction: {\n position: \"absolute\",\n right: 5,\n top: 6,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n \"&.withLabel\": {\n top: 5,\n },\n },\n });\n\nconst inputStyles = makeStyles((theme: Theme) =>\n createStyles({\n ...inputFieldStyles,\n })\n);\n\nfunction InputField(props: TextFieldProps) {\n const classes = inputStyles();\n\n return (\n }\n {...props}\n />\n );\n}\n\nconst InputBoxWrapper = ({\n label,\n onChange,\n value,\n id,\n name,\n type = \"text\",\n autoComplete = \"off\",\n disabled = false,\n multiline = false,\n tooltip = \"\",\n index = 0,\n error = \"\",\n required = false,\n placeholder = \"\",\n min,\n max,\n overlayId,\n overlayIcon = null,\n overlayObject = null,\n extraInputProps = {},\n overlayAction,\n noLabelMinWidth = false,\n pattern = \"\",\n autoFocus = false,\n classes,\n className = \"\",\n onKeyPress,\n onFocus,\n onPaste,\n}: InputBoxProps) => {\n let inputProps: any = { \"data-index\": index, ...extraInputProps };\n const [toggleTextInput, setToggleTextInput] = useState(false);\n\n if (type === \"number\" && min) {\n inputProps[\"min\"] = min;\n }\n\n if (type === \"number\" && max) {\n inputProps[\"max\"] = max;\n }\n\n if (pattern !== \"\") {\n inputProps[\"pattern\"] = pattern;\n }\n\n let inputBoxWrapperIcon = overlayIcon;\n let inputBoxWrapperType = type;\n\n if (type === \"password\" && overlayIcon === null) {\n inputBoxWrapperIcon = toggleTextInput ? (\n \n ) : (\n \n );\n inputBoxWrapperType = toggleTextInput ? \"text\" : \"password\";\n }\n\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n \n )}\n\n
\n \n {inputBoxWrapperIcon && (\n \n {\n overlayAction();\n }\n : () => setToggleTextInput(!toggleTextInput)\n }\n id={overlayId}\n size={\"small\"}\n disableFocusRipple={false}\n disableRipple={false}\n disableTouchRipple={false}\n >\n {inputBoxWrapperIcon}\n \n
\n )}\n {overlayObject && (\n \n {overlayObject}\n \n )}\n \n \n
\n );\n};\n\nexport default withStyles(styles)(InputBoxWrapper);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n FormControl,\n InputBase,\n InputLabel,\n MenuItem,\n Select,\n SelectChangeEvent,\n Tooltip,\n} from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport { HelpIcon } from \"mds\";\n\nexport interface selectorTypes {\n label: string;\n value: string;\n}\n\ninterface SelectProps {\n options: selectorTypes[];\n value: string;\n label: string;\n id: string;\n name: string;\n tooltip?: string;\n onChange: (e: SelectChangeEvent) => void;\n disabled?: boolean;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n fieldContainer: {\n display: \"flex\",\n \"@media (max-width: 600px)\": {\n flexFlow: \"column\",\n },\n },\n });\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n height: 38,\n lineHeight: 1,\n \"label + &\": {\n marginTop: theme.spacing(3),\n },\n },\n input: {\n height: 38,\n position: \"relative\",\n color: \"#07193E\",\n fontSize: 13,\n fontWeight: 600,\n padding: \"8px 20px 10px 10px\",\n border: \"#e5e5e5 1px solid\",\n borderRadius: 4,\n display: \"flex\",\n alignItems: \"center\",\n \"&:hover\": {\n borderColor: \"#393939\",\n },\n \"&:focus\": {\n backgroundColor: \"#fff\",\n },\n },\n })\n)(InputBase);\n\nconst SelectWrapper = ({\n classes,\n id,\n name,\n onChange,\n options,\n label,\n tooltip = \"\",\n value,\n disabled = false,\n}: SelectProps) => {\n return (\n \n \n {label !== \"\" && (\n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n )}\n \n }\n disabled={disabled}\n >\n {options.map((option) => (\n \n {option.label}\n \n ))}\n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(SelectWrapper);\n","import { Box, Grid, Link } from \"@mui/material\";\nimport { Fragment, useState } from \"react\";\nimport { CopyIcon, SettingsIcon } from \"mds\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport RegistrationStatusBanner from \"./RegistrationStatusBanner\";\n\nexport const FormTitle = ({\n icon = null,\n title,\n}: {\n icon?: any;\n title: any;\n}) => {\n return (\n \n {icon}\n
{title}
\n \n );\n};\n\nexport const ClusterRegistered = ({ email }: { email: string }) => {\n return (\n \n \n \n \n Login to{\" \"}\n \n SUBNET\n {\" \"}\n to avail support for this MinIO cluster\n \n \n \n );\n};\n\nexport const ProxyConfiguration = () => {\n const proxyConfigurationCommand =\n \"mc admin config set {alias} subnet proxy={proxy}\";\n const [displaySubnetProxy, setDisplaySubnetProxy] = useState(false);\n return (\n \n \n \n \n \n
\n Proxy Configuration\n
\n \n \n For airgap/firewalled environments it is possible to{\" \"}\n \n configure a proxy\n {\" \"}\n to connect to SUBNET .\n \n \n {displaySubnetProxy && (\n {}}\n label=\"\"\n value={proxyConfigurationCommand}\n overlayIcon={}\n extraInputProps={{\n readOnly: true,\n }}\n overlayAction={() =>\n navigator.clipboard.writeText(proxyConfigurationCommand)\n }\n />\n )}\n \n \n \n ) => {\n setDisplaySubnetProxy(event.target.checked);\n }}\n />\n \n \n
\n );\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport RemoveRedEyeIcon from \"@mui/icons-material/RemoveRedEye\";\nimport VisibilityOffIcon from \"@mui/icons-material/VisibilityOff\";\nimport LockOutlinedIcon from \"@mui/icons-material/LockOutlined\";\nimport {\n containerForHeader,\n spacingUtils,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport ConfirmDialog from \"../Common/ModalWrapper/ConfirmDialog\";\nimport useApi from \"../Common/Hooks/useApi\";\nimport React, { useState } from \"react\";\nimport { InfoIcon, UsersIcon } from \"mds\";\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport { useAppDispatch } from \"../../../store\";\nimport { setErrorSnackMessage } from \"../../../systemSlice\";\nimport { Box } from \"@mui/material\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n sizedLabel: {\n minWidth: \"75px\",\n },\n ...containerForHeader,\n ...spacingUtils,\n });\n\ninterface IGetApiKeyModalProps {\n open: boolean;\n closeModal: () => void;\n onSet: (apiKey: string) => void;\n classes: any;\n}\n\nconst GetApiKeyModal = ({\n open,\n closeModal,\n classes,\n onSet,\n}: IGetApiKeyModalProps) => {\n const dispatch = useAppDispatch();\n const [email, setEmail] = useState(\"\");\n const [password, setPassword] = useState(\"\");\n const [showPassword, setShowPassword] = useState(false);\n const [mfaToken, setMfaToken] = useState(\"\");\n const [subnetOTP, setSubnetOTP] = useState(\"\");\n\n const onError = (err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n closeModal();\n setEmail(\"\");\n setPassword(\"\");\n setShowPassword(false);\n setMfaToken(\"\");\n setSubnetOTP(\"\");\n };\n\n const onSuccess = (res: any) => {\n if (res.mfa_token) {\n setMfaToken(res.mfa_token);\n } else if (res.access_token) {\n invokeApi(\"GET\", `/api/v1/subnet/apikey?token=${res.access_token}`);\n } else {\n onSet(res.apiKey);\n closeModal();\n }\n };\n\n const [isLoading, invokeApi] = useApi(onSuccess, onError);\n\n const onConfirm = () => {\n if (mfaToken !== \"\") {\n invokeApi(\"POST\", \"/api/v1/subnet/login/mfa\", {\n username: email,\n otp: subnetOTP,\n mfa_token: mfaToken,\n });\n } else {\n invokeApi(\"POST\", \"/api/v1/subnet/login\", { username: email, password });\n }\n };\n\n const getDialogContent = () => {\n if (mfaToken === \"\") {\n return getCredentialsDialog();\n }\n return getMFADialog();\n };\n\n const getCredentialsDialog = () => {\n return (\n \n ) =>\n setEmail(event.target.value)\n }\n label=\"Email\"\n value={email}\n overlayIcon={}\n />\n ) =>\n setPassword(event.target.value)\n }\n label=\"Password\"\n type={showPassword ? \"text\" : \"password\"}\n value={password}\n overlayIcon={\n showPassword ? : \n }\n overlayAction={() => setShowPassword(!showPassword)}\n />\n \n );\n };\n\n const getMFADialog = () => {\n return (\n \n \n \n Two-Factor Authentication\n \n\n \n Please enter the 6-digit verification code that was sent to your\n email address. This code will be valid for 5 minutes.\n \n\n \n }\n id=\"subnet-otp\"\n name=\"subnet-otp\"\n onChange={(event: React.ChangeEvent) =>\n setSubnetOTP(event.target.value)\n }\n placeholder=\"\"\n label=\"\"\n value={subnetOTP}\n />\n \n \n \n \n );\n };\n\n return open ? (\n }\n isLoading={isLoading}\n cancelText={\"Cancel\"}\n onConfirm={onConfirm}\n onClose={closeModal}\n confirmButtonProps={{\n variant: \"callAction\",\n disabled: !email || !password || isLoading,\n hidden: true,\n }}\n cancelButtonProps={{\n disabled: isLoading,\n }}\n confirmationContent={getDialogContent()}\n />\n ) : null;\n};\n\nexport default withStyles(styles)(GetApiKeyModal);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Box, Link } from \"@mui/material\";\nimport {\n CallHomeFeatureIcon,\n DiagnosticsFeatureIcon,\n ExtraFeaturesIcon,\n HelpIconFilled,\n PerformanceFeatureIcon,\n} from \"mds\";\n\nconst FeatureItem = ({\n icon,\n description,\n}: {\n icon: any;\n description: string | React.ReactNode;\n}) => {\n return (\n \n {icon}{\" \"}\n
\n {description}\n
\n \n );\n};\nconst RegisterHelpBox = ({ hasMargin = true }: { hasMargin?: boolean }) => {\n return (\n \n \n \n
Why should I register?
\n \n \n Registering this cluster with the MinIO Subscription Network (SUBNET)\n provides the following benefits in addition to the commercial license\n and SLA backed support.\n \n\n \n }\n description={`Call Home Monitoring`}\n />\n }\n description={`Health Diagnostics`}\n />\n }\n description={`Performance Analysis`}\n />\n }\n description={\n \n More Features\n \n }\n />\n \n \n );\n};\n\nexport default RegisterHelpBox;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { Box } from \"@mui/material\";\nimport { Button, OnlineRegistrationIcon } from \"mds\";\nimport { FormTitle } from \"./utils\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport GetApiKeyModal from \"./GetApiKeyModal\";\nimport RegisterHelpBox from \"./RegisterHelpBox\";\nimport { SubnetLoginRequest, SubnetLoginResponse } from \"../License/types\";\nimport api from \"../../../common/api\";\nimport { useAppDispatch } from \"../../../store\";\nimport { setErrorSnackMessage } from \"../../../systemSlice\";\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport { spacingUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { useNavigate } from \"react-router-dom\";\nimport { IAM_PAGES } from \"../../../common/SecureComponent/permissions\";\n\ninterface IApiKeyRegister {\n classes: any;\n registerEndpoint: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n sizedLabel: {\n minWidth: \"75px\",\n },\n ...spacingUtils,\n });\n\nconst ApiKeyRegister = ({ classes, registerEndpoint }: IApiKeyRegister) => {\n const navigate = useNavigate();\n\n const [showApiKeyModal, setShowApiKeyModal] = useState(false);\n const [apiKey, setApiKey] = useState(\"\");\n const [loading, setLoading] = useState(false);\n const [fromModal, setFromModal] = useState(false);\n const dispatch = useAppDispatch();\n\n const onRegister = useCallback(() => {\n if (loading) {\n return;\n }\n setLoading(true);\n let request: SubnetLoginRequest = { apiKey };\n api\n .invoke(\"POST\", registerEndpoint, request)\n .then((resp: SubnetLoginResponse) => {\n setLoading(false);\n if (resp && resp.registered) {\n navigate(IAM_PAGES.LICENSE);\n }\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n setLoading(false);\n reset();\n });\n }, [apiKey, dispatch, loading, registerEndpoint, navigate]);\n\n useEffect(() => {\n if (fromModal) {\n onRegister();\n }\n }, [fromModal, onRegister]);\n\n const reset = () => {\n setApiKey(\"\");\n setFromModal(false);\n };\n\n return (\n \n \n }\n title={`Register cluster with API key`}\n />\n \n \n \n \n Use your MinIO Subscription Network API Key to register this\n cluster.\n \n \n ) =>\n setApiKey(event.target.value)\n }\n label=\"API Key\"\n value={apiKey}\n />\n\n \n setShowApiKeyModal(true)}\n label={\"Get from SUBNET\"}\n />\n onRegister()}\n label={\"Register\"}\n />\n setShowApiKeyModal(false)}\n onSet={(value) => {\n setApiKey(value);\n setFromModal(true);\n }}\n />\n \n \n \n \n \n \n );\n};\n\nexport default withStyles(styles)(ApiKeyRegister);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport {\n resetRegisterForm,\n setClusterRegistered,\n setLicenseInfo,\n setLoading,\n setLoadingLicenseInfo,\n setSelectedSubnetOrganization,\n setSubnetAccessToken,\n setSubnetMFAToken,\n setSubnetOrganizations,\n setSubnetOTP,\n} from \"./registerSlice\";\nimport api from \"../../../common/api\";\nimport {\n SubnetInfo,\n SubnetLoginRequest,\n SubnetLoginResponse,\n SubnetLoginWithMFARequest,\n SubnetRegisterRequest,\n} from \"../License/types\";\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport { setErrorSnackMessage } from \"../../../systemSlice\";\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { AppState } from \"../../../store\";\nimport { hasPermission } from \"../../../common/SecureComponent\";\nimport {\n CONSOLE_UI_RESOURCE,\n IAM_PAGES,\n IAM_PAGES_PERMISSIONS,\n} from \"../../../common/SecureComponent/permissions\";\n\nexport const fetchLicenseInfo = createAsyncThunk(\n \"register/fetchLicenseInfo\",\n async (_, { getState, dispatch }) => {\n const state = getState() as AppState;\n\n const getSubnetInfo = hasPermission(\n CONSOLE_UI_RESOURCE,\n IAM_PAGES_PERMISSIONS[IAM_PAGES.LICENSE],\n true\n );\n\n const loadingLicenseInfo = state.register.loadingLicenseInfo;\n\n if (loadingLicenseInfo) {\n return;\n }\n if (getSubnetInfo) {\n dispatch(setLoadingLicenseInfo(true));\n api\n .invoke(\"GET\", `/api/v1/subnet/info`)\n .then((res: SubnetInfo) => {\n dispatch(setLicenseInfo(res));\n dispatch(setClusterRegistered(true));\n dispatch(setLoadingLicenseInfo(false));\n })\n .catch((err: ErrorResponseHandler) => {\n if (\n err.detailedError.toLowerCase() !==\n \"License is not present\".toLowerCase() &&\n err.detailedError.toLowerCase() !==\n \"license not found\".toLowerCase()\n ) {\n dispatch(setErrorSnackMessage(err));\n }\n dispatch(setClusterRegistered(false));\n dispatch(setLoadingLicenseInfo(false));\n });\n } else {\n dispatch(setLoadingLicenseInfo(false));\n }\n }\n);\n\nexport interface ClassRegisterArgs {\n token: string;\n account_id: string;\n}\n\nexport const callRegister = createAsyncThunk(\n \"register/callRegister\",\n async (args: ClassRegisterArgs, { dispatch }) => {\n const request: SubnetRegisterRequest = {\n token: args.token,\n account_id: args.account_id,\n };\n api\n .invoke(\"POST\", \"/api/v1/subnet/register\", request)\n .then(() => {\n dispatch(setLoading(false));\n dispatch(resetRegisterForm());\n dispatch(fetchLicenseInfo());\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n dispatch(setLoading(false));\n });\n }\n);\n\nexport const subnetLoginWithMFA = createAsyncThunk(\n \"register/subnetLoginWithMFA\",\n async (_, { getState, rejectWithValue, dispatch }) => {\n const state = getState() as AppState;\n\n const subnetEmail = state.register.subnetEmail;\n const subnetMFAToken = state.register.subnetMFAToken;\n const subnetOTP = state.register.subnetOTP;\n const loading = state.register.loading;\n\n if (loading) {\n return;\n }\n dispatch(setLoading(true));\n const request: SubnetLoginWithMFARequest = {\n username: subnetEmail,\n otp: subnetOTP,\n mfa_token: subnetMFAToken,\n };\n api\n .invoke(\"POST\", \"/api/v1/subnet/login/mfa\", request)\n .then((resp: SubnetLoginResponse) => {\n dispatch(setLoading(false));\n if (resp && resp.access_token && resp.organizations.length > 0) {\n if (resp.organizations.length === 1) {\n dispatch(\n callRegister({\n token: resp.access_token,\n account_id: resp.organizations[0].accountId.toString(),\n })\n );\n } else {\n dispatch(setSubnetAccessToken(resp.access_token));\n dispatch(setSubnetOrganizations(resp.organizations));\n dispatch(\n setSelectedSubnetOrganization(\n resp.organizations[0].accountId.toString()\n )\n );\n }\n }\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n dispatch(setLoading(false));\n dispatch(setSubnetOTP(\"\"));\n });\n }\n);\n\nexport const subnetLogin = createAsyncThunk(\n \"register/subnetLogin\",\n async (_, { getState, rejectWithValue, dispatch }) => {\n const state = getState() as AppState;\n\n const license = state.register.license;\n const subnetPassword = state.register.subnetPassword;\n const subnetEmail = state.register.subnetEmail;\n const loading = state.register.loading;\n\n if (loading) {\n return;\n }\n dispatch(setLoading(true));\n let request: SubnetLoginRequest = {\n username: subnetEmail,\n password: subnetPassword,\n apiKey: license,\n };\n api\n .invoke(\"POST\", \"/api/v1/subnet/login\", request)\n .then((resp: SubnetLoginResponse) => {\n dispatch(setLoading(false));\n if (resp && resp.registered) {\n dispatch(resetRegisterForm());\n dispatch(fetchLicenseInfo());\n } else if (resp && resp.mfa_token) {\n dispatch(setSubnetMFAToken(resp.mfa_token));\n } else if (resp && resp.access_token && resp.organizations.length > 0) {\n dispatch(setSubnetAccessToken(resp.access_token));\n dispatch(setSubnetOrganizations(resp.organizations));\n dispatch(\n setSelectedSubnetOrganization(\n resp.organizations[0].accountId.toString()\n )\n );\n }\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n dispatch(setLoading(false));\n dispatch(resetRegisterForm());\n });\n }\n);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { Box, Link } from \"@mui/material\";\nimport { ClusterRegistered, FormTitle } from \"./utils\";\nimport { Button, CopyIcon, OfflineRegistrationIcon } from \"mds\";\nimport TooltipWrapper from \"../Common/TooltipWrapper/TooltipWrapper\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport RegisterHelpBox from \"./RegisterHelpBox\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport { useSelector } from \"react-redux\";\nimport CommentBoxWrapper from \"../Common/FormComponents/CommentBoxWrapper/CommentBoxWrapper\";\nimport useApi from \"../Common/Hooks/useApi\";\nimport { fetchLicenseInfo } from \"./registerThunks\";\nimport { setErrorSnackMessage } from \"../../../systemSlice\";\n\nconst OfflineRegistration = () => {\n const dispatch = useAppDispatch();\n const subnetRegToken = useSelector(\n (state: AppState) => state.register.subnetRegToken\n );\n const clusterRegistered = useSelector(\n (state: AppState) => state.register.clusterRegistered\n );\n const licenseInfo = useSelector(\n (state: AppState) => state.register.licenseInfo\n );\n\n const offlineRegUrl = `https://subnet.min.io/cluster/register?token=${subnetRegToken}`;\n\n const [licenseKey, setLicenseKey] = useState(\"\");\n\n const [isSaving, invokeApplyLicenseApi] = useApi(\n () => {\n dispatch(fetchLicenseInfo());\n },\n (err) => {\n dispatch(setErrorSnackMessage(err));\n }\n );\n\n const applyAirGapLicense = () => {\n invokeApplyLicenseApi(\"PUT\", `/api/v1/configs/subnet`, {\n key_values: [{ key: \"license\", value: licenseKey }],\n });\n };\n\n return (\n \n \n {clusterRegistered && licenseInfo ? (\n \n ) : (\n \n \n }\n title={`Register cluster in an Air-gap environment`}\n />\n \n\n \n \n \n \n
\n Click on the link to register this cluster in SUBNET and\n get a License Key for this Air-Gap deployment\n
\n
\n\n \n \n https://subnet.min.io/cluster/register\n \n\n \n \n }\n color={\"primary\"}\n variant={\"regular\"}\n />\n \n \n
\n\n \n Note: If this machine does not have internet connection,\n Copy paste the following URL in a browser where you access\n SUBNET and follow the instructions to complete the\n registration\n \n\n \n \n {\n setLicenseKey(e.target.value);\n }}\n />\n \n \n \n \n \n \n \n \n
\n )}\n \n
\n );\n};\n\nexport default OfflineRegistration;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Box } from \"@mui/material\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport LockOutlinedIcon from \"@mui/icons-material/LockOutlined\";\nimport { setSubnetOTP } from \"./registerSlice\";\nimport { Button } from \"mds\";\nimport RegisterHelpBox from \"./RegisterHelpBox\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport { useSelector } from \"react-redux\";\nimport { subnetLoginWithMFA } from \"./registerThunks\";\n\nconst SubnetMFAToken = () => {\n const dispatch = useAppDispatch();\n\n const subnetMFAToken = useSelector(\n (state: AppState) => state.register.subnetMFAToken\n );\n const subnetOTP = useSelector((state: AppState) => state.register.subnetOTP);\n const loading = useSelector((state: AppState) => state.register.loading);\n\n return (\n \n \n \n Two-Factor Authentication\n \n\n \n Please enter the 6-digit verification code that was sent to your email\n address. This code will be valid for 5 minutes.\n \n\n \n }\n id=\"subnet-otp\"\n name=\"subnet-otp\"\n onChange={(event: React.ChangeEvent) =>\n dispatch(setSubnetOTP(event.target.value))\n }\n placeholder=\"\"\n label=\"\"\n value={subnetOTP}\n />\n \n \n dispatch(subnetLoginWithMFA())}\n disabled={\n loading ||\n subnetOTP.trim().length === 0 ||\n subnetMFAToken.trim().length === 0\n }\n variant=\"callAction\"\n label={\"Verify\"}\n />\n \n \n\n \n \n );\n};\nexport default SubnetMFAToken;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { Box } from \"@mui/material\";\nimport { FormTitle } from \"./utils\";\nimport SelectWrapper from \"../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { setLoading, setSelectedSubnetOrganization } from \"./registerSlice\";\nimport { Button } from \"mds\";\nimport RegisterHelpBox from \"./RegisterHelpBox\";\nimport { useSelector } from \"react-redux\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport { callRegister } from \"./registerThunks\";\n\nconst ClusterRegistrationForm = () => {\n const dispatch = useAppDispatch();\n\n const subnetAccessToken = useSelector(\n (state: AppState) => state.register.subnetAccessToken\n );\n const selectedSubnetOrganization = useSelector(\n (state: AppState) => state.register.selectedSubnetOrganization\n );\n const subnetOrganizations = useSelector(\n (state: AppState) => state.register.subnetOrganizations\n );\n const loading = useSelector((state: AppState) => state.register.loading);\n\n return (\n \n \n \n \n \n \n \n dispatch(setSelectedSubnetOrganization(e.target.value as string))\n }\n label=\"Select an organization\"\n value={selectedSubnetOrganization}\n options={subnetOrganizations.map((organization) => ({\n label: organization.company,\n value: organization.accountId.toString(),\n }))}\n />\n \n () => {\n if (loading) {\n return;\n }\n dispatch(setLoading(true));\n if (subnetAccessToken && selectedSubnetOrganization) {\n dispatch(\n callRegister({\n token: subnetAccessToken,\n account_id: selectedSubnetOrganization,\n })\n );\n }\n }}\n disabled={loading || subnetAccessToken.trim().length === 0}\n variant=\"callAction\"\n label={\"Register\"}\n />\n \n \n \n \n \n );\n};\n\nexport default ClusterRegistrationForm;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\nimport { Box } from \"@mui/material\";\nimport { FormTitle } from \"./utils\";\nimport { Button, OnlineRegistrationIcon, UsersIcon } from \"mds\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport VisibilityOffIcon from \"@mui/icons-material/VisibilityOff\";\nimport RemoveRedEyeIcon from \"@mui/icons-material/RemoveRedEye\";\nimport RegisterHelpBox from \"./RegisterHelpBox\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { spacingUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { useSelector } from \"react-redux\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport {\n setShowPassword,\n setSubnetEmail,\n setSubnetPassword,\n} from \"./registerSlice\";\nimport { subnetLogin } from \"./registerThunks\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n sizedLabel: {\n minWidth: \"75px\",\n },\n ...spacingUtils,\n })\n);\n\nconst OnlineRegistration = () => {\n const classes = useStyles();\n const dispatch = useAppDispatch();\n\n const subnetPassword = useSelector(\n (state: AppState) => state.register.subnetPassword\n );\n const subnetEmail = useSelector(\n (state: AppState) => state.register.subnetEmail\n );\n const showPassword = useSelector(\n (state: AppState) => state.register.showPassword\n );\n const loading = useSelector((state: AppState) => state.register.loading);\n\n return (\n \n \n }\n title={`Online activation of MinIO Subscription Network License`}\n />\n \n \n \n \n Use your MinIO Subscription Network login credentials to register\n this cluster.\n \n \n ) =>\n dispatch(setSubnetEmail(event.target.value))\n }\n label=\"Email\"\n value={subnetEmail}\n overlayIcon={}\n />\n ) =>\n dispatch(setSubnetPassword(event.target.value))\n }\n label=\"Password\"\n type={showPassword ? \"text\" : \"password\"}\n value={subnetPassword}\n overlayIcon={\n showPassword ? : \n }\n overlayAction={() => dispatch(setShowPassword(!showPassword))}\n />\n\n \n {\n e.preventDefault();\n window.open(`https://min.io/signup?ref=con`, \"_blank\");\n }}\n label={\"Sign up\"}\n />\n dispatch(subnetLogin())}\n label={\"Register\"}\n />\n \n \n \n \n \n \n );\n};\n\nexport default OnlineRegistration;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { spacingUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Box } from \"@mui/material\";\nimport PageLayout from \"../Common/Layout/PageLayout\";\nimport api from \"../../../common/api\";\n\nimport { SubnetRegTokenResponse } from \"../License/types\";\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport { useSelector } from \"react-redux\";\nimport { setErrorSnackMessage } from \"../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\nimport { TabPanel } from \"../../shared/tabs\";\nimport { ClusterRegistered, ProxyConfiguration } from \"./utils\";\nimport ApiKeyRegister from \"./ApiKeyRegister\";\nimport { fetchLicenseInfo } from \"./registerThunks\";\nimport {\n resetRegisterForm,\n setCurTab,\n setLoading,\n setSubnetRegToken,\n} from \"./registerSlice\";\nimport OfflineRegistration from \"./OfflineRegistration\";\nimport SubnetMFAToken from \"./SubnetMFAToken\";\nimport ClusterRegistrationForm from \"./ClusterRegistrationForm\";\nimport OnlineRegistration from \"./OnlineRegistration\";\nimport PageHeaderWrapper from \"../Common/PageHeaderWrapper/PageHeaderWrapper\";\n\ninterface IRegister {\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n sizedLabel: {\n minWidth: \"75px\",\n },\n ...spacingUtils,\n });\n\nconst Register = ({ classes }: IRegister) => {\n const dispatch = useAppDispatch();\n\n const subnetMFAToken = useSelector(\n (state: AppState) => state.register.subnetMFAToken\n );\n const subnetAccessToken = useSelector(\n (state: AppState) => state.register.subnetAccessToken\n );\n\n const subnetRegToken = useSelector(\n (state: AppState) => state.register.subnetRegToken\n );\n const subnetOrganizations = useSelector(\n (state: AppState) => state.register.subnetOrganizations\n );\n\n const loading = useSelector((state: AppState) => state.register.loading);\n const loadingLicenseInfo = useSelector(\n (state: AppState) => state.register.loadingLicenseInfo\n );\n const clusterRegistered = useSelector(\n (state: AppState) => state.register.clusterRegistered\n );\n const licenseInfo = useSelector(\n (state: AppState) => state.register.licenseInfo\n );\n const curTab = useSelector((state: AppState) => state.register.curTab);\n\n const [initialLicenseLoading, setInitialLicenseLoading] =\n useState(true);\n\n useEffect(() => {\n // when unmounted, reset\n return () => {\n dispatch(resetRegisterForm());\n };\n }, [dispatch]);\n\n const fetchSubnetRegToken = () => {\n if (loading || subnetRegToken) {\n return;\n }\n dispatch(setLoading(true));\n api\n .invoke(\"GET\", \"/api/v1/subnet/registration-token\")\n .then((resp: SubnetRegTokenResponse) => {\n dispatch(setLoading(false));\n if (resp && resp.regToken) {\n dispatch(setSubnetRegToken(resp.regToken));\n }\n })\n .catch((err: ErrorResponseHandler) => {\n console.error(err);\n dispatch(setErrorSnackMessage(err));\n dispatch(setLoading(false));\n });\n };\n\n useEffect(() => {\n if (initialLicenseLoading) {\n dispatch(fetchLicenseInfo());\n setInitialLicenseLoading(false);\n }\n }, [initialLicenseLoading, setInitialLicenseLoading, dispatch]);\n\n let clusterRegistrationForm: JSX.Element = ;\n\n if (subnetAccessToken && subnetOrganizations.length > 0) {\n clusterRegistrationForm = ;\n } else if (subnetMFAToken) {\n clusterRegistrationForm = ;\n } else {\n clusterRegistrationForm = ;\n }\n\n const apiKeyRegistration = (\n \n \n {clusterRegistered && licenseInfo ? (\n \n ) : (\n \n )}\n \n \n \n );\n\n const offlineRegistration = ;\n\n const regUi = (\n \n \n {clusterRegistered && licenseInfo ? (\n \n ) : (\n clusterRegistrationForm\n )}\n \n\n {!clusterRegistered && }\n \n );\n\n const loadingUi =
Loading..
;\n const uiToShow = loadingLicenseInfo ? loadingUi : regUi;\n\n return (\n \n }\n />\n\n \n , newValue: number) => {\n dispatch(setCurTab(newValue));\n }}\n indicatorColor=\"primary\"\n textColor=\"primary\"\n aria-label=\"cluster-tabs\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n \n \n fetchSubnetRegToken()}\n />\n \n\n \n {uiToShow}\n \n \n {apiKeyRegistration}\n \n \n {offlineRegistration}\n \n \n \n );\n};\n\nexport default withStyles(styles)(Register);\n","import React from \"react\";\nimport { Box } from \"@mui/material\";\nimport { VerifiedIcon } from \"mds\";\n\nconst RegistrationStatusBanner = ({ email = \"\" }: { email?: string }) => {\n return (\n \n \n Register status:\n \n \n \n Registered\n \n \n \n\n \n Registered to:\n {email}\n \n \n );\n};\nexport default RegistrationStatusBanner;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\n\ninterface TabPanelProps {\n children?: React.ReactNode;\n index: any;\n value: any;\n}\n\nexport const TabPanel = (props: TabPanelProps) => {\n const { children, value, index, ...other } = props;\n\n return (\n
\n ) : null\n }\n />\n
\n {loading ? (\n \n \n \n ) : (\n \n {editMode ? (\n \n \n }\n >\n {Object.entries(formFields).map(([key, value]) =>\n renderFormField(key, value)\n )}\n \n {editMode && (\n setResetOpen(true)}\n label={\"Reset Configuration\"}\n />\n )}\n {editMode && (\n \n )}\n {editMode && (\n \n )}\n \n \n \n ) : (\n \n \n \n {hasConfiguration && (\n \n {Object.entries(formFields).map(([key, value]) => (\n \n ))}\n \n )}\n \n \n )}\n \n )}\n \n \n {hasConfiguration && (\n \n \n \n )}\n \n \n \n );\n};\n\nexport default IDPLDAPConfigurationDetails;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport LoginIcon from \"@mui/icons-material/Login\";\nimport { LockIcon } from \"mds\";\n\nexport const ldapHelpBoxContents = [\n {\n text: \"MinIO supports using an Active Directory or LDAP (AD/LDAP) service for external management of user identities. Configuring an external IDentity Provider (IDP) enables Single-Sign On (SSO) workflows, where applications authenticate against the external IDP before accessing MinIO.\",\n icon: ,\n iconDescription: \"Create Configurations\",\n },\n {\n text: \"MinIO queries the configured Active Directory / LDAP server to verify the credentials specified by the application and optionally return a list of groups in which the user has membership. MinIO supports two modes (Lookup-Bind Mode and Username-Bind Mode) for performing these queries\",\n icon: null,\n iconDescription: \"\",\n },\n {\n text: \"MinIO recommends using Lookup-Bind mode as the preferred method for verifying AD/LDAP credentials. Username-Bind mode is a legacy method retained for backwards compatibility only.\",\n icon: null,\n iconDescription: \"\",\n },\n];\n\nexport const openIDHelpBoxContents = [\n {\n text: \"MinIO supports using an OpenID Connect (OIDC) compatible IDentity Provider (IDP) such as Okta, KeyCloak, Dex, Google, or Facebook for external management of user identities.\",\n icon: ,\n iconDescription: \"Create Configurations\",\n },\n {\n text: \"Configuring an external IDP enables Single-Sign On workflows, where applications authenticate against the external IDP before accessing MinIO.\",\n icon: null,\n iconDescription: \"\",\n },\n];\n\nexport const openIDFormFields = {\n config_url: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Config URL is required\" : \"\";\n },\n label: \"Config URL\",\n tooltip: \"Config URL for identity provider configuration\",\n placeholder:\n \"https://identity-provider-url/.well-known/openid-configuration\",\n type: \"text\",\n },\n client_id: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Client ID is required\" : \"\";\n },\n label: \"Client ID\",\n tooltip: \"Identity provider Client ID\",\n placeholder: \"Enter Client ID\",\n type: \"text\",\n },\n client_secret: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Client Secret is required\" : \"\";\n },\n label: \"Client Secret\",\n tooltip: \"Identity provider Client Secret\",\n placeholder: \"Enter Client Secret\",\n type: \"password\",\n },\n claim_name: {\n required: false,\n label: \"Claim Name\",\n tooltip: \"Claim from which MinIO will read the policy or role to use\",\n placeholder: \"Enter Claim Name\",\n type: \"text\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n display_name: {\n required: false,\n label: \"Display Name\",\n tooltip: \"\",\n placeholder: \"Enter Display Name\",\n type: \"text\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n claim_prefix: {\n required: false,\n label: \"Claim Prefix\",\n tooltip: \"\",\n placeholder: \"Enter Claim Prefix\",\n type: \"text\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n scopes: {\n required: false,\n label: \"Scopes\",\n tooltip: \"\",\n placeholder: \"openid,profile,email\",\n type: \"text\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n redirect_uri: {\n required: false,\n label: \"Redirect URI\",\n tooltip: \"\",\n placeholder: \"https://console-endpoint-url/oauth_callback\",\n type: \"text\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n role_policy: {\n required: false,\n label: \"Role Policy\",\n tooltip: \"\",\n placeholder: \"readonly\",\n type: \"text\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n claim_userinfo: {\n required: false,\n label: \"Claim User Info\",\n tooltip: \"\",\n placeholder: \"Claim User Info\",\n type: \"toggle\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n redirect_uri_dynamic: {\n required: false,\n label: \"Redirect URI Dynamic\",\n tooltip: \"\",\n placeholder: \"Redirect URI Dynamic\",\n type: \"toggle\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n};\n\nexport const ldapFormFields = {\n server_insecure: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Server Address is required\" : \"\";\n },\n label: \"Server Insecure\",\n tooltip: \"disable SSL certificate verification \",\n placeholder: \"myldapserver.com:636\",\n type: \"toggle\",\n },\n server_addr: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Server Address is required\" : \"\";\n },\n label: \"Server Address\",\n tooltip: 'AD/LDAP server address e.g. \"myldapserver.com:636\"',\n placeholder: \"myldapserver.com:636\",\n type: \"text\",\n },\n lookup_bind_dn: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Lookup Bind DN is required\" : \"\";\n },\n label: \"Lookup Bind DN\",\n tooltip:\n \"DN for LDAP read-only service account used to perform DN and group lookups\",\n placeholder: \"cn=admin,dc=min,dc=io\",\n type: \"text\",\n },\n lookup_bind_password: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Lookup Bind Password is required\" : \"\";\n },\n label: \"Lookup Bind Password\",\n tooltip:\n \"Password for LDAP read-only service account used to perform DN and group lookups\",\n placeholder: \"admin\",\n type: \"password\",\n },\n user_dn_search_base_dn: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"User DN Search Base DN is required\" : \"\";\n },\n label: \"User DN Search Base\",\n tooltip: \"\",\n placeholder: \"DC=example,DC=net\",\n type: \"text\",\n },\n user_dn_search_filter: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"User DN Search Filter is required\" : \"\";\n },\n label: \"User DN Search Filter\",\n tooltip: \"\",\n placeholder: \"(sAMAcountName=%s)\",\n type: \"text\",\n },\n group_search_base_dn: {\n required: false,\n hasError: (s: string, editMode: boolean) => \"\",\n label: \"Group Search Base DN\",\n tooltip: \"\",\n placeholder: \"ou=swengg,dc=min,dc=io\",\n type: \"text\",\n },\n group_search_filter: {\n required: false,\n hasError: (s: string, editMode: boolean) => \"\",\n label: \"Group Search Filter\",\n tooltip: \"\",\n placeholder: \"(&(objectclass=groupofnames)(member=%d))\",\n type: \"text\",\n },\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useCallback, useEffect, useState } from \"react\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { LinearProgress } from \"@mui/material\";\nimport Grid from \"@mui/material/Grid\";\nimport { policySort } from \"../../../utils/sortFunctions\";\nimport {\n actionsTray,\n searchField,\n selectorsCommon,\n tableStyles,\n} from \"../Common/FormComponents/common/styleLibrary\";\n\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport SearchBox from \"../Common/SearchBox\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport { setSelectedPolicies } from \"../Users/AddUsersSlice\";\nimport { useSelector } from \"react-redux\";\nimport { api } from \"../../../api\";\nimport {\n HttpResponse,\n ListPoliciesResponse,\n Error,\n} from \"../../../api/consoleApi\";\n\ninterface ISelectPolicyProps {\n classes: any;\n selectedPolicy?: string[];\n noTitle?: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n noFound: {\n textAlign: \"center\",\n padding: \"10px 0\",\n },\n searchBox: {\n flex: 1,\n },\n fieldLabel: {\n fontWeight: 400,\n width: 160,\n marginRight: 10,\n },\n tableBlock: {\n ...tableStyles.tableBlock,\n },\n filterBox: {\n display: \"flex\",\n marginBottom: 15,\n alignItems: \"center\",\n \"& span\": {\n fontSize: 14,\n },\n },\n ...searchField,\n ...tableStyles,\n ...actionsTray,\n ...selectorsCommon,\n });\n\nconst PolicySelectors = ({ classes, noTitle = false }: ISelectPolicyProps) => {\n const dispatch = useAppDispatch();\n // Local State\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const currentPolicies = useSelector(\n (state: AppState) => state.createUser.selectedPolicies\n );\n\n const fetchPolicies = useCallback(() => {\n isLoading(true);\n\n api.policies\n .listPolicies()\n .then((res: HttpResponse) => {\n const policies = res.data.policies ?? [];\n isLoading(false);\n setRecords(policies.sort(policySort));\n })\n .catch((err: ErrorResponseHandler) => {\n isLoading(false);\n dispatch(setModalErrorSnackMessage(err));\n });\n }, [dispatch]);\n\n //Effects\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n fetchPolicies();\n }\n }, [loading, fetchPolicies]);\n\n const selectionChanged = (e: React.ChangeEvent) => {\n const targetD = e.target;\n const value = targetD.value;\n const checked = targetD.checked;\n\n let elements: string[] = [...currentPolicies]; // We clone the checkedUsers array\n\n if (checked) {\n // If the user has checked this field we need to push this to checkedUsersList\n elements.push(value);\n } else {\n // User has unchecked this field, we need to remove it from the list\n elements = elements.filter((element) => element !== value);\n }\n // remove empty values\n elements = elements.filter((element) => element !== \"\");\n\n dispatch(setSelectedPolicies(elements));\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.name.includes(filter)\n );\n\n return (\n \n \n {loading && }\n {records.length > 0 ? (\n \n \n {!noTitle && (\n Assign Policies\n )}\n
\n {\n setFilter(value);\n }}\n value={filter}\n />\n
\n
\n \n \n
\n \n ) : (\n
No Policies Available
\n )}\n
\n \n );\n};\n\nexport default withStyles(styles)(PolicySelectors);\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment } from \"react\";\n\ninterface TabPanelProps {\n children?: React.ReactNode;\n index: any;\n value: any;\n}\n\nexport const TabPanel = (props: TabPanelProps) => {\n const { children, value, index, ...other } = props;\n\n return (\n