From 0a4f02bd834b3e768d0798f282d8c24a06b26030 Mon Sep 17 00:00:00 2001 From: Minio Trusted Date: Mon, 24 May 2021 11:53:05 -0700 Subject: [PATCH] update to v0.7.2 --- k8s/console/base/console-deployment.yaml | 2 +- k8s/operator-console/base/console-deployment.yaml | 2 +- portal-ui/build/static/js/main.e94e6cae.chunk.js | 2 +- portal-ui/build/static/js/main.e94e6cae.chunk.js.map | 2 +- .../src/screens/Console/Tenants/AddTenant/Steps/Configure.tsx | 2 +- restapi/admin_tenants_test.go | 2 +- restapi/consts.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/k8s/console/base/console-deployment.yaml b/k8s/console/base/console-deployment.yaml index ae3bfb44da..14a6119983 100644 --- a/k8s/console/base/console-deployment.yaml +++ b/k8s/console/base/console-deployment.yaml @@ -15,7 +15,7 @@ spec: serviceAccountName: console-sa containers: - name: console - image: minio/console:v0.7.1 + image: minio/console:v0.7.2 imagePullPolicy: "IfNotPresent" args: - server diff --git a/k8s/operator-console/base/console-deployment.yaml b/k8s/operator-console/base/console-deployment.yaml index b5ba8ac5b2..9cb062e465 100644 --- a/k8s/operator-console/base/console-deployment.yaml +++ b/k8s/operator-console/base/console-deployment.yaml @@ -15,7 +15,7 @@ spec: serviceAccountName: console-sa containers: - name: console - image: minio/console:v0.7.1 + image: minio/console:v0.7.2 imagePullPolicy: "IfNotPresent" env: - name: CONSOLE_OPERATOR_MODE diff --git a/portal-ui/build/static/js/main.e94e6cae.chunk.js b/portal-ui/build/static/js/main.e94e6cae.chunk.js index 04a8958622..d8df524e37 100644 --- a/portal-ui/build/static/js/main.e94e6cae.chunk.js +++ b/portal-ui/build/static/js/main.e94e6cae.chunk.js @@ -1,2 +1,2 @@ -(this["webpackJsonpportal-ui"]=this["webpackJsonpportal-ui"]||[]).push([[0],{550:function(e,t,a){},908:function(e,t,a){},909:function(e,t,a){"use strict";a.r(t);var n=a(0),c=a(1),i=a.n(c),r=a(27),o=a.n(r),s=a(9),l=a(55),d=a(71),b=Object(d.a)(),u=a(3),j=a(2),m=a(210),h=a.n(m),p=a(394),O=a.n(p),g=a(961),f=a(1008),x=a(960),v=a(109),y=a(962),S=a(963),C=a(453),k=a(1010),w=a(951),N=a(15),T="USER_LOGGED",E="OPERATOR_MODE",A="MENU_OPEN",_="SERVER_NEEDS_RESTART",I="SERVER_IS_LOADING",F="SET_LOADING_PROGRESS",M="SET_SNACK_BAR_MESSAGE",L="SET_SERVER_DIAG_STAT",D="SET_ERROR_SNACK_MESSAGE",B="SET_SNACK_MODAL_MESSAGE",R="SET_MODAL_ERROR_MESSAGE";function P(e){return{type:T,logged:e}}function z(e){return{type:A,open:e}}function K(e){return{type:_,needsRestart:e}}var W,U=function(e){return{type:M,message:e}},V=function(e){return{type:D,message:e}},G=function(e){return{type:B,message:e}},q=function(e){return{type:R,message:e}},H=a(389),Y=a(390),Q=a(12),Z=a.n(Q),J=a(211),$=a.n(J),X=1073741824,ee=2147483648,te=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],ae=["Ki","Mi","Gi","Ti","Pi","Ei"],ne=["B"].concat(ae),ce=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=0,n=parseInt(e,10)||0;n>=1024&&++a;)n/=1024;var c=["B"].concat(ae);return n.toFixed(n<10&&a>0?1:0)+" "+(t?c[a]:te[a])},ie=function(){var e;$.a.removeItem("token"),e="token",document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"},re=function(e){var t=e.getHours()<10?"0".concat(e.getHours()):"".concat(e.getHours()),a=e.getMinutes()<10?"0".concat(e.getMinutes()):"".concat(e.getMinutes()),n=e.getSeconds()<10?"0".concat(e.getSeconds()):"".concat(e.getSeconds());return"".concat(t,":").concat(a,":").concat(n,":").concat(e.getMilliseconds())},oe=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=parseFloat(e),c=a?ne:te,i=c.findIndex((function(e){return e===t}));if(-1===i)return"0";var r=Math.pow(1024,i),o=n*r;return o.toString(10)},se=function(e,t,a,n){var c=parseInt(e,10);return le(t,c,274877906944,a,n)},le=function(e,t,a,n){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(isNaN(e)||isNaN(t)||isNaN(a)||isNaN(n))return{error:"Some provided data is invalid, please try again.",nodes:0,persistentVolumes:0,disks:0,volumePerDisk:0};var i=0,r=0,o=0;if(0===c&&(o=(r=t/(i=Math.floor(Math.min(t/Math.max(4,e),a))))/e),c&&(r=(o=c)*e,i=Math.floor(t/r)),o%1>0){r=(o=Math.ceil(o))*e;var s=(i=Math.floor(t/r))*o*e;if(s>n)return{error:"We were not able to allocate this server.",nodes:0,persistentVolumes:0,disks:0,volumePerDisk:0}}return i1&&void 0!==arguments[1]?arguments[1]:"s",a=parseFloat(e);switch(t){case"ns":a=Math.floor(1e-9*a);break;case"ms":a=Math.floor(.001*a)}var n=Math.floor(a/86400);a-=3600*n*24;var c=Math.floor(a/3600);a-=3600*c;var i=Math.floor(a/60);if(a-=60*i,n>365){var r=n/365;return"".concat(r," year").concat(1===Math.floor(r)?"":"s")}if(n>30){var o=Math.floor(n/30),s=n-30*o;return"".concat(o," month").concat(1===Math.floor(o)?"":"s"," ").concat(s>0?"".concat(s," day").concat(s>1?"s":""):"")}if(n>=7&&n<=30){var l=Math.floor(n/7);return"".concat(Math.floor(l)," week").concat(1===l?"":"s")}return n>=1&&n<=6?"".concat(n," day").concat(n>1?"s":""):"".concat(c>=1?"".concat(c," hour").concat(c>1?"s":""):""," ").concat(i>=1&&0===c?"".concat(i," minute").concat(i>1?"s":""):""," ").concat(a>=1&&0===i&&0===c?"".concat(a," second").concat(a>1?"s":""):"")},ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=new Date(1e3*parseInt(e));return t?"".concat(a.getFullYear(),"-").concat(String(a.getMonth()+1).padStart(2,"0"),"-").concat(String(a.getDay()).padStart(2,"0")," ").concat(a.getHours(),":").concat(String(a.getMinutes()).padStart(2,"0"),":").concat(String(a.getSeconds()).padStart(2,"0")):"".concat(a.getHours(),":").concat(String(a.getMinutes()).padStart(2,"0"))},je=function(e){var t=1e-9*e,a=Math.round(1e4*(t+Number.EPSILON))/1e4;return"".concat(a," s")},me=function(e){var t=(100*e.split("").reduce((function(e,t){return e+t.charCodeAt(0)+((e<<5)-e)}),0)&16777215).toString(16).toUpperCase();return"#".concat(t.padStart(6,"0"))},he=new(function(){function e(){Object(H.a)(this,e)}return Object(Y.a)(e,[{key:"invoke",value:function(e,t,a){var n=this;return h()(e,t).send(a).then((function(e){return e.body})).catch((function(e){return 401===e.status?(ie(),void(window.location.href="/login")):n.onError(e)}))}},{key:"onError",value:function(e){if(e.status){var t=Z()(e.response,"body.message",e.status.toString()),a=t.charAt(0).toUpperCase()+t.slice(1);return Promise.reject(a)}ie(),window.location.href="/login"}}]),e}());!function(e){e.unknown="unknown",e.form="form",e.redirect="redirect",e.serviceAccount="service-account"}(W||(W={}));var pe=Object(w.a)((function(e){return Object(k.a)({disabled:{"&.MuiInput-underline::before":{borderColor:"#eaeaea",borderBottomStyle:"solid"}}})}));function Oe(e){var t=pe();return Object(n.jsx)(f.a,Object(j.a)({InputProps:{classes:t}},e))}var ge=Object(s.b)((function(e){return{loggedIn:e.loggedIn}}),{userLoggedIn:P})(Object(N.a)((function(e){return Object(k.a)({"@global":{body:{backgroundColor:"#FAFAFA"}},paper:{borderRadius:8,display:"flex",flexDirection:"column",alignItems:"center",width:800,height:424,margin:"auto",position:"absolute",top:"50%",left:"50%",marginLeft:-400,marginTop:-212,"&.MuiPaper-root":{borderRadius:8}},avatar:{margin:e.spacing(1),backgroundColor:e.palette.secondary.main},form:{width:"100%"},submit:{margin:"30px 0px 16px",height:40,boxShadow:"none",padding:"16px 30px"},errorBlock:{backgroundColor:"#C72C48",width:800,height:64,display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:"50%",top:"50%",marginLeft:-400,marginTop:-290,color:"#fff",fontWeight:700,fontSize:14,borderRadius:8,padding:10,boxSizing:"border-box"},mainContainer:{position:"relative",height:424},theOcean:{borderTopLeftRadius:8,borderBottomLeftRadius:8,background:"transparent linear-gradient(to bottom, #073052 0%,#05122b 100%); 0% 0% no-repeat padding-box;"},oceanBg:{backgroundImage:"url(/images/BG_Illustration.svg)",backgroundRepeat:"no-repeat",backgroundPosition:"bottom left",height:"100%",width:324},theLogin:{padding:"40px 45px 20px 45px"},loadingLoginStrategy:{textAlign:"center"},headerTitle:{marginBottom:10},submitContainer:{textAlign:"right"},disclaimer:{fontSize:12,marginTop:30},jwtInput:{marginTop:45},linearPredef:{height:10},errorIconStyle:{marginRight:3}})}))((function(e){var t=e.classes,a=e.userLoggedIn,r=Object(c.useState)(""),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(""),j=Object(u.a)(d,2),m=j[0],p=j[1],f=Object(c.useState)(""),k=Object(u.a)(f,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)({loginStrategy:W.unknown,redirect:""}),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(!1),B=Object(u.a)(D,2),R=B[0],P=B[1],z={form:"/api/v1/login","service-account":"/api/v1/login/operator"},K={form:{accessKey:s,secretKey:w},"service-account":{jwt:m}},U=function(e){e.preventDefault(),P(!0),h.a.post(z[M.loginStrategy]||"/api/v1/login").send(K[M.loginStrategy]).then((function(e){var t=e.body;if(t.error)throw P(!1),t.error})).then((function(){a(!0),M.loginStrategy===W.form&&localStorage.setItem("userLoggedIn",btoa(s)),b.push("/")})).catch((function(e){P(!1),_(e.message)}))};Object(c.useEffect)((function(){he.invoke("GET","/api/v1/login").then((function(e){L(e),_(""),"redirect"===e.loginStrategy&&e.redirect})).catch((function(e){_(e)}))}),[]);var V=null;switch(M.loginStrategy){case W.form:V=Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(v.a,{component:"h1",variant:"h6",className:t.headerTitle,children:"Console Login"}),Object(n.jsxs)("form",{className:t.form,noValidate:!0,onSubmit:U,children:[Object(n.jsxs)(x.a,{container:!0,spacing:2,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Oe,{fullWidth:!0,id:"accessKey",value:s,onChange:function(e){return l(e.target.value)},label:"Enter Access Key",name:"accessKey",autoComplete:"username",disabled:R})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Oe,{fullWidth:!0,value:w,onChange:function(e){return N(e.target.value)},name:"secretKey",label:"Enter Secret Key",type:"password",id:"secretKey",autoComplete:"current-password",disabled:R})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.submitContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",className:t.submit,disabled:""===w||""===s||R,children:"Login"})}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.linearPredef,children:R&&Object(n.jsx)(y.a,{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.disclaimer,children:[Object(n.jsx)("strong",{children:"Don't have an access key?"}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),"Contact your administrator to have one made"]})]})]});break;case W.redirect:V=Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(v.a,{component:"h1",variant:"h6",className:t.headerTitle,children:"Welcome"}),Object(n.jsx)(g.a,{component:"a",href:M.redirect.replace("%5BHOSTNAME%5D",window.location.hostname),type:"submit",variant:"contained",color:"primary",className:t.submit,children:"Login with SSO"})]});break;case W.serviceAccount:V=Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(v.a,{component:"h1",variant:"h6",className:t.headerTitle,children:"Operator Login"}),Object(n.jsxs)("form",{className:t.form,noValidate:!0,onSubmit:U,children:[Object(n.jsx)(x.a,{container:!0,spacing:2,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:t.jwtInput,children:Object(n.jsx)(Oe,{required:!0,fullWidth:!0,id:"jwt",value:m,onChange:function(e){return p(e.target.value)},label:"JWT",name:"jwt",autoComplete:"off",disabled:R})})}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.submitContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",className:t.submit,disabled:""===m||R,children:"Login"})}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.linearPredef,children:R&&Object(n.jsx)(y.a,{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.disclaimer,children:[Object(n.jsx)("strong",{children:"Don't have an access key?"}),Object(n.jsx)("br",{}),"Contact your administrator to have one made"]})]})]});break;default:V=Object(n.jsx)(S.a,{className:t.loadingLoginStrategy})}return Object(n.jsxs)(i.a.Fragment,{children:[""!==A&&Object(n.jsxs)("div",{className:t.errorBlock,children:[Object(n.jsx)(O.a,{fontSize:"small",className:t.errorIconStyle})," ",A]}),Object(n.jsx)(C.a,{className:t.paper,children:Object(n.jsxs)(x.a,{container:!0,className:t.mainContainer,children:[Object(n.jsx)(x.a,{item:!0,xs:7,className:t.theOcean,children:Object(n.jsx)("div",{className:t.oceanBg})}),Object(n.jsx)(x.a,{item:!0,xs:5,className:t.theLogin,children:V})]})})]})}))),fe=a(38),xe=a(5),ve=a(966),ye=a(1011),Se=a(965),Ce=a(1004),ke={inputLabel:{fontWeight:600,marginRight:10,fontSize:15,color:"#000",textAlign:"left",overflow:"hidden","& span":{display:"flex",alignItems:"center"},display:"flex"},fieldLabelError:{paddingBottom:22},fieldContainer:{marginBottom:20,position:"relative",maxWidth:840},tooltipContainer:{marginLeft:5,display:"flex",alignItems:"center"},switchContainer:{display:"flex",maxWidth:840}},we={formScrollable:{maxHeight:"calc(100vh - 300px)",overflowY:"auto",marginBottom:25},formSlider:{marginLeft:0},clearButton:{fontFamily:"Lato, sans-serif",border:"0",backgroundColor:"transparent",color:"#393939",fontWeight:600,fontSize:14,marginRight:10,outline:"0",padding:"16px 25px 16px 25px",cursor:"pointer"},floatingEnabled:{position:"absolute",right:58,zIndex:1e3,marginTop:-38},configureString:{border:"#EAEAEA 1px solid",borderRadius:4,padding:"24px 50px",overflowY:"auto",height:170,maxWidth:840}},Ne={tooltip:{fontSize:16}},Te={width:14,height:14,borderRadius:2},Ee={unCheckedIcon:Object(j.a)(Object(j.a)({},Te),{},{border:"1px solid #c3c3c3"}),checkedIcon:Object(j.a)(Object(j.a)({},Te),{},{border:"1px solid #081C42",backgroundColor:"#081C42"})},Ae={width:12,height:12,borderRadius:"100%","input:disabled ~ &":{border:"1px solid #9C9C9C"}},_e={radioUnselectedIcon:Object(j.a)(Object(j.a)({},Ae),{},{border:"1px solid #000"}),radioSelectedIcon:Object(j.a)(Object(j.a)({},Ae),{},{border:"1px solid #000",backgroundColor:"#000"})},Ie={label:{color:"#393939",fontWeight:600,fontSize:13,alignSelf:"center",whiteSpace:"nowrap","&:not(:first-of-type)":{marginLeft:10}},timeContainers:{height:40},actionsTray:{display:"flex",justifyContent:"space-between","& button":{flexGrow:0,marginLeft:15}}},Fe={searchField:{flexGrow:1,height:40,background:"#FFFFFF",borderRadius:5,border:"#EAEDEE 1px solid",display:"flex",justifyContent:"center",padding:"0 16px","& input":{fontSize:12,fontWeight:700,color:"#000","&::placeholder":{color:"#393939",opacity:1}},"&:hover":{borderColor:"#000"}}},Me={prefinedContainer:{maxWidth:840,width:"100%"},predefinedTitle:{fontSize:16,fontWeight:600,color:"#000",margin:"10px 0"},predefinedList:{backgroundColor:"#eaeaea",padding:"12px 10px",color:"#393939",fontSize:12,fontWeight:600,minHeight:41},innerContent:{width:"100%",overflowX:"auto",whiteSpace:"nowrap",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},innerContentMultiline:{width:"100%",maxHeight:100,overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},Le={obTitleSection:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:20},sectionTitle:{fontSize:22,color:"#000",fontWeight:600,height:40,lineHeight:"40px"},breadcrumbs:{fontSize:10,color:"#000",marginTop:2,"& a":{textDecoration:"none",color:"#000","&:hover":{textDecoration:"underline"}}}},De={multiSelectTable:{height:200}},Be={customTitle:{fontSize:18,color:"#000",fontWeight:600,padding:"12px 0",borderBottom:"#eaedee 1px solid",marginBottom:10,margin:"15px 38px 27px"},settingsFormContainer:{height:"calc(100vh - 421px)",padding:"15px 38px",overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},settingsButtonContainer:{borderTop:"1px solid #EAEAEA",padding:"15px 38px",textAlign:"right"},innerSettingsButtonContainer:{maxWidth:840,textAlign:"right"},settingsOptionsContainer:{height:"calc(100vh - 244px)",backgroundColor:"#fff",border:"#EAEDEE 1px solid",borderRadius:3,marginTop:15},backButton:{cursor:"pointer",fontSize:10,fontWeight:600,color:"#000",backgroundColor:"transparent",border:0,padding:0,display:"flex",alignItems:"center","&:active, &:focus":{outline:0},"& svg":{width:10,marginRight:4}},backContainer:{margin:"20px 38px 0"}},Re={iconContainer:{display:"flex",flexDirection:"row",maxWidth:455,justifyContent:"space-between",flexWrap:"wrap",width:"100%"},nonIconContainer:{marginBottom:16,width:455,marginTop:15,"& button":{marginRight:16}},pickTitle:{fontWeight:600,color:"#393939",fontSize:14,marginBottom:16},centerElements:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},logoButton:{height:"80px"},lambdaNotif:{backgroundColor:"#fff",border:"#393939 1px solid",borderRadius:5,width:101,height:91,display:"flex",alignItems:"center",justifyContent:"center",marginBottom:16,cursor:"pointer","& img":{maxWidth:71,maxHeight:71}}},Pe={logsSubContainer:{height:"calc(100vh - 230px)",padding:"15px 0"}},ze={singleValueContainer:{position:"relative",flexGrow:1,width:"100%",height:"100%",border:"#EAEAEA 1px solid",borderRadius:5,backgroundColor:"#fff"},titleContainer:{color:"#393939",fontWeight:600,height:15,textAlign:"center",fontSize:10},contentContainer:{flexGrow:2,justifyContent:"center",alignItems:"center",display:"flex",position:"absolute",width:"100%",height:"calc(100% - 15px)"},contentContainerWithLabel:{height:"calc(100% - 25px)"},legendBlock:{position:"absolute",bottom:5,display:"flex",width:"100%",height:15,flexWrap:"wrap",overflowY:"auto"},singleLegendContainer:{display:"flex",alignItems:"center",padding:"0 10px",maxWidth:"100%"},colorContainer:{width:8,height:8,minWidth:8,borderRadius:"100%",marginRight:5},legendLabel:{fontSize:"80%",color:"#393939",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},Ke={customTooltip:{backgroundColor:"rgba(255, 255, 255, 0.90)",border:"#eaeaea 1px solid",borderRadius:3,padding:"5px 10px",maxHeight:300,overflowY:"auto"},labelContainer:{display:"flex",alignItems:"center"},labelColor:{width:6,height:6,display:"block",borderRadius:"100%",marginRight:5},itemValue:{fontSize:"75%",color:"#393939"},valueContainer:{fontWeight:600},timeStampTitle:{fontSize:"80%",color:"#9c9c9c",textAlign:"center",marginBottom:6}},We={snackBar:{backgroundColor:"#081F44",fontWeight:400,fontFamily:"Lato, sans-serif",fontSize:14,padding:"0px 20px 0px 20px;",boxShadow:"none","&.MuiPaper-root.MuiSnackbarContent-root":{borderRadius:"0px 0px 5px 5px"},"& div":{textAlign:"center",padding:"6px 30px",width:"100%",overflowX:"hidden",textOverflow:"ellipsis"}},errorSnackBar:{backgroundColor:"#C72C48",color:"#fff"},snackBarExternal:{top:"-17px",position:"absolute",minWidth:"348px",whiteSpace:"nowrap",height:"33px"},snackDiv:{top:"17px",left:"50%",position:"absolute"},snackBarModal:{top:0,position:"absolute",minWidth:"348px",whiteSpace:"nowrap",height:"33px",maxWidth:"calc(100% - 140px)"}},Ue={multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"},sizeFactorContainer:{marginLeft:8,alignSelf:"flex-start"},headerElement:{position:"sticky",top:0,paddingTop:5,marginBottom:10,zIndex:500,backgroundColor:"#fff"},tableTitle:{fontWeight:700,width:"30%"},poolError:{color:"#dc1f2e",fontSize:"0.75rem",paddingLeft:120},error:{color:"#dc1f2e",fontSize:"0.75rem"},h3Section:{marginTop:0},descriptionText:{fontSize:13,color:"#777777"},container:{padding:"77px 0 0 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}},Ve={anchorButton:{textDecoration:"underline",textTransform:"unset",fontWeight:"normal",padding:0,lineHeight:"unset",height:"unset",width:"unset",textAlign:"left",border:0,minWidth:"unset"}},Ge={hrClass:{borderTop:0,borderLeft:0,borderRight:0,borderColor:"#999999",backgroundColor:"transparent"}},qe=a(996),He=a(964);function Ye(){return Object(n.jsxs)(v.a,{variant:"body2",color:"textSecondary",align:"center",children:["Copyright \xa9 ",Object(n.jsx)(He.a,{color:"inherit",href:"https://material-ui.com/",children:"MinIO"})," ",(new Date).getFullYear(),"."]})}var Qe=Object(w.a)((function(e){return{"@global":{body:{backgroundColor:e.palette.common.white}},paper:{marginTop:e.spacing(8),display:"flex",flexDirection:"column",alignItems:"center"}}})),Ze=function(){var e=Qe();return Object(n.jsxs)(Se.a,{component:"main",children:[Object(n.jsx)(ve.a,{}),Object(n.jsx)("div",{className:e.paper,children:Object(n.jsx)(v.a,{variant:"h1",component:"h1",children:"404 Not Found"})}),Object(n.jsx)(qe.a,{mt:5,children:Object(n.jsx)(Ye,{})})]})},Je=a(18),$e=a(975),Xe=a(32),et=a.n(Xe),tt=a(402),at=a.n(tt),nt=a(76),ct=a.n(nt),it=a(452),rt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",children:[Object(n.jsx)("title",{children:"ic_h_copy-new_sl"}),Object(n.jsx)("g",{id:"Layer_2","data-name":"Layer 2",children:Object(n.jsx)("g",{id:"Layer_1-2","data-name":"Layer 1",children:Object(n.jsx)("path",{className:"cls-1",d:"M0,0V16H16V0ZM11.886,9.048H9.048v2.838h-2.1V9.048H4.114v-2.1H6.952V4.114h2.1V6.952h2.838Z"})})})]})})},ot=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",children:Object(n.jsxs)("g",{id:"Group_55","data-name":"Group 55",transform:"translate(1002 -2555)",children:[Object(n.jsx)("rect",{id:"Rectangle_29",width:"2",height:"12",transform:"translate(-997 2555)",fill:"#fff"}),Object(n.jsx)("rect",{id:"Rectangle_30",width:"2",height:"12",transform:"translate(-990 2560) rotate(90)",fill:"#fff"})]})})})},st=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10.402 13",children:Object(n.jsx)("path",{d:"M6.761 1V0H3.64v1H.004v1h10.4V1zM.004 2.998l1.672 10h7.052l1.673-10zm3.412 8.243l-.552-6.478h.653l.553 6.472zm3.569 0h-.653l.551-6.472h.654z",className:"a"})})})},lt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:Object(n.jsxs)("g",{transform:"translate(249 720)",children:[Object(n.jsx)("rect",{width:"6",height:"5",transform:"translate(-244 -720) rotate(90)"}),Object(n.jsx)("rect",{width:"4",height:"4",transform:"translate(-243 -720)"}),Object(n.jsx)("rect",{width:"5",height:"4",transform:"translate(-239 -715) rotate(90)"}),Object(n.jsx)("rect",{width:"5",height:"3",transform:"translate(-244 -710) rotate(180)"})]})})})},dt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:Object(n.jsx)("path",{d:"M8.392,10H1.608L0,0H10Z"})})})},bt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6.131 10",children:Object(n.jsx)("g",{transform:"translate(193 719.787)",children:Object(n.jsxs)("g",{transform:"translate(-193 -719.787)",children:[Object(n.jsx)("path",{d:"M3,0h.131a3,3,0,0,1,3,3V5a0,0,0,0,1,0,0H0A0,0,0,0,1,0,5V3A3,3,0,0,1,3,0Z",transform:"translate(0 5)"}),Object(n.jsx)("ellipse",{cx:"2.065",cy:"2",rx:"2.065",ry:"2",transform:"translate(1 0)"})]})})})})},ut=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 9.5",children:Object(n.jsxs)("g",{transform:"translate(231 719.516)",children:[Object(n.jsx)("path",{d:"M-125.5,7.984a4.5,4.5,0,0,1,4.5-4.5,4.5,4.5,0,0,1,4.5,4.5Z",transform:"translate(-105 -720)"}),Object(n.jsx)("rect",{width:"10",height:"1",transform:"translate(-231 -711.016)"}),Object(n.jsx)("path",{d:"M-119.5.484h-3v1h1v1h1v-1h1Z",transform:"translate(-105 -720)"})]})})})},jt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 9.787",children:Object(n.jsx)("g",{transform:"translate(177 719.787)",children:Object(n.jsxs)("g",{transform:"translate(-105 -720)",children:[Object(n.jsx)("path",{d:"M-65,5a3,3,0,0,0-1.131.224A3.981,3.981,0,0,1-65,8v2h3V8A3,3,0,0,0-65,5Z"}),Object(n.jsx)("path",{d:"M-72,10h6V8a3,3,0,0,0-3-3,3,3,0,0,0-3,3Z"}),Object(n.jsx)("path",{className:"a",d:"M-65,.213a1.993,1.993,0,0,0-1.384.561A2.967,2.967,0,0,1-66,2.213a2.964,2.964,0,0,1-.384,1.439A1.989,1.989,0,0,0-65,4.213a2,2,0,0,0,2-2A2,2,0,0,0-65,.213Z"}),Object(n.jsx)("circle",{cx:"2",cy:"2",r:"2",transform:"translate(-71 0.213)"})]})})})})},mt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8.75 10",children:Object(n.jsx)("path",{d:"M-44.625,10l-4.353-2.419L-53.375,10V0h8.75Z",transform:"translate(53.375)"})})})},ht=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 9.998 10",children:Object(n.jsx)("g",{transform:"translate(140.999 720)",children:Object(n.jsxs)("g",{transform:"translate(-105 -720)",children:[Object(n.jsx)("rect",{width:"1.114",height:"1.667",transform:"translate(-27.116 8.333)"}),Object(n.jsx)("path",{d:"M-28.184,10H-29.3V8.154l2.182-3.037V3.147H-26V5.476l-2.182,3.037Z"}),Object(n.jsx)("rect",{width:"1.114",height:"2.963",transform:"translate(-31.531)"}),Object(n.jsx)("rect",{width:"1.114",height:"2.132",transform:"translate(-27.115 0)"}),Object(n.jsx)("rect",{width:"1.114",height:"5.389",transform:"translate(-29.298)"}),Object(n.jsx)("path",{d:"M-30.417,10h-1.114V5.722l-2.233-3V0h1.114V2.353l2.233,3Z"}),Object(n.jsx)("path",{d:"M-32.65,10h-1.114V6.185l-2.234-3V0h1.114V2.815l2.234,3Z"}),Object(n.jsx)("rect",{width:"1.114",height:"4.463",transform:"translate(-35.999 5.537)"})]})})})})},pt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:[Object(n.jsx)("rect",{width:"1.433",height:"1"}),Object(n.jsx)("rect",{width:"7.828",height:"1",transform:"translate(2.172)"}),Object(n.jsx)("rect",{width:"1.433",height:"1",transform:"translate(0 6)"}),Object(n.jsx)("rect",{width:"1.433",height:"1",transform:"translate(0 3)"}),Object(n.jsx)("rect",{width:"1.433",height:"1",transform:"translate(0 9)"}),Object(n.jsx)("rect",{width:"1.368",height:"0.569",transform:"translate(6.316 9)"}),Object(n.jsx)("path",{d:"M5.566,9.569v-.31l-.238-.138-.269.155-.65.375L4.034,9V9H2.172v1H5.566Z"}),Object(n.jsx)("path",{d:"M9.966,9l-.375.65-.65-.375-.269-.155-.238.138V10H10V9H9.967Z"}),Object(n.jsx)("path",{d:"M3.625,6.793l.269-.155V6.362l-.269-.155L3.266,6H2.172V7H3.266Z"}),Object(n.jsx)("path",{d:"M8.434,3.431v.31l.238.138.269-.155.649-.375L9.966,4V4H10V3H8.434Z"}),Object(n.jsx)("path",{d:"M4.034,4l.375-.65.65.375.269.155.238-.138V3H2.172V4H4.033Z"}),Object(n.jsx)("path",{d:"M9.356,5.929,10,5.558,9.316,4.373l-.644.372-.988-.571V3.431H6.316v.743l-.988.571-.644-.372L4,5.558l.644.371V7.071L4,7.442l.684,1.185.644-.372.988.571v.743H7.684V8.826l.988-.571.644.372L10,7.442l-.644-.371ZM7,7.278A.778.778,0,1,1,7.778,6.5.779.779,0,0,1,7,7.278Z"})]})})},Ot=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 9",children:Object(n.jsxs)("g",{transform:"translate(79 438.479)",children:[Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("rect",{x:"-77.9",y:"-434.5",width:"7.8",height:"1"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("rect",{x:"-77.9",y:"-434.5",transform:"matrix(0.4999 -0.8661 0.8661 0.4999 338.8698 -281.1237)",width:"7.8",height:"1"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("rect",{x:"-74.5",y:"-437.9",transform:"matrix(0.866 -0.5001 0.5001 0.866 207.1129 -95.1668)",width:"1",height:"7.8"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-71.8-430.1h-4.5l-2.2-3.9l2.2-3.9h4.5l2.2,3.9L-71.8-430.1z M-75.7-431.1h3.3l1.7-2.9l-1.7-2.9h-3.3 l-1.7,2.9L-75.7-431.1z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-72.3-434c0,0.9-0.7,1.7-1.7,1.7c-0.9,0-1.7-0.7-1.7-1.7c0-0.9,0.7-1.7,1.7-1.7 C-73.1-435.7-72.3-434.9-72.3-434z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-76.8-434c0,0.6-0.5,1.1-1.1,1.1c0,0,0,0,0,0c-0.6,0-1.1-0.5-1.1-1.1c0,0,0,0,0,0c0-0.6,0.5-1.1,1.1-1.1 c0,0,0,0,0,0C-77.3-435.1-76.8-434.6-76.8-434C-76.8-434-76.8-434-76.8-434z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-69-434c0,0.6-0.5,1.1-1.1,1.1c0,0,0,0,0,0c-0.6,0-1.1-0.5-1.1-1.1c0,0,0,0,0,0c0-0.6,0.5-1.1,1.1-1.1 c0,0,0,0,0,0C-69.5-435.1-69-434.6-69-434C-69-434-69-434-69-434z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-75.4-431.6c0.5,0.3,0.7,1,0.4,1.5c-0.3,0.5-1,0.7-1.5,0.4c0,0,0,0,0,0c-0.5-0.3-0.7-1-0.4-1.5 C-76.6-431.7-75.9-431.9-75.4-431.6C-75.4-431.6-75.4-431.6-75.4-431.6z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-71.5-438.3c0.5,0.3,0.7,1,0.4,1.5c-0.3,0.5-1,0.7-1.5,0.4c0,0,0,0,0,0c-0.5-0.3-0.7-1-0.4-1.5 C-72.7-438.5-72-438.6-71.5-438.3C-71.5-438.3-71.5-438.3-71.5-438.3z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-72.6-431.6c0.5-0.3,1.2-0.1,1.5,0.4c0,0,0,0,0,0c0.3,0.5,0.1,1.2-0.4,1.5c-0.5,0.3-1.2,0.1-1.5-0.4 c0,0,0,0,0,0C-73.3-430.6-73.1-431.3-72.6-431.6z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-76.5-438.3c0.5-0.3,1.2-0.1,1.5,0.4c0,0,0,0,0,0c0.3,0.5,0.1,1.2-0.4,1.5c-0.5,0.3-1.2,0.1-1.5-0.4 c0,0,0,0,0,0C-77.2-437.3-77-438-76.5-438.3z"})})})]})})})},gt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:Object(n.jsx)("g",{transform:"translate(213 720)",children:Object(n.jsxs)("g",{transform:"translate(-105 -720)",children:[Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-108)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-108 6)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-99.5 6)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-99.5)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-98) rotate(90)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-104) rotate(90)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-104 8.5) rotate(90)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-98 8.5) rotate(90)"}),Object(n.jsx)("circle",{cx:"2",cy:"2",r:"2",transform:"translate(-105 3)"})]})})})})},ft="ADD_BUCKET_OPEN",xt="ADD_BUCKET_NAME",vt="ADD_BUCKET_VERSIONED",yt="ADD_BUCKET_LOCKING",St="ADD_BUCKET_QUOTA",Ct="ADD_BUCKET_QUOTA_TYPE",kt="ADD_BUCKET_QUOTA_SIZE",wt="ADD_BUCKET_QUOTA_UNIT",Nt="ADD_BUCKET_RESET",Tt="ADD_BUCKET_RETENTION",Et="ADD_BUCKET_RETENTION_MODE",At="ADD_BUCKET_RETENTION_UNIT",_t="ADD_BUCKET_RETENTION_VALIDITY";var It=a(124),Ft=a.n(It),Mt=a(912),Lt=a(957),Dt=a(1002),Bt=a(86),Rt=a(399),Pt=a.n(Rt),zt=a(219),Kt=a.n(zt),Wt=a(398),Ut=a.n(Wt),Vt=a(34),Gt="#081C42",qt="#081C42",Ht=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 11.856",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M-54,8l1.764,2.614A7.52,7.52,0,0,0-46,13.928h0a7.52,7.52,0,0,0,6.234-3.314L-38,8l-1.764-2.614A7.52,7.52,0,0,0-46,2.072h0a7.52,7.52,0,0,0-6.234,3.314Zm10.286,0A2.285,2.285,0,0,1-46,10.286,2.285,2.285,0,0,1-48.286,8,2.285,2.285,0,0,1-46,5.714,2.285,2.285,0,0,1-43.714,8Zm1.3,0A3.59,3.59,0,0,1-46,11.59,3.59,3.59,0,0,1-49.59,8,3.59,3.59,0,0,1-46,4.41,3.59,3.59,0,0,1-42.41,8Z",transform:"translate(54 -2.072)"})})},Yt=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 13.833 13.833",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M2.934,16H0V13.066L10.607,2.459a1,1,0,0,1,1.414,0l1.52,1.52a1,1,0,0,1,0,1.414Z",transform:"translate(0 -2.167)"})})},Qt=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 13 13",children:[Object(n.jsx)("path",{fill:a?qt:Gt,d:"M11.05 8.617v2.429h-9.1v-9.1h2.429v-1.95H0v13h13V8.617z",className:"a"}),Object(n.jsx)("path",{fill:a?qt:Gt,d:"M3.854 9.256h1.95a4.945 4.945 0 013.6-4.74v1.3l.6-.487 2.474-2.012L9.4.817v1.7a6.9 6.9 0 00-5.546 6.739z",className:"a"})]})},Zt=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 10.402 13",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M6.761 1V0H3.64v1H.004v1h10.4V1zM.004 2.998l1.672 10h7.052l1.673-10zm3.412 8.243l-.552-6.478h.653l.553 6.472zm3.569 0h-.653l.551-6.472h.654z"})})},Jt=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 10 11.429",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M-43.375,11.429-48.35,8.664l-5.025,2.764V0h10Z",transform:"translate(53.375)"})})},$t=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"})})},Xt=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3v-3h18v3z"})})},ea=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 13 12.996",children:[Object(n.jsx)("path",{fill:a?qt:Gt,d:"M11.05 9.096v1.95h-9.1v-1.95H0v3.9h13v-3.9z"}),Object(n.jsx)("path",{fill:a?qt:Gt,d:"M6.5 9.75L9 6.672H7.475V0h-1.95v6.672H4z"})]})},ta=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z"})})},aa=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M20 16h2v-2h-2v2zm0-9v5h2V7h-2zM10 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 10c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"})})},na=function(e,t){switch(e){case"view":return Object(n.jsx)(Ht,{active:t});case"edit":return Object(n.jsx)(Yt,{active:t});case"delete":return Object(n.jsx)(Zt,{active:t});case"description":return Object(n.jsx)(Jt,{active:t});case"share":return Object(n.jsx)(Qt,{active:t});case"cloud":return Object(n.jsx)($t,{active:t});case"console":return Object(n.jsx)(Xt,{active:t});case"download":return Object(n.jsx)(ea,{active:t});case"disable":return Object(n.jsx)(ta,{active:t});case"format":return Object(n.jsx)(aa,{active:t})}return null},ca=Object(N.a)((function(){return Object(k.a)({spacing:{margin:"0 8px"},buttonDisabled:{"&.MuiButtonBase-root.Mui-disabled":{cursor:"not-allowed",filter:"grayscale(100%)",opacity:"30%"}}})}))((function(e){var t=e.type,a=e.onClick,c=e.valueToSend,i=e.idField,r=e.selected,o=e.to,s=e.sendOnlyId,l=void 0!==s&&s,d=e.disabled,b=void 0!==d&&d,u=e.classes,j=l?c[i]:c,m=Object(n.jsx)(Mt.a,{"aria-label":t,size:"small",onClick:a?function(e){e.stopPropagation(),b?e.preventDefault():a(j)}:function(){return null},className:"".concat(u.spacing," ").concat(b?u.buttonDisabled:""),disabled:b,children:na(t,r)});return a?m:Ft()(o)?b?m:Object(n.jsx)(Vt.a,{to:"".concat(o,"/").concat(j),onClick:function(e){e.stopPropagation()},children:m}):null})),ia=a(1015),ra=a(1009),oa=function(e){return Object(n.jsxs)(it.a,Object(j.a)(Object(j.a)({},e),{},{viewBox:"0 0 12 12",children:[Object(n.jsx)("path",{d:"M357.14,346a5,5,0,1,1-5,5,5,5,0,0,1,5-5m0-1a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z",transform:"translate(-351.14 -345.03)"}),Object(n.jsx)("path",{d:"M356.21,352.42v-1.86h.52c1.23,0,1.92-.45,1.92-1.29s-.68-1.18-1.89-1.18a8.07,8.07,0,0,0-.93.06l-.1-1.25a9.13,9.13,0,0,1,1.08-.08c2,0,3.19.94,3.19,2.4s-.93,2.24-2.64,2.46l-.05.74Zm1.56,1.8a1,1,0,1,1-1-1A1,1,0,0,1,357.77,354.22Z",transform:"translate(-351.14 -345.03)"})]}))},sa=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),Ee),{},{fieldContainer:Object(j.a)(Object(j.a)({},ke.fieldContainer),{},{display:"flex",justifyContent:"flex-start",alignItems:"center",margin:"15px 0",marginBottom:0,flexBasis:"initial"})}))}))((function(e){var t=e.label,a=e.onChange,c=e.value,r=e.id,o=e.name,s=e.checked,l=void 0!==s&&s,d=e.disabled,b=void 0!==d&&d,u=e.tooltip,j=void 0===u?"":u,m=e.classes;return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:m.fieldContainer,children:[Object(n.jsx)("div",{children:Object(n.jsx)(Dt.a,{name:o,id:r,value:c,color:"primary",inputProps:{"aria-label":"secondary checkbox"},checked:l,onChange:a,checkedIcon:Object(n.jsx)("span",{className:m.checkedIcon}),icon:Object(n.jsx)("span",{className:m.unCheckedIcon}),disabled:b})}),""!==t&&Object(n.jsxs)(ia.a,{htmlFor:r,className:m.inputLabel,children:[Object(n.jsx)("span",{children:t}),""!==j&&Object(n.jsx)("div",{className:m.tooltipContainer,children:Object(n.jsx)(ra.a,{title:j,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:m.tooltip})})})})]})]})})})),la="#9c9c9c80",da={fontWeight:400,fontSize:14,borderColor:la,borderWidth:"0.5px",height:40,transitionDuration:"0.3s",padding:"initial",paddingRight:6,paddingLeft:6},ba=function(e,t,a,i,r,o,s,l,d,b,u){var j=function(e,t,a,n,c,i,r){var o=Object(Je.a)(e);i&&(o=e.filter((function(e){return r.includes(e.elementKey)})));var s=t;return n&&(s-=45),c&&(s-=a),o.reduce((function(e,t){return t.width?e-t.width:e}),s)/o.filter((function(e){return!e.width})).length}(e,t,a,i,r,l,d);return e.map((function(e,t){if(l&&!d.includes(e.elementKey))return null;var a=!e.enableSort||!e.enableSort;return Object(n.jsx)(Bt.b,{dataKey:e.elementKey,headerClassName:"titleHeader ".concat(e.headerTextAlign?"text-".concat(e.headerTextAlign):""),headerRenderer:function(){return Object(n.jsxs)(c.Fragment,{children:[b===e.elementKey&&Object(n.jsx)(c.Fragment,{children:"ASC"===u?Object(n.jsx)(Ut.a,{}):Object(n.jsx)(Kt.a,{})}),e.label]})},className:e.contentTextAlign?"text-".concat(e.contentTextAlign):"",cellRenderer:function(t){var a=t.rowData,i=!!o&&o.includes(Ft()(a)?a:a[s]);return function(e,t,a){var i=Ft()(e)?e:Z()(e,t.elementKey,null),r=t.renderFullObject?e:i,o=t.renderFunction?t.renderFunction(r):r;return Object(n.jsx)(c.Fragment,{children:Object(n.jsx)("span",{className:a?"selected":"",children:o})})}(a,e,i)},width:e.width||j,disableSort:a,defaultSortDirection:"ASC"},"col-tb-".concat(t.toString()))}))},ua=Object(N.a)((function(){return Object(k.a)(Object(j.a)(Object(j.a)({dialogContainer:{padding:"12px 26px 22px"},paper:{display:"flex",overflow:"auto",flexDirection:"column",padding:"19px 38px",boxShadow:"none",border:"#EAEDEE 1px solid",borderRadius:3,minHeight:200,overflowY:"scroll",position:"relative","&::-webkit-scrollbar":{width:3,height:3}},noBackground:{backgroundColor:"transparent",border:0},defaultPaperHeight:{height:"calc(100vh - 205px)"},allTableSettings:{"& .MuiTableCell-sizeSmall:last-child":{paddingRight:"initial"},"& .MuiTableCell-body.MuiTableCell-sizeSmall:last-child":{paddingRight:6}},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:700,fontSize:14,borderColor:"#39393980",borderWidth:"0.5px",padding:"6px 0 10px"}}},rowUnselected:Object(j.a)(Object(j.a)({},da),{},{color:"#393939"}),rowSelected:Object(j.a)(Object(j.a)({},da),{},{color:"#081C42",fontWeight:600}),paginatorContainer:{display:"flex",justifyContent:"flex-end",padding:"5px 38px"},checkBoxHeader:{width:50,textAlign:"left",paddingRight:10,"&.MuiTableCell-paddingCheckbox":{paddingBottom:4,paddingLeft:0}},actionsContainer:{width:150,borderColor:la},paginatorComponent:{borderBottom:0},checkBoxRow:{borderColor:la,padding:"0 10px 0 0"},loadingBox:{paddingTop:"100px",paddingBottom:"100px"},overlayColumnSelection:{position:"absolute",right:0,top:0},popoverContainer:{position:"relative"},popoverContent:{maxHeight:250,overflowY:"auto",padding:"0 10px 10px"},shownColumnsLabel:{color:"#9c9c9c",fontSize:12,padding:10,borderBottom:"#eaeaea 1px solid",width:"100%"},"@global":{".rowLine":{borderBottom:"1px solid ".concat(la),height:40,color:"#393939",fontSize:14,transitionDuration:.3,"&:focus":{outline:"initial"},"&:hover:not(.ReactVirtualized__Table__headerRow)":{userSelect:"none",backgroundColor:"#ececec",fontWeight:600,"&.canClick":{cursor:"pointer"},"&.canSelectText":{userSelect:"text"}},"& .selected":{color:"#081C42",fontWeight:600}},".headerItem":{userSelect:"none",fontWeight:700,fontSize:14,fontStyle:"initial",display:"flex",alignItems:"center",outline:"none"},".ReactVirtualized__Table__headerRow":{fontWeight:700,fontSize:14,borderColor:"#39393980",textTransform:"initial"},".optionsAlignment":{textAlign:"center"},".text-center":{textAlign:"center"},".text-right":{textAlign:"right"},".progress-enabled":{paddingTop:3,display:"inline-block",margin:"0 10px",position:"relative",width:18,height:18},".progress-enabled > .MuiCircularProgress-root":{position:"absolute",left:0,top:3}}},Ee),_e))}))((function(e){var t=e.itemActions,a=e.columns,r=e.onSelect,o=e.records,s=e.isLoading,l=e.loadingMessage,d=void 0===l?Object(n.jsx)(v.a,{component:"h3",children:"Loading..."}):l,j=e.entityName,m=e.selectedItems,h=e.idField,p=e.classes,O=e.radioSelection,g=void 0!==O&&O,f=e.customEmptyMessage,k=void 0===f?"":f,w=e.customPaperHeight,N=void 0===w?"":w,T=e.noBackground,E=void 0!==T&&T,A=e.columnsSelector,_=void 0!==A&&A,I=e.textSelectable,F=void 0!==I&&I,M=e.columnsShown,L=void 0===M?[]:M,D=e.onColumnChange,B=void 0===D?function(e,t){}:D,R=e.infiniteScrollConfig,P=e.sortConfig,z=e.autoScrollToBottom,K=void 0!==z&&z,W=Object(c.useState)(!1),U=Object(u.a)(W,2),V=U[0],G=U[1],q=i.a.useState(null),H=Object(u.a)(q,2),Y=H[0],Q=H[1],Z=t?t.find((function(e){return"view"===e.type})):null,J=function(e){G(!V),Q(e.currentTarget)},$=function(){G(!1),Q(null)};return Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(C.a,{className:"".concat(p.paper," ").concat(E?p.noBackground:""," ").concat(""!==N?N:p.defaultPaperHeight),children:[s&&Object(n.jsxs)(x.a,{container:!0,className:p.loadingBox,children:[Object(n.jsx)(x.a,{item:!0,xs:12,style:{textAlign:"center"},children:d}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]}),_&&!s&&o.length>0&&Object(n.jsx)("div",{className:p.overlayColumnSelection,children:function(e){return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(Mt.a,{"aria-describedby":"columnsSelector",color:"primary",onClick:J,children:Object(n.jsx)(Pt.a,{fontSize:"inherit"})}),Object(n.jsxs)(Lt.a,{anchorEl:Y,id:"columnsSelector",open:V,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:$,className:p.popoverContainer,children:[Object(n.jsx)("div",{className:p.shownColumnsLabel,children:"Shown Columns"}),Object(n.jsx)("div",{className:p.popoverContent,children:e.map((function(e){return Object(n.jsx)(sa,{label:e.label,checked:L.includes(e.elementKey),onChange:function(t){B(e.elementKey,t.target.checked)},id:"chbox-".concat(e.label),name:"chbox-".concat(e.label),value:e.label},"tableColumns-".concat(e.label))}))})]})]})}(a)}),o&&!s&&o.length>0?Object(n.jsx)(Bt.c,{isRowLoaded:function(e){var t=e.index;return!!o[t]},loadMoreRows:R?R.loadMoreRecords:function(){return new Promise((function(){return!0}))},rowCount:R?R.recordsCount:o.length,children:function(e){var i=e.onRowsRendered,s=e.registerChild;return Object(n.jsx)(Bt.a,{children:function(e){var l=e.width,d=e.height,u=function(e,t){var a=45*t;return a<80?80:a>e?e:a}(l,t?t.filter((function(e){return"view"!==e.type})).length:0),O=!(!r||!m),f=!!(t&&t.length>1||t&&1===t.length&&"view"!==t[0].type);return Object(n.jsxs)(Bt.d,{ref:s,disableHeader:!1,headerClassName:"headerItem",headerHeight:40,height:d,noRowsRenderer:function(){return Object(n.jsx)(c.Fragment,{children:""!==k?k:"There are no ".concat(j," yet.")})},overscanRowCount:10,rowHeight:40,width:l,rowCount:o.length,rowGetter:function(e){var t=e.index;return o[t]},onRowClick:function(e){!function(e){if(Z){var t=Z.sendOnlyId?e[h]:e;if(Z.to)return void b.push("".concat(Z.to,"/").concat(t));Z.onClick&&Z.onClick(t)}}(e.rowData)},rowClassName:"rowLine ".concat(Z?"canClick":""," ").concat(!Z&&F?"canSelectText":""),onRowsRendered:i,sort:P?P.triggerSort:void 0,sortBy:P?P.currentSort:void 0,sortDirection:P?P.currentDirection:void 0,scrollToIndex:K?o.length-1:-1,children:[O&&Object(n.jsx)(Bt.b,{headerRenderer:function(){return Object(n.jsx)(c.Fragment,{children:"Select"})},dataKey:h,width:45,cellRenderer:function(e){var t=e.rowData,a=!!m&&m.includes(Ft()(t)?t:t[h]);return Object(n.jsx)(Dt.a,{value:Ft()(t)?t:t[h],color:"primary",inputProps:{"aria-label":"secondary checkbox"},checked:a,onChange:r,onClick:function(e){e.stopPropagation()},checkedIcon:Object(n.jsx)("span",{className:g?p.radioSelectedIcon:p.checkedIcon}),icon:Object(n.jsx)("span",{className:g?p.radioUnselectedIcon:p.unCheckedIcon})})}}),ba(a,l,u,O,f,m||[],h,_,L,P?P.currentSort:"",P?P.currentDirection:void 0),f&&Object(n.jsx)(Bt.b,{headerRenderer:function(){return Object(n.jsx)(c.Fragment,{children:"Options"})},dataKey:h,width:u,headerClassName:"optionsAlignment",className:"optionsAlignment",cellRenderer:function(e){var a=e.rowData,c=!!m&&m.includes(Ft()(a)?a:a[h]);return function(e,t,a,c){return e.map((function(e,i){if("view"===e.type)return null;var r="string"===typeof t?t:t[c],o=!1;return e.disableButtonFunction&&e.disableButtonFunction(r)&&(o=!0),e.showLoaderFunction&&e.showLoaderFunction(r)?Object(n.jsx)("div",{className:"progress-enabled",children:Object(n.jsx)(S.a,{color:"primary",size:18,variant:"indeterminate"},"actions-loader-".concat(e.type,"-").concat(i.toString()))}):Object(n.jsx)(ca,{type:e.type,onClick:e.onClick,to:e.to,valueToSend:t,selected:a,idField:c,sendOnlyId:!!e.sendOnlyId,disabled:o},"actions-".concat(e.type,"-").concat(i.toString()))}))}(t||[],a,c,h)}})]})}})}}):Object(n.jsx)(c.Fragment,{children:!s&&Object(n.jsx)("div",{children:""!==k?k:"There are no ".concat(j," yet.")})})]})})})),ja=a(967),ma=a(968),ha=a(969),pa={content:'" "',borderLeft:"2px solid #9C9C9C",height:33,width:1,position:"absolute"},Oa=Object(s.b)((function(e){return{modalSnackMessage:e.system.modalSnackBar}}),{setModalSnackMessage:G}),ga=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({dialogContainer:{padding:"8px 15px 22px"},closeContainer:{textAlign:"right"},closeButton:{width:45,height:45,padding:0,backgroundColor:"initial","&:hover":{backgroundColor:"initial"},"&:active":{backgroundColor:"initial"}},modalCloseIcon:{fontSize:35,color:"#9C9C9C",fontWeight:300,"&:hover":{color:"#9C9C9C"}},closeIcon:{"&::before":Object(j.a)(Object(j.a)({},pa),{},{transform:"rotate(45deg)"}),"&::after":Object(j.a)(Object(j.a)({},pa),{},{transform:"rotate(-45deg)"}),"&:hover::before, &:hover::after":{borderColor:"#9C9C9C"},width:24,height:24,display:"block",position:"relative"},titleClass:{padding:"0px 50px 12px","& h2":{fontWeight:600,color:"#000",fontSize:22}},modalContent:{padding:"0 50px"},customDialogSize:{width:"100%",maxWidth:765}},We))}))(Oa((function(e){var t=e.onClose,a=e.modalOpen,i=e.title,r=e.children,o=e.classes,s=e.wideLimit,l=void 0===s||s,d=e.modalSnackMessage,b=e.noContentPadding,m=e.setModalSnackMessage,h=Object(c.useState)(!1),p=Object(u.a)(h,2),O=p[0],g=p[1];Object(c.useEffect)((function(){if(d){if(""===d.message)return void g(!1);g(!0)}}),[d]);var f=l?{classes:{paper:o.customDialogSize}}:{maxWidth:"md",fullWidth:!0};return Object(n.jsx)(ja.a,Object(j.a)(Object(j.a)({open:a,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},f),{},{children:Object(n.jsxs)("div",{className:o.dialogContainer,children:[Object(n.jsx)(Ce.a,{open:O,className:o.snackBarModal,onClose:function(){g(!1),m("")},message:d?d.message:"",ContentProps:{className:"".concat(o.snackBar," ").concat(d&&"error"===d.type?o.errorSnackBar:"")},autoHideDuration:d&&"error"===d.type?1e4:5e3}),Object(n.jsx)("div",{className:o.closeContainer,children:Object(n.jsx)(Mt.a,{"aria-label":"close",className:o.closeButton,onClick:t,disableRipple:!0,children:Object(n.jsx)("span",{className:o.closeIcon})})}),Object(n.jsx)(ma.a,{id:"alert-dialog-title",className:o.titleClass,children:i}),Object(n.jsx)(ha.a,{className:b?"":o.modalContent,children:r})]})}))}))),fa=Object(w.a)((function(e){return Object(k.a)({root:{borderRadius:0,"&::before":{borderColor:"#9c9c9c"}},disabled:{"&.MuiInput-underline::before":{borderColor:"#eaeaea",borderBottomStyle:"solid"}},input:{padding:"15px 30px 10px 5px",color:"#393939",fontSize:13,fontWeight:600,"&:placeholder":{color:"#393939",opacity:1}},error:{color:"#b53b4b"}})}));function xa(e){var t=fa();return Object(n.jsx)(f.a,Object(j.a)({InputProps:{classes:t}},e))}var va=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),{},{textBoxContainer:{flexGrow:1},textBoxWithIcon:{position:"relative",paddingRight:25},errorState:{color:"#b53b4b",fontSize:14,position:"absolute",top:7,right:7},overlayAction:{position:"absolute",right:0,top:15,"& svg":{maxWidth:15,maxHeight:15}}}))}))((function(e){var t=e.label,a=e.onChange,c=e.value,r=e.id,o=e.name,s=e.type,l=void 0===s?"text":s,d=e.autoComplete,b=void 0===d?"off":d,u=e.disabled,j=void 0!==u&&u,m=e.multiline,h=void 0!==m&&m,p=e.tooltip,O=void 0===p?"":p,g=e.index,f=void 0===g?0:g,v=e.error,y=void 0===v?"":v,S=e.required,C=void 0!==S&&S,k=e.placeholder,w=void 0===k?"":k,N=e.min,T=e.max,E=e.overlayIcon,A=void 0===E?null:E,_=e.overlayAction,I=e.classes,F={"data-index":f};return"number"===l&&N&&(F.min=N),"number"===l&&T&&(F.max=T),Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(I.fieldContainer," ").concat(""!==y?I.errorInField:""),children:[""!==t&&Object(n.jsxs)(ia.a,{htmlFor:r,className:I.inputLabel,children:[Object(n.jsxs)("span",{children:[t,C?"*":""]}),""!==O&&Object(n.jsx)("div",{className:I.tooltipContainer,children:Object(n.jsx)(ra.a,{title:O,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:I.tooltip})})})})]}),Object(n.jsx)("div",{className:I.textBoxContainer,children:Object(n.jsx)(xa,{id:r,name:o,fullWidth:!0,value:c,disabled:j,onChange:a,type:l,multiline:h,autoComplete:b,inputProps:F,error:""!==y,helperText:y,placeholder:w,className:I.inputRebase})}),A&&Object(n.jsx)("div",{className:I.overlayAction,children:Object(n.jsx)(Mt.a,{onClick:_?function(){_()}:function(){return null},size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:A})})]})})})),ya=a(457),Sa=a(956),Ca=a(1001),ka=a(970),wa=Object(N.a)((function(e){return Object(k.a)({root:{lineHeight:1,"label + &":{marginTop:e.spacing(3)}},input:{position:"relative",color:"#393939",fontSize:13,fontWeight:600,padding:"15px 20px 10px 10px",borderBottom:"1px solid #9c9c9c",display:"flex",alignItems:"center","&:hover":{borderColor:"#393939"},"&:focus":{backgroundColor:"#fff"}}})}))(ya.a),Na=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({},ke),Ne))}))((function(e){var t=e.classes,a=e.id,c=e.name,r=e.onChange,o=e.options,s=e.label,l=e.tooltip,d=void 0===l?"":l,b=e.value,u=e.disabled,j=void 0!==u&&u;return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.fieldContainer,children:[""!==s&&Object(n.jsxs)(ia.a,{htmlFor:a,className:t.inputLabel,children:[Object(n.jsx)("span",{children:s}),""!==d&&Object(n.jsx)("div",{className:t.tooltipContainer,children:Object(n.jsx)(ra.a,{title:d,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:t.tooltip})})})})]}),Object(n.jsx)(Sa.a,{fullWidth:!0,children:Object(n.jsx)(Ca.a,{id:a,name:c,value:b,onChange:r,input:Object(n.jsx)(wa,{}),disabled:j,children:o.map((function(e){return Object(n.jsx)(ka.a,{value:e.value,children:e.label},"select-".concat(c,"-").concat(e.label))}))})})]})})})),Ta=a(1014),Ea=a(971),Aa=a(1e3),_a=Object(w.a)(Object(j.a)({root:{"&:hover":{backgroundColor:"transparent"}}},_e)),Ia=function(e){var t=_a();return Object(n.jsx)(Aa.a,Object(j.a)({className:t.root,disableRipple:!0,color:"default",checkedIcon:Object(n.jsx)("span",{className:t.radioSelectedIcon}),icon:Object(n.jsx)("span",{className:t.radioUnselectedIcon})},e))},Fa=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),{},{radioBoxContainer:{},fieldContainer:Object(j.a)(Object(j.a)({},ke.fieldContainer),{},{display:"flex",justifyContent:"space-between",borderBottom:"#9c9c9c 1px solid",paddingBottom:10,marginTop:11}),optionLabel:{"&.Mui-disabled":{"& .MuiFormControlLabel-label":{color:"#9c9c9c"}},"&:last-child":{marginRight:0},"& .MuiFormControlLabel-label":{fontSize:12,color:"#000"}},checkedOption:{"& .MuiFormControlLabel-label":{fontSize:12,color:"#000",fontWeight:700}}}))}))((function(e){var t=e.selectorOptions,a=void 0===t?[]:t,c=e.currentSelection,r=e.label,o=e.id,s=e.name,l=e.onChange,d=e.tooltip,b=void 0===d?"":d,u=e.disableOptions,j=void 0!==u&&u,m=e.classes,h=e.displayInColumn,p=void 0!==h&&h;return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:m.fieldContainer,children:[Object(n.jsxs)(ia.a,{htmlFor:o,className:m.inputLabel,children:[Object(n.jsx)("span",{children:r}),""!==b&&Object(n.jsx)("div",{className:m.tooltipContainer,children:Object(n.jsx)(ra.a,{title:b,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:m.tooltip})})})})]}),Object(n.jsx)("div",{className:m.radioBoxContainer,children:Object(n.jsx)(Ta.a,{"aria-label":o,id:o,name:s,value:c,onChange:l,row:!p,children:a.map((function(e){return Object(n.jsx)(Ea.a,{value:e.value,control:Object(n.jsx)(Ia,{}),label:e.label,disabled:j,className:Object(xe.a)(m.optionLabel,Object(fe.a)({},m.checkedOption,e.value===c))},"rd-".concat(s,"-").concat(e.value))}))})})]})})})),Ma=a(1007),La=a(972),Da=Object(N.a)({root:{alignItems:"flex-start",height:18,padding:"0 12px",display:"flex",position:"relative"},switchBase:{color:"#fff",padding:0,top:"initial","&$checked":{color:"#fff"},"&$checked + $track":{backgroundColor:"#081C42",opacity:1,height:15},"&:hover":{backgroundColor:"#fff"}},checked:{},track:{height:15,backgroundColor:"#9C9C9C",border:"#081C42 1px solid",opacity:1,padding:0,marginTop:1.5,"&$checked":{backgroundColor:"#081C42"}},thumb:{backgroundColor:"#fff",border:"#081C42 1px solid",boxShadow:"none",width:18,height:18,padding:0,marginLeft:10}})(La.a),Ba=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column",paddingTop:15,boxShadow:"none"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noFound:{textAlign:"center",padding:"10px 0"},tableContainer:{maxHeight:200},stickyHeader:{backgroundColor:"#fff"},actionsTitle:{fontWeight:600,color:"#081C42",fontSize:16,alignSelf:"center"},tableBlock:{marginTop:15},filterField:{width:375,fontWeight:600,"& .input":{"&::placeholder":{fontWeight:600,color:"#081C42"}}},divContainer:{borderBottom:"#9c9c9c 1px solid",paddingBottom:14,marginBottom:20,maxWidth:840},wrapperContainer:{display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:840},indicatorLabel:{fontSize:12,fontWeight:600,color:"#081C42",margin:"0 8px 0 10px"},fieldDescription:{marginTop:4,color:"#999999"}},Ie),ke))}))((function(e){var t=e.label,a=void 0===t?"":t,c=e.onChange,r=e.value,o=e.id,s=e.name,l=e.checked,d=void 0!==l&&l,b=e.disabled,u=void 0!==b&&b,j=e.switchOnly,m=void 0!==j&&j,h=e.tooltip,p=void 0===h?"":h,O=e.description,g=void 0===O?"":O,f=e.indicatorLabels,y=void 0===f?[]:f,S=e.containerClass,C=void 0===S?"":S,k=e.classes,w=Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)("div",{className:"".concat(k.switchContainer," ").concat(C),children:[Object(n.jsx)(Da,{checked:d,onChange:c,color:"primary",name:s,inputProps:{"aria-label":"primary checkbox"},disabled:u,disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0,value:r}),2===y.length&&Object(n.jsx)("span",{className:k.indicatorLabel,children:d?y[0]:y[1]})]})});return m?w:Object(n.jsxs)("div",{className:k.divContainer,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:k.wrapperContainer,children:[""!==a&&Object(n.jsxs)(ia.a,{htmlFor:o,className:k.inputLabel,children:[Object(n.jsx)("span",{children:a}),""!==p&&Object(n.jsx)("div",{className:k.tooltipContainer,children:Object(n.jsx)(ra.a,{title:p,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:k.tooltip})})})})]}),w]}),""!==g&&Object(n.jsx)(x.a,{item:!0,xs:10,children:Object(n.jsx)(v.a,{component:"p",className:k.fieldDescription,children:g})})]})})),Ra=Object(s.b)((function(e){return{addBucketModalOpen:e.buckets.open,bucketName:e.buckets.addBucketName,versioningEnabled:e.buckets.addBucketVersioningEnabled,lockingEnabled:e.buckets.addBucketLockingEnabled,quotaEnabled:e.buckets.addBucketQuotaEnabled,quotaType:e.buckets.addBucketQuotaType,quotaSize:e.buckets.addBucketQuotaSize,quotaUnit:e.buckets.addBucketQuotaUnit,retentionEnabled:e.buckets.addBucketRetentionEnabled,retentionMode:e.buckets.addBucketRetentionMode,retentionUnit:e.buckets.addBucketRetentionUnit,retentionValidity:e.buckets.addBucketRetentionValidity}}),{addBucketName:function(e){return{type:xt,name:e}},addBucketVersioned:function(e){return{type:vt,versioned:e}},enableObjectLocking:function(e){return{type:yt,locking:e}},addBucketQuota:function(e){return{type:St,quota:e}},addBucketQuotaType:function(e){return{type:Ct,quotaType:e}},addBucketQuotaSize:function(e){return{type:kt,quotaSize:e}},addBucketQuotaUnit:function(e){return{type:wt,quotaUnit:e}},addBucketRetention:function(e){return{type:Tt,retention:e}},addBucketRetentionMode:function(e){return{type:Et,retentionMode:e}},addBucketRetentionUnit:function(e){return{type:At,retentionUnit:e}},addBucketRetentionValidity:function(e){return{type:_t,retentionValidity:e}},setModalError:q})(Object(N.a)((function(e){return Object(k.a)(Object(j.a)({buttonContainer:{textAlign:"right"},multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"},quotaSizeContainer:{flexGrow:1},sizeFactorContainer:{flexGrow:0,maxWidth:80,marginLeft:8,alignSelf:"flex-start"}},we))}))((function(e){var t=e.classes,a=e.open,r=e.closeModalAndRefresh,o=e.addBucketName,s=e.addBucketVersioned,l=e.enableObjectLocking,d=e.addBucketQuota,b=e.addBucketQuotaType,j=e.addBucketQuotaSize,m=e.addBucketQuotaUnit,h=e.addBucketRetention,p=e.addBucketRetentionMode,O=e.addBucketRetentionUnit,f=e.addBucketRetentionValidity,S=e.setModalError,C=e.bucketName,k=e.versioningEnabled,w=e.lockingEnabled,N=e.quotaEnabled,T=e.quotaType,E=e.quotaSize,A=e.quotaUnit,_=e.retentionEnabled,I=e.retentionMode,F=e.retentionUnit,M=e.retentionValidity,L=Object(c.useState)(!1),D=Object(u.a)(L,2),B=D[0],R=D[1],P=Object(c.useState)(!1),z=Object(u.a)(P,2),K=z[0],W=z[1],U=Object(c.useState)(!1),V=Object(u.a)(U,2),G=V[0],q=V[1],H=Object(Ma.a)(C,1e3),Y=Object(u.a)(H,1)[0];Object(c.useEffect)((function(){o(Y)}),[Y,o]);var Q=function(){o(""),s(!1),l(!1),d(!1),b("hard"),j("1"),m("TiB"),h(!1),p("compliance"),O("days"),f(1)};return Object(c.useEffect)((function(){var e=!1;""!==C.trim()&&(e=!0),N&&e&&(""!==E.trim()&&0!==parseInt(E)||(e=!1)),k&&_||(h(!1),p("compliance"),O("days"),f(1)),_?(l(!0),q(!0)):q(!1),_&&(Number.isNaN(M)||M<1)&&(e=!1),W(e)}),[C,_,w,T,E,A,N,h,p,O,f,M,k,l]),Object(n.jsx)(ga,{title:"Create Bucket",modalOpen:a,onClose:function(){r(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){if(e.preventDefault(),!B){R(!0);var t={name:C,versioning:k,locking:w};if(N){var a=oe(E,A,!1);t.quota={enabled:!0,quota_type:T,amount:parseInt(a)}}_&&(t.retention={mode:I,unit:F,validity:M}),he.invoke("POST","/api/v1/buckets",t).then((function(e){R(!1),r(!0)})).catch((function(e){R(!1),S(e)})),Q()}}(e)},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"bucket-name",name:"bucket-name",onChange:function(e){o(e.target.value)},label:"Bucket Name",value:C})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(v.a,{component:"h6",variant:"h6",children:"Features"}),Object(n.jsx)("hr",{})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"versioned",id:"versioned",name:"versioned",checked:k,onChange:function(e){s(e.target.checked)},description:"Allows to keep multiple versions of the same object under the same key.",label:"Versioning",indicatorLabels:["On","Off"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"locking",id:"locking",name:"locking",disabled:G,checked:w,onChange:function(e){l(e.target.checked)},label:"Object Locking",description:"Required to support retention and legal hold. Can only be enabled at bucket creation.",indicatorLabels:["On","Off"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"bucket_quota",id:"bucket_quota",name:"bucket_quota",checked:N,onChange:function(e){d(e.target.checked)},label:"Quota",description:"Limit the amount of data in the bucket.",indicatorLabels:["On","Off"]})}),N&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:T,id:"quota_type",name:"quota_type",label:"Quota Type",onChange:function(e){b(e.target.value)},selectorOptions:[{value:"hard",label:"Hard"},{value:"fifo",label:"FIFO"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)("div",{className:t.multiContainer,children:[Object(n.jsx)("div",{className:t.quotaSizeContainer,children:Object(n.jsx)(va,{type:"number",id:"quota_size",name:"quota_size",onChange:function(e){j(e.target.value)},label:"Quota",value:E,required:!0,min:"1"})}),Object(n.jsx)("div",{className:t.sizeFactorContainer,children:Object(n.jsx)(Na,{label:"\xa0",id:"quota_unit",name:"quota_unit",value:A,onChange:function(e){m(e.target.value)},options:te.map((function(e){return{label:e,value:e}}))})})]})})]}),k&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"bucket_retention",id:"bucket_retention",name:"bucket_retention",checked:_,onChange:function(e){h(e.target.checked)},label:"Retention",description:"Impose rules to prevent object deletion for a period of time.",indicatorLabels:["On","Off"]})}),_&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:I,id:"retention_mode",name:"retention_mode",label:"Retention Mode",onChange:function(e){p(e.target.value)},selectorOptions:[{value:"compliance",label:"Compliance"},{value:"governance",label:"Governance"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:F,id:"retention_unit",name:"retention_unit",label:"Retention Unit",onChange:function(e){O(e.target.value)},selectorOptions:[{value:"days",label:"Days"},{value:"years",label:"Years"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",id:"retention_validity",name:"retention_validity",onChange:function(e){f(e.target.valueAsNumber)},label:"Retention Validity",value:String(M),required:!0,min:"1"})})]})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:Q,children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:B||!K,children:"Save"})]}),B&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),Pa=a(973),za=a(974),Ka={setErrorSnackMessage:V},Wa=Object(s.b)(null,Ka)((function(e){var t=e.closeDeleteModalAndRefresh,a=e.deleteOpen,i=e.selectedBucket,r=e.setErrorSnackMessage,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1];return Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete Bucket"}),Object(n.jsxs)(ha.a,{children:[l&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete bucket ",Object(n.jsx)("b",{children:i}),"? ",Object(n.jsx)("br",{}),"A bucket can only be deleted if it's empty."]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:l,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){l||(d(!0),he.invoke("DELETE","/api/v1/buckets/".concat(i),{name:i}).then((function(e){d(!1),t(!0)})).catch((function(e){d(!1),r(e)})))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),Ua=Object(N.a)((function(e){return Object(k.a)({headerContainer:{position:"absolute",width:"100%",height:77,display:"flex",backgroundColor:"#fff",borderBottom:"#E3E3E3 1px solid",left:0},label:{display:"flex",justifyContent:"flex-start",alignItems:"center"},labelStyle:{color:"#000",fontSize:18,fontWeight:700,marginLeft:55,marginTop:8}})}))((function(e){var t=e.classes,a=e.label;return Object(n.jsx)(x.a,{container:!0,className:t.headerContainer,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:t.label,children:Object(n.jsx)(v.a,{variant:"h4",className:t.labelStyle,children:a})})})})),Va=a(401),Ga=a.n(Va),qa=a(400),Ha=a.n(qa),Ya=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},Me))}))((function(e){var t=e.classes,a=e.label,i=void 0===a?"":a,r=e.content,o=e.multiLine,s=void 0!==o&&o;return Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)(x.a,{className:t.prefinedContainer,children:[""!==i&&Object(n.jsx)(x.a,{item:!0,xs:12,className:t.predefinedTitle,children:i}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.predefinedList,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:s?t.innerContentMultiline:t.innerContent,children:r})})]})})})),Qa=Object(N.a)((function(e){return Object(k.a)({wizardStepContainer:{display:"flex",flexDirection:"column"},wizardComponent:{overflowY:"auto",marginBottom:10,height:"calc(100vh - 435px)",maxWidth:840,width:"100%"},wizardModal:{overflowY:"auto",marginBottom:10,height:"calc(100vh - 515px)"},buttonsContainer:{display:"flex",flexDirection:"row",justifyContent:"flex-start",padding:"10px 0",borderTop:"#EAEAEA 1px solid","& button":{marginLeft:10},"&.forModal":{paddingBottom:0}},buttonInnerContainer:{maxWidth:840,width:"100%",textAlign:"right"}})}))((function(e){var t=e.classes,a=e.page,c=e.pageChange,i=e.loadingStep,r=e.forModal;return Object(n.jsxs)("div",{className:t.wizardStepContainer,children:[Object(n.jsx)("div",{className:r?t.wizardModal:t.wizardComponent,children:a.componentRender}),i&&Object(n.jsx)("div",{children:Object(n.jsx)(y.a,{})}),Object(n.jsx)("div",{className:"".concat(t.buttonsContainer," ").concat(r?"forModal":""),children:Object(n.jsx)("div",{className:t.buttonInnerContainer,children:a.buttons.map((function(e){return Object(n.jsx)(g.a,{variant:"contained",color:"primary",size:"small",onClick:function(){!function(e){switch(e.type){case"next":c("++");break;case"back":c("--");break;case"to":c(e.toPage||0)}e.action&&e.action(c)}(e)},disabled:!e.enabled,children:e.label},"button-".concat(a.label,"-").concat(e.label))}))})})]})})),Za=Object(N.a)((function(e){return Object(k.a)({wizardMain:{display:"flex",width:"100%",height:"100%",flexGrow:1},wizFromContainer:{height:"calc(100vh - 365px)",minHeight:450,padding:"0 30px"},wizFromModal:{position:"relative"},wizardSteps:{minWidth:180,marginRight:10,borderRight:"#eaeaea 1px solid",display:"flex",flexGrow:1,flexDirection:"column",height:"100%","& ul":{padding:"0 15px 0 40px",marginTop:0,"& li":{listStyle:"lower-roman",marginBottom:12}}},modalWizardSteps:{padding:5,borderBottom:"#eaeaea 1px solid","& ul":{padding:0,marginTop:0,display:"flex",justifyContent:"space-evenly","& li":{listStyle:"lower-roman","&::marker":{paddingLeft:15}}}},buttonList:{backgroundColor:"transparent",border:"none",cursor:"pointer","&:not(:disabled):hover":{textDecoration:"underline"},"&:selected, &:active, &:focus, &:focus:active":{border:"none",outline:0,boxShadow:"none"}},paddedContentGrid:{padding:"0 10px"},stepsLabel:{fontSize:20,color:"#393939",fontWeight:600,margin:"15px 12px","&.stepsModalTitle":{textAlign:"center",width:"100%",marginTop:0,marginBottom:10}},stepsMasterContainer:{position:"sticky",top:0,backgroundColor:"#FFFFFF",width:"100%",maxHeight:90}})}))((function(e){var t=e.classes,a=e.wizardSteps,i=e.loadingStep,r=e.forModal,o=Object(c.useState)(0),s=Object(u.a)(o,2),l=s[0],d=s[1],b=function(e){var t=a.length-1;if("++"===e){var n=l+1;n>t&&(n=t),d(n)}if("--"===e){var c=l-1;c<0&&(c=0),d(c)}if("number"===typeof e){var i=e;e<0&&(i=0),e>t&&(i=t),d(i)}};if(0===a.length)return null;var j=function(){return Object(n.jsx)("ul",{children:a.map((function(e,a){return Object(n.jsx)("li",{children:Object(n.jsx)("button",{onClick:function(){return b(a)},disabled:a>l,className:t.buttonList,children:e.label})},"wizard-".concat(a.toString()))}))})};return Object(n.jsxs)(x.a,{container:!0,className:r?t.wizFromModal:t.wizFromContainer,children:[r?Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)("div",{className:t.stepsMasterContainer,children:[Object(n.jsx)("div",{className:"".concat(t.stepsLabel," stepsModalTitle"),children:"Steps"}),Object(n.jsx)("div",{className:t.modalWizardSteps,children:j()})]})}):Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,sm:3,md:3,lg:3,xl:2,children:Object(n.jsxs)("div",{className:t.wizardSteps,children:[Object(n.jsx)("span",{className:t.stepsLabel,children:"Steps"}),j()]})})}),Object(n.jsx)(x.a,{item:!0,xs:12,sm:r?12:9,md:r?12:9,lg:r?12:9,xl:r?12:10,className:r?"":t.paddedContentGrid,children:Object(n.jsx)(Qa,{page:a[l],pageChange:b,loadingStep:i,forModal:r})})]})})),Ja=Object(s.b)(null,{setModalErrorSnackMessage:q}),$a=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"},remoteBucketList:{display:"grid",gridTemplateColumns:"auto auto 45px",alignItems:"center",justifyContent:"stretch"},errorIcon:{color:"#C72C48"},successIcon:{color:"#42C91A"},hide:{opacity:0,transitionDuration:"0.3s"}},we),Ue))}))(Ja((function(e){var t=e.open,a=e.closeModalAndRefresh,i=e.classes,r=e.buckets,o=e.setModalErrorSnackMessage,s=Object(c.useState)([]),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(!1),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(!1),g=Object(u.a)(O,2),f=g[0],v=g[1],y=Object(c.useState)(""),S=Object(u.a)(y,2),C=S[0],k=S[1],w=Object(c.useState)(""),N=Object(u.a)(w,2),T=N[0],E=N[1],A=Object(c.useState)(""),_=Object(u.a)(A,2),I=_[0],F=_[1],M=Object(c.useState)(""),L=Object(u.a)(M,2),D=L[0],B=L[1],R=Object(c.useState)(!0),P=Object(u.a)(R,2),z=P[0],K=P[1],W=Object(c.useState)([]),U=Object(u.a)(W,2),V=U[0],G=U[1],q=Object(c.useState)([]),H=Object(u.a)(q,2),Y=H[0],Q=H[1],J=Object(c.useState)([]),$=Object(u.a)(J,2),X=$[0],ee=$[1],te=Y.map((function(e){return{label:e,value:e}}));Object(c.useEffect)((function(){if(0===V.length){var e=[],t=[];r.forEach((function(a){e.push(a),t.push("")})),G(t),b(e)}}),[r,V.length]);var ae=function(e){var t=e.errString;switch(t){case"":return Object(n.jsx)("div",{className:i.successIcon,children:Object(n.jsx)(Ha.a,{})});case"n/a":return null;default:if(t)return Object(n.jsx)("div",{className:i.errorIcon,children:Object(n.jsx)(ra.a,{title:t,placement:"top-start",children:Object(n.jsx)(Ga.a,{})})})}return null},ne=function(e,t){var a=Object(Je.a)(V);a[e]=t,G(a)},ce=function(e){var t=Object(Je.a)(d),a=Object(Je.a)(V);e.forEach((function(e){var n=Z()(e,"errorString","");if(!n||""===n){var c=t.indexOf(e.originBucket);t.splice(c,1),a.splice(c,1)}})),b(t),G(a)};return Object(n.jsx)(ga,{modalOpen:t,onClose:function(){a(!1)},title:"Set Multiple Bucket Replication",children:Object(n.jsx)(Za,{loadingStep:h||f,wizardSteps:[{label:"Remote Configuration",componentRender:Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ya,{label:"Local Buckets to replicate",content:d.join(", ")})}),Object(n.jsx)("h4",{children:"Remote Endpoint Configuration"}),Object(n.jsx)("span",{className:i.descriptionText,children:"Please avoid the use of root credentials for this feature"}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"accessKey",name:"accessKey",onChange:function(e){k(e.target.value)},label:"Access Key",value:C})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"secretKey",name:"secretKey",onChange:function(e){E(e.target.value)},label:"Secret Key",value:T})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"targetURL",name:"targetURL",onChange:function(e){F(e.target.value)},placeholder:"play.min.io:9000",label:"Target URL",value:I})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{checked:z,id:"useTLS",name:"useTLS",label:"Use TLS",onChange:function(e){K(e.target.checked)},value:"yes"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"region",name:"region",onChange:function(e){B(e.target.value)},label:"Region",value:D})})]}),buttons:[{type:"custom",label:"Next",enabled:!f,action:function(e){var t={accessKey:C,secretKey:T,targetURL:I,useTLS:z};v(!0),he.invoke("POST","api/v1/list-external-buckets",t).then((function(t){var a=Z()(t,"buckets",[]);if(a&&a.length>0){var n=a.map((function(e){return e.name}));Q(n)}e("++"),v(!1)})).catch((function(e){v(!1),o(e)}))}}]},{label:"Buckets Assignation",componentRender:Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("h3",{children:"Remote Buckets Assignation"}),Object(n.jsx)("span",{className:i.descriptionText,children:"Please select / type the desired remote bucket were you want the local data to be replicated."}),Object(n.jsx)("div",{className:i.remoteBucketList,children:d.map((function(e,t){var a,r=function(e){if(X.length>0){var t=X.find((function(t){return t.originBucket===e}));if(t)return Z()(t,"errorString","")||""}return"n/a"}(e);return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("div",{className:""===r?i.hide:"",children:e}),Object(n.jsx)("div",{className:""===r?i.hide:"",children:(a=t,Y.length>0?Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(Na,{label:"",id:"assign-bucket-".concat(a),name:"assign-bucket-".concat(a),value:V[a],onChange:function(e){ne(a,e.target.value)},options:te,disabled:h})}):Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(va,{id:"assign-bucket-".concat(a),name:"assign-bucket-".concat(a),label:"",onChange:function(e){ne(a,e.target.value)},value:V[a],disabled:h})}))}),Object(n.jsx)("div",{className:""===r?i.hide:"",children:X.length>0&&Object(n.jsx)(ae,{errString:r})})]},"buckets-assignation-".concat(t.toString(),"-").concat(e))}))})]}),buttons:[{type:"back",label:"Back",enabled:!0},{type:"next",label:"Create",enabled:!h,action:function(){p(!0);var e=d.map((function(e,t){return{originBucket:e,destinationBucket:V[t]}})),t="".concat(z?"https://":"http://").concat(I),n={accessKey:C,secretKey:T,targetURL:t,region:D,bucketsRelation:e};he.invoke("POST","/api/v1/buckets-replication",n).then((function(e){p(!1);var t=e.replicationState;ee(t),0===t.filter((function(e){return e.errorString&&""!==e.errorString})).length?a(!0):setTimeout((function(){ce(t)}),500)})).catch((function(e){p(!1),o(e)}))}}]}],forModal:!0})})}))),Xa=Object(s.b)((function(e){return{addBucketModalOpen:e.buckets.open}}),{addBucketOpen:function(e){return{type:ft,open:e}},addBucketReset:function(){return{type:Nt}},setErrorSnackMessage:V})(Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.addBucketOpen,i=e.addBucketModalOpen,r=e.addBucketReset,o=e.setErrorSnackMessage,s=Object(c.useState)([]),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(!0),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(!1),v=Object(u.a)(O,2),y=v[0],S=v[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(!0),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(!1),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)([]),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Object(c.useState)(!1),G=Object(u.a)(V,2),q=G[0],H=G[1];Object(c.useEffect)((function(){M&&he.invoke("POST","/api/v1/has-permission",{actions:[{id:"createBucket",action:"s3:CreateBucket"}]}).then((function(e){if(L(!1),e.permissions){var t=(e.permissions?e.permissions:[]).find((function(e){return"createBucket"===e.id}));t&&t.can?P(!0):P(!1),L(!1)}})).catch((function(e){L(!1),o(e)}))}),[M,o]),Object(c.useEffect)((function(){if(h){p(!0),he.invoke("GET","/api/v1/buckets").then((function(e){p(!1),b(e.buckets||[])})).catch((function(e){p(!1),o(e)}))}}),[h,o]);var Y=[{type:"view",to:"/buckets",sendOnlyId:!0},{type:"delete",onClick:function(e){S(!0),N(e)},sendOnlyId:!0}],Q=d.filter((function(e){return""===A||e.name.indexOf(A)>=0}));return Object(n.jsxs)(c.Fragment,{children:[i&&Object(n.jsx)(Ra,{open:i,closeModalAndRefresh:function(e){a(!1),r(),e&&(p(!0),U([]))}}),y&&Object(n.jsx)(Wa,{deleteOpen:y,selectedBucket:w,closeDeleteModalAndRefresh:function(e){!function(e){S(!1),e&&(p(!0),U([]))}(e)}}),q&&Object(n.jsx)($a,{open:q,buckets:W,closeModalAndRefresh:function(e){H(!1),e&&U([])}}),Object(n.jsx)(Ua,{label:"Buckets"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Buckets",className:t.searchField,id:"search-resource",label:"",onChange:function(e){_(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(at.a,{}),onClick:function(){H(!0)},disabled:0===W.length,children:"Set Replication"}),R&&Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){a(!0)},children:"Create Bucket"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:Y,columns:[{label:"Name",elementKey:"name"},{label:"Creation Date",elementKey:"creation_date",renderFunction:function(e){return Object(n.jsx)(ct.a,{children:e})}},{label:"Size",elementKey:"size",renderFunction:ce,width:60,contentTextAlign:"right"}],isLoading:h,records:Q,entityName:"Buckets",idField:"name",selectedItems:W,onSelect:function(e){var t=e.target,a=t.value,n=t.checked,c=Object(Je.a)(W);return n?c.push(a):c=c.filter((function(e){return e!==a})),U(c),c}})})]})})]})}))),en=a(229),tn=a(998),an=a(981),nn=Object(s.b)(null,{setModalErrorSnackMessage:q}),cn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},we))}))(nn((function(e){var t=e.classes,a=e.open,i=e.bucketName,r=e.actualPolicy,o=e.closeModalAndRefresh,s=e.setModalErrorSnackMessage,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(""),h=Object(u.a)(m,2),p=h[0],O=h[1];return Object(c.useEffect)((function(){O(r)}),[O,r]),Object(n.jsx)(ga,{title:"Change Access Policy",modalOpen:a,onClose:function(){o()},children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b||(j(!0),he.invoke("PUT","/api/v1/buckets/".concat(i,"/set-policy"),{access:p}).then((function(e){j(!1),o()})).catch((function(e){j(!1),s(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.formScrollable,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{value:p,label:"Access Policy",id:"select-access-policy",name:"select-access-policy",onChange:function(e){O(e.target.value)},options:[{value:"PRIVATE",label:"Private"},{value:"PUBLIC",label:"Public"}]})})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",fullWidth:!0,disabled:b,children:"Set"})}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),rn=Object(s.b)(null,{setModalErrorSnackMessage:q}),on=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},we))}))(rn((function(e){var t=e.classes,a=e.open,i=e.bucketName,r=e.closeModalAndRefresh,o=e.setModalErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)("compliance"),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)("days"),f=Object(u.a)(O,2),v=f[0],S=f[1],C=Object(c.useState)(1),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(!1),E=Object(u.a)(T,2),A=E[0],_=E[1];return Object(c.useEffect)((function(){Number.isNaN(w)||w<1?_(!1):_(!0)}),[w]),Object(n.jsx)(ga,{title:"Set Retention Configuration",modalOpen:a,onClose:function(){r()},children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d||(b(!0),he.invoke("PUT","/api/v1/buckets/".concat(i,"/retention"),{mode:h,unit:v,validity:w}).then((function(){b(!1),r()})).catch((function(e){b(!1),o(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:h,id:"retention_mode",name:"retention_mode",label:"Retention Mode",onChange:function(e){p(e.target.value)},selectorOptions:[{value:"compliance",label:"Compliance"},{value:"governance",label:"Governance"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:v,id:"retention_unit",name:"retention_unit",label:"Retention Unit",onChange:function(e){S(e.target.value)},selectorOptions:[{value:"days",label:"Days"},{value:"years",label:"Years"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",id:"retention_validity",name:"retention_validity",onChange:function(e){N(e.target.valueAsNumber)},label:"Retention Validity",value:String(w),required:!0,min:"1"})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",fullWidth:!0,disabled:d||!A,children:"Set"})}),d&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),sn=a(977),ln=a(978),dn=a(979),bn=a(980),un=a(976),jn=Object(s.b)(null,{setModalErrorSnackMessage:q}),mn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},we))}))(jn((function(e){var t=e.classes,a=e.open,i=e.selectedBucket,r=e.closeModalAndRefresh,o=e.setModalErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(""),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(""),f=Object(u.a)(O,2),v=f[0],S=f[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)([]),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)([]),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useCallback)((function(){b(!0),he.invoke("GET","/api/v1/admin/arns").then((function(e){var t=[];null!==e.arns&&(t=e.arns),b(!1),L(t)})).catch((function(e){b(!1),o(e)}))}),[o]);Object(c.useEffect)((function(){D()}),[D]);var B=function(e,t){var a=A.indexOf(t),n=[];-1===a?n=n.concat(A,t):0===a?n=n.concat(A.slice(1)):a===A.length-1?n=n.concat(A.slice(0,-1)):a>0&&(n=n.concat(A.slice(0,a),A.slice(a+1))),_(n)},R=M.map((function(e){return{label:e,value:e}}));return Object(n.jsx)(ga,{modalOpen:a,onClose:function(){r()},title:"Subscribe To Event",children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d||(b(!0),he.invoke("POST","/api/v1/buckets/".concat(i,"/events"),{configuration:{arn:w,events:A,prefix:h,suffix:v},ignoreExisting:!0}).then((function(){b(!1),r()})).catch((function(e){b(!1),o(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{onChange:function(e){N(e.target.value)},id:"select-access-policy",name:"select-access-policy",label:"ARN",value:w,options:R})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(un.a,{size:"medium",children:[Object(n.jsx)(sn.a,{className:t.minTableHeader,children:Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{children:"Select"}),Object(n.jsx)(dn.a,{children:"Event"})]})}),Object(n.jsx)(bn.a,{children:[{label:"PUT - Object Uploaded",value:"put"},{label:"GET - Object accessed",value:"get"},{label:"DELETE - Object Deleted",value:"delete"}].map((function(e){return Object(n.jsxs)(ln.a,{onClick:function(t){return B(0,e.value)},children:[Object(n.jsx)(dn.a,{padding:"checkbox",children:Object(n.jsx)(Dt.a,{value:e.value,color:"primary",inputProps:{"aria-label":"secondary checkbox"},onChange:function(t){return B(0,e.value)},checked:A.includes(e.value)})}),Object(n.jsx)(dn.a,{className:t.wrapCell,children:e.label})]},"group-".concat(e.value))}))})]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"prefix-input",name:"prefix-input",label:"Prefix",value:h,onChange:function(e){p(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"suffix-input",name:"suffix-input",label:"Suffix",value:v,onChange:function(e){S(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:d,children:"Save"})}),d&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),hn=Object(s.b)(null,{setErrorSnackMessage:V})((function(e){var t=e.closeDeleteModalAndRefresh,a=e.deleteOpen,i=e.selectedBucket,r=e.bucketEvent,o=e.setErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1];return Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete Event"}),Object(n.jsxs)(ha.a,{children:[d&&Object(n.jsx)(y.a,{}),Object(n.jsx)(Pa.a,{id:"alert-dialog-description",children:"Are you sure you want to delete this event?"})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:d,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){!function(){if(!d&&null!=r){b(!0);var e=Z()(r,"events",[]),a=Z()(r,"prefix",""),n=Z()(r,"suffix","");he.invoke("DELETE","/api/v1/buckets/".concat(i,"/events/").concat(r.arn),{events:e,prefix:a,suffix:n}).then((function(e){b(!1),t(!0)})).catch((function(e){b(!1),o(e)}))}}()},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),pn=Object(s.b)(null,{setModalErrorSnackMessage:q}),On=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},we))}))(pn((function(e){var t=e.open,a=e.closeModalAndRefresh,i=e.classes,r=e.bucketName,o=e.setModalErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(""),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(""),f=Object(u.a)(O,2),v=f[0],S=f[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(""),F=Object(u.a)(I,2),M=F[0],L=F[1];return Object(n.jsx)(ga,{modalOpen:t,onClose:function(){a()},title:"Set Bucket Replication",children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b(!0),function(){var e={accessKey:h,secretKey:v,targetURL:w,region:M,bucketsRelation:[{originBucket:r,destinationBucket:A}]};he.invoke("POST","/api/v1/buckets-replication",e).then((function(e){b(!1);var t=Z()(e,"replicationState",[]);if(t.length>0){var n=t[0];return b(!1),n.errorString&&""!==n.errorString?void o(n.errorString):void a()}o("No changes applied")})).catch((function(e){b(!1),o(e)}))}()},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:i.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"accessKey",name:"accessKey",onChange:function(e){p(e.target.value)},label:"Access Key",value:h})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"secretKey",name:"secretKey",onChange:function(e){S(e.target.value)},label:"Secret Key",value:v})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"targetURL",name:"targetURL",onChange:function(e){N(e.target.value)},placeholder:"https://play.min.io:9000",label:"Target URL",value:w})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"targetBucket",name:"targetBucket",onChange:function(e){_(e.target.value)},label:"Target Bucket",value:A})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"region",name:"region",onChange:function(e){L(e.target.value)},label:"Region",value:M})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:i.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:d,children:"Save"})}),d&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),gn=Object(s.b)(null,{setModalErrorSnackMessage:q}),fn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},we))}))(gn((function(e){var t=e.classes,a=e.open,i=(e.encryptionEnabled,e.encryptionCfg),r=e.selectedBucket,o=e.closeModalAndRefresh,s=e.setModalErrorSnackMessage,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(""),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)("disabled"),v=Object(u.a)(f,2),S=v[0],C=v[1];Object(c.useEffect)((function(){i&&("AES256"===i.algorithm?C("sse-s3"):(C("sse-kms"),O(i.kmsMasterKeyID)))}),[i]);return Object(n.jsx)(ga,{modalOpen:a,onClose:function(){o()},title:"Enable Bucket Encryption",children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b||("disabled"===S?he.invoke("POST","/api/v1/buckets/".concat(r,"/encryption/disable")).then((function(){j(!1),o()})).catch((function(e){j(!1),s(e)})):he.invoke("POST","/api/v1/buckets/".concat(r,"/encryption/enable"),{encType:S,kmsKeyID:p}).then((function(){j(!1),o()})).catch((function(e){j(!1),s(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{onChange:function(e){C(e.target.value)},id:"select-encryption-type",name:"select-encryption-type",label:"Encryption Type",value:S,options:[{label:"Disabled",value:"disabled"},{label:"SSE-S3",value:"sse-s3"},{label:"SSE-KMS",value:"sse-kms"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),"sse-kms"===S&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"kms-key-id",name:"kms-key-id",label:"KMS Key ID",value:p,onChange:function(e){O(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:b,children:"Save"})}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),xn=Object(s.b)(null,{setErrorSnackMessage:V})((function(e){var t=e.closeVersioningModalAndRefresh,a=e.modalOpen,i=e.selectedBucket,r=e.versioningCurrentState,o=e.setErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1];return Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Edit Versioning"}),Object(n.jsxs)(ha.a,{children:[d&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to"," ",Object(n.jsx)("strong",{children:r?"disable":"enable"})," ","versioning for this bucket?",r&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)("strong",{children:"File versions won't be automatically deleted"})]})]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:d,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){d||(b(!0),he.invoke("PUT","/api/v1/buckets/".concat(i,"/versioning"),{versioning:!r}).then((function(){b(!1),t(!0)})).catch((function(e){b(!1),o(e)})))},color:"secondary",autoFocus:!0,children:r?"Disable":"Enable"})]})]})})),vn=function(){return Object(n.jsxs)(it.a,{viewBox:"0 0 16.172 17.187",children:[Object(n.jsx)("defs",{children:Object(n.jsxs)("linearGradient",{id:"a",y1:"0.5",x2:"1",y2:"0.5",gradientUnits:"objectBoundingBox",children:[Object(n.jsx)("stop",{offset:"0.044",stopColor:"#362585"}),Object(n.jsx)("stop",{offset:"0.301",stopColor:"#281b6f"}),Object(n.jsx)("stop",{offset:"1",stopColor:"#1e1560"})]})}),Object(n.jsx)("path",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.5px"},d:"M-4778.1,2239.582v6.425h6.425",transform:"translate(4787.594 -2239.582)"}),Object(n.jsx)("path",{fill:"#707070",d:"M-4784.238,2247.532v-.581c0-.027.009-.054.012-.081.039-.313.055-.632.121-.939a6.744,6.744,0,0,1,3.064-4.441,6.514,6.514,0,0,1,3.293-1.032,6.923,6.923,0,0,1,2.667.423,6.793,6.793,0,0,1,4.119,4.333,6.053,6.053,0,0,1,.279,1.337c.006.083.014.164.021.247v.86c-.011.131-.018.261-.032.392a6.494,6.494,0,0,1-.626,2.147,6.807,6.807,0,0,1-4.044,3.528,6.052,6.052,0,0,1-1.663.3,6.576,6.576,0,0,1-2.565-.325,6.73,6.73,0,0,1-3.947-3.451,6.627,6.627,0,0,1-.658-2.288C-4784.212,2247.816-4784.225,2247.674-4784.238,2247.532Zm13.025-.306c-.024-.309-.021-.661-.082-1a6.206,6.206,0,0,0-1.658-3.293,6.153,6.153,0,0,0-4.1-1.9,5.984,5.984,0,0,0-2.476.355,6.188,6.188,0,0,0-4.134,5.708,6.453,6.453,0,0,0,.228,1.881,6.127,6.127,0,0,0,1.984,3.052,6.046,6.046,0,0,0,3.806,1.445,6.043,6.043,0,0,0,1.235-.065,6.249,6.249,0,0,0,3.783-2.2,6.2,6.2,0,0,0,1.352-3.048C-4771.228,2247.863-4771.233,2247.563-4771.212,2247.226Z",transform:"translate(4786.834 -2240.452)"}),Object(n.jsx)("ellipse",{style:{opacity:.1,fill:"url(#a)"},cx:"6.151",cy:"6.151",rx:"6.151",ry:"6.151",transform:"translate(0 4.886)"})]})},yn=a(403);a(550);a(551);var Sn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},ke))}))((function(e){var t=e.value,a=e.label,c=void 0===a?"":a,r=e.tooltip,o=void 0===r?"":r,s=e.mode,l=void 0===s?"javascript":s,d=e.classes,b=e.onChange,u=void 0===b?function(){}:b,j=e.onBeforeChange,m=e.readOnly,h=void 0!==m&&m;return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)(ia.a,{className:d.inputLabel,children:[Object(n.jsx)("span",{children:c}),""!==o&&Object(n.jsx)("div",{className:d.tooltipContainer,children:Object(n.jsx)(ra.a,{title:o,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:d.tooltip})})})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(yn.Controlled,{value:t,options:{mode:l,lineNumbers:!0,readOnly:h},onBeforeChange:j,onChange:u})})]})})),Cn={setModalErrorSnackMessage:q},kn=Object(s.b)(null,Cn),wn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({jsonPolicyEditor:{minHeight:400,width:"100%"},buttonContainer:{textAlign:"right"}},we),ke))}))(kn((function(e){var t=e.classes,a=e.open,i=e.closeModalAndRefresh,r=e.policyEdit,o=e.setModalErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(""),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(""),f=Object(u.a)(O,2),v=f[0],S=f[1];Object(c.useEffect)((function(){r&&(p(r.name),S(r?JSON.stringify(JSON.parse(r.policy),null,4):""))}),[r]);var C=""!==h.trim();return Object(n.jsx)(ga,{modalOpen:a,onClose:function(){i(!1)},title:"".concat(r?"Info":"Create"," Policy"),children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d||(b(!0),he.invoke("POST","/api/v1/policies",{name:h,policy:v}).then((function(e){b(!1),i(!0)})).catch((function(e){b(!1),o(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"policy-name",name:"policy-name",label:"Policy Name",placeholder:"Enter Policy Name",onChange:function(e){p(e.target.value)},value:h,disabled:!!r})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(Sn,{label:"".concat(r?"Edit":"Write"," Policy"),value:v,onBeforeChange:function(e,t,a){S(a)}})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[!r&&Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){p(""),S("")},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:d||!C,children:"Save"})]}),d&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),Nn={setErrorSnackMessage:V},Tn=Object(s.b)(null,Nn)((function(e){var t=e.closeDeleteModalAndRefresh,a=e.deleteOpen,i=e.selectedBucket,r=e.ruleToDelete,o=e.setErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1];return Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete Replication Rule"}),Object(n.jsxs)(ha.a,{children:[d&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete replication rule ",Object(n.jsx)("b",{children:r}),"? ",Object(n.jsx)("br",{}),"Remember, at lease one rule must be present once replication has been enabled"]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:d,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){d||(b(!0),he.invoke("DELETE","/api/v1/buckets/".concat(i,"/replication/").concat(r)).then((function(){b(!1),t(!0)})).catch((function(e){b(!1),o(e)})))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),En=a(148),An=a.n(En),_n=a(404),In=a.n(_n),Fn=function(){return Object(n.jsx)(it.a,{viewBox:"0 0 12 12",children:Object(n.jsx)("path",{fill:"#081c42",className:"a",d:"M-13160.269,1885.114h-3.235v-4.381h-4.382V1877.5h4.382v-4.381h3.235v4.381h4.383v3.238h-4.383v4.38Z",transform:"translate(13167.886 -1873.114)"})})},Mn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),{},{inputWithBorder:{border:"1px solid #EAEAEA",padding:15,height:150,overflowY:"auto",position:"relative",marginTop:15},labelContainer:{display:"flex"},lineInputBoxes:{display:"flex"},queryDiv:{alignSelf:"center",margin:"0 4px",fontWeight:600}}))}))((function(e){var t=e.elements,a=e.name,r=e.label,o=e.tooltip,s=void 0===o?"":o,l=e.keyPlaceholder,d=void 0===l?"":l,b=e.valuePlaceholder,j=void 0===b?"":b,m=e.onChange,h=e.withBorder,p=void 0!==h&&h,O=e.classes,g=Object(c.useState)([""]),f=Object(u.a)(g,2),v=f[0],y=f[1],S=Object(c.useState)([""]),C=Object(u.a)(S,2),k=C[0],w=C[1],N=Object(c.createRef)();Object(c.useEffect)((function(){if(1===v.length&&""===v[0]&&1===k.length&&""===k[0]&&t&&""!==t){var e=t.split("&"),a=[],n=[];e.forEach((function(e){var t=e.split("=");2===t.length&&(a.push(t[0]),n.push(t[1]))})),a.push(""),n.push(""),y(a),w(n)}}),[v,k,t]),Object(c.useEffect)((function(){var e=N.current;e&&e.scrollIntoView(!1)}),[v]);var T=Object(c.useRef)(!0);Object(c.useLayoutEffect)((function(){T.current?T.current=!1:_()}),[v,k]);var E=function(e){e.persist();var t=Object(Je.a)(v);t[Z()(e.target,"dataset.index",0)]=e.target.value,y(t)},A=function(e){e.persist();var t=Object(Je.a)(k);t[Z()(e.target,"dataset.index",0)]=e.target.value,w(t)},_=An()((function(){var e="";v.forEach((function(t,a){if(v[a]&&k[a]){var n="".concat(t,"=").concat(k[a]);0!==a&&(n="&".concat(n)),e="".concat(e).concat(n)}})),m(e)}),500),I=k.map((function(e,t){return Object(n.jsxs)(x.a,{item:!0,xs:12,className:O.lineInputBoxes,children:[Object(n.jsx)(va,{id:"".concat(a,"-key-").concat(t.toString()),label:"",name:"".concat(a,"-").concat(t.toString()),value:v[t],onChange:E,index:t,placeholder:d}),Object(n.jsx)("span",{className:O.queryDiv,children:":"}),Object(n.jsx)(va,{id:"".concat(a,"-value-").concat(t.toString()),label:"",name:"".concat(a,"-").concat(t.toString()),value:k[t],onChange:A,index:t,placeholder:j,overlayIcon:t===k.length-1?Object(n.jsx)(Fn,{}):null,overlayAction:function(){!function(){if(""!==v[v.length-1].trim()&&""!==k[k.length-1].trim()){var e=Object(Je.a)(v),t=Object(Je.a)(k);e.push(""),t.push(""),y(e),w(t)}}()}})]},"query-pair-".concat(a,"-").concat(t.toString()))}));return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:O.fieldContainer,children:[Object(n.jsxs)(ia.a,{className:O.inputLabel,children:[Object(n.jsx)("span",{children:r}),""!==s&&Object(n.jsx)("div",{className:O.tooltipContainer,children:Object(n.jsx)(ra.a,{title:s,placement:"top-start",children:Object(n.jsx)(In.a,{className:O.tooltip})})})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(p?O.inputWithBorder:""),children:[I,Object(n.jsx)("div",{ref:N})]})]})})})),Ln={setModalErrorSnackMessage:q},Dn=Object(s.b)(null,Ln),Bn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},we))}))(Dn((function(e){var t=e.classes,a=e.closeModalAndRefresh,r=e.selectedBucket,o=e.lifecycle,s=e.open,l=e.setModalErrorSnackMessage,d=Object(c.useState)(!1),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(""),p=Object(u.a)(h,2),O=p[0],f=p[1],v=Object(c.useState)(!1),S=Object(u.a)(v,2),C=S[0],k=S[1];Object(c.useEffect)((function(){if("Enabled"===o.status&&k(!0),o.tags){var e=o.tags.reduce((function(e,t,a){return"".concat(e).concat(0!==a?"&":"").concat(t.key,"=").concat(t.value)}),"");f(e)}}),[o]);return Object(n.jsxs)(ga,{onClose:function(){a(!1)},modalOpen:s,title:"Edit Lifecycle Configuration",children:[Object(n.jsx)("div",{className:t.floatingEnabled,children:Object(n.jsx)(Ba,{indicatorLabels:["Enabled","Disabled"],checked:C,value:"user_enabled",id:"user-status",name:"user-status",onChange:function(e){k(e.target.checked)},switchOnly:!0})}),Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),j||(m(!0),null!==r&&null!==o&&he.invoke("PUT","/api/v1/buckets/".concat(r,"/lifecycle/").concat(o.id),{disable:!C,tags:O}).then((function(e){m(!1),a(!0)})).catch((function(e){m(!1),l(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"id",name:"id",label:"Id",value:o.id,onChange:function(){},disabled:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Mn,{name:"tags",label:"Tags",elements:O,onChange:function(e){f(e)},keyPlaceholder:"Tag Key",valuePlaceholder:"Tag Value",withBorder:!0})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:j,children:"Save"})}),j&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})]})}))),Rn=[{value:"01",label:"January"},{value:"02",label:"February"},{value:"03",label:"March"},{value:"04",label:"April"},{value:"05",label:"May"},{value:"06",label:"June"},{value:"07",label:"July"},{value:"08",label:"August"},{value:"09",label:"September"},{value:"10",label:"October"},{value:"11",label:"November"},{value:"12",label:"December"}],Pn=Array.from(Array(31),(function(e,t){return t+1})),zn=(new Date).getFullYear(),Kn=Array.from(Array(25),(function(e,t){return t+zn})),Wn=Object(N.a)((function(e){return Object(k.a)({root:{"& .MuiSelect-icon":{color:"#000","&.Mui-disabled":{color:"#9c9c9c"}}},input:{borderBottom:0,fontSize:12}})}))(ya.a),Un=Object(c.forwardRef)((function(e,t){var a=e.classes,i=e.id,r=e.label,o=e.disableOptions,s=void 0!==o&&o,l=e.addSwitch,d=void 0!==l&&l,b=e.tooltip,j=void 0===b?"":b,m=e.borderBottom,h=void 0!==m&&m,p=e.onDateChange,O=e.value,g=void 0===O?"":O;Object(c.useImperativeHandle)(t,(function(){return{resetDate:D}}));var f=Object(c.useState)(!1),v=Object(u.a)(f,2),y=v[0],S=v[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(""),F=Object(u.a)(I,2),M=F[0],L=F[1];Object(c.useEffect)((function(){if(""!==g){var e=g.split("-");L(e[0]),N(e[1]),_("".concat(parseInt(e[2])))}}),[g]),Object(c.useEffect)((function(){var e=function(e,t,a){var n=Date.parse("".concat(e,"-").concat(t,"-").concat(a));if(isNaN(n))return[!1,""];var c=parseInt(t),i=parseInt(a),r=c<10?"0".concat(c):c,o=i<10?"0".concat(i):i,s=new Date(n).toISOString().split("T")[0],l="".concat(e,"-").concat(r,"-").concat(o);return[s===l,l]}(M,w,A),t=Object(u.a)(e,2),a=t[0],n=t[1];p(n,a)}),[w,A,M,p]);var D=function(){N(""),_(""),L("")},B=function(){return s||!!d&&!y};return Object(n.jsxs)(x.a,{item:!0,xs:12,className:Object(xe.a)(a.fieldContainer,Object(fe.a)({},a.fieldContainerBorder,h)),children:[Object(n.jsx)("div",{className:a.labelContainer,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(ia.a,{htmlFor:i,className:a.inputLabel,children:[Object(n.jsx)("span",{children:r}),""!==j&&Object(n.jsx)("div",{className:a.tooltipContainer,children:Object(n.jsx)(ra.a,{title:j,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:a.tooltip})})})})]}),d&&Object(n.jsx)(Ba,{indicatorLabels:["Specific Date","Default (7 Days)"],checked:y,value:"date_enabled",id:"date-status",name:"date-status",onChange:function(e){S(e.target.checked),e.target.checked||p("",!0)},switchOnly:!0})]})}),Object(n.jsxs)("div",{children:[Object(n.jsx)(Sa.a,{disabled:B(),className:a.dateInput,children:Object(n.jsxs)(Ca.a,{id:"".concat(i,"-month"),name:"".concat(i,"-month"),value:w,displayEmpty:!0,onChange:function(e){N(e.target.value)},input:Object(n.jsx)(Wn,{}),children:[Object(n.jsx)(ka.a,{value:"",disabled:!0,children:""}),Rn.map((function(e){return Object(n.jsx)(ka.a,{value:e.value,children:e.label},"select-".concat(i,"-monthOP-").concat(e.label))}))]})}),Object(n.jsx)(Sa.a,{disabled:B(),className:a.dateInput,children:Object(n.jsxs)(Ca.a,{id:"".concat(i,"-day"),name:"".concat(i,"-day"),value:A,displayEmpty:!0,onChange:function(e){_(e.target.value)},input:Object(n.jsx)(Wn,{}),children:[Object(n.jsx)(ka.a,{value:"",disabled:!0,children:""}),Pn.map((function(e){return Object(n.jsx)(ka.a,{value:e,children:e},"select-".concat(i,"-dayOP-").concat(e))}))]})}),Object(n.jsx)(Sa.a,{disabled:B(),className:a.dateInput,children:Object(n.jsxs)(Ca.a,{id:"".concat(i,"-year"),name:"".concat(i,"-year"),value:M,displayEmpty:!0,onChange:function(e){L(e.target.value)},input:Object(n.jsx)(Wn,{}),children:[Object(n.jsx)(ka.a,{value:"",disabled:!0,children:""}),Kn.map((function(e){return Object(n.jsx)(ka.a,{value:e,children:e},"select-".concat(i,"-yearOP-").concat(e))}))]})})]})]})})),Vn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({dateInput:{"&:not(:last-child)":{marginRight:22}}},ke),Ne),{},{labelContainer:{flex:1},fieldContainer:Object(j.a)(Object(j.a)({},ke.fieldContainer),{},{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:10,marginTop:11,marginBottom:6}),fieldContainerBorder:{borderBottom:"#9c9c9c 1px solid",marginBottom:20}}))}))(Un),Gn=Object(s.b)(null,{setModalErrorSnackMessage:q}),qn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},we))}))(Gn((function(e){var t=e.open,a=e.closeModalAndRefresh,i=e.classes,r=e.bucketName,o=e.setModalErrorSnackMessage,s=Object(c.useState)(!0),l=Object(u.a)(s,2),d=l[0],b=l[1],m=Object(c.useState)([]),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(!1),v=Object(u.a)(f,2),S=v[0],C=v[1],k=Object(c.useState)(""),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(""),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(""),M=Object(u.a)(F,2),L=M[0],D=M[1],B=Object(c.useState)(""),R=Object(u.a)(B,2),P=R[0],z=R[1],K=Object(c.useState)(!1),W=Object(u.a)(K,2),U=W[0],V=W[1],G=Object(c.useState)("0"),q=Object(u.a)(G,2),H=q[0],Y=q[1],Q=Object(c.useState)("0"),J=Object(u.a)(Q,2),$=J[0],X=J[1],ee=Object(c.useState)("expiry"),te=Object(u.a)(ee,2),ae=te[0],ne=te[1],ce=Object(c.useState)("date"),ie=Object(u.a)(ce,2),re=ie[0],oe=ie[1],se=Object(c.useState)("0"),le=Object(u.a)(se,2),de=le[0],be=le[1],ue=Object(c.useState)(""),je=Object(u.a)(ue,2),me=je[0],pe=je[1],Oe=Object(c.useState)("0"),ge=Object(u.a)(Oe,2),fe=ge[0],xe=ge[1],ve=Object(c.useState)(""),ye=Object(u.a)(ve,2),Se=ye[0],Ce=ye[1],ke=Object(c.useState)("date"),we=Object(u.a)(ke,2),Ne=we[0],Te=we[1],Ee=Object(c.useState)(!1),Ae=Object(u.a)(Ee,2),_e=Ae[0],Ie=Ae[1];Object(c.useEffect)((function(){d&&he.invoke("GET","/api/v1/admin/tiers").then((function(e){var t=Z()(e,"items",[]);if(null!==t&&t.length>=1){var a=t.map((function(e){var t=e.type,a=Z()(e,"".concat(t,".name"),"");return{label:a,value:a}}));O(a),a.length>0&&D(a[0].value)}b(!1)})).catch((function(e){b(!1)}))}),[d]),Object(c.useEffect)((function(){var e=!0;"expiry"===ae?("date"===re&&""===me&&(e=!1),"days"===re&&parseInt(de)<1&&(e=!1)):("date"===Ne&&""===Se&&(e=!1),"days"===Ne&&parseInt(fe)<1&&(e=!1),""===L&&(e=!1)),Ie(e)}),[ae,re,me,de,Ne,Se,fe,L]);return Object(n.jsxs)(ga,{modalOpen:t,onClose:function(){a(!1)},title:"Add Lifecycle Rule",children:[d&&Object(n.jsx)(x.a,{container:!0,className:i.loadingBox,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})}),!d&&Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),C(!0),function(){var e={};if("expiry"===ae){var t={};t="date"===re?{expiry_date:"".concat(me,"T23:59:59Z")}:{expiry_days:parseInt(de)},e=Object(j.a)(Object(j.a)({},t),{},{noncurrentversion_expiration_days:parseInt(H)})}else{var n={};n="date"===Ne?{transition_date:"".concat(Se,"T23:59:59Z")}:{transition_days:parseInt(fe)},e=Object(j.a)(Object(j.a)({},n),{},{noncurrentversion_transition_days:parseInt($),noncurrentversion_transition_storage_class:P,storage_class:L})}var c=Object(j.a)({prefix:N,tags:_,expired_object_delete_marker:U},e);he.invoke("POST","/api/v1/buckets/".concat(r,"/lifecycle"),c).then((function(){C(!1),a(!0)})).catch((function(e){C(!1),o(e)}))}()},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:i.formScrollable,children:[Object(n.jsx)("h3",{children:"Lifecycle Configuration"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:ae,id:"quota_type",name:"quota_type",label:"ILM Rule",onChange:function(e){ne(e.target.value)},selectorOptions:[{value:"expiry",label:"Expiry"},{value:"transition",label:"Transition"}]})}),"expiry"===ae?Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:re,id:"expiryType",name:"expiryType",label:"Expiry Type",onChange:function(e){oe(e.target.value)},selectorOptions:[{value:"date",label:"Date"},{value:"days",label:"Days"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:"date"===re?Object(n.jsx)(Vn,{id:"expiry_date",label:"Expiry Date",value:me,borderBottom:!0,onDateChange:function(e,t){t&&pe(e)}}):Object(n.jsx)(va,{type:"number",id:"expiry_days",name:"expiry_days",onChange:function(e){be(e.target.value)},label:"Expiry Days",value:de,min:"0"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",id:"noncurrentversion_expiration_days",name:"noncurrentversion_expiration_days",onChange:function(e){Y(e.target.value)},label:"Non-current Expiration Days",value:H,min:"0"})})]}):Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:Ne,id:"transitionType",name:"transitionType",label:"Transition Type",onChange:function(e){Te(e.target.value)},selectorOptions:[{value:"date",label:"Date"},{value:"days",label:"Days"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:"date"===Ne?Object(n.jsx)(Vn,{id:"transition_date",label:"Transition Date",value:Se,borderBottom:!0,onDateChange:function(e,t){t&&Ce(e)}}):Object(n.jsx)(va,{type:"number",id:"transition_days",name:"transition_days",onChange:function(e){xe(e.target.value)},label:"Transition Days",value:fe,min:"0"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",id:"noncurrentversion_transition_days",name:"noncurrentversion_transition_days",onChange:function(e){X(e.target.value)},label:"Non-current Transition Days",value:$,min:"0"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"noncurrentversion_t_SC",name:"noncurrentversion_t_SC",onChange:function(e){z(e.target.value)},placeholder:"Set Non-current Version Transition Storage Class",label:"Non-current Version Transition Storage Class",value:P})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{label:"Storage Class",id:"storage_class",name:"storage_class",value:L,onChange:function(e){D(e.target.value)},options:p})})]}),Object(n.jsx)("h3",{children:"File Configuration"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"prefix",name:"prefix",onChange:function(e){T(e.target.value)},label:"Prefix",value:N})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Mn,{name:"tags",label:"Tags",elements:"",onChange:function(e){I(e)},keyPlaceholder:"Tag Key",valuePlaceholder:"Tag Value",withBorder:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"expired_delete_marker",id:"expired_delete_marker",name:"expired_delete_marker",checked:U,onChange:function(e){V(e.target.checked)},label:"Expired Object Delete Marker",indicatorLabels:["On","Off"]})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:i.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:S||!_e,children:"Save"})}),S&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})]})})));function Hn(e){var t=e.children,a=e.value,i=e.index,r=Object(en.a)(e,["children","value","index"]);return Object(n.jsx)("div",Object(j.a)(Object(j.a)({role:"tabpanel",hidden:a!==i,id:"simple-tabpanel-".concat(i),"aria-labelledby":"simple-tab-".concat(i),style:{marginTop:"5px"}},r),{},{children:a===i&&Object(n.jsx)(c.Fragment,{children:t})}))}function Yn(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}var Qn,Zn=Object(s.b)((function(e){return{session:e.console.session}}),{setErrorSnackMessage:V}),Jn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noRecords:{lineHeight:"24px",textAlign:"center",padding:"20px"},gridWrapper:{width:320},gridContainer:{display:"grid",gridTemplateColumns:"auto auto",gridGap:8,justifyContent:"flex-start",alignItems:"center","& div:not(.MuiCircularProgress-root)":{display:"flex",alignItems:"center"},"& div:nth-child(odd)":{justifyContent:"flex-end",fontWeight:700},"& div:nth-child(2n)":{minWidth:150}},masterActions:{width:"25%",minWidth:"120px","& div":{margin:"5px 0px"}},paperContainer:{padding:15,paddingLeft:50,display:"flex"},headerContainer:{display:"flex",justifyContent:"space-between"},capitalizeFirst:{textTransform:"capitalize"},doubleElement:{display:"flex",justifyContent:"space-between"},encCheckbox:{margin:0,padding:0},tabPan:{marginTop:"5px"},fixedHeight:{height:165,minWidth:247,padding:"25px 28px","& svg":{maxHeight:18}},elementTitle:{fontWeight:500,color:"#777777",fontSize:14,marginTop:-9},consumptionValue:{color:"#000000",fontSize:"48px",fontWeight:"bold"},reportedUsage:{padding:"15px"}},Fe),Ie),{},{actionsTray:Object(j.a)(Object(j.a)({},Ie.actionsTray),{},{padding:"15px 0 0"})},Ge),Ve),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Zn((function(e){var t,a=e.classes,r=e.match,o=e.setErrorSnackMessage,s=e.session,l=Object(c.useState)(null),d=Object(u.a)(l,2),m=d[0],h=d[1],p=Object(c.useState)([]),O=Object(u.a)(p,2),y=O[0],k=O[1],w=Object(c.useState)([]),N=Object(u.a)(w,2),T=N[0],E=N[1],A=Object(c.useState)([]),_=Object(u.a)(A,2),I=_[0],F=_[1],M=Object(c.useState)(!0),L=Object(u.a)(M,2),D=L[0],B=L[1],R=Object(c.useState)([]),P=Object(u.a)(R,2),z=P[0],K=P[1],W=Object(c.useState)(!0),U=Object(u.a)(W,2),V=U[0],G=U[1],q=Object(c.useState)(!0),H=Object(u.a)(q,2),Y=H[0],Q=H[1],J=Object(c.useState)(!0),$=Object(u.a)(J,2),X=$[0],ee=$[1],te=Object(c.useState)(!0),ae=Object(u.a)(te,2),ne=ae[0],ie=ae[1],re=Object(c.useState)(!0),oe=Object(u.a)(re,2),se=oe[0],le=oe[1],de=Object(c.useState)(!0),be=Object(u.a)(de,2),ue=be[0],je=be[1],me=Object(c.useState)(!0),pe=Object(u.a)(me,2),Oe=pe[0],ge=pe[1],fe=Object(c.useState)(!0),xe=Object(u.a)(fe,2),ve=xe[0],ye=xe[1],Se=Object(c.useState)(!1),Ce=Object(u.a)(Se,2),ke=Ce[0],we=Ce[1],Ne=Object(c.useState)(0),Te=Object(u.a)(Ne,2),Ee=Te[0],Ae=Te[1],_e=Object(c.useState)(!1),Ie=Object(u.a)(_e,2),Fe=Ie[0],Me=Ie[1],Le=Object(c.useState)(!1),De=Object(u.a)(Le,2),Be=De[0],Re=De[1],Pe=Object(c.useState)(!1),ze=Object(u.a)(Pe,2),Ke=ze[0],We=ze[1],Ue=Object(c.useState)(!1),Ve=Object(u.a)(Ue,2),Ge=Ve[0],qe=Ve[1],He=Object(c.useState)(!1),Ye=Object(u.a)(He,2),Qe=Ye[0],Ze=Ye[1],Je=Object(c.useState)(null),Xe=Object(u.a)(Je,2),tt=Xe[0],at=Xe[1],nt=Object(c.useState)("0"),it=Object(u.a)(nt,2),rt=it[0],st=it[1],lt=Object(c.useState)(!1),dt=Object(u.a)(lt,2),bt=dt[0],ut=dt[1],jt=Object(c.useState)(!1),mt=Object(u.a)(jt,2),ht=mt[0],pt=mt[1],Ot=Object(c.useState)(!1),gt=Object(u.a)(Ot,2),ft=gt[0],xt=gt[1],vt=Object(c.useState)(!1),yt=Object(u.a)(vt,2),St=yt[0],Ct=yt[1],kt=Object(c.useState)(null),wt=Object(u.a)(kt,2),Nt=wt[0],Tt=wt[1],Et=Object(c.useState)(!1),At=Object(u.a)(Et,2),_t=At[0],It=At[1],Ft=Object(c.useState)(null),Mt=Object(u.a)(Ft,2),Lt=Mt[0],Dt=Mt[1],Bt=Object(c.useState)(!1),Rt=Object(u.a)(Bt,2),Pt=Rt[0],zt=Rt[1],Kt=Object(c.useState)(!0),Wt=Object(u.a)(Kt,2),Ut=Wt[0],Vt=Wt[1],Gt=Object(c.useState)(!1),qt=Object(u.a)(Gt,2),Ht=qt[0],Yt=qt[1],Qt=Object(c.useState)(!1),Zt=Object(u.a)(Qt,2),Jt=Zt[0],$t=Zt[1],Xt=Object(c.useState)(!1),ea=Object(u.a)(Xt,2),ta=ea[0],aa=ea[1],na=Object(c.useState)(""),ca=Object(u.a)(na,2),ia=ca[0],ra=ca[1],oa=Object(c.useState)(!0),sa=Object(u.a)(oa,2),la=sa[0],da=sa[1],ba=Object(c.useState)([]),ja=Object(u.a)(ba,2),ma=ja[0],ha=ja[1],pa=Object(c.useState)(!1),Oa=Object(u.a)(pa,2),ga=Oa[0],fa=Oa[1],xa=r.params.bucketName,va=(null===(t=s.pages)||void 0===t?void 0:t.indexOf("/users"))>-1;Object(c.useEffect)((function(){Ut&&he.invoke("POST","/api/v1/has-permission",{actions:[{id:"PutReplicationConfiguration",action:"s3:PutReplicationConfiguration",bucket_name:xa},{id:"GetReplicationConfiguration",action:"s3:GetReplicationConfiguration",bucket_name:xa}]}).then((function(e){if(Vt(!1),e.permissions){var t=e.permissions?e.permissions:[],a=t.find((function(e){return"PutReplicationConfiguration"===e.id}));a&&a.can?Yt(!0):Yt(!1);var n=t.find((function(e){return"GetReplicationConfiguration"===e.id}));n&&n.can?$t(!0):$t(!1),Vt(!1)}})).catch((function(e){Vt(!1),o(e)}))}),[xa,Ut,o]),Object(c.useEffect)((function(){X&&he.invoke("GET","/api/v1/buckets/".concat(xa,"/events")).then((function(e){var t=Z()(e,"events",[]);ee(!1),k(t||[])})).catch((function(e){ee(!1),o(e)}))}),[X,o,xa]),Object(c.useEffect)((function(){ne&&he.invoke("GET","/api/v1/buckets/".concat(xa,"/versioning")).then((function(e){pt(e.is_versioned),ie(!1)})).catch((function(e){o(e),ie(!1)}))}),[ne,o,xa]),Object(c.useEffect)((function(){ne&&he.invoke("GET","/api/v1/buckets/".concat(xa,"/object-locking")).then((function(e){xt(e.object_locking_enabled),le(!1)})).catch((function(e){o(e),le(!1)}))}),[se,o,xa,ne]),Object(c.useEffect)((function(){ue&&he.invoke("GET","/api/v1/buckets/".concat(xa,"/replication")).then((function(e){var t=e.rules?e.rules:[];E(t),je(!1)})).catch((function(e){o(e),je(!1)}))}),[ue,o,xa]),Object(c.useEffect)((function(){D&&he.invoke("GET","/api/v1/bucket-policy/".concat(xa)).then((function(e){F(e.policies),B(!1)})).catch((function(e){o(e),B(!1)}))}),[D,o,xa]),Object(c.useEffect)((function(){V&&va&&he.invoke("GET","/api/v1/bucket-users/".concat(xa)).then((function(e){K(e),G(!1)})).catch((function(e){o(e),G(!1)}))}),[V,o,xa,va]),Object(c.useEffect)((function(){Oe&&he.invoke("GET","/api/v1/buckets").then((function(e){var t=Z()(e,"buckets",[]).find((function(e){return e.name===xa})),a=Z()(t,"size","0");ge(!1),st(a)})).catch((function(e){ge(!1),o(e)}))}),[Oe,o,xa]),Object(c.useEffect)((function(){Y&&he.invoke("GET","/api/v1/buckets/".concat(xa)).then((function(e){Q(!1),h(e)})).catch((function(e){Q(!1),o(e)}))}),[Y,o,xa]),Object(c.useEffect)((function(){ve&&he.invoke("GET","/api/v1/buckets/".concat(xa,"/encryption/info")).then((function(e){e.algorithm&&(Ct(!0),Tt(e)),ye(!1)})).catch((function(e){"The server side encryption configuration was not found"===e&&(Ct(!1),Tt(null)),ye(!1)}))}),[ve,xa]);Object(c.useEffect)((function(){la&&he.invoke("GET","/api/v1/buckets/".concat(xa,"/lifecycle")).then((function(e){var t=Z()(e,"lifecycle",[]);ha(t||[]),da(!1)})).catch((function(e){console.error(e),da(!1)}))}),[la,da,xa]);var ya=function(){Q(!0),ge(!0),je(!0),ie(!0),ee(!0),ye(!0)},Sa=function(){B(!0)},Ca="n/a";null!==m&&(Ca=m.access);var ka=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ut(e)},wa=[{type:"delete",onClick:function(e){qe(!0),at(e)}}],Na=[{type:"view",onClick:function(e){Re(!0),Dt(e)}}],Ta=[{type:"delete",onClick:function(e){ra(e.id),aa(!0)},disableButtonFunction:function(){return T.length<=1}}],Ea=[{label:"ID",elementKey:"id"},{label:"Prefix",elementKey:"prefix"},{label:"Status",elementKey:"status"},{label:"Expiration",elementKey:"expiration",renderFunction:function(e){return e.days?"".concat(e.days," day").concat(e.days>1?"s":""):"0001-01-01T00:00:00Z"===e.date?"":Object(n.jsx)(ct.a,{children:e.date})}},{label:"Transition",elementKey:"transition",renderFunction:function(e){return e.days?"".concat(e.days," day").concat(e.days>1?"s":""):"0001-01-01T00:00:00Z"===e.date?"":Object(n.jsx)(ct.a,{children:e.date})}},{label:"Storage Class",elementKey:"storage_class",renderFunction:function(e){return Z()(e,"transition.storage_class","")},renderFullObject:!0}],Aa=[{type:"view",onClick:function(e){b.push("/users/".concat(e))}}];return Object(n.jsxs)(c.Fragment,{children:[Fe&&Object(n.jsx)(mn,{open:Fe,selectedBucket:xa,closeModalAndRefresh:function(){Me(!1),ya()}}),Ke&&Object(n.jsx)(fn,{open:Ke,selectedBucket:xa,encryptionEnabled:St,encryptionCfg:Nt,closeModalAndRefresh:function(){We(!1),ya()}}),ke&&Object(n.jsx)(cn,{bucketName:xa,open:ke,actualPolicy:Ca,closeModalAndRefresh:function(){we(!1),ya()}}),Be&&Object(n.jsx)(wn,{open:Be,closeModalAndRefresh:function(e){Re(!1),e&&Sa()},policyEdit:Lt}),_t&&Object(n.jsx)(on,{bucketName:xa,open:_t,closeModalAndRefresh:function(){It(!1),ya()}}),bt&&Object(n.jsx)(On,{closeModalAndRefresh:function(){ka(!1),ya()},open:bt,bucketName:xa}),Ge&&Object(n.jsx)(hn,{deleteOpen:Ge,selectedBucket:xa,bucketEvent:tt,closeDeleteModalAndRefresh:function(e){qe(!1),e&&ya()}}),Pt&&Object(n.jsx)(xn,{closeVersioningModalAndRefresh:function(e){zt(!1),e&&ya()},modalOpen:Pt,selectedBucket:xa,versioningCurrentState:ht}),ta&&Object(n.jsx)(Tn,{deleteOpen:ta,selectedBucket:xa,closeDeleteModalAndRefresh:function(e){aa(!1),e&&je(!0)},ruleToDelete:ia}),Qe&&Object(n.jsx)(Bn,{open:Qe,closeModalAndRefresh:function(e){Ze(!1),e&&da(!0)},selectedBucket:xa,lifecycle:{id:""}}),ga&&Object(n.jsx)(qn,{open:ga,bucketName:xa,closeModalAndRefresh:function(e){fa(!1),e&&da(!0)}}),Object(n.jsx)(Ua,{label:"Bucket > ".concat(r.params.bucketName)}),Object(n.jsxs)(x.a,{container:!0,className:a.container,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(tn.a,{value:Ee,onChange:function(e,t){Ae(t)},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(n.jsx)(an.a,Object(j.a)({label:"Summary"},Yn(0))),Object(n.jsx)(an.a,Object(j.a)({label:"Events"},Yn(1))),Jt&&Object(n.jsx)(an.a,Object(j.a)({label:"Replication"},Yn(2))),Object(n.jsx)(an.a,Object(j.a)({label:"Lifecycle"},Yn(3))),Object(n.jsx)(an.a,Object(j.a)({label:"Policies"},Yn(4))),va&&Object(n.jsx)(an.a,Object(j.a)({label:"Users"},Yn(5)))]})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsxs)(Hn,{index:0,value:Ee,children:[Object(n.jsx)("br",{}),Object(n.jsx)(C.a,{className:a.paperContainer,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{xs:9,children:[Object(n.jsx)("h2",{children:"Details"}),Object(n.jsx)("hr",{className:a.hrClass}),Object(n.jsxs)("table",{width:"100%",children:[Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Access Policy:"}),Object(n.jsx)("td",{className:a.capitalizeFirst,children:Object(n.jsx)(g.a,{color:"primary",className:a.anchorButton,onClick:function(){we(!0)},children:Y?Object(n.jsx)(S.a,{color:"primary",size:16,variant:"indeterminate"}):Ca.toLowerCase()})}),Object(n.jsx)("td",{children:"Encryption:"}),Object(n.jsx)("td",{children:ve?Object(n.jsx)(S.a,{color:"primary",size:16,variant:"indeterminate"}):Object(n.jsx)(g.a,{color:"primary",className:a.anchorButton,onClick:function(){We(!0)},children:St?"Enabled":"Disabled"})})]}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Replication:"}),Object(n.jsx)("td",{className:a.doubleElement,children:Object(n.jsx)("span",{children:T.length?"Enabled":"Disabled"})}),ft?Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("td",{}),Object(n.jsx)("td",{})]}):Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("td",{children:"Object Locking:"}),Object(n.jsx)("td",{children:"Disabled"})]})]})]})]}),Object(n.jsxs)(x.a,{xs:3,className:a.reportedUsage,children:[Object(n.jsxs)(x.a,{container:!0,direction:"row",alignItems:"center",children:[Object(n.jsx)(x.a,{item:!0,className:a.icon,xs:2,children:Object(n.jsx)(vn,{})}),Object(n.jsx)(x.a,{item:!0,xs:10,children:Object(n.jsx)(v.a,{className:a.elementTitle,children:"Reported Usage"})})]}),Object(n.jsx)(v.a,{className:a.consumptionValue,children:ce(rt)})]})]})}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(C.a,{className:a.paperContainer,children:Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{xs:12,children:[Object(n.jsx)("h2",{children:"Versioning"}),Object(n.jsx)("hr",{className:a.hrClass}),Object(n.jsx)("table",{children:Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Versioning:"}),Object(n.jsx)("td",{children:ne?Object(n.jsx)(S.a,{color:"primary",size:16,variant:"indeterminate"}):Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(g.a,{color:"primary",className:a.anchorButton,onClick:function(){zt(!0)},children:ht?"Enabled":"Disabled"})})})]})})]})})}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),ft&&Object(n.jsx)(C.a,{className:a.paperContainer,children:Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{xs:12,children:[Object(n.jsx)("h2",{children:"Object Locking"}),Object(n.jsx)("hr",{className:a.hrClass}),Object(n.jsx)("table",{children:Object(n.jsx)("tr",{children:Object(n.jsxs)("td",{className:a.gridContainer,children:[Object(n.jsx)("td",{children:"Retention:"}),Object(n.jsx)("td",{children:ne?Object(n.jsx)(S.a,{color:"primary",size:16,variant:"indeterminate"}):Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(g.a,{color:"primary",className:a.anchorButton,onClick:function(){It(!0)},children:"Configure"})})})]})})})]})})})]}),Object(n.jsx)(Hn,{index:1,value:Ee,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:a.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:a.searchField,id:"search-resource",label:"",onChange:function(e){},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),size:"medium",onClick:function(){Me(!0)},children:"Subscribe to Event"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:wa,columns:[{label:"SQS",elementKey:"arn"},{label:"Events",elementKey:"events",renderFunction:function(e){return Object(n.jsx)(c.Fragment,{children:e.join(", ")})}},{label:"Prefix",elementKey:"prefix"},{label:"Suffix",elementKey:"suffix"}],isLoading:X,records:y,entityName:"Events",idField:"id"})})]})}),Jt&&Object(n.jsx)(Hn,{index:2,value:Ee,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:a.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:a.searchField,id:"search-resource",label:"",onChange:function(e){},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Ht&&Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),size:"medium",onClick:function(){ka(!0)},children:"Add Replication Rule"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:Ta,columns:[{label:"ID",elementKey:"id"},{label:"Priority",elementKey:"priority"},{label:"Destination",elementKey:"destination",renderFunction:function(e){return Object(n.jsx)(c.Fragment,{children:e.bucket.replace("arn:aws:s3:::","")})}},{label:"Delete Marker Replication",elementKey:"delete_marker_replication",renderFunction:function(e){return null}},{label:"Status",elementKey:"status"}],isLoading:X,records:T,entityName:"Replication Rules",idField:"id"})})]})}),Object(n.jsx)(Hn,{index:3,value:Ee,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:a.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:a.searchField,id:"search-resource",label:"",onChange:function(e){},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),size:"medium",onClick:function(){fa(!0)},children:"Add Lifecycle Rule"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:[],columns:Ea,isLoading:la,records:ma,entityName:"Lifecycle",customEmptyMessage:"There are no Lifecycle rules yet",idField:"id"})})]})}),Object(n.jsxs)(Hn,{index:4,value:Ee,children:[Object(n.jsx)("br",{}),Object(n.jsx)(ua,{itemActions:Na,columns:[{label:"Name",elementKey:"name"}],isLoading:X,records:I,entityName:"Policies",idField:"name"})]}),va&&Object(n.jsxs)(Hn,{index:5,value:Ee,children:[Object(n.jsx)("br",{}),Object(n.jsx)(ua,{itemActions:Aa,columns:[{label:"User",elementKey:"accessKey"}],isLoading:V,records:z,entityName:"Users",idField:"accessKey"})]})]})]})]})}))),$n=Object(s.b)((function(e){return{open:e.system.sidebarOpen}}),{setMenuOpen:z}),Xn=Object(l.g)($n((function(){return Object(n.jsx)(l.c,{history:b,children:Object(n.jsxs)(l.d,{children:[Object(n.jsx)(l.b,{path:"/buckets/:bucketName",component:Jn}),Object(n.jsx)(l.b,{path:"/",component:Xa}),Object(n.jsx)(l.b,{component:Ze})]})})}))),ec={setErrorSnackMessage:V},tc=Object(s.b)(null,ec)((function(e){var t=e.closeDeleteModalAndRefresh,a=e.deleteOpen,i=e.selectedPolicy,r=e.setErrorSnackMessage,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1];return Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete Policy"}),Object(n.jsxs)(ha.a,{children:[l&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete policy ",Object(n.jsx)("b",{children:i}),"?."]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:l,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){l||(d(!0),he.invoke("DELETE","/api/v1/policy?name=".concat(i)).then((function(e){d(!1),t(!0)})).catch((function(e){d(!1),r(e)})))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),ac={setErrorSnackMessage:V},nc=Object(s.b)(null,ac),cc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(nc((function(e){var t=e.classes,a=e.setErrorSnackMessage,r=Object(c.useState)([]),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(!1),j=Object(u.a)(d,2),m=j[0],h=j[1],p=Object(c.useState)(!1),O=Object(u.a)(p,2),v=O[0],y=O[1],S=Object(c.useState)(!1),C=Object(u.a)(S,2),k=C[0],w=C[1],N=Object(c.useState)(""),T=Object(u.a)(N,2),E=T[0],A=T[1],_=Object(c.useState)(""),I=Object(u.a)(_,2),F=I[0],M=I[1],L=Object(c.useState)(null),D=Object(u.a)(L,2),B=D[0],R=D[1];Object(c.useEffect)((function(){P()}),[]),Object(c.useEffect)((function(){m&&he.invoke("GET","/api/v1/policies").then((function(e){var t=Z()(e,"policies",[]);t.sort((function(e,t){return e.name>t.name?1:e.name ".concat(a.params.policyName)]})}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(tn.a,{value:d,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){j(t)},"aria-label":"policy-tabs",children:[Object(n.jsx)(an.a,{label:"Details"}),Object(n.jsx)(an.a,{label:"Users"})]})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[0===d&&Object(n.jsx)(C.a,{className:t.paperContainer,children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),T||(E(!0),he.invoke("POST","/api/v1/policies",{name:I,policy:D}).then((function(e){E(!1),r(!0)})).catch((function(e){E(!1),o(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.formScrollable,children:Object(n.jsx)(Sn,{label:"".concat(p?"Edit":"Write"," Policy"),value:D,onBeforeChange:function(e,t,a){B(a)}})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[!p&&Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){F(""),B("")},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:T||!W,children:"Save"})]}),T&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})}),1===d&&Object(n.jsx)(ua,{itemActions:U,columns:[{label:"Name",elementKey:"name"}],isLoading:!1,records:S,entityName:"Servers",idField:"name"})]})]})})]})}))),oc=Object(s.b)((function(e){return{open:e.system.sidebarOpen}}),{setMenuOpen:z}),sc=Object(l.g)(oc((function(){return Object(n.jsx)(l.c,{history:b,children:Object(n.jsxs)(l.d,{children:[Object(n.jsx)(l.b,{path:"/policies/:policyName",component:rc}),Object(n.jsx)(l.b,{path:"/",component:cc}),Object(n.jsx)(l.b,{component:Ze})]})})}))),lc=a(405),dc=a.n(lc);!function(e){e.singleValue="singleValue",e.linearGraph="linearGraph",e.barChart="barChart",e.pieChart="pieChart",e.singleRep="singleRep"}(Qn||(Qn={}));var bc="dashboardConfig",uc=[{w:1,h:2,x:0,y:0,i:"panel-0",minW:1,moved:!1,static:!1},{w:1,h:1,x:1,y:2,i:"panel-1",minW:1,moved:!1,static:!1},{w:1,h:1,x:1,y:3,i:"panel-2",minW:1,moved:!1,static:!1},{w:1,h:2,x:2,y:0,i:"panel-3",minW:1,moved:!1,static:!1},{w:2,h:2,x:3,y:0,i:"panel-4",minW:2,moved:!1,static:!1},{w:2,h:2,x:5,y:0,i:"panel-5",minW:2,moved:!1,static:!1},{w:1,h:1,x:0,y:2,i:"panel-6",minW:1,moved:!1,static:!1},{w:1,h:1,x:0,y:3,i:"panel-7",minW:1,moved:!1,static:!1},{w:1,h:1,x:2,y:2,i:"panel-8",minW:1,moved:!1,static:!1},{w:1,h:1,x:2,y:3,i:"panel-9",minW:1,moved:!1,static:!1},{w:2,h:2,x:3,y:2,i:"panel-10",minW:2,moved:!1,static:!1},{w:1,h:1,x:7,y:0,i:"panel-11",minW:1,moved:!1,static:!1},{w:1,h:1,x:7,y:1,i:"panel-12",minW:1,moved:!1,static:!1},{w:4,h:3,x:0,y:10,i:"panel-13",minW:2,moved:!1,static:!1},{w:4,h:3,x:0,y:4,i:"panel-14",minW:2,moved:!1,static:!1},{w:2,h:2,x:5,y:2,i:"panel-15",minW:2,moved:!1,static:!1},{w:8,h:3,x:0,y:7,i:"panel-16",minW:2,moved:!1,static:!1},{w:8,h:3,x:0,y:19,i:"panel-19",minW:2,moved:!1,static:!1},{w:1,h:1,x:7,y:2,i:"panel-20",minW:1,moved:!1,static:!1},{w:1,h:1,x:7,y:3,i:"panel-21",minW:1,moved:!1,static:!1},{w:4,h:3,x:4,y:4,i:"panel-22",minW:2,moved:!1,static:!1},{w:4,h:3,x:4,y:10,i:"panel-23",minW:2,moved:!1,static:!1},{w:4,h:3,x:0,y:13,i:"panel-24",minW:2,moved:!1,static:!1},{w:4,h:3,x:4,y:13,i:"panel-25",minW:2,moved:!1,static:!1},{w:4,h:3,x:0,y:16,i:"panel-26",minW:2,moved:!1,static:!1},{w:4,h:3,x:4,y:16,i:"panel-27",minW:2,moved:!1,static:!1},{w:1,h:1,x:1,y:0,i:"panel-28",minW:1,moved:!1,static:!1},{w:1,h:1,x:1,y:1,i:"panel-29",minW:1,moved:!1,static:!1}],jc=["#6992B7","#E2AD17","#22B573","#F7655E","#0071BC","#F9E6C5","#A6E8C4","#F4CECE","#ADD5E0"],mc=function(e){return be(e,"ns")},hc=function(e){return parseInt(e).toString(10)},pc=[{title:"Uptime",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-0",labelDisplayFunction:be},{title:"Total Online Disks",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-1"},{title:"Total Offline Disks",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-2"},{title:"Current Usable Capacity",data:[],dataOuter:[{name:"outer",value:100}],widgetConfiguration:{outerChart:{colorList:["#9c9c9c"],innerRadius:51,outerRadius:54,startAngle:-15,endAngle:195},innerChart:{colorList:jc,innerRadius:35,outerRadius:50,startAngle:-15,endAngle:195}},type:Qn.pieChart,layoutIdentifier:"panel-3",innerLabel:"N/A",labelDisplayFunction:ce},{title:"Data Usage Growth",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-4",yAxisFormatter:ce,xAxisFormatter:ue},{title:"Object size distribution",data:[],widgetConfiguration:[{dataKey:"a",color:jc[0],background:{fill:"rgba(0,0,0,0.1)"}}],customStructure:[{originTag:"LESS_THAN_1024_B",displayTag:"Less than 1024B"},{originTag:"BETWEEN_1024_B_AND_1_MB",displayTag:"Between 1024B and 1MB"},{originTag:"BETWEEN_1_MB_AND_10_MB",displayTag:"Between 1MB and 10MB"},{originTag:"BETWEEN_10_MB_AND_64_MB",displayTag:"Between 10MB and 64MB"},{originTag:"BETWEEN_64_MB_AND_128_MB",displayTag:"Between 64MB and 128MB"},{originTag:"BETWEEN_128_MB_AND_512_MB",displayTag:"Between 128MB and 512MB"},{originTag:"GREATER_THAN_512_MB",displayTag:"Greater than 512MB"}],type:Qn.barChart,layoutIdentifier:"panel-5"},{title:"Total Online Servers",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-6"},{title:"Total Offline Servers",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-7"},{title:"Number of Buckets",data:[],innerLabel:"N/A",type:Qn.singleRep,color:"#0071BC",fillColor:"#ADD5E0",layoutIdentifier:"panel-8"},{title:"Number of Objects",data:[],innerLabel:"N/A",type:Qn.singleRep,color:"#0071BC",fillColor:"#ADD5E0",layoutIdentifier:"panel-9"},{title:"S3 API Data Received Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-10",xAxisFormatter:ue,yAxisFormatter:ce},{title:"Total Open FDs",data:[],innerLabel:"N/A",type:Qn.singleRep,layoutIdentifier:"panel-11",color:"#22B573",fillColor:"#A6E8C4"},{title:"Total Goroutines",data:[],innerLabel:"N/A",type:Qn.singleRep,layoutIdentifier:"panel-12",color:"#F7655E",fillColor:"#F4CECE"},{title:"Node CPU Usage",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-13",yAxisFormatter:hc,xAxisFormatter:ue},{title:"S3 API Request Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-14",xAxisFormatter:ue},{title:"S3 API Data Sent Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-15",xAxisFormatter:ue,yAxisFormatter:ce},{title:"Internode Data Transfer",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-16",yAxisFormatter:ce,xAxisFormatter:ue},{title:"Node IO",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-19",yAxisFormatter:ce,xAxisFormatter:ue},{title:"Time Since Last Heal Activity",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-20",labelDisplayFunction:mc},{title:"Time Since Last Scan Activity",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-21",labelDisplayFunction:mc},{title:"S3 API Request Error Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-22",xAxisFormatter:ue},{title:"Node Memory Usage",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-23",xAxisFormatter:ue,yAxisFormatter:ce},{title:"Drive Used Capacity",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-24",xAxisFormatter:ue,yAxisFormatter:ce},{title:"Drives Free Inodes",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-25",disableYAxis:!0,xAxisFormatter:ue},{title:"Node Syscalls",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-26",yAxisFormatter:hc,xAxisFormatter:ue},{title:"Node File Descriptors",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-27",yAxisFormatter:hc,xAxisFormatter:ue},{title:"Total S3 Traffic Inbound",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-28",labelDisplayFunction:ce},{title:"Total S3 Traffic Outbound",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-29",labelDisplayFunction:ce}],Oc=function(e,t){if(0===e.length)return["","0"];switch(t){case"mean":var a=e.reduce((function(e,t){return e+parseFloat(t[1])}),0);return["",Math.floor(a/e.length).toString()];default:var n=e.sort((function(e,t){return e[0]-t[0]}));return n[n.length-1]}},gc=function(e){return pc.map((function(t){var a=e.find((function(e){return e.title.toLowerCase().trim()===t.title.toLowerCase().trim()}));if(!a)return t;var n=a.type;switch(t.type){case Qn.singleValue:if("stat"===n||"singlestat"===n){var c=Z()(a,"targets[0].result[0].values",[]);null===c&&(c=[]);var i=Z()(a,"options.reduceOptions.calcs[0]","lastNotNull"),r=Oc(c,i),o=t.labelDisplayFunction?t.labelDisplayFunction(r[1]):r[1];return Object(j.a)(Object(j.a)({},t),{},{data:o})}break;case Qn.pieChart:if("gauge"===n){var s=Z()(a,"targets[0].result",[]);null===s&&(s=[]);var l=Z()(a,"options.reduceOptions.calcs[0]","lastNotNull"),d=s.length>0?s[0].values:[],b=Oc(d,l),u=s.map((function(e){var t=Z()(e,"values",[]),a=Object.keys(e.metric),n=t.sort((function(e,t){return e[0]-t[0]})),c=e.metric[a[0]],i=n[n.length-1];return{name:c,value:parseInt(i)}})),m=t.labelDisplayFunction?t.labelDisplayFunction(b[1]):b[1];return Object(j.a)(Object(j.a)({},t),{},{data:u,innerLabel:m})}break;case Qn.linearGraph:if("graph"===n){var h=Z()(a,"targets",[]);null===h&&(h=[]);var p=[],O=[];h.forEach((function(e,t){var a=Z()(e,"result",[]),n=e.legendFormat;null===a&&(a=[]),a.forEach((function(e){var a=function(e,t){var a=Object.keys(e),n=new RegExp("{{(".concat(a.join("|"),")}}"),"g");return t.replace(n,(function(t){var a=t.replace(/({{|}})/g,"");return e[a]})).replace(/{{(.*?)}}/g,"")}(e.metric,n),c="key_".concat(t).concat(a);p.push({dataKey:c,keyLabel:a,lineColor:"",fillColor:""});var i=Z()(e,"values",[]);null===i&&(i=[]),i.forEach((function(e){var t=O.findIndex((function(t){return t.name===e[0]}));if(-1===t){var a={name:e[0]};a[c]=e[1],O.push(a)}else O[t][c]=e[1]}))}))}));var g=p.sort((function(e,t){return e.keyLabelt.keyLabel?1:0})).map((function(e,t){return Object(j.a)(Object(j.a)({},e),{},{lineColor:jc[t]||me(e.keyLabel),fillColor:jc[t]||me(e.keyLabel)})})),f=O.sort((function(e,t){return e.name-t.name}));return Object(j.a)(Object(j.a)({},t),{},{widgetConfiguration:g,data:f})}break;case Qn.barChart:if("bargauge"===n){var x=Z()(a,"targets[0].result",[]);null===x&&(x=[]);var v=function(e,t){return e[0]-t[0]},y=[];return y=t.customStructure?t.customStructure.map((function(e){var t=x.find((function(t){var a=Object.keys(t.metric);return t.metric[a[0]]===e.originTag})),a=Z()(t,"values",[]).sort(v),n=a[a.length-1]||["","0"];return{name:e.displayTag,a:parseInt(n[1])}})):x.map((function(e){var t=Object.keys(e.metric),a=e.metric[t[0]],n=Z()(e,"values",[]).sort(v),c=n[n.length-1]||["","0"];return{name:a,a:parseInt(c[1])}})),Object(j.a)(Object(j.a)({},t),{},{data:y})}break;case Qn.singleRep:if("stat"===n){var S=Z()(a,"targets[0].result[0].values",[]);null===S&&(S=[]);var C=Z()(a,"options.reduceOptions.calcs[0]","lastNotNull"),k=Oc(S,C),w=S.sort((function(e,t){return e[0]-t[0]})),N=[];1===w.length&&N.push({value:0}),w.forEach((function(e){N.push({value:parseInt(e[1])})}));var T=t.labelDisplayFunction?t.labelDisplayFunction(k[1]):k[1];return Object(j.a)(Object(j.a)({},t),{},{data:N,innerLabel:T})}}return t}))},fc=function(e){localStorage.setItem(bc,btoa(JSON.stringify(e)))},xc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({},ze),{},{contentContainer:Object(j.a)(Object(j.a)({},ze.contentContainer),{},{fontWeight:700,color:"#072045",fontSize:18,textAlign:"center"})}))}))((function(e){var t=e.title,a=e.data,c=e.classes;return Object(n.jsxs)("div",{className:c.singleValueContainer,children:[Object(n.jsx)("div",{className:c.titleContainer,children:t}),Object(n.jsx)("div",{className:c.contentContainer,children:a})]})})),vc=a(999),yc=a(982),Sc=a(986),Cc=a(224),kc=a(225),wc=a(418),Nc=a(233),Tc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},Ke))}))((function(e){var t=e.active,a=e.payload,c=e.label,i=e.linearConfiguration,r=e.yAxisFormatter,o=e.classes;return t?Object(n.jsxs)("div",{className:o.customTooltip,children:[Object(n.jsx)("div",{className:o.timeStampTitle,children:ue(c,!0)}),a&&a.map((function(e,t){return Object(n.jsxs)("div",{className:o.labelContainer,children:[Object(n.jsx)("div",{className:o.labelColor,style:{backgroundColor:i[t].lineColor}}),Object(n.jsx)("div",{className:o.itemValue,children:Object(n.jsxs)("span",{className:o.valueContainer,children:[i[t].keyLabel,":"," ",r(e.value)]})})]},"lbPl-".concat(t,"-").concat(i[t].keyLabel))}))]}):null})),Ec=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({},ze),{},{containerElements:{display:"flex",flexDirection:"column",height:"calc(100% - 18px)"},chartCont:{position:"relative",flexGrow:1,minHeight:"65%",height:1},legendChart:{display:"flex",flexWrap:"wrap",flex:"0 1 auto",maxHeight:"35%",margin:0,overflowY:"auto",position:"relative",textAlign:"center"}}))}))((function(e){var t=e.classes,a=e.title,c=e.linearConfiguration,i=e.data,r=e.hideYAxis,o=void 0!==r&&r,s=e.yAxisFormatter,l=void 0===s?function(e){return e}:s,d=e.xAxisFormatter,b=void 0===d?function(e){return e}:d,u=e.panelWidth,j=void 0===u?0:u,m=5;return 0!==j&&(m=j>400?5:j>350?10:j>300?15:j>250?20:30),Object(n.jsxs)("div",{className:t.singleValueContainer,children:[Object(n.jsx)("div",{className:t.titleContainer,children:a}),Object(n.jsxs)("div",{className:t.containerElements,children:[Object(n.jsx)("div",{className:t.chartCont,children:Object(n.jsx)(vc.a,{children:Object(n.jsxs)(yc.a,{data:i,margin:{top:5,right:20,left:o?20:5,bottom:0},children:[Object(n.jsx)(Sc.a,{strokeDasharray:"3 3",strokeWidth:1,strokeOpacity:.5}),Object(n.jsx)(Cc.a,{dataKey:"name",tickFormatter:function(e){return b(e)},interval:m,tick:{fontSize:"70%"},tickCount:10}),Object(n.jsx)(kc.a,{domain:[0,function(e){return 4*e}],hide:o,tickFormatter:function(e){return l(e)},tick:{fontSize:"70%"}}),c.map((function(e,t){return Object(n.jsx)(wc.a,{type:"monotone",dataKey:e.dataKey,stroke:e.lineColor,fill:e.fillColor,fillOpacity:.3},"area-".concat(e.dataKey,"-").concat(t.toString()))})),Object(n.jsx)(Nc.a,{content:Object(n.jsx)(Tc,{linearConfiguration:c,yAxisFormatter:l}),wrapperStyle:{zIndex:5e3}})]})})}),Object(n.jsx)("div",{className:t.legendChart,children:c.map((function(e,a){return Object(n.jsxs)("div",{className:t.singleLegendContainer,children:[Object(n.jsx)("div",{className:t.colorContainer,style:{backgroundColor:e.lineColor}}),Object(n.jsx)("div",{className:t.legendLabel,children:e.keyLabel})]},"legend-".concat(e.keyLabel,"-").concat(a.toString()))}))})]})]})})),Ac=a(987),_c=a(449),Ic=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},Ke))}))((function(e){var t=e.active,a=e.payload,c=e.label,i=e.barChartConfiguration,r=e.classes;return t?Object(n.jsxs)("div",{className:r.customTooltip,children:[Object(n.jsx)("div",{className:r.timeStampTitle,children:c}),a&&a.map((function(e,t){return Object(n.jsxs)("div",{className:r.labelContainer,children:[Object(n.jsx)("div",{className:r.labelColor,style:{backgroundColor:i[t].color}}),Object(n.jsx)("div",{className:r.itemValue,children:Object(n.jsx)("span",{className:r.valueContainer,children:e.value})})]},"pltiem-".concat(t,"-").concat(c))}))]}):null})),Fc=function(e){var t=e.x,a=e.y,c=e.payload;return Object(n.jsx)("text",{width:50,fontSize:"63%",textAnchor:"end",fill:"#333",transform:"translate(".concat(t,",").concat(a,")"),dy:3,children:c.value})},Mc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},ze))}))((function(e){var t=e.classes,a=e.title,c=e.barChartConfiguration,i=e.data;return Object(n.jsxs)("div",{className:t.singleValueContainer,children:[Object(n.jsx)("div",{className:t.titleContainer,children:a}),Object(n.jsx)("div",{className:t.contentContainer,children:Object(n.jsx)(vc.a,{children:Object(n.jsxs)(Ac.a,{data:i,layout:"vertical",barCategoryGap:1,children:[Object(n.jsx)(Cc.a,{type:"number",hide:!0}),Object(n.jsx)(kc.a,{dataKey:"name",type:"category",interval:0,tick:Object(n.jsx)(Fc,{}),tickLine:!1,axisLine:!1,width:150}),c.map((function(e){return Object(n.jsx)(_c.a,{dataKey:e.dataKey,fill:e.color,background:e.background},"bar-".concat(e.dataKey))})),Object(n.jsx)(Nc.a,{cursor:{fill:"rgba(255, 255, 255, 0.3)"},content:Object(n.jsx)(Ic,{barChartConfiguration:c})})]})})})]})})),Lc=a(1003),Dc=a(420),Bc=a(226),Rc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},ze))}))((function(e){var t=e.classes,a=e.title,c=e.pieChartConfiguration,i=e.dataInner,r=e.dataOuter,o=e.middleLabel,s=void 0===o?"":o,l=Z()(c,"innerChart.colorList",[]),d=Z()(c,"outerChart.colorList",[]);return Object(n.jsxs)("div",{className:t.singleValueContainer,children:[Object(n.jsx)("div",{className:t.titleContainer,children:a}),Object(n.jsx)("div",{className:t.contentContainer,children:Object(n.jsx)(vc.a,{children:Object(n.jsxs)(Lc.a,{margin:{top:5,bottom:5},children:[r&&Object(n.jsx)(Dc.a,{data:r,cx:"50%",cy:"50%",dataKey:"value",innerRadius:Z()(c,"outerChart.innerRadius",0),outerRadius:Z()(c,"outerChart.outerRadius","80%"),startAngle:Z()(c,"outerChart.startAngle",0),endAngle:Z()(c,"outerChart.endAngle",360),fill:"#201763",children:r.map((function(e,t){return Object(n.jsx)(Bc.a,{fill:"undefined"==typeof d[t]?"#393939":d[t]},"cellOuter-".concat(t))}))}),i&&Object(n.jsx)(Dc.a,{data:i,dataKey:"value",cx:"50%",cy:"50%",innerRadius:Z()(c,"innerChart.innerRadius",0),outerRadius:Z()(c,"innerChart.outerRadius","80%"),startAngle:Z()(c,"innerChart.startAngle",0),endAngle:Z()(c,"innerChart.endAngle",360),fill:"#201763",children:i.map((function(e,t){return Object(n.jsx)(Bc.a,{fill:"undefined"==typeof l[t]?"#393939":l[t]},"cell-".concat(t))}))}),s&&Object(n.jsx)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",fontWeight:600,fontSize:14,children:s})]})})})]})})),Pc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},ze))}))((function(e){var t=e.classes,a=e.title,c=e.data,i=e.color,r=e.fillColor,o=e.label;return Object(n.jsxs)("div",{className:t.singleValueContainer,children:[Object(n.jsx)("div",{className:t.titleContainer,children:a}),Object(n.jsx)("div",{className:t.contentContainer,children:Object(n.jsx)(vc.a,{children:Object(n.jsxs)(yc.a,{data:c,children:[Object(n.jsx)(kc.a,{domain:[0,function(e){return 2*e}],hide:!0}),Object(n.jsx)(wc.a,{type:"monotone",dataKey:"value",stroke:i,fill:r,fillOpacity:1}),Object(n.jsx)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",fontWeight:600,fontSize:18,fill:i,children:o})]})})})]})})),zc=a(424),Kc=a(60),Wc=a(995),Uc=a(425),Vc=a.n(Uc),Gc=Object(N.a)((function(e){return Object(k.a)({dateSelectorOverride:{height:40,border:"#EAEDEE 1px solid",marginLeft:15,backgroundColor:"#fff",padding:"0 16px",borderRadius:5,"&.MuiInput-underline:hover:not(.Mui-disabled):before":{borderBottom:0},"&:hover":{borderColor:"#000","&:before, &:after":{borderColor:"transparent",borderBottom:0}},"&:before, &:after":{borderColor:"transparent",borderBottom:0},"& input":{fontSize:12,fontWeight:600,color:"#393939"}},parentDateOverride:{flexGrow:1}})}))((function(e){var t=e.value,a=e.onChange,c=e.classes;return Object(n.jsx)(Kc.a,{utils:zc.a,children:Object(n.jsx)(Wc.a,{value:t,onChange:a,InputProps:{startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(Vc.a,{})}),className:c.dateSelectorOverride},label:"",ampm:!1,variant:"inline",className:c.parentDateOverride,format:"MMMM Do YYYY, h:mm a"})})})),qc=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Object(n.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})})})},Hc=Object(s.b)(null,{displayErrorMessage:V}),Yc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},Ie),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})),{},{widgetsContainer:{height:"calc(100vh - 250px)",paddingBottom:235},syncButton:{"&.MuiButton-root .MuiButton-iconSizeMedium > *:first-child":{fontSize:18}},actionsTray:Object(j.a)(Object(j.a)({},Ie.actionsTray),{},{padding:"0 10px"})}))}))(Hc((function(e){var t=e.classes,a=e.displayErrorMessage,i=Object(c.useState)(null),r=Object(u.a)(i,2),o=r[0],s=r[1],l=Object(c.useState)(null),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(!0),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(pc),v=Object(u.a)(f,2),y=v[0],S=v[1],C=function(e){var t=localStorage.getItem(bc);if(!t)return uc;var a=JSON.parse(atob(t));return 0===a.length||a.length>0&&!a[0].minW||0!==e&&a.length!==e?uc:a}(y.length),k=Object(c.useCallback)((function(e){var t=e/8+5,a=function(e,a){switch(e.type){case Qn.singleValue:return Object(n.jsx)(xc,{title:e.title,data:e.data});case Qn.pieChart:return Object(n.jsx)(Rc,{title:e.title,dataInner:e.data,dataOuter:e.dataOuter||null,pieChartConfiguration:e.widgetConfiguration,middleLabel:e.innerLabel});case Qn.linearGraph:return Object(n.jsx)(Ec,{title:e.title,data:e.data,linearConfiguration:e.widgetConfiguration,hideYAxis:e.disableYAxis,xAxisFormatter:e.xAxisFormatter,yAxisFormatter:e.yAxisFormatter,panelWidth:C[a]?t*C[a].w:t});case Qn.barChart:return Object(n.jsx)(Mc,{title:e.title,data:e.data,barChartConfiguration:e.widgetConfiguration});case Qn.singleRep:var c=e.fillColor?e.fillColor:e.color;return Object(n.jsx)(Pc,{title:e.title,data:e.data,label:e.innerLabel,color:e.color,fillColor:c});default:return null}};return y.map((function(e,t){return Object(n.jsx)("div",{children:a(e,t)},e.layoutIdentifier)}))}),[y,C]),w=Object(c.useCallback)((function(){var e=0;if(null!==o&&null!==b){var t=b.unix()-o.unix(),n=Math.floor(t/60);e=n<1?15:n}he.invoke("GET","/api/v1/admin/info?step=".concat(e,"&").concat(null!==o?"&start=".concat(o.unix()):"").concat(null!==o&&null!==b?"&":"").concat(null!==b?"end=".concat(b.unix()):"")).then((function(e){if(e.widgets){var t=gc(e.widgets);S(t)}else a("Widget information could not be retrieved at this time. Please try again");O(!1)})).catch((function(e){a(e),O(!1)}))}),[o,b,a]);return Object(c.useEffect)((function(){p&&w()}),[p,w]),Object(n.jsxs)(x.a,{container:!0,className:t.container,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(t.actionsTray," ").concat(t.timeContainers),children:[Object(n.jsx)("span",{className:t.label,children:"Start Time"}),Object(n.jsx)(Gc,{value:o,onChange:s}),Object(n.jsx)("span",{className:t.label,children:"End Time"}),Object(n.jsx)(Gc,{value:b,onChange:j}),Object(n.jsx)(g.a,{type:"button",variant:"contained",color:"primary",onClick:function(){O(!0)},startIcon:Object(n.jsx)(qc,{}),className:t.syncButton,children:"Sync"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.widgetsContainer,children:Object(n.jsx)(Bt.a,{style:{width:"100%",height:"auto",paddingBottom:45},children:function(e){var t=e.width,a=e.height,c=a<600?600:a;c>380&&(c=480);var i=t>1920?1920:t;return Object(n.jsx)(dc.a,{width:i,cols:8,containerPadding:[10,10],onLayoutChange:fc,layout:C,rowHeight:c/6,style:{margin:"0 auto",width:i},children:k(t)})}})})]})}))),Qc=function(){return Object(n.jsxs)(it.a,{viewBox:"0 0 15.834 17.375",children:[Object(n.jsx)("defs",{children:Object(n.jsxs)("linearGradient",{id:"a",y1:"0.5",x2:"1",y2:"0.5",gradientUnits:"objectBoundingBox",children:[Object(n.jsx)("stop",{offset:"0.044",stopColor:"#362585"}),Object(n.jsx)("stop",{offset:"0.301",stopColor:"#281b6f"}),Object(n.jsx)("stop",{offset:"1",stopColor:"#1e1560"})]})}),Object(n.jsxs)("g",{transform:"translate(0 0.375)",children:[Object(n.jsx)("circle",{style:{opacity:.1,fill:"url(#a)"},cx:"6.625",cy:"6.625",r:"6.625",transform:"translate(0 3.75)"}),Object(n.jsxs)("g",{transform:"translate(3.092)",children:[Object(n.jsx)("ellipse",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.75px"},cx:"6.183",cy:"1.244",rx:"6.183",ry:"1.244",transform:"translate(0)"}),Object(n.jsx)("path",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.75px"},d:"M-3722.174,1225.225l-1.687,10.292a.858.858,0,0,1-.578.669,12.182,12.182,0,0,1-3.918.647,12.187,12.187,0,0,1-3.894-.639.878.878,0,0,1-.6-.678q-.843-5.145-1.687-10.291",transform:"translate(3734.541 -1223.981)"})]})]})]})},Zc=function(){return Object(n.jsxs)(it.a,{viewBox:"0 0 18.344 17.009",children:[Object(n.jsx)("defs",{children:Object(n.jsxs)("linearGradient",{id:"a",y1:"0.5",x2:"1",y2:"0.5",gradientUnits:"objectBoundingBox",children:[Object(n.jsx)("stop",{offset:"0.044",stopColor:"#362585"}),Object(n.jsx)("stop",{offset:"0.301",stopColor:"#281b6f"}),Object(n.jsx)("stop",{offset:"1",stopColor:"#1e1560"})]})}),Object(n.jsxs)("g",{transform:"translate(0 0.25)",children:[Object(n.jsx)("ellipse",{style:{opacity:.1,fill:"url(#a)"},cx:"7.462",cy:"7.462",rx:"7.462",ry:"7.462",transform:"translate(0 1.835)"}),Object(n.jsx)("rect",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.5px"},width:"9.323",height:"9.323",transform:"translate(4.083)"}),Object(n.jsx)("rect",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.5px"},width:"8.223",height:"8.223",transform:"translate(9.871 5.307)"})]})]})},Jc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})),{},{paper:{padding:e.spacing(2),display:"flex",overflow:"auto",flexDirection:"column",border:"#eaedee 1px solid",borderRadius:5,boxShadow:"none"},fixedHeight:{height:165,minWidth:247,marginRight:20,padding:"25px 28px","& svg":{maxHeight:18}},consumptionValue:{color:"#000000",fontSize:"60px",fontWeight:"bold"},icon:{marginRight:10,color:"#777777"},notationContainer:{display:"flex"},dashboardBG:{width:390,height:255,zIndex:500,position:"absolute",backgroundSize:"fill",backgroundImage:"url(/images/BG_IllustrationDarker.svg)",backgroundPosition:"right bottom",right:0,bottom:0,backgroundRepeat:"no-repeat"},dashboardContainer:{zIndex:600,position:"absolute"},elementTitle:{fontWeight:500,color:"#777777",fontSize:14,marginTop:-9},smallUnit:{fontSize:20}}))}))((function(e){var t=e.classes,a=e.usage,i=Object(xe.a)(t.paper,t.fixedHeight),r=function(e){return void 0===e?0:e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")};return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("div",{className:t.dashboardBG}),Object(n.jsx)(x.a,{container:!0,className:t.dashboardContainer,children:Object(n.jsx)(x.a,{container:!0,spacing:3,className:t.container,children:Object(n.jsxs)(x.a,{item:!0,className:t.notationContainer,children:[Object(n.jsxs)(C.a,{className:i,children:[Object(n.jsxs)(x.a,{container:!0,direction:"row",alignItems:"center",children:[Object(n.jsx)(x.a,{item:!0,className:t.icon,children:Object(n.jsx)(Qc,{})}),Object(n.jsx)(x.a,{item:!0,children:Object(n.jsx)(v.a,{className:t.elementTitle,children:"All buckets"})})]}),Object(n.jsx)(v.a,{className:t.consumptionValue,children:a?r(a.buckets):0})]}),Object(n.jsxs)(C.a,{className:i,children:[Object(n.jsxs)(x.a,{container:!0,direction:"row",alignItems:"center",children:[Object(n.jsx)(x.a,{item:!0,className:t.icon,children:Object(n.jsx)(vn,{})}),Object(n.jsx)(x.a,{item:!0,children:Object(n.jsx)(v.a,{className:t.elementTitle,children:"Usage"})})]}),Object(n.jsx)(v.a,{className:t.consumptionValue,children:a?function(e){if(void 0===e)return"0";var a=ce(e).split(" ");return 2!==a.length?a.join(" "):Object(n.jsxs)(c.Fragment,{children:[a[0],Object(n.jsx)("span",{className:t.smallUnit,children:a[1]})]})}(a.usage+""):0})]}),Object(n.jsxs)(C.a,{className:i,children:[Object(n.jsxs)(x.a,{container:!0,direction:"row",alignItems:"center",children:[Object(n.jsx)(x.a,{item:!0,className:t.icon,children:Object(n.jsx)(Zc,{})}),Object(n.jsx)(x.a,{item:!0,children:Object(n.jsxs)(v.a,{className:t.elementTitle,children:[" ","Total Objects"]})})]}),Object(n.jsx)(v.a,{className:t.consumptionValue,children:a?r(a.objects):0})]})]})})})]})})),$c=Object(s.b)(null,{displayErrorMessage:V}),Xc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))($c((function(e){var t=e.classes,a=e.displayErrorMessage,i=Object(c.useState)(!0),r=Object(u.a)(i,2),o=r[0],s=r[1],l=Object(c.useState)(null),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useCallback)((function(){he.invoke("GET","/api/v1/admin/info").then((function(e){j(e),s(!1)})).catch((function(e){a(e),s(!1)}))}),[j,s,a]);Object(c.useEffect)((function(){o&&m()}),[o,m]);var h=Z()(b,"widgets",null);return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(Ua,{label:"Dashboard"}),Object(n.jsx)(x.a,{container:!0,children:o?Object(n.jsx)(x.a,{item:!0,xs:12,className:t.container,children:Object(n.jsx)(y.a,{})}):Object(n.jsx)(c.Fragment,{children:null!==h?Object(n.jsx)(Yc,{}):Object(n.jsx)(Jc,{usage:b})})})]})}))),ei=a(914),ti=a(989),ai=a(426),ni=a.n(ai),ci=a(988),ii=a(990),ri=a(959),oi=a(991),si=a.p+"static/media/minio_console_logo.0837460e.svg",li=a.p+"static/media/minio_operator_logo.1312b7c9.svg",di=[{label:"",group:"common",collapsible:!1},{label:"User",group:"User",collapsible:!0},{label:"Admin",group:"Admin",collapsible:!0},{label:"Tools",group:"Tools",collapsible:!0},{label:"Operator",group:"Operator",collapsible:!1},{label:"",group:"License",collapsible:!1}],bi=a(429),ui=a.n(bi),ji=function(){return Object(n.jsx)(it.a,{children:Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 11",children:[Object(n.jsx)("path",{fill:"#fff",d:"M11 11H0V2h11v9zM2 8v1h7V8zm0-3v1h5V5z"}),Object(n.jsxs)("g",{fill:"#07274a",stroke:"#fdfdfd",strokeWidth:"0.5",transform:"translate(7)",children:[Object(n.jsx)("circle",{cx:"3",cy:"3",r:"3",stroke:"none"}),Object(n.jsx)("circle",{cx:"3",cy:"3",r:"2.75",fill:"none"})]}),Object(n.jsx)("path",{fill:"none",stroke:"#fff",strokeWidth:"0.5",d:"M8.73 2.794l.954.953 1.471-1.471"})]})})},mi=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12.122 10.571",children:Object(n.jsxs)("g",{transform:"translate(0 0.5)",children:[Object(n.jsx)("path",{style:{fill:"none",stroke:"rgba(255,255,255,0.8)"},d:"M4816.27,3755.205v-2.939h8.539v9.571h-8.539v-2.932",transform:"translate(-4813.187 -3752.266)"}),Object(n.jsx)("path",{style:{fill:"none",stroke:"rgba(255,255,255,0.8)"},d:"M4813.187,3757.052h8.081",transform:"translate(-4813.187 -3752.266)"}),Object(n.jsx)("path",{style:{fill:"none",stroke:"rgba(255,255,255,0.8)"},d:"M4806.5,3756.511l2.265,2.063-2.265,2.063",transform:"translate(-4800.808 -3753.863)"})]})})})},hi=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:Object(n.jsxs)("g",{transform:"translate(-518 -361)",children:[Object(n.jsx)("path",{d:"M-126,0V10h10V0Zm1.5,8.5V2.95h7V8.5Z",transform:"translate(644 361)"}),Object(n.jsx)("rect",{width:"2",height:"1",transform:"translate(520.272 364.772)"})]})})})},pi=function(){return Object(n.jsx)(it.a,{children:Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10.014 9.993",children:[Object(n.jsx)("path",{className:"a",d:"M9.162,5.971h0L8.192,5,9.346,3.846a2.257,2.257,0,0,0,0-3.192,2.311,2.311,0,0,0-3.192,0L5,1.808,4.029.837,3.846.654a2.311,2.311,0,0,0-3.192,0,2.257,2.257,0,0,0,0,3.192l.184.183h0L1.808,5,.654,6.154A2.257,2.257,0,0,0,3.846,9.346L5,8.192l.971.971.183.183A2.257,2.257,0,0,0,9.346,6.154Zm-2.29-4.6a1.27,1.27,0,0,1,1.757,0,1.242,1.242,0,0,1,0,1.757L7.475,4.283,5.717,2.525Zm-5.5,1.757A1.243,1.243,0,0,1,3.129,1.371l.183.183L1.555,3.312Zm1.757,5.5a1.27,1.27,0,0,1-1.757,0,1.242,1.242,0,0,1,0-1.757L2.525,5.717,4.283,7.475Zm2.843-.9-.254-.253L2.525,4.283l-.253-.254L4.029,2.272l.254.253L7.475,5.717l.253.254Zm2.657.9a1.271,1.271,0,0,1-1.757,0l-.183-.183L8.446,6.688l.183.183h0a1.241,1.241,0,0,1,0,1.757Z",transform:"translate(0.007 -0.014)"}),Object(n.jsx)("circle",{cx:"0.5",cy:"0.5",r:"0.5",transform:"translate(4.507 4.486)"}),Object(n.jsx)("circle",{cx:"0.5",cy:"0.5",r:"0.5",transform:"translate(3.507 3.486)"}),Object(n.jsx)("circle",{cx:"0.5",cy:"0.5",r:"0.5",transform:"translate(5.507 5.486)"})]})})},Oi=a(427),gi=a.n(Oi),fi=a(428),xi=a.n(fi),vi=Object(s.b)((function(e){return{open:e.system.loggedIn,operatorMode:e.system.operatorMode}}),{userLoggedIn:P}),yi=vi(Object(N.a)((function(e){return Object(k.a)({logo:{paddingTop:25,marginBottom:30,paddingLeft:45,"& img":{width:120}},menuList:{"& .active":{borderTopLeftRadius:2,borderBottomLeftRadius:2,color:"#fff",backgroundColor:"rgba(255, 255, 255, .18)","& .MuiSvgIcon-root":{color:"white"},"& .MuiTypography-root":{color:"#fff",fontWeight:700}},"& .MuiSvgIcon-root":{fontSize:16,color:"rgba(255, 255, 255, 0.8)",maxWidth:14},"& .MuiListItemIcon-root":{minWidth:25},"& .MuiTypography-root":{fontSize:12,color:"rgba(255, 255, 255, 0.8)"},"& .MuiListItem-gutters":{paddingRight:0,fontWeight:300},"& .MuiListItem-root":{padding:"2px 0 2px 16px",marginBottom:8,marginLeft:30,width:"calc(100% - 30px)"},"& .MuiCollapse-container .MuiCollapse-wrapper .MuiCollapse-wrapperInner .MuiDivider-root":{backgroundColor:"rgba(112,112,112,0.5)",marginBottom:12,height:1}},extraMargin:{"&.MuiListItem-gutters":{marginLeft:5}},groupTitle:{color:"#fff",fontSize:10,textTransform:"uppercase",fontWeight:700,marginBottom:3,cursor:"pointer",userSelect:"none",display:"flex",justifyContent:"space-between"},subTitleMenu:{fontWeight:700,marginLeft:10,"&.MuiTypography-root":{fontSize:13,color:"#fff"}},selectorArrow:{marginRight:20,marginTop:1,display:"inline-block",width:0,height:0,borderStyle:"solid",borderWidth:"4px 4px 0 4px",borderColor:"rgba(255, 255, 255, .29) transparent transparent transparent",transform:"rotateZ(0deg)",transitionDuration:"0.2s"},selectorArrowOpen:{transform:"rotateZ(180deg)"}})}))((function(e){var t=e.userLoggedIn,a=e.classes,r=e.pages,o=e.operatorMode,s=Object(c.useState)(function(){var e=[];return di.forEach((function(t){t.collapsible&&(e[t.group]=!0)})),e}()),l=Object(u.a)(s,2),d=l[0],m=l[1],h=[{group:"common",type:"item",component:Vt.b,to:"/dashboard",name:"Dashboard",icon:Object(n.jsx)(lt,{})},{group:"User",type:"item",component:Vt.b,to:"/object-browser",name:"Object Browser",icon:Object(n.jsx)(ni.a,{})},{group:"User",type:"item",component:Vt.b,to:"/account",name:"Account",icon:Object(n.jsx)(ut,{})},{group:"Admin",type:"item",component:Vt.b,to:"/buckets",name:"Buckets",icon:Object(n.jsx)(dt,{})},{group:"Admin",type:"item",component:Vt.b,to:"/users",name:"Users",icon:Object(n.jsx)(bt,{})},{group:"Admin",type:"item",component:Vt.b,to:"/groups",name:"Groups",icon:Object(n.jsx)(jt,{})},{group:"Admin",type:"item",component:Vt.b,to:"/policies",name:"IAM Policies",icon:Object(n.jsx)(mt,{})},{group:"Tools",type:"item",component:Vt.b,to:"/logs",name:"Logs",icon:Object(n.jsx)(hi,{})},{group:"Tools",type:"item",component:Vt.b,to:"/watch",name:"Watch",icon:Object(n.jsx)(gt,{})},{group:"Tools",type:"item",component:Vt.b,to:"/trace",name:"Trace",icon:Object(n.jsx)(ht,{})},{group:"Tools",type:"item",component:Vt.b,to:"/heal",name:"Heal",icon:Object(n.jsx)(pi,{})},{group:"Tools",type:"item",component:Vt.b,to:"/health-info",name:"Diagnostic",icon:Object(n.jsx)(gi.a,{})},{group:"Admin",type:"item",component:Vt.b,to:"/settings",name:"Settings",icon:Object(n.jsx)(pt,{})},{group:"Operator",type:"item",component:Vt.b,to:"/tenants",name:"Tenants",icon:Object(n.jsx)(Ot,{})},{group:"Operator",type:"item",component:Vt.b,to:"/storage",name:"Storage",icon:Object(n.jsx)(xi.a,{})}],p=r.reduce((function(e,t){return e[t]=!0,e}),{}),O={group:"License",type:"item",component:Vt.b,to:"/documentation",name:"Documentation",icon:Object(n.jsx)(ui.a,{}),forceDisplay:!0};p.hasOwnProperty("/tenants")?h.push({group:"Operator",type:"item",component:Vt.b,to:"/license",name:"License",icon:Object(n.jsx)(ji,{})},Object(j.a)(Object(j.a)({},O),{},{group:"Operator",onClick:function(e){e.preventDefault(),window.open("https://docs.min.io/?ref=".concat(o?"op":"con"),"_blank")}})):h.push({group:"License",type:"item",component:Vt.b,to:"/license",name:"License",icon:Object(n.jsx)(ji,{})},Object(j.a)(Object(j.a)({},O),{},{group:"License",onClick:function(e){e.preventDefault(),window.open("https://docs.min.io/?ref=".concat(o?"op":"con"),"_blank")}}));var g=h.filter((function(e){return p[e.to]||e.forceDisplay||"item"!==e.type}));return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("div",{className:a.logo,children:Object(n.jsx)("img",{src:o?li:si,alt:"logo"})}),Object(n.jsxs)(ri.a,{className:a.menuList,children:[di.map((function(e,t){var c=(g||[]).filter((function(t){return t.group===e.group}));return 0===c.filter((function(e){return"title"!==e.type})).length?null:Object(n.jsxs)(i.a.Fragment,{children:[""!==e.label&&Object(n.jsxs)(ei.a,{className:a.groupTitle,onClick:function(){e.collapsible&&function(e){var t=Object(j.a)({},d);t[e]=!t[e],m(t)}(e.group)},children:[Object(n.jsx)("span",{children:e.label}),e.collapsible&&Object(n.jsx)("span",{className:"".concat(a.selectorArrow," ").concat(d[e.group]?a.selectorArrowOpen:"")})]}),Object(n.jsxs)(ci.a,{in:!e.collapsible||d[e.group],timeout:"auto",unmountOnExit:!0,children:[c.map((function(e){switch(e.type){case"item":return Object(n.jsxs)(ei.a,{button:!0,onClick:e.onClick,component:e.component,to:e.to,className:e.extraMargin?a.extraMargin:null,children:[e.icon&&Object(n.jsx)(ti.a,{children:e.icon}),e.name&&Object(n.jsx)(ii.a,{primary:e.name})]},e.to);case"title":return Object(n.jsx)(ei.a,{component:e.component,className:a.subTitleMenu,children:e.name},e.name);default:return null}})),Object(n.jsx)(oi.a,{})]},"menuGroup-".concat(e.group))]},"menuElem-".concat(t.toString()))})),Object(n.jsxs)(ei.a,{button:!0,onClick:function(){var e=function(){ie(),t(!1),localStorage.setItem("userLoggedIn",""),b.push("/login")};he.invoke("POST","/api/v1/logout").then((function(){e()})).catch((function(t){console.log(t),e()}))},children:[Object(n.jsx)(ti.a,{children:Object(n.jsx)(mi,{})}),Object(n.jsx)(ii.a,{primary:"Logout"})]})]})]})}))),Si={setModalErrorSnackMessage:q},Ci=Object(s.b)(null,Si),ki=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({jsonPolicyEditor:{minHeight:400,width:"100%"},buttonContainer:{textAlign:"right"},infoDetails:{color:"#393939",fontSize:12,fontStyle:"italic",marginBottom:"8px"},containerScrollable:{maxHeight:"calc(100vh - 300px)",overflowY:"auto"}},we))}))(Ci((function(e){var t=e.classes,a=e.open,i=e.closeModalAndRefresh,r=e.setModalErrorSnackMessage,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(""),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(!1),O=Object(u.a)(p,2),f=O[0],v=O[1];Object(c.useEffect)((function(){l&&he.invoke("POST","/api/v1/service-accounts",{policy:m}).then((function(e){d(!1),i(e)})).catch((function(e){d(!1),r(e)}))}),[l,d,r,m,i]);return Object(n.jsx)(ga,{modalOpen:a,onClose:function(){i(null)},title:"Create Service Account",children:Object(n.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault(),d(!0)}(e)},children:[Object(n.jsxs)(x.a,{container:!0,className:t.containerScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.infoDetails,children:"Service Accounts inherit the policy explicitly attached to the parent user and the policy attached to each group in which the parent user has membership. You can specify an optional JSON-formatted policy below to restrict the Service Account access to a subset of actions and resources explicitly allowed for the parent user. You cannot modify the Service Account optional policy after saving."})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"locking",id:"locking",name:"locking",checked:f,onChange:function(e){v(e.target.checked)},label:"Restrict with policy",indicatorLabels:["On","Off"]})}),f&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Sn,{value:m,onBeforeChange:function(e,t,a){h(a)}})})]}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){h("")},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:l,children:"Create"})]}),l&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})]})})}))),wi={setErrorSnackMessage:V},Ni=Object(s.b)(null,wi),Ti=Object(N.a)((function(e){return Object(k.a)({wrapText:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"}})}))(Ni((function(e){var t=e.classes,a=e.closeDeleteModalAndRefresh,i=e.deleteOpen,r=e.selectedServiceAccount,o=e.setErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1];Object(c.useEffect)((function(){d&&he.invoke("DELETE","/api/v1/service-accounts/".concat(r)).then((function(){b(!1),a(!0)})).catch((function(e){b(!1),o(e)}))}),[d,a,r,o]);return Object(n.jsxs)(ja.a,{open:i,onClose:function(){a(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete ServiceAccount"}),Object(n.jsxs)(ha.a,{children:[d&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete service account"," ",Object(n.jsx)("b",{className:t.wrapText,children:r}),"?"]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){a(!1)},color:"primary",disabled:d,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){null!=r&&b(!0)},color:"secondary",autoFocus:!0,children:"Delete"})]})]})}))),Ei=Object(N.a)((function(e){return Object(k.a)({warningBlock:{color:"red"},buttonContainer:{textAlign:"right"},credentialsPanel:{overflowY:"auto",maxHeight:350}})}))((function(e){var t=e.classes,a=e.newServiceAccount,c=e.open,r=e.closeModal,o=e.entity;if(!a)return null;var s=Z()(a,"console",null);return Object(n.jsx)(ga,{modalOpen:c,onClose:function(){r()},title:"New ".concat(o," Created"),children:Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:["A new ",o," has been created with the following details:",s&&Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.credentialsPanel,children:[Object(n.jsx)("strong",{children:"Console Credentials"}),Array.isArray(s)&&s.map((function(e,t){return Object(n.jsxs)("ul",{children:[Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Access Key:"})," ",e.accessKey]}),Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Secret Key:"})," ",e.secretKey]})]},"creds-item-".concat(t.toString()))})),!Array.isArray(s)&&Object(n.jsxs)("ul",{children:[Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Access Key:"})," ",s.accessKey]}),Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Secret Key:"})," ",s.secretKey]})]})]})}),Object(n.jsx)(v.a,{component:"p",variant:"body1",className:t.warningBlock,children:"Write these down, as this is the only time the secret will be displayed."})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)(g.a,{onClick:function(){var e={};if(s)if(Array.isArray(s)){var t=s.map((function(e){return{access_key:e.accessKey,secret_key:e.secretKey}}));e={console:Object(Je.a)(t)}}else e={console:[{access_key:s.accessKey,secret_key:s.secretKey}]};!function(e,t){var a=document.createElement("a");a.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),a.setAttribute("download",e),a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a)}("credentials.json",JSON.stringify(Object(j.a)({},e)))},color:"primary",children:"Download"}),Object(n.jsx)(g.a,{onClick:function(){r()},color:"secondary",autoFocus:!0,children:"Done"})]})]})})})})),Ai=function(e,t){return e.accessKey>t.accessKey?1:e.accessKeyt.name?1:e.namet?1:e0&&m.length>0&&f.length>0),children:"Save"})}),k&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})}):null}))),Bi=Object(s.b)(null,{displayErrorMessage:V}),Ri=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"480px",minWidth:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},imageIcon:{height:"100%"},iconRoot:{textAlign:"center"}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Bi((function(e){var t=e.classes,a=e.displayErrorMessage,r=e.changePassword,o=Object(c.useState)([]),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(!1),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(""),O=Object(u.a)(p,2),y=O[0],S=O[1],C=Object(c.useState)(!1),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(!1),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(null),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(!1),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)(null),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Object(c.useState)(!1),G=Object(u.a)(V,2),q=G[0],H=G[1];Object(c.useEffect)((function(){Y()}),[]),Object(c.useEffect)((function(){m&&he.invoke("GET","/api/v1/service-accounts").then((function(e){var t=e.sort(Ii);h(!1),d(t)})).catch((function(e){a(e),h(!1)}))}),[m,h,d,a]);var Y=function(){h(!0)},Q=[{type:"delete",onClick:function(e){L(e),_(!0)}}],Z=l.filter((function(e){return e.toLowerCase().includes(y.toLowerCase())}));return Object(n.jsxs)(i.a.Fragment,{children:[w&&Object(n.jsx)(ki,{open:w,closeModalAndRefresh:function(e){!function(e){if(N(!1),Y(),null!==e){var t={console:{accessKey:"".concat(e.accessKey),secretKey:"".concat(e.secretKey)}};U(t),P(!0)}}(e)}}),A&&Object(n.jsx)(Ti,{deleteOpen:A,selectedServiceAccount:M,closeDeleteModalAndRefresh:function(e){!function(e){_(!1),e&&Y()}(e)}}),R&&Object(n.jsx)(Ei,{newServiceAccount:W,open:R,closeModal:function(){P(!1),U(null)},entity:"Service Account"}),Object(n.jsx)(Ua,{label:"Account"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[r&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"h5",component:"h5",children:"Settings"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Di,{open:q,closeModal:function(){return H(!1)}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(Mi.a,{}),onClick:function(){return H(!0)},children:"Change Password"})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)("br",{}),Object(n.jsx)(oi.a,{}),Object(n.jsx)("br",{})]})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"h5",component:"h5",children:"Service Accounts"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Service Accounts",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){S(e.target.value)}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){N(!0),L(null)},children:"Create service account"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{isLoading:m,records:Z,entityName:"Service Accounts",idField:"",columns:[{label:"Service Account",elementKey:""}],itemActions:Q})})]})})]})}))),Pi=a(227),zi=a.n(Pi),Ki={setModalErrorSnackMessage:q},Wi=Object(s.b)(null,Ki),Ui=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column",paddingTop:15,boxShadow:"none"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noFound:{textAlign:"center",padding:"10px 0"},tableContainer:{maxHeight:200},stickyHeader:{backgroundColor:"#fff"},actionsTitle:{fontWeight:600,color:"#000",fontSize:16,alignSelf:"center"},tableBlock:{marginTop:15},filterField:{width:375,fontWeight:600,"& .input":{"&::placeholder":{fontWeight:600,color:"#000"}}}},Ie),De))}))(Wi((function(e){var t=e.classes,a=e.selectedGroups,r=e.setSelectedGroups,o=e.setModalErrorSnackMessage,s=Object(c.useState)([]),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(!1),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(""),g=Object(u.a)(O,2),v=g[0],S=g[1],k=Object(c.useCallback)((function(){he.invoke("GET","/api/v1/groups").then((function(e){var t=Z()(e,"groups",[]);t||(t=[]),b(t.sort(Ii)),p(!1)})).catch((function(e){o(e),p(!1)}))}),[o]);Object(c.useEffect)((function(){p(!0)}),[]),Object(c.useEffect)((function(){h&&k()}),[h,k]);var w=a||[],N=d.filter((function(e){return e.includes(v)}));return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(C.a,{className:t.paper,children:[h&&Object(n.jsx)(y.a,{}),null!=d&&d.length>0?Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)("span",{className:t.actionsTitle,children:"Assign Groups"}),Object(n.jsx)(f.a,{placeholder:"Filter by Group",className:t.filterField,id:"search-resource",label:"",InputProps:{startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){S(e.target.value)}})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.tableBlock,children:Object(n.jsx)(ua,{columns:[{label:"Group",elementKey:""}],onSelect:function(e){var t=e.target,a=t.value,n=t.checked,c=Object(Je.a)(w);return n?c.push(a):c=c.filter((function(e){return e!==a})),r(c),c},selectedItems:w,isLoading:h,records:N,entityName:"Groups",idField:"",customPaperHeight:t.multiSelectTable})})]}):Object(n.jsx)("div",{className:t.noFound,children:"No Groups Available"})]})})})}))),Vi={setModalErrorSnackMessage:q},Gi=Object(s.b)(null,Vi),qi=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},we))}))(Gi((function(e){var t=e.classes,a=e.closeModalAndRefresh,r=e.selectedUser,o=e.open,s=e.setModalErrorSnackMessage,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(""),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(""),v=Object(u.a)(f,2),S=v[0],C=v[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)([]),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)([]),M=Object(u.a)(F,2),L=M[0],D=M[1],B=Object(c.useCallback)((function(){if(!r)return null;he.invoke("GET","/api/v1/users/".concat(r.accessKey)).then((function(e){j(!1),O(e.accessKey),I(e.memberOf||[]),D(e.memberOf||[]),T("enabled"===e.status)})).catch((function(e){j(!1),s(e)}))}),[r,s]);Object(c.useEffect)((function(){null==r?(O(""),C(""),I([])):B()}),[r,B]);var R=""!==p.trim()&&(""!==S.trim()&&null===r||null!==r);return Object(n.jsxs)(ga,{onClose:function(){a()},modalOpen:o,title:null!==r?"Edit User":"Create User",children:[null!==r&&Object(n.jsx)("div",{className:t.floatingEnabled,children:Object(n.jsx)(Ba,{indicatorLabels:["Enabled","Disabled"],checked:N,value:"user_enabled",id:"user-status",name:"user-status",onChange:function(e){T(e.target.checked)},switchOnly:!0})}),Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b||(j(!0),null!==r?he.invoke("PUT","/api/v1/users/".concat(r.accessKey),{status:N?"enabled":"disabled",groups:_}).then((function(e){j(!1),a()})).catch((function(e){j(!1),s(e)})):he.invoke("POST","/api/v1/users",{accessKey:p,secretKey:S,groups:_}).then((function(e){j(!1),a()})).catch((function(e){j(!1),s(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(va,{id:"accesskey-input",name:"accesskey-input",label:"Access Key",value:p,onChange:function(e){O(e.target.value)},disabled:null!==r}),null!==r?Object(n.jsx)(Ya,{label:"Current Groups",content:L.join(", ")}):Object(n.jsx)(va,{id:"standard-multiline-static",name:"standard-multiline-static",label:"Secret Key",type:"password",value:S,onChange:function(e){C(e.target.value)},autoComplete:"current-password"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ui,{selectedGroups:_,setSelectedGroups:function(e){I(e)}})})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){null===r?(O(""),C(""),I([])):I([])},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:b||!R,children:"Save"})]}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})]})}))),Hi={setErrorSnackMessage:V},Yi=Object(s.b)(null,Hi)((function(e){var t=e.closeDeleteModalAndRefresh,a=e.deleteOpen,i=e.selectedUser,r=e.setErrorSnackMessage,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1];return null===i?Object(n.jsx)("div",{}):Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete User"}),Object(n.jsxs)(ha.a,{children:[l&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete user ",Object(n.jsx)("b",{children:i.accessKey}),"?"]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:l,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){l||null!=i&&(d(!0),he.invoke("DELETE","/api/v1/users/".concat(i.accessKey),{id:i.id}).then((function(e){d(!1),t(!0)})).catch((function(e){d(!1),r(e)})))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),Qi={setModalErrorSnackMessage:q},Zi=Object(s.b)(null,Qi),Ji=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},we))}))(Zi((function(e){var t=e.open,a=e.checkedUsers,r=e.closeModalAndRefresh,o=e.classes,s=e.setModalErrorSnackMessage,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(!1),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)([]),v=Object(u.a)(f,2),S=v[0],C=v[1];Object(c.useEffect)((function(){b&&(S.length>0?he.invoke("PUT","/api/v1/users-groups-bulk",{groups:S,users:a}).then((function(){j(!1),O(!0)})).catch((function(e){j(!1),s(e)})):(j(!1),s("You need to select at least one group to assign")))}),[b,j,r,S,a,s]);return Object(n.jsx)(ga,{modalOpen:t,onClose:function(){r(p)},title:p?"The selected users were added to the following groups.":"Add Users to Group",children:p?Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(Ya,{label:"Groups",content:S.join(", ")}),Object(n.jsx)(Ya,{label:"Users",content:a.join(", ")})]}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{})]}):Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),j(!0)},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:o.formScrollable,children:[Object(n.jsx)(Ya,{label:"Selected Users",content:a.join(", ")}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ui,{selectedGroups:S,setSelectedGroups:C})})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:o.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:o.clearButton,onClick:function(){C([])},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:b||S.length<1,children:"Save"})]}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),$i=Object(s.b)(null,{setModalErrorSnackMessage:q}),Xi=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column",paddingTop:15,boxShadow:"none"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noFound:{textAlign:"center",padding:"10px 0"},tableContainer:{maxHeight:200},stickyHeader:{backgroundColor:"#fff"},actionsTitle:{fontWeight:600,color:"#000",fontSize:16,alignSelf:"center"},tableBlock:{marginTop:15},filterField:{width:375,fontWeight:600,"& .input":{"&::placeholder":{fontWeight:600,color:"#000"}}}},Ie),De))}))($i((function(e){var t=e.classes,a=e.selectedPolicy,r=void 0===a?[]:a,o=e.setSelectedPolicy,s=e.setModalErrorSnackMessage,l=Object(c.useState)([]),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(!1),h=Object(u.a)(m,2),p=h[0],O=h[1],g=Object(c.useState)(""),v=Object(u.a)(g,2),S=v[0],k=v[1],w=Object(c.useCallback)((function(){O(!0),he.invoke("GET","/api/v1/policies?limit=1000").then((function(e){var t=null===e.policies?[]:e.policies;O(!1),j(t.sort(_i))})).catch((function(e){O(!1),s(e)}))}),[s]);Object(c.useEffect)((function(){O(!0)}),[]),Object(c.useEffect)((function(){p&&w()}),[p,w]);var N=b.filter((function(e){return e.name.includes(S)}));return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(C.a,{className:t.paper,children:[p&&Object(n.jsx)(y.a,{}),b.length>0?Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)("span",{className:t.actionsTitle,children:"Assign Policies"}),Object(n.jsx)(f.a,{placeholder:"Filter by Policy",className:t.filterField,id:"search-resource",label:"",InputProps:{startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){k(e.target.value)}})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.tableBlock,children:Object(n.jsx)(ua,{columns:[{label:"Policy",elementKey:"name"}],onSelect:function(e){var t=e.target,a=t.value,n=t.checked,c=Object(Je.a)(r);n?c.push(a):c=c.filter((function(e){return e!==a})),c=c.filter((function(e){return""!==e})),o(c)},selectedItems:r,isLoading:p,records:N,entityName:"Policies",idField:"name",customPaperHeight:t.multiSelectTable})})]}):Object(n.jsx)("div",{className:t.noFound,children:"No Policies Available"})]})})})}))),er={setModalErrorSnackMessage:q},tr=Object(s.b)(null,er),ar=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({},we),{},{buttonContainer:{textAlign:"right"}}))}))(tr((function(e){var t=e.classes,a=e.closeModalAndRefresh,i=e.selectedUser,r=e.selectedGroup,o=e.setModalErrorSnackMessage,s=e.open,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)([]),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)([]),v=Object(u.a)(f,2),S=v[0],C=v[1];Object(c.useEffect)((function(){if(s){if(null!==r)return void(r&&he.invoke("GET","/api/v1/groups/".concat(r)).then((function(e){var t=Z()(e,"policy","");O(t.split(",")),C(t.split(","))})).catch((function(e){o(e),j(!1)})));var e=Z()(i,"policy",[]);O(e),C(e)}}),[s,r,i]);var k=Z()(i,"accessKey","");return Object(n.jsxs)(ga,{onClose:function(){a()},modalOpen:s,title:"Set Policies",children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ya,{label:"Selected ".concat(null!==r?"Group":"User"),content:null!==r?r:k})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ya,{label:"Current Policy",content:p.join(", ")})}),Object(n.jsx)(Xi,{selectedPolicy:S,setSelectedPolicy:C}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){C(p)},children:"Clear"}),Object(n.jsx)(g.a,{type:"button",variant:"contained",color:"primary",disabled:b,onClick:function(){var e="user",t=null;null!==r?(e="group",t=r):null!==i&&(t=i.accessKey),j(!0),he.invoke("PUT","/api/v1/set-policy/".concat(S),{entityName:t,entityType:e}).then((function(){j(!1),a()})).catch((function(e){j(!1),o(e)}))},children:"Save"})]}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})}))),nr={setErrorSnackMessage:V},cr=Object(s.b)(null,nr),ir=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(cr((function(e){var t=e.classes,a=e.setErrorSnackMessage,r=Object(c.useState)([]),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(!1),j=Object(u.a)(d,2),m=j[0],h=j[1],p=Object(c.useState)(!1),O=Object(u.a)(p,2),v=O[0],y=O[1],S=Object(c.useState)(!1),C=Object(u.a)(S,2),k=C[0],w=C[1],N=Object(c.useState)(null),T=Object(u.a)(N,2),E=T[0],A=T[1],_=Object(c.useState)(!1),I=Object(u.a)(_,2),F=I[0],M=I[1],L=Object(c.useState)(""),D=Object(u.a)(L,2),B=D[0],R=D[1],P=Object(c.useState)([]),z=Object(u.a)(P,2),K=z[0],W=z[1],U=Object(c.useState)(!1),V=Object(u.a)(U,2),G=V[0],q=V[1],H=Object(c.useCallback)((function(){h(!0),he.invoke("GET","/api/v1/users").then((function(e){var t=null===e.users?[]:e.users;h(!1),l(t.sort(Ai))})).catch((function(e){h(!1),a(e)}))}),[h,l,a]);Object(c.useEffect)((function(){H()}),[H]);var Y=s.filter((function(e){return e.accessKey.includes(B)})),Q=atob(localStorage.getItem("userLoggedIn")||""),Z=[{type:"view",onClick:function(e){b.push("/users/".concat(e.accessKey))}},{type:"delete",onClick:function(e){w(!0),A(e)},disableButtonFunction:function(e){return e===Q}}];return Object(n.jsxs)(i.a.Fragment,{children:[v&&Object(n.jsx)(qi,{open:v,selectedUser:E,closeModalAndRefresh:function(){y(!1),H()}}),G&&Object(n.jsx)(ar,{open:G,selectedUser:E,selectedGroup:null,closeModalAndRefresh:function(){q(!1),H()}}),k&&Object(n.jsx)(Yi,{deleteOpen:k,selectedUser:E,closeDeleteModalAndRefresh:function(e){!function(e){w(!1),e&&H()}(e)}}),F&&Object(n.jsx)(Ji,{open:F,checkedUsers:K,closeModalAndRefresh:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];M(!1),e&&W([])}(e)}}),Object(n.jsx)(Ua,{label:"Users"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Users",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){R(e.target.value)}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(zi.a,{}),disabled:K.length<=0,onClick:function(){K.length>0&&M(!0)},children:"Add to Group"}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){y(!0),A(null)},children:"Create User"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:Z,columns:[{label:"Access Key",elementKey:"accessKey"}],onSelect:function(e){var t=e.target,a=t.value,n=t.checked,c=Object(Je.a)(K);return n?c.push(a):c=c.filter((function(e){return e!==a})),W(c),c},selectedItems:K,isLoading:m,records:Y,entityName:"Users",idField:"accessKey"})})]})})]})}))),rr=a(47),or=function(e){var t=e.children,a=e.value,i=e.index,r=Object(en.a)(e,["children","value","index"]);return Object(n.jsx)("div",Object(j.a)(Object(j.a)({role:"tabpanel",hidden:a!==i,id:"simple-tabpanel-".concat(i),"aria-labelledby":"simple-tab-".concat(i),style:{marginTop:"5px"}},r),{},{children:a===i&&Object(n.jsx)(c.Fragment,{children:t})}))},sr={setModalErrorSnackMessage:q},lr=Object(s.b)(null,sr),dr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},we))}))(lr((function(e){var t=e.classes,a=e.closeModalAndRefresh,r=e.selectedUser,o=e.open,s=e.setModalErrorSnackMessage,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(""),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(""),v=Object(u.a)(f,2),S=v[0],C=v[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)([]),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useCallback)((function(){if(!r)return null;he.invoke("GET","/api/v1/users/".concat(r)).then((function(e){j(!1),O(e.accessKey),I(e.memberOf||[]),T("enabled"===e.status)})).catch((function(e){j(!1),s(e)}))}),[r,s]);Object(c.useEffect)((function(){null==r?(O(""),C(""),I([])):F()}),[r,F]);var M=""!==p.trim()&&(""!==S.trim()&&null===r||null!==r);return Object(n.jsx)(ga,{onClose:function(){a()},modalOpen:o,title:"Set Groups",children:Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b||(j(!0),null!==r?he.invoke("PUT","/api/v1/users/".concat(r),{status:N?"enabled":"disabled",groups:_}).then((function(e){j(!1),a()})).catch((function(e){j(!1),s(e)})):he.invoke("POST","/api/v1/users",{accessKey:p,secretKey:S,groups:_}).then((function(e){j(!1),a()})).catch((function(e){j(!1),s(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.formScrollable,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ui,{selectedGroups:_,setSelectedGroups:function(e){I(e)}})})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){null===r?(O(""),C(""),I([])):I([])},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:b||!M,children:"Save"})]}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})})}))),br={setModalErrorSnackMessage:q},ur=Object(s.b)(null,br),jr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({},we),{},{buttonContainer:{textAlign:"right"}}))}))(ur((function(e){var t=e.classes,a=e.closeModalAndRefresh,i=e.selectedUser,r=e.currentPolicies,o=e.setModalErrorSnackMessage,s=e.open,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)([]),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)([]),v=Object(u.a)(f,2),S=v[0],C=v[1];return Object(c.useEffect)((function(){if(s){var e,t=[],a=Object(rr.a)(r);try{for(a.s();!(e=a.n()).done;){var n=e.value;t.push(n.policy)}}catch(c){a.e(c)}finally{a.f()}O(t),C(t)}}),[s,i]),Object(n.jsxs)(ga,{onClose:function(){a()},modalOpen:s,title:"Set Policies",children:[Object(n.jsx)(Xi,{selectedPolicy:S,setSelectedPolicy:C}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){C(p)},children:"Clear"}),Object(n.jsx)(g.a,{type:"button",variant:"contained",color:"primary",disabled:b,onClick:function(){var e=i;j(!0),he.invoke("PUT","/api/v1/set-policy/".concat(S),{entityName:e,entityType:"user"}).then((function(){j(!1),a()})).catch((function(e){j(!1),o(e)}))},children:"Save"})]}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})}))),mr=a(992);function hr(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}var pr,Or={setErrorSnackMessage:V},gr=Object(s.b)(null,Or),fr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},fixedHeight:{height:165,minWidth:247,padding:"25px 28px","& svg":{maxHeight:18}},paperContainer:{padding:15,paddingLeft:50,display:"flex"},gridContainer:{display:"grid",gridTemplateColumns:"auto auto",gridGap:8,justifyContent:"flex-start",alignItems:"center","& div:not(.MuiCircularProgress-root)":{display:"flex",alignItems:"center"},"& div:nth-child(odd)":{justifyContent:"flex-end",fontWeight:700},"& div:nth-child(2n)":{minWidth:150}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(gr((function(e){var t=e.classes,a=e.match,r=Object(c.useState)(0),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(!1),m=Object(u.a)(d,2),h=m[0],p=m[1],O=Object(c.useState)(!1),f=Object(u.a)(O,2),v=f[0],y=f[1],S=Object(c.useState)(!1),k=Object(u.a)(S,2),w=k[0],N=k[1],T=Object(c.useState)(!1),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(!1),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)([]),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)([]),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Object(c.useState)([]),G=Object(u.a)(V,2),H=G[0],Y=G[1],Q=a.params.userName,Z=Object(c.useCallback)((function(){if(""===Q)return null;p(!0),he.invoke("GET","/api/v1/users/".concat(Q)).then((function(e){_(!1);var t=e.memberOf||[];P(t);var a,n=[],c=Object(rr.a)(t);try{for(c.s();!(a=c.n()).done;){var i=a.value;n.push({group:i})}}catch(d){c.e(d)}finally{c.f()}U(n);var r,o=[],s=Object(rr.a)(e.policy);try{for(s.s();!(r=s.n()).done;){var l=r.value;o.push({policy:l})}}catch(d){s.e(d)}finally{s.f()}Y(o),L("enabled"===e.status),p(!1)})).catch((function(e){_(!1),p(!1),q(e)}))}),[Q]);Object(c.useEffect)((function(){Z()}),[Z]);var J=atob(localStorage.getItem("userLoggedIn")||"");return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(Ua,{label:"User: ".concat(Q)}),v&&Object(n.jsx)(dr,{open:v,selectedUser:Q,closeModalAndRefresh:function(){y(!1),Z()}}),w&&Object(n.jsx)(jr,{open:w,selectedUser:Q,currentPolicies:H,closeModalAndRefresh:function(){N(!1),Z()}}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(x.a,{container:!0,spacing:2,children:Object(n.jsx)(x.a,{item:!0,children:Object(n.jsx)(C.a,{className:t.paperContainer,children:Object(n.jsxs)("div",{className:t.gridContainer,children:[Object(n.jsx)("div",{children:"Enabled:"}),Object(n.jsx)("div",{className:t.capitalizeFirst,children:Object(n.jsx)(Ba,{checked:M,value:"user_enabled",id:"user-status",name:"user-status",disabled:J===Q,onChange:function(e){var t;L(e.target.checked),t=e.target.checked,A||(_(!0),he.invoke("PUT","/api/v1/users/".concat(Q),{status:t?"enabled":"disabled",groups:R}).then((function(e){_(!1)})).catch((function(e){_(!1),q(e)})))},switchOnly:!0})})]})})})})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsxs)(x.a,{container:!0,item:!0,xs:12,children:[Object(n.jsx)(x.a,{item:!0,xs:9,children:Object(n.jsxs)(tn.a,{value:s,onChange:function(e,t){l(t)},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(n.jsx)(an.a,Object(j.a)({label:"Groups"},hr(0))),Object(n.jsx)(an.a,Object(j.a)({label:"Policies"},hr(0)))]})}),Object(n.jsxs)(x.a,{item:!0,xs:3,className:t.actionsTray,children:[0===s&&Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),size:"medium",onClick:function(){y(!0)},children:"Add to Groups"}),1===s&&Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(mr.a,{}),size:"medium",onClick:function(){N(!0)},children:"Assign Policies"})})]})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(or,{index:0,value:s,children:Object(n.jsx)(ua,{columns:[{label:"Name",elementKey:"group"}],isLoading:h,records:W,entityName:"Groups",idField:"group"})}),Object(n.jsx)(or,{index:1,value:s,children:Object(n.jsx)(ua,{itemActions:[{type:"view",onClick:function(e){b.push("/policies/".concat(e.policy))}}],columns:[{label:"Name",elementKey:"policy"}],isLoading:h,records:H,entityName:"Policies",idField:"policy"})})]})]})})]})}))),xr=Object(s.b)((function(e){return{open:e.system.sidebarOpen}}),{setMenuOpen:z}),vr=Object(l.g)(xr((function(){return Object(n.jsx)(l.c,{history:b,children:Object(n.jsxs)(l.d,{children:[Object(n.jsx)(l.b,{path:"/users/:userName",component:fr}),Object(n.jsx)(l.b,{path:"/",component:ir}),Object(n.jsx)(l.b,{component:Ze})]})})}))),yr={setModalErrorSnackMessage:q},Sr=Object(s.b)(null,yr),Cr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column",paddingTop:15,boxShadow:"none"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noFound:{textAlign:"center",padding:"10px 0"},tableContainer:{maxHeight:200},stickyHeader:{backgroundColor:"#fff"},actionsTitle:{fontWeight:600,color:"#000",fontSize:16,alignSelf:"center"},tableBlock:{marginTop:15},filterField:{width:375,fontWeight:600,"& .input":{"&::placeholder":{fontWeight:600,color:"#000"}}}},Ie),De))}))(Sr((function(e){var t=e.classes,a=e.selectedUsers,r=e.setSelectedUsers,o=e.editMode,s=void 0!==o&&o,l=e.setModalErrorSnackMessage,d=Object(c.useState)([]),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(!1),p=Object(u.a)(h,2),O=p[0],g=p[1],v=Object(c.useState)(""),S=Object(u.a)(v,2),k=S[0],w=S[1],N=Object(c.useCallback)((function(){he.invoke("GET","/api/v1/users").then((function(e){var t=Z()(e,"users",[]);t||(t=[]),m(t.sort(Ai)),g(!1)})).catch((function(e){l(e),g(!1)}))}),[l]);Object(c.useEffect)((function(){g(!0)}),[]),Object(c.useEffect)((function(){O&&N()}),[O,N]);var T=a||[],E=j.filter((function(e){return e.accessKey.includes(k)}));return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(C.a,{className:t.paper,children:[O&&Object(n.jsx)(y.a,{}),null!=j&&j.length>0?Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)("span",{className:t.actionsTitle,children:s?"Edit Members":"Assign Users"}),Object(n.jsx)(f.a,{placeholder:"Filter Users",className:t.filterField,id:"search-resource",label:"",InputProps:{startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){w(e.target.value)}})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.tableBlock,children:Object(n.jsx)(ua,{columns:[{label:"Access Key",elementKey:"accessKey"}],onSelect:function(e){var t=e.target,a=t.value,n=t.checked,c=Object(Je.a)(T);return n?c.push(a):c=c.filter((function(e){return e!==a})),r(c),c},selectedItems:T,isLoading:O,records:E,entityName:"Users",idField:"accessKey",customPaperHeight:t.multiSelectTable})})]}):Object(n.jsx)("div",{className:t.noFound,children:"No Users Available"})]})})})}))),kr={setModalErrorSnackMessage:q},wr=Object(s.b)(null,kr),Nr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},we))}))(wr((function(e){var t=e.open,a=e.selectedGroup,r=e.closeModalAndRefresh,o=e.classes,s=e.setModalErrorSnackMessage,l=Object(c.useState)(""),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(!1),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(!1),v=Object(u.a)(f,2),S=v[0],C=v[1],k=Object(c.useState)([]),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(!1),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(!1),M=Object(u.a)(F,2),L=M[0],D=M[1];Object(c.useEffect)((function(){null!==a?I(!0):(j(""),T([]))}),[a]),Object(c.useEffect)((function(){D(""!==b.trim())}),[b,N]),Object(c.useEffect)((function(){if(S){null!==a?he.invoke("PUT","/api/v1/groups/".concat(b),{group:b,members:N,status:p?"enabled":"disabled"}).then((function(e){C(!1),r()})).catch((function(e){C(!1),s(e)})):he.invoke("POST","/api/v1/groups",{group:b,members:N}).then((function(e){C(!1),r()})).catch((function(e){C(!1),s(e)}))}}),[S,b,N,p,a,r,s]),Object(c.useEffect)((function(){if(a&&_){he.invoke("GET","/api/v1/groups/".concat(a)).then((function(e){O("enabled"===e.status),j(e.name),T(e.members)})).catch((function(e){s(e),I(!1)}))}}),[_,a,s]);return Object(n.jsxs)(ga,{modalOpen:t,onClose:r,title:null!==a?"Edit Group":"Create Group",children:[null!==a&&Object(n.jsx)("div",{className:o.floatingEnabled,children:Object(n.jsx)(Ba,{indicatorLabels:["Enabled","Disabled"],checked:p,value:"group_enabled",id:"group-status",name:"group-status",onChange:function(e){O(e.target.checked)},switchOnly:!0})}),Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),C(!0)},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:o.formScrollable,children:[null===a?Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"group-name",name:"group-name",label:"Group Name",value:b,onChange:function(e){j(e.target.value)}})})}):Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(Ya,{label:"Group Name",content:a})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Cr,{selectedUsers:N,setSelectedUsers:T,editMode:null!==a})})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:o.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:o.clearButton,onClick:function(){null===a&&j(""),T([])},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:S||!L,children:"Save"})]}),S&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})]})}))),Tr={setErrorSnackMessage:V},Er=Object(s.b)(null,Tr),Ar=Er((function(e){var t=e.selectedGroup,a=e.deleteOpen,r=e.closeDeleteModalAndRefresh,o=e.setErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1];Object(c.useEffect)((function(){if(d){t&&he.invoke("DELETE","/api/v1/groups/".concat(t)).then((function(){b(!1),r(!0)})).catch((function(e){b(!1),o(e)}))}}),[d,t,r,o]);var j=function(){r(!1)};return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(ja.a,{open:a,onClose:j,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete User"}),Object(n.jsxs)(ha.a,{children:[d&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete group ",Object(n.jsx)("b",{children:t}),"?"]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:j,color:"primary",disabled:d,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){b(!0)},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})})),_r={setErrorSnackMessage:V},Ir=Object(s.b)(null,_r),Fr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Ir((function(e){var t=e.classes,a=e.setErrorSnackMessage,r=Object(c.useState)(!1),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(null),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(!1),p=Object(u.a)(h,2),O=p[0],v=p[1],y=Object(c.useState)(!1),S=Object(u.a)(y,2),C=S[0],k=S[1],w=Object(c.useState)([]),N=Object(u.a)(w,2),T=N[0],E=N[1],A=Object(c.useState)(""),_=Object(u.a)(A,2),I=_[0],F=_[1],M=Object(c.useState)(!1),L=Object(u.a)(M,2),D=L[0],B=L[1];Object(c.useEffect)((function(){k(!0)}),[]),Object(c.useEffect)((function(){k(!0)}),[]),Object(c.useEffect)((function(){if(C){he.invoke("GET","/api/v1/groups").then((function(e){var t=[];null!==e.groups&&(t=e.groups.sort(Ii)),E(t),k(!1)})).catch((function(e){a(e),k(!1)}))}}),[C,a]);var R=T.filter((function(e){return e.includes(I)})),P=[{type:"view",onClick:function(e){l(!0),m(e)}},{type:"description",onClick:function(e){B(!0),m(e)}},{type:"delete",onClick:function(e){v(!0),m(e)}}];return Object(n.jsxs)(i.a.Fragment,{children:[s&&Object(n.jsx)(Nr,{open:s,selectedGroup:j,closeModalAndRefresh:function(){l(!1),k(!0)}}),O&&Object(n.jsx)(Ar,{deleteOpen:O,selectedGroup:j,closeDeleteModalAndRefresh:function(e){v(!1),e&&k(!0)}}),B&&Object(n.jsx)(ar,{open:D,selectedGroup:j,selectedUser:null,closeModalAndRefresh:function(){B(!1)}}),Object(n.jsx)(Ua,{label:"Groups"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Groups",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){F(e.target.value)}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){m(null),l(!0)},children:"Create Group"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:P,columns:[{label:"Name",elementKey:""}],isLoading:C,records:R,entityName:"Groups",idField:""})})]})})]})}))),Mr="notify_postgres",Lr="notify_mysql",Dr="notify_kafka",Br="notify_amqp",Rr="notify_mqtt",Pr="notify_redis",zr="notify_nats",Kr="notify_elasticsearch",Wr="notify_webhooks",Ur="notify_nsq",Vr=[{configuration_id:"region",configuration_label:"Edit Region Configuration"},{configuration_id:"cache",configuration_label:"Edit Cache Configuration"},{configuration_id:"compression",configuration_label:"Edit Compression Configuration"},{configuration_id:"etcd",configuration_label:"Edit Etcd Configuration"},{configuration_id:"identity_openid",configuration_label:"Edit Identity Openid Configuration"},{configuration_id:"identity_ldap",configuration_label:"Edit Identity LDAP Configuration"},{configuration_id:"logger_webhook",configuration_label:"Edit Logger Webhook Configuration"},{configuration_id:"audit_webhook",configuration_label:"Edit Audit Webhook Configuration"}],Gr={region:[{name:"name",required:!0,label:"Server Location",tooltip:'Name of the location of the server e.g. "us-west-rack2"',type:"string",placeholder:"e.g. us-west-rack-2"},{name:"comment",required:!1,label:"Comment",tooltip:"You can add a comment to this setting",type:"comment",placeholder:"Enter Comment"}],cache:[{name:"drives",required:!0,label:"Drives",tooltip:'Mountpoints e.g. "/optane1" or "/optane2", you can write one per field',type:"csv",placeholder:"Enter Mount Point"},{name:"expiry",required:!1,label:"Expiry",tooltip:'Cache expiry duration in days e.g. "90"',type:"number",placeholder:"Enter Number of Days"},{name:"quota",required:!1,label:"Quota",tooltip:'Limit cache drive usage in percentage e.g. "90"',type:"number",placeholder:"Enter in %"},{name:"exclude",required:!1,label:"Exclude",tooltip:'Wildcard exclusion patterns e.g. "bucket/*.tmp" or "*.exe", you can write one per field',type:"csv",placeholder:"Enter Wildcard Exclusion Patterns"},{name:"after",required:!1,label:"After",tooltip:"Minimum number of access before caching an object",type:"number",placeholder:"Enter Number of Attempts"},{name:"watermark_low",required:!1,label:"Watermark Low",tooltip:"Watermark Low",type:"number",placeholder:"Enter Watermark Low"},{name:"watermark_high",required:!1,label:"Watermark High",tooltip:"Watermark High",type:"number",placeholder:"Enter Watermark High"},{name:"comment",required:!1,label:"Comment",tooltip:"You can add a comment to this setting",type:"comment",multiline:!0,placeholder:"Enter Comment"}],compression:[{name:"extensions",required:!1,label:"Extensions",tooltip:'Extensions to compress e.g. ".txt",".log" or ".csv", you can write one per field',type:"csv",placeholder:"Enter an Extension",withBorder:!0},{name:"mime_types",required:!1,label:"Mime Types",tooltip:'Mime types e.g. "text/*","application/json" or "application/xml", you can write one per field',type:"csv",placeholder:"Enter a Mime Type",withBorder:!0}],etcd:[{name:"endpoints",required:!0,label:"Endpoints",tooltip:'List of etcd endpoints e.g. "http://localhost:2379", you can write one per field',type:"csv",placeholder:"Enter Endpoint"},{name:"path_prefix",required:!1,label:"Path Prefix",tooltip:'namespace prefix to isolate tenants e.g. "customer1/"',type:"string",placeholder:"Enter Path Prefix"},{name:"coredns_path",required:!1,label:"Coredns Path",tooltip:'Shared bucket DNS records, default is "/skydns"',type:"string",placeholder:"Enter Coredns Path"},{name:"client_cert",required:!1,label:"Client Cert",tooltip:"Client cert for mTLS authentication",type:"string",placeholder:"Enter Client Cert"},{name:"client_cert_key",required:!1,label:"Client Cert Key",tooltip:"Client cert key for mTLS authentication",type:"string",placeholder:"Enter Client Cert Key"},{name:"comment",required:!1,label:"Comment",tooltip:"You can add a comment to this setting",type:"comment",multiline:!0,placeholder:"Enter Comment"}],identity_openid:[{name:"config_url",required:!1,label:"Config URL",tooltip:"Config URL for Client ID configuration",type:"string",placeholder:"Enter Config URL"},{name:"client_id",required:!1,label:"Client ID",type:"string",placeholder:"Enter Client ID"},{name:"claim_name",required:!1,label:"Claim Name",tooltip:"Claim Name",type:"string",placeholder:"Enter Claim Name"},{name:"claim_prefix",required:!1,label:"Claim Prefix",tooltip:"Claim Prefix",type:"string",placeholder:"Enter Claim Prefix"}],identity_ldap:[{name:"server_addr",required:!0,label:"Server Addr",tooltip:'AD/LDAP server address e.g. "myldapserver.com:636"',type:"string",placeholder:"Enter Server Address"},{name:"username_format",required:!0,label:"Username Format",tooltip:'List of username bind DNs e.g. "uid=%s","cn=accounts","dc=myldapserver" or "dc=com", you can write one per field',type:"csv",placeholder:"Enter Username Format"},{name:"username_search_filter",required:!0,label:"Username Search Filter",tooltip:'User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"',type:"string",placeholder:"Enter Username Search Filter"},{name:"group_search_filter",required:!0,label:"Group Search Filter",tooltip:'Search filter for groups e.g. "(&(objectclass=groupOfNames)(memberUid=%s))"',type:"string",placeholder:"Enter Group Search Filter"},{name:"username_search_base_dn",required:!1,label:"Username Search Base DN",tooltip:"List of username search DNs, you can write one per field",type:"csv",placeholder:"Enter Username Search Base DN"},{name:"group_name_attribute",required:!1,label:"Group Name Attribute",tooltip:'Search attribute for group name e.g. "cn"',type:"string",placeholder:"Enter Group Name Attribute"},{name:"sts_expiry",required:!1,label:"STS Expiry",tooltip:'temporary credentials validity duration in s,m,h,d. Default is "1h"',type:"string",placeholder:"Enter STS Expiry"},{name:"tls_skip_verify",required:!1,label:"TLS Skip Verify",tooltip:'Trust server TLS without verification, defaults to "off" (verify)',type:"on|off"},{name:"server_insecure",required:!1,label:"Server Insecure",tooltip:'Allow plain text connection to AD/LDAP server, defaults to "off"',type:"on|off"},{name:"comment",required:!1,label:"Comment",tooltip:"Optionally add a comment to this setting",type:"comment",placeholder:"Enter Comment"}],logger_webhook:[{name:"endpoint",required:!0,label:"Endpoint",type:"string",placeholder:"Enter Endpoint"},{name:"auth_token",required:!0,label:"Auth Token",type:"string",placeholder:"Enter Auth Token"}],audit_webhook:[{name:"endpoint",required:!0,label:"Endpoint",type:"string",placeholder:"Enter Endpoint"},{name:"auth_token",required:!0,label:"Auth Token",type:"string",placeholder:"Enter Auth Token"}]},qr=[{name:"queue-dir",label:"Queue Directory",required:!0,tooltip:"staging dir for undelivered messages e.g. '/home/events'",type:"string",placeholder:"Enter Queue Directory"},{name:"queue-limit",label:"Queue Limit",required:!1,tooltip:"maximum limit for undelivered messages, defaults to '10000'",type:"number",placeholder:"Enter Queue Limit"},{name:"comment",label:"Comment",required:!1,type:"comment",placeholder:"Enter Comment"}],Hr=(pr={},Object(fe.a)(pr,Dr,[{name:"brokers",label:"Brokers",required:!0,tooltip:"Comma separated list of Kafka broker addresses",type:"string",placeholder:"Enter Brokers"},{name:"topic",label:"Topic",tooltip:"Kafka topic used for bucket notifications",type:"string",placeholder:"Enter Topic"},{name:"sasl_username",label:"SASL Username",tooltip:"Username for SASL/PLAIN or SASL/SCRAM authentication",type:"string",placeholder:"Enter SASL Username"},{name:"sasl_password",label:"SASL Password",tooltip:"Password for SASL/PLAIN or SASL/SCRAM authentication",type:"string",placeholder:"Enter SASL Password"},{name:"sasl_mechanism",label:"SASL Mechanism",tooltip:"SASL authentication mechanism, default 'PLAIN'",type:"string"},{name:"tls_client_auth",label:"TLS Client Auth",tooltip:"Client Auth determines the Kafka server's policy for TLS client auth",type:"string",placeholder:"Enter TLS Client Auth"},{name:"sasl",label:"SASL",tooltip:"Set to 'on' to enable SASL authentication",type:"on|off"},{name:"tls",label:"TLS",tooltip:"Set to 'on' to enable TLS",type:"on|off"},{name:"tls_skip_verify",label:"TLS skip verify",tooltip:'Trust server TLS without verification, defaults to "on" (verify)',type:"on|off"},{name:"client_tls_cert",label:"client TLS cert",tooltip:"Path to client certificate for mTLS auth",type:"path",placeholder:"Enter TLS Client Cert"},{name:"client_tls_key",label:"client TLS key",tooltip:"Path to client key for mTLS auth",type:"path",placeholder:"Enter TLS Client Key"},{name:"version",label:"Version",tooltip:"Specify the version of the Kafka cluster e.g '2.2.0'",type:"string",placeholder:"Enter Kafka Version"}].concat(qr)),Object(fe.a)(pr,Br,[{name:"url",required:!0,label:"URL",tooltip:"AMQP server endpoint e.g. `amqp://myuser:mypassword@localhost:5672`",type:"url"},{name:"exchange",label:"Exchange",tooltip:"Name of the AMQP exchange",type:"string",placeholder:"Enter Exchange"},{name:"exchange_type",label:"Exchange Type",tooltip:"AMQP exchange type",type:"string",placeholder:"Enter Exchange Type"},{name:"routing_key",label:"Routing Key",tooltip:"Routing key for publishing",type:"string",placeholder:"Enter Routing Key"},{name:"mandatory",label:"Mandatory",tooltip:"Quietly ignore undelivered messages when set to 'off', default is 'on'",type:"on|off"},{name:"durable",label:"Durable",tooltip:"Persist queue across broker restarts when set to 'on', default is 'off'",type:"on|off"},{name:"no_wait",label:"No Wait",tooltip:"Non-blocking message delivery when set to 'on', default is 'off'",type:"on|off"},{name:"internal",label:"Internal",tooltip:"Set to 'on' for exchange to be not used directly by publishers, but only when bound to other exchanges",type:"on|off"},{name:"auto_deleted",label:"Auto Deleted",tooltip:"Auto delete queue when set to 'on', when there are no consumers",type:"on|off"},{name:"delivery_mode",label:"Delivery Mode",tooltip:"Set to '1' for non-persistent or '2' for persistent queue",type:"number",placeholder:"Enter Delivery Mode"}].concat(qr)),Object(fe.a)(pr,Pr,[{name:"address",required:!0,label:"Address",tooltip:"Redis server's address. For example: `localhost:6379`",type:"address",placeholder:"Enter Address"},{name:"key",required:!0,label:"Key",tooltip:"Redis key to store/update events, key is auto-created",type:"string",placeholder:"Enter Key"},{name:"password",label:"Password",tooltip:"Redis server password",type:"string",placeholder:"Enter Password"}].concat(qr)),Object(fe.a)(pr,Rr,[{name:"broker",required:!0,label:"Broker",tooltip:"MQTT server endpoint e.g. `tcp://localhost:1883`",type:"uri",placeholder:"Enter Brokers"},{name:"topic",required:!0,label:"Topic",tooltip:"name of the MQTT topic to publish",type:"string",placeholder:"Enter Topic"},{name:"username",label:"Username",tooltip:"MQTT username",type:"string",placeholder:"Enter Username"},{name:"password",label:"Password",tooltip:"MQTT password",type:"string",placeholder:"Enter Password"},{name:"qos",label:"QOS",tooltip:"Set the quality of service priority, defaults to '0'",type:"number",placeholder:"Enter QOS"},{name:"keep_alive_interval",label:"Keep Alive Interval",tooltip:"Keep-alive interval for MQTT connections in s,m,h,d",type:"duration",placeholder:"Enter Keep Alive Internal"},{name:"reconnect_interval",label:"Reconnect Interval",tooltip:"Reconnect interval for MQTT connections in s,m,h,d",type:"duration",placeholder:"Enter Reconnect Interval"}].concat(qr)),Object(fe.a)(pr,zr,[{name:"address",required:!0,label:"Address",tooltip:"NATS server address e.g. '0.0.0.0:4222'",type:"address",placeholder:"Enter Address"},{name:"subject",required:!0,label:"Subject",tooltip:"NATS subscription subject",type:"string",placeholder:"Enter NATS Subject"},{name:"username",label:"Username",tooltip:"NATS username",type:"string",placeholder:"Enter NATS Username"},{name:"password",label:"Password",tooltip:"NATS password",type:"string",placeholder:"Enter NATS password"},{name:"token",label:"Token",tooltip:"NATS token",type:"string",placeholder:"Enter NATS token"},{name:"tls",label:"TLS",tooltip:"Set to 'on' to enable TLS",type:"on|off"},{name:"tls_skip_verify",label:"TLS Skip Verify",tooltip:'Trust server TLS without verification, defaults to "on" (verify)',type:"on|off"},{name:"ping_interval",label:"Ping Interval",tooltip:"Client ping commands interval in s,m,h,d. Disabled by default",type:"duration",placeholder:"Enter Ping Interval"},{name:"streaming",label:"Streaming",tooltip:"Set to 'on', to use streaming NATS server",type:"on|off"},{name:"streaming_async",label:"Streaming async",tooltip:"Set to 'on', to enable asynchronous publish",type:"on|off"},{name:"streaming_max_pub_acks_in_flight",label:"Streaming max publish ACKS in flight",tooltip:"Number of messages to publish without waiting for ACKs",type:"number",placeholder:"Enter Streaming in flight value"},{name:"streaming_cluster_id",label:"Streaming Cluster ID",tooltip:"Unique ID for NATS streaming cluster",type:"string",placeholder:"Enter Streaming Cluster ID"},{name:"cert_authority",label:"Cert Authority",tooltip:"Path to certificate chain of the target NATS server",type:"string",placeholder:"Enter Cert Authority"},{name:"client_cert",label:"Client Cert",tooltip:"Client cert for NATS mTLS auth",type:"string",placeholder:"Enter Client Cert"},{name:"client_key",label:"Client Key",tooltip:"Client cert key for NATS mTLS auth",type:"string",placeholder:"Enter Client Key"}].concat(qr)),Object(fe.a)(pr,Kr,[{name:"url",required:!0,label:"URL",tooltip:"Elasticsearch server's address, with optional authentication info",type:"url",placeholder:"Enter URL"},{name:"index",required:!0,label:"Index",tooltip:"Elasticsearch index to store/update events, index is auto-created",type:"string",placeholder:"Enter Index"},{name:"format",required:!0,label:"Format",tooltip:"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'",type:"enum",placeholder:"Enter Format"}].concat(qr)),Object(fe.a)(pr,Wr,[{name:"endpoint",required:!0,label:"Endpoint",tooltip:"webhook server endpoint e.g. http://localhost:8080/minio/events",type:"url",placeholder:"Enter Endpoint"},{name:"auth_token",label:"Auth Token",tooltip:"opaque string or JWT authorization token",type:"string",placeholder:"Enter auth_token"}].concat(qr)),Object(fe.a)(pr,Ur,[{name:"nsqd_address",required:!0,label:"NSQD Address",tooltip:"NSQ server address e.g. '127.0.0.1:4150'",type:"address",placeholder:"Enter nsqd_address"},{name:"topic",required:!0,label:"Topic",tooltip:"NSQ topic",type:"string",placeholder:"Enter Topic"},{name:"tls",label:"TLS",tooltip:"set to 'on' to enable TLS",type:"on|off"},{name:"tls_skip_verify",label:"TLS Skip Verify",tooltip:'trust server TLS without verification, defaults to "on" (verify)',type:"on|off"}].concat(qr)),pr),Yr=function(e){return e.filter((function(e){return""!==e.value}))},Qr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),{},{inputWithBorder:{border:"1px solid #EAEAEA",padding:15,height:150,overflowY:"auto",position:"relative",marginTop:15},labelContainer:{display:"flex"}}))}))((function(e){var t=e.elements,a=e.name,r=e.label,o=e.tooltip,s=void 0===o?"":o,l=e.commonPlaceholder,d=void 0===l?"":l,b=e.onChange,j=e.withBorder,m=void 0!==j&&j,h=e.classes,p=Object(c.useState)([""]),O=Object(u.a)(p,2),g=O[0],f=O[1],v=Object(c.createRef)();Object(c.useEffect)((function(){if(1===g.length&&""===g[0]&&t&&""!==t){var e=t.split(",");e.push(""),f(e)}}),[t,g]),Object(c.useEffect)((function(){if(g.length>1){var e=v.current;e&&e.scrollIntoView(!1)}}),[g,v]);var y=Object(c.useRef)(!0);Object(c.useLayoutEffect)((function(){y.current?y.current=!1:C()}),[g]);var S=function(e){e.persist();var t=Object(Je.a)(g);t[Z()(e.target,"dataset.index",0)]=e.target.value,f(t)},C=An()((function(){var e=g.filter((function(e){return""!==e.trim()})).join(",");b(e)}),500),k=g.map((function(e,t){return Object(n.jsx)(va,{id:"".concat(a,"-").concat(t.toString()),label:"",name:"".concat(a,"-").concat(t.toString()),value:g[t],onChange:S,index:t,placeholder:d,overlayIcon:t===g.length-1?Object(n.jsx)(Fn,{}):null,overlayAction:function(){!function(e){if(""!==e[e.length-1].trim()){var t=Object(Je.a)(e);t.push(""),f(t)}}(g)}},"csv-".concat(a,"-").concat(t.toString()))}));return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:h.fieldContainer,children:[Object(n.jsxs)(ia.a,{className:h.inputLabel,children:[Object(n.jsx)("span",{children:r}),""!==s&&Object(n.jsx)("div",{className:h.tooltipContainer,children:Object(n.jsx)(ra.a,{title:s,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:h.tooltip})})})})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(m?h.inputWithBorder:""),children:[k,Object(n.jsx)("div",{ref:v})]})]})})})),Zr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),{},{inputLabel:Object(j.a)(Object(j.a)({},ke.inputLabel),{},{marginBottom:16,fontSize:14}),textBoxContainer:{flexGrow:1,position:"relative"},errorState:{color:"#b53b4b",fontSize:14,position:"absolute",top:7,right:7},cssOutlinedInput:{borderColor:"#9C9C9C",padding:16},rootContainer:{"& .MuiOutlinedInput-inputMultiline":Object(j.a)(Object(j.a)({},ke.inputLabel),{},{fontSize:13,minHeight:150})}}))}))((function(e){var t=e.label,a=e.onChange,c=e.value,r=e.id,o=e.name,s=e.disabled,l=void 0!==s&&s,d=e.tooltip,b=void 0===d?"":d,u=e.index,j=void 0===u?0:u,m=e.error,h=void 0===m?"":m,p=e.required,O=void 0!==p&&p,g=e.placeholder,v=void 0===g?"":g,y=e.classes,S={"data-index":j};return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(y.fieldContainer," ").concat(""!==h?y.errorInField:""),children:[""!==t&&Object(n.jsxs)(ia.a,{htmlFor:r,className:y.inputLabel,children:[Object(n.jsxs)("span",{children:[t,O?"*":""]}),""!==b&&Object(n.jsx)("div",{className:y.tooltipContainer,children:Object(n.jsx)(ra.a,{title:b,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:y.tooltip})})})})]}),Object(n.jsx)("div",{className:y.textBoxContainer,children:Object(n.jsx)(f.a,{id:r,name:o,fullWidth:!0,value:c,disabled:l,onChange:a,multiline:!0,inputProps:S,error:""!==h,helperText:h,placeholder:v,InputLabelProps:{shrink:!0},InputProps:{classes:{notchedOutline:y.cssOutlinedInput,root:y.rootContainer}},variant:"outlined"})})]})})})),Jr=function(e,t,a){var n="on|off"===t?"false":"";if(a.length>0){var c=a.find((function(t){return t.key===e}));c&&(n=c.value)}return n},$r=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},we))}))((function(e){var t=e.onChange,a=e.fields,i=e.defaultVals,r=(e.classes,Object(c.useState)([])),o=Object(u.a)(r,2),s=o[0],l=o[1],d=a||[],b=i||[];Object(c.useEffect)((function(){var e=[];a.forEach((function(t){var a={key:t.name,value:Jr(t.name,t.type,b)};e.push(a)})),l(e)}),[a,i]),Object(c.useEffect)((function(){t(s)}),[s]);var j=function(e,t,a){var n=Object(Je.a)(s);n[a]={key:e,value:t},l(n)},m=function(e,t){switch(e.type){case"on|off":var a=s[t]?s[t].value:"false";return Object(n.jsx)(Ba,{indicatorLabels:["On","Off"],onChange:function(a){var n=a.target.checked?"true":"false";j(e.name,n,t)},id:e.name,name:e.name,label:e.label,value:"switch_on",tooltip:e.tooltip,checked:"true"===a});case"csv":return Object(n.jsx)(Qr,{elements:s[t]?s[t].value:"",label:e.label,name:e.name,onChange:function(a){return j(e.name,a,t)},tooltip:e.tooltip,commonPlaceholder:e.placeholder,withBorder:!!e.withBorder});case"comment":return Object(n.jsx)(Zr,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:s[t]?s[t].value:"",onChange:function(a){return j(e.name,a.target.value,t)},placeholder:e.placeholder});default:return Object(n.jsx)(va,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:s[t]?s[t].value:"",onChange:function(a){return j(e.name,a.target.value,t)},multiline:!!e.multiline,placeholder:e.placeholder})}};return Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{xs:12,item:!0,children:d.map((function(e,t){return Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,children:m(e,t)})},e.name)}))})})})),Xr={serverNeedsRestart:K,setErrorSnackMessage:V},eo=Object(s.b)(null,Xr),to=eo(Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Be),{},{strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"},logoButton:{height:"80px"},customTitle:Object(j.a)(Object(j.a)({},Be.customTitle),{},{marginTop:0})}))}))((function(e){var t=e.closeModalAndRefresh,a=e.serverNeedsRestart,i=e.selectedConfiguration,r=e.setErrorSnackMessage,o=e.classes,s=Object(c.useState)([]),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(!1),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(!0),f=Object(u.a)(O,2),v=f[0],S=f[1],C=Object(c.useState)([]),k=Object(u.a)(C,2),w=k[0],N=k[1];Object(c.useEffect)((function(){var e=Z()(i,"configuration_id",!1);e&&he.invoke("GET","/api/v1/configs/".concat(e)).then((function(e){var t=Z()(e,"key_values",[]);N(t)})).catch((function(e){S(!1),r(e)})),S(!1)}),[i,r]),Object(c.useEffect)((function(){if(h){var e={key_values:Yr(d)};he.invoke("PUT","/api/v1/configs/".concat(i.configuration_id),e).then((function(){p(!1),a(!0),t()})).catch((function(e){p(!1),r(e)}))}}),[h,a,i,d,t,r]);var T=Object(c.useCallback)((function(e){b(e)}),[b]);return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:o.customTitle,children:i.configuration_label}),Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)("form",{noValidate:!0,onSubmit:function(e){e.preventDefault(),p(!0)},children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:o.settingsFormContainer,children:[v&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})}),Object(n.jsx)($r,{fields:Gr[i.configuration_id],onChange:T,defaultVals:w})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:o.settingsButtonContainer,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:o.innerSettingsButtonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:h,children:"Save"})})})]})})]})}))),ao=Object(N.a)((function(){return Object(k.a)({masterContainer:{overflowX:"hidden",overflowY:"auto"},sliderContainer:{width:"auto",transitionDuration:"0.3s",position:"relative"},slide:{float:"left"}})}))((function(e){var t=e.classes,a=e.slideOptions,i=e.currentSlide;return Object(n.jsx)(Bt.a,{children:function(e){var r=e.width,o=e.height,s=i*r,l=r*a.length;return Object(n.jsx)(c.Fragment,{children:Object(n.jsx)("div",{className:t.masterContainer,style:{width:r,height:o},children:Object(n.jsx)("div",{className:t.sliderContainer,style:{left:"-".concat(s,"px"),width:"".concat(l,"px")},children:a.map((function(e,a){return Object(n.jsx)("div",{className:t.slide,style:{width:r},children:e},"slide-panel-".concat(a.toString()))}))})})})}})})),no=function(){return Object(n.jsx)(it.a,{viewBox:"0 0 10.847 6.572",children:Object(n.jsxs)("g",{transform:"translate(-84.793 -81.193)",children:[Object(n.jsx)("line",{x2:"9.64",transform:"translate(85.5 84.5)",fill:"none",stroke:"#000",strokeLinecap:"round",strokeWidth:"1"}),Object(n.jsx)("line",{y1:"2.558",x2:"2.645",transform:"translate(85.5 81.9)",fill:"none",stroke:"#000",strokeLinecap:"round",strokeWidth:"1"}),Object(n.jsx)("line",{x2:"2.645",y2:"2.558",transform:"translate(85.5 84.5)",fill:"none",stroke:"#000",strokeLinecap:"round",strokeWidth:"1"})]})})},co={configuration_id:"",configuration_label:""},io=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},iconText:{lineHeight:"24px"},customConfigurationPage:{height:"calc(100vh - 324px)",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},Fe),Ie),Be),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=Object(c.useState)(co),i=Object(u.a)(a,2),r=i[0],o=i[1],s=Object(c.useState)(0),l=Object(u.a)(s,2),d=l[0],j=l[1],m=[{type:"edit",onClick:function(e){var t=Z()(e,"url","");""!==t?b.push(t):(j(1),o(e))}}];return Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.settingsOptionsContainer,children:Object(n.jsx)(ao,{slideOptions:[Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(ua,{itemActions:m,columns:[{label:"Configuration",elementKey:"configuration_id"}],isLoading:!1,records:Vr,entityName:"Configurations",idField:"configuration_id",customPaperHeight:t.customConfigurationPage,noBackground:!0})}),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.backContainer,children:Object(n.jsxs)("button",{onClick:function(){j(0),o(co)},className:t.backButton,children:[Object(n.jsx)(no,{}),"Back To Configurations"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:1===d?Object(n.jsx)(to,{closeModalAndRefresh:function(){j(0)},selectedConfiguration:r}):null})]})],currentSlide:d})})})})})})})),ro=a(230),oo=a(431),so=a.n(oo),lo=[{actionTrigger:Mr,targetTitle:"Postgres SQL",logo:"/postgres.png"},{actionTrigger:Dr,targetTitle:"Kafka",logo:"/kafka.png"},{actionTrigger:Br,targetTitle:"AMQP",logo:"/amqp.png"},{actionTrigger:Rr,targetTitle:"MQTT",logo:"/mqtt.png"},{actionTrigger:Pr,targetTitle:"Redis",logo:"/redis.png"},{actionTrigger:zr,targetTitle:"NATS",logo:"/nats.png"},{actionTrigger:Lr,targetTitle:"Mysql",logo:"/mysql.png"},{actionTrigger:Kr,targetTitle:"Elastic Search",logo:"/elasticsearch.png"},{actionTrigger:Wr,targetTitle:"Webhook",logo:""},{actionTrigger:Ur,targetTitle:"NSQ",logo:""}],bo=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},we))}))((function(e){var t=e.onChange,a=e.classes,r=Object(c.useState)(!1),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(""),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(""),p=Object(u.a)(h,2),O=p[0],g=p[1],f=Object(c.useState)(""),v=Object(u.a)(f,2),y=v[0],S=v[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(""),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(" "),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)(""),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Object(c.useState)("namespace"),G=Object(u.a)(V,2),q=G[0],H=G[1],Y=Object(c.useState)(""),Q=Object(u.a)(Y,2),Z=Q[0],J=Q[1],$=Object(c.useState)(""),X=Object(u.a)($,2),ee=X[0],te=X[1],ae=Object(c.useState)(""),ne=Object(u.a)(ae,2),ce=ne[0],ie=ne[1],re=Object(c.useCallback)((function(){var e="";return""!==O&&(e="".concat(e," host=").concat(O)),""!==y&&(e="".concat(e," dbname=").concat(y)),""!==A&&(e="".concat(e," user=").concat(A)),""!==M&&(e="".concat(e," password=").concat(M)),""!==w&&(e="".concat(e," port=").concat(w))," "!==R&&(e="".concat(e," sslmode=").concat(R)),(e="".concat(e," ")).trim()}),[O,y,A,M,w,R]);return Object(c.useEffect)((function(){""!==j&&t([{key:"connection_string",value:j},{key:"table",value:W},{key:"format",value:q},{key:"queue_dir",value:Z},{key:"queue_limit",value:ee},{key:"comment",value:ce}])}),[j,W,q,Z,ee,ce,t]),Object(c.useEffect)((function(){var e=re();m(e)}),[A,y,M,w,R,O,m,re]),Object(c.useEffect)((function(){if(s){var e=re();m(e)}else{var t=function(e,t){var a,n=[],c=Object(rr.a)(t);try{for(c.s();!(a=c.n()).done;){var i=a.value,r=e.indexOf(i+"=");-1!==r&&n.push(r)}}catch(p){c.e(p)}finally{c.f()}n.sort((function(e,t){return e-t}));for(var o=new Map,s=new Array(n.length),l=0;l=0})),A=function(){T(""),C(S-1)};return Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.settingsOptionsContainer,children:Object(n.jsx)(ao,{slideOptions:[Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.lambdaContainer,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:t.searchField,id:"search-resource",label:"",onChange:function(e){j(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(Mt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){O(!0)},children:Object(n.jsx)(xo.a,{})}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){C(1)},children:"Add Notification Target"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:[],columns:[{label:"Status",elementKey:"status",renderFunction:function(e){return Object(n.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[Object(n.jsx)(so.a,{style:"Offline"===e?{color:ro.a[500]}:{}}),e]})},width:150},{label:"Service",elementKey:"service_name"}],isLoading:p,records:E,entityName:"Lambda Notification Targets",idField:"service_name",customPaperHeight:t.customConfigurationPage,noBackground:!0})})]})}),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.backContainer,children:Object(n.jsxs)("button",{onClick:A,className:t.backButton,children:[Object(n.jsx)(no,{}),"Back To Lambda Notifications"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(go,{setService:function(e){T(e),C(2)}})})]}),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.backContainer,children:Object(n.jsxs)("button",{onClick:A,className:t.backButton,children:[Object(n.jsx)(no,{}),"Back To Supported Services"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ho,{service:N,saveAndRefresh:function(){O(!0),C(0),T("")}})})]})],currentSlide:S})})})})})})}))),Co=a(433),ko=a.n(Co),wo=a(432),No=a.n(wo),To=Object(N.a)((function(e){return Object(k.a)({errorBlock:{color:e.palette.error.main}})}))((function(e){var t=e.classes,a=e.errorMessage,c=e.withBreak,r=void 0===c||c;return Object(n.jsxs)(i.a.Fragment,{children:[r&&Object(n.jsx)("br",{}),Object(n.jsx)(v.a,{component:"p",variant:"body1",className:t.errorBlock,children:a})]})})),Eo=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),{},{textBoxContainer:{flexGrow:1,position:"relative",flexDirection:"column"},errorState:{color:"#b53b4b",fontSize:14,position:"absolute",top:7,right:7},errorText:{margin:"0",fontSize:"0.75rem",marginTop:3,textAlign:"left",fontFamily:"Lato,sans-serif",fontWeight:400,lineHeight:"1.66",color:"#dc1f2e"},valueString:{maxWidth:350,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:2},fileReselect:{display:"flex",alignItems:"center"},fieldBottom:{borderBottom:"#9c9c9c 1px solid"},fileInputField:{margin:"13px 0"}}))}))((function(e){var t=e.label,a=e.classes,r=e.onChange,o=e.id,s=e.name,l=e.disabled,d=void 0!==l&&l,b=e.tooltip,j=void 0===b?"":b,m=e.required,h=e.error,p=void 0===h?"":h,O=e.accept,g=void 0===O?"":O,f=e.value,v=void 0===f?"":f,y=Object(c.useState)(!1),S=Object(u.a)(y,2),C=S[0],k=S[1];return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(a.fieldBottom," ").concat(a.fieldContainer," ").concat(""!==p?a.errorInField:""),children:[""!==t&&Object(n.jsxs)(ia.a,{htmlFor:o,className:"".concat(""!==p?a.fieldLabelError:""," ").concat(a.inputLabel),children:[Object(n.jsxs)("span",{children:[t,m?"*":""]}),""!==j&&Object(n.jsx)("div",{className:a.tooltipContainer,children:Object(n.jsx)(ra.a,{title:j,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:a.tooltip})})})})]}),C||""===v?Object(n.jsxs)("div",{className:a.textBoxContainer,children:[Object(n.jsx)("input",{type:"file",name:s,onChange:function(e){var t=Z()(e,"target.files[0].name","");!function(e,t){var a=e.target.files[0],n=new FileReader;n.readAsDataURL(a),n.onload=function(){var e=n.result;if(e){var a=e.toString().split("base64,");2===a.length&&t(a[1])}}}(e,(function(e){r(e,t)}))},accept:g,required:m,disabled:d,className:a.fileInputField}),""!==v&&Object(n.jsx)(Mt.a,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){k(!1)},disableRipple:!1,disableFocusRipple:!1,children:Object(n.jsx)(No.a,{})}),""!==p&&Object(n.jsx)(To,{errorMessage:p})]}):Object(n.jsxs)("div",{className:a.fileReselect,children:[Object(n.jsx)("div",{className:a.valueString,children:v}),Object(n.jsx)(Mt.a,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){k(!0)},disableRipple:!1,disableFocusRipple:!1,children:Object(n.jsx)(ko.a,{})})]})]})})})),Ao={setErrorSnackMessage:V},_o=Object(s.b)(null,Ao),Io=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},we),Be),{},{strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"},customTitle:Object(j.a)(Object(j.a)({},Be.customTitle),{},{marginTop:0}),settingsFormContainer:Object(j.a)(Object(j.a)({},Be.settingsFormContainer),{},{height:"calc(100vh - 422px)"})}))}))(_o((function(e){var t=e.saveAndRefresh,a=e.classes,i=e.setErrorSnackMessage,r=e.type,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(""),m=Object(u.a)(b,2),h=m[0],p=m[1],O=Object(c.useState)(""),f=Object(u.a)(O,2),v=f[0],y=f[1],S=Object(c.useState)(""),C=Object(u.a)(S,2),k=C[0],w=C[1],N=Object(c.useState)(""),T=Object(u.a)(N,2),E=T[0],A=T[1],_=Object(c.useState)(""),I=Object(u.a)(_,2),F=I[0],M=I[1],L=Object(c.useState)(""),D=Object(u.a)(L,2),B=D[0],R=D[1],P=Object(c.useState)(""),z=Object(u.a)(P,2),K=z[0],W=z[1],U=Object(c.useState)(""),V=Object(u.a)(U,2),G=V[0],q=V[1],H=Object(c.useState)(""),Y=Object(u.a)(H,2),Q=Y[0],Z=Y[1],J=Object(c.useState)(""),$=Object(u.a)(J,2),X=$[0],ee=$[1],te=Object(c.useState)(""),ae=Object(u.a)(te,2),ne=ae[0],ce=ae[1],ie=Object(c.useState)(""),re=Object(u.a)(ie,2),oe=re[0],se=re[1],le=Object(c.useState)(""),de=Object(u.a)(le,2),be=de[0],ue=de[1],je=Object(c.useState)(!0),me=Object(u.a)(je,2),pe=me[0],Oe=me[1];Object(c.useEffect)((function(){if(l){var e={},a={name:h,endpoint:v,bucket:k,prefix:E,region:F},n=r;switch("minio"===r&&(n="s3"),r){case"minio":case"s3":e={s3:Object(j.a)(Object(j.a)({},a),{},{accesskey:K,secretkey:G,storageclass:B})};break;case"gcs":e={gcs:Object(j.a)(Object(j.a)({},a),{},{creds:X})};break;case"azure":e={azure:Object(j.a)(Object(j.a)({},a),{},{accountname:ne,accountkey:oe})}}var c=Object(j.a)({type:n},e);he.invoke("POST","/api/v1/admin/tiers",c).then((function(){d(!1),t()})).catch((function(e){d(!1),i(e)}))}}),[K,oe,ne,k,X,v,h,E,F,t,l,G,i,B,r]),Object(c.useEffect)((function(){var e=!0;""===r&&(e=!1),""===r&&(e=!1),""===h&&(e=!1),""===v&&(e=!1),""===k&&(e=!1),""===E&&(e=!1),""===F&&(e=!1),"s3"!==r&&"minio"!==r||(""===K&&(e=!1),""===G&&(e=!1)),"gcs"===r&&""===X&&(e=!1),"azure"===r&&(""===ne&&(e=!1),""===oe&&(e=!1)),Oe(e)}),[K,oe,ne,k,X,v,pe,h,E,F,G,B,r]),Object(c.useEffect)((function(){switch(r){case"gcs":y("https://storage.googleapis.com/"),ue("Google Cloud");break;case"s3":y("https://s3.amazonaws.com"),ue("Amazon S3");break;case"azure":y("http://blob.core.windows.net"),ue("Azure");break;case"minio":y(""),ue("MinIO")}}),[r]);return Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)("form",{noValidate:!0,onSubmit:function(e){e.preventDefault(),d(!0)},children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:a.customTitle,children:[be," - Add Tier Configuration"]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:a.settingsFormContainer,children:Object(n.jsx)(x.a,{container:!0,children:""!==r&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(va,{id:"name",name:"name",label:"Name",placeholder:"Enter Name",value:h,onChange:function(e){p(e.target.value)}}),Object(n.jsx)(va,{id:"endpoint",name:"endpoint",label:"Endpoint",placeholder:"Enter Endpoint",value:v,onChange:function(e){y(e.target.value)}}),"s3"===r||"minio"===r&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(va,{id:"accessKey",name:"accessKey",label:"Access Key",placeholder:"Enter Access Key",value:K,onChange:function(e){W(e.target.value)}}),Object(n.jsx)(va,{id:"secretKey",name:"secretKey",label:"Secret Key",placeholder:"Enter Secret Key",value:G,onChange:function(e){q(e.target.value)}})]}),"gcs"===r&&Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(Eo,{accept:".json",id:"creds",label:"Credentials",name:"creds",onChange:function(e,t){ee(e),Z(t)},value:Q})}),"azure"===r&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(va,{id:"accountName",name:"accountName",label:"Account Name",placeholder:"Enter Account Name",value:ne,onChange:function(e){ce(e.target.value)}}),Object(n.jsx)(va,{id:"accountKey",name:"accountKey",label:"Account Key",placeholder:"Enter Account Key",value:oe,onChange:function(e){se(e.target.value)}})]}),Object(n.jsx)(va,{id:"bucket",name:"bucket",label:"Bucket",placeholder:"Enter Bucket",value:k,onChange:function(e){w(e.target.value)}}),Object(n.jsx)(va,{id:"prefix",name:"prefix",label:"Prefix",placeholder:"Enter Prefix",value:E,onChange:function(e){A(e.target.value)}}),Object(n.jsx)(va,{id:"region",name:"region",label:"Region",placeholder:"Enter Region",value:F,onChange:function(e){M(e.target.value)}}),"s3"===r||"minio"===r&&Object(n.jsx)(va,{id:"storageClass",name:"storageClass",label:"Storage Class",placeholder:"Enter Storage Class",value:B,onChange:function(e){R(e.target.value)}})]})})}),Object(n.jsx)(x.a,{item:!0,xs:12,className:a.settingsButtonContainer,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:a.innerSettingsButtonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:l||!pe,children:"Save"})})})]})})}))),Fo=Object(s.b)(null,{setModalErrorSnackMessage:q}),Mo=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},we))}))(Fo((function(e){var t=e.open,a=e.closeModalAndRefresh,i=e.classes,r=e.tierData,o=e.setModalErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(""),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(""),f=Object(u.a)(O,2),v=f[0],S=f[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(""),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(""),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)(!0),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Z()(r,"type",""),G=Z()(r,"".concat(V,".name"),"");Object(c.useEffect)((function(){var e=!0;"s3"===V||"azure"===V?""!==M&&""!==R||(e=!1):"gcs"===V&&""===A&&(e=!1),U(e)}),[R,M,A,V]);return Object(n.jsx)(ga,{modalOpen:t,onClose:function(){a(!1)},title:"Update Credentials - ".concat(V," / ").concat(G),children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b(!0),function(){var e={};"s3"===V||"azure"===V?e={access_key:M,secret_key:R}:"gcs"===V&&(e={creds:A}),""!==G?he.invoke("PUT","/api/v1/admin/tiers/".concat(V,"/").concat(G,"/credentials"),e).then((function(){b(!1),a(!0)})).catch((function(e){b(!1),o(e)})):o("There was an error retrieving tier information")}()},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:i.formScrollable,children:["s3"===V&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(va,{id:"accessKey",name:"accessKey",label:"Access Key",placeholder:"Enter Access Key",value:h,onChange:function(e){p(e.target.value)}}),Object(n.jsx)(va,{id:"secretKey",name:"secretKey",label:"Secret Key",placeholder:"Enter Secret Key",value:v,onChange:function(e){S(e.target.value)}})]}),"gcs"===V&&Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(Eo,{accept:".json",id:"creds",label:"Credentials",name:"creds",onChange:function(e,t){_(e),N(t)},value:w})}),"azure"===V&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(va,{id:"accountName",name:"accountName",label:"Account Name",placeholder:"Enter Account Name",value:M,onChange:function(e){L(e.target.value)}}),Object(n.jsx)(va,{id:"accountKey",name:"accountKey",label:"Account Key",placeholder:"Enter Account Key",value:R,onChange:function(e){P(e.target.value)}})]})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:i.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:d||!W,children:"Save"})}),d&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),Lo={setErrorSnackMessage:V},Do=Object(s.b)(null,Lo),Bo=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({},Ie),Fe),Be),Re),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})),{},{strongText:{fontWeight:700},keyName:{marginLeft:5},iconText:{lineHeight:"24px"},customConfigurationPage:{height:"calc(100vh - 410px)",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},lambdaContainer:{padding:"15px 0"},actionsTray:Object(j.a)(Object(j.a)({},Ie.actionsTray),{},{padding:"0 38px"}),customTitle:Object(j.a)(Object(j.a)({},Be.customTitle),{},{marginTop:0})}))}))(Do((function(e){var t=e.classes,a=e.setErrorSnackMessage,i=Object(c.useState)([]),r=Object(u.a)(i,2),o=r[0],s=r[1],l=Object(c.useState)(""),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(!0),h=Object(u.a)(m,2),p=h[0],O=h[1],v=Object(c.useState)(0),y=Object(u.a)(v,2),S=y[0],C=y[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)({type:"unsupported"}),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(""),M=Object(u.a)(F,2),L=M[0],D=M[1];Object(c.useEffect)((function(){if(p){he.invoke("GET","/api/v1/admin/tiers").then((function(e){s(e.items||[]),O(!1)})).catch((function(e){a(e),O(!1)}))}}),[p,a]);var B=o.filter((function(e){if(""===b)return!0;var t=Z()(e,"".concat(e.type,".name"),""),a=Z()(e,"type","");return t.indexOf(b)>=0||a.indexOf(b)>=0})),R=function(){C(S-1)},P=function(e){D(e),C(2)};return Object(n.jsxs)(c.Fragment,{children:[N&&Object(n.jsx)(Mo,{open:N,tierData:_,closeModalAndRefresh:function(){T(!1)}}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.settingsOptionsContainer,children:Object(n.jsx)(ao,{slideOptions:[Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.lambdaContainer,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:t.searchField,id:"search-resource",label:"",onChange:function(e){j(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(Mt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){O(!0)},children:Object(n.jsx)(xo.a,{})}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){C(1)},children:"Add Tier"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:[{type:"edit",onClick:function(e){I(e),T(!0)}}],columns:[{label:"Tier Name",elementKey:"type",renderFunction:function(e){var t=Z()(e,"".concat(e.type,".name"),"");return null!==t?t:""},renderFullObject:!0},{label:"Type",elementKey:"type",width:150},{label:"Endpoint",elementKey:"type",renderFunction:function(e){var t=Z()(e,"".concat(e.type,".endpoint"),"");return null!==t?t:""},renderFullObject:!0},{label:"Bucket",elementKey:"type",renderFunction:function(e){var t=Z()(e,"".concat(e.type,".bucket"),"");return null!==t?t:""},renderFullObject:!0},{label:"Prefix",elementKey:"type",renderFunction:function(e){var t=Z()(e,"".concat(e.type,".prefix"),"");return null!==t?t:""},renderFullObject:!0},{label:"Region",elementKey:"type",renderFunction:function(e){var t=Z()(e,"".concat(e.type,".region"),"");return null!==t?t:""},renderFullObject:!0}],isLoading:p,records:B,entityName:"Tiers",idField:"service_name",customPaperHeight:t.customConfigurationPage,noBackground:!0})})]})}),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.backContainer,children:Object(n.jsxs)("button",{onClick:R,className:t.backButton,children:[Object(n.jsx)(no,{}),"Back To Tiers"]})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.customTitle,children:"Add Tier Configuration"}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.settingsFormContainer,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:t.centerElements,children:Object(n.jsxs)("div",{className:t.iconContainer,children:[Object(n.jsx)("button",{className:t.lambdaNotif,onClick:function(){P("minio")},children:Object(n.jsx)("img",{src:"/minioTier.png",className:t.logoButton,alt:"MinIO"})}),Object(n.jsx)("button",{className:t.lambdaNotif,onClick:function(){P("gcs")},children:Object(n.jsx)("img",{src:"/gcs.png",className:t.logoButton,alt:"GCS"})}),Object(n.jsx)("button",{className:t.lambdaNotif,onClick:function(){P("s3")},children:Object(n.jsx)("img",{src:"/amazon.png",className:t.logoButton,alt:"s3"})}),Object(n.jsx)("button",{className:t.lambdaNotif,onClick:function(){P("azure")},children:Object(n.jsx)("img",{src:"/azure.png",className:t.logoButton,alt:"Azure"})})]})})})})]})]}),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.backContainer,children:Object(n.jsxs)("button",{onClick:R,className:t.backButton,children:[Object(n.jsx)(no,{}),"Back To Tier Type Selection"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:2===S&&Object(n.jsx)(Io,{type:L,saveAndRefresh:function(){C(0),O(!0)}})})]})],currentSlide:S})})})})})]})}))),Ro=Object(s.b)((function(e){return{session:e.console.session}}),{}),Po=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Ro((function(e){var t=e.classes,a=(e.session,Object(c.useState)(0)),i=Object(u.a)(a,2),r=i[0],o=i[1];return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(Ua,{label:"Settings"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsxs)(tn.a,{value:r,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){o(t)},"aria-label":"tenant-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(n.jsx)(an.a,{label:"Configurations"}),Object(n.jsx)(an.a,{label:"Lambda Notifications"}),Object(n.jsx)(an.a,{label:"Tiers"})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[0===r&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(io,{})}),1===r&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(So,{})}),2===r&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Bo,{})})]})]})})]})}))),zo=a(154),Ko=a.n(zo),Wo={logger:{main:"logger",title:"Logger Webhook Configuration",modalTitle:"Logger Webhook",apiURL:"",configuration:{configuration_id:"logger_webhook",configuration_label:"Logger Webhook"}},audit:{main:"audit",title:"Audit Webhook Configuration",modalTitle:"Audit Webhook",apiURL:"",configuration:{configuration_id:"audit_webhook",configuration_label:"Audit Webhook"}}},Uo=Object(N.a)((function(e){return Object(k.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},actionsTray:{textAlign:"right","& button":{marginLeft:10}},searchField:{background:"#FFFFFF",padding:12,borderRadius:5,boxShadow:"0px 3px 6px #00000012"},iconText:{lineHeight:"24px"}})}))((function(e){var t=e.match,a=e.classes,r=Object(c.useState)(!1),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(""),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(!1),p=Object(u.a)(h,2),O=p[0],y=p[1],S=Z()(t,"path","").split("/"),C=Z()(Wo,S[2],!1);if(!C)return null;var k=[].filter((function(e){return e.name.toLocaleLowerCase().includes(j.toLocaleLowerCase())}));return Object(n.jsxs)(i.a.Fragment,{children:[s&&Object(n.jsx)(to,{closeModalAndRefresh:function(){y(!0),l(!1)},selectedConfiguration:C.configuration}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"h6",children:C.title})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:a.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:a.searchField,id:"search-resource",label:"",onChange:function(e){m(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(Ko.a,{}),onClick:function(){l(!0)},children:"Add Webhook Configuration"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:[{type:"edit",onClick:function(){}}],columns:[{label:"Name",elementKey:"name"}],isLoading:O,records:k,entityName:"Webhook Configurations",idField:"name"})})]})]})})),Vo=Object(s.b)(null,{setErrorSnackMessage:V})((function(e){var t=e.deleteOpen,a=e.selectedTenant,i=e.closeDeleteModalAndRefresh,r=e.setErrorSnackMessage,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(""),j=Object(u.a)(b,2),m=j[0],h=j[1];Object(c.useEffect)((function(){l&&he.invoke("DELETE","/api/v1/namespaces/".concat(a.namespace,"/tenants/").concat(a.name)).then((function(){d(!1),i(!0)})).catch((function(e){d(!1),r(e)}))}),[l]);return Object(n.jsxs)(ja.a,{open:t,onClose:function(){i(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete Tenant"}),Object(n.jsxs)(ha.a,{children:[l&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["To continue please type ",Object(n.jsx)("b",{children:a.name})," in the box.",Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"retype-tenant",name:"retype-tenant",onChange:function(e){h(e.target.value)},label:"",value:m})})]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){i(!1)},color:"primary",disabled:l,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){m===a.name?d(!0):r("Tenant name is not correct")},color:"secondary",autoFocus:!0,disabled:m!==a.name,children:"Delete"})]})]})})),Go=function(e,t){return{podAntiAffinity:{requiredDuringSchedulingIgnoredDuringExecution:[{labelSelector:{matchExpressions:[{key:"v1.min.io/tenant",operator:"In",values:[e]},{key:"v1.min.io/pool",operator:"In",values:[t]}]},topologyKey:"kubernetes.io/hostname"}]}}},qo=function(e,t,a,n){var c=e.split("&"),i=[];c.forEach((function(e){var t=e.split("=");2===t.length&&i.push({key:t[0],operator:"In",values:[t[1]]})}));var r={nodeAffinity:{requiredDuringSchedulingIgnoredDuringExecution:{nodeSelectorTerms:[{matchExpressions:i}]}}};if(t){var o=Go(a,n);r.podAntiAffinity=o.podAntiAffinity}return console.log(r),r},Ho="ADD_TENANT/SET_CURRENT_PAGE",Yo="ADD_TENANT/SET_ADVANCED_MODE",Qo="ADD_TENANT/UPDATE_FIELD",Zo="ADD_TENANT/SET_PAGE_VALID",Jo="ADD_TENANT/RESET_FORM",$o="ADD_TENANT/SET_STORAGE_CLASSES_LIST",Xo="ADD_TENANT/ADD_MINIO_KEYPAIR",es="ADD_TENANT/ADD_FILE_MINIO_KEYPAIR",ts="ADD_TENANT/DELETE_MINIO_KEYPAIR",as="ADD_TENANT/ADD_CA_KEYPAIR",ns="ADD_TENANT/ADD_FILE_TO_CA_KEYPAIR",cs="ADD_TENANT/DELETE_CA_KEYPAIR",is="ADD_TENANT/ADD_CONSOLE_CERT",rs="ADD_TENANT/ENCRYPTION_SERVER_CERT",os="ADD_TENANT/ENCRYPTION_CLIENT_CERT",ss="ADD_TENANT/ENCRYPTION_VAULT_CERT",ls="ADD_TENANT/ENCRYPTION_VAULT_CA",ds="ADD_TENANT/ENCRYPTION_GEMALTO_CA",bs=function(e,t,a){return{type:Qo,pageName:e,field:t,value:a}},us=function(e,t){return{type:Zo,pageName:e,valid:t}},js=function(e,t,a){return{type:is,key:e,fileName:t,value:a}},ms=function(e){var t={};return e.forEach((function(e){if(e.required&&""===e.value.trim())t[e.fieldKey]="Field cannot be empty";else if(e.required||""!==e.value.trim())if(e.customValidation&&e.customValidationMessage)t[e.fieldKey]=e.customValidationMessage;else if(e.pattern&&e.customPatternMessage){var a=new RegExp(e.pattern,"g");e.value.match(a)||(t[e.fieldKey]=e.customPatternMessage)}else;})),t},hs=function(e,t){var a=Object(j.a)({},e);return delete a[t],a},ps=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t="",a="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=0;n0)return k(!1),void E(!1);k(!0),he.invoke("GET","/api/v1/namespaces/".concat(s,"/resourcequotas/").concat(s,"-storagequota")).then((function(e){var t=Z()(e,"elements",[]);m(function(e){var t=Z()(e,"elements",[]),a={};return t.forEach((function(e){var t=e.name.split(".storageclass.storage.k8s.io/requests.storage")[0],n=Z()(e,"hard",0),c=Z()(e,"used",0);a[t]=n-c})),a}(e));var a=t.map((function(e){var t=Z()(e,"name","").split(".storageclass.storage.k8s.io/requests.storage")[0];return{label:t,value:t}}));j(a),a.length>0&&A("selectedStorageClass",a[0].value),E(!1)})).catch((function(e){E(!1),console.error("Namespace error: ",e)}))})).catch((function(e){console.error(e),p("Error validating if namespace already has tenants")}))}),[s,m,p,j,A]),I=Object(c.useMemo)((function(){return An()(_,500)}),[_]);Object(c.useEffect)((function(){if(""!==s)return I(),E(!0),I.cancel}),[I,s]),Object(c.useEffect)((function(){var e=!1,t="";C||T?a.length<1&&C&&!T&&(e=!0,t="Please enter a valid namespace"):(e=!0,t="You can only create one tenant per namespace");var n=ms([{fieldKey:"tenant-name",required:!0,pattern:/^[a-z0-9-]{3,63}$/,customPatternMessage:"Name only can contain lowercase letters, numbers and '-'. Min. Length: 3",value:o},{fieldKey:"namespace",required:!0,value:s,customValidation:e,customValidationMessage:t}]),c=!("tenant-name"in n)&&!("namespace"in n)&&a.length>0;h("nameTenant",c),v(n)}),[a,s,o,h,C,T]);var F=function(e){v(hs(f,e))};return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Name Tenant"}),Object(n.jsx)("span",{className:t.descriptionText,children:"How would you like to name this new tenant?"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"tenant-name",name:"tenant-name",onChange:function(e){A("tenantName",e.target.value),F("tenant-name")},label:"Name",value:o,required:!0,error:f["tenant-name"]||""})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"namespace",name:"namespace",onChange:function(e){A("namespace",e.target.value),F("namespace")},label:"Namespace",value:s,error:f.namespace||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{id:"storage_class",name:"storage_class",onChange:function(e){A("selectedStorageClass",e.target.value)},label:"Storage Class",value:l,options:a,disabled:a.length<1})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)("br",{}),Object(n.jsxs)("span",{className:t.descriptionText,children:["Check 'Advanced Mode' for additional configuration options, such as configuring an Identity Provider, Encryption at rest, and customized TLS/SSL Certificates.",Object(n.jsx)("br",{}),"Leave 'Advanced Mode' unchecked to use the secure default settings for the tenant."]}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(Ba,{value:"adv_mode",id:"adv_mode",name:"adv_mode",checked:r,onChange:function(e){var t=e.target.checked;d(t)},label:"Advanced Mode"})]})]})}))),fs=Object(s.b)((function(e){return{storageClasses:e.tenants.createTenant.storageClasses,customImage:e.tenants.createTenant.fields.configure.customImage,imageName:e.tenants.createTenant.fields.configure.imageName,consoleImage:e.tenants.createTenant.fields.configure.consoleImage,customDockerhub:e.tenants.createTenant.fields.configure.customDockerhub,imageRegistry:e.tenants.createTenant.fields.configure.imageRegistry,imageRegistryUsername:e.tenants.createTenant.fields.configure.imageRegistryUsername,imageRegistryPassword:e.tenants.createTenant.fields.configure.imageRegistryPassword,exposeMinIO:e.tenants.createTenant.fields.configure.exposeMinIO,exposeConsole:e.tenants.createTenant.fields.configure.exposeConsole,prometheusCustom:e.tenants.createTenant.fields.configure.prometheusCustom,logSearchCustom:e.tenants.createTenant.fields.configure.logSearchCustom,logSearchVolumeSize:e.tenants.createTenant.fields.configure.logSearchVolumeSize,logSearchSizeFactor:e.tenants.createTenant.fields.configure.logSearchSizeFactor,prometheusVolumeSize:e.tenants.createTenant.fields.configure.prometheusVolumeSize,prometheusSizeFactor:e.tenants.createTenant.fields.configure.prometheusSizeFactor,logSearchSelectedStorageClass:e.tenants.createTenant.fields.configure.logSearchSelectedStorageClass,logSearchImage:e.tenants.createTenant.fields.configure.logSearchImage,kesImage:e.tenants.createTenant.fields.configure.kesImage,logSearchPostgresImage:e.tenants.createTenant.fields.configure.logSearchPostgresImage,prometheusSelectedStorageClass:e.tenants.createTenant.fields.configure.prometheusSelectedStorageClass,prometheusImage:e.tenants.createTenant.fields.configure.prometheusImage,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass}}),{updateAddField:bs,isPageValid:us}),xs=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue))}))(fs((function(e){var t=e.classes,a=e.storageClasses,i=e.customImage,r=e.imageName,o=e.consoleImage,s=e.customDockerhub,l=e.imageRegistry,d=e.imageRegistryUsername,b=e.imageRegistryPassword,j=e.exposeMinIO,m=e.exposeConsole,h=e.prometheusCustom,p=e.logSearchCustom,O=e.logSearchVolumeSize,g=(e.logSearchSizeFactor,e.logSearchImage),f=e.kesImage,v=e.logSearchPostgresImage,y=e.prometheusVolumeSize,S=(e.prometheusSizeFactor,e.logSearchSelectedStorageClass),C=e.prometheusSelectedStorageClass,k=e.prometheusImage,w=e.updateAddField,N=e.isPageValid,T=e.selectedStorageClass,E=Object(c.useState)({}),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useCallback)((function(e,t){w("configure",e,t)}),[w]);Object(c.useEffect)((function(){var e=[];h&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"prometheus_storage_class",required:!0,value:C,customValidation:""===C,customValidationMessage:"Field cannot be empty"},{fieldKey:"prometheus_volume_size",required:!0,value:y,customValidation:""===y||parseInt(y)<=0,customValidationMessage:"Volume size must be present and be greatter than 0"}])),p&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"log_search_storage_class",required:!0,value:S,customValidation:""===S,customValidationMessage:"Field cannot be empty"},{fieldKey:"log_search_volume_size",required:!0,value:O,customValidation:""===O||parseInt(O)<=0,customValidationMessage:"Volume size must be present and be greatter than 0"}])),i&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"image",required:!1,value:r,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/minio:VERSION'"},{fieldKey:"consoleImage",required:!1,value:o,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/console:VERSION'"},{fieldKey:"logSearchImage",required:!1,value:g,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/logsearchapi:VERSION'"},{fieldKey:"kesImage",required:!1,value:f,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/kes:VERSION'"},{fieldKey:"logSearchPostgresImage",required:!1,value:v,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/postgres:VERSION'"},{fieldKey:"prometheusImage",required:!1,value:k,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/prometheus:VERSION'"}]),s&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"registry",required:!0,value:l},{fieldKey:"registryUsername",required:!0,value:d},{fieldKey:"registryPassword",required:!0,value:b}])));var t=ms(e);N("configure",0===Object.keys(t).length),I(t)}),[i,r,o,g,f,v,k,s,l,d,b,N,h,p,C,y,S,O]),Object(c.useEffect)((function(){a.length>0&&(0===a.filter((function(e){return e.value===C})).length&&F("prometheusSelectedStorageClass",T),0===a.filter((function(e){return e.value===S})).length&&F("logSearchSelectedStorageClass",T))}),[S,C,T,a,F]);var M=function(e){I(hs(_,e))};return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Configure"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Basic configurations for tenant management"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"custom_image",id:"custom_image",name:"custom_image",checked:i,onChange:function(e){var t=e.target.checked;F("customImage",t)},label:"Use custom image"})}),i&&Object(n.jsxs)(c.Fragment,{children:["Please enter the MinIO docker image to use",Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"image",name:"image",onChange:function(e){F("imageName",e.target.value),M("image")},label:"MinIO's Image",value:r,error:_.image||"",placeholder:"E.g. minio/minio:RELEASE.2021-04-22T15-44-28Z"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"consoleImage",name:"consoleImage",onChange:function(e){F("consoleImage",e.target.value),M("consoleImage")},label:"Console's Image",value:o,error:_.consoleImage||"",placeholder:"E.g. minio/console:v0.7.1"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"logSearchImage",name:"logSearchImage",onChange:function(e){F("logSearchImage",e.target.value),M("logSearchImage")},label:"Log Search API's Image",value:g,error:_.logSearchImage||"",placeholder:"E.g. minio/logsearchapi:v4.0.9"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"kesImage",name:"kesImage",onChange:function(e){F("kesImage",e.target.value),M("kesImage")},label:"KES Image",value:f,error:_.kesImage||"",placeholder:"E.g. minio/kes:v0.14.0"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"logSearchPostgresImage",name:"logSearchPostgresImage",onChange:function(e){F("logSearchPostgresImage",e.target.value),M("logSearchPostgresImage")},label:"Log Search Postgres's Image",value:v,error:_.logSearchPostgresImage||"",placeholder:"E.g. library/postgres:13"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"prometheusImage",name:"prometheusImage",onChange:function(e){F("prometheusImage",e.target.value),M("prometheusImage")},label:"Prometheus Image",value:k,error:_.prometheusImage||"",placeholder:"E.g. quay.io/prometheus/prometheus:latest"})})]}),i&&Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"custom_docker_hub",id:"custom_docker_hub",name:"custom_docker_hub",checked:s,onChange:function(e){var t=e.target.checked;F("customDockerhub",t)},label:"Set/Update Image Registry"})})}),s&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"registry",name:"registry",onChange:function(e){F("imageRegistry",e.target.value)},label:"Endpoint",value:l,error:_.registry||"",placeholder:"E.g. https://index.docker.io/v1/",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"registryUsername",name:"registryUsername",onChange:function(e){F("imageRegistryUsername",e.target.value)},label:"Username",value:d,error:_.registryUsername||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"registryPassword",name:"registryPassword",onChange:function(e){F("imageRegistryPassword",e.target.value)},label:"Password",value:b,error:_.registryPassword||"",required:!0})})]}),Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Expose Services"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Whether the tenant's services should request an external IP."})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"expose_minio",id:"expose_minio",name:"expose_minio",checked:j,onChange:function(e){var t=e.target.checked;F("exposeMinIO",t)},label:"Expose MiniO Service"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"expose_console",id:"expose_console",name:"expose_console",checked:m,onChange:function(e){var t=e.target.checked;F("exposeConsole",t)},label:"Expose Console Service"})}),Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Additional Configurations"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Configure Storage Classes & Storage size for Log Search and Prometheus add-ons"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"logSearchConfig",id:"log_search_configuration",name:"log_search_configuration",checked:p,onChange:function(e){var t=e.target.checked;F("logSearchCustom",t)},label:"Override Log Search defaults"})}),p&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{id:"log_search_storage_class",name:"log_search_storage_class",onChange:function(e){F("logSearchSelectedStorageClass",e.target.value)},label:"Log Search Storage Class",value:S,options:a,disabled:a.length<1})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.multiContainer,children:Object(n.jsx)("div",{children:Object(n.jsx)(va,{type:"number",id:"log_search_volume_size",name:"log_search_volume_size",onChange:function(e){F("logSearchVolumeSize",e.target.value),M("log_search_volume_size")},label:"Storage Size [Gi]",value:O,required:!0,error:_.log_search_volume_size||"",min:"0"})})})}),Object(n.jsx)("br",{})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"prometheusConfig",id:"prometheus_configuration",name:"prometheus_configuration",checked:h,onChange:function(e){var t=e.target.checked;F("prometheusCustom",t)},label:"Override Prometheus defaults"})}),h&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{id:"prometheus_storage_class",name:"prometheus_storage_class",onChange:function(e){F("prometheusSelectedStorageClass",e.target.value)},label:"Prometheus Storage Class",value:C,options:a,disabled:a.length<1})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.multiContainer,children:Object(n.jsx)("div",{children:Object(n.jsx)(va,{type:"number",id:"prometheus_volume_size",name:"prometheus_volume_size",onChange:function(e){F("prometheusVolumeSize",e.target.value),M("prometheus_volume_size")},label:"Storage Size [Gi]",value:y,required:!0,error:_.prometheus_volume_size||"",min:"0"})})})}),Object(n.jsx)("br",{})]})]})}))),vs=a(434),ys=a.n(vs),Ss=a(435),Cs=a.n(Ss),ks=Object(s.b)((function(e){return{idpSelection:e.tenants.createTenant.fields.identityProvider.idpSelection,accessKeys:e.tenants.createTenant.fields.identityProvider.accessKeys,secretKeys:e.tenants.createTenant.fields.identityProvider.secretKeys,openIDURL:e.tenants.createTenant.fields.identityProvider.openIDURL,openIDClientID:e.tenants.createTenant.fields.identityProvider.openIDClientID,openIDSecretID:e.tenants.createTenant.fields.identityProvider.openIDSecretID,ADURL:e.tenants.createTenant.fields.identityProvider.ADURL,ADSkipTLS:e.tenants.createTenant.fields.identityProvider.ADSkipTLS,ADServerInsecure:e.tenants.createTenant.fields.identityProvider.ADServerInsecure,ADUserNameFilter:e.tenants.createTenant.fields.identityProvider.ADUserNameFilter,ADGroupBaseDN:e.tenants.createTenant.fields.identityProvider.ADGroupBaseDN,ADGroupSearchFilter:e.tenants.createTenant.fields.identityProvider.ADGroupSearchFilter,ADNameAttribute:e.tenants.createTenant.fields.identityProvider.ADNameAttribute}}),{updateAddField:bs,isPageValid:us}),ws=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"},shortened:{gridTemplateColumns:"auto auto 50px 50px",display:"grid",gridGap:20},buttonTray:{gridTemplateColumns:"auto auto 10px 10px",display:"grid",gridGap:0,height:16,marginTop:12}},we),Ue))}))(ks((function(e){var t=e.classes,a=e.idpSelection,i=e.accessKeys,r=e.secretKeys,o=e.openIDURL,s=e.openIDClientID,l=e.openIDSecretID,d=e.ADURL,b=e.ADSkipTLS,j=e.ADServerInsecure,m=e.ADUserNameFilter,h=e.ADGroupBaseDN,p=e.ADGroupSearchFilter,O=e.ADNameAttribute,g=e.updateAddField,f=e.isPageValid,y=Object(c.useState)({}),S=Object(u.a)(y,2),C=S[0],k=S[1],w=Object(c.useCallback)((function(e,t){g("identityProvider",e,t)}),[g]),N=function(e,t){var a=Object(Je.a)(i);a[e]=t,w("accessKeys",a)},T=function(e,t){var a=Object(Je.a)(r);a[e]=t,w("secretKeys",a)},E=function(e){k(hs(C,e))};Object(c.useEffect)((function(){var e=[];if("Built-in"===a){e=Object(Je.a)(e);for(var t=0;t1&&(i.splice(a,1),r.splice(a,1),N(i.length-1,i[i.length-1]))},children:Object(n.jsx)(Cs.a,{})})})]})]})},"identityField-".concat(a.toString()))}))),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Identity Provider"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Access to the tenant can be controlled via an external Identity Manager."})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Fa,{currentSelection:a,id:"idp-options",name:"idp-options",label:"Protocol",onChange:function(e){w("idpSelection",e.target.value)},selectorOptions:[{label:"Built-in",value:"Built-in"},{label:"OpenID",value:"OpenID"},{label:"Active Directory",value:"AD"}]}),"Add additional users"]})," ","Built-in"===a&&Object(n.jsx)(c.Fragment,{children:A}),"OpenID"===a&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"openID_URL",name:"openID_URL",onChange:function(e){w("openIDURL",e.target.value),E("openID_URL")},label:"URL",value:o,error:C.openID_URL||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"openID_clientID",name:"openID_clientID",onChange:function(e){w("openIDClientID",e.target.value),E("openID_clientID")},label:"Client ID",value:s,error:C.openID_clientID||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"openID_secretID",name:"openID_secretID",onChange:function(e){w("openIDSecretID",e.target.value),E("openID_secretID")},label:"Secret ID",value:l,error:C.openID_secretID||"",required:!0})})]}),"AD"===a&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"AD_URL",name:"AD_URL",onChange:function(e){w("ADURL",e.target.value),E("AD_URL")},label:"URL",value:d,error:C.AD_URL||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"ad_skipTLS",id:"ad_skipTLS",name:"ad_skipTLS",checked:b,onChange:function(e){var t=e.target.checked;w("ADSkipTLS",t)},label:"Skip TLS Verification"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"ad_serverInsecure",id:"ad_serverInsecure",name:"ad_serverInsecure",checked:j,onChange:function(e){var t=e.target.checked;w("ADServerInsecure",t)},label:"Server Insecure"})}),j?Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(v.a,{className:t.error,variant:"caption",display:"block",gutterBottom:!0,children:"Warning: All traffic with Active Directory will be unencrypted"}),Object(n.jsx)("br",{})]}):null,Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"ad_userNameFilter",name:"ad_userNameFilter",onChange:function(e){w("ADUserNameFilter",e.target.value),E("ad_userNameFilter")},label:"User Search Filter",value:m,error:C.ad_userNameFilter||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"ad_groupBaseDN",name:"ad_groupBaseDN",onChange:function(e){w("ADGroupBaseDN",e.target.value),E("ad_groupBaseDN")},label:"Group Search Base DN",value:h,error:C.ad_groupBaseDN||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"ad_groupSearchFilter",name:"ad_groupSearchFilter",onChange:function(e){w("ADGroupSearchFilter",e.target.value),E("ad_groupSearchFilter")},label:"Group Search Filter",value:p,error:C.ad_groupSearchFilter||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"ad_nameAttribute",name:"ad_nameAttribute",onChange:function(e){w("ADNameAttribute",e.target.value),E("ad_nameAttribute")},label:"Group Name Attribute",value:O,error:C.ad_nameAttribute||"",required:!0})})]})]})}))),Ns=Object(s.b)((function(e){return{enableTLS:e.tenants.createTenant.fields.security.enableTLS,enableAutoCert:e.tenants.createTenant.fields.security.enableAutoCert,enableCustomCerts:e.tenants.createTenant.fields.security.enableCustomCerts,minioCertificates:e.tenants.createTenant.certificates.minioCertificates,caCertificates:e.tenants.createTenant.certificates.caCertificates,consoleCertificate:e.tenants.createTenant.certificates.consoleCertificate}}),{updateAddField:bs,isPageValid:us,addFileToCaCertificates:function(e,t,a,n){return{type:ns,id:e,key:t,fileName:a,value:n}},deleteCaCertificate:function(e){return{type:cs,id:e}},addCaCertificate:function(){return{type:as}},addKeyPair:function(){return{type:Xo}},addFileToKeyPair:function(e,t,a,n){return{type:es,id:e,key:t,fileName:a,value:n}},deleteKeyPair:function(e){return{type:ts,id:e}},addConsoleCertificate:js}),Ts=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue))}))(Ns((function(e){var t=e.classes,a=e.enableTLS,i=e.enableAutoCert,r=e.enableCustomCerts,o=e.minioCertificates,s=e.caCertificates,l=e.consoleCertificate,d=e.updateAddField,b=e.isPageValid,u=e.addFileToCaCertificates,j=e.deleteCaCertificate,m=e.addCaCertificate,h=e.addKeyPair,p=e.addFileToKeyPair,O=e.deleteKeyPair,f=Object(c.useCallback)((function(e,t){d("security",e,t)}),[d]);return Object(c.useEffect)((function(){b("security",!a||(!!i||!!r))}),[a,i,r,b]),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("div",{className:t.headerElement,children:Object(n.jsx)("h3",{className:t.h3Section,children:"Security"})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Ba,{value:"enableTLS",id:"enableTLS",name:"enableTLS",checked:a,onChange:function(e){var t=e.target.checked;f("enableTLS",t)},label:"Enable TLS"}),"Enable TLS for the tenant, this is required for Encryption Configuration",a&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(v.a,{variant:"caption",display:"block",gutterBottom:!0,children:"AutoCert: MinIO Operator will generate all TLS certificates automatically"}),Object(n.jsx)(v.a,{variant:"caption",display:"block",gutterBottom:!0,children:"Custom certificates: Allow user to provide your own certificates"}),Object(n.jsx)("br",{})]})]}),a&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Ba,{value:"enableAutoCert",id:"enableAutoCert",name:"enableAutoCert",checked:i,onChange:function(e){var t=e.target.checked;f("enableAutoCert",t)},label:"Enable AutoCert"}),Object(n.jsx)(Ba,{value:"enableCustomCerts",id:"enableCustomCerts",name:"enableCustomCerts",checked:r,onChange:function(e){var t=e.target.checked;f("enableCustomCerts",t)},label:"Custom Certificates"})]}),r&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,children:"MinIO Certificates"})}),o.map((function(e){return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:5,children:Object(n.jsx)(Eo,{onChange:function(t,a){p(e.id,"key",a,t)},accept:".key,.pem",id:"tlsKey",name:"tlsKey",label:"Key",value:e.key})}),Object(n.jsx)(x.a,{item:!0,xs:5,children:Object(n.jsx)(Eo,{onChange:function(t,a){p(e.id,"cert",a,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert})}),Object(n.jsx)(x.a,{item:!0,xs:1,children:Object(n.jsx)(g.a,{onClick:function(){O(e.id)},color:"secondary",children:"Remove"})})]},e.id)})),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(g.a,{onClick:h,color:"primary",children:"Add More"})})]}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)("br",{}),Object(n.jsx)(oi.a,{}),Object(n.jsx)("br",{})]})}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,children:"CA Certificates"})}),s.map((function(e){return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:10,children:Object(n.jsx)(Eo,{onChange:function(t,a){u(e.id,"cert",a,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert})}),Object(n.jsx)(x.a,{item:!0,xs:1,children:Object(n.jsx)(g.a,{onClick:function(){j(e.id)},color:"secondary",children:"Remove"})})]},e.id)})),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(g.a,{onClick:m,color:"primary",children:"Add More"})})]}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)("br",{}),Object(n.jsx)(oi.a,{}),Object(n.jsx)("br",{})]})}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,children:"Console Certificates"})}),Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){js("key",t,e)},accept:".key,.pem",id:"consoleKey",name:"consoleKey",label:"Key",value:l.key})}),Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){js("cert",t,e)},accept:".cer,.crt,.cert,.pem",id:"consoleCert",name:"consoleCert",label:"Cert",value:l.cert})})]})]})]})]})}))),Es=Object(s.b)((function(e){return{enableEncryption:e.tenants.createTenant.fields.encryption.enableEncryption,encryptionType:e.tenants.createTenant.fields.encryption.encryptionType,gemaltoEndpoint:e.tenants.createTenant.fields.encryption.gemaltoEndpoint,gemaltoToken:e.tenants.createTenant.fields.encryption.gemaltoToken,gemaltoDomain:e.tenants.createTenant.fields.encryption.gemaltoDomain,gemaltoRetry:e.tenants.createTenant.fields.encryption.gemaltoRetry,awsEndpoint:e.tenants.createTenant.fields.encryption.awsEndpoint,awsRegion:e.tenants.createTenant.fields.encryption.awsRegion,awsKMSKey:e.tenants.createTenant.fields.encryption.awsKMSKey,awsAccessKey:e.tenants.createTenant.fields.encryption.awsAccessKey,awsSecretKey:e.tenants.createTenant.fields.encryption.awsSecretKey,awsToken:e.tenants.createTenant.fields.encryption.awsToken,vaultEndpoint:e.tenants.createTenant.fields.encryption.vaultEndpoint,vaultEngine:e.tenants.createTenant.fields.encryption.vaultEngine,vaultNamespace:e.tenants.createTenant.fields.encryption.vaultNamespace,vaultPrefix:e.tenants.createTenant.fields.encryption.vaultPrefix,vaultAppRoleEngine:e.tenants.createTenant.fields.encryption.vaultAppRoleEngine,vaultId:e.tenants.createTenant.fields.encryption.vaultId,vaultSecret:e.tenants.createTenant.fields.encryption.vaultSecret,vaultRetry:e.tenants.createTenant.fields.encryption.vaultRetry,vaultPing:e.tenants.createTenant.fields.encryption.vaultPing,gcpProjectID:e.tenants.createTenant.fields.encryption.gcpProjectID,gcpEndpoint:e.tenants.createTenant.fields.encryption.gcpEndpoint,gcpClientEmail:e.tenants.createTenant.fields.encryption.gcpClientEmail,gcpClientID:e.tenants.createTenant.fields.encryption.gcpClientID,gcpPrivateKeyID:e.tenants.createTenant.fields.encryption.gcpPrivateKeyID,gcpPrivateKey:e.tenants.createTenant.fields.encryption.gcpPrivateKey,enableCustomCertsForKES:e.tenants.createTenant.fields.encryption.enableCustomCertsForKES,enableAutoCert:e.tenants.createTenant.fields.security.enableAutoCert,enableTLS:e.tenants.createTenant.fields.security.enableTLS,minioCertificates:e.tenants.createTenant.certificates.minioCertificates,serverCertificate:e.tenants.createTenant.certificates.serverCertificate,clientCertificate:e.tenants.createTenant.certificates.clientCertificate,vaultCertificate:e.tenants.createTenant.certificates.vaultCertificate,vaultCA:e.tenants.createTenant.certificates.vaultCA,gemaltoCA:e.tenants.createTenant.certificates.gemaltoCA,enableCustomCerts:e.tenants.createTenant.fields.security.enableCustomCerts}}),{updateAddField:bs,isPageValid:us,addFileServerCert:function(e,t,a){return{type:rs,key:e,fileName:t,value:a}},addFileClientCert:function(e,t,a){return{type:os,key:e,fileName:t,value:a}},addFileVaultCert:function(e,t,a){return{type:ss,key:e,fileName:t,value:a}},addFileVaultCa:function(e,t){return{type:ls,fileName:e,value:t}},addFileGemaltoCa:function(e,t){return{type:ds,fileName:e,value:t}}}),As=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue))}))(Es((function(e){var t=e.classes,a=e.updateAddField,i=e.isPageValid,r=e.addFileServerCert,o=e.addFileClientCert,s=e.addFileVaultCert,l=e.addFileVaultCa,d=e.addFileGemaltoCa,b=e.enableEncryption,j=e.enableCustomCerts,m=e.encryptionType,h=e.gemaltoEndpoint,p=e.gemaltoToken,O=e.gemaltoDomain,g=e.gemaltoRetry,f=e.awsEndpoint,y=e.awsRegion,S=e.awsKMSKey,C=e.awsAccessKey,k=e.awsSecretKey,w=e.awsToken,N=e.vaultEndpoint,T=e.vaultEngine,E=e.vaultNamespace,A=e.vaultPrefix,_=e.vaultAppRoleEngine,I=e.vaultId,F=e.vaultSecret,M=e.vaultRetry,L=e.vaultPing,D=e.gcpProjectID,B=e.gcpEndpoint,R=e.gcpClientEmail,P=e.gcpClientID,z=e.gcpPrivateKeyID,K=e.gcpPrivateKey,W=e.enableCustomCertsForKES,U=e.enableAutoCert,V=e.enableTLS,G=e.minioCertificates,q=e.serverCertificate,H=e.clientCertificate,Y=e.vaultCertificate,Q=e.vaultCA,Z=e.gemaltoCA,J=Object(c.useState)({}),$=Object(u.a)(J,2),X=$[0],ee=$[1],te=!1;V&&(U||G&&G.filter((function(e){return e.encoded_key&&e.encoded_cert})).length>0)&&(te=!0);var ae=Object(c.useCallback)((function(e,t){a("encryption",e,t)}),[a]),ne=function(e){ee(hs(X,e))};return Object(c.useEffect)((function(){var e=[];b&&(j&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"serverKey",required:!U,value:q.encoded_key},{fieldKey:"serverCert",required:!U,value:q.encoded_cert},{fieldKey:"clientKey",required:!U,value:H.encoded_key},{fieldKey:"clientCert",required:!U,value:H.encoded_cert}])),"vault"===m&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"vault_endpoint",required:!0,value:N},{fieldKey:"vault_id",required:!0,value:I},{fieldKey:"vault_secret",required:!0,value:F},{fieldKey:"vault_ping",required:!1,value:L,customValidation:parseInt(L)<0,customValidationMessage:"Value needs to be 0 or greater"},{fieldKey:"vault_retry",required:!1,value:M,customValidation:parseInt(M)<0,customValidationMessage:"Value needs to be 0 or greater"}])),"aws"===m&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"aws_endpoint",required:!0,value:f},{fieldKey:"aws_region",required:!0,value:y},{fieldKey:"aws_accessKey",required:!0,value:C},{fieldKey:"aws_secretKey",required:!0,value:k}])),"gemalto"===m&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"gemalto_endpoint",required:!0,value:h},{fieldKey:"gemalto_token",required:!0,value:p},{fieldKey:"gemalto_domain",required:!0,value:O},{fieldKey:"gemalto_retry",required:!1,value:g,customValidation:parseInt(g)<0,customValidationMessage:"Value needs to be 0 or greater"}])));var t=ms(e);i("encryption",0===Object.keys(t).length),ee(t)}),[b,m,N,T,I,F,L,M,f,y,k,C,h,p,O,g,D,i,U,j,q.encoded_key,q.encoded_cert,H.encoded_key,H.encoded_cert]),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Encryption"}),Object(n.jsx)("span",{className:t.descriptionText,children:"How would you like to encrypt the information at rest."})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"enableEncryption",id:"enableEncryption",name:"enableEncryption",checked:b,onChange:function(e){var t=e.target.checked;ae("enableEncryption",t)},label:"Enable Server Side Encryption",disabled:!te})}),b&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:m,id:"encryptionType",name:"encryptionType",label:"Encryption Options",onChange:function(e){ae("encryptionType",e.target.value)},selectorOptions:[{label:"Vault",value:"vault"},{label:"AWS",value:"aws"},{label:"Gemalto",value:"gemalto"},{label:"GCP",value:"gcp"}]})}),"vault"===m&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"enableCustomCertsForKES",id:"enableCustomCertsForKES",name:"enableCustomCertsForKES",checked:W||!U,onChange:function(e){var t=e.target.checked;ae("enableCustomCertsForKES",t)},label:"Custom Certificates",disabled:!U})}),(W||!U)&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,children:"Encryption Service Certificates"})}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){r("key",t,e),ne("serverKey")},accept:".key,.pem",id:"serverKey",name:"serverKey",label:"Key",error:X.serverKey||"",value:q.key,required:!U})}),Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){r("cert",t,e),ne("serverCert")},accept:".cer,.crt,.cert,.pem",id:"serverCert",name:"serverCert",label:"Cert",error:X.serverCert||"",value:q.cert,required:!U})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,children:"Mutual TLS authentication"})}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){o("key",t,e),ne("clientKey")},accept:".key,.pem",id:"clientKey",name:"clientKey",label:"Key",error:X.clientKey||"",value:H.key,required:!U})}),Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){o("cert",t,e),ne("clientCert")},accept:".cer,.crt,.cert,.pem",id:"clientCert",name:"clientCert",label:"Cert",error:X.clientCert||"",value:H.cert,required:!U})})]})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_endpoint",name:"vault_endpoint",onChange:function(e){ae("vaultEndpoint",e.target.value),ne("vault_endpoint")},label:"Endpoint",value:N,error:X.vault_endpoint||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_engine",name:"vault_engine",onChange:function(e){ae("vaultEngine",e.target.value),ne("vault_engine")},label:"Engine",value:T})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_namespace",name:"vault_namespace",onChange:function(e){ae("vaultNamespace",e.target.value)},label:"Namespace",value:E})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_prefix",name:"vault_prefix",onChange:function(e){ae("vaultPrefix",e.target.value)},label:"Prefix",value:A})}),Object(n.jsx)("h5",{children:"App Role"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_approle_engine",name:"vault_approle_engine",onChange:function(e){ae("vaultAppRoleEngine",e.target.value)},label:"Engine",value:_})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_id",name:"vault_id",onChange:function(e){ae("vaultId",e.target.value),ne("vault_id")},label:"AppRole ID",value:I,error:X.vault_id||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_secret",name:"vault_secret",onChange:function(e){ae("vaultSecret",e.target.value),ne("vault_secret")},label:"AppRole Secret",value:F,error:X.vault_secret||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",min:"0",id:"vault_retry",name:"vault_retry",onChange:function(e){ae("vaultRetry",e.target.value),ne("vault_retry")},label:"Retry (Seconds)",value:M,error:X.vault_retry||""})}),Object(n.jsx)("h5",{children:"Mutual TLS authentication (optional)"}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){s("key",t,e),ne("vault_key")},accept:".key,.pem",id:"vault_key",name:"vault_key",label:"Key",value:Y.key})}),Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){s("cert",t,e),ne("vault_cert")},accept:".cer,.crt,.cert,.pem",id:"vault_cert",name:"vault_cert",label:"Cert",value:Y.cert})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Eo,{onChange:function(e,t){l(t,e),ne("vault_ca")},accept:".cer,.crt,.cert,.pem",id:"vault_ca",name:"vault_ca",label:"CA",value:Q.cert})}),Object(n.jsx)("h5",{children:"Status"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",min:"0",id:"vault_ping",name:"vault_ping",onChange:function(e){ae("vaultPing",e.target.value),ne("vault_ping")},label:"Ping (Seconds)",value:L,error:X.vault_ping||""})})]}),"gcp"===m&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gcp_project_id",name:"gcp_project_id",onChange:function(e){ae("gcpProjectID",e.target.value)},label:"Project ID",value:D})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gcp_endpoint",name:"gcp_endpoint",onChange:function(e){ae("gcpEndpoint",e.target.value)},label:"Endpoint",value:B})}),Object(n.jsx)("h5",{children:"Credentials"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gcp_client_email",name:"gcp_client_email",onChange:function(e){ae("gcpClientEmail",e.target.value)},label:"Client Email",value:R})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gcp_client_id",name:"gcp_client_id",onChange:function(e){ae("gcpClientID",e.target.value)},label:"Client ID",value:P})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gcp_private_key_id",name:"gcp_private_key_id",onChange:function(e){ae("gcpPrivateKeyID",e.target.value)},label:"Private Key ID",value:z})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gcp_private_key",name:"gcp_private_key",onChange:function(e){ae("gcpPrivateKey",e.target.value)},label:"Private Key",value:K})})]}),"aws"===m&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"aws_endpoint",name:"aws_endpoint",onChange:function(e){ae("awsEndpoint",e.target.value),ne("aws_endpoint")},label:"Endpoint",value:f,error:X.aws_endpoint||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"aws_region",name:"aws_region",onChange:function(e){ae("awsRegion",e.target.value),ne("aws_region")},label:"Region",value:y,error:X.aws_region||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"aws_kmsKey",name:"aws_kmsKey",onChange:function(e){ae("awsKMSKey",e.target.value)},label:"KMS Key",value:S})}),Object(n.jsx)("h5",{children:"Credentials"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"aws_accessKey",name:"aws_accessKey",onChange:function(e){ae("awsAccessKey",e.target.value),ne("aws_accessKey")},label:"Access Key",value:C,error:X.aws_accessKey||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"aws_secretKey",name:"aws_secretKey",onChange:function(e){ae("awsSecretKey",e.target.value),ne("aws_secretKey")},label:"Secret Key",value:k,error:X.aws_secretKey||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"aws_token",name:"aws_token",onChange:function(e){ae("awsToken",e.target.value)},label:"Token",value:w})})]}),"gemalto"===m&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gemalto_endpoint",name:"gemalto_endpoint",onChange:function(e){ae("gemaltoEndpoint",e.target.value),ne("gemalto_endpoint")},label:"Endpoint",value:h,error:X.gemalto_endpoint||"",required:!0})}),Object(n.jsx)("h5",{children:"Credentials"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gemalto_token",name:"gemalto_token",onChange:function(e){ae("gemaltoToken",e.target.value),ne("gemalto_token")},label:"Token",value:p,error:X.gemalto_token||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gemalto_domain",name:"gemalto_domain",onChange:function(e){ae("gemaltoDomain",e.target.value),ne("gemalto_domain")},label:"Domain",value:O,error:X.gemalto_domain||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",min:"0",id:"gemalto_retry",name:"gemalto_retry",onChange:function(e){ae("gemaltoRetry",e.target.value),ne("gemalto_retry")},label:"Retry (seconds)",value:g,error:X.gemalto_retry||""})}),Object(n.jsx)("h5",{children:"Custom CA Root certificate verification"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Eo,{onChange:function(e,t){d(t,e),ne("gemalto_ca")},accept:".cer,.crt,.cert,.pem",id:"gemalto_ca",name:"gemalto_ca",label:"CA",value:Z.cert})})]})]})]})}))),_s=Object(s.b)((function(e){return{advancedMode:e.tenants.createTenant.advancedModeOn,volumeSize:e.tenants.createTenant.fields.tenantSize.volumeSize,sizeFactor:e.tenants.createTenant.fields.tenantSize.sizeFactor,drivesPerServer:e.tenants.createTenant.fields.tenantSize.drivesPerServer,nodes:e.tenants.createTenant.fields.tenantSize.nodes,memoryNode:e.tenants.createTenant.fields.tenantSize.memoryNode,ecParity:e.tenants.createTenant.fields.tenantSize.ecParity,ecParityChoices:e.tenants.createTenant.fields.tenantSize.ecParityChoices,cleanECChoices:e.tenants.createTenant.fields.tenantSize.cleanECChoices,maxAllocableMemo:e.tenants.createTenant.fields.tenantSize.maxAllocableMemo,memorySize:e.tenants.createTenant.fields.tenantSize.memorySize,distribution:e.tenants.createTenant.fields.tenantSize.distribution,ecParityCalc:e.tenants.createTenant.fields.tenantSize.ecParityCalc,limitSize:e.tenants.createTenant.fields.tenantSize.limitSize,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass}}),{updateAddField:bs,isPageValid:us}),Is=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue))}))(_s((function(e){var t=e.classes,a=e.updateAddField,i=e.isPageValid,r=e.advancedMode,o=e.volumeSize,s=e.sizeFactor,l=e.drivesPerServer,d=e.nodes,b=e.memoryNode,j=e.ecParity,m=e.ecParityChoices,h=e.cleanECChoices,p=e.maxAllocableMemo,O=e.memorySize,g=e.distribution,f=e.ecParityCalc,v=e.limitSize,y=e.selectedStorageClass,S=Object(c.useState)({}),C=Object(u.a)(S,2),k=C[0],w=C[1],N=f.storageFactors.find((function(e){return e.erasureCode===j})),T=Object(c.useCallback)((function(e,t){a("tenantSize",e,t)}),[a]),E=function(e){w(hs(k,e))},A=Object(c.useCallback)((function(){var e=parseInt(b)||0,t=p||0,a=s,n=function(e,t,a){var n=oe(e.toString(10),"Gi",!0),c=parseInt(n,10);if(0===a)return{error:"There is no memory available for the selected number of nodes",request:0,limit:0};if(aa)return{error:"The requested memory is greater than the max available memory for the selected number of nodes",request:0,limit:0};var i=parseInt(t,10),r=c;return i>=parseInt(oe("1","Pi",!0),10)?r=Math.max(c,parseInt(oe("64","Gi",!0),10)):i>=parseInt(oe("100","Ti"),10)?r=Math.max(c,parseInt(oe("32","Gi",!0),10)):i>=parseInt(oe("10","Ti"),10)?r=Math.max(c,parseInt(oe("16","Gi",!0),10)):i>=parseInt(oe("1","Ti"),10)&&(r=Math.max(c,parseInt(oe("8","Gi",!0),10))),{error:"",request:c,limit:r}}(e,oe((o||0).toString(10),a),t);T("memorySize",n)}),[p,b,s,T,o]);Object(c.useEffect)((function(){A()}),[b,A]),Object(c.useEffect)((function(){A()}),[p,A]),Object(c.useEffect)((function(){if(m.length>0&&""===g.error){var e=function(e,t,a,n){if(e.length<1)return{error:1,defaultEC:"",erasureCodeSet:0,maxEC:"",rawCapacity:"0",storageFactors:[]};var c=t*a,i=e[0],r=2*parseInt(i.split(":")[1],10),o=e.map((function(e){var a=parseInt(e.split(":")[1],10),n=r/(r-a),i=Math.floor(c/n),o=t-Math.floor(t/n);return{erasureCode:e,storageFactor:n,maxCapacity:i.toString(10),maxFailureTolerations:o}})),s=i,l=e.find((function(e){return"EC:4"===e}));return t>=8&&n>16&&l&&(s="EC:4"),{error:0,storageFactors:o,maxEC:i,rawCapacity:c.toString(10),erasureCodeSet:r,defaultEC:s}}(h,g.persistentVolumes,g.pvSize,g.nodes);T("ecParityCalc",e),T("ecParity",e.defaultEC)}}),[m.length,g,h,T]),Object(c.useEffect)((function(){_(),I(),function(e){""===e||isNaN(parseInt(e))||he.invoke("GET","/api/v1/cluster/max-allocatable-memory?num_nodes=".concat(e)).then((function(e){var t=e.max_memory?e.max_memory:0;T("maxAllocableMemo",t)})).catch((function(e){T("maxAllocableMemo",0),console.error(e)}))}(d)}),[d,o,s,l]);var _=function(){var e=o,t=s,a=oe("12","Ti",!0),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,c=oe(e.value,e.unit,!0);return parseInt(c,10)v[y],customValidationMessage:"Volume size must be greater than 1Gi and less than ".concat(ce(v[y],!0))},{fieldKey:"memory_per_node",required:!0,value:b,customValidation:parseInt(b)<2,customValidationMessage:"Memory size must be greater than 2Gi"},{fieldKey:"drivesps",required:!0,value:l,customValidation:parseInt(l)<1,customValidationMessage:"There must be at least one drive"}]);i("tenantSize",!("nodes"in t)&&!("volume_size"in t)&&!("memory_per_node"in t)&&!("drivesps"in t)&&""===g.error&&0===f.error&&""===O.error),w(t)}),[d,o,s,b,g,l,f,O,v,y,i]),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Tenant Size"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Please select the desired capacity"})]}),Object(n.jsx)("span",{className:t.error,children:g.error}),Object(n.jsx)("span",{className:t.error,children:O.error}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"nodes",name:"nodes",type:"number",onChange:function(e){T("nodes",e.target.value),E("nodes")},label:"Number of Servers",value:d,min:"4",required:!0,error:k.nodes||""})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"drivesps",name:"drivesps",type:"number",onChange:function(e){T("drivesPerServer",e.target.value),E("drivesps")},label:"Number of Drives per Server",value:l,min:"1",required:!0,error:k.drivesps||""})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)("div",{className:t.multiContainer,children:[Object(n.jsx)("div",{children:Object(n.jsx)(va,{type:"number",id:"volume_size",name:"volume_size",onChange:function(e){T("volumeSize",e.target.value),E("volume_size")},label:"Total Size",value:o,required:!0,error:k.volume_size||"",min:"0"})}),Object(n.jsx)("div",{className:t.sizeFactorContainer,children:Object(n.jsx)(Na,{label:"Unit",id:"size_factor",name:"size_factor",value:s,onChange:function(e){T("sizeFactor",e.target.value)},options:ae.map((function(e){return{label:e,value:e}}))})})]})}),r&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",id:"memory_per_node",name:"memory_per_node",onChange:function(e){T("memoryNode",e.target.value),E("memory_per_node")},label:"Memory per Node [Gi]",value:b,required:!0,error:k.memory_per_node||"",min:"2"})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Na,{id:"ec_parity",name:"ec_parity",onChange:function(e){T("ecParity",e.target.value)},label:"Erasure Code Parity",value:j,options:m}),Object(n.jsx)("span",{className:t.descriptionText,children:"Please select the desired parity. This setting will change the max usable capacity in the cluster"})]})]}),Object(n.jsx)("h4",{children:"Resource Allocation"}),Object(n.jsx)(un.a,{className:t.table,"aria-label":"simple table",children:Object(n.jsxs)(bn.a,{children:[Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Number of Servers"}),Object(n.jsx)(dn.a,{align:"right",children:parseInt(d)>0?d:"-"})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Drives per Server"}),Object(n.jsx)(dn.a,{align:"right",children:g?g.disks:"-"})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Drive Capacity"}),Object(n.jsx)(dn.a,{align:"right",children:g?ce(g.pvSize):"-"})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Total Number of Volumes"}),Object(n.jsx)(dn.a,{align:"right",children:g?g.persistentVolumes:"-"})]}),!r&&Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Memory per Node"}),Object(n.jsxs)(dn.a,{align:"right",children:[b," Gi"]})]})]})}),0===f.error&&N&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("h4",{children:"Erasure Code Configuration"}),Object(n.jsx)(un.a,{className:t.table,"aria-label":"simple table",children:Object(n.jsxs)(bn.a,{children:[Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"EC Parity"}),Object(n.jsx)(dn.a,{align:"right",children:""!==j?j:"-"})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Raw Capacity"}),Object(n.jsx)(dn.a,{align:"right",children:ce(f.rawCapacity)})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Usable Capacity"}),Object(n.jsx)(dn.a,{align:"right",children:ce(N.maxCapacity)})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Number of server failures to tolerate"}),Object(n.jsx)(dn.a,{align:"right",children:g?Math.floor(N.maxFailureTolerations/g.disks):"-"})]})]})})]})]})}))),Fs=Object(s.b)((function(e){return{advancedMode:e.tenants.createTenant.advancedModeOn,enableTLS:e.tenants.createTenant.fields.security.enableTLS,tenantName:e.tenants.createTenant.fields.nameTenant.tenantName,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass,customImage:e.tenants.createTenant.fields.configure.customImage,imageName:e.tenants.createTenant.fields.configure.imageName,consoleImage:e.tenants.createTenant.fields.configure.consoleImage,namespace:e.tenants.createTenant.fields.nameTenant.namespace,volumeSize:e.tenants.createTenant.fields.tenantSize.volumeSize,sizeFactor:e.tenants.createTenant.fields.tenantSize.sizeFactor}}),{}),Ms=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue))}))(Fs((function(e){var t=e.classes,a=e.tenantName,i=e.customImage,r=e.imageName,o=e.consoleImage,s=e.namespace,l=e.selectedStorageClass,d=e.volumeSize,b=e.sizeFactor,u=e.advancedMode,j=e.enableTLS;return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Review"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Review the details of the new tenant"})]}),Object(n.jsx)(un.a,{size:"small",children:Object(n.jsxs)(bn.a,{children:[Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"Tenant Name"}),Object(n.jsx)(dn.a,{children:a})]}),i&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"MinIO Image"}),Object(n.jsx)(dn.a,{children:r})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"Console Image"}),Object(n.jsx)(dn.a,{children:o})]})]}),""!==s&&Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"Namespace"}),Object(n.jsx)(dn.a,{children:s})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"Storage Class"}),Object(n.jsx)(dn.a,{children:l})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"Total Size"}),Object(n.jsxs)(dn.a,{children:[d," ",b]})]}),u&&Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"Enable TLS"}),Object(n.jsx)(dn.a,{children:j?"Enabled":"Disabled"})]})})]})})]})}))),Ls=Object(s.b)((function(e){return{podAffinity:e.tenants.createTenant.fields.affinity.podAffinity,nodeSelectorLabels:e.tenants.createTenant.fields.affinity.nodeSelectorLabels,withPodAntiAffinity:e.tenants.createTenant.fields.affinity.withPodAntiAffinity}}),{setModalErrorSnackMessage:q,updateAddField:bs,isPageValid:us}),Ds=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue))}))(Ls((function(e){var t=e.classes,a=e.podAffinity,i=e.nodeSelectorLabels,r=e.withPodAntiAffinity,o=(e.setModalErrorSnackMessage,e.updateAddField),s=e.isPageValid,l=Object(c.useState)({}),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useCallback)((function(e,t){o("affinity",e,t)}),[o]);return Object(c.useEffect)((function(){var e=[];if("nodeSelector"===a){var t=!0,n=i.split("&");1===n.length&&""===n[0]&&(t=!1),n.forEach((function(e,a){var c=e.split("=");2!==c.length&&(t=!1),a+1!==n.length&&(""!==c[0]&&""!==c[1]||(t=!1))})),e=[].concat(Object(Je.a)(e),[{fieldKey:"labels",required:!0,value:i,customValidation:!t,customValidationMessage:"You need to add at least one label key-pair"}])}var c=ms(e);s("affinity",0===Object.keys(c).length),j(c)}),[s,a,i]),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Pod Affinity"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Configure how pods will be assigned to nodes"})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Fa,{currentSelection:a,id:"affinity-options",name:"affinity-options",label:"Type",onChange:function(e){m("podAffinity",e.target.value)},selectorOptions:[{label:"None",value:"none"},{label:"Default (Pod Anti-afinnity)",value:"default"},{label:"Node Selector",value:"nodeSelector"}]}),"MinIO supports multiple configurations for Pod Afinnity"]}),"nodeSelector"===a&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("br",{}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"with_pod_anti_affinity",id:"with_pod_anti_affinity",name:"with_pod_anti_affinity",checked:r,onChange:function(e){var t=e.target.checked;m("withPodAntiAffinity",t)},label:"With Pod Anti-Affinity"})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Mn,{name:"labels",label:"Labels",elements:i,onChange:function(e){m("nodeSelectorLabels",e)},keyPlaceholder:"Label Key",valuePlaceholder:"Label Value",tooltip:"Labels to be used in nodeSelector assignation. Invalid key-pairs will be ignored",withBorder:!0}),Object(n.jsx)("span",{className:t.error,children:b.labels})]})]})]})}))),Bs=Object(s.b)((function(e){return{advancedMode:e.tenants.createTenant.advancedModeOn,namespace:e.tenants.createTenant.fields.nameTenant.namespace,validPages:e.tenants.createTenant.validPages,fields:e.tenants.createTenant.fields,certificates:e.tenants.createTenant.certificates}}),{setModalErrorSnackMessage:q,updateAddField:bs}),Rs=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue),Be))}))(Bs((function(e){var t=e.classes,a=e.advancedMode,i=e.fields,r=e.certificates,o=e.namespace,s=e.validPages,l=e.setModalErrorSnackMessage,d=e.closeAndRefresh,b=Object(c.useState)(!1),m=Object(u.a)(b,2),h=m[0],p=m[1],O=Object(c.useState)(null),g=Object(u.a)(O,2),f=g[0],v=g[1],S=Object(c.useState)(!1),C=Object(u.a)(S,2),k=C[0],w=C[1];Object(c.useEffect)((function(){var e=i.nameTenant.tenantName,t=i.nameTenant.selectedStorageClass,a=i.configure.imageName,n=i.configure.consoleImage,c=i.configure.customDockerhub,s=i.configure.imageRegistry,d=i.configure.imageRegistryUsername,b=i.configure.imageRegistryPassword,u=i.configure.exposeMinIO,m=i.configure.exposeConsole,h=i.identityProvider.idpSelection,O=i.identityProvider.openIDURL,g=i.identityProvider.openIDClientID,f=i.identityProvider.openIDSecretID,x=i.identityProvider.ADURL,y=i.identityProvider.ADSkipTLS,S=i.identityProvider.ADServerInsecure,C=i.identityProvider.ADUserNameFilter,N=i.identityProvider.ADGroupBaseDN,T=i.identityProvider.ADGroupSearchFilter,E=i.identityProvider.ADNameAttribute,A=i.identityProvider.accessKeys,_=i.identityProvider.secretKeys,I=r.minioCertificates,F=r.caCertificates,M=r.consoleCertificate,L=r.serverCertificate,D=r.clientCertificate,B=r.vaultCertificate,R=r.vaultCA,P=r.gemaltoCA,z=i.encryption.enableEncryption,K=i.encryption.encryptionType,W=i.encryption.gemaltoEndpoint,U=i.encryption.gemaltoToken,V=i.encryption.gemaltoDomain,G=i.encryption.gemaltoRetry,q=i.encryption.awsEndpoint,H=i.encryption.awsRegion,Y=i.encryption.awsKMSKey,Q=i.encryption.awsAccessKey,J=i.encryption.awsSecretKey,$=i.encryption.awsToken,X=i.encryption.vaultEndpoint,ee=i.encryption.vaultEngine,te=i.encryption.vaultNamespace,ae=i.encryption.vaultPrefix,ne=i.encryption.vaultAppRoleEngine,ce=i.encryption.vaultId,ie=i.encryption.vaultSecret,re=i.encryption.vaultRetry,oe=i.encryption.vaultPing,se=i.encryption.gcpProjectID,le=i.encryption.gcpEndpoint,be=i.encryption.gcpClientEmail,ue=i.encryption.gcpClientID,je=i.encryption.gcpPrivateKeyID,me=i.encryption.gcpPrivateKey,pe=i.security.enableAutoCert,Oe=i.security.enableTLS,ge=i.tenantSize.ecParity,fe=i.tenantSize.distribution,xe=i.tenantSize.memorySize,ve=i.configure.logSearchCustom,ye=i.configure.prometheusCustom,Se=i.configure.logSearchVolumeSize,Ce=i.configure.logSearchSelectedStorageClass,ke=i.configure.logSearchImage,we=i.configure.kesImage,Ne=i.configure.logSearchPostgresImage,Te=i.configure.prometheusImage,Ee=i.configure.prometheusSelectedStorageClass,Ae=i.configure.prometheusVolumeSize,_e=i.affinity.podAffinity,Ie=i.affinity.nodeSelectorLabels,Fe=i.affinity.withPodAntiAffinity;if(k){var Me=de([]),Le={};switch(_e){case"default":Le={affinity:Go(e,Me)};break;case"nodeSelector":Le={affinity:qo(Ie,Fe,e,Me)}}var De=ge.split(":")[1],Be={name:e,namespace:o,access_key:"",secret_key:"",access_keys:[],secret_keys:[],enable_tls:Oe&&pe,enable_console:!0,enable_prometheus:!0,service_name:"",image:a,console_image:n,expose_minio:u,expose_console:m,pools:[Object(j.a)({name:Me,servers:fe.nodes,volumes_per_server:fe.disks,volume_configuration:{size:fe.pvSize,storage_class_name:t},resources:{requests:{memory:xe.request},limits:{memory:xe.limit}}},Le)],erasureCodingParity:parseInt(De,10)};c&&(Be=Object(j.a)(Object(j.a)({},Be),{},{image_registry:{registry:s,username:d,password:b}})),Be=ve?Object(j.a)(Object(j.a)({},Be),{},{logSearchConfiguration:{storageClass:Ce,storageSize:parseInt(Se),image:ke,postgres_image:Ne}}):Object(j.a)(Object(j.a)({},Be),{},{logSearchConfiguration:{image:ke,postgres_image:Ne}}),Be=ye?Object(j.a)(Object(j.a)({},Be),{},{prometheusConfiguration:{storageClass:Ee,storageSize:parseInt(Ae),image:Te}}):Object(j.a)(Object(j.a)({},Be),{},{prometheusConfiguration:{image:Te}});var Re=null,Pe=null,ze=null;if(F.length>0&&(ze={ca_certificates:F.map((function(e){return e.encoded_cert})).filter((function(e){return e}))}),Oe&&I.length>0&&(Re={minio:I.map((function(e){return{crt:e.encoded_cert,key:e.encoded_key}})).filter((function(e){return e.crt&&e.key}))}),Oe&&""!==M.encoded_cert&&""!==M.encoded_key&&(Pe={console:{crt:M.encoded_cert,key:M.encoded_key}}),(Re||Pe||ze)&&(Be=Object(j.a)(Object(j.a)({},Be),{},{tls:Object(j.a)(Object(j.a)(Object(j.a)({},Re),Pe),ze)})),z){var Ke={};switch(K){case"gemalto":var We={};""!==P.encoded_cert&&(We={ca:P.encoded_cert}),Ke={gemalto:{keysecure:{endpoint:W,credentials:{token:U,domain:V,retry:parseInt(G)},tls:Object(j.a)({},We)}}};break;case"aws":Ke={aws:{secretsmanager:{endpoint:q,region:H,kmskey:Y,credentials:{accesskey:Q,secretkey:J,token:$}}}};break;case"gcp":Ke={gcp:{secretmanager:{project_id:se,endpoint:le,credentials:{client_email:be,client_id:ue,private_key_id:je,private_key:me}}}};break;case"vault":var Ue=null,Ve=null;""!==B.encoded_key&&""!==B.encoded_cert&&(Ue={key:B.encoded_key,crt:B.encoded_cert}),""!==R.encoded_cert&&(Ve={ca:R.encoded_cert});var Ge=null;(Ue||R)&&(Ge={tls:Object(j.a)(Object(j.a)({},Ue),Ve)}),Ke={vault:Object(j.a)(Object(j.a)({endpoint:X,engine:ee,namespace:te,prefix:ae,approle:{engine:ne,id:ce,secret:ie,retry:parseInt(re)}},Ge),{},{status:{ping:parseInt(oe)}})}}var qe={},He={};""!==D.encoded_key&&""!==D.encoded_cert&&(He={client:{key:D.encoded_key,crt:D.encoded_cert}}),""!==L.encoded_key&&""!==L.encoded_cert&&(qe={server:{key:L.encoded_key,crt:L.encoded_cert}}),Be=Object(j.a)(Object(j.a)({},Be),{},{encryption:Object(j.a)(Object(j.a)(Object(j.a)({image:we},He),qe),Ke)})}var Ye={};switch(h){case"Built-in":for(var Qe=[],Ze=0;Ze=0}));Object(c.useEffect)((function(){if(k){he.invoke("GET","/api/v1/tenants").then((function(e){if(null!==e){var t=[];null!==e.tenants&&(t=e.tenants);for(var a=0;a0&&A(t[0].value)})).catch((function(e){console.error(e)}))}),[t]),Object(n.jsx)(ga,{onClose:function(){return r(!1)},modalOpen:i,title:"Add Pool",children:Object(n.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d(!0);var a=de(t.pools),n=Go(t.name,a),c={name:a,servers:m,volumes_per_server:k,volume_configuration:{size:1073741824*f,storage_class_name:E,labels:null},affinity:n};he.invoke("POST","/api/v1/namespaces/".concat(t.namespace,"/tenants/").concat(t.name,"/pools"),c).then((function(){d(!1),r(!0)})).catch((function(e){d(!1)}))},children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"number_of_nodes",name:"number_of_nodes",type:"number",onChange:function(e){h(parseInt(e.target.value))},label:"Number o Nodes",value:m.toString(10)})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"pool_size",name:"pool_size",type:"number",onChange:function(e){v(parseInt(e.target.value))},label:"Volume Size (Gi)",value:f.toString(10)})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"volumes_per_sever",name:"volumes_per_sever",type:"number",onChange:function(e){w(parseInt(e.target.value))},label:"Volumes per Server",value:k.toString(10)})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{id:"storage_class",name:"storage_class",onChange:function(e){A(e.target.value)},label:"Storage Class",value:E,options:F,disabled:F.length<1})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:a.bottomContainer,children:[Object(n.jsxs)("div",{className:a.factorElements,children:[Object(n.jsxs)("div",{children:[Object(n.jsx)("div",{className:a.sizeNumber,children:ce(L.toString(10))}),Object(n.jsx)("div",{className:a.sizeDescription,children:"Instance Capacity"})]}),Object(n.jsxs)("div",{children:[Object(n.jsx)("div",{className:a.sizeNumber,children:ce(D.toString(10))}),Object(n.jsx)("div",{className:a.sizeDescription,children:"Total Capacity"})]})]}),Object(n.jsx)("div",{className:a.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:l,children:"Save"})})]}),l&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})]})})})),Vs=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({buttonContainer:{textAlign:"right"},multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"},sizeFactorContainer:{marginLeft:8}},we))}))((function(e){var t=e.classes,a=e.open,r=e.closeModalAndRefresh,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(0),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(""),O=Object(u.a)(p,2),f=O[0],v=O[1],S=Object(c.useState)(""),C=Object(u.a)(S,2),k=C[0],w=C[1],N=Object(c.useState)(""),T=Object(u.a)(N,2),E=T[0],A=T[1],_=Object(c.useState)(""),I=Object(u.a)(_,2),F=I[0],M=I[1],L=Object(c.useState)(""),D=Object(u.a)(L,2),B=D[0],R=D[1],P=Object(c.useState)(""),z=Object(u.a)(P,2),K=z[0],W=z[1],U=Object(c.useState)(""),V=Object(u.a)(U,2),G=V[0],q=V[1];return Object(n.jsx)(ga,{modalOpen:a,title:"Add Pool",onClose:function(){r(!1)},children:Object(n.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d(!0)},children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{label:"Source Bucket",options:[],onChange:function(e){v(e.target.value)},value:f,name:"source_bucket",id:"source_bucket"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(tn.a,{value:m,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){h(t)},"aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(n.jsx)(an.a,{label:"Local Cluster"}),Object(n.jsx)(an.a,{label:"Remote Cluster"})]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),0===m&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{label:"Cluster",options:[],onChange:function(e){w(e.target.value)},value:k,name:"cluster",id:"cluster"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{label:"Destination Bucket",options:[],onChange:function(e){A(e.target.value)},value:E,name:"destination_bucket",id:"destination_bucket"})})]}),1===m&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"address",name:"address",onChange:function(e){M(e.target.value)},label:"Address",value:F})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"bucket",name:"bucket",onChange:function(e){R(e.target.value)},label:"Bucket",value:B})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"accessKey",name:"accessKey",onChange:function(e){W(e.target.value)},label:"Access Key",value:K})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"secretKey",name:"secretKey",onChange:function(e){q(e.target.value)},label:"Secret Key",value:G})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:l,children:"Save"})}),l&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})),Gs=Object(N.a)((function(e){return{root:{height:10,borderRadius:5},colorPrimary:{backgroundColor:"#F4F4F4"},bar:{borderRadius:5,backgroundColor:"#081C42"},padChart:{padding:"5px"}}}))(y.a),qs=Object(N.a)((function(e){return Object(k.a)({paperContainer:{padding:15},allValue:{fontSize:16,fontWeight:700,marginBottom:8},currentUsage:{fontSize:12,marginTop:8},centerItem:{textAlign:"center"}})}))((function(e){var t=e.classes,a=e.maxValue,c=e.currValue,r=e.label,o=e.renderFunction,s=e.loading,l=e.error,d=100*c/a;return Object(n.jsxs)(i.a.Fragment,{children:[s&&Object(n.jsx)("div",{className:t.padChart,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:t.centerItem,children:Object(n.jsx)(S.a,{color:"primary",size:40,variant:"indeterminate"})})}),s?null:""!==l?Object(n.jsx)(To,{errorMessage:l,withBreak:!1}):Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.allValue,children:[r," ",o?o(a.toString()):a]}),Object(n.jsx)(Gs,{variant:"determinate",value:d}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.currentUsage,children:["Used:"," ",o?o(c.toString()):c]})]})]})})),Hs=Object(s.b)(null,{setModalErrorSnackMessage:q}),Ys=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we))}))(Hs((function(e){var t=e.open,a=e.closeModalAndRefresh,i=e.namespace,r=e.idTenant,o=e.setModalErrorSnackMessage,s=e.classes,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],m=d[1],h=Object(c.useState)(""),p=Object(u.a)(h,2),O=p[0],f=p[1],v=Object(c.useState)(""),y=Object(u.a)(v,2),S=y[0],C=y[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(""),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(""),M=Object(u.a)(F,2),L=M[0],D=M[1],B=Object(c.useState)(""),R=Object(u.a)(B,2),P=R[0],z=R[1],K=Object(c.useState)(!0),W=Object(u.a)(K,2),U=W[0],V=W[1],G=Object(c.useState)(!0),q=Object(u.a)(G,2),H=q[0],Y=q[1],Q=Object(c.useCallback)((function(e){var t=new RegExp("^$|^((.*?)/(.*?):(.+))$");switch(e){case"consoleImage":Y(t.test(S));break;case"minioImage":V(t.test(O))}}),[S,O]);Object(c.useEffect)((function(){Q("minioImage")}),[O,Q]),Object(c.useEffect)((function(){Q("consoleImage")}),[S,Q]);return Object(n.jsx)(ga,{title:"Update MinIO Version",modalOpen:t,onClose:function(){a(!1)},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:s.formScrollable,children:[Object(n.jsx)("span",{children:"Please enter the MinIO image from dockerhub to use. If blank, then latest build will be used."}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:O,label:"MinIO's Image",id:"minioImage",name:"minioImage",placeholder:"E.g. minio/minio:RELEASE.2020-05-08T02-40-49Z",onChange:function(e){f(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:S,label:"Console's Image",id:"consoleImage",name:"consoleImage",placeholder:"E.g. minio/console:v0.3.13",onChange:function(e){C(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"imageRegistry",id:"setImageRegistry",name:"setImageRegistry",checked:N,onChange:function(e){T(!N)},label:"Set Custom Image Registry",indicatorLabels:["Yes","No"]})}),N&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:_,label:"Endpoint",id:"imageRegistry",name:"imageRegistry",placeholder:"E.g. https://index.docker.io/v1/",onChange:function(e){I(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:L,label:"Username",id:"imageRegistryUsername",name:"imageRegistryUsername",placeholder:"Enter image registry username",onChange:function(e){D(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:P,label:"Password",id:"imageRegistryPassword",name:"imageRegistryPassword",placeholder:"Enter image registry password",onChange:function(e){z(e.target.value)}})})]})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:s.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:s.clearButton,onClick:function(){f(""),C(""),T(!1),I(""),D(""),z("")},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:!U||!H||N&&(""===_.trim()||""===L.trim()||""===P.trim())||b,onClick:function(){m(!0);var e={image:O,console_image:S,enable_prometheus:!0};if(N){var t={image_registry:{registry:_,username:L,password:P}};e=Object(j.a)(Object(j.a)({},e),t)}he.invoke("PUT","/api/v1/namespaces/".concat(i,"/tenants/").concat(r),e).then((function(){m(!1),a(!0)})).catch((function(e){o(e),m(!1)}))},children:"Save"})]})]})})}))),Qs=a(436),Zs=a.n(Qs),Js={setModalErrorSnackMessage:q},$s=Object(s.b)(null,Js),Xs=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({jsonPolicyEditor:{minHeight:400,width:"100%"},buttonContainer:{textAlign:"right"},errorState:{color:"#b53b4b",fontSize:14,fontWeight:"bold"}},we),ke))}))($s((function(e){var t=e.classes,a=e.open,i=e.closeModalAndRefresh,r=e.tenant,o=e.namespace,s=e.setModalErrorSnackMessage,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(!1),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(""),v=Object(u.a)(f,2),S=v[0],C=v[1],k=Object(c.useState)(""),w=Object(u.a)(k,2),N=w[0],T=w[1];Object(c.useEffect)((function(){he.invoke("GET","/api/v1/namespaces/".concat(o,"/tenants/").concat(r,"/yaml")).then((function(e){O(!1),C(e.yaml)})).catch((function(e){O(!1),s(e)}))}),[r,o,s]),Object(c.useEffect)((function(){}),[]);var E=""!==S.trim();return Object(n.jsxs)(ga,{modalOpen:a,onClose:function(){i(!1)},title:"YAML",children:[p&&Object(n.jsx)(y.a,{}),""!==N&&Object(n.jsx)("div",{className:t.errorState,children:N}),!p&&Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b||(j(!0),T(""),he.invoke("PUT","/api/v1/namespaces/".concat(o,"/tenants/").concat(r,"/yaml"),{yaml:S}).then((function(e){j(!1),i(!0),T("")})).catch((function(e){j(!1),console.log(e),T(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(Sn,{label:"Tenant Specification",value:S,mode:"yaml",onBeforeChange:function(e,t,a){C(a)}})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:b||!E,children:"Save"})}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})]})}))),el=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({paperContainer:{padding:"15px 15px 15px 50px"},licenseInfoValue:{textTransform:"none",fontSize:14,fontWeight:"bold"},licenseContainer:{position:"relative",padding:"20px 52px 0px 28px",background:"#032F51",boxShadow:"0px 3px 7px #00000014","& h2":{color:"#FFF",marginBottom:67},"& a":{textDecoration:"none"},"& h3":{color:"#FFFFFF",marginBottom:"30px",fontWeight:"bold"},"& h6":{color:"#FFFFFF !important"}},licenseInfo:{color:"#FFFFFF",position:"relative"},licenseInfoTitle:{textTransform:"none",color:"#BFBFBF",fontSize:11},verifiedIcon:{width:96,position:"absolute",right:0,bottom:29},noUnderLine:{textDecoration:"none"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.tenant,c=e.loadingActivateProduct,r=e.loadingLicenseInfo,o=e.licenseInfo,s=e.activateProduct;return Object(n.jsx)(C.a,{className:a&&a.subnet_license?t.licenseContainer:"",children:a&&a.subnet_license?Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{container:!0,className:t.licenseInfo,children:[Object(n.jsxs)(x.a,{item:!0,xs:6,children:[Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"License"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:"Commercial License"}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Organization"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:a.subnet_license.organization}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Registered Capacity"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:ce((1099511627776*a.subnet_license.storage_capacity).toString(10))}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Expiry Date"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:Object(n.jsx)(ct.a,{format:"YYYY-MM-DD",children:a.subnet_license.expires_at})})]}),Object(n.jsxs)(x.a,{item:!0,xs:6,children:[Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Subscription Plan"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:a.subnet_license.plan}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Requester"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:a.subnet_license.email})]}),Object(n.jsx)("img",{className:t.verifiedIcon,src:"/verified.svg",alt:"verified"})]})}):!r&&Object(n.jsxs)(x.a,{className:t.paperContainer,children:[!o&&Object(n.jsx)(Vt.a,{to:"/license",onClick:function(e){e.stopPropagation()},className:t.noUnderLine,children:Object(n.jsx)(g.a,{className:t.licenseButton,variant:"contained",color:"primary",children:"Activate Product"})}),o&&a&&Object(n.jsx)(g.a,{disabled:c,className:t.licenseButton,variant:"contained",color:"primary",onClick:function(){return s(a.namespace,a.name)},children:"Attach License"})]})})})),tl=Object(s.b)(null,{setErrorSnackMessage:V}),al=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"},multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"},sizeFactorContainer:{marginLeft:8},containerHeader:{display:"flex",justifyContent:"space-between"},paperContainer:{padding:"15px 15px 15px 50px"},infoGrid:{display:"grid",gridTemplateColumns:"auto auto auto auto",gridGap:8,"& div":{display:"flex",alignItems:"center"},"& div:nth-child(odd)":{justifyContent:"flex-end",fontWeight:700},"& div:nth-child(2n)":{paddingRight:35}},masterActions:{width:"25%",minWidth:"120px","& div":{margin:"5px 0px"}},updateButton:{backgroundColor:"transparent",border:0,padding:"0 6px",cursor:"pointer","&:focus, &:active":{outline:"none"},"& svg":{height:12}},poolLabel:{color:"#666666"},breadcrumLink:{textDecoration:"none",color:"black"}},we),Ie),Ve),Fe),Ge),{},{actionsTray:Object(j.a)(Object(j.a)({},Ie.actionsTray),{},{padding:"15px 0 0"})},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(tl((function(e){var t=e.classes,a=e.match,r=e.setErrorSnackMessage,o=Object(c.useState)(0),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(0),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(0),O=Object(u.a)(p,2),v=O[0],y=O[1],S=Object(c.useState)([]),k=Object(u.a)(S,2),w=k[0],N=k[1],T=Object(c.useState)([]),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(0),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(0),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)(!1),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Object(c.useState)(!1),G=Object(u.a)(V,2),q=G[0],H=G[1],Y=Object(c.useState)(!1),Q=Object(u.a)(Y,2),J=Q[0],$=Q[1],X=Object(c.useState)(null),ee=Object(u.a)(X,2),te=ee[0],ae=ee[1],ne=Object(c.useState)(!0),ie=Object(u.a)(ne,2),re=ie[0],oe=ie[1],se=Object(c.useState)(""),le=Object(u.a)(se,2),de=le[0],ue=le[1],je=Object(c.useState)(0),me=Object(u.a)(je,2),pe=me[0],Oe=me[1],ge=Object(c.useState)(!1),fe=Object(u.a)(ge,2),xe=fe[0],ve=fe[1],ye=Object(c.useState)(!1),Se=Object(u.a)(ye,2),Ce=Se[0],ke=Se[1],we=Object(c.useState)(),Ne=Object(u.a)(we,2),Te=Ne[0],Ee=Ne[1],Ae=Object(c.useState)(!0),_e=Object(u.a)(Ae,2),Ie=_e[0],Fe=_e[1],Me=Object(c.useState)(!1),Le=Object(u.a)(Me,2),De=Le[0],Be=Le[1],Re=Object(c.useState)(!1),Pe=Object(u.a)(Re,2),ze=Pe[0],Ke=Pe[1],We=Object(c.useState)(!1),Ue=Object(u.a)(We,2),Ve=Ue[0],Ge=Ue[1],qe=Object(c.useState)(!1),He=Object(u.a)(qe,2),Ye=He[0],Qe=He[1],Ze=Object(c.useState)(!1),Je=Object(u.a)(Ze,2),Xe=Je[0],tt=Je[1],at=Object(c.useState)(!1),nt=Object(u.a)(at,2),ct=nt[0],it=nt[1],rt=a.params.tenantName,st=a.params.tenantNamespace,lt=function(){he.invoke("GET","/api/v1/namespaces/".concat(st,"/tenants/").concat(rt)).then((function(e){var t,a=e.pools?e.pools:[],n=0,c=0,i=0,r=Object(rr.a)(a);try{for(r.s();!(t=r.n()).done;){var o=t.value,s=o.volumes_per_server*o.servers*o.volume_configuration.size;o.label="pool-".concat(i),void 0!==o.name&&""!==o.name||(o.name=o.label),o.capacity=ce(s+""),o.volumes=o.servers*o.volumes_per_server,n+=o.servers,c+=o.volumes,i+=1}}catch(l){r.e(l)}finally{r.f()}h(e.total_size||0),y(a.length),P(c),L(n),N(a),Ke(e.logEnabled),Ge(e.monitoringEnabled),Qe(e.encryptionEnabled),tt(e.idpAdEnabled),it(e.idpOicEnabled),ae(e)})).catch((function(e){r(e)}))},dt=function(){he.invoke("GET","/api/v1/namespaces/".concat(st,"/tenants/").concat(rt,"/usage")).then((function(e){var t=Z()(e,"disk_used","0");Oe(parseInt(t)),ue(""),oe(!1)})).catch((function(e){ue(e),Oe(0),oe(!1)}))};Object(c.useEffect)((function(){lt(),dt(),Fe(!0),he.invoke("GET","/api/v1/subscription/info").then((function(e){Ee(e),Fe(!1)})).catch((function(e){Fe(!1)})),he.invoke("GET","/api/v1/namespaces/".concat(st,"/tenants/").concat(rt,"/pods")).then((function(e){for(var t=0;t ".concat(a.params.tenantName),Object(n.jsx)(Mt.a,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:function(e){mt(e.currentTarget)},children:Object(n.jsx)(Zs.a,{})}),Object(n.jsx)(Ws.a,{id:"long-menu",anchorEl:jt,keepMounted:!0,open:Boolean(jt),onClose:ht,children:Object(n.jsx)(ka.a,{onClick:ht,children:"Edit YAML"},"yaml")})]})}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.container}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(tn.a,{value:l,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){d(t)},"aria-label":"tenant-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(n.jsx)(an.a,{label:"Summary"}),Object(n.jsx)(an.a,{label:"Pools"}),Object(n.jsx)(an.a,{label:"Pods"}),Object(n.jsx)(an.a,{label:"License"})]})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[0===l&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("br",{}),Object(n.jsx)(C.a,{className:t.paperContainer,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:8,children:Object(n.jsxs)("table",{width:"100%",children:[Object(n.jsx)("tr",{children:Object(n.jsxs)("td",{colSpan:4,children:[Object(n.jsx)("h2",{children:"Details"}),Object(n.jsx)("hr",{className:t.hrClass})]})}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Capacity:"}),Object(n.jsx)("td",{children:ce(m.toString(10))}),Object(n.jsx)("td",{children:"MinIO:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,onClick:function(){ve(!0)},children:te?te.image:""})})]}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Clusters:"}),Object(n.jsx)("td",{children:v}),Object(n.jsx)("td",{children:"Console:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,onClick:function(){ve(!0)},children:te?te.console_image:""})})]}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Instances:"}),Object(n.jsx)("td",{children:M}),Object(n.jsx)("td",{children:"Volumes:"}),Object(n.jsx)("td",{children:R})]}),(null===te||void 0===te?void 0:te.endpoints)&&Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Endpoint:"}),Object(n.jsx)("td",{children:Object(n.jsx)("a",{href:null===te||void 0===te?void 0:te.endpoints.minio,target:"_blank",rel:"noopener noreferrer",children:null===te||void 0===te?void 0:te.endpoints.minio})}),Object(n.jsx)("td",{children:"Console:"}),Object(n.jsx)("td",{children:Object(n.jsx)("a",{href:null===te||void 0===te?void 0:te.endpoints.console,target:"_blank",rel:"noopener noreferrer",children:null===te||void 0===te?void 0:te.endpoints.console})})]}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"State:"}),Object(n.jsx)("td",{colSpan:3,children:null===te||void 0===te?void 0:te.currentState})]})]})}),Object(n.jsx)(x.a,{item:!0,xs:4,children:Object(n.jsx)(qs,{currValue:pe,maxValue:te?te.total_size:0,label:"Storage",renderFunction:ce,error:de,loading:re})})]})}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(C.a,{className:t.paperContainer,children:Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)("table",{width:"100%",children:[Object(n.jsx)("tr",{children:Object(n.jsxs)("td",{colSpan:4,children:[Object(n.jsx)("h2",{children:"Features"}),Object(n.jsx)("hr",{className:t.hrClass})]})}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Logs:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,children:ze?"Enabled":"Disabled"})}),Object(n.jsx)("td",{children:"Monitoring:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,children:Ve?"Enabled":"Disabled"})})]}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Encryption:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,children:Ye?"Enabled":"Disabled"})}),Object(n.jsx)("td",{}),Object(n.jsx)("td",{})]}),Object(n.jsxs)("tr",{children:[Xe||!Xe&&!ct&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("td",{children:"Active Directory:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,children:Xe?"Enabled":"Disabled"})})]}),ct||!ct&&!Xe&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("td",{children:"OpenID:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,children:ct?"Enabled":"Disabled"})})]})]})]})})})})]}),1===l&&Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:t.searchField,id:"search-resource",label:"",onChange:function(e){},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){U(!0)},children:"Expand Tenant"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:[{type:"delete",onClick:function(e){console.log(e)},sendOnlyId:!0}],columns:[{label:"Name",elementKey:"name"},{label:"Capacity",elementKey:"capacity"},{label:"# of Instances",elementKey:"servers"},{label:"# of Drives",elementKey:"volumes"}],isLoading:!1,records:w,entityName:"Servers",idField:"name"})})]}),2===l&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("br",{}),Object(n.jsx)(ua,{columns:[{label:"Name",elementKey:"name"},{label:"Status",elementKey:"status"},{label:"Age",elementKey:"time"},{label:"Pod IP",elementKey:"podIP"},{label:"Restarts",elementKey:"restarts",renderFunction:function(e){return null!=e?e:0}},{label:"Node",elementKey:"node"}],isLoading:!1,records:A,entityName:"Servers",idField:"name"})]}),3===l&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("br",{}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(el,{tenant:te,loadingLicenseInfo:Ie,loadingActivateProduct:De,licenseInfo:Te,activateProduct:function(e,t){De||(Be(!0),he.invoke("POST","/api/v1/subscription/namespaces/".concat(e,"/tenants/").concat(t,"/activate"),{}).then((function(){Be(!1),lt()})).catch((function(e){Be(!1),r(e)})))}})})})]})]})]})]})}))),nl="OBJECT_BROWSER/ADD_ROUTE",cl="OBJECT_BROWSER/RESET_ROUTES_LIST",il="OBJECT_BROWSER/REMOVE_ROUTE_LEVEL",rl="OBJECT_BROWSER/SET_ALL_ROUTES",ol="OBJECT_BROWSER/CREATE_FOLDER",sl="OBJECT_BROWSER/SET_LAST_AS_FILE",ll="OBJECT_BROWSER/DOWNLOAD_FILE_LOADER",dl="OBJECT_BROWSER/DOWNLOADED_FILE",bl=function(e,t,a){return{type:nl,route:e,label:t,routeType:a}},ul=function(e){return{type:il,toRoute:e}},jl=function(e){return{type:rl,currentRoute:e}},ml=function(e){return{type:ll,path:e}},hl=function(e){return{type:dl,path:e}},pl={removeRouteLevel:ul},Ol=Object(s.b)((function(e){var t=e.objectBrowser;return{objectsList:Z()(t,"routesList",[])}}),pl)(Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},Le))}))((function(e){var t=e.classes,a=e.objectsList,c=e.removeRouteLevel,r=a.map((function(e,t){return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(Vt.a,{to:e.route,onClick:function(){c(e.route)},children:e.label}),t0?a.slice(-1)[0].label:""})}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.breadcrumbs,children:r})]})}))),gl={addRoute:bl,resetRoutesList:function(e){return{type:cl,reset:e}},displayErrorMessage:V},fl=Object(s.b)(null,gl),xl=Object(l.g)(fl(Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},usedSpaceCol:{width:150,textAlign:"right"},subTitleLabel:{alignItems:"center",display:"flex"},bucketName:{display:"flex",alignItems:"center"},iconBucket:{backgroundImage:"url(/images/ob_bucket_clear.svg)",backgroundRepeat:"no-repeat",backgroundPosition:"center center",width:16,height:40,marginRight:10},"@global":{".rowLine:hover .iconBucketElm":{backgroundImage:"url(/images/ob_bucket_filled.svg)"}},browsePaper:{height:"calc(100vh - 280px)"}},Ie),Fe),Le))}))((function(e){var t=e.classes,a=e.match,i=e.addRoute,r=e.resetRoutesList,o=e.displayErrorMessage,s=Object(c.useState)(!0),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)([]),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(!1),v=Object(u.a)(O,2),y=v[0],S=v[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(!0),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(!1),F=Object(u.a)(I,2),M=F[0],L=F[1];Object(c.useEffect)((function(){A&&he.invoke("POST","/api/v1/has-permission",{actions:[{id:"createBucket",action:"s3:CreateBucket"}]}).then((function(e){var t=e.permissions.filter((function(e){return"createBucket"===e.id})).pop();t&&t.can?L(!0):L(!1),_(!1)})).catch((function(e){_(!1),V(e)}))}),[A]),Object(c.useEffect)((function(){r(!0)}),[a,r]),Object(c.useEffect)((function(){d&&he.invoke("GET","/api/v1/buckets").then((function(e){b(!1),p(e.buckets||[])})).catch((function(e){b(!1),o(e)}))}),[d,o]);var D=h.filter((function(e){return""===w||e.name.indexOf(w)>=0}));return Object(n.jsxs)(c.Fragment,{children:[y&&Object(n.jsx)(Ra,{open:y,closeModalAndRefresh:function(e){S(!1),e&&b(!0)}}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.obTitleSection,children:Object(n.jsx)("div",{children:Object(n.jsx)(Ol,{})})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Buckets",className:t.searchField,id:"search-resource",label:"",onChange:function(e){N(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(Mt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){b(!0)},children:Object(n.jsx)(xo.a,{})}),M&&Object(n.jsx)("div",{children:Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){S(!0)},children:"Create Bucket"})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:[{type:"view",sendOnlyId:!0,onClick:function(e){var t=Z()(a,"url","/object-browser"),n="".concat(t,"/").concat(e);i(n,e,"path")}}],columns:[{label:"Name",elementKey:"name",renderFunction:function(e){return Object(n.jsxs)("div",{className:t.bucketName,children:[Object(n.jsx)("div",{className:"".concat(t.iconBucket," iconBucketElm")}),Object(n.jsx)("span",{children:e})]})}},{label:"Used Space",elementKey:"size",renderFunction:ce,globalClass:t.usedSpaceCol,rowClass:t.usedSpaceCol,width:100,contentTextAlign:"right",headerTextAlign:"right"}],isLoading:d,records:D,entityName:"Buckets",idField:"name",customPaperHeight:t.browsePaper})})]})]})})))),vl=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({watchList:{background:"white",maxHeight:"400",overflow:"auto","& ul":{margin:"4",padding:"0"},"& ul li":{listStyle:"none",margin:"0",padding:"0",borderBottom:"1px solid #dedede"}},actionsTray:{textAlign:"right","& button":{marginLeft:10}},inputField:{background:"#FFFFFF",padding:12,borderRadius:5,marginLeft:10,boxShadow:"0px 3px 6px #00000012"},fieldContainer:{background:"#FFFFFF",padding:0,borderRadius:5,marginLeft:10,textAlign:"left",minWidth:"206",boxShadow:"0px 3px 6px #00000012"},lastElementWPadding:{paddingRight:"78"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.match,a=e.classes,c=Z()(t,"url","");return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(Ua,{label:"Object Browser"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:a.container,children:"/object-browser"===c&&Object(n.jsx)(xl,{})})})]})})),yl={setErrorSnackMessage:V},Sl=Object(s.b)(null,yl)((function(e){var t=e.closeDeleteModalAndRefresh,a=e.deleteOpen,i=e.selectedBucket,r=e.selectedObject,o=e.setErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1];return Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete"}),Object(n.jsxs)(ha.a,{children:[d&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete: ",Object(n.jsx)("b",{children:r}),"?"," "]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:d,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){!function(){if(!d){var e=!1;r.endsWith("/")&&(e=!0),b(!0),he.invoke("DELETE","/api/v1/buckets/".concat(i,"/objects?path=").concat(r,"&recursive=").concat(e)).then((function(){b(!1),t(!0)})).catch((function(e){b(!1),o(e)}))}}()},color:"secondary",disabled:d,children:"Delete"})]})]})})),Cl=a(953),kl={createFolder:function(e){return{type:ol,newRoute:e}}},wl=Object(s.b)(null,kl)(Object(N.a)((function(e){return Object(k.a)(Object(j.a)({buttonContainer:{textAlign:"right"},pathLabel:{marginTop:0,marginBottom:32}},we))}))((function(e){var t=e.modalOpen,a=e.folderName,r=e.onClose,o=e.createFolder,s=e.classes,l=Object(c.useState)(""),d=Object(u.a)(l,2),b=d[0],j=d[1],m=a.split("/").slice(2).join("/");return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(ga,{modalOpen:t,title:"Add Folder",onClose:r,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)("h3",{className:s.pathLabel,children:["Current Path: ",m,"/"]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:b,label:"Folder Path",id:"folderPath",name:"folderPath",placeholder:"Enter Folder Path",onChange:function(e){j(e.target.value)}})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:s.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:s.clearButton,onClick:function(){j("")},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:""===b.trim(),onClick:function(){o(b),r()},children:"Save"})]})]})})})}))),Nl=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 12.996",children:Object(n.jsxs)("g",{transform:"translate(-63.686 -70.783)",children:[Object(n.jsx)("path",{className:"a",d:"M74.736,79.879v1.95h-9.1v-1.95h-1.95v3.9h13v-3.9Z"}),Object(n.jsx)("path",{className:"a",d:"M69.211,80.533h1.95V73.861h1.525l-2.5-3.078-2.5,3.078h1.525Z"})]})})})},Tl=a(437),El=function(e,t,a,n,c){var i=document.createElement("a");document.body.appendChild(i);var r=new XMLHttpRequest,o=t.split("/"),s=o[o.length-1],l="/api/v1/buckets/".concat(e,"/objects/download?prefix=").concat(t);Object(Tl.isNullOrUndefined)(a)||"null"===a||(l=l.concat("&version_id=".concat(a))),r.open("GET",l,!0),r.responseType="blob",r.onload=function(r){if(200===this.status){var o=new Blob([this.response],{type:"octet/stream"}),l=window.URL.createObjectURL(o);i.href=l,i.download=s,i.click(),window.URL.revokeObjectURL(l),i.remove(),n&&n("".concat(e,"/").concat(t).concat(c?"-".concat(a):""))}},r.send()},Al={backgroundRepeat:"no-repeat",backgroundPosition:"center center",width:16,minWidth:16,height:40,marginRight:10};var _l=Object(n.jsx)(v.a,{component:"h3",children:"Loading..."}),Il={addRoute:bl,setAllRoutes:jl,setLastAsFile:function(){return{type:sl}},setLoadingProgress:function(e){return{type:F,loadingProgress:e}},setSnackBarMessage:U,setErrorSnackMessage:V,fileIsBeingPrepared:ml,fileDownloadStarted:hl},Fl=Object(s.b)((function(e){var t=e.objectBrowser;return{routesList:Z()(t,"routesList",[]),downloadingFiles:Z()(t,"downloadingFiles",[])}}),Il),Ml=Object(l.g)(Fl(Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},fileName:{display:"flex",alignItems:"center"},fileNameText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},iconFolder:Object(j.a)({backgroundImage:"url(/images/ob_folder_clear.svg)"},Al),iconFile:Object(j.a)({backgroundImage:"url(/images/ob_file_clear.svg)"},Al),buttonsContainer:{"& .MuiButtonBase-root":{marginLeft:10}},browsePaper:{height:"calc(100vh - 280px)"},"@global":{".rowLine:hover .iconFileElm":{backgroundImage:"url(/images/ob_file_filled.svg)"},".rowLine:hover .iconFolderElm":{backgroundImage:"url(/images/ob_folder_filled.svg)"}},listButton:{marginLeft:"10px"}},Ie),Fe),Le),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.match,r=e.addRoute,o=e.setAllRoutes,s=e.routesList,l=e.downloadingFiles,d=e.setLastAsFile,b=e.setLoadingProgress,j=e.setSnackBarMessage,m=e.setErrorSnackMessage,h=e.fileIsBeingPrepared,p=e.fileDownloadStarted,O=Object(c.useState)([]),y=Object(u.a)(O,2),S=y[0],C=y[1],k=Object(c.useState)(!0),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(!1),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(!1),M=Object(u.a)(F,2),L=M[0],D=M[1],B=Object(c.useState)(""),R=Object(u.a)(B,2),P=R[0],z=R[1],K=Object(c.useState)(""),W=Object(u.a)(K,2),U=W[0],V=W[1],G=Object(c.useState)(""),q=Object(u.a)(G,2),H=q[0],Y=q[1],Q=Object(c.useState)(0),J=Object(u.a)(Q,2),$=J[0],X=J[1],ee=Object(c.useState)(_l),te=Object(u.a)(ee,2),ae=te[0],ne=te[1];!function(e,t){var a=Object(c.useRef)(null);Object(c.useEffect)((function(){a.current=e}),[e]),Object(c.useEffect)((function(){if(null!==t){var e=setInterval((function(){void 0!==a&&a.current&&a.current()}),t);return function(){return clearInterval(e)}}}),[t])}((function(){N&&function(){var e=Date.now()-$;e/1e3>=6?ne(Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(v.a,{component:"h3",children:["This operation is taking longer than expected... (",Math.ceil(e/1e3),"s)"]})})):e/1e3>=3&&ne(Object(n.jsx)(v.a,{component:"h3",children:"This operation is taking longer than expected..."}))}()}),1e3),Object(c.useEffect)((function(){var e=a.params.bucket,t=a.params[0];if(N){var n="";t&&(n="?prefix=".concat(t,"/"));var c=Date.now()+0;X(c),ne(_l),he.invoke("GET","/api/v1/buckets/".concat(e,"/objects").concat(n)).then((function(t){V(e);var c=t.objects||[],i=[],r=[];c.forEach((function(e){e.name.endsWith("/")?i.push(e):r.push(e)}));var o=[].concat(i,r);C(o),t.objects||""===n?T(!1):function(){var e=a.params.bucket,t=a.params[0];he.invoke("GET","/api/v1/buckets/".concat(e,"/objects?prefix=").concat(t)).then((function(e){null!==e.objects?d():T(!1)})).catch((function(e){T(!1),m(e)}))}()})).catch((function(e){T(!1),m(e)}))}}),[N,a,d,m]),Object(c.useEffect)((function(){var e=Z()(a,"url","/object-browser");e!==s[s.length-1].route&&o(e)}),[a,s,o]),Object(c.useEffect)((function(){T(!0)}),[s,T]);var ie=function(e){p(e)},re=function(e){var t=s[s.length-1].route.split("/").filter((function(e){return""!==e.trim()})),a="";t.length>2&&(a="".concat(t.slice(2).join("/"),"/")),function(e,t,a){if(null!==e&&void 0!==e&&null!==e.target&&void 0!==e.target){e.preventDefault();var n=e.target.files,c="/api/v1/buckets/".concat(t,"/objects/upload");""!==a&&(c="".concat(c,"?prefix=").concat(a));var i=new XMLHttpRequest,r=n.length>1,o="An error occurred while uploading the file".concat(r?"s":"","."),s="Object".concat(r?"s":""," uploaded successfully.");i.open("POST",c,!0),i.withCredentials=!1,i.onload=function(e){401!==i.status&&403!==i.status&&400!==i.status&&500!==i.status||j(o),200===i.status&&j(s)},i.upload.addEventListener("error",(function(e){j(o)})),i.upload.addEventListener("progress",(function(e){b(Math.floor(100*e.loaded/e.total))})),i.onerror=function(){j(o)},i.onloadend=function(){T(!0),b(100)};var l,d=new FormData,u=Object(rr.a)(n);try{for(u.s();!(l=u.n()).done;){var m=l.value,h=m.name,p=new Blob([m]);d.append(h,p)}}catch(O){u.e(O)}finally{u.f()}i.send(d),e.target.value=null}}(e,U,a)},oe=[{type:"view",onClick:function(e){var t=Z()(a,"url","/object-browser");if(e.endsWith("/")){var n=e.substr(0,e.length-1).split("/"),c=n.length-1,i="".concat(t,"/").concat(n[c]);r(i,n[c],"path")}else{var o=e.split("/"),s=o[o.length-1],l="".concat(t,"/").concat(s);r(l,s,"file")}},sendOnlyId:!0},{type:"download",onClick:function(e){h("".concat(U,"/").concat(e.name)),e.size>104857600&&j("Download process started, it may take a few moments to complete"),El(U,e.name,e.version_id,ie)},showLoaderFunction:function(e){return l.includes("".concat(a.params.bucket,"/").concat(e))}},{type:"delete",onClick:function(e){I(!0),z(e)},sendOnlyId:!0}],se=S.filter((function(e){return""===H||e.name.indexOf(H)>=0}));return Object(n.jsxs)(i.a.Fragment,{children:[_&&Object(n.jsx)(Sl,{deleteOpen:_,selectedBucket:U,selectedObject:P,closeDeleteModalAndRefresh:function(e){I(!1),e&&(j("Object '".concat(P,"' deleted successfully.")),T(!0))}}),L&&Object(n.jsx)(wl,{modalOpen:L,folderName:s[s.length-1].route,onClose:function(){D(!1)}}),Object(n.jsx)(Ua,{label:"Object Browser"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.obTitleSection,children:Object(n.jsx)("div",{children:Object(n.jsx)(Ol,{})})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Objects",className:t.searchField,id:"search-resource",label:"",onChange:function(e){Y(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(Mt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){T(!0)},children:Object(n.jsx)(xo.a,{})}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),component:"label",onClick:function(){D(!0)},className:t.listButton,children:"Create Folder"}),Object(n.jsxs)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(Nl,{}),component:"label",className:t.listButton,children:["File",Object(n.jsx)(Cl.a,{type:"file",inputProps:{multiple:!0},onChange:function(e){return re(e)},id:"file-input",style:{display:"none"}})]})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:oe,columns:[{label:"Name",elementKey:"name",renderFunction:function(e){var a=e,c="".concat(t.iconFile," iconFileElm");e.endsWith("/")&&(c="".concat(t.iconFolder," iconFolderElm"),a=e.substr(0,e.length-1));var i=a.split("/");return Object(n.jsxs)("div",{className:t.fileName,children:[Object(n.jsx)("div",{className:c}),Object(n.jsx)("span",{className:t.fileNameText,children:i[i.length-1]})]})}},{label:"Last Modified",elementKey:"last_modified",renderFunction:function(e){return e.name.endsWith("/")?"":Object(n.jsx)(ct.a,{children:e.last_modified})},renderFullObject:!0},{label:"Size",elementKey:"size",renderFunction:function(e){return e.name.endsWith("/")?"":ce(String(e.size))},renderFullObject:!0,width:60,contentTextAlign:"right"}],isLoading:N,loadingMessage:ae,entityName:"Objects",idField:"name",records:se,customPaperHeight:t.browsePaper})})]})})]})})))),Ll=a(1012),Dl=a(439),Bl=a.n(Dl),Rl=a(438),Pl=a.n(Rl),zl=Object(s.b)(null,{setModalSnackMessage:G,setModalErrorSnackMessage:q}),Kl=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({copyButtonContainer:{paddingLeft:16},modalContent:{paddingBottom:53}},we))}))(zl((function(e){var t=e.classes,a=e.open,r=e.closeModalAndRefresh,o=e.bucketName,s=e.dataObject,l=e.setModalSnackMessage,d=e.setModalErrorSnackMessage,b=Object(c.useState)(""),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(!1),O=Object(u.a)(p,2),f=O[0],v=O[1],y=Object(c.useState)(""),S=Object(u.a)(y,2),C=S[0],k=S[1],w=Object(c.useState)(!0),N=Object(u.a)(w,2),T=N[0],E=N[1];return Object(c.useEffect)((function(){if(T){v(!0),h("");var e=new Date("".concat(C,"T23:59:59")),t=new Date,a=e.getTime()-t.getTime();return a<0?(d("Selected date must be greater than current time."),h(""),void v(!1)):a>6048e5?(d("You can share a file only for less than 7 days."),h(""),void v(!1)):void he.invoke("GET","/api/v1/buckets/".concat(o,"/objects/share?prefix=").concat(s.name,"&version_id=").concat(s.version_id).concat(""!==C?"&expires=".concat(a,"ms"):"")).then((function(e){h(e),v(!1)})).catch((function(e){d(e),h(""),v(!1)}))}}),[s,C,o,T,h,d]),Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(ga,{title:"Share File",modalOpen:a,onClose:function(){r()},children:Object(n.jsxs)(x.a,{container:!0,className:t.modalContent,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.dateContainer,children:Object(n.jsx)(Vn,{id:"date",label:"Active until",borderBottom:!1,addSwitch:!0,onDateChange:function(e,t){E(t),k(t?e:"")}})}),Object(n.jsxs)(x.a,{container:!0,item:!0,xs:12,children:[Object(n.jsx)(x.a,{item:!0,xs:10,children:Object(n.jsx)(Ya,{content:m})}),Object(n.jsx)(x.a,{item:!0,xs:2,className:t.copyButtonContainer,children:Object(n.jsx)(Pl.a,{text:m,children:Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(rt,{}),onClick:function(){l("Share URL Copied to clipboard")},disabled:""===m||f,children:"Copy"})})})]})]})})})}))),Wl=function(){return Object(n.jsx)(it.a,{children:Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13",children:[Object(n.jsx)("path",{d:"M11.05 8.617v2.429h-9.1v-9.1h2.429v-1.95H0v13h13V8.617z",className:"a"}),Object(n.jsx)("path",{d:"M3.854 9.256h1.95a4.945 4.945 0 013.6-4.74v1.3l.6-.487 2.474-2.012L9.4.817v1.7a6.9 6.9 0 00-5.546 6.739z",className:"a"})]})})},Ul=function(){return Object(n.jsx)(it.a,{children:Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 12.996",children:[Object(n.jsx)("path",{d:"M11.05 9.096v1.95h-9.1v-1.95H0v3.9h13v-3.9z"}),Object(n.jsx)("path",{d:"M6.5 9.75L9 6.672H7.475V0h-1.95v6.672H4z"})]})})},Vl={setModalErrorSnackMessage:q},Gl=Object(s.b)(null,Vl),ql=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({objectName:{fontSize:18,fontWeight:700,marginBottom:40},buttonContainer:{textAlign:"right"}},we))}))(Gl((function(e){var t=e.classes,a=e.open,i=e.closeModalAndRefresh,r=e.objectName,o=e.objectInfo,s=e.bucketName,l=e.setModalErrorSnackMessage,d=Object(c.useState)(!0),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(""),p=Object(u.a)(h,2),O=p[0],f=p[1],v=Object(c.useState)(""),y=Object(u.a)(v,2),S=y[0],C=y[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(!1),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(!1),M=Object(u.a)(F,2),L=M[0],D=M[1];Object(c.useEffect)((function(){if(o.retention_mode&&(f(o.retention_mode.toLowerCase()),D(!0)),o.retention_until_date){var e=new Date(o.retention_until_date);if("Invalid Date"!==e.toString()){var t=e.getFullYear(),a=(c=e.getMonth()+1)<10?"0".concat(c):"".concat(c),n=e.getDate();isNaN(n)||"NaN"===a||isNaN(t)||C("".concat(t,"-").concat(a,"-").concat(n))}D(!0)}var c}),[o]);var B=Object(c.useRef)(null),R=function(){m(!1),f(""),B.current&&B.current.resetDate()},P=L&&("governance"===O||""===O);return Object(n.jsxs)(ga,{title:"Set Retention Policy",modalOpen:a,onClose:function(){R(),i(!1)},children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.objectName,children:r}),Object(n.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault()}(e)},children:[P&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"status",id:"status",name:"status",checked:j,onChange:function(e){m(!j)},label:"Status",indicatorLabels:["Enabled","Disabled"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:O,id:"type",name:"type",label:"Type",disableOptions:!j||L&&""!==O,onChange:function(e){f(e.target.value)},selectorOptions:[{label:"Governance",value:"governance"},{label:"Compliance",value:"compliance"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Vn,{id:"date",label:"Date",disableOptions:!(j&&("governance"===O||"compliance"===O)),ref:B,value:S,borderBottom:!0,onDateChange:function(e,t){T(t),t&&C(e)}})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:R,children:"Reset"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:j&&""===O||j&&!N||_,onClick:function(){I(!0);var e=o.name,t=o.version_id,a=j||"governance"!==O?"".concat(S,"T23:59:59Z"):"";j||"governance"!==O?function(e,t,a){he.invoke("PUT","/api/v1/buckets/".concat(s,"/objects/retention?prefix=").concat(e,"&version_id=").concat(t),{expires:a,mode:O}).then((function(e){I(!1),i(!0)})).catch((function(e){l(e),I(!1)}))}(e,t,a):function(e,t){he.invoke("DELETE","/api/v1/buckets/".concat(s,"/objects/retention?prefix=").concat(e,"&version_id=").concat(t)).then((function(){I(!1),i(!0)})).catch((function(e){l(e),I(!1)}))}(e,t)},children:"Save"})]})]})]})}))),Hl={setModalErrorSnackMessage:q},Yl=Object(s.b)(null,Hl),Ql=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({buttonContainer:{textAlign:"right"},pathLabel:{marginTop:0,marginBottom:32}},we))}))(Yl((function(e){var t=e.modalOpen,a=e.currentTags,r=e.selectedObject,o=e.onCloseAndUpdate,s=e.bucketName,l=e.versionId,d=e.setModalErrorSnackMessage,b=e.classes,m=Object(c.useState)(""),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(""),v=Object(u.a)(f,2),y=v[0],S=v[1],C=Object(c.useState)(!1),k=Object(u.a)(C,2),w=k[0],N=k[1];return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(ga,{modalOpen:t,title:"Add New Tag",onClose:function(){o(!1)},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)("h3",{className:b.pathLabel,children:["Selected Object: ",r]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:p,label:"New Tag Key",id:"newTagKey",name:"newTagKey",placeholder:"Enter New Tag Key",onChange:function(e){O(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:y,label:"New Tag Label",id:"newTagLabel",name:"newTagLabel",placeholder:"Enter New Tag Label",onChange:function(e){S(e.target.value)}})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:b.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:b.clearButton,onClick:function(){S(""),O("")},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:""===y.trim()||""===p.trim()||w,onClick:function(){N(!0);var e={};e[p]=y;var t=Object(j.a)(Object(j.a)({},a),e);he.invoke("PUT","/api/v1/buckets/".concat(s,"/objects/tags?prefix=").concat(r,"&version_id=").concat(l),{tags:t}).then((function(e){N(!1),o(!0)})).catch((function(e){d(e),N(!1)}))},children:"Save"})]})]})})})}))),Zl={setErrorSnackMessage:V},Jl=Object(s.b)(null,Zl),$l=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({buttonContainer:{textAlign:"right"},pathLabel:{marginTop:0,marginBottom:32}},we))}))(Jl((function(e){var t=e.deleteOpen,a=e.currentTags,i=e.selectedObject,r=e.selectedTag,o=e.onCloseAndUpdate,s=e.bucketName,l=e.versionId,d=e.setErrorSnackMessage,b=e.classes,m=Object(c.useState)(!1),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(u.a)(r,2),x=f[0],v=f[1];return Object(n.jsxs)(ja.a,{open:t,onClose:function(){o(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete Tag"}),Object(n.jsxs)(ha.a,{children:[p&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete the tag"," ",Object(n.jsxs)("b",{className:b.wrapText,children:[x," : ",v]})," ","from ",i,"?"]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){o(!1)},color:"primary",disabled:p,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){O(!0);var e=Object(j.a)({},a);delete e[x],he.invoke("PUT","/api/v1/buckets/".concat(s,"/objects/tags?prefix=").concat(i,"&version_id=").concat(l),{tags:e}).then((function(e){O(!1),o(!0)})).catch((function(e){d(e),O(!1)}))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})}))),Xl={setModalErrorSnackMessage:q},ed=Object(s.b)(null,Xl),td=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({objectName:{fontSize:18,fontWeight:700,marginBottom:40},buttonContainer:{textAlign:"right"}},we))}))(ed((function(e){var t=e.classes,a=e.open,i=e.closeModalAndRefresh,r=e.objectName,o=e.bucketName,s=e.actualInfo,l=e.setModalErrorSnackMessage,d=Object(c.useState)(!1),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(!1),p=Object(u.a)(h,2),O=p[0],f=p[1],v=s.version_id;Object(c.useEffect)((function(){var e=Z()(s,"legal_hold_status","OFF");m("ON"===e)}),[s]);var y=function(){m(!1)};return Object(n.jsxs)(ga,{title:"Set Legal Hold",modalOpen:a,onClose:function(){y(),i(!1)},children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.objectName,children:r}),Object(n.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault(),f(!0),he.invoke("PUT","/api/v1/buckets/".concat(o,"/objects/legalhold?prefix=").concat(r,"&version_id=").concat(v),{status:j?"enabled":"disabled"}).then((function(){f(!1),i(!0)})).catch((function(e){l(e),f(!1)}))}(e)},children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"legalhold",id:"legalhold",name:"legalhold",checked:j,onChange:function(e){m(!j)},label:"Legal Hold Status",indicatorLabels:["Enabled","Disabled"],tooltip:"To enable this feature you need to enable versioning on the bucket before creation"})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:y,children:"Reset"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:O,children:"Save"})]})]})]})}))),ad={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:"0",tags:{},version_id:null},nd={removeRouteLevel:ul,setErrorSnackMessage:V,fileIsBeingPrepared:ml,fileDownloadStarted:hl,setSnackBarMessage:U},cd=Object(s.b)((function(e){var t=e.objectBrowser;return{downloadingFiles:Z()(t,"downloadingFiles",[])}}),nd)(Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({objectNameContainer:{marginBottom:8},objectPathContainer:{marginBottom:26,fontSize:10},objectPathLink:{"&:visited":{color:"#000"}},objectName:{fontSize:24},propertiesContainer:{display:"flex",flexDirection:"row",marginBottom:15},propertiesItem:{display:"flex",flexDirection:"row",marginRight:21},propertiesItemBold:{fontWeight:700},propertiesValue:{marginLeft:8,textTransform:"capitalize"},propertiesIcon:{marginLeft:5},actionsIconContainer:{marginLeft:12},actionsIcon:{height:16,width:16,"& .MuiSvgIcon-root":{height:16}},tagsContainer:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:15},tagText:{marginRight:13},tag:{marginRight:6,fontSize:10,fontWeight:700,"&.MuiChip-sizeSmall":{height:18},"& .MuiSvgIcon-root":{height:10,width:10}},search:{marginBottom:8,"&.MuiFormControl-root":{marginRight:0}},"@global":{".progressDetails":{paddingTop:3,display:"inline-block",position:"relative",width:18,height:18},".progressDetails > .MuiCircularProgress-root":{position:"absolute",left:0,top:3}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.routesList,r=e.downloadingFiles,o=e.removeRouteLevel,s=e.setErrorSnackMessage,l=e.setSnackBarMessage,d=e.fileIsBeingPrepared,j=e.fileDownloadStarted,m=Object(c.useState)(!0),h=Object(u.a)(m,2),p=h[0],O=h[1],g=Object(c.useState)(!1),v=Object(u.a)(g,2),y=v[0],C=v[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(!1),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(!1),M=Object(u.a)(F,2),L=M[0],D=M[1],B=Object(c.useState)(["",""]),R=Object(u.a)(B,2),P=R[0],z=R[1],K=Object(c.useState)(!1),W=Object(u.a)(K,2),U=W[0],V=W[1],G=Object(c.useState)(ad),q=Object(u.a)(G,2),H=q[0],Y=q[1],Q=Object(c.useState)([]),J=Object(u.a)(Q,2),$=J[0],X=J[1],ee=Object(c.useState)(""),te=Object(u.a)(ee,2),ae=te[0],ne=te[1],ce=Object(c.useState)(!1),ie=Object(u.a)(ce,2),re=ie[0],oe=ie[1],se=a[a.length-1].route.split("/"),le=se[se.length-1],de=se[2],be=se.slice(3).join("/");Object(c.useEffect)((function(){p&&he.invoke("GET","/api/v1/buckets/".concat(de,"/objects?prefix=").concat(be,"&with_versions=true")).then((function(e){var t=Z()(e,"objects",[]);Y(t.find((function(e){return e.is_latest}))||ad),X(t.filter((function(e){return!e.is_latest}))),O(!1)})).catch((function(e){s(e),O(!1)}))}),[p,de,be,s]);var ue=[];H.tags&&(ue=Object.keys(H.tags));var je=function(){C(!0)},me=function(e){j(e)},pe=function(e,t){d("".concat(de,"/").concat(e.name).concat(t?"-".concat(e.version_id):"")),e.size&&parseInt(e.size)>104857600&&l("Download process started, it may take a few moments to complete"),El(de,be,e.version_id,me,t)},Oe=[{type:"share",onClick:je,sendOnlyId:!0},{type:"download",onClick:function(e){pe(e,!0)},showLoaderFunction:function(e){return r.includes("".concat(de,"/").concat(le,"-").concat(e))}}],ge=$.filter((function(e){return!!e.version_id&&e.version_id.includes(ae)}));return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(Ua,{label:"Object Browser"}),y&&Object(n.jsx)(Kl,{open:y,closeModalAndRefresh:function(){C(!1)},bucketName:de,dataObject:H}),N&&Object(n.jsx)(ql,{open:N,closeModalAndRefresh:function(e){T(!1),e&&O(!0)},objectName:le,objectInfo:H,bucketName:de}),re&&Object(n.jsx)(Sl,{deleteOpen:re,selectedBucket:de,selectedObject:be,closeDeleteModalAndRefresh:function(e){if(oe(!1),e){var t=se.slice(0,-1).join("/");o(t),b.push(t)}}}),_&&Object(n.jsx)(Ql,{modalOpen:_,currentTags:H.tags,selectedObject:be,versionId:H.version_id,bucketName:de,onCloseAndUpdate:function(e){I(!1),e&&O(!0)}}),L&&Object(n.jsx)($l,{deleteOpen:L,currentTags:H.tags,selectedObject:be,versionId:H.version_id,bucketName:de,onCloseAndUpdate:function(e){D(!1),e&&O(!0)},selectedTag:P}),U&&Object(n.jsx)(td,{open:U,closeModalAndRefresh:function(e){V(!1),e&&O(!0)},objectName:be,bucketName:de,actualInfo:H}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.obTitleSection,children:Object(n.jsx)("div",{children:Object(n.jsx)(Ol,{})})}),Object(n.jsx)("br",{}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.propertiesContainer,children:[H.version_id&&"null"!==H.version_id&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)("div",{className:t.propertiesItem,children:[Object(n.jsxs)("div",{children:[Object(n.jsx)("span",{className:t.propertiesItemBold,children:"Legal Hold:"}),Object(n.jsx)("span",{className:t.propertiesValue,children:H.legal_hold_status?H.legal_hold_status.toLowerCase():"Off"})]}),Object(n.jsx)("div",{children:Object(n.jsx)(Mt.a,{color:"primary","aria-label":"legal-hold",size:"small",className:t.propertiesIcon,onClick:function(){V(!0)},children:Object(n.jsx)(Yt,{active:!0})})})]}),Object(n.jsxs)("div",{className:t.propertiesItem,children:[Object(n.jsxs)("div",{children:[Object(n.jsx)("span",{className:t.propertiesItemBold,children:"Retention:"}),Object(n.jsx)("span",{className:t.propertiesValue,children:H.retention_mode?H.retention_mode.toLowerCase():"Undefined"})]}),Object(n.jsx)("div",{children:Object(n.jsx)(Mt.a,{color:"primary","aria-label":"retention",size:"small",className:t.propertiesIcon,onClick:function(){T(!0)},children:Object(n.jsx)(Yt,{active:!0})})})]})]}),Object(n.jsxs)("div",{className:t.propertiesItem,children:[Object(n.jsx)("div",{className:t.propertiesItemBold,children:"File Actions:"}),Object(n.jsx)("div",{className:t.actionsIconContainer,children:Object(n.jsx)(Mt.a,{color:"primary","aria-label":"share",size:"small",className:t.actionsIcon,onClick:function(){je()},children:Object(n.jsx)(Wl,{})})}),Object(n.jsx)("div",{className:t.actionsIconContainer,children:r.includes("".concat(de,"/").concat(H.name))?Object(n.jsx)("div",{className:"progressDetails",children:Object(n.jsx)(S.a,{color:"primary",size:17,variant:"indeterminate"})}):Object(n.jsx)(Mt.a,{color:"primary","aria-label":"download",size:"small",className:t.actionsIcon,onClick:function(){pe(H)},children:Object(n.jsx)(Ul,{})})}),Object(n.jsx)("div",{className:t.actionsIconContainer,children:Object(n.jsx)(Mt.a,{color:"primary","aria-label":"delete",size:"small",className:t.actionsIcon,onClick:function(){oe(!0)},children:Object(n.jsx)(st,{})})})]})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.tagsContainer,children:[Object(n.jsx)("div",{className:t.tagText,children:"Tags:"}),ue&&ue.map((function(e,a){var c=Z()(H,"tags.".concat(e),"");return""!==c?Object(n.jsx)(Ll.a,{className:t.tag,size:"small",label:"".concat(e," : ").concat(c),color:"primary",deleteIcon:Object(n.jsx)(Bl.a,{}),onDelete:function(){!function(e,t){z([e,t]),D(!0)}(e,c)}},"chip-".concat(a)):null})),Object(n.jsx)(Ll.a,{className:t.tag,icon:Object(n.jsx)(Ko.a,{}),clickable:!0,size:"small",label:"Add tag",color:"primary",variant:"outlined",onClick:function(){I(!0)}})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.actionsTray,children:H.version_id&&"null"!==H.version_id&&Object(n.jsx)(f.a,{placeholder:"Search ".concat(le),className:Object(xe.a)(t.search,t.searchField),id:"search-resource",label:"",onChange:function(e){ne(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:H.version_id&&"null"!==H.version_id&&Object(n.jsx)(ua,{itemActions:Oe,columns:[{label:"Version ID",elementKey:"version_id"},{label:"Last Modified",elementKey:"last_modified",renderFunction:function(e){return Object(n.jsx)(ct.a,{children:e})}}],isLoading:!1,entityName:"Versions",idField:"version_id",records:ge})})]})})]})}))),id={setAllRoutes:jl},rd=Object(s.b)((function(e){var t=e.objectBrowser;return{routesList:Z()(t,"routesList",[])}}),id),od=Object(l.g)(rd((function(e){var t=e.routesList,a=e.match,i=e.setAllRoutes,r=t[t.length-1];return Object(c.useEffect)((function(){var e=Z()(a,"url","/object-browser");e!==t[t.length-1].route&&i(e)}),[a,t,i]),"path"===r.type?Object(n.jsx)(Ml,{}):Object(n.jsx)(cd,{routesList:t})}))),sd=a(232),ld=a.n(sd),dd=[{id:0,title:"Community",price:"Open Source",capacityMin:""},{id:1,title:"Standard",price:"$10/TB/month",capacityMax:"Up to 10PB. No additional charges for capacity over 10PB",capacityMin:""},{id:2,title:"Enterprise",price:"$20/TB/month",capacityMax:"Up to 5PB. No additional charges for capacity over 5PB",capacityMin:""}],bd=[{id:0,field:"License",community:"GNU AGPL v3",communityDetail:"",standard:"Commercial License",standardDetail:"",enterprise:"Commercial License",enterpriseDetail:""},{id:1,field:"Software Release",community:"Update to latest",standard:"1 Year Long Term Support",enterprise:"5 Years Long Term Support"},{id:2,field:"SLA",community:"No SLA",standard:"<24 hours",enterprise:"<1 hour"},{id:3,field:"Support",community:"Community:",communityDetail:"Public Slack Channel + Github Issues",standard:"24x7 L4 direct engineering",standardDetail:"Support via SUBNET",enterprise:"24x7 L4 direct engineering",enterpriseDetail:"Support via SUBNET"},{id:4,field:"Security Updates & Critical Bugs",community:"Self Update",standard:"Guided Update",enterprise:"Guided Update"},{id:5,field:"Panic Button",community:"N/A",standard:"1 per year",enterprise:"Unlimited"},{id:6,field:"Annual Architecture Review",community:"N/A",standard:"Yes",enterprise:"Yes"},{id:7,field:"Annual Performance Review",community:"N/A",standard:"Yes",enterprise:"Yes"},{id:8,field:"Indemnification",community:"N/A",standard:"N/A",enterprise:"Yes"},{id:9,field:"Security + Policy Review",community:"N/A",standard:"N/A",enterprise:"Yes"}],ud=[{id:0,text:"Join Slack",text2:"",link:"https://slack.min.io",plan:"community"},{id:1,text:"Subscribe",text2:"Upgrade",link:"https://subnet.min.io/subscription",plan:"standard"},{id:2,text:"Subscribe",text2:"Upgrade",link:"https://subnet.min.io/subscription",plan:"enterprise"}],jd=a(440),md=a.n(jd),hd=a(441),pd=a.n(hd),Od={setModalErrorSnackMessage:q},gd=Object(s.b)(null,Od),fd=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({errorBlock:{color:"red"},subnetLicenseKey:{padding:"10px 10px 10px 0px",borderRight:"1px solid rgba(0, 0, 0, 0.12)",opacity:.5,"&:hover":{opacity:1}},subnetLoginForm:{padding:"10px 0px 10px 10px",opacity:.5,"&:hover":{opacity:1}},licenseKeyField:{},pageTitle:{marginBottom:20},button:{textTransform:"none",fontSize:15,fontWeight:700,background:"transparent linear-gradient(90deg, #073052 0%, #081c42 100%) 0% 0% no-repeat padding-box",color:"#fff"},buttonSignup:{textTransform:"none",fontSize:15,fontWeight:700,marginLeft:15}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(gd((function(e){var t=e.classes,a=e.open,i=e.closeModal,r=e.setModalErrorSnackMessage,o=Object(c.useState)(""),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(""),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(""),O=Object(u.a)(p,2),S=O[0],C=O[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=function(){if(!N){T(!0);var e={license:l,email:S,password:m};he.invoke("POST","/api/v1/subscription/validate",e).then((function(){T(!1),d(""),h(""),C(""),i()})).catch((function(e){T(!1),d(""),h(""),C(""),r(e)}))}};return a?Object(n.jsxs)(ga,{title:"",modalOpen:a,onClose:function(){d(""),h(""),C(""),i()},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsxs)(x.a,{container:!0,alignItems:"center",item:!0,xs:12,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{component:"h2",variant:"h6",className:t.pageTitle,children:"Activate SUBNET License"})}),Object(n.jsxs)(x.a,{item:!0,className:t.subnetLicenseKey,xs:6,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"caption",display:"block",gutterBottom:!0,children:"Enter your license key here"})}),Object(n.jsx)(f.a,{id:"license-key",placeholder:"",multiline:!0,rows:3,value:l,onChange:function(e){return d(e.target.value)},fullWidth:!0,className:t.licenseKeyField,variant:"outlined"}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",onClick:function(){return E()},disabled:N||0===l.trim().length,children:"Activate"})]}),Object(n.jsx)(x.a,{item:!0,className:t.subnetLoginForm,xs:6,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{overlayIcon:Object(n.jsx)(md.a,{}),id:"subnet-email",name:"subnet-email",onChange:function(e){C(e.target.value)},placeholder:"email",label:"",type:"text",value:S})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{overlayIcon:Object(n.jsx)(pd.a,{}),id:"subnet-password",name:"subnet-password",onChange:function(e){h(e.target.value)},placeholder:"password",label:"",type:"password",value:m})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(g.a,{className:t.button,color:"primary",onClick:function(){return E()},disabled:N||0===S.trim().length||0===m.trim().length,variant:"contained",children:"Activate"}),Object(n.jsx)(g.a,{className:t.buttonSignup,color:"primary",target:"_blank",rel:"noopener noreferrer",href:"#",onClick:function(e){e.preventDefault(),window.open("https://min.io/pricing","_blank")},variant:"outlined",children:"Sign Up"})]})]})})]}),N&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]}):null}))),xd=Object(s.b)((function(e){return{operatorMode:e.system.operatorMode}}),null)(Object(N.a)((function(e){return Object(k.a)(Object(j.a)({pageTitle:{fontSize:18,marginBottom:20},paper:{padding:"20px 52px 20px 28px"},licenseContainer:{position:"relative",padding:"20px 52px 0px 28px",background:"#032F51",boxShadow:"0px 3px 7px #00000014","& h2":{color:"#FFF",marginBottom:67},"& a":{textDecoration:"none"},"& h3":{color:"#FFFFFF",marginBottom:"30px",fontWeight:"bold"},"& h6":{color:"#FFFFFF !important"}},tableContainer:{marginLeft:28},detailsContainer:{textAlign:"center",paddingBottom:12,borderRadius:"3px 3px 0 0",marginLeft:8,maxWidth:"calc(25% - 8px)"},detailsContainerBorder:{border:"1px solid #e2e2e2",borderBottom:0,borderRadius:"4px 4px 0px 0px"},detailsContainerBorderHighlighted:{border:"1px solid #B5B5B5",borderBottom:0},detailsTitle:{fontSize:19,fontWeight:700,marginBottom:26,paddingTop:18},activePlanHeader:{fontWeight:700,background:"#D5DDE5",borderRadius:"3px 3px 0px 0px",color:"#121212",padding:8,borderTop:"1px solid #D5DDE5",marginTop:-2},planHeader:{background:"#FFFFFF",borderRadius:"3px 3px 0px 0px",padding:8,borderTop:"1px solid #D5DDE5"},detailsPrice:{fontSize:13,fontWeight:700,marginBottom:8},detailsCapacityMax:{minHeight:28,fontSize:10,fontWeight:700,marginBottom:12,padding:"0% 15%"},detailsCapacityMin:{fontSize:10},itemContainer:{height:36},itemContainerDetail:{height:48},item:{height:"100%",borderLeft:"1px solid #e2e2e2",borderRight:"1px solid #e2e2e2",textAlign:"center",fontSize:10,fontWeight:700,display:"flex",alignItems:"center",alignContent:"center",marginLeft:8,maxWidth:"calc(25% - 8px)",borderTop:"1px solid #e5e5e5"},itemFirst:{borderLeft:0,borderRight:0},itemHighlighted:{borderLeft:"1px solid #B5B5B5",borderRight:"1px solid #B5B5B5"},field:{textAlign:"left",fontWeight:400,fontSize:12},checkIcon:{height:12,color:"transparent linear-gradient(90deg, #073052 0%, #081c42 100%) 0% 0% no-repeat padding-box"},buttonContainer:{paddingTop:8,paddingBottom:24,height:"100%",display:"flex",justifyContent:"center",borderRadius:"0 0 3px 3px",border:"1px solid #e2e2e2",borderTop:0,marginLeft:8,maxWidth:"calc(25% - 8px)"},buttonContainerBlank:{border:0},buttonContainerHighlighted:{border:"1px solid #B5B5B5",borderTop:0},button:{textTransform:"none",fontSize:15,fontWeight:700},licenseButton:{float:"right",marginTop:25,marginRight:25},openSourcePolicy:{color:"#1C5A8D",fontWeight:"bold"},activateLink:{color:"#1C5A8D",fontWeight:"bold",clear:"both",background:"none",border:"none",textDecoration:"underline",cursor:"pointer"},subnetRefreshLicenseLink:{color:"#1C5A8D",fontWeight:"bold",clear:"both",background:"none",border:"none",textDecoration:"underline",cursor:"pointer",fontSize:13},fullWidth:{width:"100%",height:"100%"},midWidth:{width:"70%",float:"left",height:"100%"},smallWidth:{width:"30%",float:"right",height:"100%",borderRadius:"0px 3px 0px 0px !important"},licenseInfo:{color:"#FFFFFF",position:"relative"},licenseInfoTitle:{textTransform:"none",color:"#BFBFBF",fontSize:11},licenseInfoValue:{textTransform:"none",fontSize:14,fontWeight:"bold"},licenseDescription:{background:"#032F51",padding:"30px 30px",borderTop:"1px solid #e2e5e4",borderLeft:"1px solid #e2e5e4",borderRight:"1px solid #e2e5e4",bottom:0,left:"5%",right:"5%",position:"absolute"},currentPlanBG:{background:"#022A4A 0% 0% no-repeat padding-box",color:"#FFFFFF",borderTop:"1px solid #52687d"},currentPlanButton:{background:"#FFFFFF",color:"#022A4A","&:hover":{background:"#FFFFFF"}},planItemsPadding:{padding:"23px 33px"},subnetSubTitle:{fontSize:12},verifiedIcon:{width:96,position:"absolute",right:0,bottom:29},loadingLoginStrategy:{textAlign:"center"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.operatorMode,r=function(){E(!0),he.invoke("GET","/api/v1/subscription/info").then((function(e){e&&("STANDARD"===e.plan?k(1):"ENTERPRISE"===e.plan?k(2):k(1),h(e)),E(!1)})).catch((function(e){E(!1)}))},o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(0),O=Object(u.a)(p,2),f=O[0],k=O[1],w=Object(c.useState)(!0),N=Object(u.a)(w,2),T=N[0],E=N[1],A=Object(c.useState)(!1),_=Object(u.a)(A,2),I=_[0],F=_[1];return Object(c.useEffect)((function(){r()}),[]),T?Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})}):Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(Ua,{label:"License"}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsx)(C.a,{className:"".concat(t.licenseContainer," ").concat(t.midWidth),children:m?Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{container:!0,className:t.licenseInfo,children:[Object(n.jsxs)(x.a,{item:!0,xs:6,children:[Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"License"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:"Commercial License"}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Organization"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:m.organization}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Registered Capacity"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:ce((1099511627776*m.storage_capacity).toString(10))}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Expiry Date"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:Object(n.jsx)(ct.a,{format:"YYYY-MM-DD",children:m.expires_at})})]}),Object(n.jsxs)(x.a,{item:!0,xs:6,children:[Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Subscription Plan"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:m.plan}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Requester"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:m.email})]}),Object(n.jsx)("img",{className:t.verifiedIcon,src:"/verified.svg",alt:"verified"})]})}):Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("img",{src:"/agpl.svg",height:40,alt:"agpl"}),Object(n.jsx)(v.a,{component:"h2",variant:"h6",children:"GNU Affero General Public License"}),Object(n.jsx)("a",{href:"https://www.gnu.org/licenses/agpl-3.0.html",target:"_blank",rel:"nofollow noopener noreferrer",children:Object(n.jsxs)("div",{className:t.licenseDescription,children:[Object(n.jsx)(v.a,{component:"h3",children:"Version 3"}),Object(n.jsx)(v.a,{component:"h6",children:"The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the Community in the case of network server software."})]})})]})}),Object(n.jsx)(C.a,{className:"".concat(t.paper," ").concat(t.smallWidth),children:m?Object(n.jsxs)(i.a.Fragment,{children:[" ",Object(n.jsx)(v.a,{component:"h2",variant:"h6",className:t.pageTitle,children:"Login to MinIO SUBNET !"}),Object(n.jsx)(v.a,{component:"h6",className:t.subnetSubTitle,children:"It combines a commercial license with a support experience unlike any other."}),Object(n.jsx)("br",{}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",className:t.button,target:"_blank",rel:"noopener noreferrer",href:"https://subnet.min.io/support/?ref=".concat(a?"op":"con"),children:"Login to SUBNET"}),a&&Object(n.jsxs)(i.a.Fragment,{children:[" ",Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)("button",{className:t.subnetRefreshLicenseLink,onClick:function(e){e.preventDefault(),F(!0),he.invoke("POST","/api/v1/subscription/refresh",{}).then((function(e){e&&("STANDARD"===e.plan?k(1):"ENTERPRISE"===e.plan?k(2):k(1),h(e)),F(!1)})).catch((function(e){F(!1)}))},children:"Refresh Licence"}),I&&Object(n.jsx)(S.a,{size:16,className:t.loadingLoginStrategy})]})]}):Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(v.a,{component:"h2",variant:"h6",className:t.pageTitle,children:"Choosing between GNU AGPL v3 and Commercial License"}),Object(n.jsx)(v.a,{component:"h6",children:"If you are building proprietary applications, you may want to choose the commercial license included as part of the Standard and Enterprise subscription plans. Applications must otherwise comply with all the GNU AGPLv3 License & Trademark obligations. Follow the links below to learn more about the compliance policy."}),Object(n.jsx)("br",{}),Object(n.jsx)("a",{href:"https://min.io/compliance?ref=".concat(a?"op":"con"),className:t.openSourcePolicy,target:"_blank",rel:"nofollow noopener noreferrer",children:"Open Source Policy Compliance"}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)("a",{href:"https://min.io/logo?ref=".concat(a?"op":"con"),className:t.openSourcePolicy,target:"_blank",rel:"nofollow noopener noreferrer",children:"Trademark Policy"})]})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:Object(xe.a)(t.planItemsPadding),children:Object(n.jsx)(C.a,{className:t.paper,style:{borderRadius:"0px 0px 3px 3px"},children:Object(n.jsxs)(x.a,{container:!0,children:[a?Object(n.jsx)(fd,{open:l,closeModal:function(){return d(!1),void r()}}):null,Object(n.jsxs)(x.a,{container:!0,item:!0,xs:12,className:t.tableContainer,children:[Object(n.jsxs)(x.a,{container:!0,item:!0,xs:12,children:[Object(n.jsx)(x.a,{item:!0,xs:3,className:t.detailsContainer}),dd.map((function(e){var a=!m&&"Community"===e.title||m&&m.plan.toLowerCase()===e.title.toLowerCase();return Object(n.jsxs)(x.a,{container:!0,item:!0,xs:3,className:Object(xe.a)(t.detailsContainer,t.detailsContainerBorder,Object(fe.a)({},t.detailsContainerBorderHighlighted,"Community"!==e.title),a?t.currentPlanBG:""),children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:a?t.activePlanHeader:t.planHeader,children:a?"Current Plan":"\xa0"}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.detailsTitle,children:e.title}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.detailsPrice,children:e.price}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.detailsCapacityMax,children:e.capacityMax||""})]},e.id)}))]}),bd.map((function(e){return Object(n.jsxs)(x.a,{container:!0,item:!0,xs:12,className:Object(xe.a)(t.itemContainer,e.communityDetail&&t.itemContainerDetail),children:[Object(n.jsx)(x.a,{item:!0,xs:3,className:Object(xe.a)(t.item,t.field,t.itemFirst),children:e.field}),Object(n.jsxs)(x.a,{container:!0,item:!0,xs:3,className:Object(xe.a)(t.item,0===f?t.currentPlanBG:""),children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:"N/A"===e.community?"":"Yes"===e.community?Object(n.jsx)(ld.a,{className:t.checkIcon}):e.community}),void 0!==e.communityDetail&&Object(n.jsx)(x.a,{item:!0,xs:12,children:e.communityDetail})]}),Object(n.jsx)(x.a,{container:!0,item:!0,xs:3,className:Object(xe.a)(t.item,t.itemHighlighted,1===f?t.currentPlanBG:""),children:Object(n.jsx)(x.a,{item:!0,xs:12,children:"N/A"===e.standard?"":"Yes"===e.standard?Object(n.jsx)(ld.a,{className:t.checkIcon}):e.standard})}),Object(n.jsx)(x.a,{container:!0,item:!0,xs:3,className:Object(xe.a)(t.item,t.itemHighlighted,2===f?t.currentPlanBG:""),children:Object(n.jsx)(x.a,{item:!0,xs:12,children:"N/A"===e.enterprise?"":"Yes"===e.enterprise?Object(n.jsx)(ld.a,{className:t.checkIcon}):e.enterprise})})]},e.id)})),Object(n.jsxs)(x.a,{container:!0,item:!0,xs:12,children:[Object(n.jsx)(x.a,{item:!0,xs:3,className:Object(xe.a)(t.buttonContainer,t.buttonContainerBlank)}),ud.map((function(e,c){return Object(n.jsxs)(x.a,{container:!0,item:!0,xs:3,style:{textAlign:"center"},className:Object(xe.a)(t.buttonContainer,f===c?t.currentPlanBG:"",Object(fe.a)({},t.buttonContainerHighlighted,"Subscribe"===e.text)),children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(g.a,{variant:"contained",color:"primary",className:Object(xe.a)(t.button,f===c?t.currentPlanButton:""),target:"_blank",rel:"noopener noreferrer",href:"#",disabled:m&&m.plan.toLowerCase()===e.plan.toLowerCase(),onClick:function(t){t.preventDefault(),window.open("".concat(e.link,"/?ref=").concat(a?"op":"con"),"_blank")},children:f!==c&&c>0?e.text2:e.text})}),a&&"Subscribe"===e.text&&!(m&&m.plan.toLowerCase()===e.plan.toLowerCase())&&Object(n.jsx)(x.a,{item:!0,xs:12,style:{marginTop:"10px"},children:Object(n.jsx)("button",{className:t.activateLink,onClick:function(e){e.preventDefault(),d(!0)},children:"Activate"})})]},e.id)}))]})]})]})})})]})]})})}))),vd=a(91),yd="TRACE_MESSAGE_RECEIVED",Sd="TRACE_RESET_MESSAGES";var Cd=function(e){var t="ws";return"https:"===e&&(t="wss"),t},kd=a(115),wd=a.n(kd),Nd=Object(s.b)((function(e){return{messages:e.trace.messages}}),{traceMessageReceived:function(e){return{type:yd,message:e}},traceResetMessages:function(){return{type:Sd}}})(Object(N.a)((function(e){return Object(k.a)(Object(j.a)({logList:{background:"white",height:"400px",overflow:"auto","& ul":{margin:"4px",padding:"0px"},"& ul li":{listStyle:"none",margin:"0px",padding:"0px",borderBottom:"1px solid #dedede"}},sizeItem:{width:150},timeItem:{width:100}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.traceMessageReceived,r=e.traceResetMessages,o=e.messages;return Object(c.useEffect)((function(){r();var e=new URL(window.location.toString()),t=e.port,n=Cd(e.protocol),c=new vd.w3cwebsocket("".concat(n,"://").concat(e.hostname,":").concat(t,"/ws/trace")),i=null;if(null!==c)return c.onopen=function(){console.log("WebSocket Client Connected"),c.send("ok"),i=setInterval((function(){c.send("ok")}),1e4)},c.onmessage=function(e){var t=JSON.parse(e.data.toString());t.ptime=wd()(t.time,"YYYY-MM-DD HH:mm:s.SSSS +0000 UTC").toDate(),t.key=Math.random(),a(t)},c.onclose=function(){clearInterval(i),console.log("connection closed by server")},function(){c.close(1e3),clearInterval(i),console.log("closing websockets")}}),[a,r]),Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(Ua,{label:"Trace"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:t.container,children:Object(n.jsx)(ua,{itemActions:[],columns:[{label:"Time",elementKey:"ptime",renderFunction:function(e){var t=new Date(e);return re(t)},globalClass:t.timeItem},{label:"Name",elementKey:"api"},{label:"Status",elementKey:"",renderFunction:function(e){return"".concat(e.statusCode," ").concat(e.statusMsg)},renderFullObject:!0},{label:"Location",elementKey:"configuration_id",renderFunction:function(e){return"".concat(e.host," ").concat(e.client)},renderFullObject:!0},{label:"Load Time",elementKey:"callStats.duration",globalClass:t.timeItem},{label:"Upload",elementKey:"callStats.rx",renderFunction:ce,globalClass:t.sizeItem},{label:"Download",elementKey:"callStats.tx",renderFunction:ce,globalClass:t.sizeItem}],isLoading:!1,records:o,entityName:"Traces",idField:"api",customEmptyMessage:"There are no traced Elements yet",autoScrollToBottom:!0})})})]})}))),Td="LOG_MESSAGE_RECEIVED",Ed="LOG_RESET_MESSAGES";var Ad=Object(s.b)((function(e){return{messages:e.logs.messages}}),{logMessageReceived:function(e){return{type:Td,message:e}},logResetMessages:function(){return{type:Ed}}}),_d=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({logList:{background:"#fff",minHeight:400,height:"calc(100vh - 304px)",overflow:"auto",fontSize:13,padding:"25px 45px 0",border:"1px solid #EAEDEE",borderRadius:4},tab:{paddingLeft:25},logerror:{color:"#A52A2A"},logerror_tab:{color:"#A52A2A",paddingLeft:25},ansidefault:{color:"#000"},highlight:{"& span":{backgroundColor:"#082F5238"}}},Ie),Fe),Pe))}))(Ad((function(e){var t=e.classes,a=e.logMessageReceived,i=e.logResetMessages,r=e.messages,o=Object(c.useState)(""),s=Object(u.a)(o,2),l=s[0],d=s[1];Object(c.useEffect)((function(){i();var e=new URL(window.location.toString()),t=e.port,n=Cd(e.protocol),c=new vd.w3cwebsocket("".concat(n,"://").concat(e.hostname,":").concat(t,"/ws/console")),r=null;if(null!==c)return c.onopen=function(){console.log("WebSocket Client Connected"),c.send("ok"),r=setInterval((function(){c.send("ok")}),1e4)},c.onmessage=function(e){var t=JSON.parse(e.data.toString());t.time=wd()(t.time,"HH:mm:s UTC MM/DD/YYYY").toDate(),t.key=Math.random(),a(t)},c.onclose=function(){clearInterval(r),console.log("connection closed by server")},function(){c.close(1e3),clearInterval(r),console.log("closing websockets")}}),[a,i]);var b=function(e){var a=e.ConsoleMsg,c=(a=a.replace(/([^\x20-\x7F])/g,"")).replace(/((\[[0-9;]+m))/g,""),i=""!==l&&a.toLowerCase().includes(l.toLowerCase());return c.startsWith(" ")?Object(n.jsx)("div",{className:"".concat(i?t.highlight:""),children:Object(n.jsx)("span",{className:t.tab,children:c})},e.key):null!==e.error&&void 0!==e.error?function(e){var a=[];if(null!==e.error&&void 0!==e.error){if(e.api&&e.api.name){var c="API: ".concat(e.api.name),i=""!==l&&c.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsxs)("div",{className:"".concat(i?t.highlight:""),children:[Object(n.jsx)("br",{}),Object(n.jsx)("span",{className:t.logerror,children:c})]},"api-".concat(e.key)))}if(e.time){var r="Time: ".concat(re(e.time)),o=""!==l&&r.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(o?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:r})},"time-".concat(e.key)))}if(e.deploymentid){var s="DeploymentID: ".concat(e.deploymentid),d=""!==l&&s.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(d?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:s})},"deploytmentid-".concat(e.key)))}if(e.requestID){var b="RequestID: ".concat(e.requestID),u=""!==l&&b.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(u?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:b})},"requestid-".concat(e.key)))}if(e.remotehost){var j="RemoteHost: ".concat(e.remotehost),m=""!==l&&j.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(m?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:j})},"remotehost-".concat(e.key)))}if(e.host){var h="Host: ".concat(e.host),p=""!==l&&h.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(p?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:h})},"host-".concat(e.key)))}if(e.userAgent){var O="UserAgent: ".concat(e.userAgent),g=""!==l&&O.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(g?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:O})},"useragent-".concat(e.key)))}if(e.error.message){var f="Error: ".concat(e.error.message),x=""!==l&&f.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(x?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:f})},"message-".concat(e.key)))}if(e.error.source)for(var v in e.error.source){var y=e.error.source[v],S=""!==l&&y.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(S?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror_tab,children:y})},"source-".concat(e.key,"-").concat(v)))}}return a}(e):Object(n.jsx)("div",{className:"".concat(i?t.highlight:""),children:Object(n.jsx)("span",{className:t.ansidefault,children:c})},e.key)},j=r.map((function(e){return b(e)}));return Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)(x.a,{container:!0,className:t.logsSubContainer,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.actionsTray,children:Object(n.jsx)(f.a,{placeholder:"Highlight Line",className:t.searchField,id:"search-resource",label:"",onChange:function(e){d(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.logList,children:j})})]})})}))),Id=a(993),Fd=Object(N.a)((function(e){return Object(k.a)({searchField:Object(j.a)(Object(j.a)({},Fe.searchField),{},{height:30,padding:0,"& input":{padding:"0 12px",height:28,fontSize:12,fontWeight:600,color:"#393939"},"&.isDisabled":{"&:hover":{borderColor:"#EAEDEE"}},"& input.Mui-disabled":{backgroundColor:"#EAEAEA"}}),labelStyle:{color:"#393939",fontSize:12,marginBottom:4},buttonKit:{display:"flex",alignItems:"center"},toggleButton:{marginRight:10},fieldContainer:{flexGrow:1,margin:"0 15px"}})}))((function(e){var t=e.classes,a=e.label,i=e.onChange,r=e.value,o=e.placeholder,s=void 0===o?"":o,l=e.id,d=e.name;return Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)("div",{className:t.fieldContainer,children:[Object(n.jsx)("div",{className:t.labelStyle,children:a}),Object(n.jsx)("div",{className:t.buttonKit,children:Object(n.jsx)(f.a,{placeholder:s,id:l,name:d,label:"",onChange:function(e){i(e.target.value)},InputProps:{disableUnderline:!0},className:t.searchField,value:r})})]})})})),Md={setErrorSnackMessage:V},Ld=Object(s.b)(null,Md),Dd=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({inputBar:{flexGrow:1,marginLeft:15},advancedLabel:{display:"flex",alignItems:"center",color:"#091C42",border:0,backgroundColor:"transparent",cursor:"pointer","&:focus, &:active":{outline:"none"}},advancedLabelContainer:{marginTop:10},getInformationContainer:{textAlign:"right"},orderButton:{width:93},recordsLabel:{alignSelf:"center",marginLeft:15},blockCollapsed:{height:0,overflowY:"hidden",transitionDuration:"0.3s"},filterOpen:{height:200,marginBottom:12},endLineAction:{marginBottom:15},filtersContainer:{display:"flex",justifyContent:"space-between",marginBottom:12},innerContainer:{backgroundColor:"#fff",border:"#EAEDEE 1px solid",borderRadius:3,padding:10,marginBottom:15},noticeLabel:{marginLeft:15,marginBottom:15,fontSize:12,color:"#9C9C9C"},tableFOpen:{height:"calc(100vh - 561px)"},tableFClosed:{height:"calc(100vh - 349px)"},"@global":{".overrideMargin":{marginLeft:0}}},Fe),Ie),Pe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Ld((function(e){var t=e.classes,a=e.setErrorSnackMessage,i=Object(c.useState)(!0),r=Object(u.a)(i,2),o=r[0],s=r[1],l=Object(c.useState)(null),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(null),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(!1),v=Object(u.a)(f,2),y=v[0],S=v[1],C=Object(c.useState)([]),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(""),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(""),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)(""),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Object(c.useState)(""),G=Object(u.a)(V,2),q=G[0],H=G[1],Y=Object(c.useState)(""),Q=Object(u.a)(Y,2),J=Q[0],$=Q[1],X=Object(c.useState)("DESC"),ee=Object(u.a)(X,2),te=ee[0],ae=ee[1],ne=Object(c.useState)(["time","api_name","bucket","object","remote_host","request_id","user_agent","response_status"]),ie=Object(u.a)(ne,2),re=ie[0],oe=ie[1],se=Object(c.useState)(0),le=Object(u.a)(se,2),de=le[0],be=le[1],ue=Object(c.useState)(!1),me=Object(u.a)(ue,2),pe=me[0],Oe=me[1],ge=null,fe=Object(c.useCallback)((function(){if(!pe){Oe(!0);var e="".concat(""!==A?"&fp=bucket:".concat(A):"").concat(""!==W?"&fp=object:".concat(W):"").concat(""!==M?"&fp=api_name:".concat(M):"").concat(""!==q?"&fp=request_id:".concat(q):"").concat(""!==R?"&fp=user_agent:".concat(R):"").concat(""!==J?"&fp=response_status:".concat(J):"");(e=e.trim()).endsWith(",")&&(e=e.slice(0,-1)),he.invoke("GET","/api/v1/logs/search?q=reqinfo".concat(""!==e?"".concat(e):"","&pageSize=100&pageNo=").concat(de,"&order=").concat("DESC"===te?"timeDesc":"timeAsc").concat(null!==b?"&timeStart=".concat(b.toISOString()):"").concat(null!==p?"&timeEnd=".concat(p.toISOString()):"")).then((function(e){var t=e.results||[],a=[].concat(Object(Je.a)(w),Object(Je.a)(t));s(!1),Oe(!1),N(a),be(de+1),null!==ge&&ge()})).catch((function(e){s(!1),Oe(!1),a(e)}))}}),[A,W,M,q,R,J,de,te,b,p,pe,w,ge,a]);Object(c.useEffect)((function(){o&&(N([]),fe())}),[o,te,fe]);return Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)(x.a,{container:!0,className:t.logsSubContainer,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(t.actionsTray," ").concat(t.timeContainers),children:[Object(n.jsx)("span",{className:t.label,children:"Start Time"}),Object(n.jsx)(Gc,{value:b,onChange:j}),Object(n.jsx)("span",{className:t.label,children:"End Time"}),Object(n.jsx)(Gc,{value:p,onChange:O})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:"".concat(t.advancedLabelContainer),children:Object(n.jsx)("div",{className:"".concat(t.blockCollapsed," ").concat(y?t.filterOpen:""),children:Object(n.jsxs)("div",{className:t.innerContainer,children:[Object(n.jsxs)("div",{className:t.noticeLabel,children:["Enable your preferred options to get filtered records.",Object(n.jsx)("br",{}),"You can use '*' to match any character, '.' to signify a single character or '\\' to scape an special character (E.g. mybucket-*)"]}),Object(n.jsxs)("div",{className:t.filtersContainer,children:[Object(n.jsx)(Fd,{onChange:_,value:A,label:"Bucket",id:"bucket",name:"bucket"}),Object(n.jsx)(Fd,{onChange:L,value:M,label:"API Name",id:"api_name",name:"api_name"}),Object(n.jsx)(Fd,{onChange:P,value:R,label:"User Agent",id:"user_agent",name:"user_agent"})]}),Object(n.jsxs)("div",{className:t.filtersContainer,children:[Object(n.jsx)(Fd,{onChange:U,value:W,label:"Object",id:"object",name:"object"}),Object(n.jsx)(Fd,{onChange:H,value:q,label:"Request ID",id:"request_id",name:"request_id"}),Object(n.jsx)(Fd,{onChange:$,value:J,label:"Response Status",id:"response_status",name:"response_status"})]})]})})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(t.actionsTray," ").concat(t.endLineAction),children:[Object(n.jsx)("div",{children:Object(n.jsxs)("button",{type:"button",className:"".concat(t.advancedLabel," overrideMargin"),onClick:function(){S(!y)},children:["Advanced Filters"," ",y?Object(n.jsx)(Id.a,{}):Object(n.jsx)(Kt.a,{})]})}),Object(n.jsx)(g.a,{type:"button",variant:"contained",color:"primary",onClick:function(){be(0),s(!0)},children:"Get Information"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{columns:[{label:"Timestamp",elementKey:"time",enableSort:!0},{label:"API Name",elementKey:"api_name"},{label:"Bucket",elementKey:"bucket"},{label:"Object",elementKey:"object"},{label:"Remote Host",elementKey:"remote_host"},{label:"Request ID",elementKey:"request_id"},{label:"User Agent",elementKey:"user_agent"},{label:"Response Status",elementKey:"response_status",renderFunction:function(e){return Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)("span",{children:[e.response_status_code," (",e.response_status,")"]})})},renderFullObject:!0},{label:"Request Content Length",elementKey:"request_content_length",renderFunction:ce},{label:"Response Content Length",elementKey:"response_content_length",renderFunction:ce},{label:"Time to Response NS",elementKey:"time_to_response_ns",renderFunction:je,contentTextAlign:"right"}],isLoading:o,records:w,entityName:"Logs",customEmptyMessage:"There is no information with this criteria",idField:"request_id",columnsSelector:!0,columnsShown:re,onColumnChange:function(e,t){var a=Object(Je.a)(re);t?a.includes(e)||a.push(e):a=re.filter((function(t){return t!==e})),oe(a)},customPaperHeight:y?t.tableFOpen:t.tableFClosed,sortConfig:{currentSort:"time",currentDirection:te,triggerSort:function(e){var t=Z()(e,"sortDirection","DESC");ae(t),be(0),s(!0)}},infiniteScrollConfig:{recordsCount:1e6,loadMoreRecords:function(e){return fe(),new Promise((function(e){ge=e}))}},textSelectable:!0})})]})})}))),Bd=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=Object(c.useState)(0),i=Object(u.a)(a,2),r=i[0],o=i[1],s=Object(c.useState)(!0),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(!1),m=Object(u.a)(j,2),h=m[0],p=m[1];return Object(c.useEffect)((function(){he.invoke("GET","/api/v1/logs/search?q=reqinfo&pageSize=10&pageNo=0").then((function(){p(!0),b(!1)})).catch((function(e){b(!1),console.info("Log Search API not available.")}))}),[d]),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(Ua,{label:"Logs"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:t.container,children:d?Object(n.jsx)(y.a,{}):Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.headerLabel,children:"All Logs"}),Object(n.jsxs)(tn.a,{value:r,onChange:function(e,t){o(t)},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(n.jsx)(an.a,{label:"Error Logs"}),h&&Object(n.jsx)(an.a,{label:"Logs Search"})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[0===r&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(_d,{})}),1===r&&h&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Dd,{})})]})]})})})]})})),Rd=a(442),Pd=Object(N.a)((function(e){return Object(k.a)({root:{width:450,lineHeight:"50px",marginRight:15,"label + &":{marginTop:e.spacing(3)},"& .MuiSelect-select:focus":{backgroundColor:"transparent"}},input:{height:50,fontSize:13,lineHeight:"50px",width:450}})}))(ya.a),zd=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({watchList:{background:"white",maxHeight:"400",overflow:"auto","& ul":{margin:"4",padding:"0"},"& ul li":{listStyle:"none",margin:"0",padding:"0",borderBottom:"1px solid #dedede"}},graphContainer:{backgroundColor:"#fff",border:"#EAEDEE 1px solid",borderRadius:3,padding:"19px 38px"},scanInfo:{marginTop:20,display:"flex",flexDirection:"row",justifyContent:"space-between"},scanData:{fontSize:13},inlineCheckboxes:{display:"flex",justifyContent:"flex-start"}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=Object(c.useState)(!1),r=Object(u.a)(a,2),o=r[0],s=r[1],l=Object(c.useState)(""),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)([]),h=Object(u.a)(m,2),p=h[0],O=h[1],v=Object(c.useState)(""),y=Object(u.a)(v,2),S=y[0],C=y[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(!1),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(!1),M=Object(u.a)(F,2),L=M[0],D=M[1],B=Object(c.useState)({beforeHeal:[0,0,0,0],afterHeal:[0,0,0,0],objectsHealed:0,objectsScanned:0,healDuration:0,sizeScanned:""}),R=Object(u.a)(B,2),P=R[0],z=R[1];Object(c.useEffect)((function(){he.invoke("GET","/api/v1/buckets").then((function(e){var t=[];null!==e.buckets&&(t=e.buckets),O(t)})).catch((function(e){console.log(e)}))}),[]),Object(c.useEffect)((function(){!0===_&&D(!1)}),[_]),Object(c.useEffect)((function(){!0===L&&I(!1)}),[L]);var K=function(e){return[e.Green,e.Yellow,e.Red,e.Grey]};Object(c.useEffect)((function(){if(o){var e={Green:0,Yellow:0,Red:0,Grey:0},t={Green:0,Yellow:0,Red:0,Grey:0},a=new URL(window.location.toString()),n=a.port,c=Cd(a.protocol),i=new vd.w3cwebsocket("".concat(c,"://").concat(a.hostname,":").concat(n,"/ws/heal/").concat(b,"?prefix=").concat(S,"&recursive=").concat(N,"&force-start=").concat(_,"&force-stop=").concat(L));if(null!==i)return i.onopen=function(){console.log("WebSocket Client Connected"),i.send("ok")},i.onmessage=function(a){for(var n=JSON.parse(a.data.toString()),c=0,i=Object.entries(n.healthAfterCols);c1?"s":""),content:r.join(", ")}),Object(n.jsx)("br",{})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"force",id:"force",name:"force",checked:v,onChange:function(e){S(e.target.checked)},label:"Force Format",indicatorLabels:["Yes","No"]})}),"Are you sure you want to format"," ",i?Object(n.jsx)("strong",{children:"All"}):"the selected"," drive",r.length>1||i?"s":"","?.",Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)("strong",{children:"All information contained will be erased and cannot be recovered"}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),"To continue please type ",Object(n.jsx)("b",{children:"YES, PROCEED"})," in the box.",Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"format-confirm",name:"format-confirm",onChange:function(e){p(e.target.value)},label:"",value:h})})]})}),d&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1,[])},color:"primary",disabled:d,children:"Cancel"}),Object(n.jsxs)(g.a,{onClick:function(){d||(b(!0),he.invoke("POST","/api/v1/direct-csi/drives/format",{drives:r,force:v}).then((function(e){b(!1),t(!0,e.formatIssuesList)})).catch((function(e){b(!1),o(e)})))},color:"secondary",autoFocus:!0,disabled:"YES, PROCEED"!==h,children:["Format Drive",r.length>1||i?"s":""]})]})]})})),nb=Object(N.a)((function(e){return Object(k.a)({warningBlock:{color:"red"},buttonContainer:{textAlign:"right"},errorsList:{height:"calc(100vh - 280px)"}})}))((function(e){var t=e.open,a=e.onCloseFormatErrorsList,c=e.errorsList,i=e.classes;return Object(n.jsx)(ga,{modalOpen:t,title:"Format Errors",onClose:a,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:i.formScrollable,children:["There were some issues trying to format the selected CSI Drives, please fix the issues and try again.",Object(n.jsx)("br",{}),Object(n.jsx)(ua,{columns:[{label:"Node",elementKey:"node"},{label:"Drive",elementKey:"drive"},{label:"Message",elementKey:"error"}],entityName:"Format Errors",idField:"drive",records:c,isLoading:!1,customPaperHeight:i.errorsList,textSelectable:!0,noBackground:!0})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:i.buttonContainer,children:[Object(n.jsx)(g.a,{onClick:function(){!function(e,t){var a=document.createElement("a");a.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(t)),console.log(e),a.setAttribute("download",e),a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a)}("csiFormatErrors.json",JSON.stringify(Object(Je.a)(c)))},color:"primary",children:"Download"}),Object(n.jsx)(g.a,{onClick:a,color:"secondary",autoFocus:!0,children:"Done"})]})]})})})),cb={setErrorSnackMessage:V,selectDrive:function(e){return{type:eb,driveName:e}}},ib=Object(s.b)(null,cb),rb=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4},tableWrapper:{height:"calc(100vh - 275px)"},notAvailableNotice:{border:"#EAEDEE 1px solid",backgroundColor:"#FFF",display:"flex",padding:"19px 38px",overflow:"auto",position:"relative",boxShadow:"none",minHeight:200,overflowY:"scroll",borderRadius:3,flexDirection:"column",alignItems:"center",justifyContent:"center",height:"calc(100vh - 275px)",fontSize:18,fontWeight:600,textAlign:"center"},linkItem:{display:"default",color:"#072F51",textDecoration:"none","&:hover":{textDecoration:"underline",color:"#000"}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(ib((function(e){var t=e.classes,a=(e.selectDrive,e.setErrorSnackMessage),i=Object(c.useState)([]),r=Object(u.a)(i,2),o=r[0],s=r[1],l=Object(c.useState)(""),d=Object(u.a)(l,2),b=d[0],m=d[1],h=Object(c.useState)([]),p=Object(u.a)(h,2),O=p[0],v=p[1],y=Object(c.useState)(!0),S=Object(u.a)(y,2),C=S[0],k=S[1],w=Object(c.useState)(!1),N=Object(u.a)(w,2),T=N[0],E=N[1],A=Object(c.useState)(!1),_=Object(u.a)(A,2),I=_[0],F=_[1],M=Object(c.useState)([]),L=Object(u.a)(M,2),D=L[0],B=L[1],R=Object(c.useState)(!1),P=Object(u.a)(R,2),z=P[0],K=P[1],W=Object(c.useState)([]),U=Object(u.a)(W,2),V=U[0],G=U[1],q=Object(c.useState)(!0),H=Object(u.a)(q,2),Y=H[0],Q=H[1];Object(c.useEffect)((function(){C&&!Y&&he.invoke("GET","/api/v1/direct-csi/drives").then((function(e){var t=Z()(e,"drives",[]);t||(t=[]),(t=t.map((function(e){var t=Object(j.a)({},e);return t.joinName="".concat(t.node,":").concat(t.drive),t}))).sort((function(e,t){return e.drive>t.drive?1:e.drive0&&(B(t),K(!0)),k(!0),v([]))},deleteOpen:T,allDrives:I,drivesToFormat:V}),z&&Object(n.jsx)(nb,{errorsList:D,open:z,onCloseFormatErrorsList:function(){K(!1)}}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Drives",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){m(e.target.value)},disabled:Y}),Object(n.jsx)(Mt.a,{color:"primary","aria-label":"Refresh Tenant List",component:"span",onClick:function(){k(!0)},disabled:Y,children:Object(n.jsx)(xo.a,{})}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(zi.a,{}),disabled:O.length<=0||Y,onClick:function(){O.length>0&&(G(O),F(!1),E(!0))},children:"Format Selected Drives"}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){var e=o.map((function(e){return"".concat(e.node,":").concat(e.drive)}));F(!0),G(e),E(!0)},disabled:Y,children:"Format All Drives"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Y?Object(n.jsxs)("div",{className:t.notAvailableNotice,children:["To manage locally attached drives you need to install direct-csi, for more information",Object(n.jsx)("br",{}),"please follow this",Object(n.jsx)("a",{href:"https://github.com/minio/direct-csi",rel:"noreferrer",target:"_blank",className:t.linkItem,children:"Link"})]}):Object(n.jsx)(ua,{itemActions:J,columns:[{label:"Drive",elementKey:"drive"},{label:"Capacity",elementKey:"capacity",renderFunction:ce},{label:"Allocated",elementKey:"allocated",renderFunction:ce},{label:"Volumes",elementKey:"volumes"},{label:"Node",elementKey:"node"},{label:"Status",elementKey:"status"}],onSelect:function(e){var t=e.target,a=t.value,n=t.checked,c=Object(Je.a)(O);return n?c.push(a):c=c.filter((function(e){return e!==a})),v(c),c},selectedItems:O,isLoading:C,records:$,customPaperHeight:t.tableWrapper,entityName:"Drives",idField:"joinName"})})]})}))),ob=["/storage/volumes","/storage/drives"],sb=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4},tabsContainer:{marginBottom:15}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.match,i=Object(c.useState)(0),r=Object(u.a)(i,2),o=r[0],s=r[1];Object(c.useEffect)((function(){var e=ob.findIndex((function(e){return e===a.path}));s(e)}),[a]);return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(Ua,{label:"Storage"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.tabsContainer,children:Object(n.jsxs)(tn.a,{value:o,onChange:function(e,t){b.push(ob[t])},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",children:[Object(n.jsx)(an.a,{label:"Volumes"}),Object(n.jsx)(an.a,{label:"Drives"})]})}),Object(n.jsx)(l.c,{history:b,children:Object(n.jsxs)(l.d,{children:[Object(n.jsx)(l.b,{path:ob[0],component:Xd}),Object(n.jsx)(l.b,{path:ob[1],component:rb}),Object(n.jsx)(l.b,{render:function(){return Object(n.jsx)(l.a,{to:"/storage/volumes"})}})]})})]})})]})})),lb=Object(s.b)((function(e){return{open:e.system.sidebarOpen,needsRestart:e.system.serverNeedsRestart,isServerLoading:e.system.serverIsLoading,session:e.console.session,loadingProgress:e.system.loadingProgress,snackBarMessage:e.system.snackBar}}),{setMenuOpen:z,serverNeedsRestart:K,serverIsLoading:function(e){return{type:I,isLoading:e}},setSnackBarMessage:U}),db=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({root:{display:"flex","& .MuiPaper-root.MuiSnackbarContent-root":{borderRadius:"0px 0px 5px 5px",boxShadow:"none"}},toolbar:{background:e.palette.background.default,color:"black",paddingRight:24},toolbarIcon:Object(j.a)({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"0 8px"},e.mixins.toolbar),appBar:{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})},appBarShift:{marginLeft:245,width:"calc(100% - ".concat(245,"px)"),transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})},menuButton:{marginRight:36},menuButtonHidden:{display:"none"},title:{flexGrow:1},drawerPaper:{position:"relative",whiteSpace:"nowrap",width:245,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden",background:"transparent linear-gradient(90deg, #073052 0%, #081C42 100%) 0% 0% no-repeat padding-box",boxShadow:"0px 3px 7px #00000014"},drawerPaperClose:Object(fe.a)({overflowX:"hidden",transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),width:e.spacing(7)},e.breakpoints.up("sm"),{width:e.spacing(9)}),content:{flexGrow:1,height:"100vh",overflow:"auto",position:"relative"},container:{paddingBottom:e.spacing(4),margin:0,width:"100%",maxWidth:"initial"},paper:{padding:e.spacing(2),display:"flex",overflow:"auto",flexDirection:"column"},fixedHeight:{minHeight:240},warningBar:{background:e.palette.primary.main,color:"white",heigh:"60px",widht:"100%",lineHeight:"60px",textAlign:"center"},progress:{height:"3px",backgroundColor:"#eaeaea"}},We))}))(lb((function(e){var t=e.classes,a=e.open,i=e.needsRestart,r=e.isServerLoading,o=e.serverNeedsRestart,s=e.serverIsLoading,d=e.session,m=e.loadingProgress,h=e.snackBarMessage,p=e.setSnackBarMessage,O=Object(c.useState)(!1),f=Object(u.a)(O,2),x=f[0],v=f[1],S=d.pages.reduce((function(e,t,a){return e[t]=!0,e}),{}),C=[{component:Xc,path:"/dashboard"},{component:Xn,path:"/buckets"},{component:Xn,path:"/buckets/:bucketName"},{component:vl,path:"/object-browser"},{component:od,path:"/object-browser/:bucket"},{component:od,path:"/object-browser/:bucket/*"},{component:Vd,path:"/watch"},{component:vr,path:"/users/:userName"},{component:vr,path:"/users"},{component:Fr,path:"/groups"},{component:sc,path:"/policies/:policyName"},{component:sc,path:"/policies"},{component:zd,path:"/heal"},{component:Nd,path:"/trace"},{component:Bd,path:"/logs"},{component:Zd,path:"/health-info"},{component:Po,path:"/settings"},{component:Ri,path:"/account",props:{changePassword:d.pages.includes("/account/change-password")}},{component:Uo,path:"/webhook/logger"},{component:Uo,path:"/webhook/audit"},{component:Ks,path:"/tenants"},{component:sb,path:"/storage"},{component:sb,path:"/storage/volumes"},{component:sb,path:"/storage/drives"},{component:al,path:"/namespaces/:tenantNamespace/tenants/:tenantName"},{component:xd,path:"/license"}].filter((function(e){return S[e.path]}));return Object(c.useEffect)((function(){""!==h.message?v(!0):v(!1)}),[h]),Object(n.jsx)(c.Fragment,{children:"ok"===d.status?Object(n.jsxs)("div",{className:t.root,children:[Object(n.jsx)(ve.a,{}),Object(n.jsx)(ye.a,{variant:"permanent",classes:{paper:Object(xe.a)(t.drawerPaper,!a&&t.drawerPaperClose)},open:a,children:Object(n.jsx)(yi,{pages:d.pages})}),Object(n.jsxs)("main",{className:t.content,children:[i&&Object(n.jsx)("div",{className:t.warningBar,children:r?Object(n.jsxs)(c.Fragment,{children:["The server is restarting.",Object(n.jsx)(y.a,{className:t.progress})]}):Object(n.jsxs)(c.Fragment,{children:["The instance needs to be restarted for configuration changes to take effect."," ",Object(n.jsx)(g.a,{color:"secondary",size:"small",onClick:function(){s(!0),he.invoke("POST","/api/v1/service/restart",{}).then((function(e){console.log("success restarting service"),console.log(e),s(!1),o(!1)})).catch((function(e){s(!1),console.log("failure restarting service"),console.log(e)}))},children:"Restart"})]})}),m<100&&Object(n.jsx)(y.a,{className:t.progress,variant:"determinate",value:m}),Object(n.jsx)("div",{className:t.snackDiv,children:Object(n.jsx)(Ce.a,{open:x,onClose:function(){v(!1),p("")},autoHideDuration:"error"===h.type?1e4:5e3,message:h.message,className:t.snackBarExternal,ContentProps:{className:"".concat(t.snackBar," ").concat("error"===h.type?t.errorSnackBar:"")}})}),Object(n.jsx)(Se.a,{className:t.container,children:Object(n.jsx)(l.c,{history:b,children:Object(n.jsxs)(l.d,{children:[C.map((function(e){return Object(n.jsx)(l.b,{exact:!0,path:e.path,children:function(t){return Object(n.jsx)(e.component,Object(j.a)(Object(j.a)({},t),e.props))}},e.path)})),C.length>0?Object(n.jsx)(l.a,{to:C[0].path}):null]})})})]})]}):null})}))),bb=function(e){var t=e.location,a=Object(c.useState)(""),i=Object(u.a)(a,2),r=i[0],o=i[1],s=Object(c.useState)(""),l=Object(u.a)(s,2),d=l[0],b=l[1];return Object(c.useEffect)((function(){var e=(t.search.match(/code=([^&]+)/)||[])[1],a=(t.search.match(/state=([^&]+)/)||[])[1],n=(t.search.match(/error=([^&]+)/)||[])[1],c=(t.search.match(/error_description=([^&]+)/)||[])[1];void 0!==n||void 0!==c?(o(n),b(c)):he.invoke("POST","/api/v1/login/oauth2/auth",{code:e,state:a}).then((function(e){e&&e.sessionId&&($.a.setItem("token",e.sessionId),window.location.href="/")})).catch((function(e){window.location.href="/login"}))}),[t.search]),""!==r||""!==d?Object(n.jsxs)("div",{children:[Object(n.jsx)("h2",{children:"IDP Error:"}),Object(n.jsx)("p",{children:r}),Object(n.jsx)("p",{children:d})]}):null},ub=a(443),jb="SESSION_RESPONSE";var mb=Object(s.b)((function(e){return{loggedIn:e.system.loggedIn}}),{userLoggedIn:P,consoleOperatorMode:function(e){return{type:E,operatorMode:e}},saveSessionResponse:function(e){return{type:jb,message:e}}})((function(e){var t=e.Component,a=e.loggedIn,i=e.userLoggedIn,r=e.consoleOperatorMode,o=e.saveSessionResponse,s=Object(c.useState)(!0),d=Object(u.a)(s,2),b=d[0],j=d[1];return Object(c.useEffect)((function(){he.invoke("GET","/api/v1/session").then((function(e){o(e),i(!0),j(!1),e.operator&&(r(!0),document.title="MinIO Operator")})).catch((function(){return j(!1)}))}),[o,r,i]),b?null:a?Object(n.jsx)(t,{}):Object(n.jsx)(l.a,{to:{pathname:"/login"}})})),hb=Object(ub.hot)((function(){return Object(n.jsx)(l.c,{history:b,children:Object(n.jsxs)(l.d,{children:[Object(n.jsx)(l.b,{exact:!0,path:"/oauth_callback",component:bb}),Object(n.jsx)(l.b,{exact:!0,path:"/login",component:ge}),Object(n.jsx)(mb,{Component:db})]})})})),pb=a(138),Ob=a(444),gb={loggedIn:!1,operatorMode:!1,session:"",userName:"",sidebarOpen:!0,serverNeedsRestart:!1,serverIsLoading:!1,loadingProgress:100,snackBar:{message:"",type:"message"},modalSnackBar:{message:"",type:"message"},serverDiagnosticStatus:""};var fb={messages:[]};var xb={messages:[]};var vb={message:{}};var yb={messages:[]};var Sb={session:{operator:!1,status:"",pages:[],features:[]}};var Cb={open:!1,addBucketName:"",addBucketVersioningEnabled:!1,addBucketLockingEnabled:!1,addBucketQuotaEnabled:!1,addBucketQuotaType:"hard",addBucketQuotaSize:"1",addBucketQuotaUnit:"TiB",addBucketRetentionEnabled:!1,addBucketRetentionMode:"compliance",addBucketRetentionUnit:"days",addBucketRetentionValidity:1};var kb=[{route:"/object-browser",label:"All Buckets",type:"path"}],wb={routesList:kb,downloadingFiles:[]};var Nb=a(445),Tb=a.n(Nb),Eb={createTenant:{page:0,validPages:[],advancedModeOn:!1,storageClasses:[],limitSize:{},fields:{nameTenant:{tenantName:"",namespace:"",selectedStorageClass:""},configure:{customImage:!1,imageName:"",consoleImage:"",customDockerhub:!1,imageRegistry:"",imageRegistryUsername:"",imageRegistryPassword:"",exposeMinIO:!0,exposeConsole:!0,logSearchCustom:!1,prometheusCustom:!1,logSearchVolumeSize:"5",logSearchSizeFactor:"Gi",logSearchImage:"",kesImage:"",logSearchPostgresImage:"",prometheusVolumeSize:"5",prometheusSizeFactor:"Gi",logSearchSelectedStorageClass:"",prometheusSelectedStorageClass:"",prometheusImage:""},identityProvider:{idpSelection:"Built-in",accessKeys:[ps(16)],secretKeys:[ps(32)],openIDURL:"",openIDClientID:"",openIDSecretID:"",ADURL:"",ADSkipTLS:!1,ADServerInsecure:!1,ADUserNameFilter:"",ADGroupBaseDN:"",ADGroupSearchFilter:"",ADNameAttribute:""},security:{enableAutoCert:!0,enableCustomCerts:!1,enableTLS:!0},encryption:{enableEncryption:!1,encryptionType:"vault",gemaltoEndpoint:"",gemaltoToken:"",gemaltoDomain:"",gemaltoRetry:"0",awsEndpoint:"",awsRegion:"",awsKMSKey:"",awsAccessKey:"",awsSecretKey:"",awsToken:"",vaultEndpoint:"",vaultEngine:"",vaultNamespace:"",vaultPrefix:"",vaultAppRoleEngine:"",vaultId:"",vaultSecret:"",vaultRetry:"0",vaultPing:"0",gcpProjectID:"",gcpEndpoint:"",gcpClientEmail:"",gcpClientID:"",gcpPrivateKeyID:"",gcpPrivateKey:"",enableCustomCertsForKES:!1},tenantSize:{volumeSize:"100",sizeFactor:"Gi",drivesPerServer:"1",nodes:"4",memoryNode:"2",ecParity:"",ecParityChoices:[],cleanECChoices:[],maxAllocableMemo:0,memorySize:{error:"",limit:0,request:0},distribution:{error:"",nodes:0,persistentVolumes:0,disks:0,volumePerDisk:0},ecParityCalc:{error:0,defaultEC:"",erasureCodeSet:0,maxEC:"",rawCapacity:"0",storageFactors:[]},limitSize:{}},affinity:{nodeSelectorLabels:"",podAffinity:"default",withPodAntiAffinity:!0}},certificates:{minioCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],caCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],consoleCertificate:{id:"console_cert_pair",key:"",cert:"",encoded_key:"",encoded_cert:""},serverCertificate:{id:"encryptionServerCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},clientCertificate:{id:"encryptionClientCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},vaultCertificate:{id:"encryptionVaultCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},vaultCA:{id:"encryptionVaultCA",key:"",cert:"",encoded_key:"",encoded_cert:""},gemaltoCA:{id:"encryptionGemaltoCA",key:"",cert:"",encoded_key:"",encoded_cert:""}}}};var Ab={selectedDrive:""};var _b=Object(pb.c)({system:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case T:return Object(j.a)(Object(j.a)({},e),{},{loggedIn:t.logged});case E:return Object(j.a)(Object(j.a)({},e),{},{operatorMode:t.operatorMode});case A:return Object(j.a)(Object(j.a)({},e),{},{sidebarOpen:t.open});case _:return Object(j.a)(Object(j.a)({},e),{},{serverNeedsRestart:t.needsRestart});case I:return Object(j.a)(Object(j.a)({},e),{},{serverIsLoading:t.isLoading});case F:return Object(j.a)(Object(j.a)({},e),{},{loadingProgress:t.loadingProgress});case M:return Object(j.a)(Object(j.a)({},e),{},{snackBar:{message:t.message,type:"message"}});case D:return Object(j.a)(Object(j.a)({},e),{},{snackBar:{message:t.message,type:"error"}});case B:return Object(j.a)(Object(j.a)({},e),{},{modalSnackBar:{message:t.message,type:"message"}});case R:return Object(j.a)(Object(j.a)({},e),{},{modalSnackBar:{message:t.message,type:"error"}});case L:return Object(j.a)(Object(j.a)({},e),{},{serverDiagnosticStatus:t.serverDiagnosticStatus});default:return e}},trace:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case yd:return Object(j.a)(Object(j.a)({},e),{},{messages:[].concat(Object(Je.a)(e.messages),[t.message])});case Sd:return Object(j.a)(Object(j.a)({},e),{},{messages:[]});default:return e}},logs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Td:return Object(j.a)(Object(j.a)({},e),{},{messages:[].concat(Object(Je.a)(e.messages),[t.message])});case Ed:return Object(j.a)(Object(j.a)({},e),{},{messages:[]});default:return e}},watch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Kd:return Object(j.a)(Object(j.a)({},e),{},{messages:[].concat(Object(Je.a)(e.messages),[t.message])});case Wd:return Object(j.a)(Object(j.a)({},e),{},{messages:[]});default:return e}},console:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Sb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case jb:return Object(j.a)(Object(j.a)({},e),{},{session:t.message});default:return e}},buckets:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ft:return Object(j.a)(Object(j.a)({},e),{},{open:t.open});case xt:return Object(j.a)(Object(j.a)({},e),{},{addBucketName:t.name});case vt:return Object(j.a)(Object(j.a)({},e),{},{addBucketVersioningEnabled:t.versioned});case yt:return Object(j.a)(Object(j.a)({},e),{},{addBucketLockingEnabled:t.locking});case St:return Object(j.a)(Object(j.a)({},e),{},{addBucketQuotaEnabled:t.quota});case Ct:return Object(j.a)(Object(j.a)({},e),{},{addBucketQuotaType:t.quotaType});case kt:return Object(j.a)(Object(j.a)({},e),{},{addBucketQuotaSize:t.quotaSize});case wt:return Object(j.a)(Object(j.a)({},e),{},{addBucketQuotaUnit:t.quotaUnit});case Tt:return Object(j.a)(Object(j.a)({},e),{},{addBucketRetentionEnabled:t.retention});case Et:return Object(j.a)(Object(j.a)({},e),{},{addBucketRetentionMode:t.retentionMode});case At:return Object(j.a)(Object(j.a)({},e),{},{addBucketRetentionUnit:t.retentionUnit});case _t:return Object(j.a)(Object(j.a)({},e),{},{addBucketRetentionValidity:t.retentionValidity});case Nt:return Object(j.a)(Object(j.a)({},e),{},{addBucketName:"",addBucketVersioningEnabled:!1,addBucketLockingEnabled:!1,addBucketQuotaEnabled:!1,addBucketQuotaType:"hard",addBucketQuotaSize:"1",addBucketQuotaUnit:"TiB",addBucketRetentionEnabled:!1,addBucketRetentionMode:"compliance",addBucketRetentionUnit:"days",addBucketRetentionValidity:1});default:return e}},objectBrowser:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case nl:var a=[].concat(Object(Je.a)(e.routesList),[{route:t.route,label:t.label,type:t.routeType}]);return b.push(t.route),Object(j.a)(Object(j.a)({},e),{},{routesList:a});case cl:return Object(j.a)(Object(j.a)({},e),{},{routesList:[].concat(kb)});case il:var n=e.routesList.findIndex((function(e){return e.route===t.toRoute}))+1,c=e.routesList.slice(0,n);return Object(j.a)(Object(j.a)({},e),{},{routesList:c});case rl:var i=t.currentRoute.split("/"),r=[],o=kb[0].route;i.forEach((function(e){""!==e&&"object-browser"!==e&&(o="".concat(o,"/").concat(e),r.push({route:o,label:e,type:"path"}))}));var s=[].concat(kb,r);return Object(j.a)(Object(j.a)({},e),{},{routesList:s});case ol:var l=Object(Je.a)(e.routesList),d=e.routesList[e.routesList.length-1].route,u=t.newRoute.split("/");return u.forEach((function(e){var t=e.trim();if(""!==t){var a={route:d="".concat(d,"/").concat(t),label:t,type:"path"};l.push(a)}})),b.push(d),Object(j.a)(Object(j.a)({},e),{},{routesList:l});case sl:var m=e.routesList,h=m.slice(-1)[0];"path"===h.type&&(h.type="file");var p=[].concat(Object(Je.a)(m.slice(0,-1)),[h]);return Object(j.a)(Object(j.a)({},e),{},{routesList:p});case ll:var O=Object(Je.a)(e.downloadingFiles);return O.push(t.path),Object(j.a)(Object(j.a)({},e),{},{downloadingFiles:Object(Je.a)(O)});case dl:var g=e.downloadingFiles.filter((function(e){return e!==t.path}));return Object(j.a)(Object(j.a)({},e),{},{downloadingFiles:Object(Je.a)(g)});default:return e}},healthInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Gd:return Object(j.a)(Object(j.a)({},e),{},{message:t.message});case qd:return Object(j.a)(Object(j.a)({},e),{},{message:{}});default:return e}},tenants:function(){var e,t,a,n,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Eb,i=arguments.length>1?arguments[1]:void 0,r=Object(j.a)({},c);switch(i.type){case Ho:return r.createTenant.page=i.page,Object(j.a)({},r);case Yo:return r.createTenant.advancedModeOn=i.state,Object(j.a)({},r);case Qo:if(Tb()(r.createTenant.fields,"".concat(i.pageName,".").concat(i.field))){var o=Z()(r.createTenant.fields,"".concat(i.pageName),{}),s={};s[i.field]=i.value;var l=Object(j.a)(Object(j.a)({},o),s);return r.createTenant.fields[i.pageName]=Object(j.a)({},l),Object(j.a)({},r)}return c;case Zo:var d=c.createTenant.validPages;if(i.valid)d.includes(i.pageName)||(d.push(i.pageName),r.createTenant.validPages=Object(Je.a)(d));else{var b=d.filter((function(e){return e!==i.pageName}));r.createTenant.validPages=Object(Je.a)(b)}return Object(j.a)({},r);case $o:var u=Object(j.a)(Object(j.a)({},c),{},{createTenant:Object(j.a)(Object(j.a)({},c.createTenant),{},{storageClasses:i.storageClasses})});return Object(j.a)({},u);case Xo:var m=[].concat(Object(Je.a)(c.createTenant.certificates.minioCertificates),[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}]);return r.createTenant.certificates.minioCertificates=Object(Je.a)(m),Object(j.a)({},r);case es:var h=c.createTenant.certificates.minioCertificates,p=h.map((function(e){var t;return e.id===i.id?Object(j.a)(Object(j.a)({},e),{},(t={},Object(fe.a)(t,i.key,i.fileName),Object(fe.a)(t,"encoded_".concat(i.key),i.value),t)):e}));return r.createTenant.certificates.minioCertificates=Object(Je.a)(p),Object(j.a)({},r);case ts:var O=c.createTenant.certificates.minioCertificates;if(O.length>1){var g=O.filter((function(e){return e.id!==i.id}));return r.createTenant.certificates.minioCertificates=Object(Je.a)(g),Object(j.a)({},r)}return Object(j.a)({},c);case as:var f=[].concat(Object(Je.a)(c.createTenant.certificates.caCertificates),[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}]);return r.createTenant.certificates.caCertificates=Object(Je.a)(f),Object(j.a)({},r);case ns:var x=c.createTenant.certificates.caCertificates,v=x.map((function(e){var t;return e.id===i.id?Object(j.a)(Object(j.a)({},e),{},(t={},Object(fe.a)(t,i.key,i.fileName),Object(fe.a)(t,"encoded_".concat(i.key),i.value),t)):e}));return r.createTenant.certificates.caCertificates=Object(Je.a)(v),Object(j.a)({},r);case cs:var y=c.createTenant.certificates.minioCertificates;if(y.length>1){var S=y.filter((function(e){return e.id!==i.id}));return r.createTenant.certificates.caCertificates=Object(Je.a)(S),Object(j.a)({},r)}return Object(j.a)({},c);case is:var C=c.createTenant.certificates.consoleCertificate;return r.createTenant.certificates.consoleCertificate=Object(j.a)(Object(j.a)({},C),{},(e={},Object(fe.a)(e,i.key,i.fileName),Object(fe.a)(e,"encoded_".concat(i.key),i.value),e)),Object(j.a)({},r);case rs:var k=c.createTenant.certificates.serverCertificate;return r.createTenant.certificates.serverCertificate=Object(j.a)(Object(j.a)({},k),{},(t={},Object(fe.a)(t,i.key,i.fileName),Object(fe.a)(t,"encoded_".concat(i.key),i.value),t)),Object(j.a)({},r);case os:var w=c.createTenant.certificates.clientCertificate;return r.createTenant.certificates.clientCertificate=Object(j.a)(Object(j.a)({},w),{},(a={},Object(fe.a)(a,i.key,i.fileName),Object(fe.a)(a,"encoded_".concat(i.key),i.value),a)),Object(j.a)({},r);case ss:var N=c.createTenant.certificates.vaultCertificate;return r.createTenant.certificates.vaultCertificate=Object(j.a)(Object(j.a)({},N),{},(n={},Object(fe.a)(n,i.key,i.fileName),Object(fe.a)(n,"encoded_".concat(i.key),i.value),n)),Object(j.a)({},r);case ls:var T=c.createTenant.certificates.vaultCA;return r.createTenant.certificates.vaultCA=Object(j.a)(Object(j.a)({},T),{},{cert:i.fileName,encoded_cert:i.value}),Object(j.a)({},r);case ds:var E=c.createTenant.certificates.gemaltoCA;return r.createTenant.certificates.gemaltoCA=Object(j.a)(Object(j.a)({},E),{},{cert:i.fileName,encoded_cert:i.value}),Object(j.a)({},r);case Jo:return Object(j.a)(Object(j.a)({},c),{},{createTenant:{page:0,validPages:[],advancedModeOn:!1,storageClasses:[],limitSize:{},fields:{nameTenant:{tenantName:"",namespace:"",selectedStorageClass:""},configure:{customImage:!1,imageName:"",consoleImage:"",customDockerhub:!1,imageRegistry:"",imageRegistryUsername:"",imageRegistryPassword:"",exposeMinIO:!0,exposeConsole:!0,logSearchCustom:!1,prometheusCustom:!1,logSearchVolumeSize:"5",logSearchSizeFactor:"Gi",logSearchSelectedStorageClass:"",logSearchImage:"",kesImage:"",logSearchPostgresImage:"",prometheusVolumeSize:"5",prometheusSizeFactor:"Gi",prometheusSelectedStorageClass:"",prometheusImage:""},identityProvider:{idpSelection:"Built-in",accessKeys:[ps(16)],secretKeys:[ps(32)],openIDURL:"",openIDClientID:"",openIDSecretID:"",ADURL:"",ADSkipTLS:!1,ADServerInsecure:!1,ADUserNameFilter:"",ADGroupBaseDN:"",ADGroupSearchFilter:"",ADNameAttribute:""},security:{enableAutoCert:!0,enableCustomCerts:!1,enableTLS:!0},encryption:{enableEncryption:!1,encryptionType:"vault",gemaltoEndpoint:"",gemaltoToken:"",gemaltoDomain:"",gemaltoRetry:"0",awsEndpoint:"",awsRegion:"",awsKMSKey:"",awsAccessKey:"",awsSecretKey:"",awsToken:"",vaultEndpoint:"",vaultEngine:"",vaultNamespace:"",vaultPrefix:"",vaultAppRoleEngine:"",vaultId:"",vaultSecret:"",vaultRetry:"0",vaultPing:"0",gcpProjectID:"",gcpEndpoint:"",gcpClientEmail:"",gcpClientID:"",gcpPrivateKeyID:"",gcpPrivateKey:"",enableCustomCertsForKES:!1},tenantSize:{volumeSize:"100",sizeFactor:"Gi",drivesPerServer:"1",nodes:"4",memoryNode:"2",ecParity:"",ecParityChoices:[],cleanECChoices:[],maxAllocableMemo:0,memorySize:{error:"",limit:0,request:0},distribution:{error:"",nodes:0,persistentVolumes:0,disks:0,volumePerDisk:0},ecParityCalc:{error:0,defaultEC:"",erasureCodeSet:0,maxEC:"",rawCapacity:"0",storageFactors:[]},limitSize:{}},affinity:{nodeSelectorLabels:"",podAffinity:"default",withPodAntiAffinity:!0}},certificates:{minioCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],caCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],consoleCertificate:{id:"console_cert_pair",key:"",cert:"",encoded_key:"",encoded_cert:""},serverCertificate:{id:"encryptionServerCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},clientCertificate:{id:"encryptionClientCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},vaultCertificate:{id:"encryptionVaultCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},vaultCA:{id:"encryptionVaultCA",key:"",cert:"",encoded_key:"",encoded_cert:""},gemaltoCA:{id:"encryptionGemaltoCA",key:"",cert:"",encoded_key:"",encoded_cert:""}}}});default:return c}},directCSI:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ab,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case eb:if(""!==t.driveName){var a=Object(j.a)({},e);return a.selectedDrive=t.driveName,a}return e;default:return e}}}),Ib=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||pb.d;Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var Fb=a(994),Mb=(a(905),a(906),a(907),a(908),a(446)),Lb=Object(Mb.a)({palette:{primary:{light:"#073052",main:"#081C42",dark:"#05122B",contrastText:"#fff"},secondary:{light:"#ff7961",main:"#f44336",dark:"#ba000d",contrastText:"#000"},error:{light:"#e03a48",main:"#dc1f2e",contrastText:"#ffffff"},grey:{100:"#f0f0f0",200:"#e6e6e6",300:"#cccccc",400:"#999999",500:"#8c8c8c",600:"#737373",700:"#666666",800:"#4d4d4d",900:"#333333"},background:{default:"#F4F4F4"}},typography:{fontFamily:["Lato","sans-serif"].join(","),h1:{fontWeight:"bold",color:"#081C42"},h2:{fontWeight:"bold",color:"#081C42"},h3:{fontWeight:"bold",color:"#081C42"},h4:{fontWeight:"bold",color:"#081C42"},h5:{fontWeight:"bold",color:"#081C42"},h6:{fontWeight:"bold",color:"#000000"}},overrides:{MuiButton:{root:{borderRadius:3,color:"white",height:40,padding:"0 20px",fontSize:14,fontWeight:600,boxShadow:"none","& .MuiSvgIcon-root":{maxHeight:18},"&.MuiButton-contained.Mui-disabled":{backgroundColor:"#EAEDEE",fontWeight:600,color:"#767676"},"& .MuiButton-iconSizeMedium > *:first-child":{fontSize:12}}}}}),Db=Object(N.a)({"@global":{".MuiButton-contained":{fontSize:"14px",textTransform:"capitalize",padding:"16px 25px 16px 25px",borderRadius:3},".MuiButton-sizeSmall":{padding:"4px 10px",fontSize:"0.8125rem"},".MuiTableCell-head":{borderRadius:"3px 3px 0px 0px",fontSize:13},".MuiPaper-root":{borderRadius:3},".MuiDrawer-paperAnchorDockedLeft":{borderRight:0},".MuiDrawer-root":{"& .MuiPaper-root":{borderRadius:0}}}})((function(){return null}));o.a.render(Object(n.jsxs)(s.a,{store:Object(pb.e)(_b,Ib(Object(pb.a)(Ob.a))),children:[Object(n.jsx)(Db,{}),Object(n.jsx)(Fb.a,{theme:Lb,children:Object(n.jsx)(hb,{})})]}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[909,1,2]]]); +(this["webpackJsonpportal-ui"]=this["webpackJsonpportal-ui"]||[]).push([[0],{550:function(e,t,a){},908:function(e,t,a){},909:function(e,t,a){"use strict";a.r(t);var n=a(0),c=a(1),i=a.n(c),r=a(27),o=a.n(r),s=a(9),l=a(55),d=a(71),b=Object(d.a)(),u=a(3),j=a(2),m=a(210),h=a.n(m),p=a(394),O=a.n(p),g=a(961),f=a(1008),x=a(960),v=a(109),y=a(962),S=a(963),C=a(453),k=a(1010),w=a(951),N=a(15),T="USER_LOGGED",E="OPERATOR_MODE",A="MENU_OPEN",_="SERVER_NEEDS_RESTART",I="SERVER_IS_LOADING",F="SET_LOADING_PROGRESS",M="SET_SNACK_BAR_MESSAGE",L="SET_SERVER_DIAG_STAT",D="SET_ERROR_SNACK_MESSAGE",B="SET_SNACK_MODAL_MESSAGE",R="SET_MODAL_ERROR_MESSAGE";function P(e){return{type:T,logged:e}}function z(e){return{type:A,open:e}}function K(e){return{type:_,needsRestart:e}}var W,U=function(e){return{type:M,message:e}},V=function(e){return{type:D,message:e}},G=function(e){return{type:B,message:e}},q=function(e){return{type:R,message:e}},H=a(389),Y=a(390),Q=a(12),Z=a.n(Q),J=a(211),$=a.n(J),X=1073741824,ee=2147483648,te=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],ae=["Ki","Mi","Gi","Ti","Pi","Ei"],ne=["B"].concat(ae),ce=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=0,n=parseInt(e,10)||0;n>=1024&&++a;)n/=1024;var c=["B"].concat(ae);return n.toFixed(n<10&&a>0?1:0)+" "+(t?c[a]:te[a])},ie=function(){var e;$.a.removeItem("token"),e="token",document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"},re=function(e){var t=e.getHours()<10?"0".concat(e.getHours()):"".concat(e.getHours()),a=e.getMinutes()<10?"0".concat(e.getMinutes()):"".concat(e.getMinutes()),n=e.getSeconds()<10?"0".concat(e.getSeconds()):"".concat(e.getSeconds());return"".concat(t,":").concat(a,":").concat(n,":").concat(e.getMilliseconds())},oe=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=parseFloat(e),c=a?ne:te,i=c.findIndex((function(e){return e===t}));if(-1===i)return"0";var r=Math.pow(1024,i),o=n*r;return o.toString(10)},se=function(e,t,a,n){var c=parseInt(e,10);return le(t,c,274877906944,a,n)},le=function(e,t,a,n){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(isNaN(e)||isNaN(t)||isNaN(a)||isNaN(n))return{error:"Some provided data is invalid, please try again.",nodes:0,persistentVolumes:0,disks:0,volumePerDisk:0};var i=0,r=0,o=0;if(0===c&&(o=(r=t/(i=Math.floor(Math.min(t/Math.max(4,e),a))))/e),c&&(r=(o=c)*e,i=Math.floor(t/r)),o%1>0){r=(o=Math.ceil(o))*e;var s=(i=Math.floor(t/r))*o*e;if(s>n)return{error:"We were not able to allocate this server.",nodes:0,persistentVolumes:0,disks:0,volumePerDisk:0}}return i1&&void 0!==arguments[1]?arguments[1]:"s",a=parseFloat(e);switch(t){case"ns":a=Math.floor(1e-9*a);break;case"ms":a=Math.floor(.001*a)}var n=Math.floor(a/86400);a-=3600*n*24;var c=Math.floor(a/3600);a-=3600*c;var i=Math.floor(a/60);if(a-=60*i,n>365){var r=n/365;return"".concat(r," year").concat(1===Math.floor(r)?"":"s")}if(n>30){var o=Math.floor(n/30),s=n-30*o;return"".concat(o," month").concat(1===Math.floor(o)?"":"s"," ").concat(s>0?"".concat(s," day").concat(s>1?"s":""):"")}if(n>=7&&n<=30){var l=Math.floor(n/7);return"".concat(Math.floor(l)," week").concat(1===l?"":"s")}return n>=1&&n<=6?"".concat(n," day").concat(n>1?"s":""):"".concat(c>=1?"".concat(c," hour").concat(c>1?"s":""):""," ").concat(i>=1&&0===c?"".concat(i," minute").concat(i>1?"s":""):""," ").concat(a>=1&&0===i&&0===c?"".concat(a," second").concat(a>1?"s":""):"")},ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=new Date(1e3*parseInt(e));return t?"".concat(a.getFullYear(),"-").concat(String(a.getMonth()+1).padStart(2,"0"),"-").concat(String(a.getDay()).padStart(2,"0")," ").concat(a.getHours(),":").concat(String(a.getMinutes()).padStart(2,"0"),":").concat(String(a.getSeconds()).padStart(2,"0")):"".concat(a.getHours(),":").concat(String(a.getMinutes()).padStart(2,"0"))},je=function(e){var t=1e-9*e,a=Math.round(1e4*(t+Number.EPSILON))/1e4;return"".concat(a," s")},me=function(e){var t=(100*e.split("").reduce((function(e,t){return e+t.charCodeAt(0)+((e<<5)-e)}),0)&16777215).toString(16).toUpperCase();return"#".concat(t.padStart(6,"0"))},he=new(function(){function e(){Object(H.a)(this,e)}return Object(Y.a)(e,[{key:"invoke",value:function(e,t,a){var n=this;return h()(e,t).send(a).then((function(e){return e.body})).catch((function(e){return 401===e.status?(ie(),void(window.location.href="/login")):n.onError(e)}))}},{key:"onError",value:function(e){if(e.status){var t=Z()(e.response,"body.message",e.status.toString()),a=t.charAt(0).toUpperCase()+t.slice(1);return Promise.reject(a)}ie(),window.location.href="/login"}}]),e}());!function(e){e.unknown="unknown",e.form="form",e.redirect="redirect",e.serviceAccount="service-account"}(W||(W={}));var pe=Object(w.a)((function(e){return Object(k.a)({disabled:{"&.MuiInput-underline::before":{borderColor:"#eaeaea",borderBottomStyle:"solid"}}})}));function Oe(e){var t=pe();return Object(n.jsx)(f.a,Object(j.a)({InputProps:{classes:t}},e))}var ge=Object(s.b)((function(e){return{loggedIn:e.loggedIn}}),{userLoggedIn:P})(Object(N.a)((function(e){return Object(k.a)({"@global":{body:{backgroundColor:"#FAFAFA"}},paper:{borderRadius:8,display:"flex",flexDirection:"column",alignItems:"center",width:800,height:424,margin:"auto",position:"absolute",top:"50%",left:"50%",marginLeft:-400,marginTop:-212,"&.MuiPaper-root":{borderRadius:8}},avatar:{margin:e.spacing(1),backgroundColor:e.palette.secondary.main},form:{width:"100%"},submit:{margin:"30px 0px 16px",height:40,boxShadow:"none",padding:"16px 30px"},errorBlock:{backgroundColor:"#C72C48",width:800,height:64,display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:"50%",top:"50%",marginLeft:-400,marginTop:-290,color:"#fff",fontWeight:700,fontSize:14,borderRadius:8,padding:10,boxSizing:"border-box"},mainContainer:{position:"relative",height:424},theOcean:{borderTopLeftRadius:8,borderBottomLeftRadius:8,background:"transparent linear-gradient(to bottom, #073052 0%,#05122b 100%); 0% 0% no-repeat padding-box;"},oceanBg:{backgroundImage:"url(/images/BG_Illustration.svg)",backgroundRepeat:"no-repeat",backgroundPosition:"bottom left",height:"100%",width:324},theLogin:{padding:"40px 45px 20px 45px"},loadingLoginStrategy:{textAlign:"center"},headerTitle:{marginBottom:10},submitContainer:{textAlign:"right"},disclaimer:{fontSize:12,marginTop:30},jwtInput:{marginTop:45},linearPredef:{height:10},errorIconStyle:{marginRight:3}})}))((function(e){var t=e.classes,a=e.userLoggedIn,r=Object(c.useState)(""),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(""),j=Object(u.a)(d,2),m=j[0],p=j[1],f=Object(c.useState)(""),k=Object(u.a)(f,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)({loginStrategy:W.unknown,redirect:""}),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(!1),B=Object(u.a)(D,2),R=B[0],P=B[1],z={form:"/api/v1/login","service-account":"/api/v1/login/operator"},K={form:{accessKey:s,secretKey:w},"service-account":{jwt:m}},U=function(e){e.preventDefault(),P(!0),h.a.post(z[M.loginStrategy]||"/api/v1/login").send(K[M.loginStrategy]).then((function(e){var t=e.body;if(t.error)throw P(!1),t.error})).then((function(){a(!0),M.loginStrategy===W.form&&localStorage.setItem("userLoggedIn",btoa(s)),b.push("/")})).catch((function(e){P(!1),_(e.message)}))};Object(c.useEffect)((function(){he.invoke("GET","/api/v1/login").then((function(e){L(e),_(""),"redirect"===e.loginStrategy&&e.redirect})).catch((function(e){_(e)}))}),[]);var V=null;switch(M.loginStrategy){case W.form:V=Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(v.a,{component:"h1",variant:"h6",className:t.headerTitle,children:"Console Login"}),Object(n.jsxs)("form",{className:t.form,noValidate:!0,onSubmit:U,children:[Object(n.jsxs)(x.a,{container:!0,spacing:2,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Oe,{fullWidth:!0,id:"accessKey",value:s,onChange:function(e){return l(e.target.value)},label:"Enter Access Key",name:"accessKey",autoComplete:"username",disabled:R})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Oe,{fullWidth:!0,value:w,onChange:function(e){return N(e.target.value)},name:"secretKey",label:"Enter Secret Key",type:"password",id:"secretKey",autoComplete:"current-password",disabled:R})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.submitContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",className:t.submit,disabled:""===w||""===s||R,children:"Login"})}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.linearPredef,children:R&&Object(n.jsx)(y.a,{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.disclaimer,children:[Object(n.jsx)("strong",{children:"Don't have an access key?"}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),"Contact your administrator to have one made"]})]})]});break;case W.redirect:V=Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(v.a,{component:"h1",variant:"h6",className:t.headerTitle,children:"Welcome"}),Object(n.jsx)(g.a,{component:"a",href:M.redirect.replace("%5BHOSTNAME%5D",window.location.hostname),type:"submit",variant:"contained",color:"primary",className:t.submit,children:"Login with SSO"})]});break;case W.serviceAccount:V=Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(v.a,{component:"h1",variant:"h6",className:t.headerTitle,children:"Operator Login"}),Object(n.jsxs)("form",{className:t.form,noValidate:!0,onSubmit:U,children:[Object(n.jsx)(x.a,{container:!0,spacing:2,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:t.jwtInput,children:Object(n.jsx)(Oe,{required:!0,fullWidth:!0,id:"jwt",value:m,onChange:function(e){return p(e.target.value)},label:"JWT",name:"jwt",autoComplete:"off",disabled:R})})}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.submitContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",className:t.submit,disabled:""===m||R,children:"Login"})}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.linearPredef,children:R&&Object(n.jsx)(y.a,{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.disclaimer,children:[Object(n.jsx)("strong",{children:"Don't have an access key?"}),Object(n.jsx)("br",{}),"Contact your administrator to have one made"]})]})]});break;default:V=Object(n.jsx)(S.a,{className:t.loadingLoginStrategy})}return Object(n.jsxs)(i.a.Fragment,{children:[""!==A&&Object(n.jsxs)("div",{className:t.errorBlock,children:[Object(n.jsx)(O.a,{fontSize:"small",className:t.errorIconStyle})," ",A]}),Object(n.jsx)(C.a,{className:t.paper,children:Object(n.jsxs)(x.a,{container:!0,className:t.mainContainer,children:[Object(n.jsx)(x.a,{item:!0,xs:7,className:t.theOcean,children:Object(n.jsx)("div",{className:t.oceanBg})}),Object(n.jsx)(x.a,{item:!0,xs:5,className:t.theLogin,children:V})]})})]})}))),fe=a(38),xe=a(5),ve=a(966),ye=a(1011),Se=a(965),Ce=a(1004),ke={inputLabel:{fontWeight:600,marginRight:10,fontSize:15,color:"#000",textAlign:"left",overflow:"hidden","& span":{display:"flex",alignItems:"center"},display:"flex"},fieldLabelError:{paddingBottom:22},fieldContainer:{marginBottom:20,position:"relative",maxWidth:840},tooltipContainer:{marginLeft:5,display:"flex",alignItems:"center"},switchContainer:{display:"flex",maxWidth:840}},we={formScrollable:{maxHeight:"calc(100vh - 300px)",overflowY:"auto",marginBottom:25},formSlider:{marginLeft:0},clearButton:{fontFamily:"Lato, sans-serif",border:"0",backgroundColor:"transparent",color:"#393939",fontWeight:600,fontSize:14,marginRight:10,outline:"0",padding:"16px 25px 16px 25px",cursor:"pointer"},floatingEnabled:{position:"absolute",right:58,zIndex:1e3,marginTop:-38},configureString:{border:"#EAEAEA 1px solid",borderRadius:4,padding:"24px 50px",overflowY:"auto",height:170,maxWidth:840}},Ne={tooltip:{fontSize:16}},Te={width:14,height:14,borderRadius:2},Ee={unCheckedIcon:Object(j.a)(Object(j.a)({},Te),{},{border:"1px solid #c3c3c3"}),checkedIcon:Object(j.a)(Object(j.a)({},Te),{},{border:"1px solid #081C42",backgroundColor:"#081C42"})},Ae={width:12,height:12,borderRadius:"100%","input:disabled ~ &":{border:"1px solid #9C9C9C"}},_e={radioUnselectedIcon:Object(j.a)(Object(j.a)({},Ae),{},{border:"1px solid #000"}),radioSelectedIcon:Object(j.a)(Object(j.a)({},Ae),{},{border:"1px solid #000",backgroundColor:"#000"})},Ie={label:{color:"#393939",fontWeight:600,fontSize:13,alignSelf:"center",whiteSpace:"nowrap","&:not(:first-of-type)":{marginLeft:10}},timeContainers:{height:40},actionsTray:{display:"flex",justifyContent:"space-between","& button":{flexGrow:0,marginLeft:15}}},Fe={searchField:{flexGrow:1,height:40,background:"#FFFFFF",borderRadius:5,border:"#EAEDEE 1px solid",display:"flex",justifyContent:"center",padding:"0 16px","& input":{fontSize:12,fontWeight:700,color:"#000","&::placeholder":{color:"#393939",opacity:1}},"&:hover":{borderColor:"#000"}}},Me={prefinedContainer:{maxWidth:840,width:"100%"},predefinedTitle:{fontSize:16,fontWeight:600,color:"#000",margin:"10px 0"},predefinedList:{backgroundColor:"#eaeaea",padding:"12px 10px",color:"#393939",fontSize:12,fontWeight:600,minHeight:41},innerContent:{width:"100%",overflowX:"auto",whiteSpace:"nowrap",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},innerContentMultiline:{width:"100%",maxHeight:100,overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},Le={obTitleSection:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:20},sectionTitle:{fontSize:22,color:"#000",fontWeight:600,height:40,lineHeight:"40px"},breadcrumbs:{fontSize:10,color:"#000",marginTop:2,"& a":{textDecoration:"none",color:"#000","&:hover":{textDecoration:"underline"}}}},De={multiSelectTable:{height:200}},Be={customTitle:{fontSize:18,color:"#000",fontWeight:600,padding:"12px 0",borderBottom:"#eaedee 1px solid",marginBottom:10,margin:"15px 38px 27px"},settingsFormContainer:{height:"calc(100vh - 421px)",padding:"15px 38px",overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},settingsButtonContainer:{borderTop:"1px solid #EAEAEA",padding:"15px 38px",textAlign:"right"},innerSettingsButtonContainer:{maxWidth:840,textAlign:"right"},settingsOptionsContainer:{height:"calc(100vh - 244px)",backgroundColor:"#fff",border:"#EAEDEE 1px solid",borderRadius:3,marginTop:15},backButton:{cursor:"pointer",fontSize:10,fontWeight:600,color:"#000",backgroundColor:"transparent",border:0,padding:0,display:"flex",alignItems:"center","&:active, &:focus":{outline:0},"& svg":{width:10,marginRight:4}},backContainer:{margin:"20px 38px 0"}},Re={iconContainer:{display:"flex",flexDirection:"row",maxWidth:455,justifyContent:"space-between",flexWrap:"wrap",width:"100%"},nonIconContainer:{marginBottom:16,width:455,marginTop:15,"& button":{marginRight:16}},pickTitle:{fontWeight:600,color:"#393939",fontSize:14,marginBottom:16},centerElements:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},logoButton:{height:"80px"},lambdaNotif:{backgroundColor:"#fff",border:"#393939 1px solid",borderRadius:5,width:101,height:91,display:"flex",alignItems:"center",justifyContent:"center",marginBottom:16,cursor:"pointer","& img":{maxWidth:71,maxHeight:71}}},Pe={logsSubContainer:{height:"calc(100vh - 230px)",padding:"15px 0"}},ze={singleValueContainer:{position:"relative",flexGrow:1,width:"100%",height:"100%",border:"#EAEAEA 1px solid",borderRadius:5,backgroundColor:"#fff"},titleContainer:{color:"#393939",fontWeight:600,height:15,textAlign:"center",fontSize:10},contentContainer:{flexGrow:2,justifyContent:"center",alignItems:"center",display:"flex",position:"absolute",width:"100%",height:"calc(100% - 15px)"},contentContainerWithLabel:{height:"calc(100% - 25px)"},legendBlock:{position:"absolute",bottom:5,display:"flex",width:"100%",height:15,flexWrap:"wrap",overflowY:"auto"},singleLegendContainer:{display:"flex",alignItems:"center",padding:"0 10px",maxWidth:"100%"},colorContainer:{width:8,height:8,minWidth:8,borderRadius:"100%",marginRight:5},legendLabel:{fontSize:"80%",color:"#393939",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},Ke={customTooltip:{backgroundColor:"rgba(255, 255, 255, 0.90)",border:"#eaeaea 1px solid",borderRadius:3,padding:"5px 10px",maxHeight:300,overflowY:"auto"},labelContainer:{display:"flex",alignItems:"center"},labelColor:{width:6,height:6,display:"block",borderRadius:"100%",marginRight:5},itemValue:{fontSize:"75%",color:"#393939"},valueContainer:{fontWeight:600},timeStampTitle:{fontSize:"80%",color:"#9c9c9c",textAlign:"center",marginBottom:6}},We={snackBar:{backgroundColor:"#081F44",fontWeight:400,fontFamily:"Lato, sans-serif",fontSize:14,padding:"0px 20px 0px 20px;",boxShadow:"none","&.MuiPaper-root.MuiSnackbarContent-root":{borderRadius:"0px 0px 5px 5px"},"& div":{textAlign:"center",padding:"6px 30px",width:"100%",overflowX:"hidden",textOverflow:"ellipsis"}},errorSnackBar:{backgroundColor:"#C72C48",color:"#fff"},snackBarExternal:{top:"-17px",position:"absolute",minWidth:"348px",whiteSpace:"nowrap",height:"33px"},snackDiv:{top:"17px",left:"50%",position:"absolute"},snackBarModal:{top:0,position:"absolute",minWidth:"348px",whiteSpace:"nowrap",height:"33px",maxWidth:"calc(100% - 140px)"}},Ue={multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"},sizeFactorContainer:{marginLeft:8,alignSelf:"flex-start"},headerElement:{position:"sticky",top:0,paddingTop:5,marginBottom:10,zIndex:500,backgroundColor:"#fff"},tableTitle:{fontWeight:700,width:"30%"},poolError:{color:"#dc1f2e",fontSize:"0.75rem",paddingLeft:120},error:{color:"#dc1f2e",fontSize:"0.75rem"},h3Section:{marginTop:0},descriptionText:{fontSize:13,color:"#777777"},container:{padding:"77px 0 0 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}},Ve={anchorButton:{textDecoration:"underline",textTransform:"unset",fontWeight:"normal",padding:0,lineHeight:"unset",height:"unset",width:"unset",textAlign:"left",border:0,minWidth:"unset"}},Ge={hrClass:{borderTop:0,borderLeft:0,borderRight:0,borderColor:"#999999",backgroundColor:"transparent"}},qe=a(996),He=a(964);function Ye(){return Object(n.jsxs)(v.a,{variant:"body2",color:"textSecondary",align:"center",children:["Copyright \xa9 ",Object(n.jsx)(He.a,{color:"inherit",href:"https://material-ui.com/",children:"MinIO"})," ",(new Date).getFullYear(),"."]})}var Qe=Object(w.a)((function(e){return{"@global":{body:{backgroundColor:e.palette.common.white}},paper:{marginTop:e.spacing(8),display:"flex",flexDirection:"column",alignItems:"center"}}})),Ze=function(){var e=Qe();return Object(n.jsxs)(Se.a,{component:"main",children:[Object(n.jsx)(ve.a,{}),Object(n.jsx)("div",{className:e.paper,children:Object(n.jsx)(v.a,{variant:"h1",component:"h1",children:"404 Not Found"})}),Object(n.jsx)(qe.a,{mt:5,children:Object(n.jsx)(Ye,{})})]})},Je=a(18),$e=a(975),Xe=a(32),et=a.n(Xe),tt=a(402),at=a.n(tt),nt=a(76),ct=a.n(nt),it=a(452),rt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",children:[Object(n.jsx)("title",{children:"ic_h_copy-new_sl"}),Object(n.jsx)("g",{id:"Layer_2","data-name":"Layer 2",children:Object(n.jsx)("g",{id:"Layer_1-2","data-name":"Layer 1",children:Object(n.jsx)("path",{className:"cls-1",d:"M0,0V16H16V0ZM11.886,9.048H9.048v2.838h-2.1V9.048H4.114v-2.1H6.952V4.114h2.1V6.952h2.838Z"})})})]})})},ot=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",children:Object(n.jsxs)("g",{id:"Group_55","data-name":"Group 55",transform:"translate(1002 -2555)",children:[Object(n.jsx)("rect",{id:"Rectangle_29",width:"2",height:"12",transform:"translate(-997 2555)",fill:"#fff"}),Object(n.jsx)("rect",{id:"Rectangle_30",width:"2",height:"12",transform:"translate(-990 2560) rotate(90)",fill:"#fff"})]})})})},st=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10.402 13",children:Object(n.jsx)("path",{d:"M6.761 1V0H3.64v1H.004v1h10.4V1zM.004 2.998l1.672 10h7.052l1.673-10zm3.412 8.243l-.552-6.478h.653l.553 6.472zm3.569 0h-.653l.551-6.472h.654z",className:"a"})})})},lt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:Object(n.jsxs)("g",{transform:"translate(249 720)",children:[Object(n.jsx)("rect",{width:"6",height:"5",transform:"translate(-244 -720) rotate(90)"}),Object(n.jsx)("rect",{width:"4",height:"4",transform:"translate(-243 -720)"}),Object(n.jsx)("rect",{width:"5",height:"4",transform:"translate(-239 -715) rotate(90)"}),Object(n.jsx)("rect",{width:"5",height:"3",transform:"translate(-244 -710) rotate(180)"})]})})})},dt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:Object(n.jsx)("path",{d:"M8.392,10H1.608L0,0H10Z"})})})},bt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6.131 10",children:Object(n.jsx)("g",{transform:"translate(193 719.787)",children:Object(n.jsxs)("g",{transform:"translate(-193 -719.787)",children:[Object(n.jsx)("path",{d:"M3,0h.131a3,3,0,0,1,3,3V5a0,0,0,0,1,0,0H0A0,0,0,0,1,0,5V3A3,3,0,0,1,3,0Z",transform:"translate(0 5)"}),Object(n.jsx)("ellipse",{cx:"2.065",cy:"2",rx:"2.065",ry:"2",transform:"translate(1 0)"})]})})})})},ut=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 9.5",children:Object(n.jsxs)("g",{transform:"translate(231 719.516)",children:[Object(n.jsx)("path",{d:"M-125.5,7.984a4.5,4.5,0,0,1,4.5-4.5,4.5,4.5,0,0,1,4.5,4.5Z",transform:"translate(-105 -720)"}),Object(n.jsx)("rect",{width:"10",height:"1",transform:"translate(-231 -711.016)"}),Object(n.jsx)("path",{d:"M-119.5.484h-3v1h1v1h1v-1h1Z",transform:"translate(-105 -720)"})]})})})},jt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 9.787",children:Object(n.jsx)("g",{transform:"translate(177 719.787)",children:Object(n.jsxs)("g",{transform:"translate(-105 -720)",children:[Object(n.jsx)("path",{d:"M-65,5a3,3,0,0,0-1.131.224A3.981,3.981,0,0,1-65,8v2h3V8A3,3,0,0,0-65,5Z"}),Object(n.jsx)("path",{d:"M-72,10h6V8a3,3,0,0,0-3-3,3,3,0,0,0-3,3Z"}),Object(n.jsx)("path",{className:"a",d:"M-65,.213a1.993,1.993,0,0,0-1.384.561A2.967,2.967,0,0,1-66,2.213a2.964,2.964,0,0,1-.384,1.439A1.989,1.989,0,0,0-65,4.213a2,2,0,0,0,2-2A2,2,0,0,0-65,.213Z"}),Object(n.jsx)("circle",{cx:"2",cy:"2",r:"2",transform:"translate(-71 0.213)"})]})})})})},mt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8.75 10",children:Object(n.jsx)("path",{d:"M-44.625,10l-4.353-2.419L-53.375,10V0h8.75Z",transform:"translate(53.375)"})})})},ht=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 9.998 10",children:Object(n.jsx)("g",{transform:"translate(140.999 720)",children:Object(n.jsxs)("g",{transform:"translate(-105 -720)",children:[Object(n.jsx)("rect",{width:"1.114",height:"1.667",transform:"translate(-27.116 8.333)"}),Object(n.jsx)("path",{d:"M-28.184,10H-29.3V8.154l2.182-3.037V3.147H-26V5.476l-2.182,3.037Z"}),Object(n.jsx)("rect",{width:"1.114",height:"2.963",transform:"translate(-31.531)"}),Object(n.jsx)("rect",{width:"1.114",height:"2.132",transform:"translate(-27.115 0)"}),Object(n.jsx)("rect",{width:"1.114",height:"5.389",transform:"translate(-29.298)"}),Object(n.jsx)("path",{d:"M-30.417,10h-1.114V5.722l-2.233-3V0h1.114V2.353l2.233,3Z"}),Object(n.jsx)("path",{d:"M-32.65,10h-1.114V6.185l-2.234-3V0h1.114V2.815l2.234,3Z"}),Object(n.jsx)("rect",{width:"1.114",height:"4.463",transform:"translate(-35.999 5.537)"})]})})})})},pt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:[Object(n.jsx)("rect",{width:"1.433",height:"1"}),Object(n.jsx)("rect",{width:"7.828",height:"1",transform:"translate(2.172)"}),Object(n.jsx)("rect",{width:"1.433",height:"1",transform:"translate(0 6)"}),Object(n.jsx)("rect",{width:"1.433",height:"1",transform:"translate(0 3)"}),Object(n.jsx)("rect",{width:"1.433",height:"1",transform:"translate(0 9)"}),Object(n.jsx)("rect",{width:"1.368",height:"0.569",transform:"translate(6.316 9)"}),Object(n.jsx)("path",{d:"M5.566,9.569v-.31l-.238-.138-.269.155-.65.375L4.034,9V9H2.172v1H5.566Z"}),Object(n.jsx)("path",{d:"M9.966,9l-.375.65-.65-.375-.269-.155-.238.138V10H10V9H9.967Z"}),Object(n.jsx)("path",{d:"M3.625,6.793l.269-.155V6.362l-.269-.155L3.266,6H2.172V7H3.266Z"}),Object(n.jsx)("path",{d:"M8.434,3.431v.31l.238.138.269-.155.649-.375L9.966,4V4H10V3H8.434Z"}),Object(n.jsx)("path",{d:"M4.034,4l.375-.65.65.375.269.155.238-.138V3H2.172V4H4.033Z"}),Object(n.jsx)("path",{d:"M9.356,5.929,10,5.558,9.316,4.373l-.644.372-.988-.571V3.431H6.316v.743l-.988.571-.644-.372L4,5.558l.644.371V7.071L4,7.442l.684,1.185.644-.372.988.571v.743H7.684V8.826l.988-.571.644.372L10,7.442l-.644-.371ZM7,7.278A.778.778,0,1,1,7.778,6.5.779.779,0,0,1,7,7.278Z"})]})})},Ot=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 9",children:Object(n.jsxs)("g",{transform:"translate(79 438.479)",children:[Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("rect",{x:"-77.9",y:"-434.5",width:"7.8",height:"1"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("rect",{x:"-77.9",y:"-434.5",transform:"matrix(0.4999 -0.8661 0.8661 0.4999 338.8698 -281.1237)",width:"7.8",height:"1"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("rect",{x:"-74.5",y:"-437.9",transform:"matrix(0.866 -0.5001 0.5001 0.866 207.1129 -95.1668)",width:"1",height:"7.8"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-71.8-430.1h-4.5l-2.2-3.9l2.2-3.9h4.5l2.2,3.9L-71.8-430.1z M-75.7-431.1h3.3l1.7-2.9l-1.7-2.9h-3.3 l-1.7,2.9L-75.7-431.1z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-72.3-434c0,0.9-0.7,1.7-1.7,1.7c-0.9,0-1.7-0.7-1.7-1.7c0-0.9,0.7-1.7,1.7-1.7 C-73.1-435.7-72.3-434.9-72.3-434z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-76.8-434c0,0.6-0.5,1.1-1.1,1.1c0,0,0,0,0,0c-0.6,0-1.1-0.5-1.1-1.1c0,0,0,0,0,0c0-0.6,0.5-1.1,1.1-1.1 c0,0,0,0,0,0C-77.3-435.1-76.8-434.6-76.8-434C-76.8-434-76.8-434-76.8-434z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-69-434c0,0.6-0.5,1.1-1.1,1.1c0,0,0,0,0,0c-0.6,0-1.1-0.5-1.1-1.1c0,0,0,0,0,0c0-0.6,0.5-1.1,1.1-1.1 c0,0,0,0,0,0C-69.5-435.1-69-434.6-69-434C-69-434-69-434-69-434z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-75.4-431.6c0.5,0.3,0.7,1,0.4,1.5c-0.3,0.5-1,0.7-1.5,0.4c0,0,0,0,0,0c-0.5-0.3-0.7-1-0.4-1.5 C-76.6-431.7-75.9-431.9-75.4-431.6C-75.4-431.6-75.4-431.6-75.4-431.6z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-71.5-438.3c0.5,0.3,0.7,1,0.4,1.5c-0.3,0.5-1,0.7-1.5,0.4c0,0,0,0,0,0c-0.5-0.3-0.7-1-0.4-1.5 C-72.7-438.5-72-438.6-71.5-438.3C-71.5-438.3-71.5-438.3-71.5-438.3z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-72.6-431.6c0.5-0.3,1.2-0.1,1.5,0.4c0,0,0,0,0,0c0.3,0.5,0.1,1.2-0.4,1.5c-0.5,0.3-1.2,0.1-1.5-0.4 c0,0,0,0,0,0C-73.3-430.6-73.1-431.3-72.6-431.6z"})})}),Object(n.jsx)("g",{children:Object(n.jsx)("g",{children:Object(n.jsx)("path",{d:"M-76.5-438.3c0.5-0.3,1.2-0.1,1.5,0.4c0,0,0,0,0,0c0.3,0.5,0.1,1.2-0.4,1.5c-0.5,0.3-1.2,0.1-1.5-0.4 c0,0,0,0,0,0C-77.2-437.3-77-438-76.5-438.3z"})})})]})})})},gt=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:Object(n.jsx)("g",{transform:"translate(213 720)",children:Object(n.jsxs)("g",{transform:"translate(-105 -720)",children:[Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-108)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-108 6)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-99.5 6)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-99.5)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-98) rotate(90)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-104) rotate(90)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-104 8.5) rotate(90)"}),Object(n.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-98 8.5) rotate(90)"}),Object(n.jsx)("circle",{cx:"2",cy:"2",r:"2",transform:"translate(-105 3)"})]})})})})},ft="ADD_BUCKET_OPEN",xt="ADD_BUCKET_NAME",vt="ADD_BUCKET_VERSIONED",yt="ADD_BUCKET_LOCKING",St="ADD_BUCKET_QUOTA",Ct="ADD_BUCKET_QUOTA_TYPE",kt="ADD_BUCKET_QUOTA_SIZE",wt="ADD_BUCKET_QUOTA_UNIT",Nt="ADD_BUCKET_RESET",Tt="ADD_BUCKET_RETENTION",Et="ADD_BUCKET_RETENTION_MODE",At="ADD_BUCKET_RETENTION_UNIT",_t="ADD_BUCKET_RETENTION_VALIDITY";var It=a(124),Ft=a.n(It),Mt=a(912),Lt=a(957),Dt=a(1002),Bt=a(86),Rt=a(399),Pt=a.n(Rt),zt=a(219),Kt=a.n(zt),Wt=a(398),Ut=a.n(Wt),Vt=a(34),Gt="#081C42",qt="#081C42",Ht=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 11.856",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M-54,8l1.764,2.614A7.52,7.52,0,0,0-46,13.928h0a7.52,7.52,0,0,0,6.234-3.314L-38,8l-1.764-2.614A7.52,7.52,0,0,0-46,2.072h0a7.52,7.52,0,0,0-6.234,3.314Zm10.286,0A2.285,2.285,0,0,1-46,10.286,2.285,2.285,0,0,1-48.286,8,2.285,2.285,0,0,1-46,5.714,2.285,2.285,0,0,1-43.714,8Zm1.3,0A3.59,3.59,0,0,1-46,11.59,3.59,3.59,0,0,1-49.59,8,3.59,3.59,0,0,1-46,4.41,3.59,3.59,0,0,1-42.41,8Z",transform:"translate(54 -2.072)"})})},Yt=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 13.833 13.833",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M2.934,16H0V13.066L10.607,2.459a1,1,0,0,1,1.414,0l1.52,1.52a1,1,0,0,1,0,1.414Z",transform:"translate(0 -2.167)"})})},Qt=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 13 13",children:[Object(n.jsx)("path",{fill:a?qt:Gt,d:"M11.05 8.617v2.429h-9.1v-9.1h2.429v-1.95H0v13h13V8.617z",className:"a"}),Object(n.jsx)("path",{fill:a?qt:Gt,d:"M3.854 9.256h1.95a4.945 4.945 0 013.6-4.74v1.3l.6-.487 2.474-2.012L9.4.817v1.7a6.9 6.9 0 00-5.546 6.739z",className:"a"})]})},Zt=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 10.402 13",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M6.761 1V0H3.64v1H.004v1h10.4V1zM.004 2.998l1.672 10h7.052l1.673-10zm3.412 8.243l-.552-6.478h.653l.553 6.472zm3.569 0h-.653l.551-6.472h.654z"})})},Jt=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 10 11.429",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M-43.375,11.429-48.35,8.664l-5.025,2.764V0h10Z",transform:"translate(53.375)"})})},$t=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"})})},Xt=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3v-3h18v3z"})})},ea=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 13 12.996",children:[Object(n.jsx)("path",{fill:a?qt:Gt,d:"M11.05 9.096v1.95h-9.1v-1.95H0v3.9h13v-3.9z"}),Object(n.jsx)("path",{fill:a?qt:Gt,d:"M6.5 9.75L9 6.672H7.475V0h-1.95v6.672H4z"})]})},ta=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z"})})},aa=function(e){var t=e.active,a=void 0!==t&&t;return Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",children:Object(n.jsx)("path",{fill:a?qt:Gt,d:"M20 16h2v-2h-2v2zm0-9v5h2V7h-2zM10 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 10c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"})})},na=function(e,t){switch(e){case"view":return Object(n.jsx)(Ht,{active:t});case"edit":return Object(n.jsx)(Yt,{active:t});case"delete":return Object(n.jsx)(Zt,{active:t});case"description":return Object(n.jsx)(Jt,{active:t});case"share":return Object(n.jsx)(Qt,{active:t});case"cloud":return Object(n.jsx)($t,{active:t});case"console":return Object(n.jsx)(Xt,{active:t});case"download":return Object(n.jsx)(ea,{active:t});case"disable":return Object(n.jsx)(ta,{active:t});case"format":return Object(n.jsx)(aa,{active:t})}return null},ca=Object(N.a)((function(){return Object(k.a)({spacing:{margin:"0 8px"},buttonDisabled:{"&.MuiButtonBase-root.Mui-disabled":{cursor:"not-allowed",filter:"grayscale(100%)",opacity:"30%"}}})}))((function(e){var t=e.type,a=e.onClick,c=e.valueToSend,i=e.idField,r=e.selected,o=e.to,s=e.sendOnlyId,l=void 0!==s&&s,d=e.disabled,b=void 0!==d&&d,u=e.classes,j=l?c[i]:c,m=Object(n.jsx)(Mt.a,{"aria-label":t,size:"small",onClick:a?function(e){e.stopPropagation(),b?e.preventDefault():a(j)}:function(){return null},className:"".concat(u.spacing," ").concat(b?u.buttonDisabled:""),disabled:b,children:na(t,r)});return a?m:Ft()(o)?b?m:Object(n.jsx)(Vt.a,{to:"".concat(o,"/").concat(j),onClick:function(e){e.stopPropagation()},children:m}):null})),ia=a(1015),ra=a(1009),oa=function(e){return Object(n.jsxs)(it.a,Object(j.a)(Object(j.a)({},e),{},{viewBox:"0 0 12 12",children:[Object(n.jsx)("path",{d:"M357.14,346a5,5,0,1,1-5,5,5,5,0,0,1,5-5m0-1a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z",transform:"translate(-351.14 -345.03)"}),Object(n.jsx)("path",{d:"M356.21,352.42v-1.86h.52c1.23,0,1.92-.45,1.92-1.29s-.68-1.18-1.89-1.18a8.07,8.07,0,0,0-.93.06l-.1-1.25a9.13,9.13,0,0,1,1.08-.08c2,0,3.19.94,3.19,2.4s-.93,2.24-2.64,2.46l-.05.74Zm1.56,1.8a1,1,0,1,1-1-1A1,1,0,0,1,357.77,354.22Z",transform:"translate(-351.14 -345.03)"})]}))},sa=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),Ee),{},{fieldContainer:Object(j.a)(Object(j.a)({},ke.fieldContainer),{},{display:"flex",justifyContent:"flex-start",alignItems:"center",margin:"15px 0",marginBottom:0,flexBasis:"initial"})}))}))((function(e){var t=e.label,a=e.onChange,c=e.value,r=e.id,o=e.name,s=e.checked,l=void 0!==s&&s,d=e.disabled,b=void 0!==d&&d,u=e.tooltip,j=void 0===u?"":u,m=e.classes;return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:m.fieldContainer,children:[Object(n.jsx)("div",{children:Object(n.jsx)(Dt.a,{name:o,id:r,value:c,color:"primary",inputProps:{"aria-label":"secondary checkbox"},checked:l,onChange:a,checkedIcon:Object(n.jsx)("span",{className:m.checkedIcon}),icon:Object(n.jsx)("span",{className:m.unCheckedIcon}),disabled:b})}),""!==t&&Object(n.jsxs)(ia.a,{htmlFor:r,className:m.inputLabel,children:[Object(n.jsx)("span",{children:t}),""!==j&&Object(n.jsx)("div",{className:m.tooltipContainer,children:Object(n.jsx)(ra.a,{title:j,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:m.tooltip})})})})]})]})})})),la="#9c9c9c80",da={fontWeight:400,fontSize:14,borderColor:la,borderWidth:"0.5px",height:40,transitionDuration:"0.3s",padding:"initial",paddingRight:6,paddingLeft:6},ba=function(e,t,a,i,r,o,s,l,d,b,u){var j=function(e,t,a,n,c,i,r){var o=Object(Je.a)(e);i&&(o=e.filter((function(e){return r.includes(e.elementKey)})));var s=t;return n&&(s-=45),c&&(s-=a),o.reduce((function(e,t){return t.width?e-t.width:e}),s)/o.filter((function(e){return!e.width})).length}(e,t,a,i,r,l,d);return e.map((function(e,t){if(l&&!d.includes(e.elementKey))return null;var a=!e.enableSort||!e.enableSort;return Object(n.jsx)(Bt.b,{dataKey:e.elementKey,headerClassName:"titleHeader ".concat(e.headerTextAlign?"text-".concat(e.headerTextAlign):""),headerRenderer:function(){return Object(n.jsxs)(c.Fragment,{children:[b===e.elementKey&&Object(n.jsx)(c.Fragment,{children:"ASC"===u?Object(n.jsx)(Ut.a,{}):Object(n.jsx)(Kt.a,{})}),e.label]})},className:e.contentTextAlign?"text-".concat(e.contentTextAlign):"",cellRenderer:function(t){var a=t.rowData,i=!!o&&o.includes(Ft()(a)?a:a[s]);return function(e,t,a){var i=Ft()(e)?e:Z()(e,t.elementKey,null),r=t.renderFullObject?e:i,o=t.renderFunction?t.renderFunction(r):r;return Object(n.jsx)(c.Fragment,{children:Object(n.jsx)("span",{className:a?"selected":"",children:o})})}(a,e,i)},width:e.width||j,disableSort:a,defaultSortDirection:"ASC"},"col-tb-".concat(t.toString()))}))},ua=Object(N.a)((function(){return Object(k.a)(Object(j.a)(Object(j.a)({dialogContainer:{padding:"12px 26px 22px"},paper:{display:"flex",overflow:"auto",flexDirection:"column",padding:"19px 38px",boxShadow:"none",border:"#EAEDEE 1px solid",borderRadius:3,minHeight:200,overflowY:"scroll",position:"relative","&::-webkit-scrollbar":{width:3,height:3}},noBackground:{backgroundColor:"transparent",border:0},defaultPaperHeight:{height:"calc(100vh - 205px)"},allTableSettings:{"& .MuiTableCell-sizeSmall:last-child":{paddingRight:"initial"},"& .MuiTableCell-body.MuiTableCell-sizeSmall:last-child":{paddingRight:6}},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:700,fontSize:14,borderColor:"#39393980",borderWidth:"0.5px",padding:"6px 0 10px"}}},rowUnselected:Object(j.a)(Object(j.a)({},da),{},{color:"#393939"}),rowSelected:Object(j.a)(Object(j.a)({},da),{},{color:"#081C42",fontWeight:600}),paginatorContainer:{display:"flex",justifyContent:"flex-end",padding:"5px 38px"},checkBoxHeader:{width:50,textAlign:"left",paddingRight:10,"&.MuiTableCell-paddingCheckbox":{paddingBottom:4,paddingLeft:0}},actionsContainer:{width:150,borderColor:la},paginatorComponent:{borderBottom:0},checkBoxRow:{borderColor:la,padding:"0 10px 0 0"},loadingBox:{paddingTop:"100px",paddingBottom:"100px"},overlayColumnSelection:{position:"absolute",right:0,top:0},popoverContainer:{position:"relative"},popoverContent:{maxHeight:250,overflowY:"auto",padding:"0 10px 10px"},shownColumnsLabel:{color:"#9c9c9c",fontSize:12,padding:10,borderBottom:"#eaeaea 1px solid",width:"100%"},"@global":{".rowLine":{borderBottom:"1px solid ".concat(la),height:40,color:"#393939",fontSize:14,transitionDuration:.3,"&:focus":{outline:"initial"},"&:hover:not(.ReactVirtualized__Table__headerRow)":{userSelect:"none",backgroundColor:"#ececec",fontWeight:600,"&.canClick":{cursor:"pointer"},"&.canSelectText":{userSelect:"text"}},"& .selected":{color:"#081C42",fontWeight:600}},".headerItem":{userSelect:"none",fontWeight:700,fontSize:14,fontStyle:"initial",display:"flex",alignItems:"center",outline:"none"},".ReactVirtualized__Table__headerRow":{fontWeight:700,fontSize:14,borderColor:"#39393980",textTransform:"initial"},".optionsAlignment":{textAlign:"center"},".text-center":{textAlign:"center"},".text-right":{textAlign:"right"},".progress-enabled":{paddingTop:3,display:"inline-block",margin:"0 10px",position:"relative",width:18,height:18},".progress-enabled > .MuiCircularProgress-root":{position:"absolute",left:0,top:3}}},Ee),_e))}))((function(e){var t=e.itemActions,a=e.columns,r=e.onSelect,o=e.records,s=e.isLoading,l=e.loadingMessage,d=void 0===l?Object(n.jsx)(v.a,{component:"h3",children:"Loading..."}):l,j=e.entityName,m=e.selectedItems,h=e.idField,p=e.classes,O=e.radioSelection,g=void 0!==O&&O,f=e.customEmptyMessage,k=void 0===f?"":f,w=e.customPaperHeight,N=void 0===w?"":w,T=e.noBackground,E=void 0!==T&&T,A=e.columnsSelector,_=void 0!==A&&A,I=e.textSelectable,F=void 0!==I&&I,M=e.columnsShown,L=void 0===M?[]:M,D=e.onColumnChange,B=void 0===D?function(e,t){}:D,R=e.infiniteScrollConfig,P=e.sortConfig,z=e.autoScrollToBottom,K=void 0!==z&&z,W=Object(c.useState)(!1),U=Object(u.a)(W,2),V=U[0],G=U[1],q=i.a.useState(null),H=Object(u.a)(q,2),Y=H[0],Q=H[1],Z=t?t.find((function(e){return"view"===e.type})):null,J=function(e){G(!V),Q(e.currentTarget)},$=function(){G(!1),Q(null)};return Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(C.a,{className:"".concat(p.paper," ").concat(E?p.noBackground:""," ").concat(""!==N?N:p.defaultPaperHeight),children:[s&&Object(n.jsxs)(x.a,{container:!0,className:p.loadingBox,children:[Object(n.jsx)(x.a,{item:!0,xs:12,style:{textAlign:"center"},children:d}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]}),_&&!s&&o.length>0&&Object(n.jsx)("div",{className:p.overlayColumnSelection,children:function(e){return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(Mt.a,{"aria-describedby":"columnsSelector",color:"primary",onClick:J,children:Object(n.jsx)(Pt.a,{fontSize:"inherit"})}),Object(n.jsxs)(Lt.a,{anchorEl:Y,id:"columnsSelector",open:V,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:$,className:p.popoverContainer,children:[Object(n.jsx)("div",{className:p.shownColumnsLabel,children:"Shown Columns"}),Object(n.jsx)("div",{className:p.popoverContent,children:e.map((function(e){return Object(n.jsx)(sa,{label:e.label,checked:L.includes(e.elementKey),onChange:function(t){B(e.elementKey,t.target.checked)},id:"chbox-".concat(e.label),name:"chbox-".concat(e.label),value:e.label},"tableColumns-".concat(e.label))}))})]})]})}(a)}),o&&!s&&o.length>0?Object(n.jsx)(Bt.c,{isRowLoaded:function(e){var t=e.index;return!!o[t]},loadMoreRows:R?R.loadMoreRecords:function(){return new Promise((function(){return!0}))},rowCount:R?R.recordsCount:o.length,children:function(e){var i=e.onRowsRendered,s=e.registerChild;return Object(n.jsx)(Bt.a,{children:function(e){var l=e.width,d=e.height,u=function(e,t){var a=45*t;return a<80?80:a>e?e:a}(l,t?t.filter((function(e){return"view"!==e.type})).length:0),O=!(!r||!m),f=!!(t&&t.length>1||t&&1===t.length&&"view"!==t[0].type);return Object(n.jsxs)(Bt.d,{ref:s,disableHeader:!1,headerClassName:"headerItem",headerHeight:40,height:d,noRowsRenderer:function(){return Object(n.jsx)(c.Fragment,{children:""!==k?k:"There are no ".concat(j," yet.")})},overscanRowCount:10,rowHeight:40,width:l,rowCount:o.length,rowGetter:function(e){var t=e.index;return o[t]},onRowClick:function(e){!function(e){if(Z){var t=Z.sendOnlyId?e[h]:e;if(Z.to)return void b.push("".concat(Z.to,"/").concat(t));Z.onClick&&Z.onClick(t)}}(e.rowData)},rowClassName:"rowLine ".concat(Z?"canClick":""," ").concat(!Z&&F?"canSelectText":""),onRowsRendered:i,sort:P?P.triggerSort:void 0,sortBy:P?P.currentSort:void 0,sortDirection:P?P.currentDirection:void 0,scrollToIndex:K?o.length-1:-1,children:[O&&Object(n.jsx)(Bt.b,{headerRenderer:function(){return Object(n.jsx)(c.Fragment,{children:"Select"})},dataKey:h,width:45,cellRenderer:function(e){var t=e.rowData,a=!!m&&m.includes(Ft()(t)?t:t[h]);return Object(n.jsx)(Dt.a,{value:Ft()(t)?t:t[h],color:"primary",inputProps:{"aria-label":"secondary checkbox"},checked:a,onChange:r,onClick:function(e){e.stopPropagation()},checkedIcon:Object(n.jsx)("span",{className:g?p.radioSelectedIcon:p.checkedIcon}),icon:Object(n.jsx)("span",{className:g?p.radioUnselectedIcon:p.unCheckedIcon})})}}),ba(a,l,u,O,f,m||[],h,_,L,P?P.currentSort:"",P?P.currentDirection:void 0),f&&Object(n.jsx)(Bt.b,{headerRenderer:function(){return Object(n.jsx)(c.Fragment,{children:"Options"})},dataKey:h,width:u,headerClassName:"optionsAlignment",className:"optionsAlignment",cellRenderer:function(e){var a=e.rowData,c=!!m&&m.includes(Ft()(a)?a:a[h]);return function(e,t,a,c){return e.map((function(e,i){if("view"===e.type)return null;var r="string"===typeof t?t:t[c],o=!1;return e.disableButtonFunction&&e.disableButtonFunction(r)&&(o=!0),e.showLoaderFunction&&e.showLoaderFunction(r)?Object(n.jsx)("div",{className:"progress-enabled",children:Object(n.jsx)(S.a,{color:"primary",size:18,variant:"indeterminate"},"actions-loader-".concat(e.type,"-").concat(i.toString()))}):Object(n.jsx)(ca,{type:e.type,onClick:e.onClick,to:e.to,valueToSend:t,selected:a,idField:c,sendOnlyId:!!e.sendOnlyId,disabled:o},"actions-".concat(e.type,"-").concat(i.toString()))}))}(t||[],a,c,h)}})]})}})}}):Object(n.jsx)(c.Fragment,{children:!s&&Object(n.jsx)("div",{children:""!==k?k:"There are no ".concat(j," yet.")})})]})})})),ja=a(967),ma=a(968),ha=a(969),pa={content:'" "',borderLeft:"2px solid #9C9C9C",height:33,width:1,position:"absolute"},Oa=Object(s.b)((function(e){return{modalSnackMessage:e.system.modalSnackBar}}),{setModalSnackMessage:G}),ga=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({dialogContainer:{padding:"8px 15px 22px"},closeContainer:{textAlign:"right"},closeButton:{width:45,height:45,padding:0,backgroundColor:"initial","&:hover":{backgroundColor:"initial"},"&:active":{backgroundColor:"initial"}},modalCloseIcon:{fontSize:35,color:"#9C9C9C",fontWeight:300,"&:hover":{color:"#9C9C9C"}},closeIcon:{"&::before":Object(j.a)(Object(j.a)({},pa),{},{transform:"rotate(45deg)"}),"&::after":Object(j.a)(Object(j.a)({},pa),{},{transform:"rotate(-45deg)"}),"&:hover::before, &:hover::after":{borderColor:"#9C9C9C"},width:24,height:24,display:"block",position:"relative"},titleClass:{padding:"0px 50px 12px","& h2":{fontWeight:600,color:"#000",fontSize:22}},modalContent:{padding:"0 50px"},customDialogSize:{width:"100%",maxWidth:765}},We))}))(Oa((function(e){var t=e.onClose,a=e.modalOpen,i=e.title,r=e.children,o=e.classes,s=e.wideLimit,l=void 0===s||s,d=e.modalSnackMessage,b=e.noContentPadding,m=e.setModalSnackMessage,h=Object(c.useState)(!1),p=Object(u.a)(h,2),O=p[0],g=p[1];Object(c.useEffect)((function(){if(d){if(""===d.message)return void g(!1);g(!0)}}),[d]);var f=l?{classes:{paper:o.customDialogSize}}:{maxWidth:"md",fullWidth:!0};return Object(n.jsx)(ja.a,Object(j.a)(Object(j.a)({open:a,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},f),{},{children:Object(n.jsxs)("div",{className:o.dialogContainer,children:[Object(n.jsx)(Ce.a,{open:O,className:o.snackBarModal,onClose:function(){g(!1),m("")},message:d?d.message:"",ContentProps:{className:"".concat(o.snackBar," ").concat(d&&"error"===d.type?o.errorSnackBar:"")},autoHideDuration:d&&"error"===d.type?1e4:5e3}),Object(n.jsx)("div",{className:o.closeContainer,children:Object(n.jsx)(Mt.a,{"aria-label":"close",className:o.closeButton,onClick:t,disableRipple:!0,children:Object(n.jsx)("span",{className:o.closeIcon})})}),Object(n.jsx)(ma.a,{id:"alert-dialog-title",className:o.titleClass,children:i}),Object(n.jsx)(ha.a,{className:b?"":o.modalContent,children:r})]})}))}))),fa=Object(w.a)((function(e){return Object(k.a)({root:{borderRadius:0,"&::before":{borderColor:"#9c9c9c"}},disabled:{"&.MuiInput-underline::before":{borderColor:"#eaeaea",borderBottomStyle:"solid"}},input:{padding:"15px 30px 10px 5px",color:"#393939",fontSize:13,fontWeight:600,"&:placeholder":{color:"#393939",opacity:1}},error:{color:"#b53b4b"}})}));function xa(e){var t=fa();return Object(n.jsx)(f.a,Object(j.a)({InputProps:{classes:t}},e))}var va=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),{},{textBoxContainer:{flexGrow:1},textBoxWithIcon:{position:"relative",paddingRight:25},errorState:{color:"#b53b4b",fontSize:14,position:"absolute",top:7,right:7},overlayAction:{position:"absolute",right:0,top:15,"& svg":{maxWidth:15,maxHeight:15}}}))}))((function(e){var t=e.label,a=e.onChange,c=e.value,r=e.id,o=e.name,s=e.type,l=void 0===s?"text":s,d=e.autoComplete,b=void 0===d?"off":d,u=e.disabled,j=void 0!==u&&u,m=e.multiline,h=void 0!==m&&m,p=e.tooltip,O=void 0===p?"":p,g=e.index,f=void 0===g?0:g,v=e.error,y=void 0===v?"":v,S=e.required,C=void 0!==S&&S,k=e.placeholder,w=void 0===k?"":k,N=e.min,T=e.max,E=e.overlayIcon,A=void 0===E?null:E,_=e.overlayAction,I=e.classes,F={"data-index":f};return"number"===l&&N&&(F.min=N),"number"===l&&T&&(F.max=T),Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(I.fieldContainer," ").concat(""!==y?I.errorInField:""),children:[""!==t&&Object(n.jsxs)(ia.a,{htmlFor:r,className:I.inputLabel,children:[Object(n.jsxs)("span",{children:[t,C?"*":""]}),""!==O&&Object(n.jsx)("div",{className:I.tooltipContainer,children:Object(n.jsx)(ra.a,{title:O,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:I.tooltip})})})})]}),Object(n.jsx)("div",{className:I.textBoxContainer,children:Object(n.jsx)(xa,{id:r,name:o,fullWidth:!0,value:c,disabled:j,onChange:a,type:l,multiline:h,autoComplete:b,inputProps:F,error:""!==y,helperText:y,placeholder:w,className:I.inputRebase})}),A&&Object(n.jsx)("div",{className:I.overlayAction,children:Object(n.jsx)(Mt.a,{onClick:_?function(){_()}:function(){return null},size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:A})})]})})})),ya=a(457),Sa=a(956),Ca=a(1001),ka=a(970),wa=Object(N.a)((function(e){return Object(k.a)({root:{lineHeight:1,"label + &":{marginTop:e.spacing(3)}},input:{position:"relative",color:"#393939",fontSize:13,fontWeight:600,padding:"15px 20px 10px 10px",borderBottom:"1px solid #9c9c9c",display:"flex",alignItems:"center","&:hover":{borderColor:"#393939"},"&:focus":{backgroundColor:"#fff"}}})}))(ya.a),Na=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({},ke),Ne))}))((function(e){var t=e.classes,a=e.id,c=e.name,r=e.onChange,o=e.options,s=e.label,l=e.tooltip,d=void 0===l?"":l,b=e.value,u=e.disabled,j=void 0!==u&&u;return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.fieldContainer,children:[""!==s&&Object(n.jsxs)(ia.a,{htmlFor:a,className:t.inputLabel,children:[Object(n.jsx)("span",{children:s}),""!==d&&Object(n.jsx)("div",{className:t.tooltipContainer,children:Object(n.jsx)(ra.a,{title:d,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:t.tooltip})})})})]}),Object(n.jsx)(Sa.a,{fullWidth:!0,children:Object(n.jsx)(Ca.a,{id:a,name:c,value:b,onChange:r,input:Object(n.jsx)(wa,{}),disabled:j,children:o.map((function(e){return Object(n.jsx)(ka.a,{value:e.value,children:e.label},"select-".concat(c,"-").concat(e.label))}))})})]})})})),Ta=a(1014),Ea=a(971),Aa=a(1e3),_a=Object(w.a)(Object(j.a)({root:{"&:hover":{backgroundColor:"transparent"}}},_e)),Ia=function(e){var t=_a();return Object(n.jsx)(Aa.a,Object(j.a)({className:t.root,disableRipple:!0,color:"default",checkedIcon:Object(n.jsx)("span",{className:t.radioSelectedIcon}),icon:Object(n.jsx)("span",{className:t.radioUnselectedIcon})},e))},Fa=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),{},{radioBoxContainer:{},fieldContainer:Object(j.a)(Object(j.a)({},ke.fieldContainer),{},{display:"flex",justifyContent:"space-between",borderBottom:"#9c9c9c 1px solid",paddingBottom:10,marginTop:11}),optionLabel:{"&.Mui-disabled":{"& .MuiFormControlLabel-label":{color:"#9c9c9c"}},"&:last-child":{marginRight:0},"& .MuiFormControlLabel-label":{fontSize:12,color:"#000"}},checkedOption:{"& .MuiFormControlLabel-label":{fontSize:12,color:"#000",fontWeight:700}}}))}))((function(e){var t=e.selectorOptions,a=void 0===t?[]:t,c=e.currentSelection,r=e.label,o=e.id,s=e.name,l=e.onChange,d=e.tooltip,b=void 0===d?"":d,u=e.disableOptions,j=void 0!==u&&u,m=e.classes,h=e.displayInColumn,p=void 0!==h&&h;return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:m.fieldContainer,children:[Object(n.jsxs)(ia.a,{htmlFor:o,className:m.inputLabel,children:[Object(n.jsx)("span",{children:r}),""!==b&&Object(n.jsx)("div",{className:m.tooltipContainer,children:Object(n.jsx)(ra.a,{title:b,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:m.tooltip})})})})]}),Object(n.jsx)("div",{className:m.radioBoxContainer,children:Object(n.jsx)(Ta.a,{"aria-label":o,id:o,name:s,value:c,onChange:l,row:!p,children:a.map((function(e){return Object(n.jsx)(Ea.a,{value:e.value,control:Object(n.jsx)(Ia,{}),label:e.label,disabled:j,className:Object(xe.a)(m.optionLabel,Object(fe.a)({},m.checkedOption,e.value===c))},"rd-".concat(s,"-").concat(e.value))}))})})]})})})),Ma=a(1007),La=a(972),Da=Object(N.a)({root:{alignItems:"flex-start",height:18,padding:"0 12px",display:"flex",position:"relative"},switchBase:{color:"#fff",padding:0,top:"initial","&$checked":{color:"#fff"},"&$checked + $track":{backgroundColor:"#081C42",opacity:1,height:15},"&:hover":{backgroundColor:"#fff"}},checked:{},track:{height:15,backgroundColor:"#9C9C9C",border:"#081C42 1px solid",opacity:1,padding:0,marginTop:1.5,"&$checked":{backgroundColor:"#081C42"}},thumb:{backgroundColor:"#fff",border:"#081C42 1px solid",boxShadow:"none",width:18,height:18,padding:0,marginLeft:10}})(La.a),Ba=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column",paddingTop:15,boxShadow:"none"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noFound:{textAlign:"center",padding:"10px 0"},tableContainer:{maxHeight:200},stickyHeader:{backgroundColor:"#fff"},actionsTitle:{fontWeight:600,color:"#081C42",fontSize:16,alignSelf:"center"},tableBlock:{marginTop:15},filterField:{width:375,fontWeight:600,"& .input":{"&::placeholder":{fontWeight:600,color:"#081C42"}}},divContainer:{borderBottom:"#9c9c9c 1px solid",paddingBottom:14,marginBottom:20,maxWidth:840},wrapperContainer:{display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:840},indicatorLabel:{fontSize:12,fontWeight:600,color:"#081C42",margin:"0 8px 0 10px"},fieldDescription:{marginTop:4,color:"#999999"}},Ie),ke))}))((function(e){var t=e.label,a=void 0===t?"":t,c=e.onChange,r=e.value,o=e.id,s=e.name,l=e.checked,d=void 0!==l&&l,b=e.disabled,u=void 0!==b&&b,j=e.switchOnly,m=void 0!==j&&j,h=e.tooltip,p=void 0===h?"":h,O=e.description,g=void 0===O?"":O,f=e.indicatorLabels,y=void 0===f?[]:f,S=e.containerClass,C=void 0===S?"":S,k=e.classes,w=Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)("div",{className:"".concat(k.switchContainer," ").concat(C),children:[Object(n.jsx)(Da,{checked:d,onChange:c,color:"primary",name:s,inputProps:{"aria-label":"primary checkbox"},disabled:u,disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0,value:r}),2===y.length&&Object(n.jsx)("span",{className:k.indicatorLabel,children:d?y[0]:y[1]})]})});return m?w:Object(n.jsxs)("div",{className:k.divContainer,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:k.wrapperContainer,children:[""!==a&&Object(n.jsxs)(ia.a,{htmlFor:o,className:k.inputLabel,children:[Object(n.jsx)("span",{children:a}),""!==p&&Object(n.jsx)("div",{className:k.tooltipContainer,children:Object(n.jsx)(ra.a,{title:p,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:k.tooltip})})})})]}),w]}),""!==g&&Object(n.jsx)(x.a,{item:!0,xs:10,children:Object(n.jsx)(v.a,{component:"p",className:k.fieldDescription,children:g})})]})})),Ra=Object(s.b)((function(e){return{addBucketModalOpen:e.buckets.open,bucketName:e.buckets.addBucketName,versioningEnabled:e.buckets.addBucketVersioningEnabled,lockingEnabled:e.buckets.addBucketLockingEnabled,quotaEnabled:e.buckets.addBucketQuotaEnabled,quotaType:e.buckets.addBucketQuotaType,quotaSize:e.buckets.addBucketQuotaSize,quotaUnit:e.buckets.addBucketQuotaUnit,retentionEnabled:e.buckets.addBucketRetentionEnabled,retentionMode:e.buckets.addBucketRetentionMode,retentionUnit:e.buckets.addBucketRetentionUnit,retentionValidity:e.buckets.addBucketRetentionValidity}}),{addBucketName:function(e){return{type:xt,name:e}},addBucketVersioned:function(e){return{type:vt,versioned:e}},enableObjectLocking:function(e){return{type:yt,locking:e}},addBucketQuota:function(e){return{type:St,quota:e}},addBucketQuotaType:function(e){return{type:Ct,quotaType:e}},addBucketQuotaSize:function(e){return{type:kt,quotaSize:e}},addBucketQuotaUnit:function(e){return{type:wt,quotaUnit:e}},addBucketRetention:function(e){return{type:Tt,retention:e}},addBucketRetentionMode:function(e){return{type:Et,retentionMode:e}},addBucketRetentionUnit:function(e){return{type:At,retentionUnit:e}},addBucketRetentionValidity:function(e){return{type:_t,retentionValidity:e}},setModalError:q})(Object(N.a)((function(e){return Object(k.a)(Object(j.a)({buttonContainer:{textAlign:"right"},multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"},quotaSizeContainer:{flexGrow:1},sizeFactorContainer:{flexGrow:0,maxWidth:80,marginLeft:8,alignSelf:"flex-start"}},we))}))((function(e){var t=e.classes,a=e.open,r=e.closeModalAndRefresh,o=e.addBucketName,s=e.addBucketVersioned,l=e.enableObjectLocking,d=e.addBucketQuota,b=e.addBucketQuotaType,j=e.addBucketQuotaSize,m=e.addBucketQuotaUnit,h=e.addBucketRetention,p=e.addBucketRetentionMode,O=e.addBucketRetentionUnit,f=e.addBucketRetentionValidity,S=e.setModalError,C=e.bucketName,k=e.versioningEnabled,w=e.lockingEnabled,N=e.quotaEnabled,T=e.quotaType,E=e.quotaSize,A=e.quotaUnit,_=e.retentionEnabled,I=e.retentionMode,F=e.retentionUnit,M=e.retentionValidity,L=Object(c.useState)(!1),D=Object(u.a)(L,2),B=D[0],R=D[1],P=Object(c.useState)(!1),z=Object(u.a)(P,2),K=z[0],W=z[1],U=Object(c.useState)(!1),V=Object(u.a)(U,2),G=V[0],q=V[1],H=Object(Ma.a)(C,1e3),Y=Object(u.a)(H,1)[0];Object(c.useEffect)((function(){o(Y)}),[Y,o]);var Q=function(){o(""),s(!1),l(!1),d(!1),b("hard"),j("1"),m("TiB"),h(!1),p("compliance"),O("days"),f(1)};return Object(c.useEffect)((function(){var e=!1;""!==C.trim()&&(e=!0),N&&e&&(""!==E.trim()&&0!==parseInt(E)||(e=!1)),k&&_||(h(!1),p("compliance"),O("days"),f(1)),_?(l(!0),q(!0)):q(!1),_&&(Number.isNaN(M)||M<1)&&(e=!1),W(e)}),[C,_,w,T,E,A,N,h,p,O,f,M,k,l]),Object(n.jsx)(ga,{title:"Create Bucket",modalOpen:a,onClose:function(){r(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){if(e.preventDefault(),!B){R(!0);var t={name:C,versioning:k,locking:w};if(N){var a=oe(E,A,!1);t.quota={enabled:!0,quota_type:T,amount:parseInt(a)}}_&&(t.retention={mode:I,unit:F,validity:M}),he.invoke("POST","/api/v1/buckets",t).then((function(e){R(!1),r(!0)})).catch((function(e){R(!1),S(e)})),Q()}}(e)},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"bucket-name",name:"bucket-name",onChange:function(e){o(e.target.value)},label:"Bucket Name",value:C})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(v.a,{component:"h6",variant:"h6",children:"Features"}),Object(n.jsx)("hr",{})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"versioned",id:"versioned",name:"versioned",checked:k,onChange:function(e){s(e.target.checked)},description:"Allows to keep multiple versions of the same object under the same key.",label:"Versioning",indicatorLabels:["On","Off"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"locking",id:"locking",name:"locking",disabled:G,checked:w,onChange:function(e){l(e.target.checked)},label:"Object Locking",description:"Required to support retention and legal hold. Can only be enabled at bucket creation.",indicatorLabels:["On","Off"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"bucket_quota",id:"bucket_quota",name:"bucket_quota",checked:N,onChange:function(e){d(e.target.checked)},label:"Quota",description:"Limit the amount of data in the bucket.",indicatorLabels:["On","Off"]})}),N&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:T,id:"quota_type",name:"quota_type",label:"Quota Type",onChange:function(e){b(e.target.value)},selectorOptions:[{value:"hard",label:"Hard"},{value:"fifo",label:"FIFO"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)("div",{className:t.multiContainer,children:[Object(n.jsx)("div",{className:t.quotaSizeContainer,children:Object(n.jsx)(va,{type:"number",id:"quota_size",name:"quota_size",onChange:function(e){j(e.target.value)},label:"Quota",value:E,required:!0,min:"1"})}),Object(n.jsx)("div",{className:t.sizeFactorContainer,children:Object(n.jsx)(Na,{label:"\xa0",id:"quota_unit",name:"quota_unit",value:A,onChange:function(e){m(e.target.value)},options:te.map((function(e){return{label:e,value:e}}))})})]})})]}),k&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"bucket_retention",id:"bucket_retention",name:"bucket_retention",checked:_,onChange:function(e){h(e.target.checked)},label:"Retention",description:"Impose rules to prevent object deletion for a period of time.",indicatorLabels:["On","Off"]})}),_&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:I,id:"retention_mode",name:"retention_mode",label:"Retention Mode",onChange:function(e){p(e.target.value)},selectorOptions:[{value:"compliance",label:"Compliance"},{value:"governance",label:"Governance"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:F,id:"retention_unit",name:"retention_unit",label:"Retention Unit",onChange:function(e){O(e.target.value)},selectorOptions:[{value:"days",label:"Days"},{value:"years",label:"Years"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",id:"retention_validity",name:"retention_validity",onChange:function(e){f(e.target.valueAsNumber)},label:"Retention Validity",value:String(M),required:!0,min:"1"})})]})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:Q,children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:B||!K,children:"Save"})]}),B&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),Pa=a(973),za=a(974),Ka={setErrorSnackMessage:V},Wa=Object(s.b)(null,Ka)((function(e){var t=e.closeDeleteModalAndRefresh,a=e.deleteOpen,i=e.selectedBucket,r=e.setErrorSnackMessage,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1];return Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete Bucket"}),Object(n.jsxs)(ha.a,{children:[l&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete bucket ",Object(n.jsx)("b",{children:i}),"? ",Object(n.jsx)("br",{}),"A bucket can only be deleted if it's empty."]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:l,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){l||(d(!0),he.invoke("DELETE","/api/v1/buckets/".concat(i),{name:i}).then((function(e){d(!1),t(!0)})).catch((function(e){d(!1),r(e)})))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),Ua=Object(N.a)((function(e){return Object(k.a)({headerContainer:{position:"absolute",width:"100%",height:77,display:"flex",backgroundColor:"#fff",borderBottom:"#E3E3E3 1px solid",left:0},label:{display:"flex",justifyContent:"flex-start",alignItems:"center"},labelStyle:{color:"#000",fontSize:18,fontWeight:700,marginLeft:55,marginTop:8}})}))((function(e){var t=e.classes,a=e.label;return Object(n.jsx)(x.a,{container:!0,className:t.headerContainer,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:t.label,children:Object(n.jsx)(v.a,{variant:"h4",className:t.labelStyle,children:a})})})})),Va=a(401),Ga=a.n(Va),qa=a(400),Ha=a.n(qa),Ya=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},Me))}))((function(e){var t=e.classes,a=e.label,i=void 0===a?"":a,r=e.content,o=e.multiLine,s=void 0!==o&&o;return Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)(x.a,{className:t.prefinedContainer,children:[""!==i&&Object(n.jsx)(x.a,{item:!0,xs:12,className:t.predefinedTitle,children:i}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.predefinedList,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:s?t.innerContentMultiline:t.innerContent,children:r})})]})})})),Qa=Object(N.a)((function(e){return Object(k.a)({wizardStepContainer:{display:"flex",flexDirection:"column"},wizardComponent:{overflowY:"auto",marginBottom:10,height:"calc(100vh - 435px)",maxWidth:840,width:"100%"},wizardModal:{overflowY:"auto",marginBottom:10,height:"calc(100vh - 515px)"},buttonsContainer:{display:"flex",flexDirection:"row",justifyContent:"flex-start",padding:"10px 0",borderTop:"#EAEAEA 1px solid","& button":{marginLeft:10},"&.forModal":{paddingBottom:0}},buttonInnerContainer:{maxWidth:840,width:"100%",textAlign:"right"}})}))((function(e){var t=e.classes,a=e.page,c=e.pageChange,i=e.loadingStep,r=e.forModal;return Object(n.jsxs)("div",{className:t.wizardStepContainer,children:[Object(n.jsx)("div",{className:r?t.wizardModal:t.wizardComponent,children:a.componentRender}),i&&Object(n.jsx)("div",{children:Object(n.jsx)(y.a,{})}),Object(n.jsx)("div",{className:"".concat(t.buttonsContainer," ").concat(r?"forModal":""),children:Object(n.jsx)("div",{className:t.buttonInnerContainer,children:a.buttons.map((function(e){return Object(n.jsx)(g.a,{variant:"contained",color:"primary",size:"small",onClick:function(){!function(e){switch(e.type){case"next":c("++");break;case"back":c("--");break;case"to":c(e.toPage||0)}e.action&&e.action(c)}(e)},disabled:!e.enabled,children:e.label},"button-".concat(a.label,"-").concat(e.label))}))})})]})})),Za=Object(N.a)((function(e){return Object(k.a)({wizardMain:{display:"flex",width:"100%",height:"100%",flexGrow:1},wizFromContainer:{height:"calc(100vh - 365px)",minHeight:450,padding:"0 30px"},wizFromModal:{position:"relative"},wizardSteps:{minWidth:180,marginRight:10,borderRight:"#eaeaea 1px solid",display:"flex",flexGrow:1,flexDirection:"column",height:"100%","& ul":{padding:"0 15px 0 40px",marginTop:0,"& li":{listStyle:"lower-roman",marginBottom:12}}},modalWizardSteps:{padding:5,borderBottom:"#eaeaea 1px solid","& ul":{padding:0,marginTop:0,display:"flex",justifyContent:"space-evenly","& li":{listStyle:"lower-roman","&::marker":{paddingLeft:15}}}},buttonList:{backgroundColor:"transparent",border:"none",cursor:"pointer","&:not(:disabled):hover":{textDecoration:"underline"},"&:selected, &:active, &:focus, &:focus:active":{border:"none",outline:0,boxShadow:"none"}},paddedContentGrid:{padding:"0 10px"},stepsLabel:{fontSize:20,color:"#393939",fontWeight:600,margin:"15px 12px","&.stepsModalTitle":{textAlign:"center",width:"100%",marginTop:0,marginBottom:10}},stepsMasterContainer:{position:"sticky",top:0,backgroundColor:"#FFFFFF",width:"100%",maxHeight:90}})}))((function(e){var t=e.classes,a=e.wizardSteps,i=e.loadingStep,r=e.forModal,o=Object(c.useState)(0),s=Object(u.a)(o,2),l=s[0],d=s[1],b=function(e){var t=a.length-1;if("++"===e){var n=l+1;n>t&&(n=t),d(n)}if("--"===e){var c=l-1;c<0&&(c=0),d(c)}if("number"===typeof e){var i=e;e<0&&(i=0),e>t&&(i=t),d(i)}};if(0===a.length)return null;var j=function(){return Object(n.jsx)("ul",{children:a.map((function(e,a){return Object(n.jsx)("li",{children:Object(n.jsx)("button",{onClick:function(){return b(a)},disabled:a>l,className:t.buttonList,children:e.label})},"wizard-".concat(a.toString()))}))})};return Object(n.jsxs)(x.a,{container:!0,className:r?t.wizFromModal:t.wizFromContainer,children:[r?Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)("div",{className:t.stepsMasterContainer,children:[Object(n.jsx)("div",{className:"".concat(t.stepsLabel," stepsModalTitle"),children:"Steps"}),Object(n.jsx)("div",{className:t.modalWizardSteps,children:j()})]})}):Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,sm:3,md:3,lg:3,xl:2,children:Object(n.jsxs)("div",{className:t.wizardSteps,children:[Object(n.jsx)("span",{className:t.stepsLabel,children:"Steps"}),j()]})})}),Object(n.jsx)(x.a,{item:!0,xs:12,sm:r?12:9,md:r?12:9,lg:r?12:9,xl:r?12:10,className:r?"":t.paddedContentGrid,children:Object(n.jsx)(Qa,{page:a[l],pageChange:b,loadingStep:i,forModal:r})})]})})),Ja=Object(s.b)(null,{setModalErrorSnackMessage:q}),$a=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"},remoteBucketList:{display:"grid",gridTemplateColumns:"auto auto 45px",alignItems:"center",justifyContent:"stretch"},errorIcon:{color:"#C72C48"},successIcon:{color:"#42C91A"},hide:{opacity:0,transitionDuration:"0.3s"}},we),Ue))}))(Ja((function(e){var t=e.open,a=e.closeModalAndRefresh,i=e.classes,r=e.buckets,o=e.setModalErrorSnackMessage,s=Object(c.useState)([]),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(!1),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(!1),g=Object(u.a)(O,2),f=g[0],v=g[1],y=Object(c.useState)(""),S=Object(u.a)(y,2),C=S[0],k=S[1],w=Object(c.useState)(""),N=Object(u.a)(w,2),T=N[0],E=N[1],A=Object(c.useState)(""),_=Object(u.a)(A,2),I=_[0],F=_[1],M=Object(c.useState)(""),L=Object(u.a)(M,2),D=L[0],B=L[1],R=Object(c.useState)(!0),P=Object(u.a)(R,2),z=P[0],K=P[1],W=Object(c.useState)([]),U=Object(u.a)(W,2),V=U[0],G=U[1],q=Object(c.useState)([]),H=Object(u.a)(q,2),Y=H[0],Q=H[1],J=Object(c.useState)([]),$=Object(u.a)(J,2),X=$[0],ee=$[1],te=Y.map((function(e){return{label:e,value:e}}));Object(c.useEffect)((function(){if(0===V.length){var e=[],t=[];r.forEach((function(a){e.push(a),t.push("")})),G(t),b(e)}}),[r,V.length]);var ae=function(e){var t=e.errString;switch(t){case"":return Object(n.jsx)("div",{className:i.successIcon,children:Object(n.jsx)(Ha.a,{})});case"n/a":return null;default:if(t)return Object(n.jsx)("div",{className:i.errorIcon,children:Object(n.jsx)(ra.a,{title:t,placement:"top-start",children:Object(n.jsx)(Ga.a,{})})})}return null},ne=function(e,t){var a=Object(Je.a)(V);a[e]=t,G(a)},ce=function(e){var t=Object(Je.a)(d),a=Object(Je.a)(V);e.forEach((function(e){var n=Z()(e,"errorString","");if(!n||""===n){var c=t.indexOf(e.originBucket);t.splice(c,1),a.splice(c,1)}})),b(t),G(a)};return Object(n.jsx)(ga,{modalOpen:t,onClose:function(){a(!1)},title:"Set Multiple Bucket Replication",children:Object(n.jsx)(Za,{loadingStep:h||f,wizardSteps:[{label:"Remote Configuration",componentRender:Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ya,{label:"Local Buckets to replicate",content:d.join(", ")})}),Object(n.jsx)("h4",{children:"Remote Endpoint Configuration"}),Object(n.jsx)("span",{className:i.descriptionText,children:"Please avoid the use of root credentials for this feature"}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"accessKey",name:"accessKey",onChange:function(e){k(e.target.value)},label:"Access Key",value:C})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"secretKey",name:"secretKey",onChange:function(e){E(e.target.value)},label:"Secret Key",value:T})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"targetURL",name:"targetURL",onChange:function(e){F(e.target.value)},placeholder:"play.min.io:9000",label:"Target URL",value:I})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{checked:z,id:"useTLS",name:"useTLS",label:"Use TLS",onChange:function(e){K(e.target.checked)},value:"yes"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"region",name:"region",onChange:function(e){B(e.target.value)},label:"Region",value:D})})]}),buttons:[{type:"custom",label:"Next",enabled:!f,action:function(e){var t={accessKey:C,secretKey:T,targetURL:I,useTLS:z};v(!0),he.invoke("POST","api/v1/list-external-buckets",t).then((function(t){var a=Z()(t,"buckets",[]);if(a&&a.length>0){var n=a.map((function(e){return e.name}));Q(n)}e("++"),v(!1)})).catch((function(e){v(!1),o(e)}))}}]},{label:"Buckets Assignation",componentRender:Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("h3",{children:"Remote Buckets Assignation"}),Object(n.jsx)("span",{className:i.descriptionText,children:"Please select / type the desired remote bucket were you want the local data to be replicated."}),Object(n.jsx)("div",{className:i.remoteBucketList,children:d.map((function(e,t){var a,r=function(e){if(X.length>0){var t=X.find((function(t){return t.originBucket===e}));if(t)return Z()(t,"errorString","")||""}return"n/a"}(e);return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("div",{className:""===r?i.hide:"",children:e}),Object(n.jsx)("div",{className:""===r?i.hide:"",children:(a=t,Y.length>0?Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(Na,{label:"",id:"assign-bucket-".concat(a),name:"assign-bucket-".concat(a),value:V[a],onChange:function(e){ne(a,e.target.value)},options:te,disabled:h})}):Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(va,{id:"assign-bucket-".concat(a),name:"assign-bucket-".concat(a),label:"",onChange:function(e){ne(a,e.target.value)},value:V[a],disabled:h})}))}),Object(n.jsx)("div",{className:""===r?i.hide:"",children:X.length>0&&Object(n.jsx)(ae,{errString:r})})]},"buckets-assignation-".concat(t.toString(),"-").concat(e))}))})]}),buttons:[{type:"back",label:"Back",enabled:!0},{type:"next",label:"Create",enabled:!h,action:function(){p(!0);var e=d.map((function(e,t){return{originBucket:e,destinationBucket:V[t]}})),t="".concat(z?"https://":"http://").concat(I),n={accessKey:C,secretKey:T,targetURL:t,region:D,bucketsRelation:e};he.invoke("POST","/api/v1/buckets-replication",n).then((function(e){p(!1);var t=e.replicationState;ee(t),0===t.filter((function(e){return e.errorString&&""!==e.errorString})).length?a(!0):setTimeout((function(){ce(t)}),500)})).catch((function(e){p(!1),o(e)}))}}]}],forModal:!0})})}))),Xa=Object(s.b)((function(e){return{addBucketModalOpen:e.buckets.open}}),{addBucketOpen:function(e){return{type:ft,open:e}},addBucketReset:function(){return{type:Nt}},setErrorSnackMessage:V})(Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.addBucketOpen,i=e.addBucketModalOpen,r=e.addBucketReset,o=e.setErrorSnackMessage,s=Object(c.useState)([]),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(!0),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(!1),v=Object(u.a)(O,2),y=v[0],S=v[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(!0),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(!1),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)([]),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Object(c.useState)(!1),G=Object(u.a)(V,2),q=G[0],H=G[1];Object(c.useEffect)((function(){M&&he.invoke("POST","/api/v1/has-permission",{actions:[{id:"createBucket",action:"s3:CreateBucket"}]}).then((function(e){if(L(!1),e.permissions){var t=(e.permissions?e.permissions:[]).find((function(e){return"createBucket"===e.id}));t&&t.can?P(!0):P(!1),L(!1)}})).catch((function(e){L(!1),o(e)}))}),[M,o]),Object(c.useEffect)((function(){if(h){p(!0),he.invoke("GET","/api/v1/buckets").then((function(e){p(!1),b(e.buckets||[])})).catch((function(e){p(!1),o(e)}))}}),[h,o]);var Y=[{type:"view",to:"/buckets",sendOnlyId:!0},{type:"delete",onClick:function(e){S(!0),N(e)},sendOnlyId:!0}],Q=d.filter((function(e){return""===A||e.name.indexOf(A)>=0}));return Object(n.jsxs)(c.Fragment,{children:[i&&Object(n.jsx)(Ra,{open:i,closeModalAndRefresh:function(e){a(!1),r(),e&&(p(!0),U([]))}}),y&&Object(n.jsx)(Wa,{deleteOpen:y,selectedBucket:w,closeDeleteModalAndRefresh:function(e){!function(e){S(!1),e&&(p(!0),U([]))}(e)}}),q&&Object(n.jsx)($a,{open:q,buckets:W,closeModalAndRefresh:function(e){H(!1),e&&U([])}}),Object(n.jsx)(Ua,{label:"Buckets"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Buckets",className:t.searchField,id:"search-resource",label:"",onChange:function(e){_(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(at.a,{}),onClick:function(){H(!0)},disabled:0===W.length,children:"Set Replication"}),R&&Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){a(!0)},children:"Create Bucket"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:Y,columns:[{label:"Name",elementKey:"name"},{label:"Creation Date",elementKey:"creation_date",renderFunction:function(e){return Object(n.jsx)(ct.a,{children:e})}},{label:"Size",elementKey:"size",renderFunction:ce,width:60,contentTextAlign:"right"}],isLoading:h,records:Q,entityName:"Buckets",idField:"name",selectedItems:W,onSelect:function(e){var t=e.target,a=t.value,n=t.checked,c=Object(Je.a)(W);return n?c.push(a):c=c.filter((function(e){return e!==a})),U(c),c}})})]})})]})}))),en=a(229),tn=a(998),an=a(981),nn=Object(s.b)(null,{setModalErrorSnackMessage:q}),cn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},we))}))(nn((function(e){var t=e.classes,a=e.open,i=e.bucketName,r=e.actualPolicy,o=e.closeModalAndRefresh,s=e.setModalErrorSnackMessage,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(""),h=Object(u.a)(m,2),p=h[0],O=h[1];return Object(c.useEffect)((function(){O(r)}),[O,r]),Object(n.jsx)(ga,{title:"Change Access Policy",modalOpen:a,onClose:function(){o()},children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b||(j(!0),he.invoke("PUT","/api/v1/buckets/".concat(i,"/set-policy"),{access:p}).then((function(e){j(!1),o()})).catch((function(e){j(!1),s(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.formScrollable,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{value:p,label:"Access Policy",id:"select-access-policy",name:"select-access-policy",onChange:function(e){O(e.target.value)},options:[{value:"PRIVATE",label:"Private"},{value:"PUBLIC",label:"Public"}]})})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",fullWidth:!0,disabled:b,children:"Set"})}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),rn=Object(s.b)(null,{setModalErrorSnackMessage:q}),on=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},we))}))(rn((function(e){var t=e.classes,a=e.open,i=e.bucketName,r=e.closeModalAndRefresh,o=e.setModalErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)("compliance"),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)("days"),f=Object(u.a)(O,2),v=f[0],S=f[1],C=Object(c.useState)(1),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(!1),E=Object(u.a)(T,2),A=E[0],_=E[1];return Object(c.useEffect)((function(){Number.isNaN(w)||w<1?_(!1):_(!0)}),[w]),Object(n.jsx)(ga,{title:"Set Retention Configuration",modalOpen:a,onClose:function(){r()},children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d||(b(!0),he.invoke("PUT","/api/v1/buckets/".concat(i,"/retention"),{mode:h,unit:v,validity:w}).then((function(){b(!1),r()})).catch((function(e){b(!1),o(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:h,id:"retention_mode",name:"retention_mode",label:"Retention Mode",onChange:function(e){p(e.target.value)},selectorOptions:[{value:"compliance",label:"Compliance"},{value:"governance",label:"Governance"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:v,id:"retention_unit",name:"retention_unit",label:"Retention Unit",onChange:function(e){S(e.target.value)},selectorOptions:[{value:"days",label:"Days"},{value:"years",label:"Years"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",id:"retention_validity",name:"retention_validity",onChange:function(e){N(e.target.valueAsNumber)},label:"Retention Validity",value:String(w),required:!0,min:"1"})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",fullWidth:!0,disabled:d||!A,children:"Set"})}),d&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),sn=a(977),ln=a(978),dn=a(979),bn=a(980),un=a(976),jn=Object(s.b)(null,{setModalErrorSnackMessage:q}),mn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},we))}))(jn((function(e){var t=e.classes,a=e.open,i=e.selectedBucket,r=e.closeModalAndRefresh,o=e.setModalErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(""),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(""),f=Object(u.a)(O,2),v=f[0],S=f[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)([]),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)([]),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useCallback)((function(){b(!0),he.invoke("GET","/api/v1/admin/arns").then((function(e){var t=[];null!==e.arns&&(t=e.arns),b(!1),L(t)})).catch((function(e){b(!1),o(e)}))}),[o]);Object(c.useEffect)((function(){D()}),[D]);var B=function(e,t){var a=A.indexOf(t),n=[];-1===a?n=n.concat(A,t):0===a?n=n.concat(A.slice(1)):a===A.length-1?n=n.concat(A.slice(0,-1)):a>0&&(n=n.concat(A.slice(0,a),A.slice(a+1))),_(n)},R=M.map((function(e){return{label:e,value:e}}));return Object(n.jsx)(ga,{modalOpen:a,onClose:function(){r()},title:"Subscribe To Event",children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d||(b(!0),he.invoke("POST","/api/v1/buckets/".concat(i,"/events"),{configuration:{arn:w,events:A,prefix:h,suffix:v},ignoreExisting:!0}).then((function(){b(!1),r()})).catch((function(e){b(!1),o(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{onChange:function(e){N(e.target.value)},id:"select-access-policy",name:"select-access-policy",label:"ARN",value:w,options:R})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(un.a,{size:"medium",children:[Object(n.jsx)(sn.a,{className:t.minTableHeader,children:Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{children:"Select"}),Object(n.jsx)(dn.a,{children:"Event"})]})}),Object(n.jsx)(bn.a,{children:[{label:"PUT - Object Uploaded",value:"put"},{label:"GET - Object accessed",value:"get"},{label:"DELETE - Object Deleted",value:"delete"}].map((function(e){return Object(n.jsxs)(ln.a,{onClick:function(t){return B(0,e.value)},children:[Object(n.jsx)(dn.a,{padding:"checkbox",children:Object(n.jsx)(Dt.a,{value:e.value,color:"primary",inputProps:{"aria-label":"secondary checkbox"},onChange:function(t){return B(0,e.value)},checked:A.includes(e.value)})}),Object(n.jsx)(dn.a,{className:t.wrapCell,children:e.label})]},"group-".concat(e.value))}))})]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"prefix-input",name:"prefix-input",label:"Prefix",value:h,onChange:function(e){p(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"suffix-input",name:"suffix-input",label:"Suffix",value:v,onChange:function(e){S(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:d,children:"Save"})}),d&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),hn=Object(s.b)(null,{setErrorSnackMessage:V})((function(e){var t=e.closeDeleteModalAndRefresh,a=e.deleteOpen,i=e.selectedBucket,r=e.bucketEvent,o=e.setErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1];return Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete Event"}),Object(n.jsxs)(ha.a,{children:[d&&Object(n.jsx)(y.a,{}),Object(n.jsx)(Pa.a,{id:"alert-dialog-description",children:"Are you sure you want to delete this event?"})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:d,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){!function(){if(!d&&null!=r){b(!0);var e=Z()(r,"events",[]),a=Z()(r,"prefix",""),n=Z()(r,"suffix","");he.invoke("DELETE","/api/v1/buckets/".concat(i,"/events/").concat(r.arn),{events:e,prefix:a,suffix:n}).then((function(e){b(!1),t(!0)})).catch((function(e){b(!1),o(e)}))}}()},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),pn=Object(s.b)(null,{setModalErrorSnackMessage:q}),On=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},we))}))(pn((function(e){var t=e.open,a=e.closeModalAndRefresh,i=e.classes,r=e.bucketName,o=e.setModalErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(""),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(""),f=Object(u.a)(O,2),v=f[0],S=f[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(""),F=Object(u.a)(I,2),M=F[0],L=F[1];return Object(n.jsx)(ga,{modalOpen:t,onClose:function(){a()},title:"Set Bucket Replication",children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b(!0),function(){var e={accessKey:h,secretKey:v,targetURL:w,region:M,bucketsRelation:[{originBucket:r,destinationBucket:A}]};he.invoke("POST","/api/v1/buckets-replication",e).then((function(e){b(!1);var t=Z()(e,"replicationState",[]);if(t.length>0){var n=t[0];return b(!1),n.errorString&&""!==n.errorString?void o(n.errorString):void a()}o("No changes applied")})).catch((function(e){b(!1),o(e)}))}()},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:i.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"accessKey",name:"accessKey",onChange:function(e){p(e.target.value)},label:"Access Key",value:h})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"secretKey",name:"secretKey",onChange:function(e){S(e.target.value)},label:"Secret Key",value:v})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"targetURL",name:"targetURL",onChange:function(e){N(e.target.value)},placeholder:"https://play.min.io:9000",label:"Target URL",value:w})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"targetBucket",name:"targetBucket",onChange:function(e){_(e.target.value)},label:"Target Bucket",value:A})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"region",name:"region",onChange:function(e){L(e.target.value)},label:"Region",value:M})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:i.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:d,children:"Save"})}),d&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),gn=Object(s.b)(null,{setModalErrorSnackMessage:q}),fn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},we))}))(gn((function(e){var t=e.classes,a=e.open,i=(e.encryptionEnabled,e.encryptionCfg),r=e.selectedBucket,o=e.closeModalAndRefresh,s=e.setModalErrorSnackMessage,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(""),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)("disabled"),v=Object(u.a)(f,2),S=v[0],C=v[1];Object(c.useEffect)((function(){i&&("AES256"===i.algorithm?C("sse-s3"):(C("sse-kms"),O(i.kmsMasterKeyID)))}),[i]);return Object(n.jsx)(ga,{modalOpen:a,onClose:function(){o()},title:"Enable Bucket Encryption",children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b||("disabled"===S?he.invoke("POST","/api/v1/buckets/".concat(r,"/encryption/disable")).then((function(){j(!1),o()})).catch((function(e){j(!1),s(e)})):he.invoke("POST","/api/v1/buckets/".concat(r,"/encryption/enable"),{encType:S,kmsKeyID:p}).then((function(){j(!1),o()})).catch((function(e){j(!1),s(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{onChange:function(e){C(e.target.value)},id:"select-encryption-type",name:"select-encryption-type",label:"Encryption Type",value:S,options:[{label:"Disabled",value:"disabled"},{label:"SSE-S3",value:"sse-s3"},{label:"SSE-KMS",value:"sse-kms"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),"sse-kms"===S&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"kms-key-id",name:"kms-key-id",label:"KMS Key ID",value:p,onChange:function(e){O(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:b,children:"Save"})}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),xn=Object(s.b)(null,{setErrorSnackMessage:V})((function(e){var t=e.closeVersioningModalAndRefresh,a=e.modalOpen,i=e.selectedBucket,r=e.versioningCurrentState,o=e.setErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1];return Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Edit Versioning"}),Object(n.jsxs)(ha.a,{children:[d&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to"," ",Object(n.jsx)("strong",{children:r?"disable":"enable"})," ","versioning for this bucket?",r&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)("strong",{children:"File versions won't be automatically deleted"})]})]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:d,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){d||(b(!0),he.invoke("PUT","/api/v1/buckets/".concat(i,"/versioning"),{versioning:!r}).then((function(){b(!1),t(!0)})).catch((function(e){b(!1),o(e)})))},color:"secondary",autoFocus:!0,children:r?"Disable":"Enable"})]})]})})),vn=function(){return Object(n.jsxs)(it.a,{viewBox:"0 0 16.172 17.187",children:[Object(n.jsx)("defs",{children:Object(n.jsxs)("linearGradient",{id:"a",y1:"0.5",x2:"1",y2:"0.5",gradientUnits:"objectBoundingBox",children:[Object(n.jsx)("stop",{offset:"0.044",stopColor:"#362585"}),Object(n.jsx)("stop",{offset:"0.301",stopColor:"#281b6f"}),Object(n.jsx)("stop",{offset:"1",stopColor:"#1e1560"})]})}),Object(n.jsx)("path",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.5px"},d:"M-4778.1,2239.582v6.425h6.425",transform:"translate(4787.594 -2239.582)"}),Object(n.jsx)("path",{fill:"#707070",d:"M-4784.238,2247.532v-.581c0-.027.009-.054.012-.081.039-.313.055-.632.121-.939a6.744,6.744,0,0,1,3.064-4.441,6.514,6.514,0,0,1,3.293-1.032,6.923,6.923,0,0,1,2.667.423,6.793,6.793,0,0,1,4.119,4.333,6.053,6.053,0,0,1,.279,1.337c.006.083.014.164.021.247v.86c-.011.131-.018.261-.032.392a6.494,6.494,0,0,1-.626,2.147,6.807,6.807,0,0,1-4.044,3.528,6.052,6.052,0,0,1-1.663.3,6.576,6.576,0,0,1-2.565-.325,6.73,6.73,0,0,1-3.947-3.451,6.627,6.627,0,0,1-.658-2.288C-4784.212,2247.816-4784.225,2247.674-4784.238,2247.532Zm13.025-.306c-.024-.309-.021-.661-.082-1a6.206,6.206,0,0,0-1.658-3.293,6.153,6.153,0,0,0-4.1-1.9,5.984,5.984,0,0,0-2.476.355,6.188,6.188,0,0,0-4.134,5.708,6.453,6.453,0,0,0,.228,1.881,6.127,6.127,0,0,0,1.984,3.052,6.046,6.046,0,0,0,3.806,1.445,6.043,6.043,0,0,0,1.235-.065,6.249,6.249,0,0,0,3.783-2.2,6.2,6.2,0,0,0,1.352-3.048C-4771.228,2247.863-4771.233,2247.563-4771.212,2247.226Z",transform:"translate(4786.834 -2240.452)"}),Object(n.jsx)("ellipse",{style:{opacity:.1,fill:"url(#a)"},cx:"6.151",cy:"6.151",rx:"6.151",ry:"6.151",transform:"translate(0 4.886)"})]})},yn=a(403);a(550);a(551);var Sn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},ke))}))((function(e){var t=e.value,a=e.label,c=void 0===a?"":a,r=e.tooltip,o=void 0===r?"":r,s=e.mode,l=void 0===s?"javascript":s,d=e.classes,b=e.onChange,u=void 0===b?function(){}:b,j=e.onBeforeChange,m=e.readOnly,h=void 0!==m&&m;return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)(ia.a,{className:d.inputLabel,children:[Object(n.jsx)("span",{children:c}),""!==o&&Object(n.jsx)("div",{className:d.tooltipContainer,children:Object(n.jsx)(ra.a,{title:o,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:d.tooltip})})})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(yn.Controlled,{value:t,options:{mode:l,lineNumbers:!0,readOnly:h},onBeforeChange:j,onChange:u})})]})})),Cn={setModalErrorSnackMessage:q},kn=Object(s.b)(null,Cn),wn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({jsonPolicyEditor:{minHeight:400,width:"100%"},buttonContainer:{textAlign:"right"}},we),ke))}))(kn((function(e){var t=e.classes,a=e.open,i=e.closeModalAndRefresh,r=e.policyEdit,o=e.setModalErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(""),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(""),f=Object(u.a)(O,2),v=f[0],S=f[1];Object(c.useEffect)((function(){r&&(p(r.name),S(r?JSON.stringify(JSON.parse(r.policy),null,4):""))}),[r]);var C=""!==h.trim();return Object(n.jsx)(ga,{modalOpen:a,onClose:function(){i(!1)},title:"".concat(r?"Info":"Create"," Policy"),children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d||(b(!0),he.invoke("POST","/api/v1/policies",{name:h,policy:v}).then((function(e){b(!1),i(!0)})).catch((function(e){b(!1),o(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"policy-name",name:"policy-name",label:"Policy Name",placeholder:"Enter Policy Name",onChange:function(e){p(e.target.value)},value:h,disabled:!!r})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(Sn,{label:"".concat(r?"Edit":"Write"," Policy"),value:v,onBeforeChange:function(e,t,a){S(a)}})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[!r&&Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){p(""),S("")},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:d||!C,children:"Save"})]}),d&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),Nn={setErrorSnackMessage:V},Tn=Object(s.b)(null,Nn)((function(e){var t=e.closeDeleteModalAndRefresh,a=e.deleteOpen,i=e.selectedBucket,r=e.ruleToDelete,o=e.setErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1];return Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete Replication Rule"}),Object(n.jsxs)(ha.a,{children:[d&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete replication rule ",Object(n.jsx)("b",{children:r}),"? ",Object(n.jsx)("br",{}),"Remember, at lease one rule must be present once replication has been enabled"]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:d,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){d||(b(!0),he.invoke("DELETE","/api/v1/buckets/".concat(i,"/replication/").concat(r)).then((function(){b(!1),t(!0)})).catch((function(e){b(!1),o(e)})))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),En=a(148),An=a.n(En),_n=a(404),In=a.n(_n),Fn=function(){return Object(n.jsx)(it.a,{viewBox:"0 0 12 12",children:Object(n.jsx)("path",{fill:"#081c42",className:"a",d:"M-13160.269,1885.114h-3.235v-4.381h-4.382V1877.5h4.382v-4.381h3.235v4.381h4.383v3.238h-4.383v4.38Z",transform:"translate(13167.886 -1873.114)"})})},Mn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),{},{inputWithBorder:{border:"1px solid #EAEAEA",padding:15,height:150,overflowY:"auto",position:"relative",marginTop:15},labelContainer:{display:"flex"},lineInputBoxes:{display:"flex"},queryDiv:{alignSelf:"center",margin:"0 4px",fontWeight:600}}))}))((function(e){var t=e.elements,a=e.name,r=e.label,o=e.tooltip,s=void 0===o?"":o,l=e.keyPlaceholder,d=void 0===l?"":l,b=e.valuePlaceholder,j=void 0===b?"":b,m=e.onChange,h=e.withBorder,p=void 0!==h&&h,O=e.classes,g=Object(c.useState)([""]),f=Object(u.a)(g,2),v=f[0],y=f[1],S=Object(c.useState)([""]),C=Object(u.a)(S,2),k=C[0],w=C[1],N=Object(c.createRef)();Object(c.useEffect)((function(){if(1===v.length&&""===v[0]&&1===k.length&&""===k[0]&&t&&""!==t){var e=t.split("&"),a=[],n=[];e.forEach((function(e){var t=e.split("=");2===t.length&&(a.push(t[0]),n.push(t[1]))})),a.push(""),n.push(""),y(a),w(n)}}),[v,k,t]),Object(c.useEffect)((function(){var e=N.current;e&&e.scrollIntoView(!1)}),[v]);var T=Object(c.useRef)(!0);Object(c.useLayoutEffect)((function(){T.current?T.current=!1:_()}),[v,k]);var E=function(e){e.persist();var t=Object(Je.a)(v);t[Z()(e.target,"dataset.index",0)]=e.target.value,y(t)},A=function(e){e.persist();var t=Object(Je.a)(k);t[Z()(e.target,"dataset.index",0)]=e.target.value,w(t)},_=An()((function(){var e="";v.forEach((function(t,a){if(v[a]&&k[a]){var n="".concat(t,"=").concat(k[a]);0!==a&&(n="&".concat(n)),e="".concat(e).concat(n)}})),m(e)}),500),I=k.map((function(e,t){return Object(n.jsxs)(x.a,{item:!0,xs:12,className:O.lineInputBoxes,children:[Object(n.jsx)(va,{id:"".concat(a,"-key-").concat(t.toString()),label:"",name:"".concat(a,"-").concat(t.toString()),value:v[t],onChange:E,index:t,placeholder:d}),Object(n.jsx)("span",{className:O.queryDiv,children:":"}),Object(n.jsx)(va,{id:"".concat(a,"-value-").concat(t.toString()),label:"",name:"".concat(a,"-").concat(t.toString()),value:k[t],onChange:A,index:t,placeholder:j,overlayIcon:t===k.length-1?Object(n.jsx)(Fn,{}):null,overlayAction:function(){!function(){if(""!==v[v.length-1].trim()&&""!==k[k.length-1].trim()){var e=Object(Je.a)(v),t=Object(Je.a)(k);e.push(""),t.push(""),y(e),w(t)}}()}})]},"query-pair-".concat(a,"-").concat(t.toString()))}));return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:O.fieldContainer,children:[Object(n.jsxs)(ia.a,{className:O.inputLabel,children:[Object(n.jsx)("span",{children:r}),""!==s&&Object(n.jsx)("div",{className:O.tooltipContainer,children:Object(n.jsx)(ra.a,{title:s,placement:"top-start",children:Object(n.jsx)(In.a,{className:O.tooltip})})})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(p?O.inputWithBorder:""),children:[I,Object(n.jsx)("div",{ref:N})]})]})})})),Ln={setModalErrorSnackMessage:q},Dn=Object(s.b)(null,Ln),Bn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},we))}))(Dn((function(e){var t=e.classes,a=e.closeModalAndRefresh,r=e.selectedBucket,o=e.lifecycle,s=e.open,l=e.setModalErrorSnackMessage,d=Object(c.useState)(!1),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(""),p=Object(u.a)(h,2),O=p[0],f=p[1],v=Object(c.useState)(!1),S=Object(u.a)(v,2),C=S[0],k=S[1];Object(c.useEffect)((function(){if("Enabled"===o.status&&k(!0),o.tags){var e=o.tags.reduce((function(e,t,a){return"".concat(e).concat(0!==a?"&":"").concat(t.key,"=").concat(t.value)}),"");f(e)}}),[o]);return Object(n.jsxs)(ga,{onClose:function(){a(!1)},modalOpen:s,title:"Edit Lifecycle Configuration",children:[Object(n.jsx)("div",{className:t.floatingEnabled,children:Object(n.jsx)(Ba,{indicatorLabels:["Enabled","Disabled"],checked:C,value:"user_enabled",id:"user-status",name:"user-status",onChange:function(e){k(e.target.checked)},switchOnly:!0})}),Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),j||(m(!0),null!==r&&null!==o&&he.invoke("PUT","/api/v1/buckets/".concat(r,"/lifecycle/").concat(o.id),{disable:!C,tags:O}).then((function(e){m(!1),a(!0)})).catch((function(e){m(!1),l(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"id",name:"id",label:"Id",value:o.id,onChange:function(){},disabled:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Mn,{name:"tags",label:"Tags",elements:O,onChange:function(e){f(e)},keyPlaceholder:"Tag Key",valuePlaceholder:"Tag Value",withBorder:!0})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:j,children:"Save"})}),j&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})]})}))),Rn=[{value:"01",label:"January"},{value:"02",label:"February"},{value:"03",label:"March"},{value:"04",label:"April"},{value:"05",label:"May"},{value:"06",label:"June"},{value:"07",label:"July"},{value:"08",label:"August"},{value:"09",label:"September"},{value:"10",label:"October"},{value:"11",label:"November"},{value:"12",label:"December"}],Pn=Array.from(Array(31),(function(e,t){return t+1})),zn=(new Date).getFullYear(),Kn=Array.from(Array(25),(function(e,t){return t+zn})),Wn=Object(N.a)((function(e){return Object(k.a)({root:{"& .MuiSelect-icon":{color:"#000","&.Mui-disabled":{color:"#9c9c9c"}}},input:{borderBottom:0,fontSize:12}})}))(ya.a),Un=Object(c.forwardRef)((function(e,t){var a=e.classes,i=e.id,r=e.label,o=e.disableOptions,s=void 0!==o&&o,l=e.addSwitch,d=void 0!==l&&l,b=e.tooltip,j=void 0===b?"":b,m=e.borderBottom,h=void 0!==m&&m,p=e.onDateChange,O=e.value,g=void 0===O?"":O;Object(c.useImperativeHandle)(t,(function(){return{resetDate:D}}));var f=Object(c.useState)(!1),v=Object(u.a)(f,2),y=v[0],S=v[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(""),F=Object(u.a)(I,2),M=F[0],L=F[1];Object(c.useEffect)((function(){if(""!==g){var e=g.split("-");L(e[0]),N(e[1]),_("".concat(parseInt(e[2])))}}),[g]),Object(c.useEffect)((function(){var e=function(e,t,a){var n=Date.parse("".concat(e,"-").concat(t,"-").concat(a));if(isNaN(n))return[!1,""];var c=parseInt(t),i=parseInt(a),r=c<10?"0".concat(c):c,o=i<10?"0".concat(i):i,s=new Date(n).toISOString().split("T")[0],l="".concat(e,"-").concat(r,"-").concat(o);return[s===l,l]}(M,w,A),t=Object(u.a)(e,2),a=t[0],n=t[1];p(n,a)}),[w,A,M,p]);var D=function(){N(""),_(""),L("")},B=function(){return s||!!d&&!y};return Object(n.jsxs)(x.a,{item:!0,xs:12,className:Object(xe.a)(a.fieldContainer,Object(fe.a)({},a.fieldContainerBorder,h)),children:[Object(n.jsx)("div",{className:a.labelContainer,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(ia.a,{htmlFor:i,className:a.inputLabel,children:[Object(n.jsx)("span",{children:r}),""!==j&&Object(n.jsx)("div",{className:a.tooltipContainer,children:Object(n.jsx)(ra.a,{title:j,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:a.tooltip})})})})]}),d&&Object(n.jsx)(Ba,{indicatorLabels:["Specific Date","Default (7 Days)"],checked:y,value:"date_enabled",id:"date-status",name:"date-status",onChange:function(e){S(e.target.checked),e.target.checked||p("",!0)},switchOnly:!0})]})}),Object(n.jsxs)("div",{children:[Object(n.jsx)(Sa.a,{disabled:B(),className:a.dateInput,children:Object(n.jsxs)(Ca.a,{id:"".concat(i,"-month"),name:"".concat(i,"-month"),value:w,displayEmpty:!0,onChange:function(e){N(e.target.value)},input:Object(n.jsx)(Wn,{}),children:[Object(n.jsx)(ka.a,{value:"",disabled:!0,children:""}),Rn.map((function(e){return Object(n.jsx)(ka.a,{value:e.value,children:e.label},"select-".concat(i,"-monthOP-").concat(e.label))}))]})}),Object(n.jsx)(Sa.a,{disabled:B(),className:a.dateInput,children:Object(n.jsxs)(Ca.a,{id:"".concat(i,"-day"),name:"".concat(i,"-day"),value:A,displayEmpty:!0,onChange:function(e){_(e.target.value)},input:Object(n.jsx)(Wn,{}),children:[Object(n.jsx)(ka.a,{value:"",disabled:!0,children:""}),Pn.map((function(e){return Object(n.jsx)(ka.a,{value:e,children:e},"select-".concat(i,"-dayOP-").concat(e))}))]})}),Object(n.jsx)(Sa.a,{disabled:B(),className:a.dateInput,children:Object(n.jsxs)(Ca.a,{id:"".concat(i,"-year"),name:"".concat(i,"-year"),value:M,displayEmpty:!0,onChange:function(e){L(e.target.value)},input:Object(n.jsx)(Wn,{}),children:[Object(n.jsx)(ka.a,{value:"",disabled:!0,children:""}),Kn.map((function(e){return Object(n.jsx)(ka.a,{value:e,children:e},"select-".concat(i,"-yearOP-").concat(e))}))]})})]})]})})),Vn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({dateInput:{"&:not(:last-child)":{marginRight:22}}},ke),Ne),{},{labelContainer:{flex:1},fieldContainer:Object(j.a)(Object(j.a)({},ke.fieldContainer),{},{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:10,marginTop:11,marginBottom:6}),fieldContainerBorder:{borderBottom:"#9c9c9c 1px solid",marginBottom:20}}))}))(Un),Gn=Object(s.b)(null,{setModalErrorSnackMessage:q}),qn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},we))}))(Gn((function(e){var t=e.open,a=e.closeModalAndRefresh,i=e.classes,r=e.bucketName,o=e.setModalErrorSnackMessage,s=Object(c.useState)(!0),l=Object(u.a)(s,2),d=l[0],b=l[1],m=Object(c.useState)([]),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(!1),v=Object(u.a)(f,2),S=v[0],C=v[1],k=Object(c.useState)(""),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(""),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(""),M=Object(u.a)(F,2),L=M[0],D=M[1],B=Object(c.useState)(""),R=Object(u.a)(B,2),P=R[0],z=R[1],K=Object(c.useState)(!1),W=Object(u.a)(K,2),U=W[0],V=W[1],G=Object(c.useState)("0"),q=Object(u.a)(G,2),H=q[0],Y=q[1],Q=Object(c.useState)("0"),J=Object(u.a)(Q,2),$=J[0],X=J[1],ee=Object(c.useState)("expiry"),te=Object(u.a)(ee,2),ae=te[0],ne=te[1],ce=Object(c.useState)("date"),ie=Object(u.a)(ce,2),re=ie[0],oe=ie[1],se=Object(c.useState)("0"),le=Object(u.a)(se,2),de=le[0],be=le[1],ue=Object(c.useState)(""),je=Object(u.a)(ue,2),me=je[0],pe=je[1],Oe=Object(c.useState)("0"),ge=Object(u.a)(Oe,2),fe=ge[0],xe=ge[1],ve=Object(c.useState)(""),ye=Object(u.a)(ve,2),Se=ye[0],Ce=ye[1],ke=Object(c.useState)("date"),we=Object(u.a)(ke,2),Ne=we[0],Te=we[1],Ee=Object(c.useState)(!1),Ae=Object(u.a)(Ee,2),_e=Ae[0],Ie=Ae[1];Object(c.useEffect)((function(){d&&he.invoke("GET","/api/v1/admin/tiers").then((function(e){var t=Z()(e,"items",[]);if(null!==t&&t.length>=1){var a=t.map((function(e){var t=e.type,a=Z()(e,"".concat(t,".name"),"");return{label:a,value:a}}));O(a),a.length>0&&D(a[0].value)}b(!1)})).catch((function(e){b(!1)}))}),[d]),Object(c.useEffect)((function(){var e=!0;"expiry"===ae?("date"===re&&""===me&&(e=!1),"days"===re&&parseInt(de)<1&&(e=!1)):("date"===Ne&&""===Se&&(e=!1),"days"===Ne&&parseInt(fe)<1&&(e=!1),""===L&&(e=!1)),Ie(e)}),[ae,re,me,de,Ne,Se,fe,L]);return Object(n.jsxs)(ga,{modalOpen:t,onClose:function(){a(!1)},title:"Add Lifecycle Rule",children:[d&&Object(n.jsx)(x.a,{container:!0,className:i.loadingBox,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})}),!d&&Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),C(!0),function(){var e={};if("expiry"===ae){var t={};t="date"===re?{expiry_date:"".concat(me,"T23:59:59Z")}:{expiry_days:parseInt(de)},e=Object(j.a)(Object(j.a)({},t),{},{noncurrentversion_expiration_days:parseInt(H)})}else{var n={};n="date"===Ne?{transition_date:"".concat(Se,"T23:59:59Z")}:{transition_days:parseInt(fe)},e=Object(j.a)(Object(j.a)({},n),{},{noncurrentversion_transition_days:parseInt($),noncurrentversion_transition_storage_class:P,storage_class:L})}var c=Object(j.a)({prefix:N,tags:_,expired_object_delete_marker:U},e);he.invoke("POST","/api/v1/buckets/".concat(r,"/lifecycle"),c).then((function(){C(!1),a(!0)})).catch((function(e){C(!1),o(e)}))}()},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:i.formScrollable,children:[Object(n.jsx)("h3",{children:"Lifecycle Configuration"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:ae,id:"quota_type",name:"quota_type",label:"ILM Rule",onChange:function(e){ne(e.target.value)},selectorOptions:[{value:"expiry",label:"Expiry"},{value:"transition",label:"Transition"}]})}),"expiry"===ae?Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:re,id:"expiryType",name:"expiryType",label:"Expiry Type",onChange:function(e){oe(e.target.value)},selectorOptions:[{value:"date",label:"Date"},{value:"days",label:"Days"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:"date"===re?Object(n.jsx)(Vn,{id:"expiry_date",label:"Expiry Date",value:me,borderBottom:!0,onDateChange:function(e,t){t&&pe(e)}}):Object(n.jsx)(va,{type:"number",id:"expiry_days",name:"expiry_days",onChange:function(e){be(e.target.value)},label:"Expiry Days",value:de,min:"0"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",id:"noncurrentversion_expiration_days",name:"noncurrentversion_expiration_days",onChange:function(e){Y(e.target.value)},label:"Non-current Expiration Days",value:H,min:"0"})})]}):Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:Ne,id:"transitionType",name:"transitionType",label:"Transition Type",onChange:function(e){Te(e.target.value)},selectorOptions:[{value:"date",label:"Date"},{value:"days",label:"Days"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:"date"===Ne?Object(n.jsx)(Vn,{id:"transition_date",label:"Transition Date",value:Se,borderBottom:!0,onDateChange:function(e,t){t&&Ce(e)}}):Object(n.jsx)(va,{type:"number",id:"transition_days",name:"transition_days",onChange:function(e){xe(e.target.value)},label:"Transition Days",value:fe,min:"0"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",id:"noncurrentversion_transition_days",name:"noncurrentversion_transition_days",onChange:function(e){X(e.target.value)},label:"Non-current Transition Days",value:$,min:"0"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"noncurrentversion_t_SC",name:"noncurrentversion_t_SC",onChange:function(e){z(e.target.value)},placeholder:"Set Non-current Version Transition Storage Class",label:"Non-current Version Transition Storage Class",value:P})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{label:"Storage Class",id:"storage_class",name:"storage_class",value:L,onChange:function(e){D(e.target.value)},options:p})})]}),Object(n.jsx)("h3",{children:"File Configuration"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"prefix",name:"prefix",onChange:function(e){T(e.target.value)},label:"Prefix",value:N})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Mn,{name:"tags",label:"Tags",elements:"",onChange:function(e){I(e)},keyPlaceholder:"Tag Key",valuePlaceholder:"Tag Value",withBorder:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"expired_delete_marker",id:"expired_delete_marker",name:"expired_delete_marker",checked:U,onChange:function(e){V(e.target.checked)},label:"Expired Object Delete Marker",indicatorLabels:["On","Off"]})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:i.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:S||!_e,children:"Save"})}),S&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})]})})));function Hn(e){var t=e.children,a=e.value,i=e.index,r=Object(en.a)(e,["children","value","index"]);return Object(n.jsx)("div",Object(j.a)(Object(j.a)({role:"tabpanel",hidden:a!==i,id:"simple-tabpanel-".concat(i),"aria-labelledby":"simple-tab-".concat(i),style:{marginTop:"5px"}},r),{},{children:a===i&&Object(n.jsx)(c.Fragment,{children:t})}))}function Yn(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}var Qn,Zn=Object(s.b)((function(e){return{session:e.console.session}}),{setErrorSnackMessage:V}),Jn=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noRecords:{lineHeight:"24px",textAlign:"center",padding:"20px"},gridWrapper:{width:320},gridContainer:{display:"grid",gridTemplateColumns:"auto auto",gridGap:8,justifyContent:"flex-start",alignItems:"center","& div:not(.MuiCircularProgress-root)":{display:"flex",alignItems:"center"},"& div:nth-child(odd)":{justifyContent:"flex-end",fontWeight:700},"& div:nth-child(2n)":{minWidth:150}},masterActions:{width:"25%",minWidth:"120px","& div":{margin:"5px 0px"}},paperContainer:{padding:15,paddingLeft:50,display:"flex"},headerContainer:{display:"flex",justifyContent:"space-between"},capitalizeFirst:{textTransform:"capitalize"},doubleElement:{display:"flex",justifyContent:"space-between"},encCheckbox:{margin:0,padding:0},tabPan:{marginTop:"5px"},fixedHeight:{height:165,minWidth:247,padding:"25px 28px","& svg":{maxHeight:18}},elementTitle:{fontWeight:500,color:"#777777",fontSize:14,marginTop:-9},consumptionValue:{color:"#000000",fontSize:"48px",fontWeight:"bold"},reportedUsage:{padding:"15px"}},Fe),Ie),{},{actionsTray:Object(j.a)(Object(j.a)({},Ie.actionsTray),{},{padding:"15px 0 0"})},Ge),Ve),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Zn((function(e){var t,a=e.classes,r=e.match,o=e.setErrorSnackMessage,s=e.session,l=Object(c.useState)(null),d=Object(u.a)(l,2),m=d[0],h=d[1],p=Object(c.useState)([]),O=Object(u.a)(p,2),y=O[0],k=O[1],w=Object(c.useState)([]),N=Object(u.a)(w,2),T=N[0],E=N[1],A=Object(c.useState)([]),_=Object(u.a)(A,2),I=_[0],F=_[1],M=Object(c.useState)(!0),L=Object(u.a)(M,2),D=L[0],B=L[1],R=Object(c.useState)([]),P=Object(u.a)(R,2),z=P[0],K=P[1],W=Object(c.useState)(!0),U=Object(u.a)(W,2),V=U[0],G=U[1],q=Object(c.useState)(!0),H=Object(u.a)(q,2),Y=H[0],Q=H[1],J=Object(c.useState)(!0),$=Object(u.a)(J,2),X=$[0],ee=$[1],te=Object(c.useState)(!0),ae=Object(u.a)(te,2),ne=ae[0],ie=ae[1],re=Object(c.useState)(!0),oe=Object(u.a)(re,2),se=oe[0],le=oe[1],de=Object(c.useState)(!0),be=Object(u.a)(de,2),ue=be[0],je=be[1],me=Object(c.useState)(!0),pe=Object(u.a)(me,2),Oe=pe[0],ge=pe[1],fe=Object(c.useState)(!0),xe=Object(u.a)(fe,2),ve=xe[0],ye=xe[1],Se=Object(c.useState)(!1),Ce=Object(u.a)(Se,2),ke=Ce[0],we=Ce[1],Ne=Object(c.useState)(0),Te=Object(u.a)(Ne,2),Ee=Te[0],Ae=Te[1],_e=Object(c.useState)(!1),Ie=Object(u.a)(_e,2),Fe=Ie[0],Me=Ie[1],Le=Object(c.useState)(!1),De=Object(u.a)(Le,2),Be=De[0],Re=De[1],Pe=Object(c.useState)(!1),ze=Object(u.a)(Pe,2),Ke=ze[0],We=ze[1],Ue=Object(c.useState)(!1),Ve=Object(u.a)(Ue,2),Ge=Ve[0],qe=Ve[1],He=Object(c.useState)(!1),Ye=Object(u.a)(He,2),Qe=Ye[0],Ze=Ye[1],Je=Object(c.useState)(null),Xe=Object(u.a)(Je,2),tt=Xe[0],at=Xe[1],nt=Object(c.useState)("0"),it=Object(u.a)(nt,2),rt=it[0],st=it[1],lt=Object(c.useState)(!1),dt=Object(u.a)(lt,2),bt=dt[0],ut=dt[1],jt=Object(c.useState)(!1),mt=Object(u.a)(jt,2),ht=mt[0],pt=mt[1],Ot=Object(c.useState)(!1),gt=Object(u.a)(Ot,2),ft=gt[0],xt=gt[1],vt=Object(c.useState)(!1),yt=Object(u.a)(vt,2),St=yt[0],Ct=yt[1],kt=Object(c.useState)(null),wt=Object(u.a)(kt,2),Nt=wt[0],Tt=wt[1],Et=Object(c.useState)(!1),At=Object(u.a)(Et,2),_t=At[0],It=At[1],Ft=Object(c.useState)(null),Mt=Object(u.a)(Ft,2),Lt=Mt[0],Dt=Mt[1],Bt=Object(c.useState)(!1),Rt=Object(u.a)(Bt,2),Pt=Rt[0],zt=Rt[1],Kt=Object(c.useState)(!0),Wt=Object(u.a)(Kt,2),Ut=Wt[0],Vt=Wt[1],Gt=Object(c.useState)(!1),qt=Object(u.a)(Gt,2),Ht=qt[0],Yt=qt[1],Qt=Object(c.useState)(!1),Zt=Object(u.a)(Qt,2),Jt=Zt[0],$t=Zt[1],Xt=Object(c.useState)(!1),ea=Object(u.a)(Xt,2),ta=ea[0],aa=ea[1],na=Object(c.useState)(""),ca=Object(u.a)(na,2),ia=ca[0],ra=ca[1],oa=Object(c.useState)(!0),sa=Object(u.a)(oa,2),la=sa[0],da=sa[1],ba=Object(c.useState)([]),ja=Object(u.a)(ba,2),ma=ja[0],ha=ja[1],pa=Object(c.useState)(!1),Oa=Object(u.a)(pa,2),ga=Oa[0],fa=Oa[1],xa=r.params.bucketName,va=(null===(t=s.pages)||void 0===t?void 0:t.indexOf("/users"))>-1;Object(c.useEffect)((function(){Ut&&he.invoke("POST","/api/v1/has-permission",{actions:[{id:"PutReplicationConfiguration",action:"s3:PutReplicationConfiguration",bucket_name:xa},{id:"GetReplicationConfiguration",action:"s3:GetReplicationConfiguration",bucket_name:xa}]}).then((function(e){if(Vt(!1),e.permissions){var t=e.permissions?e.permissions:[],a=t.find((function(e){return"PutReplicationConfiguration"===e.id}));a&&a.can?Yt(!0):Yt(!1);var n=t.find((function(e){return"GetReplicationConfiguration"===e.id}));n&&n.can?$t(!0):$t(!1),Vt(!1)}})).catch((function(e){Vt(!1),o(e)}))}),[xa,Ut,o]),Object(c.useEffect)((function(){X&&he.invoke("GET","/api/v1/buckets/".concat(xa,"/events")).then((function(e){var t=Z()(e,"events",[]);ee(!1),k(t||[])})).catch((function(e){ee(!1),o(e)}))}),[X,o,xa]),Object(c.useEffect)((function(){ne&&he.invoke("GET","/api/v1/buckets/".concat(xa,"/versioning")).then((function(e){pt(e.is_versioned),ie(!1)})).catch((function(e){o(e),ie(!1)}))}),[ne,o,xa]),Object(c.useEffect)((function(){ne&&he.invoke("GET","/api/v1/buckets/".concat(xa,"/object-locking")).then((function(e){xt(e.object_locking_enabled),le(!1)})).catch((function(e){o(e),le(!1)}))}),[se,o,xa,ne]),Object(c.useEffect)((function(){ue&&he.invoke("GET","/api/v1/buckets/".concat(xa,"/replication")).then((function(e){var t=e.rules?e.rules:[];E(t),je(!1)})).catch((function(e){o(e),je(!1)}))}),[ue,o,xa]),Object(c.useEffect)((function(){D&&he.invoke("GET","/api/v1/bucket-policy/".concat(xa)).then((function(e){F(e.policies),B(!1)})).catch((function(e){o(e),B(!1)}))}),[D,o,xa]),Object(c.useEffect)((function(){V&&va&&he.invoke("GET","/api/v1/bucket-users/".concat(xa)).then((function(e){K(e),G(!1)})).catch((function(e){o(e),G(!1)}))}),[V,o,xa,va]),Object(c.useEffect)((function(){Oe&&he.invoke("GET","/api/v1/buckets").then((function(e){var t=Z()(e,"buckets",[]).find((function(e){return e.name===xa})),a=Z()(t,"size","0");ge(!1),st(a)})).catch((function(e){ge(!1),o(e)}))}),[Oe,o,xa]),Object(c.useEffect)((function(){Y&&he.invoke("GET","/api/v1/buckets/".concat(xa)).then((function(e){Q(!1),h(e)})).catch((function(e){Q(!1),o(e)}))}),[Y,o,xa]),Object(c.useEffect)((function(){ve&&he.invoke("GET","/api/v1/buckets/".concat(xa,"/encryption/info")).then((function(e){e.algorithm&&(Ct(!0),Tt(e)),ye(!1)})).catch((function(e){"The server side encryption configuration was not found"===e&&(Ct(!1),Tt(null)),ye(!1)}))}),[ve,xa]);Object(c.useEffect)((function(){la&&he.invoke("GET","/api/v1/buckets/".concat(xa,"/lifecycle")).then((function(e){var t=Z()(e,"lifecycle",[]);ha(t||[]),da(!1)})).catch((function(e){console.error(e),da(!1)}))}),[la,da,xa]);var ya=function(){Q(!0),ge(!0),je(!0),ie(!0),ee(!0),ye(!0)},Sa=function(){B(!0)},Ca="n/a";null!==m&&(Ca=m.access);var ka=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ut(e)},wa=[{type:"delete",onClick:function(e){qe(!0),at(e)}}],Na=[{type:"view",onClick:function(e){Re(!0),Dt(e)}}],Ta=[{type:"delete",onClick:function(e){ra(e.id),aa(!0)},disableButtonFunction:function(){return T.length<=1}}],Ea=[{label:"ID",elementKey:"id"},{label:"Prefix",elementKey:"prefix"},{label:"Status",elementKey:"status"},{label:"Expiration",elementKey:"expiration",renderFunction:function(e){return e.days?"".concat(e.days," day").concat(e.days>1?"s":""):"0001-01-01T00:00:00Z"===e.date?"":Object(n.jsx)(ct.a,{children:e.date})}},{label:"Transition",elementKey:"transition",renderFunction:function(e){return e.days?"".concat(e.days," day").concat(e.days>1?"s":""):"0001-01-01T00:00:00Z"===e.date?"":Object(n.jsx)(ct.a,{children:e.date})}},{label:"Storage Class",elementKey:"storage_class",renderFunction:function(e){return Z()(e,"transition.storage_class","")},renderFullObject:!0}],Aa=[{type:"view",onClick:function(e){b.push("/users/".concat(e))}}];return Object(n.jsxs)(c.Fragment,{children:[Fe&&Object(n.jsx)(mn,{open:Fe,selectedBucket:xa,closeModalAndRefresh:function(){Me(!1),ya()}}),Ke&&Object(n.jsx)(fn,{open:Ke,selectedBucket:xa,encryptionEnabled:St,encryptionCfg:Nt,closeModalAndRefresh:function(){We(!1),ya()}}),ke&&Object(n.jsx)(cn,{bucketName:xa,open:ke,actualPolicy:Ca,closeModalAndRefresh:function(){we(!1),ya()}}),Be&&Object(n.jsx)(wn,{open:Be,closeModalAndRefresh:function(e){Re(!1),e&&Sa()},policyEdit:Lt}),_t&&Object(n.jsx)(on,{bucketName:xa,open:_t,closeModalAndRefresh:function(){It(!1),ya()}}),bt&&Object(n.jsx)(On,{closeModalAndRefresh:function(){ka(!1),ya()},open:bt,bucketName:xa}),Ge&&Object(n.jsx)(hn,{deleteOpen:Ge,selectedBucket:xa,bucketEvent:tt,closeDeleteModalAndRefresh:function(e){qe(!1),e&&ya()}}),Pt&&Object(n.jsx)(xn,{closeVersioningModalAndRefresh:function(e){zt(!1),e&&ya()},modalOpen:Pt,selectedBucket:xa,versioningCurrentState:ht}),ta&&Object(n.jsx)(Tn,{deleteOpen:ta,selectedBucket:xa,closeDeleteModalAndRefresh:function(e){aa(!1),e&&je(!0)},ruleToDelete:ia}),Qe&&Object(n.jsx)(Bn,{open:Qe,closeModalAndRefresh:function(e){Ze(!1),e&&da(!0)},selectedBucket:xa,lifecycle:{id:""}}),ga&&Object(n.jsx)(qn,{open:ga,bucketName:xa,closeModalAndRefresh:function(e){fa(!1),e&&da(!0)}}),Object(n.jsx)(Ua,{label:"Bucket > ".concat(r.params.bucketName)}),Object(n.jsxs)(x.a,{container:!0,className:a.container,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(tn.a,{value:Ee,onChange:function(e,t){Ae(t)},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(n.jsx)(an.a,Object(j.a)({label:"Summary"},Yn(0))),Object(n.jsx)(an.a,Object(j.a)({label:"Events"},Yn(1))),Jt&&Object(n.jsx)(an.a,Object(j.a)({label:"Replication"},Yn(2))),Object(n.jsx)(an.a,Object(j.a)({label:"Lifecycle"},Yn(3))),Object(n.jsx)(an.a,Object(j.a)({label:"Policies"},Yn(4))),va&&Object(n.jsx)(an.a,Object(j.a)({label:"Users"},Yn(5)))]})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsxs)(Hn,{index:0,value:Ee,children:[Object(n.jsx)("br",{}),Object(n.jsx)(C.a,{className:a.paperContainer,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{xs:9,children:[Object(n.jsx)("h2",{children:"Details"}),Object(n.jsx)("hr",{className:a.hrClass}),Object(n.jsxs)("table",{width:"100%",children:[Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Access Policy:"}),Object(n.jsx)("td",{className:a.capitalizeFirst,children:Object(n.jsx)(g.a,{color:"primary",className:a.anchorButton,onClick:function(){we(!0)},children:Y?Object(n.jsx)(S.a,{color:"primary",size:16,variant:"indeterminate"}):Ca.toLowerCase()})}),Object(n.jsx)("td",{children:"Encryption:"}),Object(n.jsx)("td",{children:ve?Object(n.jsx)(S.a,{color:"primary",size:16,variant:"indeterminate"}):Object(n.jsx)(g.a,{color:"primary",className:a.anchorButton,onClick:function(){We(!0)},children:St?"Enabled":"Disabled"})})]}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Replication:"}),Object(n.jsx)("td",{className:a.doubleElement,children:Object(n.jsx)("span",{children:T.length?"Enabled":"Disabled"})}),ft?Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("td",{}),Object(n.jsx)("td",{})]}):Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("td",{children:"Object Locking:"}),Object(n.jsx)("td",{children:"Disabled"})]})]})]})]}),Object(n.jsxs)(x.a,{xs:3,className:a.reportedUsage,children:[Object(n.jsxs)(x.a,{container:!0,direction:"row",alignItems:"center",children:[Object(n.jsx)(x.a,{item:!0,className:a.icon,xs:2,children:Object(n.jsx)(vn,{})}),Object(n.jsx)(x.a,{item:!0,xs:10,children:Object(n.jsx)(v.a,{className:a.elementTitle,children:"Reported Usage"})})]}),Object(n.jsx)(v.a,{className:a.consumptionValue,children:ce(rt)})]})]})}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(C.a,{className:a.paperContainer,children:Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{xs:12,children:[Object(n.jsx)("h2",{children:"Versioning"}),Object(n.jsx)("hr",{className:a.hrClass}),Object(n.jsx)("table",{children:Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Versioning:"}),Object(n.jsx)("td",{children:ne?Object(n.jsx)(S.a,{color:"primary",size:16,variant:"indeterminate"}):Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(g.a,{color:"primary",className:a.anchorButton,onClick:function(){zt(!0)},children:ht?"Enabled":"Disabled"})})})]})})]})})}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),ft&&Object(n.jsx)(C.a,{className:a.paperContainer,children:Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{xs:12,children:[Object(n.jsx)("h2",{children:"Object Locking"}),Object(n.jsx)("hr",{className:a.hrClass}),Object(n.jsx)("table",{children:Object(n.jsx)("tr",{children:Object(n.jsxs)("td",{className:a.gridContainer,children:[Object(n.jsx)("td",{children:"Retention:"}),Object(n.jsx)("td",{children:ne?Object(n.jsx)(S.a,{color:"primary",size:16,variant:"indeterminate"}):Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(g.a,{color:"primary",className:a.anchorButton,onClick:function(){It(!0)},children:"Configure"})})})]})})})]})})})]}),Object(n.jsx)(Hn,{index:1,value:Ee,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:a.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:a.searchField,id:"search-resource",label:"",onChange:function(e){},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),size:"medium",onClick:function(){Me(!0)},children:"Subscribe to Event"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:wa,columns:[{label:"SQS",elementKey:"arn"},{label:"Events",elementKey:"events",renderFunction:function(e){return Object(n.jsx)(c.Fragment,{children:e.join(", ")})}},{label:"Prefix",elementKey:"prefix"},{label:"Suffix",elementKey:"suffix"}],isLoading:X,records:y,entityName:"Events",idField:"id"})})]})}),Jt&&Object(n.jsx)(Hn,{index:2,value:Ee,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:a.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:a.searchField,id:"search-resource",label:"",onChange:function(e){},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Ht&&Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),size:"medium",onClick:function(){ka(!0)},children:"Add Replication Rule"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:Ta,columns:[{label:"ID",elementKey:"id"},{label:"Priority",elementKey:"priority"},{label:"Destination",elementKey:"destination",renderFunction:function(e){return Object(n.jsx)(c.Fragment,{children:e.bucket.replace("arn:aws:s3:::","")})}},{label:"Delete Marker Replication",elementKey:"delete_marker_replication",renderFunction:function(e){return null}},{label:"Status",elementKey:"status"}],isLoading:X,records:T,entityName:"Replication Rules",idField:"id"})})]})}),Object(n.jsx)(Hn,{index:3,value:Ee,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:a.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:a.searchField,id:"search-resource",label:"",onChange:function(e){},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),size:"medium",onClick:function(){fa(!0)},children:"Add Lifecycle Rule"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:[],columns:Ea,isLoading:la,records:ma,entityName:"Lifecycle",customEmptyMessage:"There are no Lifecycle rules yet",idField:"id"})})]})}),Object(n.jsxs)(Hn,{index:4,value:Ee,children:[Object(n.jsx)("br",{}),Object(n.jsx)(ua,{itemActions:Na,columns:[{label:"Name",elementKey:"name"}],isLoading:X,records:I,entityName:"Policies",idField:"name"})]}),va&&Object(n.jsxs)(Hn,{index:5,value:Ee,children:[Object(n.jsx)("br",{}),Object(n.jsx)(ua,{itemActions:Aa,columns:[{label:"User",elementKey:"accessKey"}],isLoading:V,records:z,entityName:"Users",idField:"accessKey"})]})]})]})]})}))),$n=Object(s.b)((function(e){return{open:e.system.sidebarOpen}}),{setMenuOpen:z}),Xn=Object(l.g)($n((function(){return Object(n.jsx)(l.c,{history:b,children:Object(n.jsxs)(l.d,{children:[Object(n.jsx)(l.b,{path:"/buckets/:bucketName",component:Jn}),Object(n.jsx)(l.b,{path:"/",component:Xa}),Object(n.jsx)(l.b,{component:Ze})]})})}))),ec={setErrorSnackMessage:V},tc=Object(s.b)(null,ec)((function(e){var t=e.closeDeleteModalAndRefresh,a=e.deleteOpen,i=e.selectedPolicy,r=e.setErrorSnackMessage,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1];return Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete Policy"}),Object(n.jsxs)(ha.a,{children:[l&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete policy ",Object(n.jsx)("b",{children:i}),"?."]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:l,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){l||(d(!0),he.invoke("DELETE","/api/v1/policy?name=".concat(i)).then((function(e){d(!1),t(!0)})).catch((function(e){d(!1),r(e)})))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),ac={setErrorSnackMessage:V},nc=Object(s.b)(null,ac),cc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(nc((function(e){var t=e.classes,a=e.setErrorSnackMessage,r=Object(c.useState)([]),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(!1),j=Object(u.a)(d,2),m=j[0],h=j[1],p=Object(c.useState)(!1),O=Object(u.a)(p,2),v=O[0],y=O[1],S=Object(c.useState)(!1),C=Object(u.a)(S,2),k=C[0],w=C[1],N=Object(c.useState)(""),T=Object(u.a)(N,2),E=T[0],A=T[1],_=Object(c.useState)(""),I=Object(u.a)(_,2),F=I[0],M=I[1],L=Object(c.useState)(null),D=Object(u.a)(L,2),B=D[0],R=D[1];Object(c.useEffect)((function(){P()}),[]),Object(c.useEffect)((function(){m&&he.invoke("GET","/api/v1/policies").then((function(e){var t=Z()(e,"policies",[]);t.sort((function(e,t){return e.name>t.name?1:e.name ".concat(a.params.policyName)]})}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(tn.a,{value:d,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){j(t)},"aria-label":"policy-tabs",children:[Object(n.jsx)(an.a,{label:"Details"}),Object(n.jsx)(an.a,{label:"Users"})]})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[0===d&&Object(n.jsx)(C.a,{className:t.paperContainer,children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),T||(E(!0),he.invoke("POST","/api/v1/policies",{name:I,policy:D}).then((function(e){E(!1),r(!0)})).catch((function(e){E(!1),o(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.formScrollable,children:Object(n.jsx)(Sn,{label:"".concat(p?"Edit":"Write"," Policy"),value:D,onBeforeChange:function(e,t,a){B(a)}})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[!p&&Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){F(""),B("")},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:T||!W,children:"Save"})]}),T&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})}),1===d&&Object(n.jsx)(ua,{itemActions:U,columns:[{label:"Name",elementKey:"name"}],isLoading:!1,records:S,entityName:"Servers",idField:"name"})]})]})})]})}))),oc=Object(s.b)((function(e){return{open:e.system.sidebarOpen}}),{setMenuOpen:z}),sc=Object(l.g)(oc((function(){return Object(n.jsx)(l.c,{history:b,children:Object(n.jsxs)(l.d,{children:[Object(n.jsx)(l.b,{path:"/policies/:policyName",component:rc}),Object(n.jsx)(l.b,{path:"/",component:cc}),Object(n.jsx)(l.b,{component:Ze})]})})}))),lc=a(405),dc=a.n(lc);!function(e){e.singleValue="singleValue",e.linearGraph="linearGraph",e.barChart="barChart",e.pieChart="pieChart",e.singleRep="singleRep"}(Qn||(Qn={}));var bc="dashboardConfig",uc=[{w:1,h:2,x:0,y:0,i:"panel-0",minW:1,moved:!1,static:!1},{w:1,h:1,x:1,y:2,i:"panel-1",minW:1,moved:!1,static:!1},{w:1,h:1,x:1,y:3,i:"panel-2",minW:1,moved:!1,static:!1},{w:1,h:2,x:2,y:0,i:"panel-3",minW:1,moved:!1,static:!1},{w:2,h:2,x:3,y:0,i:"panel-4",minW:2,moved:!1,static:!1},{w:2,h:2,x:5,y:0,i:"panel-5",minW:2,moved:!1,static:!1},{w:1,h:1,x:0,y:2,i:"panel-6",minW:1,moved:!1,static:!1},{w:1,h:1,x:0,y:3,i:"panel-7",minW:1,moved:!1,static:!1},{w:1,h:1,x:2,y:2,i:"panel-8",minW:1,moved:!1,static:!1},{w:1,h:1,x:2,y:3,i:"panel-9",minW:1,moved:!1,static:!1},{w:2,h:2,x:3,y:2,i:"panel-10",minW:2,moved:!1,static:!1},{w:1,h:1,x:7,y:0,i:"panel-11",minW:1,moved:!1,static:!1},{w:1,h:1,x:7,y:1,i:"panel-12",minW:1,moved:!1,static:!1},{w:4,h:3,x:0,y:10,i:"panel-13",minW:2,moved:!1,static:!1},{w:4,h:3,x:0,y:4,i:"panel-14",minW:2,moved:!1,static:!1},{w:2,h:2,x:5,y:2,i:"panel-15",minW:2,moved:!1,static:!1},{w:8,h:3,x:0,y:7,i:"panel-16",minW:2,moved:!1,static:!1},{w:8,h:3,x:0,y:19,i:"panel-19",minW:2,moved:!1,static:!1},{w:1,h:1,x:7,y:2,i:"panel-20",minW:1,moved:!1,static:!1},{w:1,h:1,x:7,y:3,i:"panel-21",minW:1,moved:!1,static:!1},{w:4,h:3,x:4,y:4,i:"panel-22",minW:2,moved:!1,static:!1},{w:4,h:3,x:4,y:10,i:"panel-23",minW:2,moved:!1,static:!1},{w:4,h:3,x:0,y:13,i:"panel-24",minW:2,moved:!1,static:!1},{w:4,h:3,x:4,y:13,i:"panel-25",minW:2,moved:!1,static:!1},{w:4,h:3,x:0,y:16,i:"panel-26",minW:2,moved:!1,static:!1},{w:4,h:3,x:4,y:16,i:"panel-27",minW:2,moved:!1,static:!1},{w:1,h:1,x:1,y:0,i:"panel-28",minW:1,moved:!1,static:!1},{w:1,h:1,x:1,y:1,i:"panel-29",minW:1,moved:!1,static:!1}],jc=["#6992B7","#E2AD17","#22B573","#F7655E","#0071BC","#F9E6C5","#A6E8C4","#F4CECE","#ADD5E0"],mc=function(e){return be(e,"ns")},hc=function(e){return parseInt(e).toString(10)},pc=[{title:"Uptime",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-0",labelDisplayFunction:be},{title:"Total Online Disks",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-1"},{title:"Total Offline Disks",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-2"},{title:"Current Usable Capacity",data:[],dataOuter:[{name:"outer",value:100}],widgetConfiguration:{outerChart:{colorList:["#9c9c9c"],innerRadius:51,outerRadius:54,startAngle:-15,endAngle:195},innerChart:{colorList:jc,innerRadius:35,outerRadius:50,startAngle:-15,endAngle:195}},type:Qn.pieChart,layoutIdentifier:"panel-3",innerLabel:"N/A",labelDisplayFunction:ce},{title:"Data Usage Growth",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-4",yAxisFormatter:ce,xAxisFormatter:ue},{title:"Object size distribution",data:[],widgetConfiguration:[{dataKey:"a",color:jc[0],background:{fill:"rgba(0,0,0,0.1)"}}],customStructure:[{originTag:"LESS_THAN_1024_B",displayTag:"Less than 1024B"},{originTag:"BETWEEN_1024_B_AND_1_MB",displayTag:"Between 1024B and 1MB"},{originTag:"BETWEEN_1_MB_AND_10_MB",displayTag:"Between 1MB and 10MB"},{originTag:"BETWEEN_10_MB_AND_64_MB",displayTag:"Between 10MB and 64MB"},{originTag:"BETWEEN_64_MB_AND_128_MB",displayTag:"Between 64MB and 128MB"},{originTag:"BETWEEN_128_MB_AND_512_MB",displayTag:"Between 128MB and 512MB"},{originTag:"GREATER_THAN_512_MB",displayTag:"Greater than 512MB"}],type:Qn.barChart,layoutIdentifier:"panel-5"},{title:"Total Online Servers",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-6"},{title:"Total Offline Servers",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-7"},{title:"Number of Buckets",data:[],innerLabel:"N/A",type:Qn.singleRep,color:"#0071BC",fillColor:"#ADD5E0",layoutIdentifier:"panel-8"},{title:"Number of Objects",data:[],innerLabel:"N/A",type:Qn.singleRep,color:"#0071BC",fillColor:"#ADD5E0",layoutIdentifier:"panel-9"},{title:"S3 API Data Received Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-10",xAxisFormatter:ue,yAxisFormatter:ce},{title:"Total Open FDs",data:[],innerLabel:"N/A",type:Qn.singleRep,layoutIdentifier:"panel-11",color:"#22B573",fillColor:"#A6E8C4"},{title:"Total Goroutines",data:[],innerLabel:"N/A",type:Qn.singleRep,layoutIdentifier:"panel-12",color:"#F7655E",fillColor:"#F4CECE"},{title:"Node CPU Usage",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-13",yAxisFormatter:hc,xAxisFormatter:ue},{title:"S3 API Request Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-14",xAxisFormatter:ue},{title:"S3 API Data Sent Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-15",xAxisFormatter:ue,yAxisFormatter:ce},{title:"Internode Data Transfer",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-16",yAxisFormatter:ce,xAxisFormatter:ue},{title:"Node IO",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-19",yAxisFormatter:ce,xAxisFormatter:ue},{title:"Time Since Last Heal Activity",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-20",labelDisplayFunction:mc},{title:"Time Since Last Scan Activity",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-21",labelDisplayFunction:mc},{title:"S3 API Request Error Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-22",xAxisFormatter:ue},{title:"Node Memory Usage",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-23",xAxisFormatter:ue,yAxisFormatter:ce},{title:"Drive Used Capacity",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-24",xAxisFormatter:ue,yAxisFormatter:ce},{title:"Drives Free Inodes",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-25",disableYAxis:!0,xAxisFormatter:ue},{title:"Node Syscalls",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-26",yAxisFormatter:hc,xAxisFormatter:ue},{title:"Node File Descriptors",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Qn.linearGraph,layoutIdentifier:"panel-27",yAxisFormatter:hc,xAxisFormatter:ue},{title:"Total S3 Traffic Inbound",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-28",labelDisplayFunction:ce},{title:"Total S3 Traffic Outbound",data:"N/A",type:Qn.singleValue,layoutIdentifier:"panel-29",labelDisplayFunction:ce}],Oc=function(e,t){if(0===e.length)return["","0"];switch(t){case"mean":var a=e.reduce((function(e,t){return e+parseFloat(t[1])}),0);return["",Math.floor(a/e.length).toString()];default:var n=e.sort((function(e,t){return e[0]-t[0]}));return n[n.length-1]}},gc=function(e){return pc.map((function(t){var a=e.find((function(e){return e.title.toLowerCase().trim()===t.title.toLowerCase().trim()}));if(!a)return t;var n=a.type;switch(t.type){case Qn.singleValue:if("stat"===n||"singlestat"===n){var c=Z()(a,"targets[0].result[0].values",[]);null===c&&(c=[]);var i=Z()(a,"options.reduceOptions.calcs[0]","lastNotNull"),r=Oc(c,i),o=t.labelDisplayFunction?t.labelDisplayFunction(r[1]):r[1];return Object(j.a)(Object(j.a)({},t),{},{data:o})}break;case Qn.pieChart:if("gauge"===n){var s=Z()(a,"targets[0].result",[]);null===s&&(s=[]);var l=Z()(a,"options.reduceOptions.calcs[0]","lastNotNull"),d=s.length>0?s[0].values:[],b=Oc(d,l),u=s.map((function(e){var t=Z()(e,"values",[]),a=Object.keys(e.metric),n=t.sort((function(e,t){return e[0]-t[0]})),c=e.metric[a[0]],i=n[n.length-1];return{name:c,value:parseInt(i)}})),m=t.labelDisplayFunction?t.labelDisplayFunction(b[1]):b[1];return Object(j.a)(Object(j.a)({},t),{},{data:u,innerLabel:m})}break;case Qn.linearGraph:if("graph"===n){var h=Z()(a,"targets",[]);null===h&&(h=[]);var p=[],O=[];h.forEach((function(e,t){var a=Z()(e,"result",[]),n=e.legendFormat;null===a&&(a=[]),a.forEach((function(e){var a=function(e,t){var a=Object.keys(e),n=new RegExp("{{(".concat(a.join("|"),")}}"),"g");return t.replace(n,(function(t){var a=t.replace(/({{|}})/g,"");return e[a]})).replace(/{{(.*?)}}/g,"")}(e.metric,n),c="key_".concat(t).concat(a);p.push({dataKey:c,keyLabel:a,lineColor:"",fillColor:""});var i=Z()(e,"values",[]);null===i&&(i=[]),i.forEach((function(e){var t=O.findIndex((function(t){return t.name===e[0]}));if(-1===t){var a={name:e[0]};a[c]=e[1],O.push(a)}else O[t][c]=e[1]}))}))}));var g=p.sort((function(e,t){return e.keyLabelt.keyLabel?1:0})).map((function(e,t){return Object(j.a)(Object(j.a)({},e),{},{lineColor:jc[t]||me(e.keyLabel),fillColor:jc[t]||me(e.keyLabel)})})),f=O.sort((function(e,t){return e.name-t.name}));return Object(j.a)(Object(j.a)({},t),{},{widgetConfiguration:g,data:f})}break;case Qn.barChart:if("bargauge"===n){var x=Z()(a,"targets[0].result",[]);null===x&&(x=[]);var v=function(e,t){return e[0]-t[0]},y=[];return y=t.customStructure?t.customStructure.map((function(e){var t=x.find((function(t){var a=Object.keys(t.metric);return t.metric[a[0]]===e.originTag})),a=Z()(t,"values",[]).sort(v),n=a[a.length-1]||["","0"];return{name:e.displayTag,a:parseInt(n[1])}})):x.map((function(e){var t=Object.keys(e.metric),a=e.metric[t[0]],n=Z()(e,"values",[]).sort(v),c=n[n.length-1]||["","0"];return{name:a,a:parseInt(c[1])}})),Object(j.a)(Object(j.a)({},t),{},{data:y})}break;case Qn.singleRep:if("stat"===n){var S=Z()(a,"targets[0].result[0].values",[]);null===S&&(S=[]);var C=Z()(a,"options.reduceOptions.calcs[0]","lastNotNull"),k=Oc(S,C),w=S.sort((function(e,t){return e[0]-t[0]})),N=[];1===w.length&&N.push({value:0}),w.forEach((function(e){N.push({value:parseInt(e[1])})}));var T=t.labelDisplayFunction?t.labelDisplayFunction(k[1]):k[1];return Object(j.a)(Object(j.a)({},t),{},{data:N,innerLabel:T})}}return t}))},fc=function(e){localStorage.setItem(bc,btoa(JSON.stringify(e)))},xc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({},ze),{},{contentContainer:Object(j.a)(Object(j.a)({},ze.contentContainer),{},{fontWeight:700,color:"#072045",fontSize:18,textAlign:"center"})}))}))((function(e){var t=e.title,a=e.data,c=e.classes;return Object(n.jsxs)("div",{className:c.singleValueContainer,children:[Object(n.jsx)("div",{className:c.titleContainer,children:t}),Object(n.jsx)("div",{className:c.contentContainer,children:a})]})})),vc=a(999),yc=a(982),Sc=a(986),Cc=a(224),kc=a(225),wc=a(418),Nc=a(233),Tc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},Ke))}))((function(e){var t=e.active,a=e.payload,c=e.label,i=e.linearConfiguration,r=e.yAxisFormatter,o=e.classes;return t?Object(n.jsxs)("div",{className:o.customTooltip,children:[Object(n.jsx)("div",{className:o.timeStampTitle,children:ue(c,!0)}),a&&a.map((function(e,t){return Object(n.jsxs)("div",{className:o.labelContainer,children:[Object(n.jsx)("div",{className:o.labelColor,style:{backgroundColor:i[t].lineColor}}),Object(n.jsx)("div",{className:o.itemValue,children:Object(n.jsxs)("span",{className:o.valueContainer,children:[i[t].keyLabel,":"," ",r(e.value)]})})]},"lbPl-".concat(t,"-").concat(i[t].keyLabel))}))]}):null})),Ec=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({},ze),{},{containerElements:{display:"flex",flexDirection:"column",height:"calc(100% - 18px)"},chartCont:{position:"relative",flexGrow:1,minHeight:"65%",height:1},legendChart:{display:"flex",flexWrap:"wrap",flex:"0 1 auto",maxHeight:"35%",margin:0,overflowY:"auto",position:"relative",textAlign:"center"}}))}))((function(e){var t=e.classes,a=e.title,c=e.linearConfiguration,i=e.data,r=e.hideYAxis,o=void 0!==r&&r,s=e.yAxisFormatter,l=void 0===s?function(e){return e}:s,d=e.xAxisFormatter,b=void 0===d?function(e){return e}:d,u=e.panelWidth,j=void 0===u?0:u,m=5;return 0!==j&&(m=j>400?5:j>350?10:j>300?15:j>250?20:30),Object(n.jsxs)("div",{className:t.singleValueContainer,children:[Object(n.jsx)("div",{className:t.titleContainer,children:a}),Object(n.jsxs)("div",{className:t.containerElements,children:[Object(n.jsx)("div",{className:t.chartCont,children:Object(n.jsx)(vc.a,{children:Object(n.jsxs)(yc.a,{data:i,margin:{top:5,right:20,left:o?20:5,bottom:0},children:[Object(n.jsx)(Sc.a,{strokeDasharray:"3 3",strokeWidth:1,strokeOpacity:.5}),Object(n.jsx)(Cc.a,{dataKey:"name",tickFormatter:function(e){return b(e)},interval:m,tick:{fontSize:"70%"},tickCount:10}),Object(n.jsx)(kc.a,{domain:[0,function(e){return 4*e}],hide:o,tickFormatter:function(e){return l(e)},tick:{fontSize:"70%"}}),c.map((function(e,t){return Object(n.jsx)(wc.a,{type:"monotone",dataKey:e.dataKey,stroke:e.lineColor,fill:e.fillColor,fillOpacity:.3},"area-".concat(e.dataKey,"-").concat(t.toString()))})),Object(n.jsx)(Nc.a,{content:Object(n.jsx)(Tc,{linearConfiguration:c,yAxisFormatter:l}),wrapperStyle:{zIndex:5e3}})]})})}),Object(n.jsx)("div",{className:t.legendChart,children:c.map((function(e,a){return Object(n.jsxs)("div",{className:t.singleLegendContainer,children:[Object(n.jsx)("div",{className:t.colorContainer,style:{backgroundColor:e.lineColor}}),Object(n.jsx)("div",{className:t.legendLabel,children:e.keyLabel})]},"legend-".concat(e.keyLabel,"-").concat(a.toString()))}))})]})]})})),Ac=a(987),_c=a(449),Ic=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},Ke))}))((function(e){var t=e.active,a=e.payload,c=e.label,i=e.barChartConfiguration,r=e.classes;return t?Object(n.jsxs)("div",{className:r.customTooltip,children:[Object(n.jsx)("div",{className:r.timeStampTitle,children:c}),a&&a.map((function(e,t){return Object(n.jsxs)("div",{className:r.labelContainer,children:[Object(n.jsx)("div",{className:r.labelColor,style:{backgroundColor:i[t].color}}),Object(n.jsx)("div",{className:r.itemValue,children:Object(n.jsx)("span",{className:r.valueContainer,children:e.value})})]},"pltiem-".concat(t,"-").concat(c))}))]}):null})),Fc=function(e){var t=e.x,a=e.y,c=e.payload;return Object(n.jsx)("text",{width:50,fontSize:"63%",textAnchor:"end",fill:"#333",transform:"translate(".concat(t,",").concat(a,")"),dy:3,children:c.value})},Mc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},ze))}))((function(e){var t=e.classes,a=e.title,c=e.barChartConfiguration,i=e.data;return Object(n.jsxs)("div",{className:t.singleValueContainer,children:[Object(n.jsx)("div",{className:t.titleContainer,children:a}),Object(n.jsx)("div",{className:t.contentContainer,children:Object(n.jsx)(vc.a,{children:Object(n.jsxs)(Ac.a,{data:i,layout:"vertical",barCategoryGap:1,children:[Object(n.jsx)(Cc.a,{type:"number",hide:!0}),Object(n.jsx)(kc.a,{dataKey:"name",type:"category",interval:0,tick:Object(n.jsx)(Fc,{}),tickLine:!1,axisLine:!1,width:150}),c.map((function(e){return Object(n.jsx)(_c.a,{dataKey:e.dataKey,fill:e.color,background:e.background},"bar-".concat(e.dataKey))})),Object(n.jsx)(Nc.a,{cursor:{fill:"rgba(255, 255, 255, 0.3)"},content:Object(n.jsx)(Ic,{barChartConfiguration:c})})]})})})]})})),Lc=a(1003),Dc=a(420),Bc=a(226),Rc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},ze))}))((function(e){var t=e.classes,a=e.title,c=e.pieChartConfiguration,i=e.dataInner,r=e.dataOuter,o=e.middleLabel,s=void 0===o?"":o,l=Z()(c,"innerChart.colorList",[]),d=Z()(c,"outerChart.colorList",[]);return Object(n.jsxs)("div",{className:t.singleValueContainer,children:[Object(n.jsx)("div",{className:t.titleContainer,children:a}),Object(n.jsx)("div",{className:t.contentContainer,children:Object(n.jsx)(vc.a,{children:Object(n.jsxs)(Lc.a,{margin:{top:5,bottom:5},children:[r&&Object(n.jsx)(Dc.a,{data:r,cx:"50%",cy:"50%",dataKey:"value",innerRadius:Z()(c,"outerChart.innerRadius",0),outerRadius:Z()(c,"outerChart.outerRadius","80%"),startAngle:Z()(c,"outerChart.startAngle",0),endAngle:Z()(c,"outerChart.endAngle",360),fill:"#201763",children:r.map((function(e,t){return Object(n.jsx)(Bc.a,{fill:"undefined"==typeof d[t]?"#393939":d[t]},"cellOuter-".concat(t))}))}),i&&Object(n.jsx)(Dc.a,{data:i,dataKey:"value",cx:"50%",cy:"50%",innerRadius:Z()(c,"innerChart.innerRadius",0),outerRadius:Z()(c,"innerChart.outerRadius","80%"),startAngle:Z()(c,"innerChart.startAngle",0),endAngle:Z()(c,"innerChart.endAngle",360),fill:"#201763",children:i.map((function(e,t){return Object(n.jsx)(Bc.a,{fill:"undefined"==typeof l[t]?"#393939":l[t]},"cell-".concat(t))}))}),s&&Object(n.jsx)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",fontWeight:600,fontSize:14,children:s})]})})})]})})),Pc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},ze))}))((function(e){var t=e.classes,a=e.title,c=e.data,i=e.color,r=e.fillColor,o=e.label;return Object(n.jsxs)("div",{className:t.singleValueContainer,children:[Object(n.jsx)("div",{className:t.titleContainer,children:a}),Object(n.jsx)("div",{className:t.contentContainer,children:Object(n.jsx)(vc.a,{children:Object(n.jsxs)(yc.a,{data:c,children:[Object(n.jsx)(kc.a,{domain:[0,function(e){return 2*e}],hide:!0}),Object(n.jsx)(wc.a,{type:"monotone",dataKey:"value",stroke:i,fill:r,fillOpacity:1}),Object(n.jsx)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",fontWeight:600,fontSize:18,fill:i,children:o})]})})})]})})),zc=a(424),Kc=a(60),Wc=a(995),Uc=a(425),Vc=a.n(Uc),Gc=Object(N.a)((function(e){return Object(k.a)({dateSelectorOverride:{height:40,border:"#EAEDEE 1px solid",marginLeft:15,backgroundColor:"#fff",padding:"0 16px",borderRadius:5,"&.MuiInput-underline:hover:not(.Mui-disabled):before":{borderBottom:0},"&:hover":{borderColor:"#000","&:before, &:after":{borderColor:"transparent",borderBottom:0}},"&:before, &:after":{borderColor:"transparent",borderBottom:0},"& input":{fontSize:12,fontWeight:600,color:"#393939"}},parentDateOverride:{flexGrow:1}})}))((function(e){var t=e.value,a=e.onChange,c=e.classes;return Object(n.jsx)(Kc.a,{utils:zc.a,children:Object(n.jsx)(Wc.a,{value:t,onChange:a,InputProps:{startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(Vc.a,{})}),className:c.dateSelectorOverride},label:"",ampm:!1,variant:"inline",className:c.parentDateOverride,format:"MMMM Do YYYY, h:mm a"})})})),qc=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Object(n.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})})})},Hc=Object(s.b)(null,{displayErrorMessage:V}),Yc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},Ie),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})),{},{widgetsContainer:{height:"calc(100vh - 250px)",paddingBottom:235},syncButton:{"&.MuiButton-root .MuiButton-iconSizeMedium > *:first-child":{fontSize:18}},actionsTray:Object(j.a)(Object(j.a)({},Ie.actionsTray),{},{padding:"0 10px"})}))}))(Hc((function(e){var t=e.classes,a=e.displayErrorMessage,i=Object(c.useState)(null),r=Object(u.a)(i,2),o=r[0],s=r[1],l=Object(c.useState)(null),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(!0),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(pc),v=Object(u.a)(f,2),y=v[0],S=v[1],C=function(e){var t=localStorage.getItem(bc);if(!t)return uc;var a=JSON.parse(atob(t));return 0===a.length||a.length>0&&!a[0].minW||0!==e&&a.length!==e?uc:a}(y.length),k=Object(c.useCallback)((function(e){var t=e/8+5,a=function(e,a){switch(e.type){case Qn.singleValue:return Object(n.jsx)(xc,{title:e.title,data:e.data});case Qn.pieChart:return Object(n.jsx)(Rc,{title:e.title,dataInner:e.data,dataOuter:e.dataOuter||null,pieChartConfiguration:e.widgetConfiguration,middleLabel:e.innerLabel});case Qn.linearGraph:return Object(n.jsx)(Ec,{title:e.title,data:e.data,linearConfiguration:e.widgetConfiguration,hideYAxis:e.disableYAxis,xAxisFormatter:e.xAxisFormatter,yAxisFormatter:e.yAxisFormatter,panelWidth:C[a]?t*C[a].w:t});case Qn.barChart:return Object(n.jsx)(Mc,{title:e.title,data:e.data,barChartConfiguration:e.widgetConfiguration});case Qn.singleRep:var c=e.fillColor?e.fillColor:e.color;return Object(n.jsx)(Pc,{title:e.title,data:e.data,label:e.innerLabel,color:e.color,fillColor:c});default:return null}};return y.map((function(e,t){return Object(n.jsx)("div",{children:a(e,t)},e.layoutIdentifier)}))}),[y,C]),w=Object(c.useCallback)((function(){var e=0;if(null!==o&&null!==b){var t=b.unix()-o.unix(),n=Math.floor(t/60);e=n<1?15:n}he.invoke("GET","/api/v1/admin/info?step=".concat(e,"&").concat(null!==o?"&start=".concat(o.unix()):"").concat(null!==o&&null!==b?"&":"").concat(null!==b?"end=".concat(b.unix()):"")).then((function(e){if(e.widgets){var t=gc(e.widgets);S(t)}else a("Widget information could not be retrieved at this time. Please try again");O(!1)})).catch((function(e){a(e),O(!1)}))}),[o,b,a]);return Object(c.useEffect)((function(){p&&w()}),[p,w]),Object(n.jsxs)(x.a,{container:!0,className:t.container,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(t.actionsTray," ").concat(t.timeContainers),children:[Object(n.jsx)("span",{className:t.label,children:"Start Time"}),Object(n.jsx)(Gc,{value:o,onChange:s}),Object(n.jsx)("span",{className:t.label,children:"End Time"}),Object(n.jsx)(Gc,{value:b,onChange:j}),Object(n.jsx)(g.a,{type:"button",variant:"contained",color:"primary",onClick:function(){O(!0)},startIcon:Object(n.jsx)(qc,{}),className:t.syncButton,children:"Sync"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.widgetsContainer,children:Object(n.jsx)(Bt.a,{style:{width:"100%",height:"auto",paddingBottom:45},children:function(e){var t=e.width,a=e.height,c=a<600?600:a;c>380&&(c=480);var i=t>1920?1920:t;return Object(n.jsx)(dc.a,{width:i,cols:8,containerPadding:[10,10],onLayoutChange:fc,layout:C,rowHeight:c/6,style:{margin:"0 auto",width:i},children:k(t)})}})})]})}))),Qc=function(){return Object(n.jsxs)(it.a,{viewBox:"0 0 15.834 17.375",children:[Object(n.jsx)("defs",{children:Object(n.jsxs)("linearGradient",{id:"a",y1:"0.5",x2:"1",y2:"0.5",gradientUnits:"objectBoundingBox",children:[Object(n.jsx)("stop",{offset:"0.044",stopColor:"#362585"}),Object(n.jsx)("stop",{offset:"0.301",stopColor:"#281b6f"}),Object(n.jsx)("stop",{offset:"1",stopColor:"#1e1560"})]})}),Object(n.jsxs)("g",{transform:"translate(0 0.375)",children:[Object(n.jsx)("circle",{style:{opacity:.1,fill:"url(#a)"},cx:"6.625",cy:"6.625",r:"6.625",transform:"translate(0 3.75)"}),Object(n.jsxs)("g",{transform:"translate(3.092)",children:[Object(n.jsx)("ellipse",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.75px"},cx:"6.183",cy:"1.244",rx:"6.183",ry:"1.244",transform:"translate(0)"}),Object(n.jsx)("path",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.75px"},d:"M-3722.174,1225.225l-1.687,10.292a.858.858,0,0,1-.578.669,12.182,12.182,0,0,1-3.918.647,12.187,12.187,0,0,1-3.894-.639.878.878,0,0,1-.6-.678q-.843-5.145-1.687-10.291",transform:"translate(3734.541 -1223.981)"})]})]})]})},Zc=function(){return Object(n.jsxs)(it.a,{viewBox:"0 0 18.344 17.009",children:[Object(n.jsx)("defs",{children:Object(n.jsxs)("linearGradient",{id:"a",y1:"0.5",x2:"1",y2:"0.5",gradientUnits:"objectBoundingBox",children:[Object(n.jsx)("stop",{offset:"0.044",stopColor:"#362585"}),Object(n.jsx)("stop",{offset:"0.301",stopColor:"#281b6f"}),Object(n.jsx)("stop",{offset:"1",stopColor:"#1e1560"})]})}),Object(n.jsxs)("g",{transform:"translate(0 0.25)",children:[Object(n.jsx)("ellipse",{style:{opacity:.1,fill:"url(#a)"},cx:"7.462",cy:"7.462",rx:"7.462",ry:"7.462",transform:"translate(0 1.835)"}),Object(n.jsx)("rect",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.5px"},width:"9.323",height:"9.323",transform:"translate(4.083)"}),Object(n.jsx)("rect",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.5px"},width:"8.223",height:"8.223",transform:"translate(9.871 5.307)"})]})]})},Jc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})),{},{paper:{padding:e.spacing(2),display:"flex",overflow:"auto",flexDirection:"column",border:"#eaedee 1px solid",borderRadius:5,boxShadow:"none"},fixedHeight:{height:165,minWidth:247,marginRight:20,padding:"25px 28px","& svg":{maxHeight:18}},consumptionValue:{color:"#000000",fontSize:"60px",fontWeight:"bold"},icon:{marginRight:10,color:"#777777"},notationContainer:{display:"flex"},dashboardBG:{width:390,height:255,zIndex:500,position:"absolute",backgroundSize:"fill",backgroundImage:"url(/images/BG_IllustrationDarker.svg)",backgroundPosition:"right bottom",right:0,bottom:0,backgroundRepeat:"no-repeat"},dashboardContainer:{zIndex:600,position:"absolute"},elementTitle:{fontWeight:500,color:"#777777",fontSize:14,marginTop:-9},smallUnit:{fontSize:20}}))}))((function(e){var t=e.classes,a=e.usage,i=Object(xe.a)(t.paper,t.fixedHeight),r=function(e){return void 0===e?0:e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")};return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("div",{className:t.dashboardBG}),Object(n.jsx)(x.a,{container:!0,className:t.dashboardContainer,children:Object(n.jsx)(x.a,{container:!0,spacing:3,className:t.container,children:Object(n.jsxs)(x.a,{item:!0,className:t.notationContainer,children:[Object(n.jsxs)(C.a,{className:i,children:[Object(n.jsxs)(x.a,{container:!0,direction:"row",alignItems:"center",children:[Object(n.jsx)(x.a,{item:!0,className:t.icon,children:Object(n.jsx)(Qc,{})}),Object(n.jsx)(x.a,{item:!0,children:Object(n.jsx)(v.a,{className:t.elementTitle,children:"All buckets"})})]}),Object(n.jsx)(v.a,{className:t.consumptionValue,children:a?r(a.buckets):0})]}),Object(n.jsxs)(C.a,{className:i,children:[Object(n.jsxs)(x.a,{container:!0,direction:"row",alignItems:"center",children:[Object(n.jsx)(x.a,{item:!0,className:t.icon,children:Object(n.jsx)(vn,{})}),Object(n.jsx)(x.a,{item:!0,children:Object(n.jsx)(v.a,{className:t.elementTitle,children:"Usage"})})]}),Object(n.jsx)(v.a,{className:t.consumptionValue,children:a?function(e){if(void 0===e)return"0";var a=ce(e).split(" ");return 2!==a.length?a.join(" "):Object(n.jsxs)(c.Fragment,{children:[a[0],Object(n.jsx)("span",{className:t.smallUnit,children:a[1]})]})}(a.usage+""):0})]}),Object(n.jsxs)(C.a,{className:i,children:[Object(n.jsxs)(x.a,{container:!0,direction:"row",alignItems:"center",children:[Object(n.jsx)(x.a,{item:!0,className:t.icon,children:Object(n.jsx)(Zc,{})}),Object(n.jsx)(x.a,{item:!0,children:Object(n.jsxs)(v.a,{className:t.elementTitle,children:[" ","Total Objects"]})})]}),Object(n.jsx)(v.a,{className:t.consumptionValue,children:a?r(a.objects):0})]})]})})})]})})),$c=Object(s.b)(null,{displayErrorMessage:V}),Xc=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))($c((function(e){var t=e.classes,a=e.displayErrorMessage,i=Object(c.useState)(!0),r=Object(u.a)(i,2),o=r[0],s=r[1],l=Object(c.useState)(null),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useCallback)((function(){he.invoke("GET","/api/v1/admin/info").then((function(e){j(e),s(!1)})).catch((function(e){a(e),s(!1)}))}),[j,s,a]);Object(c.useEffect)((function(){o&&m()}),[o,m]);var h=Z()(b,"widgets",null);return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(Ua,{label:"Dashboard"}),Object(n.jsx)(x.a,{container:!0,children:o?Object(n.jsx)(x.a,{item:!0,xs:12,className:t.container,children:Object(n.jsx)(y.a,{})}):Object(n.jsx)(c.Fragment,{children:null!==h?Object(n.jsx)(Yc,{}):Object(n.jsx)(Jc,{usage:b})})})]})}))),ei=a(914),ti=a(989),ai=a(426),ni=a.n(ai),ci=a(988),ii=a(990),ri=a(959),oi=a(991),si=a.p+"static/media/minio_console_logo.0837460e.svg",li=a.p+"static/media/minio_operator_logo.1312b7c9.svg",di=[{label:"",group:"common",collapsible:!1},{label:"User",group:"User",collapsible:!0},{label:"Admin",group:"Admin",collapsible:!0},{label:"Tools",group:"Tools",collapsible:!0},{label:"Operator",group:"Operator",collapsible:!1},{label:"",group:"License",collapsible:!1}],bi=a(429),ui=a.n(bi),ji=function(){return Object(n.jsx)(it.a,{children:Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 11",children:[Object(n.jsx)("path",{fill:"#fff",d:"M11 11H0V2h11v9zM2 8v1h7V8zm0-3v1h5V5z"}),Object(n.jsxs)("g",{fill:"#07274a",stroke:"#fdfdfd",strokeWidth:"0.5",transform:"translate(7)",children:[Object(n.jsx)("circle",{cx:"3",cy:"3",r:"3",stroke:"none"}),Object(n.jsx)("circle",{cx:"3",cy:"3",r:"2.75",fill:"none"})]}),Object(n.jsx)("path",{fill:"none",stroke:"#fff",strokeWidth:"0.5",d:"M8.73 2.794l.954.953 1.471-1.471"})]})})},mi=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12.122 10.571",children:Object(n.jsxs)("g",{transform:"translate(0 0.5)",children:[Object(n.jsx)("path",{style:{fill:"none",stroke:"rgba(255,255,255,0.8)"},d:"M4816.27,3755.205v-2.939h8.539v9.571h-8.539v-2.932",transform:"translate(-4813.187 -3752.266)"}),Object(n.jsx)("path",{style:{fill:"none",stroke:"rgba(255,255,255,0.8)"},d:"M4813.187,3757.052h8.081",transform:"translate(-4813.187 -3752.266)"}),Object(n.jsx)("path",{style:{fill:"none",stroke:"rgba(255,255,255,0.8)"},d:"M4806.5,3756.511l2.265,2.063-2.265,2.063",transform:"translate(-4800.808 -3753.863)"})]})})})},hi=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:Object(n.jsxs)("g",{transform:"translate(-518 -361)",children:[Object(n.jsx)("path",{d:"M-126,0V10h10V0Zm1.5,8.5V2.95h7V8.5Z",transform:"translate(644 361)"}),Object(n.jsx)("rect",{width:"2",height:"1",transform:"translate(520.272 364.772)"})]})})})},pi=function(){return Object(n.jsx)(it.a,{children:Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10.014 9.993",children:[Object(n.jsx)("path",{className:"a",d:"M9.162,5.971h0L8.192,5,9.346,3.846a2.257,2.257,0,0,0,0-3.192,2.311,2.311,0,0,0-3.192,0L5,1.808,4.029.837,3.846.654a2.311,2.311,0,0,0-3.192,0,2.257,2.257,0,0,0,0,3.192l.184.183h0L1.808,5,.654,6.154A2.257,2.257,0,0,0,3.846,9.346L5,8.192l.971.971.183.183A2.257,2.257,0,0,0,9.346,6.154Zm-2.29-4.6a1.27,1.27,0,0,1,1.757,0,1.242,1.242,0,0,1,0,1.757L7.475,4.283,5.717,2.525Zm-5.5,1.757A1.243,1.243,0,0,1,3.129,1.371l.183.183L1.555,3.312Zm1.757,5.5a1.27,1.27,0,0,1-1.757,0,1.242,1.242,0,0,1,0-1.757L2.525,5.717,4.283,7.475Zm2.843-.9-.254-.253L2.525,4.283l-.253-.254L4.029,2.272l.254.253L7.475,5.717l.253.254Zm2.657.9a1.271,1.271,0,0,1-1.757,0l-.183-.183L8.446,6.688l.183.183h0a1.241,1.241,0,0,1,0,1.757Z",transform:"translate(0.007 -0.014)"}),Object(n.jsx)("circle",{cx:"0.5",cy:"0.5",r:"0.5",transform:"translate(4.507 4.486)"}),Object(n.jsx)("circle",{cx:"0.5",cy:"0.5",r:"0.5",transform:"translate(3.507 3.486)"}),Object(n.jsx)("circle",{cx:"0.5",cy:"0.5",r:"0.5",transform:"translate(5.507 5.486)"})]})})},Oi=a(427),gi=a.n(Oi),fi=a(428),xi=a.n(fi),vi=Object(s.b)((function(e){return{open:e.system.loggedIn,operatorMode:e.system.operatorMode}}),{userLoggedIn:P}),yi=vi(Object(N.a)((function(e){return Object(k.a)({logo:{paddingTop:25,marginBottom:30,paddingLeft:45,"& img":{width:120}},menuList:{"& .active":{borderTopLeftRadius:2,borderBottomLeftRadius:2,color:"#fff",backgroundColor:"rgba(255, 255, 255, .18)","& .MuiSvgIcon-root":{color:"white"},"& .MuiTypography-root":{color:"#fff",fontWeight:700}},"& .MuiSvgIcon-root":{fontSize:16,color:"rgba(255, 255, 255, 0.8)",maxWidth:14},"& .MuiListItemIcon-root":{minWidth:25},"& .MuiTypography-root":{fontSize:12,color:"rgba(255, 255, 255, 0.8)"},"& .MuiListItem-gutters":{paddingRight:0,fontWeight:300},"& .MuiListItem-root":{padding:"2px 0 2px 16px",marginBottom:8,marginLeft:30,width:"calc(100% - 30px)"},"& .MuiCollapse-container .MuiCollapse-wrapper .MuiCollapse-wrapperInner .MuiDivider-root":{backgroundColor:"rgba(112,112,112,0.5)",marginBottom:12,height:1}},extraMargin:{"&.MuiListItem-gutters":{marginLeft:5}},groupTitle:{color:"#fff",fontSize:10,textTransform:"uppercase",fontWeight:700,marginBottom:3,cursor:"pointer",userSelect:"none",display:"flex",justifyContent:"space-between"},subTitleMenu:{fontWeight:700,marginLeft:10,"&.MuiTypography-root":{fontSize:13,color:"#fff"}},selectorArrow:{marginRight:20,marginTop:1,display:"inline-block",width:0,height:0,borderStyle:"solid",borderWidth:"4px 4px 0 4px",borderColor:"rgba(255, 255, 255, .29) transparent transparent transparent",transform:"rotateZ(0deg)",transitionDuration:"0.2s"},selectorArrowOpen:{transform:"rotateZ(180deg)"}})}))((function(e){var t=e.userLoggedIn,a=e.classes,r=e.pages,o=e.operatorMode,s=Object(c.useState)(function(){var e=[];return di.forEach((function(t){t.collapsible&&(e[t.group]=!0)})),e}()),l=Object(u.a)(s,2),d=l[0],m=l[1],h=[{group:"common",type:"item",component:Vt.b,to:"/dashboard",name:"Dashboard",icon:Object(n.jsx)(lt,{})},{group:"User",type:"item",component:Vt.b,to:"/object-browser",name:"Object Browser",icon:Object(n.jsx)(ni.a,{})},{group:"User",type:"item",component:Vt.b,to:"/account",name:"Account",icon:Object(n.jsx)(ut,{})},{group:"Admin",type:"item",component:Vt.b,to:"/buckets",name:"Buckets",icon:Object(n.jsx)(dt,{})},{group:"Admin",type:"item",component:Vt.b,to:"/users",name:"Users",icon:Object(n.jsx)(bt,{})},{group:"Admin",type:"item",component:Vt.b,to:"/groups",name:"Groups",icon:Object(n.jsx)(jt,{})},{group:"Admin",type:"item",component:Vt.b,to:"/policies",name:"IAM Policies",icon:Object(n.jsx)(mt,{})},{group:"Tools",type:"item",component:Vt.b,to:"/logs",name:"Logs",icon:Object(n.jsx)(hi,{})},{group:"Tools",type:"item",component:Vt.b,to:"/watch",name:"Watch",icon:Object(n.jsx)(gt,{})},{group:"Tools",type:"item",component:Vt.b,to:"/trace",name:"Trace",icon:Object(n.jsx)(ht,{})},{group:"Tools",type:"item",component:Vt.b,to:"/heal",name:"Heal",icon:Object(n.jsx)(pi,{})},{group:"Tools",type:"item",component:Vt.b,to:"/health-info",name:"Diagnostic",icon:Object(n.jsx)(gi.a,{})},{group:"Admin",type:"item",component:Vt.b,to:"/settings",name:"Settings",icon:Object(n.jsx)(pt,{})},{group:"Operator",type:"item",component:Vt.b,to:"/tenants",name:"Tenants",icon:Object(n.jsx)(Ot,{})},{group:"Operator",type:"item",component:Vt.b,to:"/storage",name:"Storage",icon:Object(n.jsx)(xi.a,{})}],p=r.reduce((function(e,t){return e[t]=!0,e}),{}),O={group:"License",type:"item",component:Vt.b,to:"/documentation",name:"Documentation",icon:Object(n.jsx)(ui.a,{}),forceDisplay:!0};p.hasOwnProperty("/tenants")?h.push({group:"Operator",type:"item",component:Vt.b,to:"/license",name:"License",icon:Object(n.jsx)(ji,{})},Object(j.a)(Object(j.a)({},O),{},{group:"Operator",onClick:function(e){e.preventDefault(),window.open("https://docs.min.io/?ref=".concat(o?"op":"con"),"_blank")}})):h.push({group:"License",type:"item",component:Vt.b,to:"/license",name:"License",icon:Object(n.jsx)(ji,{})},Object(j.a)(Object(j.a)({},O),{},{group:"License",onClick:function(e){e.preventDefault(),window.open("https://docs.min.io/?ref=".concat(o?"op":"con"),"_blank")}}));var g=h.filter((function(e){return p[e.to]||e.forceDisplay||"item"!==e.type}));return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("div",{className:a.logo,children:Object(n.jsx)("img",{src:o?li:si,alt:"logo"})}),Object(n.jsxs)(ri.a,{className:a.menuList,children:[di.map((function(e,t){var c=(g||[]).filter((function(t){return t.group===e.group}));return 0===c.filter((function(e){return"title"!==e.type})).length?null:Object(n.jsxs)(i.a.Fragment,{children:[""!==e.label&&Object(n.jsxs)(ei.a,{className:a.groupTitle,onClick:function(){e.collapsible&&function(e){var t=Object(j.a)({},d);t[e]=!t[e],m(t)}(e.group)},children:[Object(n.jsx)("span",{children:e.label}),e.collapsible&&Object(n.jsx)("span",{className:"".concat(a.selectorArrow," ").concat(d[e.group]?a.selectorArrowOpen:"")})]}),Object(n.jsxs)(ci.a,{in:!e.collapsible||d[e.group],timeout:"auto",unmountOnExit:!0,children:[c.map((function(e){switch(e.type){case"item":return Object(n.jsxs)(ei.a,{button:!0,onClick:e.onClick,component:e.component,to:e.to,className:e.extraMargin?a.extraMargin:null,children:[e.icon&&Object(n.jsx)(ti.a,{children:e.icon}),e.name&&Object(n.jsx)(ii.a,{primary:e.name})]},e.to);case"title":return Object(n.jsx)(ei.a,{component:e.component,className:a.subTitleMenu,children:e.name},e.name);default:return null}})),Object(n.jsx)(oi.a,{})]},"menuGroup-".concat(e.group))]},"menuElem-".concat(t.toString()))})),Object(n.jsxs)(ei.a,{button:!0,onClick:function(){var e=function(){ie(),t(!1),localStorage.setItem("userLoggedIn",""),b.push("/login")};he.invoke("POST","/api/v1/logout").then((function(){e()})).catch((function(t){console.log(t),e()}))},children:[Object(n.jsx)(ti.a,{children:Object(n.jsx)(mi,{})}),Object(n.jsx)(ii.a,{primary:"Logout"})]})]})]})}))),Si={setModalErrorSnackMessage:q},Ci=Object(s.b)(null,Si),ki=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({jsonPolicyEditor:{minHeight:400,width:"100%"},buttonContainer:{textAlign:"right"},infoDetails:{color:"#393939",fontSize:12,fontStyle:"italic",marginBottom:"8px"},containerScrollable:{maxHeight:"calc(100vh - 300px)",overflowY:"auto"}},we))}))(Ci((function(e){var t=e.classes,a=e.open,i=e.closeModalAndRefresh,r=e.setModalErrorSnackMessage,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(""),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(!1),O=Object(u.a)(p,2),f=O[0],v=O[1];Object(c.useEffect)((function(){l&&he.invoke("POST","/api/v1/service-accounts",{policy:m}).then((function(e){d(!1),i(e)})).catch((function(e){d(!1),r(e)}))}),[l,d,r,m,i]);return Object(n.jsx)(ga,{modalOpen:a,onClose:function(){i(null)},title:"Create Service Account",children:Object(n.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault(),d(!0)}(e)},children:[Object(n.jsxs)(x.a,{container:!0,className:t.containerScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.infoDetails,children:"Service Accounts inherit the policy explicitly attached to the parent user and the policy attached to each group in which the parent user has membership. You can specify an optional JSON-formatted policy below to restrict the Service Account access to a subset of actions and resources explicitly allowed for the parent user. You cannot modify the Service Account optional policy after saving."})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"locking",id:"locking",name:"locking",checked:f,onChange:function(e){v(e.target.checked)},label:"Restrict with policy",indicatorLabels:["On","Off"]})}),f&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Sn,{value:m,onBeforeChange:function(e,t,a){h(a)}})})]}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){h("")},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:l,children:"Create"})]}),l&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})]})})}))),wi={setErrorSnackMessage:V},Ni=Object(s.b)(null,wi),Ti=Object(N.a)((function(e){return Object(k.a)({wrapText:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"}})}))(Ni((function(e){var t=e.classes,a=e.closeDeleteModalAndRefresh,i=e.deleteOpen,r=e.selectedServiceAccount,o=e.setErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1];Object(c.useEffect)((function(){d&&he.invoke("DELETE","/api/v1/service-accounts/".concat(r)).then((function(){b(!1),a(!0)})).catch((function(e){b(!1),o(e)}))}),[d,a,r,o]);return Object(n.jsxs)(ja.a,{open:i,onClose:function(){a(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete ServiceAccount"}),Object(n.jsxs)(ha.a,{children:[d&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete service account"," ",Object(n.jsx)("b",{className:t.wrapText,children:r}),"?"]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){a(!1)},color:"primary",disabled:d,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){null!=r&&b(!0)},color:"secondary",autoFocus:!0,children:"Delete"})]})]})}))),Ei=Object(N.a)((function(e){return Object(k.a)({warningBlock:{color:"red"},buttonContainer:{textAlign:"right"},credentialsPanel:{overflowY:"auto",maxHeight:350}})}))((function(e){var t=e.classes,a=e.newServiceAccount,c=e.open,r=e.closeModal,o=e.entity;if(!a)return null;var s=Z()(a,"console",null);return Object(n.jsx)(ga,{modalOpen:c,onClose:function(){r()},title:"New ".concat(o," Created"),children:Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:["A new ",o," has been created with the following details:",s&&Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.credentialsPanel,children:[Object(n.jsx)("strong",{children:"Console Credentials"}),Array.isArray(s)&&s.map((function(e,t){return Object(n.jsxs)("ul",{children:[Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Access Key:"})," ",e.accessKey]}),Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Secret Key:"})," ",e.secretKey]})]},"creds-item-".concat(t.toString()))})),!Array.isArray(s)&&Object(n.jsxs)("ul",{children:[Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Access Key:"})," ",s.accessKey]}),Object(n.jsxs)("li",{children:[Object(n.jsx)("b",{children:"Secret Key:"})," ",s.secretKey]})]})]})}),Object(n.jsx)(v.a,{component:"p",variant:"body1",className:t.warningBlock,children:"Write these down, as this is the only time the secret will be displayed."})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)(g.a,{onClick:function(){var e={};if(s)if(Array.isArray(s)){var t=s.map((function(e){return{access_key:e.accessKey,secret_key:e.secretKey}}));e={console:Object(Je.a)(t)}}else e={console:[{access_key:s.accessKey,secret_key:s.secretKey}]};!function(e,t){var a=document.createElement("a");a.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),a.setAttribute("download",e),a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a)}("credentials.json",JSON.stringify(Object(j.a)({},e)))},color:"primary",children:"Download"}),Object(n.jsx)(g.a,{onClick:function(){r()},color:"secondary",autoFocus:!0,children:"Done"})]})]})})})})),Ai=function(e,t){return e.accessKey>t.accessKey?1:e.accessKeyt.name?1:e.namet?1:e0&&m.length>0&&f.length>0),children:"Save"})}),k&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})}):null}))),Bi=Object(s.b)(null,{displayErrorMessage:V}),Ri=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"480px",minWidth:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},imageIcon:{height:"100%"},iconRoot:{textAlign:"center"}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Bi((function(e){var t=e.classes,a=e.displayErrorMessage,r=e.changePassword,o=Object(c.useState)([]),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(!1),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(""),O=Object(u.a)(p,2),y=O[0],S=O[1],C=Object(c.useState)(!1),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(!1),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(null),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(!1),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)(null),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Object(c.useState)(!1),G=Object(u.a)(V,2),q=G[0],H=G[1];Object(c.useEffect)((function(){Y()}),[]),Object(c.useEffect)((function(){m&&he.invoke("GET","/api/v1/service-accounts").then((function(e){var t=e.sort(Ii);h(!1),d(t)})).catch((function(e){a(e),h(!1)}))}),[m,h,d,a]);var Y=function(){h(!0)},Q=[{type:"delete",onClick:function(e){L(e),_(!0)}}],Z=l.filter((function(e){return e.toLowerCase().includes(y.toLowerCase())}));return Object(n.jsxs)(i.a.Fragment,{children:[w&&Object(n.jsx)(ki,{open:w,closeModalAndRefresh:function(e){!function(e){if(N(!1),Y(),null!==e){var t={console:{accessKey:"".concat(e.accessKey),secretKey:"".concat(e.secretKey)}};U(t),P(!0)}}(e)}}),A&&Object(n.jsx)(Ti,{deleteOpen:A,selectedServiceAccount:M,closeDeleteModalAndRefresh:function(e){!function(e){_(!1),e&&Y()}(e)}}),R&&Object(n.jsx)(Ei,{newServiceAccount:W,open:R,closeModal:function(){P(!1),U(null)},entity:"Service Account"}),Object(n.jsx)(Ua,{label:"Account"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[r&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"h5",component:"h5",children:"Settings"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Di,{open:q,closeModal:function(){return H(!1)}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(Mi.a,{}),onClick:function(){return H(!0)},children:"Change Password"})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)("br",{}),Object(n.jsx)(oi.a,{}),Object(n.jsx)("br",{})]})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"h5",component:"h5",children:"Service Accounts"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Service Accounts",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){S(e.target.value)}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){N(!0),L(null)},children:"Create service account"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{isLoading:m,records:Z,entityName:"Service Accounts",idField:"",columns:[{label:"Service Account",elementKey:""}],itemActions:Q})})]})})]})}))),Pi=a(227),zi=a.n(Pi),Ki={setModalErrorSnackMessage:q},Wi=Object(s.b)(null,Ki),Ui=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column",paddingTop:15,boxShadow:"none"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noFound:{textAlign:"center",padding:"10px 0"},tableContainer:{maxHeight:200},stickyHeader:{backgroundColor:"#fff"},actionsTitle:{fontWeight:600,color:"#000",fontSize:16,alignSelf:"center"},tableBlock:{marginTop:15},filterField:{width:375,fontWeight:600,"& .input":{"&::placeholder":{fontWeight:600,color:"#000"}}}},Ie),De))}))(Wi((function(e){var t=e.classes,a=e.selectedGroups,r=e.setSelectedGroups,o=e.setModalErrorSnackMessage,s=Object(c.useState)([]),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(!1),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(""),g=Object(u.a)(O,2),v=g[0],S=g[1],k=Object(c.useCallback)((function(){he.invoke("GET","/api/v1/groups").then((function(e){var t=Z()(e,"groups",[]);t||(t=[]),b(t.sort(Ii)),p(!1)})).catch((function(e){o(e),p(!1)}))}),[o]);Object(c.useEffect)((function(){p(!0)}),[]),Object(c.useEffect)((function(){h&&k()}),[h,k]);var w=a||[],N=d.filter((function(e){return e.includes(v)}));return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(C.a,{className:t.paper,children:[h&&Object(n.jsx)(y.a,{}),null!=d&&d.length>0?Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)("span",{className:t.actionsTitle,children:"Assign Groups"}),Object(n.jsx)(f.a,{placeholder:"Filter by Group",className:t.filterField,id:"search-resource",label:"",InputProps:{startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){S(e.target.value)}})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.tableBlock,children:Object(n.jsx)(ua,{columns:[{label:"Group",elementKey:""}],onSelect:function(e){var t=e.target,a=t.value,n=t.checked,c=Object(Je.a)(w);return n?c.push(a):c=c.filter((function(e){return e!==a})),r(c),c},selectedItems:w,isLoading:h,records:N,entityName:"Groups",idField:"",customPaperHeight:t.multiSelectTable})})]}):Object(n.jsx)("div",{className:t.noFound,children:"No Groups Available"})]})})})}))),Vi={setModalErrorSnackMessage:q},Gi=Object(s.b)(null,Vi),qi=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},we))}))(Gi((function(e){var t=e.classes,a=e.closeModalAndRefresh,r=e.selectedUser,o=e.open,s=e.setModalErrorSnackMessage,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(""),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(""),v=Object(u.a)(f,2),S=v[0],C=v[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)([]),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)([]),M=Object(u.a)(F,2),L=M[0],D=M[1],B=Object(c.useCallback)((function(){if(!r)return null;he.invoke("GET","/api/v1/users/".concat(r.accessKey)).then((function(e){j(!1),O(e.accessKey),I(e.memberOf||[]),D(e.memberOf||[]),T("enabled"===e.status)})).catch((function(e){j(!1),s(e)}))}),[r,s]);Object(c.useEffect)((function(){null==r?(O(""),C(""),I([])):B()}),[r,B]);var R=""!==p.trim()&&(""!==S.trim()&&null===r||null!==r);return Object(n.jsxs)(ga,{onClose:function(){a()},modalOpen:o,title:null!==r?"Edit User":"Create User",children:[null!==r&&Object(n.jsx)("div",{className:t.floatingEnabled,children:Object(n.jsx)(Ba,{indicatorLabels:["Enabled","Disabled"],checked:N,value:"user_enabled",id:"user-status",name:"user-status",onChange:function(e){T(e.target.checked)},switchOnly:!0})}),Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b||(j(!0),null!==r?he.invoke("PUT","/api/v1/users/".concat(r.accessKey),{status:N?"enabled":"disabled",groups:_}).then((function(e){j(!1),a()})).catch((function(e){j(!1),s(e)})):he.invoke("POST","/api/v1/users",{accessKey:p,secretKey:S,groups:_}).then((function(e){j(!1),a()})).catch((function(e){j(!1),s(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(va,{id:"accesskey-input",name:"accesskey-input",label:"Access Key",value:p,onChange:function(e){O(e.target.value)},disabled:null!==r}),null!==r?Object(n.jsx)(Ya,{label:"Current Groups",content:L.join(", ")}):Object(n.jsx)(va,{id:"standard-multiline-static",name:"standard-multiline-static",label:"Secret Key",type:"password",value:S,onChange:function(e){C(e.target.value)},autoComplete:"current-password"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ui,{selectedGroups:_,setSelectedGroups:function(e){I(e)}})})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){null===r?(O(""),C(""),I([])):I([])},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:b||!R,children:"Save"})]}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})]})}))),Hi={setErrorSnackMessage:V},Yi=Object(s.b)(null,Hi)((function(e){var t=e.closeDeleteModalAndRefresh,a=e.deleteOpen,i=e.selectedUser,r=e.setErrorSnackMessage,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1];return null===i?Object(n.jsx)("div",{}):Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete User"}),Object(n.jsxs)(ha.a,{children:[l&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete user ",Object(n.jsx)("b",{children:i.accessKey}),"?"]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:l,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){l||null!=i&&(d(!0),he.invoke("DELETE","/api/v1/users/".concat(i.accessKey),{id:i.id}).then((function(e){d(!1),t(!0)})).catch((function(e){d(!1),r(e)})))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),Qi={setModalErrorSnackMessage:q},Zi=Object(s.b)(null,Qi),Ji=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},we))}))(Zi((function(e){var t=e.open,a=e.checkedUsers,r=e.closeModalAndRefresh,o=e.classes,s=e.setModalErrorSnackMessage,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(!1),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)([]),v=Object(u.a)(f,2),S=v[0],C=v[1];Object(c.useEffect)((function(){b&&(S.length>0?he.invoke("PUT","/api/v1/users-groups-bulk",{groups:S,users:a}).then((function(){j(!1),O(!0)})).catch((function(e){j(!1),s(e)})):(j(!1),s("You need to select at least one group to assign")))}),[b,j,r,S,a,s]);return Object(n.jsx)(ga,{modalOpen:t,onClose:function(){r(p)},title:p?"The selected users were added to the following groups.":"Add Users to Group",children:p?Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(Ya,{label:"Groups",content:S.join(", ")}),Object(n.jsx)(Ya,{label:"Users",content:a.join(", ")})]}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{})]}):Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),j(!0)},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:o.formScrollable,children:[Object(n.jsx)(Ya,{label:"Selected Users",content:a.join(", ")}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ui,{selectedGroups:S,setSelectedGroups:C})})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:o.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:o.clearButton,onClick:function(){C([])},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:b||S.length<1,children:"Save"})]}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),$i=Object(s.b)(null,{setModalErrorSnackMessage:q}),Xi=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column",paddingTop:15,boxShadow:"none"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noFound:{textAlign:"center",padding:"10px 0"},tableContainer:{maxHeight:200},stickyHeader:{backgroundColor:"#fff"},actionsTitle:{fontWeight:600,color:"#000",fontSize:16,alignSelf:"center"},tableBlock:{marginTop:15},filterField:{width:375,fontWeight:600,"& .input":{"&::placeholder":{fontWeight:600,color:"#000"}}}},Ie),De))}))($i((function(e){var t=e.classes,a=e.selectedPolicy,r=void 0===a?[]:a,o=e.setSelectedPolicy,s=e.setModalErrorSnackMessage,l=Object(c.useState)([]),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(!1),h=Object(u.a)(m,2),p=h[0],O=h[1],g=Object(c.useState)(""),v=Object(u.a)(g,2),S=v[0],k=v[1],w=Object(c.useCallback)((function(){O(!0),he.invoke("GET","/api/v1/policies?limit=1000").then((function(e){var t=null===e.policies?[]:e.policies;O(!1),j(t.sort(_i))})).catch((function(e){O(!1),s(e)}))}),[s]);Object(c.useEffect)((function(){O(!0)}),[]),Object(c.useEffect)((function(){p&&w()}),[p,w]);var N=b.filter((function(e){return e.name.includes(S)}));return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(C.a,{className:t.paper,children:[p&&Object(n.jsx)(y.a,{}),b.length>0?Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)("span",{className:t.actionsTitle,children:"Assign Policies"}),Object(n.jsx)(f.a,{placeholder:"Filter by Policy",className:t.filterField,id:"search-resource",label:"",InputProps:{startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){k(e.target.value)}})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.tableBlock,children:Object(n.jsx)(ua,{columns:[{label:"Policy",elementKey:"name"}],onSelect:function(e){var t=e.target,a=t.value,n=t.checked,c=Object(Je.a)(r);n?c.push(a):c=c.filter((function(e){return e!==a})),c=c.filter((function(e){return""!==e})),o(c)},selectedItems:r,isLoading:p,records:N,entityName:"Policies",idField:"name",customPaperHeight:t.multiSelectTable})})]}):Object(n.jsx)("div",{className:t.noFound,children:"No Policies Available"})]})})})}))),er={setModalErrorSnackMessage:q},tr=Object(s.b)(null,er),ar=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({},we),{},{buttonContainer:{textAlign:"right"}}))}))(tr((function(e){var t=e.classes,a=e.closeModalAndRefresh,i=e.selectedUser,r=e.selectedGroup,o=e.setModalErrorSnackMessage,s=e.open,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)([]),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)([]),v=Object(u.a)(f,2),S=v[0],C=v[1];Object(c.useEffect)((function(){if(s){if(null!==r)return void(r&&he.invoke("GET","/api/v1/groups/".concat(r)).then((function(e){var t=Z()(e,"policy","");O(t.split(",")),C(t.split(","))})).catch((function(e){o(e),j(!1)})));var e=Z()(i,"policy",[]);O(e),C(e)}}),[s,r,i]);var k=Z()(i,"accessKey","");return Object(n.jsxs)(ga,{onClose:function(){a()},modalOpen:s,title:"Set Policies",children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ya,{label:"Selected ".concat(null!==r?"Group":"User"),content:null!==r?r:k})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ya,{label:"Current Policy",content:p.join(", ")})}),Object(n.jsx)(Xi,{selectedPolicy:S,setSelectedPolicy:C}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){C(p)},children:"Clear"}),Object(n.jsx)(g.a,{type:"button",variant:"contained",color:"primary",disabled:b,onClick:function(){var e="user",t=null;null!==r?(e="group",t=r):null!==i&&(t=i.accessKey),j(!0),he.invoke("PUT","/api/v1/set-policy/".concat(S),{entityName:t,entityType:e}).then((function(){j(!1),a()})).catch((function(e){j(!1),o(e)}))},children:"Save"})]}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})}))),nr={setErrorSnackMessage:V},cr=Object(s.b)(null,nr),ir=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(cr((function(e){var t=e.classes,a=e.setErrorSnackMessage,r=Object(c.useState)([]),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(!1),j=Object(u.a)(d,2),m=j[0],h=j[1],p=Object(c.useState)(!1),O=Object(u.a)(p,2),v=O[0],y=O[1],S=Object(c.useState)(!1),C=Object(u.a)(S,2),k=C[0],w=C[1],N=Object(c.useState)(null),T=Object(u.a)(N,2),E=T[0],A=T[1],_=Object(c.useState)(!1),I=Object(u.a)(_,2),F=I[0],M=I[1],L=Object(c.useState)(""),D=Object(u.a)(L,2),B=D[0],R=D[1],P=Object(c.useState)([]),z=Object(u.a)(P,2),K=z[0],W=z[1],U=Object(c.useState)(!1),V=Object(u.a)(U,2),G=V[0],q=V[1],H=Object(c.useCallback)((function(){h(!0),he.invoke("GET","/api/v1/users").then((function(e){var t=null===e.users?[]:e.users;h(!1),l(t.sort(Ai))})).catch((function(e){h(!1),a(e)}))}),[h,l,a]);Object(c.useEffect)((function(){H()}),[H]);var Y=s.filter((function(e){return e.accessKey.includes(B)})),Q=atob(localStorage.getItem("userLoggedIn")||""),Z=[{type:"view",onClick:function(e){b.push("/users/".concat(e.accessKey))}},{type:"delete",onClick:function(e){w(!0),A(e)},disableButtonFunction:function(e){return e===Q}}];return Object(n.jsxs)(i.a.Fragment,{children:[v&&Object(n.jsx)(qi,{open:v,selectedUser:E,closeModalAndRefresh:function(){y(!1),H()}}),G&&Object(n.jsx)(ar,{open:G,selectedUser:E,selectedGroup:null,closeModalAndRefresh:function(){q(!1),H()}}),k&&Object(n.jsx)(Yi,{deleteOpen:k,selectedUser:E,closeDeleteModalAndRefresh:function(e){!function(e){w(!1),e&&H()}(e)}}),F&&Object(n.jsx)(Ji,{open:F,checkedUsers:K,closeModalAndRefresh:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];M(!1),e&&W([])}(e)}}),Object(n.jsx)(Ua,{label:"Users"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Users",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){R(e.target.value)}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(zi.a,{}),disabled:K.length<=0,onClick:function(){K.length>0&&M(!0)},children:"Add to Group"}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){y(!0),A(null)},children:"Create User"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:Z,columns:[{label:"Access Key",elementKey:"accessKey"}],onSelect:function(e){var t=e.target,a=t.value,n=t.checked,c=Object(Je.a)(K);return n?c.push(a):c=c.filter((function(e){return e!==a})),W(c),c},selectedItems:K,isLoading:m,records:Y,entityName:"Users",idField:"accessKey"})})]})})]})}))),rr=a(47),or=function(e){var t=e.children,a=e.value,i=e.index,r=Object(en.a)(e,["children","value","index"]);return Object(n.jsx)("div",Object(j.a)(Object(j.a)({role:"tabpanel",hidden:a!==i,id:"simple-tabpanel-".concat(i),"aria-labelledby":"simple-tab-".concat(i),style:{marginTop:"5px"}},r),{},{children:a===i&&Object(n.jsx)(c.Fragment,{children:t})}))},sr={setModalErrorSnackMessage:q},lr=Object(s.b)(null,sr),dr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},we))}))(lr((function(e){var t=e.classes,a=e.closeModalAndRefresh,r=e.selectedUser,o=e.open,s=e.setModalErrorSnackMessage,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(""),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(""),v=Object(u.a)(f,2),S=v[0],C=v[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)([]),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useCallback)((function(){if(!r)return null;he.invoke("GET","/api/v1/users/".concat(r)).then((function(e){j(!1),O(e.accessKey),I(e.memberOf||[]),T("enabled"===e.status)})).catch((function(e){j(!1),s(e)}))}),[r,s]);Object(c.useEffect)((function(){null==r?(O(""),C(""),I([])):F()}),[r,F]);var M=""!==p.trim()&&(""!==S.trim()&&null===r||null!==r);return Object(n.jsx)(ga,{onClose:function(){a()},modalOpen:o,title:"Set Groups",children:Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b||(j(!0),null!==r?he.invoke("PUT","/api/v1/users/".concat(r),{status:N?"enabled":"disabled",groups:_}).then((function(e){j(!1),a()})).catch((function(e){j(!1),s(e)})):he.invoke("POST","/api/v1/users",{accessKey:p,secretKey:S,groups:_}).then((function(e){j(!1),a()})).catch((function(e){j(!1),s(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.formScrollable,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ui,{selectedGroups:_,setSelectedGroups:function(e){I(e)}})})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){null===r?(O(""),C(""),I([])):I([])},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:b||!M,children:"Save"})]}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})})}))),br={setModalErrorSnackMessage:q},ur=Object(s.b)(null,br),jr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({},we),{},{buttonContainer:{textAlign:"right"}}))}))(ur((function(e){var t=e.classes,a=e.closeModalAndRefresh,i=e.selectedUser,r=e.currentPolicies,o=e.setModalErrorSnackMessage,s=e.open,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)([]),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)([]),v=Object(u.a)(f,2),S=v[0],C=v[1];return Object(c.useEffect)((function(){if(s){var e,t=[],a=Object(rr.a)(r);try{for(a.s();!(e=a.n()).done;){var n=e.value;t.push(n.policy)}}catch(c){a.e(c)}finally{a.f()}O(t),C(t)}}),[s,i]),Object(n.jsxs)(ga,{onClose:function(){a()},modalOpen:s,title:"Set Policies",children:[Object(n.jsx)(Xi,{selectedPolicy:S,setSelectedPolicy:C}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){C(p)},children:"Clear"}),Object(n.jsx)(g.a,{type:"button",variant:"contained",color:"primary",disabled:b,onClick:function(){var e=i;j(!0),he.invoke("PUT","/api/v1/set-policy/".concat(S),{entityName:e,entityType:"user"}).then((function(){j(!1),a()})).catch((function(e){j(!1),o(e)}))},children:"Save"})]}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})}))),mr=a(992);function hr(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}var pr,Or={setErrorSnackMessage:V},gr=Object(s.b)(null,Or),fr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},fixedHeight:{height:165,minWidth:247,padding:"25px 28px","& svg":{maxHeight:18}},paperContainer:{padding:15,paddingLeft:50,display:"flex"},gridContainer:{display:"grid",gridTemplateColumns:"auto auto",gridGap:8,justifyContent:"flex-start",alignItems:"center","& div:not(.MuiCircularProgress-root)":{display:"flex",alignItems:"center"},"& div:nth-child(odd)":{justifyContent:"flex-end",fontWeight:700},"& div:nth-child(2n)":{minWidth:150}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(gr((function(e){var t=e.classes,a=e.match,r=Object(c.useState)(0),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(!1),m=Object(u.a)(d,2),h=m[0],p=m[1],O=Object(c.useState)(!1),f=Object(u.a)(O,2),v=f[0],y=f[1],S=Object(c.useState)(!1),k=Object(u.a)(S,2),w=k[0],N=k[1],T=Object(c.useState)(!1),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(!1),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)([]),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)([]),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Object(c.useState)([]),G=Object(u.a)(V,2),H=G[0],Y=G[1],Q=a.params.userName,Z=Object(c.useCallback)((function(){if(""===Q)return null;p(!0),he.invoke("GET","/api/v1/users/".concat(Q)).then((function(e){_(!1);var t=e.memberOf||[];P(t);var a,n=[],c=Object(rr.a)(t);try{for(c.s();!(a=c.n()).done;){var i=a.value;n.push({group:i})}}catch(d){c.e(d)}finally{c.f()}U(n);var r,o=[],s=Object(rr.a)(e.policy);try{for(s.s();!(r=s.n()).done;){var l=r.value;o.push({policy:l})}}catch(d){s.e(d)}finally{s.f()}Y(o),L("enabled"===e.status),p(!1)})).catch((function(e){_(!1),p(!1),q(e)}))}),[Q]);Object(c.useEffect)((function(){Z()}),[Z]);var J=atob(localStorage.getItem("userLoggedIn")||"");return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(Ua,{label:"User: ".concat(Q)}),v&&Object(n.jsx)(dr,{open:v,selectedUser:Q,closeModalAndRefresh:function(){y(!1),Z()}}),w&&Object(n.jsx)(jr,{open:w,selectedUser:Q,currentPolicies:H,closeModalAndRefresh:function(){N(!1),Z()}}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(x.a,{container:!0,spacing:2,children:Object(n.jsx)(x.a,{item:!0,children:Object(n.jsx)(C.a,{className:t.paperContainer,children:Object(n.jsxs)("div",{className:t.gridContainer,children:[Object(n.jsx)("div",{children:"Enabled:"}),Object(n.jsx)("div",{className:t.capitalizeFirst,children:Object(n.jsx)(Ba,{checked:M,value:"user_enabled",id:"user-status",name:"user-status",disabled:J===Q,onChange:function(e){var t;L(e.target.checked),t=e.target.checked,A||(_(!0),he.invoke("PUT","/api/v1/users/".concat(Q),{status:t?"enabled":"disabled",groups:R}).then((function(e){_(!1)})).catch((function(e){_(!1),q(e)})))},switchOnly:!0})})]})})})})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsxs)(x.a,{container:!0,item:!0,xs:12,children:[Object(n.jsx)(x.a,{item:!0,xs:9,children:Object(n.jsxs)(tn.a,{value:s,onChange:function(e,t){l(t)},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(n.jsx)(an.a,Object(j.a)({label:"Groups"},hr(0))),Object(n.jsx)(an.a,Object(j.a)({label:"Policies"},hr(0)))]})}),Object(n.jsxs)(x.a,{item:!0,xs:3,className:t.actionsTray,children:[0===s&&Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),size:"medium",onClick:function(){y(!0)},children:"Add to Groups"}),1===s&&Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(mr.a,{}),size:"medium",onClick:function(){N(!0)},children:"Assign Policies"})})]})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(or,{index:0,value:s,children:Object(n.jsx)(ua,{columns:[{label:"Name",elementKey:"group"}],isLoading:h,records:W,entityName:"Groups",idField:"group"})}),Object(n.jsx)(or,{index:1,value:s,children:Object(n.jsx)(ua,{itemActions:[{type:"view",onClick:function(e){b.push("/policies/".concat(e.policy))}}],columns:[{label:"Name",elementKey:"policy"}],isLoading:h,records:H,entityName:"Policies",idField:"policy"})})]})]})})]})}))),xr=Object(s.b)((function(e){return{open:e.system.sidebarOpen}}),{setMenuOpen:z}),vr=Object(l.g)(xr((function(){return Object(n.jsx)(l.c,{history:b,children:Object(n.jsxs)(l.d,{children:[Object(n.jsx)(l.b,{path:"/users/:userName",component:fr}),Object(n.jsx)(l.b,{path:"/",component:ir}),Object(n.jsx)(l.b,{component:Ze})]})})}))),yr={setModalErrorSnackMessage:q},Sr=Object(s.b)(null,yr),Cr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column",paddingTop:15,boxShadow:"none"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noFound:{textAlign:"center",padding:"10px 0"},tableContainer:{maxHeight:200},stickyHeader:{backgroundColor:"#fff"},actionsTitle:{fontWeight:600,color:"#000",fontSize:16,alignSelf:"center"},tableBlock:{marginTop:15},filterField:{width:375,fontWeight:600,"& .input":{"&::placeholder":{fontWeight:600,color:"#000"}}}},Ie),De))}))(Sr((function(e){var t=e.classes,a=e.selectedUsers,r=e.setSelectedUsers,o=e.editMode,s=void 0!==o&&o,l=e.setModalErrorSnackMessage,d=Object(c.useState)([]),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(!1),p=Object(u.a)(h,2),O=p[0],g=p[1],v=Object(c.useState)(""),S=Object(u.a)(v,2),k=S[0],w=S[1],N=Object(c.useCallback)((function(){he.invoke("GET","/api/v1/users").then((function(e){var t=Z()(e,"users",[]);t||(t=[]),m(t.sort(Ai)),g(!1)})).catch((function(e){l(e),g(!1)}))}),[l]);Object(c.useEffect)((function(){g(!0)}),[]),Object(c.useEffect)((function(){O&&N()}),[O,N]);var T=a||[],E=j.filter((function(e){return e.accessKey.includes(k)}));return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(C.a,{className:t.paper,children:[O&&Object(n.jsx)(y.a,{}),null!=j&&j.length>0?Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)("span",{className:t.actionsTitle,children:s?"Edit Members":"Assign Users"}),Object(n.jsx)(f.a,{placeholder:"Filter Users",className:t.filterField,id:"search-resource",label:"",InputProps:{startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){w(e.target.value)}})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.tableBlock,children:Object(n.jsx)(ua,{columns:[{label:"Access Key",elementKey:"accessKey"}],onSelect:function(e){var t=e.target,a=t.value,n=t.checked,c=Object(Je.a)(T);return n?c.push(a):c=c.filter((function(e){return e!==a})),r(c),c},selectedItems:T,isLoading:O,records:E,entityName:"Users",idField:"accessKey",customPaperHeight:t.multiSelectTable})})]}):Object(n.jsx)("div",{className:t.noFound,children:"No Users Available"})]})})})}))),kr={setModalErrorSnackMessage:q},wr=Object(s.b)(null,kr),Nr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},we))}))(wr((function(e){var t=e.open,a=e.selectedGroup,r=e.closeModalAndRefresh,o=e.classes,s=e.setModalErrorSnackMessage,l=Object(c.useState)(""),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(!1),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(!1),v=Object(u.a)(f,2),S=v[0],C=v[1],k=Object(c.useState)([]),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(!1),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(!1),M=Object(u.a)(F,2),L=M[0],D=M[1];Object(c.useEffect)((function(){null!==a?I(!0):(j(""),T([]))}),[a]),Object(c.useEffect)((function(){D(""!==b.trim())}),[b,N]),Object(c.useEffect)((function(){if(S){null!==a?he.invoke("PUT","/api/v1/groups/".concat(b),{group:b,members:N,status:p?"enabled":"disabled"}).then((function(e){C(!1),r()})).catch((function(e){C(!1),s(e)})):he.invoke("POST","/api/v1/groups",{group:b,members:N}).then((function(e){C(!1),r()})).catch((function(e){C(!1),s(e)}))}}),[S,b,N,p,a,r,s]),Object(c.useEffect)((function(){if(a&&_){he.invoke("GET","/api/v1/groups/".concat(a)).then((function(e){O("enabled"===e.status),j(e.name),T(e.members)})).catch((function(e){s(e),I(!1)}))}}),[_,a,s]);return Object(n.jsxs)(ga,{modalOpen:t,onClose:r,title:null!==a?"Edit Group":"Create Group",children:[null!==a&&Object(n.jsx)("div",{className:o.floatingEnabled,children:Object(n.jsx)(Ba,{indicatorLabels:["Enabled","Disabled"],checked:p,value:"group_enabled",id:"group-status",name:"group-status",onChange:function(e){O(e.target.checked)},switchOnly:!0})}),Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),C(!0)},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:o.formScrollable,children:[null===a?Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"group-name",name:"group-name",label:"Group Name",value:b,onChange:function(e){j(e.target.value)}})})}):Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(Ya,{label:"Group Name",content:a})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Cr,{selectedUsers:N,setSelectedUsers:T,editMode:null!==a})})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:o.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:o.clearButton,onClick:function(){null===a&&j(""),T([])},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:S||!L,children:"Save"})]}),S&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})]})}))),Tr={setErrorSnackMessage:V},Er=Object(s.b)(null,Tr),Ar=Er((function(e){var t=e.selectedGroup,a=e.deleteOpen,r=e.closeDeleteModalAndRefresh,o=e.setErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1];Object(c.useEffect)((function(){if(d){t&&he.invoke("DELETE","/api/v1/groups/".concat(t)).then((function(){b(!1),r(!0)})).catch((function(e){b(!1),o(e)}))}}),[d,t,r,o]);var j=function(){r(!1)};return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(ja.a,{open:a,onClose:j,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete User"}),Object(n.jsxs)(ha.a,{children:[d&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete group ",Object(n.jsx)("b",{children:t}),"?"]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:j,color:"primary",disabled:d,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){b(!0)},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})})),_r={setErrorSnackMessage:V},Ir=Object(s.b)(null,_r),Fr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Ir((function(e){var t=e.classes,a=e.setErrorSnackMessage,r=Object(c.useState)(!1),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(null),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(!1),p=Object(u.a)(h,2),O=p[0],v=p[1],y=Object(c.useState)(!1),S=Object(u.a)(y,2),C=S[0],k=S[1],w=Object(c.useState)([]),N=Object(u.a)(w,2),T=N[0],E=N[1],A=Object(c.useState)(""),_=Object(u.a)(A,2),I=_[0],F=_[1],M=Object(c.useState)(!1),L=Object(u.a)(M,2),D=L[0],B=L[1];Object(c.useEffect)((function(){k(!0)}),[]),Object(c.useEffect)((function(){k(!0)}),[]),Object(c.useEffect)((function(){if(C){he.invoke("GET","/api/v1/groups").then((function(e){var t=[];null!==e.groups&&(t=e.groups.sort(Ii)),E(t),k(!1)})).catch((function(e){a(e),k(!1)}))}}),[C,a]);var R=T.filter((function(e){return e.includes(I)})),P=[{type:"view",onClick:function(e){l(!0),m(e)}},{type:"description",onClick:function(e){B(!0),m(e)}},{type:"delete",onClick:function(e){v(!0),m(e)}}];return Object(n.jsxs)(i.a.Fragment,{children:[s&&Object(n.jsx)(Nr,{open:s,selectedGroup:j,closeModalAndRefresh:function(){l(!1),k(!0)}}),O&&Object(n.jsx)(Ar,{deleteOpen:O,selectedGroup:j,closeDeleteModalAndRefresh:function(e){v(!1),e&&k(!0)}}),B&&Object(n.jsx)(ar,{open:D,selectedGroup:j,selectedUser:null,closeModalAndRefresh:function(){B(!1)}}),Object(n.jsx)(Ua,{label:"Groups"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Groups",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){F(e.target.value)}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){m(null),l(!0)},children:"Create Group"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:P,columns:[{label:"Name",elementKey:""}],isLoading:C,records:R,entityName:"Groups",idField:""})})]})})]})}))),Mr="notify_postgres",Lr="notify_mysql",Dr="notify_kafka",Br="notify_amqp",Rr="notify_mqtt",Pr="notify_redis",zr="notify_nats",Kr="notify_elasticsearch",Wr="notify_webhooks",Ur="notify_nsq",Vr=[{configuration_id:"region",configuration_label:"Edit Region Configuration"},{configuration_id:"cache",configuration_label:"Edit Cache Configuration"},{configuration_id:"compression",configuration_label:"Edit Compression Configuration"},{configuration_id:"etcd",configuration_label:"Edit Etcd Configuration"},{configuration_id:"identity_openid",configuration_label:"Edit Identity Openid Configuration"},{configuration_id:"identity_ldap",configuration_label:"Edit Identity LDAP Configuration"},{configuration_id:"logger_webhook",configuration_label:"Edit Logger Webhook Configuration"},{configuration_id:"audit_webhook",configuration_label:"Edit Audit Webhook Configuration"}],Gr={region:[{name:"name",required:!0,label:"Server Location",tooltip:'Name of the location of the server e.g. "us-west-rack2"',type:"string",placeholder:"e.g. us-west-rack-2"},{name:"comment",required:!1,label:"Comment",tooltip:"You can add a comment to this setting",type:"comment",placeholder:"Enter Comment"}],cache:[{name:"drives",required:!0,label:"Drives",tooltip:'Mountpoints e.g. "/optane1" or "/optane2", you can write one per field',type:"csv",placeholder:"Enter Mount Point"},{name:"expiry",required:!1,label:"Expiry",tooltip:'Cache expiry duration in days e.g. "90"',type:"number",placeholder:"Enter Number of Days"},{name:"quota",required:!1,label:"Quota",tooltip:'Limit cache drive usage in percentage e.g. "90"',type:"number",placeholder:"Enter in %"},{name:"exclude",required:!1,label:"Exclude",tooltip:'Wildcard exclusion patterns e.g. "bucket/*.tmp" or "*.exe", you can write one per field',type:"csv",placeholder:"Enter Wildcard Exclusion Patterns"},{name:"after",required:!1,label:"After",tooltip:"Minimum number of access before caching an object",type:"number",placeholder:"Enter Number of Attempts"},{name:"watermark_low",required:!1,label:"Watermark Low",tooltip:"Watermark Low",type:"number",placeholder:"Enter Watermark Low"},{name:"watermark_high",required:!1,label:"Watermark High",tooltip:"Watermark High",type:"number",placeholder:"Enter Watermark High"},{name:"comment",required:!1,label:"Comment",tooltip:"You can add a comment to this setting",type:"comment",multiline:!0,placeholder:"Enter Comment"}],compression:[{name:"extensions",required:!1,label:"Extensions",tooltip:'Extensions to compress e.g. ".txt",".log" or ".csv", you can write one per field',type:"csv",placeholder:"Enter an Extension",withBorder:!0},{name:"mime_types",required:!1,label:"Mime Types",tooltip:'Mime types e.g. "text/*","application/json" or "application/xml", you can write one per field',type:"csv",placeholder:"Enter a Mime Type",withBorder:!0}],etcd:[{name:"endpoints",required:!0,label:"Endpoints",tooltip:'List of etcd endpoints e.g. "http://localhost:2379", you can write one per field',type:"csv",placeholder:"Enter Endpoint"},{name:"path_prefix",required:!1,label:"Path Prefix",tooltip:'namespace prefix to isolate tenants e.g. "customer1/"',type:"string",placeholder:"Enter Path Prefix"},{name:"coredns_path",required:!1,label:"Coredns Path",tooltip:'Shared bucket DNS records, default is "/skydns"',type:"string",placeholder:"Enter Coredns Path"},{name:"client_cert",required:!1,label:"Client Cert",tooltip:"Client cert for mTLS authentication",type:"string",placeholder:"Enter Client Cert"},{name:"client_cert_key",required:!1,label:"Client Cert Key",tooltip:"Client cert key for mTLS authentication",type:"string",placeholder:"Enter Client Cert Key"},{name:"comment",required:!1,label:"Comment",tooltip:"You can add a comment to this setting",type:"comment",multiline:!0,placeholder:"Enter Comment"}],identity_openid:[{name:"config_url",required:!1,label:"Config URL",tooltip:"Config URL for Client ID configuration",type:"string",placeholder:"Enter Config URL"},{name:"client_id",required:!1,label:"Client ID",type:"string",placeholder:"Enter Client ID"},{name:"claim_name",required:!1,label:"Claim Name",tooltip:"Claim Name",type:"string",placeholder:"Enter Claim Name"},{name:"claim_prefix",required:!1,label:"Claim Prefix",tooltip:"Claim Prefix",type:"string",placeholder:"Enter Claim Prefix"}],identity_ldap:[{name:"server_addr",required:!0,label:"Server Addr",tooltip:'AD/LDAP server address e.g. "myldapserver.com:636"',type:"string",placeholder:"Enter Server Address"},{name:"username_format",required:!0,label:"Username Format",tooltip:'List of username bind DNs e.g. "uid=%s","cn=accounts","dc=myldapserver" or "dc=com", you can write one per field',type:"csv",placeholder:"Enter Username Format"},{name:"username_search_filter",required:!0,label:"Username Search Filter",tooltip:'User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"',type:"string",placeholder:"Enter Username Search Filter"},{name:"group_search_filter",required:!0,label:"Group Search Filter",tooltip:'Search filter for groups e.g. "(&(objectclass=groupOfNames)(memberUid=%s))"',type:"string",placeholder:"Enter Group Search Filter"},{name:"username_search_base_dn",required:!1,label:"Username Search Base DN",tooltip:"List of username search DNs, you can write one per field",type:"csv",placeholder:"Enter Username Search Base DN"},{name:"group_name_attribute",required:!1,label:"Group Name Attribute",tooltip:'Search attribute for group name e.g. "cn"',type:"string",placeholder:"Enter Group Name Attribute"},{name:"sts_expiry",required:!1,label:"STS Expiry",tooltip:'temporary credentials validity duration in s,m,h,d. Default is "1h"',type:"string",placeholder:"Enter STS Expiry"},{name:"tls_skip_verify",required:!1,label:"TLS Skip Verify",tooltip:'Trust server TLS without verification, defaults to "off" (verify)',type:"on|off"},{name:"server_insecure",required:!1,label:"Server Insecure",tooltip:'Allow plain text connection to AD/LDAP server, defaults to "off"',type:"on|off"},{name:"comment",required:!1,label:"Comment",tooltip:"Optionally add a comment to this setting",type:"comment",placeholder:"Enter Comment"}],logger_webhook:[{name:"endpoint",required:!0,label:"Endpoint",type:"string",placeholder:"Enter Endpoint"},{name:"auth_token",required:!0,label:"Auth Token",type:"string",placeholder:"Enter Auth Token"}],audit_webhook:[{name:"endpoint",required:!0,label:"Endpoint",type:"string",placeholder:"Enter Endpoint"},{name:"auth_token",required:!0,label:"Auth Token",type:"string",placeholder:"Enter Auth Token"}]},qr=[{name:"queue-dir",label:"Queue Directory",required:!0,tooltip:"staging dir for undelivered messages e.g. '/home/events'",type:"string",placeholder:"Enter Queue Directory"},{name:"queue-limit",label:"Queue Limit",required:!1,tooltip:"maximum limit for undelivered messages, defaults to '10000'",type:"number",placeholder:"Enter Queue Limit"},{name:"comment",label:"Comment",required:!1,type:"comment",placeholder:"Enter Comment"}],Hr=(pr={},Object(fe.a)(pr,Dr,[{name:"brokers",label:"Brokers",required:!0,tooltip:"Comma separated list of Kafka broker addresses",type:"string",placeholder:"Enter Brokers"},{name:"topic",label:"Topic",tooltip:"Kafka topic used for bucket notifications",type:"string",placeholder:"Enter Topic"},{name:"sasl_username",label:"SASL Username",tooltip:"Username for SASL/PLAIN or SASL/SCRAM authentication",type:"string",placeholder:"Enter SASL Username"},{name:"sasl_password",label:"SASL Password",tooltip:"Password for SASL/PLAIN or SASL/SCRAM authentication",type:"string",placeholder:"Enter SASL Password"},{name:"sasl_mechanism",label:"SASL Mechanism",tooltip:"SASL authentication mechanism, default 'PLAIN'",type:"string"},{name:"tls_client_auth",label:"TLS Client Auth",tooltip:"Client Auth determines the Kafka server's policy for TLS client auth",type:"string",placeholder:"Enter TLS Client Auth"},{name:"sasl",label:"SASL",tooltip:"Set to 'on' to enable SASL authentication",type:"on|off"},{name:"tls",label:"TLS",tooltip:"Set to 'on' to enable TLS",type:"on|off"},{name:"tls_skip_verify",label:"TLS skip verify",tooltip:'Trust server TLS without verification, defaults to "on" (verify)',type:"on|off"},{name:"client_tls_cert",label:"client TLS cert",tooltip:"Path to client certificate for mTLS auth",type:"path",placeholder:"Enter TLS Client Cert"},{name:"client_tls_key",label:"client TLS key",tooltip:"Path to client key for mTLS auth",type:"path",placeholder:"Enter TLS Client Key"},{name:"version",label:"Version",tooltip:"Specify the version of the Kafka cluster e.g '2.2.0'",type:"string",placeholder:"Enter Kafka Version"}].concat(qr)),Object(fe.a)(pr,Br,[{name:"url",required:!0,label:"URL",tooltip:"AMQP server endpoint e.g. `amqp://myuser:mypassword@localhost:5672`",type:"url"},{name:"exchange",label:"Exchange",tooltip:"Name of the AMQP exchange",type:"string",placeholder:"Enter Exchange"},{name:"exchange_type",label:"Exchange Type",tooltip:"AMQP exchange type",type:"string",placeholder:"Enter Exchange Type"},{name:"routing_key",label:"Routing Key",tooltip:"Routing key for publishing",type:"string",placeholder:"Enter Routing Key"},{name:"mandatory",label:"Mandatory",tooltip:"Quietly ignore undelivered messages when set to 'off', default is 'on'",type:"on|off"},{name:"durable",label:"Durable",tooltip:"Persist queue across broker restarts when set to 'on', default is 'off'",type:"on|off"},{name:"no_wait",label:"No Wait",tooltip:"Non-blocking message delivery when set to 'on', default is 'off'",type:"on|off"},{name:"internal",label:"Internal",tooltip:"Set to 'on' for exchange to be not used directly by publishers, but only when bound to other exchanges",type:"on|off"},{name:"auto_deleted",label:"Auto Deleted",tooltip:"Auto delete queue when set to 'on', when there are no consumers",type:"on|off"},{name:"delivery_mode",label:"Delivery Mode",tooltip:"Set to '1' for non-persistent or '2' for persistent queue",type:"number",placeholder:"Enter Delivery Mode"}].concat(qr)),Object(fe.a)(pr,Pr,[{name:"address",required:!0,label:"Address",tooltip:"Redis server's address. For example: `localhost:6379`",type:"address",placeholder:"Enter Address"},{name:"key",required:!0,label:"Key",tooltip:"Redis key to store/update events, key is auto-created",type:"string",placeholder:"Enter Key"},{name:"password",label:"Password",tooltip:"Redis server password",type:"string",placeholder:"Enter Password"}].concat(qr)),Object(fe.a)(pr,Rr,[{name:"broker",required:!0,label:"Broker",tooltip:"MQTT server endpoint e.g. `tcp://localhost:1883`",type:"uri",placeholder:"Enter Brokers"},{name:"topic",required:!0,label:"Topic",tooltip:"name of the MQTT topic to publish",type:"string",placeholder:"Enter Topic"},{name:"username",label:"Username",tooltip:"MQTT username",type:"string",placeholder:"Enter Username"},{name:"password",label:"Password",tooltip:"MQTT password",type:"string",placeholder:"Enter Password"},{name:"qos",label:"QOS",tooltip:"Set the quality of service priority, defaults to '0'",type:"number",placeholder:"Enter QOS"},{name:"keep_alive_interval",label:"Keep Alive Interval",tooltip:"Keep-alive interval for MQTT connections in s,m,h,d",type:"duration",placeholder:"Enter Keep Alive Internal"},{name:"reconnect_interval",label:"Reconnect Interval",tooltip:"Reconnect interval for MQTT connections in s,m,h,d",type:"duration",placeholder:"Enter Reconnect Interval"}].concat(qr)),Object(fe.a)(pr,zr,[{name:"address",required:!0,label:"Address",tooltip:"NATS server address e.g. '0.0.0.0:4222'",type:"address",placeholder:"Enter Address"},{name:"subject",required:!0,label:"Subject",tooltip:"NATS subscription subject",type:"string",placeholder:"Enter NATS Subject"},{name:"username",label:"Username",tooltip:"NATS username",type:"string",placeholder:"Enter NATS Username"},{name:"password",label:"Password",tooltip:"NATS password",type:"string",placeholder:"Enter NATS password"},{name:"token",label:"Token",tooltip:"NATS token",type:"string",placeholder:"Enter NATS token"},{name:"tls",label:"TLS",tooltip:"Set to 'on' to enable TLS",type:"on|off"},{name:"tls_skip_verify",label:"TLS Skip Verify",tooltip:'Trust server TLS without verification, defaults to "on" (verify)',type:"on|off"},{name:"ping_interval",label:"Ping Interval",tooltip:"Client ping commands interval in s,m,h,d. Disabled by default",type:"duration",placeholder:"Enter Ping Interval"},{name:"streaming",label:"Streaming",tooltip:"Set to 'on', to use streaming NATS server",type:"on|off"},{name:"streaming_async",label:"Streaming async",tooltip:"Set to 'on', to enable asynchronous publish",type:"on|off"},{name:"streaming_max_pub_acks_in_flight",label:"Streaming max publish ACKS in flight",tooltip:"Number of messages to publish without waiting for ACKs",type:"number",placeholder:"Enter Streaming in flight value"},{name:"streaming_cluster_id",label:"Streaming Cluster ID",tooltip:"Unique ID for NATS streaming cluster",type:"string",placeholder:"Enter Streaming Cluster ID"},{name:"cert_authority",label:"Cert Authority",tooltip:"Path to certificate chain of the target NATS server",type:"string",placeholder:"Enter Cert Authority"},{name:"client_cert",label:"Client Cert",tooltip:"Client cert for NATS mTLS auth",type:"string",placeholder:"Enter Client Cert"},{name:"client_key",label:"Client Key",tooltip:"Client cert key for NATS mTLS auth",type:"string",placeholder:"Enter Client Key"}].concat(qr)),Object(fe.a)(pr,Kr,[{name:"url",required:!0,label:"URL",tooltip:"Elasticsearch server's address, with optional authentication info",type:"url",placeholder:"Enter URL"},{name:"index",required:!0,label:"Index",tooltip:"Elasticsearch index to store/update events, index is auto-created",type:"string",placeholder:"Enter Index"},{name:"format",required:!0,label:"Format",tooltip:"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'",type:"enum",placeholder:"Enter Format"}].concat(qr)),Object(fe.a)(pr,Wr,[{name:"endpoint",required:!0,label:"Endpoint",tooltip:"webhook server endpoint e.g. http://localhost:8080/minio/events",type:"url",placeholder:"Enter Endpoint"},{name:"auth_token",label:"Auth Token",tooltip:"opaque string or JWT authorization token",type:"string",placeholder:"Enter auth_token"}].concat(qr)),Object(fe.a)(pr,Ur,[{name:"nsqd_address",required:!0,label:"NSQD Address",tooltip:"NSQ server address e.g. '127.0.0.1:4150'",type:"address",placeholder:"Enter nsqd_address"},{name:"topic",required:!0,label:"Topic",tooltip:"NSQ topic",type:"string",placeholder:"Enter Topic"},{name:"tls",label:"TLS",tooltip:"set to 'on' to enable TLS",type:"on|off"},{name:"tls_skip_verify",label:"TLS Skip Verify",tooltip:'trust server TLS without verification, defaults to "on" (verify)',type:"on|off"}].concat(qr)),pr),Yr=function(e){return e.filter((function(e){return""!==e.value}))},Qr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),{},{inputWithBorder:{border:"1px solid #EAEAEA",padding:15,height:150,overflowY:"auto",position:"relative",marginTop:15},labelContainer:{display:"flex"}}))}))((function(e){var t=e.elements,a=e.name,r=e.label,o=e.tooltip,s=void 0===o?"":o,l=e.commonPlaceholder,d=void 0===l?"":l,b=e.onChange,j=e.withBorder,m=void 0!==j&&j,h=e.classes,p=Object(c.useState)([""]),O=Object(u.a)(p,2),g=O[0],f=O[1],v=Object(c.createRef)();Object(c.useEffect)((function(){if(1===g.length&&""===g[0]&&t&&""!==t){var e=t.split(",");e.push(""),f(e)}}),[t,g]),Object(c.useEffect)((function(){if(g.length>1){var e=v.current;e&&e.scrollIntoView(!1)}}),[g,v]);var y=Object(c.useRef)(!0);Object(c.useLayoutEffect)((function(){y.current?y.current=!1:C()}),[g]);var S=function(e){e.persist();var t=Object(Je.a)(g);t[Z()(e.target,"dataset.index",0)]=e.target.value,f(t)},C=An()((function(){var e=g.filter((function(e){return""!==e.trim()})).join(",");b(e)}),500),k=g.map((function(e,t){return Object(n.jsx)(va,{id:"".concat(a,"-").concat(t.toString()),label:"",name:"".concat(a,"-").concat(t.toString()),value:g[t],onChange:S,index:t,placeholder:d,overlayIcon:t===g.length-1?Object(n.jsx)(Fn,{}):null,overlayAction:function(){!function(e){if(""!==e[e.length-1].trim()){var t=Object(Je.a)(e);t.push(""),f(t)}}(g)}},"csv-".concat(a,"-").concat(t.toString()))}));return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:h.fieldContainer,children:[Object(n.jsxs)(ia.a,{className:h.inputLabel,children:[Object(n.jsx)("span",{children:r}),""!==s&&Object(n.jsx)("div",{className:h.tooltipContainer,children:Object(n.jsx)(ra.a,{title:s,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:h.tooltip})})})})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(m?h.inputWithBorder:""),children:[k,Object(n.jsx)("div",{ref:v})]})]})})})),Zr=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),{},{inputLabel:Object(j.a)(Object(j.a)({},ke.inputLabel),{},{marginBottom:16,fontSize:14}),textBoxContainer:{flexGrow:1,position:"relative"},errorState:{color:"#b53b4b",fontSize:14,position:"absolute",top:7,right:7},cssOutlinedInput:{borderColor:"#9C9C9C",padding:16},rootContainer:{"& .MuiOutlinedInput-inputMultiline":Object(j.a)(Object(j.a)({},ke.inputLabel),{},{fontSize:13,minHeight:150})}}))}))((function(e){var t=e.label,a=e.onChange,c=e.value,r=e.id,o=e.name,s=e.disabled,l=void 0!==s&&s,d=e.tooltip,b=void 0===d?"":d,u=e.index,j=void 0===u?0:u,m=e.error,h=void 0===m?"":m,p=e.required,O=void 0!==p&&p,g=e.placeholder,v=void 0===g?"":g,y=e.classes,S={"data-index":j};return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(y.fieldContainer," ").concat(""!==h?y.errorInField:""),children:[""!==t&&Object(n.jsxs)(ia.a,{htmlFor:r,className:y.inputLabel,children:[Object(n.jsxs)("span",{children:[t,O?"*":""]}),""!==b&&Object(n.jsx)("div",{className:y.tooltipContainer,children:Object(n.jsx)(ra.a,{title:b,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:y.tooltip})})})})]}),Object(n.jsx)("div",{className:y.textBoxContainer,children:Object(n.jsx)(f.a,{id:r,name:o,fullWidth:!0,value:c,disabled:l,onChange:a,multiline:!0,inputProps:S,error:""!==h,helperText:h,placeholder:v,InputLabelProps:{shrink:!0},InputProps:{classes:{notchedOutline:y.cssOutlinedInput,root:y.rootContainer}},variant:"outlined"})})]})})})),Jr=function(e,t,a){var n="on|off"===t?"false":"";if(a.length>0){var c=a.find((function(t){return t.key===e}));c&&(n=c.value)}return n},$r=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},we))}))((function(e){var t=e.onChange,a=e.fields,i=e.defaultVals,r=(e.classes,Object(c.useState)([])),o=Object(u.a)(r,2),s=o[0],l=o[1],d=a||[],b=i||[];Object(c.useEffect)((function(){var e=[];a.forEach((function(t){var a={key:t.name,value:Jr(t.name,t.type,b)};e.push(a)})),l(e)}),[a,i]),Object(c.useEffect)((function(){t(s)}),[s]);var j=function(e,t,a){var n=Object(Je.a)(s);n[a]={key:e,value:t},l(n)},m=function(e,t){switch(e.type){case"on|off":var a=s[t]?s[t].value:"false";return Object(n.jsx)(Ba,{indicatorLabels:["On","Off"],onChange:function(a){var n=a.target.checked?"true":"false";j(e.name,n,t)},id:e.name,name:e.name,label:e.label,value:"switch_on",tooltip:e.tooltip,checked:"true"===a});case"csv":return Object(n.jsx)(Qr,{elements:s[t]?s[t].value:"",label:e.label,name:e.name,onChange:function(a){return j(e.name,a,t)},tooltip:e.tooltip,commonPlaceholder:e.placeholder,withBorder:!!e.withBorder});case"comment":return Object(n.jsx)(Zr,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:s[t]?s[t].value:"",onChange:function(a){return j(e.name,a.target.value,t)},placeholder:e.placeholder});default:return Object(n.jsx)(va,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:s[t]?s[t].value:"",onChange:function(a){return j(e.name,a.target.value,t)},multiline:!!e.multiline,placeholder:e.placeholder})}};return Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{xs:12,item:!0,children:d.map((function(e,t){return Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,children:m(e,t)})},e.name)}))})})})),Xr={serverNeedsRestart:K,setErrorSnackMessage:V},eo=Object(s.b)(null,Xr),to=eo(Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Be),{},{strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"},logoButton:{height:"80px"},customTitle:Object(j.a)(Object(j.a)({},Be.customTitle),{},{marginTop:0})}))}))((function(e){var t=e.closeModalAndRefresh,a=e.serverNeedsRestart,i=e.selectedConfiguration,r=e.setErrorSnackMessage,o=e.classes,s=Object(c.useState)([]),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(!1),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(!0),f=Object(u.a)(O,2),v=f[0],S=f[1],C=Object(c.useState)([]),k=Object(u.a)(C,2),w=k[0],N=k[1];Object(c.useEffect)((function(){var e=Z()(i,"configuration_id",!1);e&&he.invoke("GET","/api/v1/configs/".concat(e)).then((function(e){var t=Z()(e,"key_values",[]);N(t)})).catch((function(e){S(!1),r(e)})),S(!1)}),[i,r]),Object(c.useEffect)((function(){if(h){var e={key_values:Yr(d)};he.invoke("PUT","/api/v1/configs/".concat(i.configuration_id),e).then((function(){p(!1),a(!0),t()})).catch((function(e){p(!1),r(e)}))}}),[h,a,i,d,t,r]);var T=Object(c.useCallback)((function(e){b(e)}),[b]);return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:o.customTitle,children:i.configuration_label}),Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)("form",{noValidate:!0,onSubmit:function(e){e.preventDefault(),p(!0)},children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:o.settingsFormContainer,children:[v&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})}),Object(n.jsx)($r,{fields:Gr[i.configuration_id],onChange:T,defaultVals:w})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:o.settingsButtonContainer,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:o.innerSettingsButtonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:h,children:"Save"})})})]})})]})}))),ao=Object(N.a)((function(){return Object(k.a)({masterContainer:{overflowX:"hidden",overflowY:"auto"},sliderContainer:{width:"auto",transitionDuration:"0.3s",position:"relative"},slide:{float:"left"}})}))((function(e){var t=e.classes,a=e.slideOptions,i=e.currentSlide;return Object(n.jsx)(Bt.a,{children:function(e){var r=e.width,o=e.height,s=i*r,l=r*a.length;return Object(n.jsx)(c.Fragment,{children:Object(n.jsx)("div",{className:t.masterContainer,style:{width:r,height:o},children:Object(n.jsx)("div",{className:t.sliderContainer,style:{left:"-".concat(s,"px"),width:"".concat(l,"px")},children:a.map((function(e,a){return Object(n.jsx)("div",{className:t.slide,style:{width:r},children:e},"slide-panel-".concat(a.toString()))}))})})})}})})),no=function(){return Object(n.jsx)(it.a,{viewBox:"0 0 10.847 6.572",children:Object(n.jsxs)("g",{transform:"translate(-84.793 -81.193)",children:[Object(n.jsx)("line",{x2:"9.64",transform:"translate(85.5 84.5)",fill:"none",stroke:"#000",strokeLinecap:"round",strokeWidth:"1"}),Object(n.jsx)("line",{y1:"2.558",x2:"2.645",transform:"translate(85.5 81.9)",fill:"none",stroke:"#000",strokeLinecap:"round",strokeWidth:"1"}),Object(n.jsx)("line",{x2:"2.645",y2:"2.558",transform:"translate(85.5 84.5)",fill:"none",stroke:"#000",strokeLinecap:"round",strokeWidth:"1"})]})})},co={configuration_id:"",configuration_label:""},io=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},iconText:{lineHeight:"24px"},customConfigurationPage:{height:"calc(100vh - 324px)",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},Fe),Ie),Be),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=Object(c.useState)(co),i=Object(u.a)(a,2),r=i[0],o=i[1],s=Object(c.useState)(0),l=Object(u.a)(s,2),d=l[0],j=l[1],m=[{type:"edit",onClick:function(e){var t=Z()(e,"url","");""!==t?b.push(t):(j(1),o(e))}}];return Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.settingsOptionsContainer,children:Object(n.jsx)(ao,{slideOptions:[Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(ua,{itemActions:m,columns:[{label:"Configuration",elementKey:"configuration_id"}],isLoading:!1,records:Vr,entityName:"Configurations",idField:"configuration_id",customPaperHeight:t.customConfigurationPage,noBackground:!0})}),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.backContainer,children:Object(n.jsxs)("button",{onClick:function(){j(0),o(co)},className:t.backButton,children:[Object(n.jsx)(no,{}),"Back To Configurations"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:1===d?Object(n.jsx)(to,{closeModalAndRefresh:function(){j(0)},selectedConfiguration:r}):null})]})],currentSlide:d})})})})})})})),ro=a(230),oo=a(431),so=a.n(oo),lo=[{actionTrigger:Mr,targetTitle:"Postgres SQL",logo:"/postgres.png"},{actionTrigger:Dr,targetTitle:"Kafka",logo:"/kafka.png"},{actionTrigger:Br,targetTitle:"AMQP",logo:"/amqp.png"},{actionTrigger:Rr,targetTitle:"MQTT",logo:"/mqtt.png"},{actionTrigger:Pr,targetTitle:"Redis",logo:"/redis.png"},{actionTrigger:zr,targetTitle:"NATS",logo:"/nats.png"},{actionTrigger:Lr,targetTitle:"Mysql",logo:"/mysql.png"},{actionTrigger:Kr,targetTitle:"Elastic Search",logo:"/elasticsearch.png"},{actionTrigger:Wr,targetTitle:"Webhook",logo:""},{actionTrigger:Ur,targetTitle:"NSQ",logo:""}],bo=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},we))}))((function(e){var t=e.onChange,a=e.classes,r=Object(c.useState)(!1),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(""),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(""),p=Object(u.a)(h,2),O=p[0],g=p[1],f=Object(c.useState)(""),v=Object(u.a)(f,2),y=v[0],S=v[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(""),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(" "),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)(""),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Object(c.useState)("namespace"),G=Object(u.a)(V,2),q=G[0],H=G[1],Y=Object(c.useState)(""),Q=Object(u.a)(Y,2),Z=Q[0],J=Q[1],$=Object(c.useState)(""),X=Object(u.a)($,2),ee=X[0],te=X[1],ae=Object(c.useState)(""),ne=Object(u.a)(ae,2),ce=ne[0],ie=ne[1],re=Object(c.useCallback)((function(){var e="";return""!==O&&(e="".concat(e," host=").concat(O)),""!==y&&(e="".concat(e," dbname=").concat(y)),""!==A&&(e="".concat(e," user=").concat(A)),""!==M&&(e="".concat(e," password=").concat(M)),""!==w&&(e="".concat(e," port=").concat(w))," "!==R&&(e="".concat(e," sslmode=").concat(R)),(e="".concat(e," ")).trim()}),[O,y,A,M,w,R]);return Object(c.useEffect)((function(){""!==j&&t([{key:"connection_string",value:j},{key:"table",value:W},{key:"format",value:q},{key:"queue_dir",value:Z},{key:"queue_limit",value:ee},{key:"comment",value:ce}])}),[j,W,q,Z,ee,ce,t]),Object(c.useEffect)((function(){var e=re();m(e)}),[A,y,M,w,R,O,m,re]),Object(c.useEffect)((function(){if(s){var e=re();m(e)}else{var t=function(e,t){var a,n=[],c=Object(rr.a)(t);try{for(c.s();!(a=c.n()).done;){var i=a.value,r=e.indexOf(i+"=");-1!==r&&n.push(r)}}catch(p){c.e(p)}finally{c.f()}n.sort((function(e,t){return e-t}));for(var o=new Map,s=new Array(n.length),l=0;l=0})),A=function(){T(""),C(S-1)};return Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.settingsOptionsContainer,children:Object(n.jsx)(ao,{slideOptions:[Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.lambdaContainer,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:t.searchField,id:"search-resource",label:"",onChange:function(e){j(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(Mt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){O(!0)},children:Object(n.jsx)(xo.a,{})}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){C(1)},children:"Add Notification Target"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:[],columns:[{label:"Status",elementKey:"status",renderFunction:function(e){return Object(n.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[Object(n.jsx)(so.a,{style:"Offline"===e?{color:ro.a[500]}:{}}),e]})},width:150},{label:"Service",elementKey:"service_name"}],isLoading:p,records:E,entityName:"Lambda Notification Targets",idField:"service_name",customPaperHeight:t.customConfigurationPage,noBackground:!0})})]})}),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.backContainer,children:Object(n.jsxs)("button",{onClick:A,className:t.backButton,children:[Object(n.jsx)(no,{}),"Back To Lambda Notifications"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(go,{setService:function(e){T(e),C(2)}})})]}),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.backContainer,children:Object(n.jsxs)("button",{onClick:A,className:t.backButton,children:[Object(n.jsx)(no,{}),"Back To Supported Services"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ho,{service:N,saveAndRefresh:function(){O(!0),C(0),T("")}})})]})],currentSlide:S})})})})})})}))),Co=a(433),ko=a.n(Co),wo=a(432),No=a.n(wo),To=Object(N.a)((function(e){return Object(k.a)({errorBlock:{color:e.palette.error.main}})}))((function(e){var t=e.classes,a=e.errorMessage,c=e.withBreak,r=void 0===c||c;return Object(n.jsxs)(i.a.Fragment,{children:[r&&Object(n.jsx)("br",{}),Object(n.jsx)(v.a,{component:"p",variant:"body1",className:t.errorBlock,children:a})]})})),Eo=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},ke),Ne),{},{textBoxContainer:{flexGrow:1,position:"relative",flexDirection:"column"},errorState:{color:"#b53b4b",fontSize:14,position:"absolute",top:7,right:7},errorText:{margin:"0",fontSize:"0.75rem",marginTop:3,textAlign:"left",fontFamily:"Lato,sans-serif",fontWeight:400,lineHeight:"1.66",color:"#dc1f2e"},valueString:{maxWidth:350,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:2},fileReselect:{display:"flex",alignItems:"center"},fieldBottom:{borderBottom:"#9c9c9c 1px solid"},fileInputField:{margin:"13px 0"}}))}))((function(e){var t=e.label,a=e.classes,r=e.onChange,o=e.id,s=e.name,l=e.disabled,d=void 0!==l&&l,b=e.tooltip,j=void 0===b?"":b,m=e.required,h=e.error,p=void 0===h?"":h,O=e.accept,g=void 0===O?"":O,f=e.value,v=void 0===f?"":f,y=Object(c.useState)(!1),S=Object(u.a)(y,2),C=S[0],k=S[1];return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(a.fieldBottom," ").concat(a.fieldContainer," ").concat(""!==p?a.errorInField:""),children:[""!==t&&Object(n.jsxs)(ia.a,{htmlFor:o,className:"".concat(""!==p?a.fieldLabelError:""," ").concat(a.inputLabel),children:[Object(n.jsxs)("span",{children:[t,m?"*":""]}),""!==j&&Object(n.jsx)("div",{className:a.tooltipContainer,children:Object(n.jsx)(ra.a,{title:j,placement:"top-start",children:Object(n.jsx)("div",{children:Object(n.jsx)(oa,{className:a.tooltip})})})})]}),C||""===v?Object(n.jsxs)("div",{className:a.textBoxContainer,children:[Object(n.jsx)("input",{type:"file",name:s,onChange:function(e){var t=Z()(e,"target.files[0].name","");!function(e,t){var a=e.target.files[0],n=new FileReader;n.readAsDataURL(a),n.onload=function(){var e=n.result;if(e){var a=e.toString().split("base64,");2===a.length&&t(a[1])}}}(e,(function(e){r(e,t)}))},accept:g,required:m,disabled:d,className:a.fileInputField}),""!==v&&Object(n.jsx)(Mt.a,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){k(!1)},disableRipple:!1,disableFocusRipple:!1,children:Object(n.jsx)(No.a,{})}),""!==p&&Object(n.jsx)(To,{errorMessage:p})]}):Object(n.jsxs)("div",{className:a.fileReselect,children:[Object(n.jsx)("div",{className:a.valueString,children:v}),Object(n.jsx)(Mt.a,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){k(!0)},disableRipple:!1,disableFocusRipple:!1,children:Object(n.jsx)(ko.a,{})})]})]})})})),Ao={setErrorSnackMessage:V},_o=Object(s.b)(null,Ao),Io=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({},we),Be),{},{strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"},customTitle:Object(j.a)(Object(j.a)({},Be.customTitle),{},{marginTop:0}),settingsFormContainer:Object(j.a)(Object(j.a)({},Be.settingsFormContainer),{},{height:"calc(100vh - 422px)"})}))}))(_o((function(e){var t=e.saveAndRefresh,a=e.classes,i=e.setErrorSnackMessage,r=e.type,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(""),m=Object(u.a)(b,2),h=m[0],p=m[1],O=Object(c.useState)(""),f=Object(u.a)(O,2),v=f[0],y=f[1],S=Object(c.useState)(""),C=Object(u.a)(S,2),k=C[0],w=C[1],N=Object(c.useState)(""),T=Object(u.a)(N,2),E=T[0],A=T[1],_=Object(c.useState)(""),I=Object(u.a)(_,2),F=I[0],M=I[1],L=Object(c.useState)(""),D=Object(u.a)(L,2),B=D[0],R=D[1],P=Object(c.useState)(""),z=Object(u.a)(P,2),K=z[0],W=z[1],U=Object(c.useState)(""),V=Object(u.a)(U,2),G=V[0],q=V[1],H=Object(c.useState)(""),Y=Object(u.a)(H,2),Q=Y[0],Z=Y[1],J=Object(c.useState)(""),$=Object(u.a)(J,2),X=$[0],ee=$[1],te=Object(c.useState)(""),ae=Object(u.a)(te,2),ne=ae[0],ce=ae[1],ie=Object(c.useState)(""),re=Object(u.a)(ie,2),oe=re[0],se=re[1],le=Object(c.useState)(""),de=Object(u.a)(le,2),be=de[0],ue=de[1],je=Object(c.useState)(!0),me=Object(u.a)(je,2),pe=me[0],Oe=me[1];Object(c.useEffect)((function(){if(l){var e={},a={name:h,endpoint:v,bucket:k,prefix:E,region:F},n=r;switch("minio"===r&&(n="s3"),r){case"minio":case"s3":e={s3:Object(j.a)(Object(j.a)({},a),{},{accesskey:K,secretkey:G,storageclass:B})};break;case"gcs":e={gcs:Object(j.a)(Object(j.a)({},a),{},{creds:X})};break;case"azure":e={azure:Object(j.a)(Object(j.a)({},a),{},{accountname:ne,accountkey:oe})}}var c=Object(j.a)({type:n},e);he.invoke("POST","/api/v1/admin/tiers",c).then((function(){d(!1),t()})).catch((function(e){d(!1),i(e)}))}}),[K,oe,ne,k,X,v,h,E,F,t,l,G,i,B,r]),Object(c.useEffect)((function(){var e=!0;""===r&&(e=!1),""===r&&(e=!1),""===h&&(e=!1),""===v&&(e=!1),""===k&&(e=!1),""===E&&(e=!1),""===F&&(e=!1),"s3"!==r&&"minio"!==r||(""===K&&(e=!1),""===G&&(e=!1)),"gcs"===r&&""===X&&(e=!1),"azure"===r&&(""===ne&&(e=!1),""===oe&&(e=!1)),Oe(e)}),[K,oe,ne,k,X,v,pe,h,E,F,G,B,r]),Object(c.useEffect)((function(){switch(r){case"gcs":y("https://storage.googleapis.com/"),ue("Google Cloud");break;case"s3":y("https://s3.amazonaws.com"),ue("Amazon S3");break;case"azure":y("http://blob.core.windows.net"),ue("Azure");break;case"minio":y(""),ue("MinIO")}}),[r]);return Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)("form",{noValidate:!0,onSubmit:function(e){e.preventDefault(),d(!0)},children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:a.customTitle,children:[be," - Add Tier Configuration"]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:a.settingsFormContainer,children:Object(n.jsx)(x.a,{container:!0,children:""!==r&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(va,{id:"name",name:"name",label:"Name",placeholder:"Enter Name",value:h,onChange:function(e){p(e.target.value)}}),Object(n.jsx)(va,{id:"endpoint",name:"endpoint",label:"Endpoint",placeholder:"Enter Endpoint",value:v,onChange:function(e){y(e.target.value)}}),"s3"===r||"minio"===r&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(va,{id:"accessKey",name:"accessKey",label:"Access Key",placeholder:"Enter Access Key",value:K,onChange:function(e){W(e.target.value)}}),Object(n.jsx)(va,{id:"secretKey",name:"secretKey",label:"Secret Key",placeholder:"Enter Secret Key",value:G,onChange:function(e){q(e.target.value)}})]}),"gcs"===r&&Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(Eo,{accept:".json",id:"creds",label:"Credentials",name:"creds",onChange:function(e,t){ee(e),Z(t)},value:Q})}),"azure"===r&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(va,{id:"accountName",name:"accountName",label:"Account Name",placeholder:"Enter Account Name",value:ne,onChange:function(e){ce(e.target.value)}}),Object(n.jsx)(va,{id:"accountKey",name:"accountKey",label:"Account Key",placeholder:"Enter Account Key",value:oe,onChange:function(e){se(e.target.value)}})]}),Object(n.jsx)(va,{id:"bucket",name:"bucket",label:"Bucket",placeholder:"Enter Bucket",value:k,onChange:function(e){w(e.target.value)}}),Object(n.jsx)(va,{id:"prefix",name:"prefix",label:"Prefix",placeholder:"Enter Prefix",value:E,onChange:function(e){A(e.target.value)}}),Object(n.jsx)(va,{id:"region",name:"region",label:"Region",placeholder:"Enter Region",value:F,onChange:function(e){M(e.target.value)}}),"s3"===r||"minio"===r&&Object(n.jsx)(va,{id:"storageClass",name:"storageClass",label:"Storage Class",placeholder:"Enter Storage Class",value:B,onChange:function(e){R(e.target.value)}})]})})}),Object(n.jsx)(x.a,{item:!0,xs:12,className:a.settingsButtonContainer,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:a.innerSettingsButtonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:l||!pe,children:"Save"})})})]})})}))),Fo=Object(s.b)(null,{setModalErrorSnackMessage:q}),Mo=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},we))}))(Fo((function(e){var t=e.open,a=e.closeModalAndRefresh,i=e.classes,r=e.tierData,o=e.setModalErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(""),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(""),f=Object(u.a)(O,2),v=f[0],S=f[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(""),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(""),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)(!0),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Z()(r,"type",""),G=Z()(r,"".concat(V,".name"),"");Object(c.useEffect)((function(){var e=!0;"s3"===V||"azure"===V?""!==M&&""!==R||(e=!1):"gcs"===V&&""===A&&(e=!1),U(e)}),[R,M,A,V]);return Object(n.jsx)(ga,{modalOpen:t,onClose:function(){a(!1)},title:"Update Credentials - ".concat(V," / ").concat(G),children:Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b(!0),function(){var e={};"s3"===V||"azure"===V?e={access_key:M,secret_key:R}:"gcs"===V&&(e={creds:A}),""!==G?he.invoke("PUT","/api/v1/admin/tiers/".concat(V,"/").concat(G,"/credentials"),e).then((function(){b(!1),a(!0)})).catch((function(e){b(!1),o(e)})):o("There was an error retrieving tier information")}()},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:i.formScrollable,children:["s3"===V&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(va,{id:"accessKey",name:"accessKey",label:"Access Key",placeholder:"Enter Access Key",value:h,onChange:function(e){p(e.target.value)}}),Object(n.jsx)(va,{id:"secretKey",name:"secretKey",label:"Secret Key",placeholder:"Enter Secret Key",value:v,onChange:function(e){S(e.target.value)}})]}),"gcs"===V&&Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(Eo,{accept:".json",id:"creds",label:"Credentials",name:"creds",onChange:function(e,t){_(e),N(t)},value:w})}),"azure"===V&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(va,{id:"accountName",name:"accountName",label:"Account Name",placeholder:"Enter Account Name",value:M,onChange:function(e){L(e.target.value)}}),Object(n.jsx)(va,{id:"accountKey",name:"accountKey",label:"Account Key",placeholder:"Enter Account Key",value:R,onChange:function(e){P(e.target.value)}})]})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:i.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:d||!W,children:"Save"})}),d&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})}))),Lo={setErrorSnackMessage:V},Do=Object(s.b)(null,Lo),Bo=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({},Ie),Fe),Be),Re),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})),{},{strongText:{fontWeight:700},keyName:{marginLeft:5},iconText:{lineHeight:"24px"},customConfigurationPage:{height:"calc(100vh - 410px)",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},lambdaContainer:{padding:"15px 0"},actionsTray:Object(j.a)(Object(j.a)({},Ie.actionsTray),{},{padding:"0 38px"}),customTitle:Object(j.a)(Object(j.a)({},Be.customTitle),{},{marginTop:0})}))}))(Do((function(e){var t=e.classes,a=e.setErrorSnackMessage,i=Object(c.useState)([]),r=Object(u.a)(i,2),o=r[0],s=r[1],l=Object(c.useState)(""),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(!0),h=Object(u.a)(m,2),p=h[0],O=h[1],v=Object(c.useState)(0),y=Object(u.a)(v,2),S=y[0],C=y[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)({type:"unsupported"}),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(""),M=Object(u.a)(F,2),L=M[0],D=M[1];Object(c.useEffect)((function(){if(p){he.invoke("GET","/api/v1/admin/tiers").then((function(e){s(e.items||[]),O(!1)})).catch((function(e){a(e),O(!1)}))}}),[p,a]);var B=o.filter((function(e){if(""===b)return!0;var t=Z()(e,"".concat(e.type,".name"),""),a=Z()(e,"type","");return t.indexOf(b)>=0||a.indexOf(b)>=0})),R=function(){C(S-1)},P=function(e){D(e),C(2)};return Object(n.jsxs)(c.Fragment,{children:[N&&Object(n.jsx)(Mo,{open:N,tierData:_,closeModalAndRefresh:function(){T(!1)}}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.settingsOptionsContainer,children:Object(n.jsx)(ao,{slideOptions:[Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.lambdaContainer,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:t.searchField,id:"search-resource",label:"",onChange:function(e){j(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(Mt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){O(!0)},children:Object(n.jsx)(xo.a,{})}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){C(1)},children:"Add Tier"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:[{type:"edit",onClick:function(e){I(e),T(!0)}}],columns:[{label:"Tier Name",elementKey:"type",renderFunction:function(e){var t=Z()(e,"".concat(e.type,".name"),"");return null!==t?t:""},renderFullObject:!0},{label:"Type",elementKey:"type",width:150},{label:"Endpoint",elementKey:"type",renderFunction:function(e){var t=Z()(e,"".concat(e.type,".endpoint"),"");return null!==t?t:""},renderFullObject:!0},{label:"Bucket",elementKey:"type",renderFunction:function(e){var t=Z()(e,"".concat(e.type,".bucket"),"");return null!==t?t:""},renderFullObject:!0},{label:"Prefix",elementKey:"type",renderFunction:function(e){var t=Z()(e,"".concat(e.type,".prefix"),"");return null!==t?t:""},renderFullObject:!0},{label:"Region",elementKey:"type",renderFunction:function(e){var t=Z()(e,"".concat(e.type,".region"),"");return null!==t?t:""},renderFullObject:!0}],isLoading:p,records:B,entityName:"Tiers",idField:"service_name",customPaperHeight:t.customConfigurationPage,noBackground:!0})})]})}),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.backContainer,children:Object(n.jsxs)("button",{onClick:R,className:t.backButton,children:[Object(n.jsx)(no,{}),"Back To Tiers"]})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.customTitle,children:"Add Tier Configuration"}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.settingsFormContainer,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:t.centerElements,children:Object(n.jsxs)("div",{className:t.iconContainer,children:[Object(n.jsx)("button",{className:t.lambdaNotif,onClick:function(){P("minio")},children:Object(n.jsx)("img",{src:"/minioTier.png",className:t.logoButton,alt:"MinIO"})}),Object(n.jsx)("button",{className:t.lambdaNotif,onClick:function(){P("gcs")},children:Object(n.jsx)("img",{src:"/gcs.png",className:t.logoButton,alt:"GCS"})}),Object(n.jsx)("button",{className:t.lambdaNotif,onClick:function(){P("s3")},children:Object(n.jsx)("img",{src:"/amazon.png",className:t.logoButton,alt:"s3"})}),Object(n.jsx)("button",{className:t.lambdaNotif,onClick:function(){P("azure")},children:Object(n.jsx)("img",{src:"/azure.png",className:t.logoButton,alt:"Azure"})})]})})})})]})]}),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.backContainer,children:Object(n.jsxs)("button",{onClick:R,className:t.backButton,children:[Object(n.jsx)(no,{}),"Back To Tier Type Selection"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:2===S&&Object(n.jsx)(Io,{type:L,saveAndRefresh:function(){C(0),O(!0)}})})]})],currentSlide:S})})})})})]})}))),Ro=Object(s.b)((function(e){return{session:e.console.session}}),{}),Po=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Ro((function(e){var t=e.classes,a=(e.session,Object(c.useState)(0)),i=Object(u.a)(a,2),r=i[0],o=i[1];return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(Ua,{label:"Settings"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsxs)(tn.a,{value:r,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){o(t)},"aria-label":"tenant-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(n.jsx)(an.a,{label:"Configurations"}),Object(n.jsx)(an.a,{label:"Lambda Notifications"}),Object(n.jsx)(an.a,{label:"Tiers"})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[0===r&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(io,{})}),1===r&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(So,{})}),2===r&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Bo,{})})]})]})})]})}))),zo=a(154),Ko=a.n(zo),Wo={logger:{main:"logger",title:"Logger Webhook Configuration",modalTitle:"Logger Webhook",apiURL:"",configuration:{configuration_id:"logger_webhook",configuration_label:"Logger Webhook"}},audit:{main:"audit",title:"Audit Webhook Configuration",modalTitle:"Audit Webhook",apiURL:"",configuration:{configuration_id:"audit_webhook",configuration_label:"Audit Webhook"}}},Uo=Object(N.a)((function(e){return Object(k.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},actionsTray:{textAlign:"right","& button":{marginLeft:10}},searchField:{background:"#FFFFFF",padding:12,borderRadius:5,boxShadow:"0px 3px 6px #00000012"},iconText:{lineHeight:"24px"}})}))((function(e){var t=e.match,a=e.classes,r=Object(c.useState)(!1),o=Object(u.a)(r,2),s=o[0],l=o[1],d=Object(c.useState)(""),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(!1),p=Object(u.a)(h,2),O=p[0],y=p[1],S=Z()(t,"path","").split("/"),C=Z()(Wo,S[2],!1);if(!C)return null;var k=[].filter((function(e){return e.name.toLocaleLowerCase().includes(j.toLocaleLowerCase())}));return Object(n.jsxs)(i.a.Fragment,{children:[s&&Object(n.jsx)(to,{closeModalAndRefresh:function(){y(!0),l(!1)},selectedConfiguration:C.configuration}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"h6",children:C.title})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:a.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:a.searchField,id:"search-resource",label:"",onChange:function(e){m(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(Ko.a,{}),onClick:function(){l(!0)},children:"Add Webhook Configuration"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:[{type:"edit",onClick:function(){}}],columns:[{label:"Name",elementKey:"name"}],isLoading:O,records:k,entityName:"Webhook Configurations",idField:"name"})})]})]})})),Vo=Object(s.b)(null,{setErrorSnackMessage:V})((function(e){var t=e.deleteOpen,a=e.selectedTenant,i=e.closeDeleteModalAndRefresh,r=e.setErrorSnackMessage,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(""),j=Object(u.a)(b,2),m=j[0],h=j[1];Object(c.useEffect)((function(){l&&he.invoke("DELETE","/api/v1/namespaces/".concat(a.namespace,"/tenants/").concat(a.name)).then((function(){d(!1),i(!0)})).catch((function(e){d(!1),r(e)}))}),[l]);return Object(n.jsxs)(ja.a,{open:t,onClose:function(){i(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete Tenant"}),Object(n.jsxs)(ha.a,{children:[l&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["To continue please type ",Object(n.jsx)("b",{children:a.name})," in the box.",Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"retype-tenant",name:"retype-tenant",onChange:function(e){h(e.target.value)},label:"",value:m})})]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){i(!1)},color:"primary",disabled:l,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){m===a.name?d(!0):r("Tenant name is not correct")},color:"secondary",autoFocus:!0,disabled:m!==a.name,children:"Delete"})]})]})})),Go=function(e,t){return{podAntiAffinity:{requiredDuringSchedulingIgnoredDuringExecution:[{labelSelector:{matchExpressions:[{key:"v1.min.io/tenant",operator:"In",values:[e]},{key:"v1.min.io/pool",operator:"In",values:[t]}]},topologyKey:"kubernetes.io/hostname"}]}}},qo=function(e,t,a,n){var c=e.split("&"),i=[];c.forEach((function(e){var t=e.split("=");2===t.length&&i.push({key:t[0],operator:"In",values:[t[1]]})}));var r={nodeAffinity:{requiredDuringSchedulingIgnoredDuringExecution:{nodeSelectorTerms:[{matchExpressions:i}]}}};if(t){var o=Go(a,n);r.podAntiAffinity=o.podAntiAffinity}return console.log(r),r},Ho="ADD_TENANT/SET_CURRENT_PAGE",Yo="ADD_TENANT/SET_ADVANCED_MODE",Qo="ADD_TENANT/UPDATE_FIELD",Zo="ADD_TENANT/SET_PAGE_VALID",Jo="ADD_TENANT/RESET_FORM",$o="ADD_TENANT/SET_STORAGE_CLASSES_LIST",Xo="ADD_TENANT/ADD_MINIO_KEYPAIR",es="ADD_TENANT/ADD_FILE_MINIO_KEYPAIR",ts="ADD_TENANT/DELETE_MINIO_KEYPAIR",as="ADD_TENANT/ADD_CA_KEYPAIR",ns="ADD_TENANT/ADD_FILE_TO_CA_KEYPAIR",cs="ADD_TENANT/DELETE_CA_KEYPAIR",is="ADD_TENANT/ADD_CONSOLE_CERT",rs="ADD_TENANT/ENCRYPTION_SERVER_CERT",os="ADD_TENANT/ENCRYPTION_CLIENT_CERT",ss="ADD_TENANT/ENCRYPTION_VAULT_CERT",ls="ADD_TENANT/ENCRYPTION_VAULT_CA",ds="ADD_TENANT/ENCRYPTION_GEMALTO_CA",bs=function(e,t,a){return{type:Qo,pageName:e,field:t,value:a}},us=function(e,t){return{type:Zo,pageName:e,valid:t}},js=function(e,t,a){return{type:is,key:e,fileName:t,value:a}},ms=function(e){var t={};return e.forEach((function(e){if(e.required&&""===e.value.trim())t[e.fieldKey]="Field cannot be empty";else if(e.required||""!==e.value.trim())if(e.customValidation&&e.customValidationMessage)t[e.fieldKey]=e.customValidationMessage;else if(e.pattern&&e.customPatternMessage){var a=new RegExp(e.pattern,"g");e.value.match(a)||(t[e.fieldKey]=e.customPatternMessage)}else;})),t},hs=function(e,t){var a=Object(j.a)({},e);return delete a[t],a},ps=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t="",a="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=0;n0)return k(!1),void E(!1);k(!0),he.invoke("GET","/api/v1/namespaces/".concat(s,"/resourcequotas/").concat(s,"-storagequota")).then((function(e){var t=Z()(e,"elements",[]);m(function(e){var t=Z()(e,"elements",[]),a={};return t.forEach((function(e){var t=e.name.split(".storageclass.storage.k8s.io/requests.storage")[0],n=Z()(e,"hard",0),c=Z()(e,"used",0);a[t]=n-c})),a}(e));var a=t.map((function(e){var t=Z()(e,"name","").split(".storageclass.storage.k8s.io/requests.storage")[0];return{label:t,value:t}}));j(a),a.length>0&&A("selectedStorageClass",a[0].value),E(!1)})).catch((function(e){E(!1),console.error("Namespace error: ",e)}))})).catch((function(e){console.error(e),p("Error validating if namespace already has tenants")}))}),[s,m,p,j,A]),I=Object(c.useMemo)((function(){return An()(_,500)}),[_]);Object(c.useEffect)((function(){if(""!==s)return I(),E(!0),I.cancel}),[I,s]),Object(c.useEffect)((function(){var e=!1,t="";C||T?a.length<1&&C&&!T&&(e=!0,t="Please enter a valid namespace"):(e=!0,t="You can only create one tenant per namespace");var n=ms([{fieldKey:"tenant-name",required:!0,pattern:/^[a-z0-9-]{3,63}$/,customPatternMessage:"Name only can contain lowercase letters, numbers and '-'. Min. Length: 3",value:o},{fieldKey:"namespace",required:!0,value:s,customValidation:e,customValidationMessage:t}]),c=!("tenant-name"in n)&&!("namespace"in n)&&a.length>0;h("nameTenant",c),v(n)}),[a,s,o,h,C,T]);var F=function(e){v(hs(f,e))};return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Name Tenant"}),Object(n.jsx)("span",{className:t.descriptionText,children:"How would you like to name this new tenant?"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"tenant-name",name:"tenant-name",onChange:function(e){A("tenantName",e.target.value),F("tenant-name")},label:"Name",value:o,required:!0,error:f["tenant-name"]||""})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"namespace",name:"namespace",onChange:function(e){A("namespace",e.target.value),F("namespace")},label:"Namespace",value:s,error:f.namespace||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{id:"storage_class",name:"storage_class",onChange:function(e){A("selectedStorageClass",e.target.value)},label:"Storage Class",value:l,options:a,disabled:a.length<1})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)("br",{}),Object(n.jsxs)("span",{className:t.descriptionText,children:["Check 'Advanced Mode' for additional configuration options, such as configuring an Identity Provider, Encryption at rest, and customized TLS/SSL Certificates.",Object(n.jsx)("br",{}),"Leave 'Advanced Mode' unchecked to use the secure default settings for the tenant."]}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(Ba,{value:"adv_mode",id:"adv_mode",name:"adv_mode",checked:r,onChange:function(e){var t=e.target.checked;d(t)},label:"Advanced Mode"})]})]})}))),fs=Object(s.b)((function(e){return{storageClasses:e.tenants.createTenant.storageClasses,customImage:e.tenants.createTenant.fields.configure.customImage,imageName:e.tenants.createTenant.fields.configure.imageName,consoleImage:e.tenants.createTenant.fields.configure.consoleImage,customDockerhub:e.tenants.createTenant.fields.configure.customDockerhub,imageRegistry:e.tenants.createTenant.fields.configure.imageRegistry,imageRegistryUsername:e.tenants.createTenant.fields.configure.imageRegistryUsername,imageRegistryPassword:e.tenants.createTenant.fields.configure.imageRegistryPassword,exposeMinIO:e.tenants.createTenant.fields.configure.exposeMinIO,exposeConsole:e.tenants.createTenant.fields.configure.exposeConsole,prometheusCustom:e.tenants.createTenant.fields.configure.prometheusCustom,logSearchCustom:e.tenants.createTenant.fields.configure.logSearchCustom,logSearchVolumeSize:e.tenants.createTenant.fields.configure.logSearchVolumeSize,logSearchSizeFactor:e.tenants.createTenant.fields.configure.logSearchSizeFactor,prometheusVolumeSize:e.tenants.createTenant.fields.configure.prometheusVolumeSize,prometheusSizeFactor:e.tenants.createTenant.fields.configure.prometheusSizeFactor,logSearchSelectedStorageClass:e.tenants.createTenant.fields.configure.logSearchSelectedStorageClass,logSearchImage:e.tenants.createTenant.fields.configure.logSearchImage,kesImage:e.tenants.createTenant.fields.configure.kesImage,logSearchPostgresImage:e.tenants.createTenant.fields.configure.logSearchPostgresImage,prometheusSelectedStorageClass:e.tenants.createTenant.fields.configure.prometheusSelectedStorageClass,prometheusImage:e.tenants.createTenant.fields.configure.prometheusImage,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass}}),{updateAddField:bs,isPageValid:us}),xs=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue))}))(fs((function(e){var t=e.classes,a=e.storageClasses,i=e.customImage,r=e.imageName,o=e.consoleImage,s=e.customDockerhub,l=e.imageRegistry,d=e.imageRegistryUsername,b=e.imageRegistryPassword,j=e.exposeMinIO,m=e.exposeConsole,h=e.prometheusCustom,p=e.logSearchCustom,O=e.logSearchVolumeSize,g=(e.logSearchSizeFactor,e.logSearchImage),f=e.kesImage,v=e.logSearchPostgresImage,y=e.prometheusVolumeSize,S=(e.prometheusSizeFactor,e.logSearchSelectedStorageClass),C=e.prometheusSelectedStorageClass,k=e.prometheusImage,w=e.updateAddField,N=e.isPageValid,T=e.selectedStorageClass,E=Object(c.useState)({}),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useCallback)((function(e,t){w("configure",e,t)}),[w]);Object(c.useEffect)((function(){var e=[];h&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"prometheus_storage_class",required:!0,value:C,customValidation:""===C,customValidationMessage:"Field cannot be empty"},{fieldKey:"prometheus_volume_size",required:!0,value:y,customValidation:""===y||parseInt(y)<=0,customValidationMessage:"Volume size must be present and be greatter than 0"}])),p&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"log_search_storage_class",required:!0,value:S,customValidation:""===S,customValidationMessage:"Field cannot be empty"},{fieldKey:"log_search_volume_size",required:!0,value:O,customValidation:""===O||parseInt(O)<=0,customValidationMessage:"Volume size must be present and be greatter than 0"}])),i&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"image",required:!1,value:r,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/minio:VERSION'"},{fieldKey:"consoleImage",required:!1,value:o,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/console:VERSION'"},{fieldKey:"logSearchImage",required:!1,value:g,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/logsearchapi:VERSION'"},{fieldKey:"kesImage",required:!1,value:f,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/kes:VERSION'"},{fieldKey:"logSearchPostgresImage",required:!1,value:v,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/postgres:VERSION'"},{fieldKey:"prometheusImage",required:!1,value:k,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/prometheus:VERSION'"}]),s&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"registry",required:!0,value:l},{fieldKey:"registryUsername",required:!0,value:d},{fieldKey:"registryPassword",required:!0,value:b}])));var t=ms(e);N("configure",0===Object.keys(t).length),I(t)}),[i,r,o,g,f,v,k,s,l,d,b,N,h,p,C,y,S,O]),Object(c.useEffect)((function(){a.length>0&&(0===a.filter((function(e){return e.value===C})).length&&F("prometheusSelectedStorageClass",T),0===a.filter((function(e){return e.value===S})).length&&F("logSearchSelectedStorageClass",T))}),[S,C,T,a,F]);var M=function(e){I(hs(_,e))};return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Configure"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Basic configurations for tenant management"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"custom_image",id:"custom_image",name:"custom_image",checked:i,onChange:function(e){var t=e.target.checked;F("customImage",t)},label:"Use custom image"})}),i&&Object(n.jsxs)(c.Fragment,{children:["Please enter the MinIO docker image to use",Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"image",name:"image",onChange:function(e){F("imageName",e.target.value),M("image")},label:"MinIO's Image",value:r,error:_.image||"",placeholder:"E.g. minio/minio:RELEASE.2021-04-22T15-44-28Z"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"consoleImage",name:"consoleImage",onChange:function(e){F("consoleImage",e.target.value),M("consoleImage")},label:"Console's Image",value:o,error:_.consoleImage||"",placeholder:"E.g. minio/console:v0.7.2"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"logSearchImage",name:"logSearchImage",onChange:function(e){F("logSearchImage",e.target.value),M("logSearchImage")},label:"Log Search API's Image",value:g,error:_.logSearchImage||"",placeholder:"E.g. minio/logsearchapi:v4.0.9"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"kesImage",name:"kesImage",onChange:function(e){F("kesImage",e.target.value),M("kesImage")},label:"KES Image",value:f,error:_.kesImage||"",placeholder:"E.g. minio/kes:v0.14.0"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"logSearchPostgresImage",name:"logSearchPostgresImage",onChange:function(e){F("logSearchPostgresImage",e.target.value),M("logSearchPostgresImage")},label:"Log Search Postgres's Image",value:v,error:_.logSearchPostgresImage||"",placeholder:"E.g. library/postgres:13"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"prometheusImage",name:"prometheusImage",onChange:function(e){F("prometheusImage",e.target.value),M("prometheusImage")},label:"Prometheus Image",value:k,error:_.prometheusImage||"",placeholder:"E.g. quay.io/prometheus/prometheus:latest"})})]}),i&&Object(n.jsx)(c.Fragment,{children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"custom_docker_hub",id:"custom_docker_hub",name:"custom_docker_hub",checked:s,onChange:function(e){var t=e.target.checked;F("customDockerhub",t)},label:"Set/Update Image Registry"})})}),s&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"registry",name:"registry",onChange:function(e){F("imageRegistry",e.target.value)},label:"Endpoint",value:l,error:_.registry||"",placeholder:"E.g. https://index.docker.io/v1/",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"registryUsername",name:"registryUsername",onChange:function(e){F("imageRegistryUsername",e.target.value)},label:"Username",value:d,error:_.registryUsername||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"registryPassword",name:"registryPassword",onChange:function(e){F("imageRegistryPassword",e.target.value)},label:"Password",value:b,error:_.registryPassword||"",required:!0})})]}),Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Expose Services"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Whether the tenant's services should request an external IP."})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"expose_minio",id:"expose_minio",name:"expose_minio",checked:j,onChange:function(e){var t=e.target.checked;F("exposeMinIO",t)},label:"Expose MiniO Service"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"expose_console",id:"expose_console",name:"expose_console",checked:m,onChange:function(e){var t=e.target.checked;F("exposeConsole",t)},label:"Expose Console Service"})}),Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Additional Configurations"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Configure Storage Classes & Storage size for Log Search and Prometheus add-ons"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"logSearchConfig",id:"log_search_configuration",name:"log_search_configuration",checked:p,onChange:function(e){var t=e.target.checked;F("logSearchCustom",t)},label:"Override Log Search defaults"})}),p&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{id:"log_search_storage_class",name:"log_search_storage_class",onChange:function(e){F("logSearchSelectedStorageClass",e.target.value)},label:"Log Search Storage Class",value:S,options:a,disabled:a.length<1})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.multiContainer,children:Object(n.jsx)("div",{children:Object(n.jsx)(va,{type:"number",id:"log_search_volume_size",name:"log_search_volume_size",onChange:function(e){F("logSearchVolumeSize",e.target.value),M("log_search_volume_size")},label:"Storage Size [Gi]",value:O,required:!0,error:_.log_search_volume_size||"",min:"0"})})})}),Object(n.jsx)("br",{})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"prometheusConfig",id:"prometheus_configuration",name:"prometheus_configuration",checked:h,onChange:function(e){var t=e.target.checked;F("prometheusCustom",t)},label:"Override Prometheus defaults"})}),h&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{id:"prometheus_storage_class",name:"prometheus_storage_class",onChange:function(e){F("prometheusSelectedStorageClass",e.target.value)},label:"Prometheus Storage Class",value:C,options:a,disabled:a.length<1})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.multiContainer,children:Object(n.jsx)("div",{children:Object(n.jsx)(va,{type:"number",id:"prometheus_volume_size",name:"prometheus_volume_size",onChange:function(e){F("prometheusVolumeSize",e.target.value),M("prometheus_volume_size")},label:"Storage Size [Gi]",value:y,required:!0,error:_.prometheus_volume_size||"",min:"0"})})})}),Object(n.jsx)("br",{})]})]})}))),vs=a(434),ys=a.n(vs),Ss=a(435),Cs=a.n(Ss),ks=Object(s.b)((function(e){return{idpSelection:e.tenants.createTenant.fields.identityProvider.idpSelection,accessKeys:e.tenants.createTenant.fields.identityProvider.accessKeys,secretKeys:e.tenants.createTenant.fields.identityProvider.secretKeys,openIDURL:e.tenants.createTenant.fields.identityProvider.openIDURL,openIDClientID:e.tenants.createTenant.fields.identityProvider.openIDClientID,openIDSecretID:e.tenants.createTenant.fields.identityProvider.openIDSecretID,ADURL:e.tenants.createTenant.fields.identityProvider.ADURL,ADSkipTLS:e.tenants.createTenant.fields.identityProvider.ADSkipTLS,ADServerInsecure:e.tenants.createTenant.fields.identityProvider.ADServerInsecure,ADUserNameFilter:e.tenants.createTenant.fields.identityProvider.ADUserNameFilter,ADGroupBaseDN:e.tenants.createTenant.fields.identityProvider.ADGroupBaseDN,ADGroupSearchFilter:e.tenants.createTenant.fields.identityProvider.ADGroupSearchFilter,ADNameAttribute:e.tenants.createTenant.fields.identityProvider.ADNameAttribute}}),{updateAddField:bs,isPageValid:us}),ws=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"},shortened:{gridTemplateColumns:"auto auto 50px 50px",display:"grid",gridGap:20},buttonTray:{gridTemplateColumns:"auto auto 10px 10px",display:"grid",gridGap:0,height:16,marginTop:12}},we),Ue))}))(ks((function(e){var t=e.classes,a=e.idpSelection,i=e.accessKeys,r=e.secretKeys,o=e.openIDURL,s=e.openIDClientID,l=e.openIDSecretID,d=e.ADURL,b=e.ADSkipTLS,j=e.ADServerInsecure,m=e.ADUserNameFilter,h=e.ADGroupBaseDN,p=e.ADGroupSearchFilter,O=e.ADNameAttribute,g=e.updateAddField,f=e.isPageValid,y=Object(c.useState)({}),S=Object(u.a)(y,2),C=S[0],k=S[1],w=Object(c.useCallback)((function(e,t){g("identityProvider",e,t)}),[g]),N=function(e,t){var a=Object(Je.a)(i);a[e]=t,w("accessKeys",a)},T=function(e,t){var a=Object(Je.a)(r);a[e]=t,w("secretKeys",a)},E=function(e){k(hs(C,e))};Object(c.useEffect)((function(){var e=[];if("Built-in"===a){e=Object(Je.a)(e);for(var t=0;t1&&(i.splice(a,1),r.splice(a,1),N(i.length-1,i[i.length-1]))},children:Object(n.jsx)(Cs.a,{})})})]})]})},"identityField-".concat(a.toString()))}))),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Identity Provider"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Access to the tenant can be controlled via an external Identity Manager."})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Fa,{currentSelection:a,id:"idp-options",name:"idp-options",label:"Protocol",onChange:function(e){w("idpSelection",e.target.value)},selectorOptions:[{label:"Built-in",value:"Built-in"},{label:"OpenID",value:"OpenID"},{label:"Active Directory",value:"AD"}]}),"Add additional users"]})," ","Built-in"===a&&Object(n.jsx)(c.Fragment,{children:A}),"OpenID"===a&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"openID_URL",name:"openID_URL",onChange:function(e){w("openIDURL",e.target.value),E("openID_URL")},label:"URL",value:o,error:C.openID_URL||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"openID_clientID",name:"openID_clientID",onChange:function(e){w("openIDClientID",e.target.value),E("openID_clientID")},label:"Client ID",value:s,error:C.openID_clientID||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"openID_secretID",name:"openID_secretID",onChange:function(e){w("openIDSecretID",e.target.value),E("openID_secretID")},label:"Secret ID",value:l,error:C.openID_secretID||"",required:!0})})]}),"AD"===a&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"AD_URL",name:"AD_URL",onChange:function(e){w("ADURL",e.target.value),E("AD_URL")},label:"URL",value:d,error:C.AD_URL||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"ad_skipTLS",id:"ad_skipTLS",name:"ad_skipTLS",checked:b,onChange:function(e){var t=e.target.checked;w("ADSkipTLS",t)},label:"Skip TLS Verification"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"ad_serverInsecure",id:"ad_serverInsecure",name:"ad_serverInsecure",checked:j,onChange:function(e){var t=e.target.checked;w("ADServerInsecure",t)},label:"Server Insecure"})}),j?Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(v.a,{className:t.error,variant:"caption",display:"block",gutterBottom:!0,children:"Warning: All traffic with Active Directory will be unencrypted"}),Object(n.jsx)("br",{})]}):null,Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"ad_userNameFilter",name:"ad_userNameFilter",onChange:function(e){w("ADUserNameFilter",e.target.value),E("ad_userNameFilter")},label:"User Search Filter",value:m,error:C.ad_userNameFilter||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"ad_groupBaseDN",name:"ad_groupBaseDN",onChange:function(e){w("ADGroupBaseDN",e.target.value),E("ad_groupBaseDN")},label:"Group Search Base DN",value:h,error:C.ad_groupBaseDN||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"ad_groupSearchFilter",name:"ad_groupSearchFilter",onChange:function(e){w("ADGroupSearchFilter",e.target.value),E("ad_groupSearchFilter")},label:"Group Search Filter",value:p,error:C.ad_groupSearchFilter||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"ad_nameAttribute",name:"ad_nameAttribute",onChange:function(e){w("ADNameAttribute",e.target.value),E("ad_nameAttribute")},label:"Group Name Attribute",value:O,error:C.ad_nameAttribute||"",required:!0})})]})]})}))),Ns=Object(s.b)((function(e){return{enableTLS:e.tenants.createTenant.fields.security.enableTLS,enableAutoCert:e.tenants.createTenant.fields.security.enableAutoCert,enableCustomCerts:e.tenants.createTenant.fields.security.enableCustomCerts,minioCertificates:e.tenants.createTenant.certificates.minioCertificates,caCertificates:e.tenants.createTenant.certificates.caCertificates,consoleCertificate:e.tenants.createTenant.certificates.consoleCertificate}}),{updateAddField:bs,isPageValid:us,addFileToCaCertificates:function(e,t,a,n){return{type:ns,id:e,key:t,fileName:a,value:n}},deleteCaCertificate:function(e){return{type:cs,id:e}},addCaCertificate:function(){return{type:as}},addKeyPair:function(){return{type:Xo}},addFileToKeyPair:function(e,t,a,n){return{type:es,id:e,key:t,fileName:a,value:n}},deleteKeyPair:function(e){return{type:ts,id:e}},addConsoleCertificate:js}),Ts=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue))}))(Ns((function(e){var t=e.classes,a=e.enableTLS,i=e.enableAutoCert,r=e.enableCustomCerts,o=e.minioCertificates,s=e.caCertificates,l=e.consoleCertificate,d=e.updateAddField,b=e.isPageValid,u=e.addFileToCaCertificates,j=e.deleteCaCertificate,m=e.addCaCertificate,h=e.addKeyPair,p=e.addFileToKeyPair,O=e.deleteKeyPair,f=Object(c.useCallback)((function(e,t){d("security",e,t)}),[d]);return Object(c.useEffect)((function(){b("security",!a||(!!i||!!r))}),[a,i,r,b]),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("div",{className:t.headerElement,children:Object(n.jsx)("h3",{className:t.h3Section,children:"Security"})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Ba,{value:"enableTLS",id:"enableTLS",name:"enableTLS",checked:a,onChange:function(e){var t=e.target.checked;f("enableTLS",t)},label:"Enable TLS"}),"Enable TLS for the tenant, this is required for Encryption Configuration",a&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(v.a,{variant:"caption",display:"block",gutterBottom:!0,children:"AutoCert: MinIO Operator will generate all TLS certificates automatically"}),Object(n.jsx)(v.a,{variant:"caption",display:"block",gutterBottom:!0,children:"Custom certificates: Allow user to provide your own certificates"}),Object(n.jsx)("br",{})]})]}),a&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Ba,{value:"enableAutoCert",id:"enableAutoCert",name:"enableAutoCert",checked:i,onChange:function(e){var t=e.target.checked;f("enableAutoCert",t)},label:"Enable AutoCert"}),Object(n.jsx)(Ba,{value:"enableCustomCerts",id:"enableCustomCerts",name:"enableCustomCerts",checked:r,onChange:function(e){var t=e.target.checked;f("enableCustomCerts",t)},label:"Custom Certificates"})]}),r&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,children:"MinIO Certificates"})}),o.map((function(e){return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:5,children:Object(n.jsx)(Eo,{onChange:function(t,a){p(e.id,"key",a,t)},accept:".key,.pem",id:"tlsKey",name:"tlsKey",label:"Key",value:e.key})}),Object(n.jsx)(x.a,{item:!0,xs:5,children:Object(n.jsx)(Eo,{onChange:function(t,a){p(e.id,"cert",a,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert})}),Object(n.jsx)(x.a,{item:!0,xs:1,children:Object(n.jsx)(g.a,{onClick:function(){O(e.id)},color:"secondary",children:"Remove"})})]},e.id)})),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(g.a,{onClick:h,color:"primary",children:"Add More"})})]}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)("br",{}),Object(n.jsx)(oi.a,{}),Object(n.jsx)("br",{})]})}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,children:"CA Certificates"})}),s.map((function(e){return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:10,children:Object(n.jsx)(Eo,{onChange:function(t,a){u(e.id,"cert",a,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert})}),Object(n.jsx)(x.a,{item:!0,xs:1,children:Object(n.jsx)(g.a,{onClick:function(){j(e.id)},color:"secondary",children:"Remove"})})]},e.id)})),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(g.a,{onClick:m,color:"primary",children:"Add More"})})]}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)("br",{}),Object(n.jsx)(oi.a,{}),Object(n.jsx)("br",{})]})}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,children:"Console Certificates"})}),Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){js("key",t,e)},accept:".key,.pem",id:"consoleKey",name:"consoleKey",label:"Key",value:l.key})}),Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){js("cert",t,e)},accept:".cer,.crt,.cert,.pem",id:"consoleCert",name:"consoleCert",label:"Cert",value:l.cert})})]})]})]})]})}))),Es=Object(s.b)((function(e){return{enableEncryption:e.tenants.createTenant.fields.encryption.enableEncryption,encryptionType:e.tenants.createTenant.fields.encryption.encryptionType,gemaltoEndpoint:e.tenants.createTenant.fields.encryption.gemaltoEndpoint,gemaltoToken:e.tenants.createTenant.fields.encryption.gemaltoToken,gemaltoDomain:e.tenants.createTenant.fields.encryption.gemaltoDomain,gemaltoRetry:e.tenants.createTenant.fields.encryption.gemaltoRetry,awsEndpoint:e.tenants.createTenant.fields.encryption.awsEndpoint,awsRegion:e.tenants.createTenant.fields.encryption.awsRegion,awsKMSKey:e.tenants.createTenant.fields.encryption.awsKMSKey,awsAccessKey:e.tenants.createTenant.fields.encryption.awsAccessKey,awsSecretKey:e.tenants.createTenant.fields.encryption.awsSecretKey,awsToken:e.tenants.createTenant.fields.encryption.awsToken,vaultEndpoint:e.tenants.createTenant.fields.encryption.vaultEndpoint,vaultEngine:e.tenants.createTenant.fields.encryption.vaultEngine,vaultNamespace:e.tenants.createTenant.fields.encryption.vaultNamespace,vaultPrefix:e.tenants.createTenant.fields.encryption.vaultPrefix,vaultAppRoleEngine:e.tenants.createTenant.fields.encryption.vaultAppRoleEngine,vaultId:e.tenants.createTenant.fields.encryption.vaultId,vaultSecret:e.tenants.createTenant.fields.encryption.vaultSecret,vaultRetry:e.tenants.createTenant.fields.encryption.vaultRetry,vaultPing:e.tenants.createTenant.fields.encryption.vaultPing,gcpProjectID:e.tenants.createTenant.fields.encryption.gcpProjectID,gcpEndpoint:e.tenants.createTenant.fields.encryption.gcpEndpoint,gcpClientEmail:e.tenants.createTenant.fields.encryption.gcpClientEmail,gcpClientID:e.tenants.createTenant.fields.encryption.gcpClientID,gcpPrivateKeyID:e.tenants.createTenant.fields.encryption.gcpPrivateKeyID,gcpPrivateKey:e.tenants.createTenant.fields.encryption.gcpPrivateKey,enableCustomCertsForKES:e.tenants.createTenant.fields.encryption.enableCustomCertsForKES,enableAutoCert:e.tenants.createTenant.fields.security.enableAutoCert,enableTLS:e.tenants.createTenant.fields.security.enableTLS,minioCertificates:e.tenants.createTenant.certificates.minioCertificates,serverCertificate:e.tenants.createTenant.certificates.serverCertificate,clientCertificate:e.tenants.createTenant.certificates.clientCertificate,vaultCertificate:e.tenants.createTenant.certificates.vaultCertificate,vaultCA:e.tenants.createTenant.certificates.vaultCA,gemaltoCA:e.tenants.createTenant.certificates.gemaltoCA,enableCustomCerts:e.tenants.createTenant.fields.security.enableCustomCerts}}),{updateAddField:bs,isPageValid:us,addFileServerCert:function(e,t,a){return{type:rs,key:e,fileName:t,value:a}},addFileClientCert:function(e,t,a){return{type:os,key:e,fileName:t,value:a}},addFileVaultCert:function(e,t,a){return{type:ss,key:e,fileName:t,value:a}},addFileVaultCa:function(e,t){return{type:ls,fileName:e,value:t}},addFileGemaltoCa:function(e,t){return{type:ds,fileName:e,value:t}}}),As=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue))}))(Es((function(e){var t=e.classes,a=e.updateAddField,i=e.isPageValid,r=e.addFileServerCert,o=e.addFileClientCert,s=e.addFileVaultCert,l=e.addFileVaultCa,d=e.addFileGemaltoCa,b=e.enableEncryption,j=e.enableCustomCerts,m=e.encryptionType,h=e.gemaltoEndpoint,p=e.gemaltoToken,O=e.gemaltoDomain,g=e.gemaltoRetry,f=e.awsEndpoint,y=e.awsRegion,S=e.awsKMSKey,C=e.awsAccessKey,k=e.awsSecretKey,w=e.awsToken,N=e.vaultEndpoint,T=e.vaultEngine,E=e.vaultNamespace,A=e.vaultPrefix,_=e.vaultAppRoleEngine,I=e.vaultId,F=e.vaultSecret,M=e.vaultRetry,L=e.vaultPing,D=e.gcpProjectID,B=e.gcpEndpoint,R=e.gcpClientEmail,P=e.gcpClientID,z=e.gcpPrivateKeyID,K=e.gcpPrivateKey,W=e.enableCustomCertsForKES,U=e.enableAutoCert,V=e.enableTLS,G=e.minioCertificates,q=e.serverCertificate,H=e.clientCertificate,Y=e.vaultCertificate,Q=e.vaultCA,Z=e.gemaltoCA,J=Object(c.useState)({}),$=Object(u.a)(J,2),X=$[0],ee=$[1],te=!1;V&&(U||G&&G.filter((function(e){return e.encoded_key&&e.encoded_cert})).length>0)&&(te=!0);var ae=Object(c.useCallback)((function(e,t){a("encryption",e,t)}),[a]),ne=function(e){ee(hs(X,e))};return Object(c.useEffect)((function(){var e=[];b&&(j&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"serverKey",required:!U,value:q.encoded_key},{fieldKey:"serverCert",required:!U,value:q.encoded_cert},{fieldKey:"clientKey",required:!U,value:H.encoded_key},{fieldKey:"clientCert",required:!U,value:H.encoded_cert}])),"vault"===m&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"vault_endpoint",required:!0,value:N},{fieldKey:"vault_id",required:!0,value:I},{fieldKey:"vault_secret",required:!0,value:F},{fieldKey:"vault_ping",required:!1,value:L,customValidation:parseInt(L)<0,customValidationMessage:"Value needs to be 0 or greater"},{fieldKey:"vault_retry",required:!1,value:M,customValidation:parseInt(M)<0,customValidationMessage:"Value needs to be 0 or greater"}])),"aws"===m&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"aws_endpoint",required:!0,value:f},{fieldKey:"aws_region",required:!0,value:y},{fieldKey:"aws_accessKey",required:!0,value:C},{fieldKey:"aws_secretKey",required:!0,value:k}])),"gemalto"===m&&(e=[].concat(Object(Je.a)(e),[{fieldKey:"gemalto_endpoint",required:!0,value:h},{fieldKey:"gemalto_token",required:!0,value:p},{fieldKey:"gemalto_domain",required:!0,value:O},{fieldKey:"gemalto_retry",required:!1,value:g,customValidation:parseInt(g)<0,customValidationMessage:"Value needs to be 0 or greater"}])));var t=ms(e);i("encryption",0===Object.keys(t).length),ee(t)}),[b,m,N,T,I,F,L,M,f,y,k,C,h,p,O,g,D,i,U,j,q.encoded_key,q.encoded_cert,H.encoded_key,H.encoded_cert]),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Encryption"}),Object(n.jsx)("span",{className:t.descriptionText,children:"How would you like to encrypt the information at rest."})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"enableEncryption",id:"enableEncryption",name:"enableEncryption",checked:b,onChange:function(e){var t=e.target.checked;ae("enableEncryption",t)},label:"Enable Server Side Encryption",disabled:!te})}),b&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:m,id:"encryptionType",name:"encryptionType",label:"Encryption Options",onChange:function(e){ae("encryptionType",e.target.value)},selectorOptions:[{label:"Vault",value:"vault"},{label:"AWS",value:"aws"},{label:"Gemalto",value:"gemalto"},{label:"GCP",value:"gcp"}]})}),"vault"===m&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"enableCustomCertsForKES",id:"enableCustomCertsForKES",name:"enableCustomCertsForKES",checked:W||!U,onChange:function(e){var t=e.target.checked;ae("enableCustomCertsForKES",t)},label:"Custom Certificates",disabled:!U})}),(W||!U)&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,children:"Encryption Service Certificates"})}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){r("key",t,e),ne("serverKey")},accept:".key,.pem",id:"serverKey",name:"serverKey",label:"Key",error:X.serverKey||"",value:q.key,required:!U})}),Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){r("cert",t,e),ne("serverCert")},accept:".cer,.crt,.cert,.pem",id:"serverCert",name:"serverCert",label:"Cert",error:X.serverCert||"",value:q.cert,required:!U})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,children:"Mutual TLS authentication"})}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){o("key",t,e),ne("clientKey")},accept:".key,.pem",id:"clientKey",name:"clientKey",label:"Key",error:X.clientKey||"",value:H.key,required:!U})}),Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){o("cert",t,e),ne("clientCert")},accept:".cer,.crt,.cert,.pem",id:"clientCert",name:"clientCert",label:"Cert",error:X.clientCert||"",value:H.cert,required:!U})})]})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_endpoint",name:"vault_endpoint",onChange:function(e){ae("vaultEndpoint",e.target.value),ne("vault_endpoint")},label:"Endpoint",value:N,error:X.vault_endpoint||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_engine",name:"vault_engine",onChange:function(e){ae("vaultEngine",e.target.value),ne("vault_engine")},label:"Engine",value:T})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_namespace",name:"vault_namespace",onChange:function(e){ae("vaultNamespace",e.target.value)},label:"Namespace",value:E})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_prefix",name:"vault_prefix",onChange:function(e){ae("vaultPrefix",e.target.value)},label:"Prefix",value:A})}),Object(n.jsx)("h5",{children:"App Role"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_approle_engine",name:"vault_approle_engine",onChange:function(e){ae("vaultAppRoleEngine",e.target.value)},label:"Engine",value:_})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_id",name:"vault_id",onChange:function(e){ae("vaultId",e.target.value),ne("vault_id")},label:"AppRole ID",value:I,error:X.vault_id||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"vault_secret",name:"vault_secret",onChange:function(e){ae("vaultSecret",e.target.value),ne("vault_secret")},label:"AppRole Secret",value:F,error:X.vault_secret||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",min:"0",id:"vault_retry",name:"vault_retry",onChange:function(e){ae("vaultRetry",e.target.value),ne("vault_retry")},label:"Retry (Seconds)",value:M,error:X.vault_retry||""})}),Object(n.jsx)("h5",{children:"Mutual TLS authentication (optional)"}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){s("key",t,e),ne("vault_key")},accept:".key,.pem",id:"vault_key",name:"vault_key",label:"Key",value:Y.key})}),Object(n.jsx)(x.a,{item:!0,xs:6,children:Object(n.jsx)(Eo,{onChange:function(e,t){s("cert",t,e),ne("vault_cert")},accept:".cer,.crt,.cert,.pem",id:"vault_cert",name:"vault_cert",label:"Cert",value:Y.cert})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Eo,{onChange:function(e,t){l(t,e),ne("vault_ca")},accept:".cer,.crt,.cert,.pem",id:"vault_ca",name:"vault_ca",label:"CA",value:Q.cert})}),Object(n.jsx)("h5",{children:"Status"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",min:"0",id:"vault_ping",name:"vault_ping",onChange:function(e){ae("vaultPing",e.target.value),ne("vault_ping")},label:"Ping (Seconds)",value:L,error:X.vault_ping||""})})]}),"gcp"===m&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gcp_project_id",name:"gcp_project_id",onChange:function(e){ae("gcpProjectID",e.target.value)},label:"Project ID",value:D})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gcp_endpoint",name:"gcp_endpoint",onChange:function(e){ae("gcpEndpoint",e.target.value)},label:"Endpoint",value:B})}),Object(n.jsx)("h5",{children:"Credentials"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gcp_client_email",name:"gcp_client_email",onChange:function(e){ae("gcpClientEmail",e.target.value)},label:"Client Email",value:R})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gcp_client_id",name:"gcp_client_id",onChange:function(e){ae("gcpClientID",e.target.value)},label:"Client ID",value:P})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gcp_private_key_id",name:"gcp_private_key_id",onChange:function(e){ae("gcpPrivateKeyID",e.target.value)},label:"Private Key ID",value:z})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gcp_private_key",name:"gcp_private_key",onChange:function(e){ae("gcpPrivateKey",e.target.value)},label:"Private Key",value:K})})]}),"aws"===m&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"aws_endpoint",name:"aws_endpoint",onChange:function(e){ae("awsEndpoint",e.target.value),ne("aws_endpoint")},label:"Endpoint",value:f,error:X.aws_endpoint||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"aws_region",name:"aws_region",onChange:function(e){ae("awsRegion",e.target.value),ne("aws_region")},label:"Region",value:y,error:X.aws_region||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"aws_kmsKey",name:"aws_kmsKey",onChange:function(e){ae("awsKMSKey",e.target.value)},label:"KMS Key",value:S})}),Object(n.jsx)("h5",{children:"Credentials"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"aws_accessKey",name:"aws_accessKey",onChange:function(e){ae("awsAccessKey",e.target.value),ne("aws_accessKey")},label:"Access Key",value:C,error:X.aws_accessKey||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"aws_secretKey",name:"aws_secretKey",onChange:function(e){ae("awsSecretKey",e.target.value),ne("aws_secretKey")},label:"Secret Key",value:k,error:X.aws_secretKey||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"aws_token",name:"aws_token",onChange:function(e){ae("awsToken",e.target.value)},label:"Token",value:w})})]}),"gemalto"===m&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gemalto_endpoint",name:"gemalto_endpoint",onChange:function(e){ae("gemaltoEndpoint",e.target.value),ne("gemalto_endpoint")},label:"Endpoint",value:h,error:X.gemalto_endpoint||"",required:!0})}),Object(n.jsx)("h5",{children:"Credentials"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gemalto_token",name:"gemalto_token",onChange:function(e){ae("gemaltoToken",e.target.value),ne("gemalto_token")},label:"Token",value:p,error:X.gemalto_token||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"gemalto_domain",name:"gemalto_domain",onChange:function(e){ae("gemaltoDomain",e.target.value),ne("gemalto_domain")},label:"Domain",value:O,error:X.gemalto_domain||"",required:!0})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",min:"0",id:"gemalto_retry",name:"gemalto_retry",onChange:function(e){ae("gemaltoRetry",e.target.value),ne("gemalto_retry")},label:"Retry (seconds)",value:g,error:X.gemalto_retry||""})}),Object(n.jsx)("h5",{children:"Custom CA Root certificate verification"}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Eo,{onChange:function(e,t){d(t,e),ne("gemalto_ca")},accept:".cer,.crt,.cert,.pem",id:"gemalto_ca",name:"gemalto_ca",label:"CA",value:Z.cert})})]})]})]})}))),_s=Object(s.b)((function(e){return{advancedMode:e.tenants.createTenant.advancedModeOn,volumeSize:e.tenants.createTenant.fields.tenantSize.volumeSize,sizeFactor:e.tenants.createTenant.fields.tenantSize.sizeFactor,drivesPerServer:e.tenants.createTenant.fields.tenantSize.drivesPerServer,nodes:e.tenants.createTenant.fields.tenantSize.nodes,memoryNode:e.tenants.createTenant.fields.tenantSize.memoryNode,ecParity:e.tenants.createTenant.fields.tenantSize.ecParity,ecParityChoices:e.tenants.createTenant.fields.tenantSize.ecParityChoices,cleanECChoices:e.tenants.createTenant.fields.tenantSize.cleanECChoices,maxAllocableMemo:e.tenants.createTenant.fields.tenantSize.maxAllocableMemo,memorySize:e.tenants.createTenant.fields.tenantSize.memorySize,distribution:e.tenants.createTenant.fields.tenantSize.distribution,ecParityCalc:e.tenants.createTenant.fields.tenantSize.ecParityCalc,limitSize:e.tenants.createTenant.fields.tenantSize.limitSize,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass}}),{updateAddField:bs,isPageValid:us}),Is=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue))}))(_s((function(e){var t=e.classes,a=e.updateAddField,i=e.isPageValid,r=e.advancedMode,o=e.volumeSize,s=e.sizeFactor,l=e.drivesPerServer,d=e.nodes,b=e.memoryNode,j=e.ecParity,m=e.ecParityChoices,h=e.cleanECChoices,p=e.maxAllocableMemo,O=e.memorySize,g=e.distribution,f=e.ecParityCalc,v=e.limitSize,y=e.selectedStorageClass,S=Object(c.useState)({}),C=Object(u.a)(S,2),k=C[0],w=C[1],N=f.storageFactors.find((function(e){return e.erasureCode===j})),T=Object(c.useCallback)((function(e,t){a("tenantSize",e,t)}),[a]),E=function(e){w(hs(k,e))},A=Object(c.useCallback)((function(){var e=parseInt(b)||0,t=p||0,a=s,n=function(e,t,a){var n=oe(e.toString(10),"Gi",!0),c=parseInt(n,10);if(0===a)return{error:"There is no memory available for the selected number of nodes",request:0,limit:0};if(aa)return{error:"The requested memory is greater than the max available memory for the selected number of nodes",request:0,limit:0};var i=parseInt(t,10),r=c;return i>=parseInt(oe("1","Pi",!0),10)?r=Math.max(c,parseInt(oe("64","Gi",!0),10)):i>=parseInt(oe("100","Ti"),10)?r=Math.max(c,parseInt(oe("32","Gi",!0),10)):i>=parseInt(oe("10","Ti"),10)?r=Math.max(c,parseInt(oe("16","Gi",!0),10)):i>=parseInt(oe("1","Ti"),10)&&(r=Math.max(c,parseInt(oe("8","Gi",!0),10))),{error:"",request:c,limit:r}}(e,oe((o||0).toString(10),a),t);T("memorySize",n)}),[p,b,s,T,o]);Object(c.useEffect)((function(){A()}),[b,A]),Object(c.useEffect)((function(){A()}),[p,A]),Object(c.useEffect)((function(){if(m.length>0&&""===g.error){var e=function(e,t,a,n){if(e.length<1)return{error:1,defaultEC:"",erasureCodeSet:0,maxEC:"",rawCapacity:"0",storageFactors:[]};var c=t*a,i=e[0],r=2*parseInt(i.split(":")[1],10),o=e.map((function(e){var a=parseInt(e.split(":")[1],10),n=r/(r-a),i=Math.floor(c/n),o=t-Math.floor(t/n);return{erasureCode:e,storageFactor:n,maxCapacity:i.toString(10),maxFailureTolerations:o}})),s=i,l=e.find((function(e){return"EC:4"===e}));return t>=8&&n>16&&l&&(s="EC:4"),{error:0,storageFactors:o,maxEC:i,rawCapacity:c.toString(10),erasureCodeSet:r,defaultEC:s}}(h,g.persistentVolumes,g.pvSize,g.nodes);T("ecParityCalc",e),T("ecParity",e.defaultEC)}}),[m.length,g,h,T]),Object(c.useEffect)((function(){_(),I(),function(e){""===e||isNaN(parseInt(e))||he.invoke("GET","/api/v1/cluster/max-allocatable-memory?num_nodes=".concat(e)).then((function(e){var t=e.max_memory?e.max_memory:0;T("maxAllocableMemo",t)})).catch((function(e){T("maxAllocableMemo",0),console.error(e)}))}(d)}),[d,o,s,l]);var _=function(){var e=o,t=s,a=oe("12","Ti",!0),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,c=oe(e.value,e.unit,!0);return parseInt(c,10)v[y],customValidationMessage:"Volume size must be greater than 1Gi and less than ".concat(ce(v[y],!0))},{fieldKey:"memory_per_node",required:!0,value:b,customValidation:parseInt(b)<2,customValidationMessage:"Memory size must be greater than 2Gi"},{fieldKey:"drivesps",required:!0,value:l,customValidation:parseInt(l)<1,customValidationMessage:"There must be at least one drive"}]);i("tenantSize",!("nodes"in t)&&!("volume_size"in t)&&!("memory_per_node"in t)&&!("drivesps"in t)&&""===g.error&&0===f.error&&""===O.error),w(t)}),[d,o,s,b,g,l,f,O,v,y,i]),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Tenant Size"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Please select the desired capacity"})]}),Object(n.jsx)("span",{className:t.error,children:g.error}),Object(n.jsx)("span",{className:t.error,children:O.error}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"nodes",name:"nodes",type:"number",onChange:function(e){T("nodes",e.target.value),E("nodes")},label:"Number of Servers",value:d,min:"4",required:!0,error:k.nodes||""})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"drivesps",name:"drivesps",type:"number",onChange:function(e){T("drivesPerServer",e.target.value),E("drivesps")},label:"Number of Drives per Server",value:l,min:"1",required:!0,error:k.drivesps||""})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)("div",{className:t.multiContainer,children:[Object(n.jsx)("div",{children:Object(n.jsx)(va,{type:"number",id:"volume_size",name:"volume_size",onChange:function(e){T("volumeSize",e.target.value),E("volume_size")},label:"Total Size",value:o,required:!0,error:k.volume_size||"",min:"0"})}),Object(n.jsx)("div",{className:t.sizeFactorContainer,children:Object(n.jsx)(Na,{label:"Unit",id:"size_factor",name:"size_factor",value:s,onChange:function(e){T("sizeFactor",e.target.value)},options:ae.map((function(e){return{label:e,value:e}}))})})]})}),r&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{type:"number",id:"memory_per_node",name:"memory_per_node",onChange:function(e){T("memoryNode",e.target.value),E("memory_per_node")},label:"Memory per Node [Gi]",value:b,required:!0,error:k.memory_per_node||"",min:"2"})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Na,{id:"ec_parity",name:"ec_parity",onChange:function(e){T("ecParity",e.target.value)},label:"Erasure Code Parity",value:j,options:m}),Object(n.jsx)("span",{className:t.descriptionText,children:"Please select the desired parity. This setting will change the max usable capacity in the cluster"})]})]}),Object(n.jsx)("h4",{children:"Resource Allocation"}),Object(n.jsx)(un.a,{className:t.table,"aria-label":"simple table",children:Object(n.jsxs)(bn.a,{children:[Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Number of Servers"}),Object(n.jsx)(dn.a,{align:"right",children:parseInt(d)>0?d:"-"})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Drives per Server"}),Object(n.jsx)(dn.a,{align:"right",children:g?g.disks:"-"})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Drive Capacity"}),Object(n.jsx)(dn.a,{align:"right",children:g?ce(g.pvSize):"-"})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Total Number of Volumes"}),Object(n.jsx)(dn.a,{align:"right",children:g?g.persistentVolumes:"-"})]}),!r&&Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Memory per Node"}),Object(n.jsxs)(dn.a,{align:"right",children:[b," Gi"]})]})]})}),0===f.error&&N&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("h4",{children:"Erasure Code Configuration"}),Object(n.jsx)(un.a,{className:t.table,"aria-label":"simple table",children:Object(n.jsxs)(bn.a,{children:[Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"EC Parity"}),Object(n.jsx)(dn.a,{align:"right",children:""!==j?j:"-"})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Raw Capacity"}),Object(n.jsx)(dn.a,{align:"right",children:ce(f.rawCapacity)})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Usable Capacity"}),Object(n.jsx)(dn.a,{align:"right",children:ce(N.maxCapacity)})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{component:"th",scope:"row",children:"Number of server failures to tolerate"}),Object(n.jsx)(dn.a,{align:"right",children:g?Math.floor(N.maxFailureTolerations/g.disks):"-"})]})]})})]})]})}))),Fs=Object(s.b)((function(e){return{advancedMode:e.tenants.createTenant.advancedModeOn,enableTLS:e.tenants.createTenant.fields.security.enableTLS,tenantName:e.tenants.createTenant.fields.nameTenant.tenantName,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass,customImage:e.tenants.createTenant.fields.configure.customImage,imageName:e.tenants.createTenant.fields.configure.imageName,consoleImage:e.tenants.createTenant.fields.configure.consoleImage,namespace:e.tenants.createTenant.fields.nameTenant.namespace,volumeSize:e.tenants.createTenant.fields.tenantSize.volumeSize,sizeFactor:e.tenants.createTenant.fields.tenantSize.sizeFactor}}),{}),Ms=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue))}))(Fs((function(e){var t=e.classes,a=e.tenantName,i=e.customImage,r=e.imageName,o=e.consoleImage,s=e.namespace,l=e.selectedStorageClass,d=e.volumeSize,b=e.sizeFactor,u=e.advancedMode,j=e.enableTLS;return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Review"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Review the details of the new tenant"})]}),Object(n.jsx)(un.a,{size:"small",children:Object(n.jsxs)(bn.a,{children:[Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"Tenant Name"}),Object(n.jsx)(dn.a,{children:a})]}),i&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"MinIO Image"}),Object(n.jsx)(dn.a,{children:r})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"Console Image"}),Object(n.jsx)(dn.a,{children:o})]})]}),""!==s&&Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"Namespace"}),Object(n.jsx)(dn.a,{children:s})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"Storage Class"}),Object(n.jsx)(dn.a,{children:l})]}),Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"Total Size"}),Object(n.jsxs)(dn.a,{children:[d," ",b]})]}),u&&Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)(ln.a,{children:[Object(n.jsx)(dn.a,{align:"right",className:t.tableTitle,children:"Enable TLS"}),Object(n.jsx)(dn.a,{children:j?"Enabled":"Disabled"})]})})]})})]})}))),Ls=Object(s.b)((function(e){return{podAffinity:e.tenants.createTenant.fields.affinity.podAffinity,nodeSelectorLabels:e.tenants.createTenant.fields.affinity.nodeSelectorLabels,withPodAntiAffinity:e.tenants.createTenant.fields.affinity.withPodAntiAffinity}}),{setModalErrorSnackMessage:q,updateAddField:bs,isPageValid:us}),Ds=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue))}))(Ls((function(e){var t=e.classes,a=e.podAffinity,i=e.nodeSelectorLabels,r=e.withPodAntiAffinity,o=(e.setModalErrorSnackMessage,e.updateAddField),s=e.isPageValid,l=Object(c.useState)({}),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useCallback)((function(e,t){o("affinity",e,t)}),[o]);return Object(c.useEffect)((function(){var e=[];if("nodeSelector"===a){var t=!0,n=i.split("&");1===n.length&&""===n[0]&&(t=!1),n.forEach((function(e,a){var c=e.split("=");2!==c.length&&(t=!1),a+1!==n.length&&(""!==c[0]&&""!==c[1]||(t=!1))})),e=[].concat(Object(Je.a)(e),[{fieldKey:"labels",required:!0,value:i,customValidation:!t,customValidationMessage:"You need to add at least one label key-pair"}])}var c=ms(e);s("affinity",0===Object.keys(c).length),j(c)}),[s,a,i]),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsxs)("div",{className:t.headerElement,children:[Object(n.jsx)("h3",{className:t.h3Section,children:"Pod Affinity"}),Object(n.jsx)("span",{className:t.descriptionText,children:"Configure how pods will be assigned to nodes"})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Fa,{currentSelection:a,id:"affinity-options",name:"affinity-options",label:"Type",onChange:function(e){m("podAffinity",e.target.value)},selectorOptions:[{label:"None",value:"none"},{label:"Default (Pod Anti-afinnity)",value:"default"},{label:"Node Selector",value:"nodeSelector"}]}),"MinIO supports multiple configurations for Pod Afinnity"]}),"nodeSelector"===a&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)("br",{}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"with_pod_anti_affinity",id:"with_pod_anti_affinity",name:"with_pod_anti_affinity",checked:r,onChange:function(e){var t=e.target.checked;m("withPodAntiAffinity",t)},label:"With Pod Anti-Affinity"})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(Mn,{name:"labels",label:"Labels",elements:i,onChange:function(e){m("nodeSelectorLabels",e)},keyPlaceholder:"Label Key",valuePlaceholder:"Label Value",tooltip:"Labels to be used in nodeSelector assignation. Invalid key-pairs will be ignored",withBorder:!0}),Object(n.jsx)("span",{className:t.error,children:b.labels})]})]})]})}))),Bs=Object(s.b)((function(e){return{advancedMode:e.tenants.createTenant.advancedModeOn,namespace:e.tenants.createTenant.fields.nameTenant.namespace,validPages:e.tenants.createTenant.validPages,fields:e.tenants.createTenant.fields,certificates:e.tenants.createTenant.certificates}}),{setModalErrorSnackMessage:q,updateAddField:bs}),Rs=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we),Ue),Be))}))(Bs((function(e){var t=e.classes,a=e.advancedMode,i=e.fields,r=e.certificates,o=e.namespace,s=e.validPages,l=e.setModalErrorSnackMessage,d=e.closeAndRefresh,b=Object(c.useState)(!1),m=Object(u.a)(b,2),h=m[0],p=m[1],O=Object(c.useState)(null),g=Object(u.a)(O,2),f=g[0],v=g[1],S=Object(c.useState)(!1),C=Object(u.a)(S,2),k=C[0],w=C[1];Object(c.useEffect)((function(){var e=i.nameTenant.tenantName,t=i.nameTenant.selectedStorageClass,a=i.configure.imageName,n=i.configure.consoleImage,c=i.configure.customDockerhub,s=i.configure.imageRegistry,d=i.configure.imageRegistryUsername,b=i.configure.imageRegistryPassword,u=i.configure.exposeMinIO,m=i.configure.exposeConsole,h=i.identityProvider.idpSelection,O=i.identityProvider.openIDURL,g=i.identityProvider.openIDClientID,f=i.identityProvider.openIDSecretID,x=i.identityProvider.ADURL,y=i.identityProvider.ADSkipTLS,S=i.identityProvider.ADServerInsecure,C=i.identityProvider.ADUserNameFilter,N=i.identityProvider.ADGroupBaseDN,T=i.identityProvider.ADGroupSearchFilter,E=i.identityProvider.ADNameAttribute,A=i.identityProvider.accessKeys,_=i.identityProvider.secretKeys,I=r.minioCertificates,F=r.caCertificates,M=r.consoleCertificate,L=r.serverCertificate,D=r.clientCertificate,B=r.vaultCertificate,R=r.vaultCA,P=r.gemaltoCA,z=i.encryption.enableEncryption,K=i.encryption.encryptionType,W=i.encryption.gemaltoEndpoint,U=i.encryption.gemaltoToken,V=i.encryption.gemaltoDomain,G=i.encryption.gemaltoRetry,q=i.encryption.awsEndpoint,H=i.encryption.awsRegion,Y=i.encryption.awsKMSKey,Q=i.encryption.awsAccessKey,J=i.encryption.awsSecretKey,$=i.encryption.awsToken,X=i.encryption.vaultEndpoint,ee=i.encryption.vaultEngine,te=i.encryption.vaultNamespace,ae=i.encryption.vaultPrefix,ne=i.encryption.vaultAppRoleEngine,ce=i.encryption.vaultId,ie=i.encryption.vaultSecret,re=i.encryption.vaultRetry,oe=i.encryption.vaultPing,se=i.encryption.gcpProjectID,le=i.encryption.gcpEndpoint,be=i.encryption.gcpClientEmail,ue=i.encryption.gcpClientID,je=i.encryption.gcpPrivateKeyID,me=i.encryption.gcpPrivateKey,pe=i.security.enableAutoCert,Oe=i.security.enableTLS,ge=i.tenantSize.ecParity,fe=i.tenantSize.distribution,xe=i.tenantSize.memorySize,ve=i.configure.logSearchCustom,ye=i.configure.prometheusCustom,Se=i.configure.logSearchVolumeSize,Ce=i.configure.logSearchSelectedStorageClass,ke=i.configure.logSearchImage,we=i.configure.kesImage,Ne=i.configure.logSearchPostgresImage,Te=i.configure.prometheusImage,Ee=i.configure.prometheusSelectedStorageClass,Ae=i.configure.prometheusVolumeSize,_e=i.affinity.podAffinity,Ie=i.affinity.nodeSelectorLabels,Fe=i.affinity.withPodAntiAffinity;if(k){var Me=de([]),Le={};switch(_e){case"default":Le={affinity:Go(e,Me)};break;case"nodeSelector":Le={affinity:qo(Ie,Fe,e,Me)}}var De=ge.split(":")[1],Be={name:e,namespace:o,access_key:"",secret_key:"",access_keys:[],secret_keys:[],enable_tls:Oe&&pe,enable_console:!0,enable_prometheus:!0,service_name:"",image:a,console_image:n,expose_minio:u,expose_console:m,pools:[Object(j.a)({name:Me,servers:fe.nodes,volumes_per_server:fe.disks,volume_configuration:{size:fe.pvSize,storage_class_name:t},resources:{requests:{memory:xe.request},limits:{memory:xe.limit}}},Le)],erasureCodingParity:parseInt(De,10)};c&&(Be=Object(j.a)(Object(j.a)({},Be),{},{image_registry:{registry:s,username:d,password:b}})),Be=ve?Object(j.a)(Object(j.a)({},Be),{},{logSearchConfiguration:{storageClass:Ce,storageSize:parseInt(Se),image:ke,postgres_image:Ne}}):Object(j.a)(Object(j.a)({},Be),{},{logSearchConfiguration:{image:ke,postgres_image:Ne}}),Be=ye?Object(j.a)(Object(j.a)({},Be),{},{prometheusConfiguration:{storageClass:Ee,storageSize:parseInt(Ae),image:Te}}):Object(j.a)(Object(j.a)({},Be),{},{prometheusConfiguration:{image:Te}});var Re=null,Pe=null,ze=null;if(F.length>0&&(ze={ca_certificates:F.map((function(e){return e.encoded_cert})).filter((function(e){return e}))}),Oe&&I.length>0&&(Re={minio:I.map((function(e){return{crt:e.encoded_cert,key:e.encoded_key}})).filter((function(e){return e.crt&&e.key}))}),Oe&&""!==M.encoded_cert&&""!==M.encoded_key&&(Pe={console:{crt:M.encoded_cert,key:M.encoded_key}}),(Re||Pe||ze)&&(Be=Object(j.a)(Object(j.a)({},Be),{},{tls:Object(j.a)(Object(j.a)(Object(j.a)({},Re),Pe),ze)})),z){var Ke={};switch(K){case"gemalto":var We={};""!==P.encoded_cert&&(We={ca:P.encoded_cert}),Ke={gemalto:{keysecure:{endpoint:W,credentials:{token:U,domain:V,retry:parseInt(G)},tls:Object(j.a)({},We)}}};break;case"aws":Ke={aws:{secretsmanager:{endpoint:q,region:H,kmskey:Y,credentials:{accesskey:Q,secretkey:J,token:$}}}};break;case"gcp":Ke={gcp:{secretmanager:{project_id:se,endpoint:le,credentials:{client_email:be,client_id:ue,private_key_id:je,private_key:me}}}};break;case"vault":var Ue=null,Ve=null;""!==B.encoded_key&&""!==B.encoded_cert&&(Ue={key:B.encoded_key,crt:B.encoded_cert}),""!==R.encoded_cert&&(Ve={ca:R.encoded_cert});var Ge=null;(Ue||R)&&(Ge={tls:Object(j.a)(Object(j.a)({},Ue),Ve)}),Ke={vault:Object(j.a)(Object(j.a)({endpoint:X,engine:ee,namespace:te,prefix:ae,approle:{engine:ne,id:ce,secret:ie,retry:parseInt(re)}},Ge),{},{status:{ping:parseInt(oe)}})}}var qe={},He={};""!==D.encoded_key&&""!==D.encoded_cert&&(He={client:{key:D.encoded_key,crt:D.encoded_cert}}),""!==L.encoded_key&&""!==L.encoded_cert&&(qe={server:{key:L.encoded_key,crt:L.encoded_cert}}),Be=Object(j.a)(Object(j.a)({},Be),{},{encryption:Object(j.a)(Object(j.a)(Object(j.a)({image:we},He),qe),Ke)})}var Ye={};switch(h){case"Built-in":for(var Qe=[],Ze=0;Ze=0}));Object(c.useEffect)((function(){if(k){he.invoke("GET","/api/v1/tenants").then((function(e){if(null!==e){var t=[];null!==e.tenants&&(t=e.tenants);for(var a=0;a0&&A(t[0].value)})).catch((function(e){console.error(e)}))}),[t]),Object(n.jsx)(ga,{onClose:function(){return r(!1)},modalOpen:i,title:"Add Pool",children:Object(n.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d(!0);var a=de(t.pools),n=Go(t.name,a),c={name:a,servers:m,volumes_per_server:k,volume_configuration:{size:1073741824*f,storage_class_name:E,labels:null},affinity:n};he.invoke("POST","/api/v1/namespaces/".concat(t.namespace,"/tenants/").concat(t.name,"/pools"),c).then((function(){d(!1),r(!0)})).catch((function(e){d(!1)}))},children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"number_of_nodes",name:"number_of_nodes",type:"number",onChange:function(e){h(parseInt(e.target.value))},label:"Number o Nodes",value:m.toString(10)})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"pool_size",name:"pool_size",type:"number",onChange:function(e){v(parseInt(e.target.value))},label:"Volume Size (Gi)",value:f.toString(10)})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"volumes_per_sever",name:"volumes_per_sever",type:"number",onChange:function(e){w(parseInt(e.target.value))},label:"Volumes per Server",value:k.toString(10)})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{id:"storage_class",name:"storage_class",onChange:function(e){A(e.target.value)},label:"Storage Class",value:E,options:F,disabled:F.length<1})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:a.bottomContainer,children:[Object(n.jsxs)("div",{className:a.factorElements,children:[Object(n.jsxs)("div",{children:[Object(n.jsx)("div",{className:a.sizeNumber,children:ce(L.toString(10))}),Object(n.jsx)("div",{className:a.sizeDescription,children:"Instance Capacity"})]}),Object(n.jsxs)("div",{children:[Object(n.jsx)("div",{className:a.sizeNumber,children:ce(D.toString(10))}),Object(n.jsx)("div",{className:a.sizeDescription,children:"Total Capacity"})]})]}),Object(n.jsx)("div",{className:a.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:l,children:"Save"})})]}),l&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})]})})})),Vs=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({buttonContainer:{textAlign:"right"},multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"},sizeFactorContainer:{marginLeft:8}},we))}))((function(e){var t=e.classes,a=e.open,r=e.closeModalAndRefresh,o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(0),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(""),O=Object(u.a)(p,2),f=O[0],v=O[1],S=Object(c.useState)(""),C=Object(u.a)(S,2),k=C[0],w=C[1],N=Object(c.useState)(""),T=Object(u.a)(N,2),E=T[0],A=T[1],_=Object(c.useState)(""),I=Object(u.a)(_,2),F=I[0],M=I[1],L=Object(c.useState)(""),D=Object(u.a)(L,2),B=D[0],R=D[1],P=Object(c.useState)(""),z=Object(u.a)(P,2),K=z[0],W=z[1],U=Object(c.useState)(""),V=Object(u.a)(U,2),G=V[0],q=V[1];return Object(n.jsx)(ga,{modalOpen:a,title:"Add Pool",onClose:function(){r(!1)},children:Object(n.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d(!0)},children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{label:"Source Bucket",options:[],onChange:function(e){v(e.target.value)},value:f,name:"source_bucket",id:"source_bucket"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(tn.a,{value:m,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){h(t)},"aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(n.jsx)(an.a,{label:"Local Cluster"}),Object(n.jsx)(an.a,{label:"Remote Cluster"})]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),0===m&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{label:"Cluster",options:[],onChange:function(e){w(e.target.value)},value:k,name:"cluster",id:"cluster"})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Na,{label:"Destination Bucket",options:[],onChange:function(e){A(e.target.value)},value:E,name:"destination_bucket",id:"destination_bucket"})})]}),1===m&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"address",name:"address",onChange:function(e){M(e.target.value)},label:"Address",value:F})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"bucket",name:"bucket",onChange:function(e){R(e.target.value)},label:"Bucket",value:B})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"accessKey",name:"accessKey",onChange:function(e){W(e.target.value)},label:"Access Key",value:K})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"secretKey",name:"secretKey",onChange:function(e){q(e.target.value)},label:"Secret Key",value:G})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:l,children:"Save"})}),l&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})})),Gs=Object(N.a)((function(e){return{root:{height:10,borderRadius:5},colorPrimary:{backgroundColor:"#F4F4F4"},bar:{borderRadius:5,backgroundColor:"#081C42"},padChart:{padding:"5px"}}}))(y.a),qs=Object(N.a)((function(e){return Object(k.a)({paperContainer:{padding:15},allValue:{fontSize:16,fontWeight:700,marginBottom:8},currentUsage:{fontSize:12,marginTop:8},centerItem:{textAlign:"center"}})}))((function(e){var t=e.classes,a=e.maxValue,c=e.currValue,r=e.label,o=e.renderFunction,s=e.loading,l=e.error,d=100*c/a;return Object(n.jsxs)(i.a.Fragment,{children:[s&&Object(n.jsx)("div",{className:t.padChart,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:t.centerItem,children:Object(n.jsx)(S.a,{color:"primary",size:40,variant:"indeterminate"})})}),s?null:""!==l?Object(n.jsx)(To,{errorMessage:l,withBreak:!1}):Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.allValue,children:[r," ",o?o(a.toString()):a]}),Object(n.jsx)(Gs,{variant:"determinate",value:d}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.currentUsage,children:["Used:"," ",o?o(c.toString()):c]})]})]})})),Hs=Object(s.b)(null,{setModalErrorSnackMessage:q}),Ys=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({buttonContainer:{textAlign:"right"}},we))}))(Hs((function(e){var t=e.open,a=e.closeModalAndRefresh,i=e.namespace,r=e.idTenant,o=e.setModalErrorSnackMessage,s=e.classes,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],m=d[1],h=Object(c.useState)(""),p=Object(u.a)(h,2),O=p[0],f=p[1],v=Object(c.useState)(""),y=Object(u.a)(v,2),S=y[0],C=y[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(""),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(""),M=Object(u.a)(F,2),L=M[0],D=M[1],B=Object(c.useState)(""),R=Object(u.a)(B,2),P=R[0],z=R[1],K=Object(c.useState)(!0),W=Object(u.a)(K,2),U=W[0],V=W[1],G=Object(c.useState)(!0),q=Object(u.a)(G,2),H=q[0],Y=q[1],Q=Object(c.useCallback)((function(e){var t=new RegExp("^$|^((.*?)/(.*?):(.+))$");switch(e){case"consoleImage":Y(t.test(S));break;case"minioImage":V(t.test(O))}}),[S,O]);Object(c.useEffect)((function(){Q("minioImage")}),[O,Q]),Object(c.useEffect)((function(){Q("consoleImage")}),[S,Q]);return Object(n.jsx)(ga,{title:"Update MinIO Version",modalOpen:t,onClose:function(){a(!1)},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:s.formScrollable,children:[Object(n.jsx)("span",{children:"Please enter the MinIO image from dockerhub to use. If blank, then latest build will be used."}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:O,label:"MinIO's Image",id:"minioImage",name:"minioImage",placeholder:"E.g. minio/minio:RELEASE.2020-05-08T02-40-49Z",onChange:function(e){f(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:S,label:"Console's Image",id:"consoleImage",name:"consoleImage",placeholder:"E.g. minio/console:v0.3.13",onChange:function(e){C(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"imageRegistry",id:"setImageRegistry",name:"setImageRegistry",checked:N,onChange:function(e){T(!N)},label:"Set Custom Image Registry",indicatorLabels:["Yes","No"]})}),N&&Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:_,label:"Endpoint",id:"imageRegistry",name:"imageRegistry",placeholder:"E.g. https://index.docker.io/v1/",onChange:function(e){I(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:L,label:"Username",id:"imageRegistryUsername",name:"imageRegistryUsername",placeholder:"Enter image registry username",onChange:function(e){D(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:P,label:"Password",id:"imageRegistryPassword",name:"imageRegistryPassword",placeholder:"Enter image registry password",onChange:function(e){z(e.target.value)}})})]})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:s.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:s.clearButton,onClick:function(){f(""),C(""),T(!1),I(""),D(""),z("")},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:!U||!H||N&&(""===_.trim()||""===L.trim()||""===P.trim())||b,onClick:function(){m(!0);var e={image:O,console_image:S,enable_prometheus:!0};if(N){var t={image_registry:{registry:_,username:L,password:P}};e=Object(j.a)(Object(j.a)({},e),t)}he.invoke("PUT","/api/v1/namespaces/".concat(i,"/tenants/").concat(r),e).then((function(){m(!1),a(!0)})).catch((function(e){o(e),m(!1)}))},children:"Save"})]})]})})}))),Qs=a(436),Zs=a.n(Qs),Js={setModalErrorSnackMessage:q},$s=Object(s.b)(null,Js),Xs=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)({jsonPolicyEditor:{minHeight:400,width:"100%"},buttonContainer:{textAlign:"right"},errorState:{color:"#b53b4b",fontSize:14,fontWeight:"bold"}},we),ke))}))($s((function(e){var t=e.classes,a=e.open,i=e.closeModalAndRefresh,r=e.tenant,o=e.namespace,s=e.setModalErrorSnackMessage,l=Object(c.useState)(!1),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(!1),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(""),v=Object(u.a)(f,2),S=v[0],C=v[1],k=Object(c.useState)(""),w=Object(u.a)(k,2),N=w[0],T=w[1];Object(c.useEffect)((function(){he.invoke("GET","/api/v1/namespaces/".concat(o,"/tenants/").concat(r,"/yaml")).then((function(e){O(!1),C(e.yaml)})).catch((function(e){O(!1),s(e)}))}),[r,o,s]),Object(c.useEffect)((function(){}),[]);var E=""!==S.trim();return Object(n.jsxs)(ga,{modalOpen:a,onClose:function(){i(!1)},title:"YAML",children:[p&&Object(n.jsx)(y.a,{}),""!==N&&Object(n.jsx)("div",{className:t.errorState,children:N}),!p&&Object(n.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),b||(j(!0),T(""),he.invoke("PUT","/api/v1/namespaces/".concat(o,"/tenants/").concat(r,"/yaml"),{yaml:S}).then((function(e){j(!1),i(!0),T("")})).catch((function(e){j(!1),console.log(e),T(e)})))},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(Sn,{label:"Tenant Specification",value:S,mode:"yaml",onBeforeChange:function(e,t,a){C(a)}})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:b||!E,children:"Save"})}),b&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]})})]})}))),el=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({paperContainer:{padding:"15px 15px 15px 50px"},licenseInfoValue:{textTransform:"none",fontSize:14,fontWeight:"bold"},licenseContainer:{position:"relative",padding:"20px 52px 0px 28px",background:"#032F51",boxShadow:"0px 3px 7px #00000014","& h2":{color:"#FFF",marginBottom:67},"& a":{textDecoration:"none"},"& h3":{color:"#FFFFFF",marginBottom:"30px",fontWeight:"bold"},"& h6":{color:"#FFFFFF !important"}},licenseInfo:{color:"#FFFFFF",position:"relative"},licenseInfoTitle:{textTransform:"none",color:"#BFBFBF",fontSize:11},verifiedIcon:{width:96,position:"absolute",right:0,bottom:29},noUnderLine:{textDecoration:"none"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.tenant,c=e.loadingActivateProduct,r=e.loadingLicenseInfo,o=e.licenseInfo,s=e.activateProduct;return Object(n.jsx)(C.a,{className:a&&a.subnet_license?t.licenseContainer:"",children:a&&a.subnet_license?Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{container:!0,className:t.licenseInfo,children:[Object(n.jsxs)(x.a,{item:!0,xs:6,children:[Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"License"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:"Commercial License"}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Organization"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:a.subnet_license.organization}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Registered Capacity"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:ce((1099511627776*a.subnet_license.storage_capacity).toString(10))}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Expiry Date"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:Object(n.jsx)(ct.a,{format:"YYYY-MM-DD",children:a.subnet_license.expires_at})})]}),Object(n.jsxs)(x.a,{item:!0,xs:6,children:[Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Subscription Plan"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:a.subnet_license.plan}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Requester"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:a.subnet_license.email})]}),Object(n.jsx)("img",{className:t.verifiedIcon,src:"/verified.svg",alt:"verified"})]})}):!r&&Object(n.jsxs)(x.a,{className:t.paperContainer,children:[!o&&Object(n.jsx)(Vt.a,{to:"/license",onClick:function(e){e.stopPropagation()},className:t.noUnderLine,children:Object(n.jsx)(g.a,{className:t.licenseButton,variant:"contained",color:"primary",children:"Activate Product"})}),o&&a&&Object(n.jsx)(g.a,{disabled:c,className:t.licenseButton,variant:"contained",color:"primary",onClick:function(){return s(a.namespace,a.name)},children:"Attach License"})]})})})),tl=Object(s.b)(null,{setErrorSnackMessage:V}),al=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({buttonContainer:{textAlign:"right"},multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"},sizeFactorContainer:{marginLeft:8},containerHeader:{display:"flex",justifyContent:"space-between"},paperContainer:{padding:"15px 15px 15px 50px"},infoGrid:{display:"grid",gridTemplateColumns:"auto auto auto auto",gridGap:8,"& div":{display:"flex",alignItems:"center"},"& div:nth-child(odd)":{justifyContent:"flex-end",fontWeight:700},"& div:nth-child(2n)":{paddingRight:35}},masterActions:{width:"25%",minWidth:"120px","& div":{margin:"5px 0px"}},updateButton:{backgroundColor:"transparent",border:0,padding:"0 6px",cursor:"pointer","&:focus, &:active":{outline:"none"},"& svg":{height:12}},poolLabel:{color:"#666666"},breadcrumLink:{textDecoration:"none",color:"black"}},we),Ie),Ve),Fe),Ge),{},{actionsTray:Object(j.a)(Object(j.a)({},Ie.actionsTray),{},{padding:"15px 0 0"})},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(tl((function(e){var t=e.classes,a=e.match,r=e.setErrorSnackMessage,o=Object(c.useState)(0),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(0),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(0),O=Object(u.a)(p,2),v=O[0],y=O[1],S=Object(c.useState)([]),k=Object(u.a)(S,2),w=k[0],N=k[1],T=Object(c.useState)([]),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(0),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(0),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)(!1),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Object(c.useState)(!1),G=Object(u.a)(V,2),q=G[0],H=G[1],Y=Object(c.useState)(!1),Q=Object(u.a)(Y,2),J=Q[0],$=Q[1],X=Object(c.useState)(null),ee=Object(u.a)(X,2),te=ee[0],ae=ee[1],ne=Object(c.useState)(!0),ie=Object(u.a)(ne,2),re=ie[0],oe=ie[1],se=Object(c.useState)(""),le=Object(u.a)(se,2),de=le[0],ue=le[1],je=Object(c.useState)(0),me=Object(u.a)(je,2),pe=me[0],Oe=me[1],ge=Object(c.useState)(!1),fe=Object(u.a)(ge,2),xe=fe[0],ve=fe[1],ye=Object(c.useState)(!1),Se=Object(u.a)(ye,2),Ce=Se[0],ke=Se[1],we=Object(c.useState)(),Ne=Object(u.a)(we,2),Te=Ne[0],Ee=Ne[1],Ae=Object(c.useState)(!0),_e=Object(u.a)(Ae,2),Ie=_e[0],Fe=_e[1],Me=Object(c.useState)(!1),Le=Object(u.a)(Me,2),De=Le[0],Be=Le[1],Re=Object(c.useState)(!1),Pe=Object(u.a)(Re,2),ze=Pe[0],Ke=Pe[1],We=Object(c.useState)(!1),Ue=Object(u.a)(We,2),Ve=Ue[0],Ge=Ue[1],qe=Object(c.useState)(!1),He=Object(u.a)(qe,2),Ye=He[0],Qe=He[1],Ze=Object(c.useState)(!1),Je=Object(u.a)(Ze,2),Xe=Je[0],tt=Je[1],at=Object(c.useState)(!1),nt=Object(u.a)(at,2),ct=nt[0],it=nt[1],rt=a.params.tenantName,st=a.params.tenantNamespace,lt=function(){he.invoke("GET","/api/v1/namespaces/".concat(st,"/tenants/").concat(rt)).then((function(e){var t,a=e.pools?e.pools:[],n=0,c=0,i=0,r=Object(rr.a)(a);try{for(r.s();!(t=r.n()).done;){var o=t.value,s=o.volumes_per_server*o.servers*o.volume_configuration.size;o.label="pool-".concat(i),void 0!==o.name&&""!==o.name||(o.name=o.label),o.capacity=ce(s+""),o.volumes=o.servers*o.volumes_per_server,n+=o.servers,c+=o.volumes,i+=1}}catch(l){r.e(l)}finally{r.f()}h(e.total_size||0),y(a.length),P(c),L(n),N(a),Ke(e.logEnabled),Ge(e.monitoringEnabled),Qe(e.encryptionEnabled),tt(e.idpAdEnabled),it(e.idpOicEnabled),ae(e)})).catch((function(e){r(e)}))},dt=function(){he.invoke("GET","/api/v1/namespaces/".concat(st,"/tenants/").concat(rt,"/usage")).then((function(e){var t=Z()(e,"disk_used","0");Oe(parseInt(t)),ue(""),oe(!1)})).catch((function(e){ue(e),Oe(0),oe(!1)}))};Object(c.useEffect)((function(){lt(),dt(),Fe(!0),he.invoke("GET","/api/v1/subscription/info").then((function(e){Ee(e),Fe(!1)})).catch((function(e){Fe(!1)})),he.invoke("GET","/api/v1/namespaces/".concat(st,"/tenants/").concat(rt,"/pods")).then((function(e){for(var t=0;t ".concat(a.params.tenantName),Object(n.jsx)(Mt.a,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:function(e){mt(e.currentTarget)},children:Object(n.jsx)(Zs.a,{})}),Object(n.jsx)(Ws.a,{id:"long-menu",anchorEl:jt,keepMounted:!0,open:Boolean(jt),onClose:ht,children:Object(n.jsx)(ka.a,{onClick:ht,children:"Edit YAML"},"yaml")})]})}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.container}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)(tn.a,{value:l,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){d(t)},"aria-label":"tenant-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(n.jsx)(an.a,{label:"Summary"}),Object(n.jsx)(an.a,{label:"Pools"}),Object(n.jsx)(an.a,{label:"Pods"}),Object(n.jsx)(an.a,{label:"License"})]})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[0===l&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("br",{}),Object(n.jsx)(C.a,{className:t.paperContainer,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:8,children:Object(n.jsxs)("table",{width:"100%",children:[Object(n.jsx)("tr",{children:Object(n.jsxs)("td",{colSpan:4,children:[Object(n.jsx)("h2",{children:"Details"}),Object(n.jsx)("hr",{className:t.hrClass})]})}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Capacity:"}),Object(n.jsx)("td",{children:ce(m.toString(10))}),Object(n.jsx)("td",{children:"MinIO:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,onClick:function(){ve(!0)},children:te?te.image:""})})]}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Clusters:"}),Object(n.jsx)("td",{children:v}),Object(n.jsx)("td",{children:"Console:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,onClick:function(){ve(!0)},children:te?te.console_image:""})})]}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Instances:"}),Object(n.jsx)("td",{children:M}),Object(n.jsx)("td",{children:"Volumes:"}),Object(n.jsx)("td",{children:R})]}),(null===te||void 0===te?void 0:te.endpoints)&&Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Endpoint:"}),Object(n.jsx)("td",{children:Object(n.jsx)("a",{href:null===te||void 0===te?void 0:te.endpoints.minio,target:"_blank",rel:"noopener noreferrer",children:null===te||void 0===te?void 0:te.endpoints.minio})}),Object(n.jsx)("td",{children:"Console:"}),Object(n.jsx)("td",{children:Object(n.jsx)("a",{href:null===te||void 0===te?void 0:te.endpoints.console,target:"_blank",rel:"noopener noreferrer",children:null===te||void 0===te?void 0:te.endpoints.console})})]}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"State:"}),Object(n.jsx)("td",{colSpan:3,children:null===te||void 0===te?void 0:te.currentState})]})]})}),Object(n.jsx)(x.a,{item:!0,xs:4,children:Object(n.jsx)(qs,{currValue:pe,maxValue:te?te.total_size:0,label:"Storage",renderFunction:ce,error:de,loading:re})})]})}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(C.a,{className:t.paperContainer,children:Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsxs)("table",{width:"100%",children:[Object(n.jsx)("tr",{children:Object(n.jsxs)("td",{colSpan:4,children:[Object(n.jsx)("h2",{children:"Features"}),Object(n.jsx)("hr",{className:t.hrClass})]})}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Logs:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,children:ze?"Enabled":"Disabled"})}),Object(n.jsx)("td",{children:"Monitoring:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,children:Ve?"Enabled":"Disabled"})})]}),Object(n.jsxs)("tr",{children:[Object(n.jsx)("td",{children:"Encryption:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,children:Ye?"Enabled":"Disabled"})}),Object(n.jsx)("td",{}),Object(n.jsx)("td",{})]}),Object(n.jsxs)("tr",{children:[Xe||!Xe&&!ct&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("td",{children:"Active Directory:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,children:Xe?"Enabled":"Disabled"})})]}),ct||!ct&&!Xe&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("td",{children:"OpenID:"}),Object(n.jsx)("td",{children:Object(n.jsx)(g.a,{color:"primary",className:t.anchorButton,children:ct?"Enabled":"Disabled"})})]})]})]})})})})]}),1===l&&Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Filter",className:t.searchField,id:"search-resource",label:"",onChange:function(e){},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){U(!0)},children:"Expand Tenant"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:[{type:"delete",onClick:function(e){console.log(e)},sendOnlyId:!0}],columns:[{label:"Name",elementKey:"name"},{label:"Capacity",elementKey:"capacity"},{label:"# of Instances",elementKey:"servers"},{label:"# of Drives",elementKey:"volumes"}],isLoading:!1,records:w,entityName:"Servers",idField:"name"})})]}),2===l&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("br",{}),Object(n.jsx)(ua,{columns:[{label:"Name",elementKey:"name"},{label:"Status",elementKey:"status"},{label:"Age",elementKey:"time"},{label:"Pod IP",elementKey:"podIP"},{label:"Restarts",elementKey:"restarts",renderFunction:function(e){return null!=e?e:0}},{label:"Node",elementKey:"node"}],isLoading:!1,records:A,entityName:"Servers",idField:"name"})]}),3===l&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("br",{}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(el,{tenant:te,loadingLicenseInfo:Ie,loadingActivateProduct:De,licenseInfo:Te,activateProduct:function(e,t){De||(Be(!0),he.invoke("POST","/api/v1/subscription/namespaces/".concat(e,"/tenants/").concat(t,"/activate"),{}).then((function(){Be(!1),lt()})).catch((function(e){Be(!1),r(e)})))}})})})]})]})]})]})}))),nl="OBJECT_BROWSER/ADD_ROUTE",cl="OBJECT_BROWSER/RESET_ROUTES_LIST",il="OBJECT_BROWSER/REMOVE_ROUTE_LEVEL",rl="OBJECT_BROWSER/SET_ALL_ROUTES",ol="OBJECT_BROWSER/CREATE_FOLDER",sl="OBJECT_BROWSER/SET_LAST_AS_FILE",ll="OBJECT_BROWSER/DOWNLOAD_FILE_LOADER",dl="OBJECT_BROWSER/DOWNLOADED_FILE",bl=function(e,t,a){return{type:nl,route:e,label:t,routeType:a}},ul=function(e){return{type:il,toRoute:e}},jl=function(e){return{type:rl,currentRoute:e}},ml=function(e){return{type:ll,path:e}},hl=function(e){return{type:dl,path:e}},pl={removeRouteLevel:ul},Ol=Object(s.b)((function(e){var t=e.objectBrowser;return{objectsList:Z()(t,"routesList",[])}}),pl)(Object(N.a)((function(e){return Object(k.a)(Object(j.a)({},Le))}))((function(e){var t=e.classes,a=e.objectsList,c=e.removeRouteLevel,r=a.map((function(e,t){return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(Vt.a,{to:e.route,onClick:function(){c(e.route)},children:e.label}),t0?a.slice(-1)[0].label:""})}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.breadcrumbs,children:r})]})}))),gl={addRoute:bl,resetRoutesList:function(e){return{type:cl,reset:e}},displayErrorMessage:V},fl=Object(s.b)(null,gl),xl=Object(l.g)(fl(Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},usedSpaceCol:{width:150,textAlign:"right"},subTitleLabel:{alignItems:"center",display:"flex"},bucketName:{display:"flex",alignItems:"center"},iconBucket:{backgroundImage:"url(/images/ob_bucket_clear.svg)",backgroundRepeat:"no-repeat",backgroundPosition:"center center",width:16,height:40,marginRight:10},"@global":{".rowLine:hover .iconBucketElm":{backgroundImage:"url(/images/ob_bucket_filled.svg)"}},browsePaper:{height:"calc(100vh - 280px)"}},Ie),Fe),Le))}))((function(e){var t=e.classes,a=e.match,i=e.addRoute,r=e.resetRoutesList,o=e.displayErrorMessage,s=Object(c.useState)(!0),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)([]),m=Object(u.a)(j,2),h=m[0],p=m[1],O=Object(c.useState)(!1),v=Object(u.a)(O,2),y=v[0],S=v[1],C=Object(c.useState)(""),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(!0),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(!1),F=Object(u.a)(I,2),M=F[0],L=F[1];Object(c.useEffect)((function(){A&&he.invoke("POST","/api/v1/has-permission",{actions:[{id:"createBucket",action:"s3:CreateBucket"}]}).then((function(e){var t=e.permissions.filter((function(e){return"createBucket"===e.id})).pop();t&&t.can?L(!0):L(!1),_(!1)})).catch((function(e){_(!1),V(e)}))}),[A]),Object(c.useEffect)((function(){r(!0)}),[a,r]),Object(c.useEffect)((function(){d&&he.invoke("GET","/api/v1/buckets").then((function(e){b(!1),p(e.buckets||[])})).catch((function(e){b(!1),o(e)}))}),[d,o]);var D=h.filter((function(e){return""===w||e.name.indexOf(w)>=0}));return Object(n.jsxs)(c.Fragment,{children:[y&&Object(n.jsx)(Ra,{open:y,closeModalAndRefresh:function(e){S(!1),e&&b(!0)}}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.obTitleSection,children:Object(n.jsx)("div",{children:Object(n.jsx)(Ol,{})})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Buckets",className:t.searchField,id:"search-resource",label:"",onChange:function(e){N(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(Mt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){b(!0)},children:Object(n.jsx)(xo.a,{})}),M&&Object(n.jsx)("div",{children:Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){S(!0)},children:"Create Bucket"})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:[{type:"view",sendOnlyId:!0,onClick:function(e){var t=Z()(a,"url","/object-browser"),n="".concat(t,"/").concat(e);i(n,e,"path")}}],columns:[{label:"Name",elementKey:"name",renderFunction:function(e){return Object(n.jsxs)("div",{className:t.bucketName,children:[Object(n.jsx)("div",{className:"".concat(t.iconBucket," iconBucketElm")}),Object(n.jsx)("span",{children:e})]})}},{label:"Used Space",elementKey:"size",renderFunction:ce,globalClass:t.usedSpaceCol,rowClass:t.usedSpaceCol,width:100,contentTextAlign:"right",headerTextAlign:"right"}],isLoading:d,records:D,entityName:"Buckets",idField:"name",customPaperHeight:t.browsePaper})})]})]})})))),vl=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({watchList:{background:"white",maxHeight:"400",overflow:"auto","& ul":{margin:"4",padding:"0"},"& ul li":{listStyle:"none",margin:"0",padding:"0",borderBottom:"1px solid #dedede"}},actionsTray:{textAlign:"right","& button":{marginLeft:10}},inputField:{background:"#FFFFFF",padding:12,borderRadius:5,marginLeft:10,boxShadow:"0px 3px 6px #00000012"},fieldContainer:{background:"#FFFFFF",padding:0,borderRadius:5,marginLeft:10,textAlign:"left",minWidth:"206",boxShadow:"0px 3px 6px #00000012"},lastElementWPadding:{paddingRight:"78"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.match,a=e.classes,c=Z()(t,"url","");return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(Ua,{label:"Object Browser"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:a.container,children:"/object-browser"===c&&Object(n.jsx)(xl,{})})})]})})),yl={setErrorSnackMessage:V},Sl=Object(s.b)(null,yl)((function(e){var t=e.closeDeleteModalAndRefresh,a=e.deleteOpen,i=e.selectedBucket,r=e.selectedObject,o=e.setErrorSnackMessage,s=Object(c.useState)(!1),l=Object(u.a)(s,2),d=l[0],b=l[1];return Object(n.jsxs)(ja.a,{open:a,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete"}),Object(n.jsxs)(ha.a,{children:[d&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete: ",Object(n.jsx)("b",{children:r}),"?"," "]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1)},color:"primary",disabled:d,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){!function(){if(!d){var e=!1;r.endsWith("/")&&(e=!0),b(!0),he.invoke("DELETE","/api/v1/buckets/".concat(i,"/objects?path=").concat(r,"&recursive=").concat(e)).then((function(){b(!1),t(!0)})).catch((function(e){b(!1),o(e)}))}}()},color:"secondary",disabled:d,children:"Delete"})]})]})})),Cl=a(953),kl={createFolder:function(e){return{type:ol,newRoute:e}}},wl=Object(s.b)(null,kl)(Object(N.a)((function(e){return Object(k.a)(Object(j.a)({buttonContainer:{textAlign:"right"},pathLabel:{marginTop:0,marginBottom:32}},we))}))((function(e){var t=e.modalOpen,a=e.folderName,r=e.onClose,o=e.createFolder,s=e.classes,l=Object(c.useState)(""),d=Object(u.a)(l,2),b=d[0],j=d[1],m=a.split("/").slice(2).join("/");return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(ga,{modalOpen:t,title:"Add Folder",onClose:r,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)("h3",{className:s.pathLabel,children:["Current Path: ",m,"/"]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:b,label:"Folder Path",id:"folderPath",name:"folderPath",placeholder:"Enter Folder Path",onChange:function(e){j(e.target.value)}})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:s.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:s.clearButton,onClick:function(){j("")},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:""===b.trim(),onClick:function(){o(b),r()},children:"Save"})]})]})})})}))),Nl=function(){return Object(n.jsx)(it.a,{children:Object(n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 12.996",children:Object(n.jsxs)("g",{transform:"translate(-63.686 -70.783)",children:[Object(n.jsx)("path",{className:"a",d:"M74.736,79.879v1.95h-9.1v-1.95h-1.95v3.9h13v-3.9Z"}),Object(n.jsx)("path",{className:"a",d:"M69.211,80.533h1.95V73.861h1.525l-2.5-3.078-2.5,3.078h1.525Z"})]})})})},Tl=a(437),El=function(e,t,a,n,c){var i=document.createElement("a");document.body.appendChild(i);var r=new XMLHttpRequest,o=t.split("/"),s=o[o.length-1],l="/api/v1/buckets/".concat(e,"/objects/download?prefix=").concat(t);Object(Tl.isNullOrUndefined)(a)||"null"===a||(l=l.concat("&version_id=".concat(a))),r.open("GET",l,!0),r.responseType="blob",r.onload=function(r){if(200===this.status){var o=new Blob([this.response],{type:"octet/stream"}),l=window.URL.createObjectURL(o);i.href=l,i.download=s,i.click(),window.URL.revokeObjectURL(l),i.remove(),n&&n("".concat(e,"/").concat(t).concat(c?"-".concat(a):""))}},r.send()},Al={backgroundRepeat:"no-repeat",backgroundPosition:"center center",width:16,minWidth:16,height:40,marginRight:10};var _l=Object(n.jsx)(v.a,{component:"h3",children:"Loading..."}),Il={addRoute:bl,setAllRoutes:jl,setLastAsFile:function(){return{type:sl}},setLoadingProgress:function(e){return{type:F,loadingProgress:e}},setSnackBarMessage:U,setErrorSnackMessage:V,fileIsBeingPrepared:ml,fileDownloadStarted:hl},Fl=Object(s.b)((function(e){var t=e.objectBrowser;return{routesList:Z()(t,"routesList",[]),downloadingFiles:Z()(t,"downloadingFiles",[])}}),Il),Ml=Object(l.g)(Fl(Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},fileName:{display:"flex",alignItems:"center"},fileNameText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},iconFolder:Object(j.a)({backgroundImage:"url(/images/ob_folder_clear.svg)"},Al),iconFile:Object(j.a)({backgroundImage:"url(/images/ob_file_clear.svg)"},Al),buttonsContainer:{"& .MuiButtonBase-root":{marginLeft:10}},browsePaper:{height:"calc(100vh - 280px)"},"@global":{".rowLine:hover .iconFileElm":{backgroundImage:"url(/images/ob_file_filled.svg)"},".rowLine:hover .iconFolderElm":{backgroundImage:"url(/images/ob_folder_filled.svg)"}},listButton:{marginLeft:"10px"}},Ie),Fe),Le),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.match,r=e.addRoute,o=e.setAllRoutes,s=e.routesList,l=e.downloadingFiles,d=e.setLastAsFile,b=e.setLoadingProgress,j=e.setSnackBarMessage,m=e.setErrorSnackMessage,h=e.fileIsBeingPrepared,p=e.fileDownloadStarted,O=Object(c.useState)([]),y=Object(u.a)(O,2),S=y[0],C=y[1],k=Object(c.useState)(!0),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(!1),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(!1),M=Object(u.a)(F,2),L=M[0],D=M[1],B=Object(c.useState)(""),R=Object(u.a)(B,2),P=R[0],z=R[1],K=Object(c.useState)(""),W=Object(u.a)(K,2),U=W[0],V=W[1],G=Object(c.useState)(""),q=Object(u.a)(G,2),H=q[0],Y=q[1],Q=Object(c.useState)(0),J=Object(u.a)(Q,2),$=J[0],X=J[1],ee=Object(c.useState)(_l),te=Object(u.a)(ee,2),ae=te[0],ne=te[1];!function(e,t){var a=Object(c.useRef)(null);Object(c.useEffect)((function(){a.current=e}),[e]),Object(c.useEffect)((function(){if(null!==t){var e=setInterval((function(){void 0!==a&&a.current&&a.current()}),t);return function(){return clearInterval(e)}}}),[t])}((function(){N&&function(){var e=Date.now()-$;e/1e3>=6?ne(Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(v.a,{component:"h3",children:["This operation is taking longer than expected... (",Math.ceil(e/1e3),"s)"]})})):e/1e3>=3&&ne(Object(n.jsx)(v.a,{component:"h3",children:"This operation is taking longer than expected..."}))}()}),1e3),Object(c.useEffect)((function(){var e=a.params.bucket,t=a.params[0];if(N){var n="";t&&(n="?prefix=".concat(t,"/"));var c=Date.now()+0;X(c),ne(_l),he.invoke("GET","/api/v1/buckets/".concat(e,"/objects").concat(n)).then((function(t){V(e);var c=t.objects||[],i=[],r=[];c.forEach((function(e){e.name.endsWith("/")?i.push(e):r.push(e)}));var o=[].concat(i,r);C(o),t.objects||""===n?T(!1):function(){var e=a.params.bucket,t=a.params[0];he.invoke("GET","/api/v1/buckets/".concat(e,"/objects?prefix=").concat(t)).then((function(e){null!==e.objects?d():T(!1)})).catch((function(e){T(!1),m(e)}))}()})).catch((function(e){T(!1),m(e)}))}}),[N,a,d,m]),Object(c.useEffect)((function(){var e=Z()(a,"url","/object-browser");e!==s[s.length-1].route&&o(e)}),[a,s,o]),Object(c.useEffect)((function(){T(!0)}),[s,T]);var ie=function(e){p(e)},re=function(e){var t=s[s.length-1].route.split("/").filter((function(e){return""!==e.trim()})),a="";t.length>2&&(a="".concat(t.slice(2).join("/"),"/")),function(e,t,a){if(null!==e&&void 0!==e&&null!==e.target&&void 0!==e.target){e.preventDefault();var n=e.target.files,c="/api/v1/buckets/".concat(t,"/objects/upload");""!==a&&(c="".concat(c,"?prefix=").concat(a));var i=new XMLHttpRequest,r=n.length>1,o="An error occurred while uploading the file".concat(r?"s":"","."),s="Object".concat(r?"s":""," uploaded successfully.");i.open("POST",c,!0),i.withCredentials=!1,i.onload=function(e){401!==i.status&&403!==i.status&&400!==i.status&&500!==i.status||j(o),200===i.status&&j(s)},i.upload.addEventListener("error",(function(e){j(o)})),i.upload.addEventListener("progress",(function(e){b(Math.floor(100*e.loaded/e.total))})),i.onerror=function(){j(o)},i.onloadend=function(){T(!0),b(100)};var l,d=new FormData,u=Object(rr.a)(n);try{for(u.s();!(l=u.n()).done;){var m=l.value,h=m.name,p=new Blob([m]);d.append(h,p)}}catch(O){u.e(O)}finally{u.f()}i.send(d),e.target.value=null}}(e,U,a)},oe=[{type:"view",onClick:function(e){var t=Z()(a,"url","/object-browser");if(e.endsWith("/")){var n=e.substr(0,e.length-1).split("/"),c=n.length-1,i="".concat(t,"/").concat(n[c]);r(i,n[c],"path")}else{var o=e.split("/"),s=o[o.length-1],l="".concat(t,"/").concat(s);r(l,s,"file")}},sendOnlyId:!0},{type:"download",onClick:function(e){h("".concat(U,"/").concat(e.name)),e.size>104857600&&j("Download process started, it may take a few moments to complete"),El(U,e.name,e.version_id,ie)},showLoaderFunction:function(e){return l.includes("".concat(a.params.bucket,"/").concat(e))}},{type:"delete",onClick:function(e){I(!0),z(e)},sendOnlyId:!0}],se=S.filter((function(e){return""===H||e.name.indexOf(H)>=0}));return Object(n.jsxs)(i.a.Fragment,{children:[_&&Object(n.jsx)(Sl,{deleteOpen:_,selectedBucket:U,selectedObject:P,closeDeleteModalAndRefresh:function(e){I(!1),e&&(j("Object '".concat(P,"' deleted successfully.")),T(!0))}}),L&&Object(n.jsx)(wl,{modalOpen:L,folderName:s[s.length-1].route,onClose:function(){D(!1)}}),Object(n.jsx)(Ua,{label:"Object Browser"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.obTitleSection,children:Object(n.jsx)("div",{children:Object(n.jsx)(Ol,{})})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Objects",className:t.searchField,id:"search-resource",label:"",onChange:function(e){Y(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}}),Object(n.jsx)(Mt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){T(!0)},children:Object(n.jsx)(xo.a,{})}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),component:"label",onClick:function(){D(!0)},className:t.listButton,children:"Create Folder"}),Object(n.jsxs)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(Nl,{}),component:"label",className:t.listButton,children:["File",Object(n.jsx)(Cl.a,{type:"file",inputProps:{multiple:!0},onChange:function(e){return re(e)},id:"file-input",style:{display:"none"}})]})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{itemActions:oe,columns:[{label:"Name",elementKey:"name",renderFunction:function(e){var a=e,c="".concat(t.iconFile," iconFileElm");e.endsWith("/")&&(c="".concat(t.iconFolder," iconFolderElm"),a=e.substr(0,e.length-1));var i=a.split("/");return Object(n.jsxs)("div",{className:t.fileName,children:[Object(n.jsx)("div",{className:c}),Object(n.jsx)("span",{className:t.fileNameText,children:i[i.length-1]})]})}},{label:"Last Modified",elementKey:"last_modified",renderFunction:function(e){return e.name.endsWith("/")?"":Object(n.jsx)(ct.a,{children:e.last_modified})},renderFullObject:!0},{label:"Size",elementKey:"size",renderFunction:function(e){return e.name.endsWith("/")?"":ce(String(e.size))},renderFullObject:!0,width:60,contentTextAlign:"right"}],isLoading:N,loadingMessage:ae,entityName:"Objects",idField:"name",records:se,customPaperHeight:t.browsePaper})})]})})]})})))),Ll=a(1012),Dl=a(439),Bl=a.n(Dl),Rl=a(438),Pl=a.n(Rl),zl=Object(s.b)(null,{setModalSnackMessage:G,setModalErrorSnackMessage:q}),Kl=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({copyButtonContainer:{paddingLeft:16},modalContent:{paddingBottom:53}},we))}))(zl((function(e){var t=e.classes,a=e.open,r=e.closeModalAndRefresh,o=e.bucketName,s=e.dataObject,l=e.setModalSnackMessage,d=e.setModalErrorSnackMessage,b=Object(c.useState)(""),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(!1),O=Object(u.a)(p,2),f=O[0],v=O[1],y=Object(c.useState)(""),S=Object(u.a)(y,2),C=S[0],k=S[1],w=Object(c.useState)(!0),N=Object(u.a)(w,2),T=N[0],E=N[1];return Object(c.useEffect)((function(){if(T){v(!0),h("");var e=new Date("".concat(C,"T23:59:59")),t=new Date,a=e.getTime()-t.getTime();return a<0?(d("Selected date must be greater than current time."),h(""),void v(!1)):a>6048e5?(d("You can share a file only for less than 7 days."),h(""),void v(!1)):void he.invoke("GET","/api/v1/buckets/".concat(o,"/objects/share?prefix=").concat(s.name,"&version_id=").concat(s.version_id).concat(""!==C?"&expires=".concat(a,"ms"):"")).then((function(e){h(e),v(!1)})).catch((function(e){d(e),h(""),v(!1)}))}}),[s,C,o,T,h,d]),Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(ga,{title:"Share File",modalOpen:a,onClose:function(){r()},children:Object(n.jsxs)(x.a,{container:!0,className:t.modalContent,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.dateContainer,children:Object(n.jsx)(Vn,{id:"date",label:"Active until",borderBottom:!1,addSwitch:!0,onDateChange:function(e,t){E(t),k(t?e:"")}})}),Object(n.jsxs)(x.a,{container:!0,item:!0,xs:12,children:[Object(n.jsx)(x.a,{item:!0,xs:10,children:Object(n.jsx)(Ya,{content:m})}),Object(n.jsx)(x.a,{item:!0,xs:2,className:t.copyButtonContainer,children:Object(n.jsx)(Pl.a,{text:m,children:Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(rt,{}),onClick:function(){l("Share URL Copied to clipboard")},disabled:""===m||f,children:"Copy"})})})]})]})})})}))),Wl=function(){return Object(n.jsx)(it.a,{children:Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13",children:[Object(n.jsx)("path",{d:"M11.05 8.617v2.429h-9.1v-9.1h2.429v-1.95H0v13h13V8.617z",className:"a"}),Object(n.jsx)("path",{d:"M3.854 9.256h1.95a4.945 4.945 0 013.6-4.74v1.3l.6-.487 2.474-2.012L9.4.817v1.7a6.9 6.9 0 00-5.546 6.739z",className:"a"})]})})},Ul=function(){return Object(n.jsx)(it.a,{children:Object(n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 12.996",children:[Object(n.jsx)("path",{d:"M11.05 9.096v1.95h-9.1v-1.95H0v3.9h13v-3.9z"}),Object(n.jsx)("path",{d:"M6.5 9.75L9 6.672H7.475V0h-1.95v6.672H4z"})]})})},Vl={setModalErrorSnackMessage:q},Gl=Object(s.b)(null,Vl),ql=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({objectName:{fontSize:18,fontWeight:700,marginBottom:40},buttonContainer:{textAlign:"right"}},we))}))(Gl((function(e){var t=e.classes,a=e.open,i=e.closeModalAndRefresh,r=e.objectName,o=e.objectInfo,s=e.bucketName,l=e.setModalErrorSnackMessage,d=Object(c.useState)(!0),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(""),p=Object(u.a)(h,2),O=p[0],f=p[1],v=Object(c.useState)(""),y=Object(u.a)(v,2),S=y[0],C=y[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(!1),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(!1),M=Object(u.a)(F,2),L=M[0],D=M[1];Object(c.useEffect)((function(){if(o.retention_mode&&(f(o.retention_mode.toLowerCase()),D(!0)),o.retention_until_date){var e=new Date(o.retention_until_date);if("Invalid Date"!==e.toString()){var t=e.getFullYear(),a=(c=e.getMonth()+1)<10?"0".concat(c):"".concat(c),n=e.getDate();isNaN(n)||"NaN"===a||isNaN(t)||C("".concat(t,"-").concat(a,"-").concat(n))}D(!0)}var c}),[o]);var B=Object(c.useRef)(null),R=function(){m(!1),f(""),B.current&&B.current.resetDate()},P=L&&("governance"===O||""===O);return Object(n.jsxs)(ga,{title:"Set Retention Policy",modalOpen:a,onClose:function(){R(),i(!1)},children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.objectName,children:r}),Object(n.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault()}(e)},children:[P&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"status",id:"status",name:"status",checked:j,onChange:function(e){m(!j)},label:"Status",indicatorLabels:["Enabled","Disabled"]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Fa,{currentSelection:O,id:"type",name:"type",label:"Type",disableOptions:!j||L&&""!==O,onChange:function(e){f(e.target.value)},selectorOptions:[{label:"Governance",value:"governance"},{label:"Compliance",value:"compliance"}]})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Vn,{id:"date",label:"Date",disableOptions:!(j&&("governance"===O||"compliance"===O)),ref:B,value:S,borderBottom:!0,onDateChange:function(e,t){T(t),t&&C(e)}})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:R,children:"Reset"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:j&&""===O||j&&!N||_,onClick:function(){I(!0);var e=o.name,t=o.version_id,a=j||"governance"!==O?"".concat(S,"T23:59:59Z"):"";j||"governance"!==O?function(e,t,a){he.invoke("PUT","/api/v1/buckets/".concat(s,"/objects/retention?prefix=").concat(e,"&version_id=").concat(t),{expires:a,mode:O}).then((function(e){I(!1),i(!0)})).catch((function(e){l(e),I(!1)}))}(e,t,a):function(e,t){he.invoke("DELETE","/api/v1/buckets/".concat(s,"/objects/retention?prefix=").concat(e,"&version_id=").concat(t)).then((function(){I(!1),i(!0)})).catch((function(e){l(e),I(!1)}))}(e,t)},children:"Save"})]})]})]})}))),Hl={setModalErrorSnackMessage:q},Yl=Object(s.b)(null,Hl),Ql=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({buttonContainer:{textAlign:"right"},pathLabel:{marginTop:0,marginBottom:32}},we))}))(Yl((function(e){var t=e.modalOpen,a=e.currentTags,r=e.selectedObject,o=e.onCloseAndUpdate,s=e.bucketName,l=e.versionId,d=e.setModalErrorSnackMessage,b=e.classes,m=Object(c.useState)(""),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(""),v=Object(u.a)(f,2),y=v[0],S=v[1],C=Object(c.useState)(!1),k=Object(u.a)(C,2),w=k[0],N=k[1];return Object(n.jsx)(i.a.Fragment,{children:Object(n.jsx)(ga,{modalOpen:t,title:"Add New Tag",onClose:function(){o(!1)},children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)("h3",{className:b.pathLabel,children:["Selected Object: ",r]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:p,label:"New Tag Key",id:"newTagKey",name:"newTagKey",placeholder:"Enter New Tag Key",onChange:function(e){O(e.target.value)}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{value:y,label:"New Tag Label",id:"newTagLabel",name:"newTagLabel",placeholder:"Enter New Tag Label",onChange:function(e){S(e.target.value)}})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:b.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:b.clearButton,onClick:function(){S(""),O("")},children:"Clear"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:""===y.trim()||""===p.trim()||w,onClick:function(){N(!0);var e={};e[p]=y;var t=Object(j.a)(Object(j.a)({},a),e);he.invoke("PUT","/api/v1/buckets/".concat(s,"/objects/tags?prefix=").concat(r,"&version_id=").concat(l),{tags:t}).then((function(e){N(!1),o(!0)})).catch((function(e){d(e),N(!1)}))},children:"Save"})]})]})})})}))),Zl={setErrorSnackMessage:V},Jl=Object(s.b)(null,Zl),$l=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({buttonContainer:{textAlign:"right"},pathLabel:{marginTop:0,marginBottom:32}},we))}))(Jl((function(e){var t=e.deleteOpen,a=e.currentTags,i=e.selectedObject,r=e.selectedTag,o=e.onCloseAndUpdate,s=e.bucketName,l=e.versionId,d=e.setErrorSnackMessage,b=e.classes,m=Object(c.useState)(!1),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(u.a)(r,2),x=f[0],v=f[1];return Object(n.jsxs)(ja.a,{open:t,onClose:function(){o(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsx)(ma.a,{id:"alert-dialog-title",children:"Delete Tag"}),Object(n.jsxs)(ha.a,{children:[p&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(Pa.a,{id:"alert-dialog-description",children:["Are you sure you want to delete the tag"," ",Object(n.jsxs)("b",{className:b.wrapText,children:[x," : ",v]})," ","from ",i,"?"]})]}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){o(!1)},color:"primary",disabled:p,children:"Cancel"}),Object(n.jsx)(g.a,{onClick:function(){O(!0);var e=Object(j.a)({},a);delete e[x],he.invoke("PUT","/api/v1/buckets/".concat(s,"/objects/tags?prefix=").concat(i,"&version_id=").concat(l),{tags:e}).then((function(e){O(!1),o(!0)})).catch((function(e){d(e),O(!1)}))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})}))),Xl={setModalErrorSnackMessage:q},ed=Object(s.b)(null,Xl),td=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({objectName:{fontSize:18,fontWeight:700,marginBottom:40},buttonContainer:{textAlign:"right"}},we))}))(ed((function(e){var t=e.classes,a=e.open,i=e.closeModalAndRefresh,r=e.objectName,o=e.bucketName,s=e.actualInfo,l=e.setModalErrorSnackMessage,d=Object(c.useState)(!1),b=Object(u.a)(d,2),j=b[0],m=b[1],h=Object(c.useState)(!1),p=Object(u.a)(h,2),O=p[0],f=p[1],v=s.version_id;Object(c.useEffect)((function(){var e=Z()(s,"legal_hold_status","OFF");m("ON"===e)}),[s]);var y=function(){m(!1)};return Object(n.jsxs)(ga,{title:"Set Legal Hold",modalOpen:a,onClose:function(){y(),i(!1)},children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.objectName,children:r}),Object(n.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault(),f(!0),he.invoke("PUT","/api/v1/buckets/".concat(o,"/objects/legalhold?prefix=").concat(r,"&version_id=").concat(v),{status:j?"enabled":"disabled"}).then((function(){f(!1),i(!0)})).catch((function(e){l(e),f(!1)}))}(e)},children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"legalhold",id:"legalhold",name:"legalhold",checked:j,onChange:function(e){m(!j)},label:"Legal Hold Status",indicatorLabels:["Enabled","Disabled"],tooltip:"To enable this feature you need to enable versioning on the bucket before creation"})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(n.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:y,children:"Reset"}),Object(n.jsx)(g.a,{type:"submit",variant:"contained",color:"primary",disabled:O,children:"Save"})]})]})]})}))),ad={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:"0",tags:{},version_id:null},nd={removeRouteLevel:ul,setErrorSnackMessage:V,fileIsBeingPrepared:ml,fileDownloadStarted:hl,setSnackBarMessage:U},cd=Object(s.b)((function(e){var t=e.objectBrowser;return{downloadingFiles:Z()(t,"downloadingFiles",[])}}),nd)(Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({objectNameContainer:{marginBottom:8},objectPathContainer:{marginBottom:26,fontSize:10},objectPathLink:{"&:visited":{color:"#000"}},objectName:{fontSize:24},propertiesContainer:{display:"flex",flexDirection:"row",marginBottom:15},propertiesItem:{display:"flex",flexDirection:"row",marginRight:21},propertiesItemBold:{fontWeight:700},propertiesValue:{marginLeft:8,textTransform:"capitalize"},propertiesIcon:{marginLeft:5},actionsIconContainer:{marginLeft:12},actionsIcon:{height:16,width:16,"& .MuiSvgIcon-root":{height:16}},tagsContainer:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:15},tagText:{marginRight:13},tag:{marginRight:6,fontSize:10,fontWeight:700,"&.MuiChip-sizeSmall":{height:18},"& .MuiSvgIcon-root":{height:10,width:10}},search:{marginBottom:8,"&.MuiFormControl-root":{marginRight:0}},"@global":{".progressDetails":{paddingTop:3,display:"inline-block",position:"relative",width:18,height:18},".progressDetails > .MuiCircularProgress-root":{position:"absolute",left:0,top:3}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.routesList,r=e.downloadingFiles,o=e.removeRouteLevel,s=e.setErrorSnackMessage,l=e.setSnackBarMessage,d=e.fileIsBeingPrepared,j=e.fileDownloadStarted,m=Object(c.useState)(!0),h=Object(u.a)(m,2),p=h[0],O=h[1],g=Object(c.useState)(!1),v=Object(u.a)(g,2),y=v[0],C=v[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(!1),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(!1),M=Object(u.a)(F,2),L=M[0],D=M[1],B=Object(c.useState)(["",""]),R=Object(u.a)(B,2),P=R[0],z=R[1],K=Object(c.useState)(!1),W=Object(u.a)(K,2),U=W[0],V=W[1],G=Object(c.useState)(ad),q=Object(u.a)(G,2),H=q[0],Y=q[1],Q=Object(c.useState)([]),J=Object(u.a)(Q,2),$=J[0],X=J[1],ee=Object(c.useState)(""),te=Object(u.a)(ee,2),ae=te[0],ne=te[1],ce=Object(c.useState)(!1),ie=Object(u.a)(ce,2),re=ie[0],oe=ie[1],se=a[a.length-1].route.split("/"),le=se[se.length-1],de=se[2],be=se.slice(3).join("/");Object(c.useEffect)((function(){p&&he.invoke("GET","/api/v1/buckets/".concat(de,"/objects?prefix=").concat(be,"&with_versions=true")).then((function(e){var t=Z()(e,"objects",[]);Y(t.find((function(e){return e.is_latest}))||ad),X(t.filter((function(e){return!e.is_latest}))),O(!1)})).catch((function(e){s(e),O(!1)}))}),[p,de,be,s]);var ue=[];H.tags&&(ue=Object.keys(H.tags));var je=function(){C(!0)},me=function(e){j(e)},pe=function(e,t){d("".concat(de,"/").concat(e.name).concat(t?"-".concat(e.version_id):"")),e.size&&parseInt(e.size)>104857600&&l("Download process started, it may take a few moments to complete"),El(de,be,e.version_id,me,t)},Oe=[{type:"share",onClick:je,sendOnlyId:!0},{type:"download",onClick:function(e){pe(e,!0)},showLoaderFunction:function(e){return r.includes("".concat(de,"/").concat(le,"-").concat(e))}}],ge=$.filter((function(e){return!!e.version_id&&e.version_id.includes(ae)}));return Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(Ua,{label:"Object Browser"}),y&&Object(n.jsx)(Kl,{open:y,closeModalAndRefresh:function(){C(!1)},bucketName:de,dataObject:H}),N&&Object(n.jsx)(ql,{open:N,closeModalAndRefresh:function(e){T(!1),e&&O(!0)},objectName:le,objectInfo:H,bucketName:de}),re&&Object(n.jsx)(Sl,{deleteOpen:re,selectedBucket:de,selectedObject:be,closeDeleteModalAndRefresh:function(e){if(oe(!1),e){var t=se.slice(0,-1).join("/");o(t),b.push(t)}}}),_&&Object(n.jsx)(Ql,{modalOpen:_,currentTags:H.tags,selectedObject:be,versionId:H.version_id,bucketName:de,onCloseAndUpdate:function(e){I(!1),e&&O(!0)}}),L&&Object(n.jsx)($l,{deleteOpen:L,currentTags:H.tags,selectedObject:be,versionId:H.version_id,bucketName:de,onCloseAndUpdate:function(e){D(!1),e&&O(!0)},selectedTag:P}),U&&Object(n.jsx)(td,{open:U,closeModalAndRefresh:function(e){V(!1),e&&O(!0)},objectName:be,bucketName:de,actualInfo:H}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.obTitleSection,children:Object(n.jsx)("div",{children:Object(n.jsx)(Ol,{})})}),Object(n.jsx)("br",{}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.propertiesContainer,children:[H.version_id&&"null"!==H.version_id&&Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsxs)("div",{className:t.propertiesItem,children:[Object(n.jsxs)("div",{children:[Object(n.jsx)("span",{className:t.propertiesItemBold,children:"Legal Hold:"}),Object(n.jsx)("span",{className:t.propertiesValue,children:H.legal_hold_status?H.legal_hold_status.toLowerCase():"Off"})]}),Object(n.jsx)("div",{children:Object(n.jsx)(Mt.a,{color:"primary","aria-label":"legal-hold",size:"small",className:t.propertiesIcon,onClick:function(){V(!0)},children:Object(n.jsx)(Yt,{active:!0})})})]}),Object(n.jsxs)("div",{className:t.propertiesItem,children:[Object(n.jsxs)("div",{children:[Object(n.jsx)("span",{className:t.propertiesItemBold,children:"Retention:"}),Object(n.jsx)("span",{className:t.propertiesValue,children:H.retention_mode?H.retention_mode.toLowerCase():"Undefined"})]}),Object(n.jsx)("div",{children:Object(n.jsx)(Mt.a,{color:"primary","aria-label":"retention",size:"small",className:t.propertiesIcon,onClick:function(){T(!0)},children:Object(n.jsx)(Yt,{active:!0})})})]})]}),Object(n.jsxs)("div",{className:t.propertiesItem,children:[Object(n.jsx)("div",{className:t.propertiesItemBold,children:"File Actions:"}),Object(n.jsx)("div",{className:t.actionsIconContainer,children:Object(n.jsx)(Mt.a,{color:"primary","aria-label":"share",size:"small",className:t.actionsIcon,onClick:function(){je()},children:Object(n.jsx)(Wl,{})})}),Object(n.jsx)("div",{className:t.actionsIconContainer,children:r.includes("".concat(de,"/").concat(H.name))?Object(n.jsx)("div",{className:"progressDetails",children:Object(n.jsx)(S.a,{color:"primary",size:17,variant:"indeterminate"})}):Object(n.jsx)(Mt.a,{color:"primary","aria-label":"download",size:"small",className:t.actionsIcon,onClick:function(){pe(H)},children:Object(n.jsx)(Ul,{})})}),Object(n.jsx)("div",{className:t.actionsIconContainer,children:Object(n.jsx)(Mt.a,{color:"primary","aria-label":"delete",size:"small",className:t.actionsIcon,onClick:function(){oe(!0)},children:Object(n.jsx)(st,{})})})]})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.tagsContainer,children:[Object(n.jsx)("div",{className:t.tagText,children:"Tags:"}),ue&&ue.map((function(e,a){var c=Z()(H,"tags.".concat(e),"");return""!==c?Object(n.jsx)(Ll.a,{className:t.tag,size:"small",label:"".concat(e," : ").concat(c),color:"primary",deleteIcon:Object(n.jsx)(Bl.a,{}),onDelete:function(){!function(e,t){z([e,t]),D(!0)}(e,c)}},"chip-".concat(a)):null})),Object(n.jsx)(Ll.a,{className:t.tag,icon:Object(n.jsx)(Ko.a,{}),clickable:!0,size:"small",label:"Add tag",color:"primary",variant:"outlined",onClick:function(){I(!0)}})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.actionsTray,children:H.version_id&&"null"!==H.version_id&&Object(n.jsx)(f.a,{placeholder:"Search ".concat(le),className:Object(xe.a)(t.search,t.searchField),id:"search-resource",label:"",onChange:function(e){ne(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:H.version_id&&"null"!==H.version_id&&Object(n.jsx)(ua,{itemActions:Oe,columns:[{label:"Version ID",elementKey:"version_id"},{label:"Last Modified",elementKey:"last_modified",renderFunction:function(e){return Object(n.jsx)(ct.a,{children:e})}}],isLoading:!1,entityName:"Versions",idField:"version_id",records:ge})})]})})]})}))),id={setAllRoutes:jl},rd=Object(s.b)((function(e){var t=e.objectBrowser;return{routesList:Z()(t,"routesList",[])}}),id),od=Object(l.g)(rd((function(e){var t=e.routesList,a=e.match,i=e.setAllRoutes,r=t[t.length-1];return Object(c.useEffect)((function(){var e=Z()(a,"url","/object-browser");e!==t[t.length-1].route&&i(e)}),[a,t,i]),"path"===r.type?Object(n.jsx)(Ml,{}):Object(n.jsx)(cd,{routesList:t})}))),sd=a(232),ld=a.n(sd),dd=[{id:0,title:"Community",price:"Open Source",capacityMin:""},{id:1,title:"Standard",price:"$10/TB/month",capacityMax:"Up to 10PB. No additional charges for capacity over 10PB",capacityMin:""},{id:2,title:"Enterprise",price:"$20/TB/month",capacityMax:"Up to 5PB. No additional charges for capacity over 5PB",capacityMin:""}],bd=[{id:0,field:"License",community:"GNU AGPL v3",communityDetail:"",standard:"Commercial License",standardDetail:"",enterprise:"Commercial License",enterpriseDetail:""},{id:1,field:"Software Release",community:"Update to latest",standard:"1 Year Long Term Support",enterprise:"5 Years Long Term Support"},{id:2,field:"SLA",community:"No SLA",standard:"<24 hours",enterprise:"<1 hour"},{id:3,field:"Support",community:"Community:",communityDetail:"Public Slack Channel + Github Issues",standard:"24x7 L4 direct engineering",standardDetail:"Support via SUBNET",enterprise:"24x7 L4 direct engineering",enterpriseDetail:"Support via SUBNET"},{id:4,field:"Security Updates & Critical Bugs",community:"Self Update",standard:"Guided Update",enterprise:"Guided Update"},{id:5,field:"Panic Button",community:"N/A",standard:"1 per year",enterprise:"Unlimited"},{id:6,field:"Annual Architecture Review",community:"N/A",standard:"Yes",enterprise:"Yes"},{id:7,field:"Annual Performance Review",community:"N/A",standard:"Yes",enterprise:"Yes"},{id:8,field:"Indemnification",community:"N/A",standard:"N/A",enterprise:"Yes"},{id:9,field:"Security + Policy Review",community:"N/A",standard:"N/A",enterprise:"Yes"}],ud=[{id:0,text:"Join Slack",text2:"",link:"https://slack.min.io",plan:"community"},{id:1,text:"Subscribe",text2:"Upgrade",link:"https://subnet.min.io/subscription",plan:"standard"},{id:2,text:"Subscribe",text2:"Upgrade",link:"https://subnet.min.io/subscription",plan:"enterprise"}],jd=a(440),md=a.n(jd),hd=a(441),pd=a.n(hd),Od={setModalErrorSnackMessage:q},gd=Object(s.b)(null,Od),fd=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({errorBlock:{color:"red"},subnetLicenseKey:{padding:"10px 10px 10px 0px",borderRight:"1px solid rgba(0, 0, 0, 0.12)",opacity:.5,"&:hover":{opacity:1}},subnetLoginForm:{padding:"10px 0px 10px 10px",opacity:.5,"&:hover":{opacity:1}},licenseKeyField:{},pageTitle:{marginBottom:20},button:{textTransform:"none",fontSize:15,fontWeight:700,background:"transparent linear-gradient(90deg, #073052 0%, #081c42 100%) 0% 0% no-repeat padding-box",color:"#fff"},buttonSignup:{textTransform:"none",fontSize:15,fontWeight:700,marginLeft:15}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(gd((function(e){var t=e.classes,a=e.open,i=e.closeModal,r=e.setModalErrorSnackMessage,o=Object(c.useState)(""),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(""),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(""),O=Object(u.a)(p,2),S=O[0],C=O[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=function(){if(!N){T(!0);var e={license:l,email:S,password:m};he.invoke("POST","/api/v1/subscription/validate",e).then((function(){T(!1),d(""),h(""),C(""),i()})).catch((function(e){T(!1),d(""),h(""),C(""),r(e)}))}};return a?Object(n.jsxs)(ga,{title:"",modalOpen:a,onClose:function(){d(""),h(""),C(""),i()},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(n.jsxs)(x.a,{container:!0,alignItems:"center",item:!0,xs:12,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{component:"h2",variant:"h6",className:t.pageTitle,children:"Activate SUBNET License"})}),Object(n.jsxs)(x.a,{item:!0,className:t.subnetLicenseKey,xs:6,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(v.a,{variant:"caption",display:"block",gutterBottom:!0,children:"Enter your license key here"})}),Object(n.jsx)(f.a,{id:"license-key",placeholder:"",multiline:!0,rows:3,value:l,onChange:function(e){return d(e.target.value)},fullWidth:!0,className:t.licenseKeyField,variant:"outlined"}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",onClick:function(){return E()},disabled:N||0===l.trim().length,children:"Activate"})]}),Object(n.jsx)(x.a,{item:!0,className:t.subnetLoginForm,xs:6,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{overlayIcon:Object(n.jsx)(md.a,{}),id:"subnet-email",name:"subnet-email",onChange:function(e){C(e.target.value)},placeholder:"email",label:"",type:"text",value:S})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{overlayIcon:Object(n.jsx)(pd.a,{}),id:"subnet-password",name:"subnet-password",onChange:function(e){h(e.target.value)},placeholder:"password",label:"",type:"password",value:m})}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[Object(n.jsx)(g.a,{className:t.button,color:"primary",onClick:function(){return E()},disabled:N||0===S.trim().length||0===m.trim().length,variant:"contained",children:"Activate"}),Object(n.jsx)(g.a,{className:t.buttonSignup,color:"primary",target:"_blank",rel:"noopener noreferrer",href:"#",onClick:function(e){e.preventDefault(),window.open("https://min.io/pricing","_blank")},variant:"outlined",children:"Sign Up"})]})]})})]}),N&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})})]}):null}))),xd=Object(s.b)((function(e){return{operatorMode:e.system.operatorMode}}),null)(Object(N.a)((function(e){return Object(k.a)(Object(j.a)({pageTitle:{fontSize:18,marginBottom:20},paper:{padding:"20px 52px 20px 28px"},licenseContainer:{position:"relative",padding:"20px 52px 0px 28px",background:"#032F51",boxShadow:"0px 3px 7px #00000014","& h2":{color:"#FFF",marginBottom:67},"& a":{textDecoration:"none"},"& h3":{color:"#FFFFFF",marginBottom:"30px",fontWeight:"bold"},"& h6":{color:"#FFFFFF !important"}},tableContainer:{marginLeft:28},detailsContainer:{textAlign:"center",paddingBottom:12,borderRadius:"3px 3px 0 0",marginLeft:8,maxWidth:"calc(25% - 8px)"},detailsContainerBorder:{border:"1px solid #e2e2e2",borderBottom:0,borderRadius:"4px 4px 0px 0px"},detailsContainerBorderHighlighted:{border:"1px solid #B5B5B5",borderBottom:0},detailsTitle:{fontSize:19,fontWeight:700,marginBottom:26,paddingTop:18},activePlanHeader:{fontWeight:700,background:"#D5DDE5",borderRadius:"3px 3px 0px 0px",color:"#121212",padding:8,borderTop:"1px solid #D5DDE5",marginTop:-2},planHeader:{background:"#FFFFFF",borderRadius:"3px 3px 0px 0px",padding:8,borderTop:"1px solid #D5DDE5"},detailsPrice:{fontSize:13,fontWeight:700,marginBottom:8},detailsCapacityMax:{minHeight:28,fontSize:10,fontWeight:700,marginBottom:12,padding:"0% 15%"},detailsCapacityMin:{fontSize:10},itemContainer:{height:36},itemContainerDetail:{height:48},item:{height:"100%",borderLeft:"1px solid #e2e2e2",borderRight:"1px solid #e2e2e2",textAlign:"center",fontSize:10,fontWeight:700,display:"flex",alignItems:"center",alignContent:"center",marginLeft:8,maxWidth:"calc(25% - 8px)",borderTop:"1px solid #e5e5e5"},itemFirst:{borderLeft:0,borderRight:0},itemHighlighted:{borderLeft:"1px solid #B5B5B5",borderRight:"1px solid #B5B5B5"},field:{textAlign:"left",fontWeight:400,fontSize:12},checkIcon:{height:12,color:"transparent linear-gradient(90deg, #073052 0%, #081c42 100%) 0% 0% no-repeat padding-box"},buttonContainer:{paddingTop:8,paddingBottom:24,height:"100%",display:"flex",justifyContent:"center",borderRadius:"0 0 3px 3px",border:"1px solid #e2e2e2",borderTop:0,marginLeft:8,maxWidth:"calc(25% - 8px)"},buttonContainerBlank:{border:0},buttonContainerHighlighted:{border:"1px solid #B5B5B5",borderTop:0},button:{textTransform:"none",fontSize:15,fontWeight:700},licenseButton:{float:"right",marginTop:25,marginRight:25},openSourcePolicy:{color:"#1C5A8D",fontWeight:"bold"},activateLink:{color:"#1C5A8D",fontWeight:"bold",clear:"both",background:"none",border:"none",textDecoration:"underline",cursor:"pointer"},subnetRefreshLicenseLink:{color:"#1C5A8D",fontWeight:"bold",clear:"both",background:"none",border:"none",textDecoration:"underline",cursor:"pointer",fontSize:13},fullWidth:{width:"100%",height:"100%"},midWidth:{width:"70%",float:"left",height:"100%"},smallWidth:{width:"30%",float:"right",height:"100%",borderRadius:"0px 3px 0px 0px !important"},licenseInfo:{color:"#FFFFFF",position:"relative"},licenseInfoTitle:{textTransform:"none",color:"#BFBFBF",fontSize:11},licenseInfoValue:{textTransform:"none",fontSize:14,fontWeight:"bold"},licenseDescription:{background:"#032F51",padding:"30px 30px",borderTop:"1px solid #e2e5e4",borderLeft:"1px solid #e2e5e4",borderRight:"1px solid #e2e5e4",bottom:0,left:"5%",right:"5%",position:"absolute"},currentPlanBG:{background:"#022A4A 0% 0% no-repeat padding-box",color:"#FFFFFF",borderTop:"1px solid #52687d"},currentPlanButton:{background:"#FFFFFF",color:"#022A4A","&:hover":{background:"#FFFFFF"}},planItemsPadding:{padding:"23px 33px"},subnetSubTitle:{fontSize:12},verifiedIcon:{width:96,position:"absolute",right:0,bottom:29},loadingLoginStrategy:{textAlign:"center"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.operatorMode,r=function(){E(!0),he.invoke("GET","/api/v1/subscription/info").then((function(e){e&&("STANDARD"===e.plan?k(1):"ENTERPRISE"===e.plan?k(2):k(1),h(e)),E(!1)})).catch((function(e){E(!1)}))},o=Object(c.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1],b=Object(c.useState)(),j=Object(u.a)(b,2),m=j[0],h=j[1],p=Object(c.useState)(0),O=Object(u.a)(p,2),f=O[0],k=O[1],w=Object(c.useState)(!0),N=Object(u.a)(w,2),T=N[0],E=N[1],A=Object(c.useState)(!1),_=Object(u.a)(A,2),I=_[0],F=_[1];return Object(c.useEffect)((function(){r()}),[]),T?Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(y.a,{})}):Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(Ua,{label:"License"}),Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsx)(C.a,{className:"".concat(t.licenseContainer," ").concat(t.midWidth),children:m?Object(n.jsx)(i.a.Fragment,{children:Object(n.jsxs)(x.a,{container:!0,className:t.licenseInfo,children:[Object(n.jsxs)(x.a,{item:!0,xs:6,children:[Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"License"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:"Commercial License"}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Organization"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:m.organization}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Registered Capacity"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:ce((1099511627776*m.storage_capacity).toString(10))}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Expiry Date"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:Object(n.jsx)(ct.a,{format:"YYYY-MM-DD",children:m.expires_at})})]}),Object(n.jsxs)(x.a,{item:!0,xs:6,children:[Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Subscription Plan"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:m.plan}),Object(n.jsx)(v.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Requester"}),Object(n.jsx)(v.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:m.email})]}),Object(n.jsx)("img",{className:t.verifiedIcon,src:"/verified.svg",alt:"verified"})]})}):Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)("img",{src:"/agpl.svg",height:40,alt:"agpl"}),Object(n.jsx)(v.a,{component:"h2",variant:"h6",children:"GNU Affero General Public License"}),Object(n.jsx)("a",{href:"https://www.gnu.org/licenses/agpl-3.0.html",target:"_blank",rel:"nofollow noopener noreferrer",children:Object(n.jsxs)("div",{className:t.licenseDescription,children:[Object(n.jsx)(v.a,{component:"h3",children:"Version 3"}),Object(n.jsx)(v.a,{component:"h6",children:"The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the Community in the case of network server software."})]})})]})}),Object(n.jsx)(C.a,{className:"".concat(t.paper," ").concat(t.smallWidth),children:m?Object(n.jsxs)(i.a.Fragment,{children:[" ",Object(n.jsx)(v.a,{component:"h2",variant:"h6",className:t.pageTitle,children:"Login to MinIO SUBNET !"}),Object(n.jsx)(v.a,{component:"h6",className:t.subnetSubTitle,children:"It combines a commercial license with a support experience unlike any other."}),Object(n.jsx)("br",{}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",className:t.button,target:"_blank",rel:"noopener noreferrer",href:"https://subnet.min.io/support/?ref=".concat(a?"op":"con"),children:"Login to SUBNET"}),a&&Object(n.jsxs)(i.a.Fragment,{children:[" ",Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)("button",{className:t.subnetRefreshLicenseLink,onClick:function(e){e.preventDefault(),F(!0),he.invoke("POST","/api/v1/subscription/refresh",{}).then((function(e){e&&("STANDARD"===e.plan?k(1):"ENTERPRISE"===e.plan?k(2):k(1),h(e)),F(!1)})).catch((function(e){F(!1)}))},children:"Refresh Licence"}),I&&Object(n.jsx)(S.a,{size:16,className:t.loadingLoginStrategy})]})]}):Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(v.a,{component:"h2",variant:"h6",className:t.pageTitle,children:"Choosing between GNU AGPL v3 and Commercial License"}),Object(n.jsx)(v.a,{component:"h6",children:"If you are building proprietary applications, you may want to choose the commercial license included as part of the Standard and Enterprise subscription plans. Applications must otherwise comply with all the GNU AGPLv3 License & Trademark obligations. Follow the links below to learn more about the compliance policy."}),Object(n.jsx)("br",{}),Object(n.jsx)("a",{href:"https://min.io/compliance?ref=".concat(a?"op":"con"),className:t.openSourcePolicy,target:"_blank",rel:"nofollow noopener noreferrer",children:"Open Source Policy Compliance"}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)("a",{href:"https://min.io/logo?ref=".concat(a?"op":"con"),className:t.openSourcePolicy,target:"_blank",rel:"nofollow noopener noreferrer",children:"Trademark Policy"})]})})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:Object(xe.a)(t.planItemsPadding),children:Object(n.jsx)(C.a,{className:t.paper,style:{borderRadius:"0px 0px 3px 3px"},children:Object(n.jsxs)(x.a,{container:!0,children:[a?Object(n.jsx)(fd,{open:l,closeModal:function(){return d(!1),void r()}}):null,Object(n.jsxs)(x.a,{container:!0,item:!0,xs:12,className:t.tableContainer,children:[Object(n.jsxs)(x.a,{container:!0,item:!0,xs:12,children:[Object(n.jsx)(x.a,{item:!0,xs:3,className:t.detailsContainer}),dd.map((function(e){var a=!m&&"Community"===e.title||m&&m.plan.toLowerCase()===e.title.toLowerCase();return Object(n.jsxs)(x.a,{container:!0,item:!0,xs:3,className:Object(xe.a)(t.detailsContainer,t.detailsContainerBorder,Object(fe.a)({},t.detailsContainerBorderHighlighted,"Community"!==e.title),a?t.currentPlanBG:""),children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:a?t.activePlanHeader:t.planHeader,children:a?"Current Plan":"\xa0"}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.detailsTitle,children:e.title}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.detailsPrice,children:e.price}),Object(n.jsx)(x.a,{item:!0,xs:12,className:t.detailsCapacityMax,children:e.capacityMax||""})]},e.id)}))]}),bd.map((function(e){return Object(n.jsxs)(x.a,{container:!0,item:!0,xs:12,className:Object(xe.a)(t.itemContainer,e.communityDetail&&t.itemContainerDetail),children:[Object(n.jsx)(x.a,{item:!0,xs:3,className:Object(xe.a)(t.item,t.field,t.itemFirst),children:e.field}),Object(n.jsxs)(x.a,{container:!0,item:!0,xs:3,className:Object(xe.a)(t.item,0===f?t.currentPlanBG:""),children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:"N/A"===e.community?"":"Yes"===e.community?Object(n.jsx)(ld.a,{className:t.checkIcon}):e.community}),void 0!==e.communityDetail&&Object(n.jsx)(x.a,{item:!0,xs:12,children:e.communityDetail})]}),Object(n.jsx)(x.a,{container:!0,item:!0,xs:3,className:Object(xe.a)(t.item,t.itemHighlighted,1===f?t.currentPlanBG:""),children:Object(n.jsx)(x.a,{item:!0,xs:12,children:"N/A"===e.standard?"":"Yes"===e.standard?Object(n.jsx)(ld.a,{className:t.checkIcon}):e.standard})}),Object(n.jsx)(x.a,{container:!0,item:!0,xs:3,className:Object(xe.a)(t.item,t.itemHighlighted,2===f?t.currentPlanBG:""),children:Object(n.jsx)(x.a,{item:!0,xs:12,children:"N/A"===e.enterprise?"":"Yes"===e.enterprise?Object(n.jsx)(ld.a,{className:t.checkIcon}):e.enterprise})})]},e.id)})),Object(n.jsxs)(x.a,{container:!0,item:!0,xs:12,children:[Object(n.jsx)(x.a,{item:!0,xs:3,className:Object(xe.a)(t.buttonContainer,t.buttonContainerBlank)}),ud.map((function(e,c){return Object(n.jsxs)(x.a,{container:!0,item:!0,xs:3,style:{textAlign:"center"},className:Object(xe.a)(t.buttonContainer,f===c?t.currentPlanBG:"",Object(fe.a)({},t.buttonContainerHighlighted,"Subscribe"===e.text)),children:[Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(g.a,{variant:"contained",color:"primary",className:Object(xe.a)(t.button,f===c?t.currentPlanButton:""),target:"_blank",rel:"noopener noreferrer",href:"#",disabled:m&&m.plan.toLowerCase()===e.plan.toLowerCase(),onClick:function(t){t.preventDefault(),window.open("".concat(e.link,"/?ref=").concat(a?"op":"con"),"_blank")},children:f!==c&&c>0?e.text2:e.text})}),a&&"Subscribe"===e.text&&!(m&&m.plan.toLowerCase()===e.plan.toLowerCase())&&Object(n.jsx)(x.a,{item:!0,xs:12,style:{marginTop:"10px"},children:Object(n.jsx)("button",{className:t.activateLink,onClick:function(e){e.preventDefault(),d(!0)},children:"Activate"})})]},e.id)}))]})]})]})})})]})]})})}))),vd=a(91),yd="TRACE_MESSAGE_RECEIVED",Sd="TRACE_RESET_MESSAGES";var Cd=function(e){var t="ws";return"https:"===e&&(t="wss"),t},kd=a(115),wd=a.n(kd),Nd=Object(s.b)((function(e){return{messages:e.trace.messages}}),{traceMessageReceived:function(e){return{type:yd,message:e}},traceResetMessages:function(){return{type:Sd}}})(Object(N.a)((function(e){return Object(k.a)(Object(j.a)({logList:{background:"white",height:"400px",overflow:"auto","& ul":{margin:"4px",padding:"0px"},"& ul li":{listStyle:"none",margin:"0px",padding:"0px",borderBottom:"1px solid #dedede"}},sizeItem:{width:150},timeItem:{width:100}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.traceMessageReceived,r=e.traceResetMessages,o=e.messages;return Object(c.useEffect)((function(){r();var e=new URL(window.location.toString()),t=e.port,n=Cd(e.protocol),c=new vd.w3cwebsocket("".concat(n,"://").concat(e.hostname,":").concat(t,"/ws/trace")),i=null;if(null!==c)return c.onopen=function(){console.log("WebSocket Client Connected"),c.send("ok"),i=setInterval((function(){c.send("ok")}),1e4)},c.onmessage=function(e){var t=JSON.parse(e.data.toString());t.ptime=wd()(t.time,"YYYY-MM-DD HH:mm:s.SSSS +0000 UTC").toDate(),t.key=Math.random(),a(t)},c.onclose=function(){clearInterval(i),console.log("connection closed by server")},function(){c.close(1e3),clearInterval(i),console.log("closing websockets")}}),[a,r]),Object(n.jsxs)(i.a.Fragment,{children:[Object(n.jsx)(Ua,{label:"Trace"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:t.container,children:Object(n.jsx)(ua,{itemActions:[],columns:[{label:"Time",elementKey:"ptime",renderFunction:function(e){var t=new Date(e);return re(t)},globalClass:t.timeItem},{label:"Name",elementKey:"api"},{label:"Status",elementKey:"",renderFunction:function(e){return"".concat(e.statusCode," ").concat(e.statusMsg)},renderFullObject:!0},{label:"Location",elementKey:"configuration_id",renderFunction:function(e){return"".concat(e.host," ").concat(e.client)},renderFullObject:!0},{label:"Load Time",elementKey:"callStats.duration",globalClass:t.timeItem},{label:"Upload",elementKey:"callStats.rx",renderFunction:ce,globalClass:t.sizeItem},{label:"Download",elementKey:"callStats.tx",renderFunction:ce,globalClass:t.sizeItem}],isLoading:!1,records:o,entityName:"Traces",idField:"api",customEmptyMessage:"There are no traced Elements yet",autoScrollToBottom:!0})})})]})}))),Td="LOG_MESSAGE_RECEIVED",Ed="LOG_RESET_MESSAGES";var Ad=Object(s.b)((function(e){return{messages:e.logs.messages}}),{logMessageReceived:function(e){return{type:Td,message:e}},logResetMessages:function(){return{type:Ed}}}),_d=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({logList:{background:"#fff",minHeight:400,height:"calc(100vh - 304px)",overflow:"auto",fontSize:13,padding:"25px 45px 0",border:"1px solid #EAEDEE",borderRadius:4},tab:{paddingLeft:25},logerror:{color:"#A52A2A"},logerror_tab:{color:"#A52A2A",paddingLeft:25},ansidefault:{color:"#000"},highlight:{"& span":{backgroundColor:"#082F5238"}}},Ie),Fe),Pe))}))(Ad((function(e){var t=e.classes,a=e.logMessageReceived,i=e.logResetMessages,r=e.messages,o=Object(c.useState)(""),s=Object(u.a)(o,2),l=s[0],d=s[1];Object(c.useEffect)((function(){i();var e=new URL(window.location.toString()),t=e.port,n=Cd(e.protocol),c=new vd.w3cwebsocket("".concat(n,"://").concat(e.hostname,":").concat(t,"/ws/console")),r=null;if(null!==c)return c.onopen=function(){console.log("WebSocket Client Connected"),c.send("ok"),r=setInterval((function(){c.send("ok")}),1e4)},c.onmessage=function(e){var t=JSON.parse(e.data.toString());t.time=wd()(t.time,"HH:mm:s UTC MM/DD/YYYY").toDate(),t.key=Math.random(),a(t)},c.onclose=function(){clearInterval(r),console.log("connection closed by server")},function(){c.close(1e3),clearInterval(r),console.log("closing websockets")}}),[a,i]);var b=function(e){var a=e.ConsoleMsg,c=(a=a.replace(/([^\x20-\x7F])/g,"")).replace(/((\[[0-9;]+m))/g,""),i=""!==l&&a.toLowerCase().includes(l.toLowerCase());return c.startsWith(" ")?Object(n.jsx)("div",{className:"".concat(i?t.highlight:""),children:Object(n.jsx)("span",{className:t.tab,children:c})},e.key):null!==e.error&&void 0!==e.error?function(e){var a=[];if(null!==e.error&&void 0!==e.error){if(e.api&&e.api.name){var c="API: ".concat(e.api.name),i=""!==l&&c.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsxs)("div",{className:"".concat(i?t.highlight:""),children:[Object(n.jsx)("br",{}),Object(n.jsx)("span",{className:t.logerror,children:c})]},"api-".concat(e.key)))}if(e.time){var r="Time: ".concat(re(e.time)),o=""!==l&&r.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(o?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:r})},"time-".concat(e.key)))}if(e.deploymentid){var s="DeploymentID: ".concat(e.deploymentid),d=""!==l&&s.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(d?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:s})},"deploytmentid-".concat(e.key)))}if(e.requestID){var b="RequestID: ".concat(e.requestID),u=""!==l&&b.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(u?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:b})},"requestid-".concat(e.key)))}if(e.remotehost){var j="RemoteHost: ".concat(e.remotehost),m=""!==l&&j.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(m?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:j})},"remotehost-".concat(e.key)))}if(e.host){var h="Host: ".concat(e.host),p=""!==l&&h.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(p?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:h})},"host-".concat(e.key)))}if(e.userAgent){var O="UserAgent: ".concat(e.userAgent),g=""!==l&&O.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(g?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:O})},"useragent-".concat(e.key)))}if(e.error.message){var f="Error: ".concat(e.error.message),x=""!==l&&f.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(x?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror,children:f})},"message-".concat(e.key)))}if(e.error.source)for(var v in e.error.source){var y=e.error.source[v],S=""!==l&&y.toLowerCase().includes(l.toLowerCase());a.push(Object(n.jsx)("div",{className:"".concat(S?t.highlight:""),children:Object(n.jsx)("span",{className:t.logerror_tab,children:y})},"source-".concat(e.key,"-").concat(v)))}}return a}(e):Object(n.jsx)("div",{className:"".concat(i?t.highlight:""),children:Object(n.jsx)("span",{className:t.ansidefault,children:c})},e.key)},j=r.map((function(e){return b(e)}));return Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)(x.a,{container:!0,className:t.logsSubContainer,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.actionsTray,children:Object(n.jsx)(f.a,{placeholder:"Highlight Line",className:t.searchField,id:"search-resource",label:"",onChange:function(e){d(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})}})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("div",{className:t.logList,children:j})})]})})}))),Id=a(993),Fd=Object(N.a)((function(e){return Object(k.a)({searchField:Object(j.a)(Object(j.a)({},Fe.searchField),{},{height:30,padding:0,"& input":{padding:"0 12px",height:28,fontSize:12,fontWeight:600,color:"#393939"},"&.isDisabled":{"&:hover":{borderColor:"#EAEDEE"}},"& input.Mui-disabled":{backgroundColor:"#EAEAEA"}}),labelStyle:{color:"#393939",fontSize:12,marginBottom:4},buttonKit:{display:"flex",alignItems:"center"},toggleButton:{marginRight:10},fieldContainer:{flexGrow:1,margin:"0 15px"}})}))((function(e){var t=e.classes,a=e.label,i=e.onChange,r=e.value,o=e.placeholder,s=void 0===o?"":o,l=e.id,d=e.name;return Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)("div",{className:t.fieldContainer,children:[Object(n.jsx)("div",{className:t.labelStyle,children:a}),Object(n.jsx)("div",{className:t.buttonKit,children:Object(n.jsx)(f.a,{placeholder:s,id:l,name:d,label:"",onChange:function(e){i(e.target.value)},InputProps:{disableUnderline:!0},className:t.searchField,value:r})})]})})})),Md={setErrorSnackMessage:V},Ld=Object(s.b)(null,Md),Dd=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)(Object(j.a)({inputBar:{flexGrow:1,marginLeft:15},advancedLabel:{display:"flex",alignItems:"center",color:"#091C42",border:0,backgroundColor:"transparent",cursor:"pointer","&:focus, &:active":{outline:"none"}},advancedLabelContainer:{marginTop:10},getInformationContainer:{textAlign:"right"},orderButton:{width:93},recordsLabel:{alignSelf:"center",marginLeft:15},blockCollapsed:{height:0,overflowY:"hidden",transitionDuration:"0.3s"},filterOpen:{height:200,marginBottom:12},endLineAction:{marginBottom:15},filtersContainer:{display:"flex",justifyContent:"space-between",marginBottom:12},innerContainer:{backgroundColor:"#fff",border:"#EAEDEE 1px solid",borderRadius:3,padding:10,marginBottom:15},noticeLabel:{marginLeft:15,marginBottom:15,fontSize:12,color:"#9C9C9C"},tableFOpen:{height:"calc(100vh - 561px)"},tableFClosed:{height:"calc(100vh - 349px)"},"@global":{".overrideMargin":{marginLeft:0}}},Fe),Ie),Pe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Ld((function(e){var t=e.classes,a=e.setErrorSnackMessage,i=Object(c.useState)(!0),r=Object(u.a)(i,2),o=r[0],s=r[1],l=Object(c.useState)(null),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)(null),h=Object(u.a)(m,2),p=h[0],O=h[1],f=Object(c.useState)(!1),v=Object(u.a)(f,2),y=v[0],S=v[1],C=Object(c.useState)([]),k=Object(u.a)(C,2),w=k[0],N=k[1],T=Object(c.useState)(""),E=Object(u.a)(T,2),A=E[0],_=E[1],I=Object(c.useState)(""),F=Object(u.a)(I,2),M=F[0],L=F[1],D=Object(c.useState)(""),B=Object(u.a)(D,2),R=B[0],P=B[1],z=Object(c.useState)(""),K=Object(u.a)(z,2),W=K[0],U=K[1],V=Object(c.useState)(""),G=Object(u.a)(V,2),q=G[0],H=G[1],Y=Object(c.useState)(""),Q=Object(u.a)(Y,2),J=Q[0],$=Q[1],X=Object(c.useState)("DESC"),ee=Object(u.a)(X,2),te=ee[0],ae=ee[1],ne=Object(c.useState)(["time","api_name","bucket","object","remote_host","request_id","user_agent","response_status"]),ie=Object(u.a)(ne,2),re=ie[0],oe=ie[1],se=Object(c.useState)(0),le=Object(u.a)(se,2),de=le[0],be=le[1],ue=Object(c.useState)(!1),me=Object(u.a)(ue,2),pe=me[0],Oe=me[1],ge=null,fe=Object(c.useCallback)((function(){if(!pe){Oe(!0);var e="".concat(""!==A?"&fp=bucket:".concat(A):"").concat(""!==W?"&fp=object:".concat(W):"").concat(""!==M?"&fp=api_name:".concat(M):"").concat(""!==q?"&fp=request_id:".concat(q):"").concat(""!==R?"&fp=user_agent:".concat(R):"").concat(""!==J?"&fp=response_status:".concat(J):"");(e=e.trim()).endsWith(",")&&(e=e.slice(0,-1)),he.invoke("GET","/api/v1/logs/search?q=reqinfo".concat(""!==e?"".concat(e):"","&pageSize=100&pageNo=").concat(de,"&order=").concat("DESC"===te?"timeDesc":"timeAsc").concat(null!==b?"&timeStart=".concat(b.toISOString()):"").concat(null!==p?"&timeEnd=".concat(p.toISOString()):"")).then((function(e){var t=e.results||[],a=[].concat(Object(Je.a)(w),Object(Je.a)(t));s(!1),Oe(!1),N(a),be(de+1),null!==ge&&ge()})).catch((function(e){s(!1),Oe(!1),a(e)}))}}),[A,W,M,q,R,J,de,te,b,p,pe,w,ge,a]);Object(c.useEffect)((function(){o&&(N([]),fe())}),[o,te,fe]);return Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)(x.a,{container:!0,className:t.logsSubContainer,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(t.actionsTray," ").concat(t.timeContainers),children:[Object(n.jsx)("span",{className:t.label,children:"Start Time"}),Object(n.jsx)(Gc,{value:b,onChange:j}),Object(n.jsx)("span",{className:t.label,children:"End Time"}),Object(n.jsx)(Gc,{value:p,onChange:O})]}),Object(n.jsx)(x.a,{item:!0,xs:12,className:"".concat(t.advancedLabelContainer),children:Object(n.jsx)("div",{className:"".concat(t.blockCollapsed," ").concat(y?t.filterOpen:""),children:Object(n.jsxs)("div",{className:t.innerContainer,children:[Object(n.jsxs)("div",{className:t.noticeLabel,children:["Enable your preferred options to get filtered records.",Object(n.jsx)("br",{}),"You can use '*' to match any character, '.' to signify a single character or '\\' to scape an special character (E.g. mybucket-*)"]}),Object(n.jsxs)("div",{className:t.filtersContainer,children:[Object(n.jsx)(Fd,{onChange:_,value:A,label:"Bucket",id:"bucket",name:"bucket"}),Object(n.jsx)(Fd,{onChange:L,value:M,label:"API Name",id:"api_name",name:"api_name"}),Object(n.jsx)(Fd,{onChange:P,value:R,label:"User Agent",id:"user_agent",name:"user_agent"})]}),Object(n.jsxs)("div",{className:t.filtersContainer,children:[Object(n.jsx)(Fd,{onChange:U,value:W,label:"Object",id:"object",name:"object"}),Object(n.jsx)(Fd,{onChange:H,value:q,label:"Request ID",id:"request_id",name:"request_id"}),Object(n.jsx)(Fd,{onChange:$,value:J,label:"Response Status",id:"response_status",name:"response_status"})]})]})})}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:"".concat(t.actionsTray," ").concat(t.endLineAction),children:[Object(n.jsx)("div",{children:Object(n.jsxs)("button",{type:"button",className:"".concat(t.advancedLabel," overrideMargin"),onClick:function(){S(!y)},children:["Advanced Filters"," ",y?Object(n.jsx)(Id.a,{}):Object(n.jsx)(Kt.a,{})]})}),Object(n.jsx)(g.a,{type:"button",variant:"contained",color:"primary",onClick:function(){be(0),s(!0)},children:"Get Information"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(ua,{columns:[{label:"Timestamp",elementKey:"time",enableSort:!0},{label:"API Name",elementKey:"api_name"},{label:"Bucket",elementKey:"bucket"},{label:"Object",elementKey:"object"},{label:"Remote Host",elementKey:"remote_host"},{label:"Request ID",elementKey:"request_id"},{label:"User Agent",elementKey:"user_agent"},{label:"Response Status",elementKey:"response_status",renderFunction:function(e){return Object(n.jsx)(c.Fragment,{children:Object(n.jsxs)("span",{children:[e.response_status_code," (",e.response_status,")"]})})},renderFullObject:!0},{label:"Request Content Length",elementKey:"request_content_length",renderFunction:ce},{label:"Response Content Length",elementKey:"response_content_length",renderFunction:ce},{label:"Time to Response NS",elementKey:"time_to_response_ns",renderFunction:je,contentTextAlign:"right"}],isLoading:o,records:w,entityName:"Logs",customEmptyMessage:"There is no information with this criteria",idField:"request_id",columnsSelector:!0,columnsShown:re,onColumnChange:function(e,t){var a=Object(Je.a)(re);t?a.includes(e)||a.push(e):a=re.filter((function(t){return t!==e})),oe(a)},customPaperHeight:y?t.tableFOpen:t.tableFClosed,sortConfig:{currentSort:"time",currentDirection:te,triggerSort:function(e){var t=Z()(e,"sortDirection","DESC");ae(t),be(0),s(!0)}},infiniteScrollConfig:{recordsCount:1e6,loadMoreRecords:function(e){return fe(),new Promise((function(e){ge=e}))}},textSelectable:!0})})]})})}))),Bd=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=Object(c.useState)(0),i=Object(u.a)(a,2),r=i[0],o=i[1],s=Object(c.useState)(!0),l=Object(u.a)(s,2),d=l[0],b=l[1],j=Object(c.useState)(!1),m=Object(u.a)(j,2),h=m[0],p=m[1];return Object(c.useEffect)((function(){he.invoke("GET","/api/v1/logs/search?q=reqinfo&pageSize=10&pageNo=0").then((function(){p(!0),b(!1)})).catch((function(e){b(!1),console.info("Log Search API not available.")}))}),[d]),Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(Ua,{label:"Logs"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsx)(x.a,{item:!0,xs:12,className:t.container,children:d?Object(n.jsx)(y.a,{}):Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.headerLabel,children:"All Logs"}),Object(n.jsxs)(tn.a,{value:r,onChange:function(e,t){o(t)},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(n.jsx)(an.a,{label:"Error Logs"}),h&&Object(n.jsx)(an.a,{label:"Logs Search"})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,children:[0===r&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(_d,{})}),1===r&&h&&Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Dd,{})})]})]})})})]})})),Rd=a(442),Pd=Object(N.a)((function(e){return Object(k.a)({root:{width:450,lineHeight:"50px",marginRight:15,"label + &":{marginTop:e.spacing(3)},"& .MuiSelect-select:focus":{backgroundColor:"transparent"}},input:{height:50,fontSize:13,lineHeight:"50px",width:450}})}))(ya.a),zd=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({watchList:{background:"white",maxHeight:"400",overflow:"auto","& ul":{margin:"4",padding:"0"},"& ul li":{listStyle:"none",margin:"0",padding:"0",borderBottom:"1px solid #dedede"}},graphContainer:{backgroundColor:"#fff",border:"#EAEDEE 1px solid",borderRadius:3,padding:"19px 38px"},scanInfo:{marginTop:20,display:"flex",flexDirection:"row",justifyContent:"space-between"},scanData:{fontSize:13},inlineCheckboxes:{display:"flex",justifyContent:"flex-start"}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=Object(c.useState)(!1),r=Object(u.a)(a,2),o=r[0],s=r[1],l=Object(c.useState)(""),d=Object(u.a)(l,2),b=d[0],j=d[1],m=Object(c.useState)([]),h=Object(u.a)(m,2),p=h[0],O=h[1],v=Object(c.useState)(""),y=Object(u.a)(v,2),S=y[0],C=y[1],k=Object(c.useState)(!1),w=Object(u.a)(k,2),N=w[0],T=w[1],E=Object(c.useState)(!1),A=Object(u.a)(E,2),_=A[0],I=A[1],F=Object(c.useState)(!1),M=Object(u.a)(F,2),L=M[0],D=M[1],B=Object(c.useState)({beforeHeal:[0,0,0,0],afterHeal:[0,0,0,0],objectsHealed:0,objectsScanned:0,healDuration:0,sizeScanned:""}),R=Object(u.a)(B,2),P=R[0],z=R[1];Object(c.useEffect)((function(){he.invoke("GET","/api/v1/buckets").then((function(e){var t=[];null!==e.buckets&&(t=e.buckets),O(t)})).catch((function(e){console.log(e)}))}),[]),Object(c.useEffect)((function(){!0===_&&D(!1)}),[_]),Object(c.useEffect)((function(){!0===L&&I(!1)}),[L]);var K=function(e){return[e.Green,e.Yellow,e.Red,e.Grey]};Object(c.useEffect)((function(){if(o){var e={Green:0,Yellow:0,Red:0,Grey:0},t={Green:0,Yellow:0,Red:0,Grey:0},a=new URL(window.location.toString()),n=a.port,c=Cd(a.protocol),i=new vd.w3cwebsocket("".concat(c,"://").concat(a.hostname,":").concat(n,"/ws/heal/").concat(b,"?prefix=").concat(S,"&recursive=").concat(N,"&force-start=").concat(_,"&force-stop=").concat(L));if(null!==i)return i.onopen=function(){console.log("WebSocket Client Connected"),i.send("ok")},i.onmessage=function(a){for(var n=JSON.parse(a.data.toString()),c=0,i=Object.entries(n.healthAfterCols);c1?"s":""),content:r.join(", ")}),Object(n.jsx)("br",{})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(Ba,{value:"force",id:"force",name:"force",checked:v,onChange:function(e){S(e.target.checked)},label:"Force Format",indicatorLabels:["Yes","No"]})}),"Are you sure you want to format"," ",i?Object(n.jsx)("strong",{children:"All"}):"the selected"," drive",r.length>1||i?"s":"","?.",Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),Object(n.jsx)("strong",{children:"All information contained will be erased and cannot be recovered"}),Object(n.jsx)("br",{}),Object(n.jsx)("br",{}),"To continue please type ",Object(n.jsx)("b",{children:"YES, PROCEED"})," in the box.",Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)(va,{id:"format-confirm",name:"format-confirm",onChange:function(e){p(e.target.value)},label:"",value:h})})]})}),d&&Object(n.jsx)(y.a,{}),Object(n.jsxs)(za.a,{children:[Object(n.jsx)(g.a,{onClick:function(){t(!1,[])},color:"primary",disabled:d,children:"Cancel"}),Object(n.jsxs)(g.a,{onClick:function(){d||(b(!0),he.invoke("POST","/api/v1/direct-csi/drives/format",{drives:r,force:v}).then((function(e){b(!1),t(!0,e.formatIssuesList)})).catch((function(e){b(!1),o(e)})))},color:"secondary",autoFocus:!0,disabled:"YES, PROCEED"!==h,children:["Format Drive",r.length>1||i?"s":""]})]})]})})),nb=Object(N.a)((function(e){return Object(k.a)({warningBlock:{color:"red"},buttonContainer:{textAlign:"right"},errorsList:{height:"calc(100vh - 280px)"}})}))((function(e){var t=e.open,a=e.onCloseFormatErrorsList,c=e.errorsList,i=e.classes;return Object(n.jsx)(ga,{modalOpen:t,title:"Format Errors",onClose:a,children:Object(n.jsxs)(x.a,{container:!0,children:[Object(n.jsxs)(x.a,{item:!0,xs:12,className:i.formScrollable,children:["There were some issues trying to format the selected CSI Drives, please fix the issues and try again.",Object(n.jsx)("br",{}),Object(n.jsx)(ua,{columns:[{label:"Node",elementKey:"node"},{label:"Drive",elementKey:"drive"},{label:"Message",elementKey:"error"}],entityName:"Format Errors",idField:"drive",records:c,isLoading:!1,customPaperHeight:i.errorsList,textSelectable:!0,noBackground:!0})]}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:i.buttonContainer,children:[Object(n.jsx)(g.a,{onClick:function(){!function(e,t){var a=document.createElement("a");a.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(t)),console.log(e),a.setAttribute("download",e),a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a)}("csiFormatErrors.json",JSON.stringify(Object(Je.a)(c)))},color:"primary",children:"Download"}),Object(n.jsx)(g.a,{onClick:a,color:"secondary",autoFocus:!0,children:"Done"})]})]})})})),cb={setErrorSnackMessage:V,selectDrive:function(e){return{type:eb,driveName:e}}},ib=Object(s.b)(null,cb),rb=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4},tableWrapper:{height:"calc(100vh - 275px)"},notAvailableNotice:{border:"#EAEDEE 1px solid",backgroundColor:"#FFF",display:"flex",padding:"19px 38px",overflow:"auto",position:"relative",boxShadow:"none",minHeight:200,overflowY:"scroll",borderRadius:3,flexDirection:"column",alignItems:"center",justifyContent:"center",height:"calc(100vh - 275px)",fontSize:18,fontWeight:600,textAlign:"center"},linkItem:{display:"default",color:"#072F51",textDecoration:"none","&:hover":{textDecoration:"underline",color:"#000"}}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(ib((function(e){var t=e.classes,a=(e.selectDrive,e.setErrorSnackMessage),i=Object(c.useState)([]),r=Object(u.a)(i,2),o=r[0],s=r[1],l=Object(c.useState)(""),d=Object(u.a)(l,2),b=d[0],m=d[1],h=Object(c.useState)([]),p=Object(u.a)(h,2),O=p[0],v=p[1],y=Object(c.useState)(!0),S=Object(u.a)(y,2),C=S[0],k=S[1],w=Object(c.useState)(!1),N=Object(u.a)(w,2),T=N[0],E=N[1],A=Object(c.useState)(!1),_=Object(u.a)(A,2),I=_[0],F=_[1],M=Object(c.useState)([]),L=Object(u.a)(M,2),D=L[0],B=L[1],R=Object(c.useState)(!1),P=Object(u.a)(R,2),z=P[0],K=P[1],W=Object(c.useState)([]),U=Object(u.a)(W,2),V=U[0],G=U[1],q=Object(c.useState)(!0),H=Object(u.a)(q,2),Y=H[0],Q=H[1];Object(c.useEffect)((function(){C&&!Y&&he.invoke("GET","/api/v1/direct-csi/drives").then((function(e){var t=Z()(e,"drives",[]);t||(t=[]),(t=t.map((function(e){var t=Object(j.a)({},e);return t.joinName="".concat(t.node,":").concat(t.drive),t}))).sort((function(e,t){return e.drive>t.drive?1:e.drive0&&(B(t),K(!0)),k(!0),v([]))},deleteOpen:T,allDrives:I,drivesToFormat:V}),z&&Object(n.jsx)(nb,{errorsList:D,open:z,onCloseFormatErrorsList:function(){K(!1)}}),Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(n.jsx)(f.a,{placeholder:"Search Drives",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(n.jsx)($e.a,{position:"start",children:Object(n.jsx)(et.a,{})})},onChange:function(e){m(e.target.value)},disabled:Y}),Object(n.jsx)(Mt.a,{color:"primary","aria-label":"Refresh Tenant List",component:"span",onClick:function(){k(!0)},disabled:Y,children:Object(n.jsx)(xo.a,{})}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(zi.a,{}),disabled:O.length<=0||Y,onClick:function(){O.length>0&&(G(O),F(!1),E(!0))},children:"Format Selected Drives"}),Object(n.jsx)(g.a,{variant:"contained",color:"primary",startIcon:Object(n.jsx)(ot,{}),onClick:function(){var e=o.map((function(e){return"".concat(e.node,":").concat(e.drive)}));F(!0),G(e),E(!0)},disabled:Y,children:"Format All Drives"})]}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Object(n.jsx)("br",{})}),Object(n.jsx)(x.a,{item:!0,xs:12,children:Y?Object(n.jsxs)("div",{className:t.notAvailableNotice,children:["To manage locally attached drives you need to install direct-csi, for more information",Object(n.jsx)("br",{}),"please follow this",Object(n.jsx)("a",{href:"https://github.com/minio/direct-csi",rel:"noreferrer",target:"_blank",className:t.linkItem,children:"Link"})]}):Object(n.jsx)(ua,{itemActions:J,columns:[{label:"Drive",elementKey:"drive"},{label:"Capacity",elementKey:"capacity",renderFunction:ce},{label:"Allocated",elementKey:"allocated",renderFunction:ce},{label:"Volumes",elementKey:"volumes"},{label:"Node",elementKey:"node"},{label:"Status",elementKey:"status"}],onSelect:function(e){var t=e.target,a=t.value,n=t.checked,c=Object(Je.a)(O);return n?c.push(a):c=c.filter((function(e){return e!==a})),v(c),c},selectedItems:O,isLoading:C,records:$,customPaperHeight:t.tableWrapper,entityName:"Drives",idField:"joinName"})})]})}))),ob=["/storage/volumes","/storage/drives"],sb=Object(N.a)((function(e){return Object(k.a)(Object(j.a)(Object(j.a)(Object(j.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4},tabsContainer:{marginBottom:15}},Ie),Fe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,a=e.match,i=Object(c.useState)(0),r=Object(u.a)(i,2),o=r[0],s=r[1];Object(c.useEffect)((function(){var e=ob.findIndex((function(e){return e===a.path}));s(e)}),[a]);return Object(n.jsxs)(c.Fragment,{children:[Object(n.jsx)(Ua,{label:"Storage"}),Object(n.jsx)(x.a,{container:!0,children:Object(n.jsxs)(x.a,{item:!0,xs:12,className:t.container,children:[Object(n.jsx)(x.a,{item:!0,xs:12,className:t.tabsContainer,children:Object(n.jsxs)(tn.a,{value:o,onChange:function(e,t){b.push(ob[t])},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",children:[Object(n.jsx)(an.a,{label:"Volumes"}),Object(n.jsx)(an.a,{label:"Drives"})]})}),Object(n.jsx)(l.c,{history:b,children:Object(n.jsxs)(l.d,{children:[Object(n.jsx)(l.b,{path:ob[0],component:Xd}),Object(n.jsx)(l.b,{path:ob[1],component:rb}),Object(n.jsx)(l.b,{render:function(){return Object(n.jsx)(l.a,{to:"/storage/volumes"})}})]})})]})})]})})),lb=Object(s.b)((function(e){return{open:e.system.sidebarOpen,needsRestart:e.system.serverNeedsRestart,isServerLoading:e.system.serverIsLoading,session:e.console.session,loadingProgress:e.system.loadingProgress,snackBarMessage:e.system.snackBar}}),{setMenuOpen:z,serverNeedsRestart:K,serverIsLoading:function(e){return{type:I,isLoading:e}},setSnackBarMessage:U}),db=Object(N.a)((function(e){return Object(k.a)(Object(j.a)({root:{display:"flex","& .MuiPaper-root.MuiSnackbarContent-root":{borderRadius:"0px 0px 5px 5px",boxShadow:"none"}},toolbar:{background:e.palette.background.default,color:"black",paddingRight:24},toolbarIcon:Object(j.a)({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"0 8px"},e.mixins.toolbar),appBar:{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})},appBarShift:{marginLeft:245,width:"calc(100% - ".concat(245,"px)"),transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})},menuButton:{marginRight:36},menuButtonHidden:{display:"none"},title:{flexGrow:1},drawerPaper:{position:"relative",whiteSpace:"nowrap",width:245,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden",background:"transparent linear-gradient(90deg, #073052 0%, #081C42 100%) 0% 0% no-repeat padding-box",boxShadow:"0px 3px 7px #00000014"},drawerPaperClose:Object(fe.a)({overflowX:"hidden",transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),width:e.spacing(7)},e.breakpoints.up("sm"),{width:e.spacing(9)}),content:{flexGrow:1,height:"100vh",overflow:"auto",position:"relative"},container:{paddingBottom:e.spacing(4),margin:0,width:"100%",maxWidth:"initial"},paper:{padding:e.spacing(2),display:"flex",overflow:"auto",flexDirection:"column"},fixedHeight:{minHeight:240},warningBar:{background:e.palette.primary.main,color:"white",heigh:"60px",widht:"100%",lineHeight:"60px",textAlign:"center"},progress:{height:"3px",backgroundColor:"#eaeaea"}},We))}))(lb((function(e){var t=e.classes,a=e.open,i=e.needsRestart,r=e.isServerLoading,o=e.serverNeedsRestart,s=e.serverIsLoading,d=e.session,m=e.loadingProgress,h=e.snackBarMessage,p=e.setSnackBarMessage,O=Object(c.useState)(!1),f=Object(u.a)(O,2),x=f[0],v=f[1],S=d.pages.reduce((function(e,t,a){return e[t]=!0,e}),{}),C=[{component:Xc,path:"/dashboard"},{component:Xn,path:"/buckets"},{component:Xn,path:"/buckets/:bucketName"},{component:vl,path:"/object-browser"},{component:od,path:"/object-browser/:bucket"},{component:od,path:"/object-browser/:bucket/*"},{component:Vd,path:"/watch"},{component:vr,path:"/users/:userName"},{component:vr,path:"/users"},{component:Fr,path:"/groups"},{component:sc,path:"/policies/:policyName"},{component:sc,path:"/policies"},{component:zd,path:"/heal"},{component:Nd,path:"/trace"},{component:Bd,path:"/logs"},{component:Zd,path:"/health-info"},{component:Po,path:"/settings"},{component:Ri,path:"/account",props:{changePassword:d.pages.includes("/account/change-password")}},{component:Uo,path:"/webhook/logger"},{component:Uo,path:"/webhook/audit"},{component:Ks,path:"/tenants"},{component:sb,path:"/storage"},{component:sb,path:"/storage/volumes"},{component:sb,path:"/storage/drives"},{component:al,path:"/namespaces/:tenantNamespace/tenants/:tenantName"},{component:xd,path:"/license"}].filter((function(e){return S[e.path]}));return Object(c.useEffect)((function(){""!==h.message?v(!0):v(!1)}),[h]),Object(n.jsx)(c.Fragment,{children:"ok"===d.status?Object(n.jsxs)("div",{className:t.root,children:[Object(n.jsx)(ve.a,{}),Object(n.jsx)(ye.a,{variant:"permanent",classes:{paper:Object(xe.a)(t.drawerPaper,!a&&t.drawerPaperClose)},open:a,children:Object(n.jsx)(yi,{pages:d.pages})}),Object(n.jsxs)("main",{className:t.content,children:[i&&Object(n.jsx)("div",{className:t.warningBar,children:r?Object(n.jsxs)(c.Fragment,{children:["The server is restarting.",Object(n.jsx)(y.a,{className:t.progress})]}):Object(n.jsxs)(c.Fragment,{children:["The instance needs to be restarted for configuration changes to take effect."," ",Object(n.jsx)(g.a,{color:"secondary",size:"small",onClick:function(){s(!0),he.invoke("POST","/api/v1/service/restart",{}).then((function(e){console.log("success restarting service"),console.log(e),s(!1),o(!1)})).catch((function(e){s(!1),console.log("failure restarting service"),console.log(e)}))},children:"Restart"})]})}),m<100&&Object(n.jsx)(y.a,{className:t.progress,variant:"determinate",value:m}),Object(n.jsx)("div",{className:t.snackDiv,children:Object(n.jsx)(Ce.a,{open:x,onClose:function(){v(!1),p("")},autoHideDuration:"error"===h.type?1e4:5e3,message:h.message,className:t.snackBarExternal,ContentProps:{className:"".concat(t.snackBar," ").concat("error"===h.type?t.errorSnackBar:"")}})}),Object(n.jsx)(Se.a,{className:t.container,children:Object(n.jsx)(l.c,{history:b,children:Object(n.jsxs)(l.d,{children:[C.map((function(e){return Object(n.jsx)(l.b,{exact:!0,path:e.path,children:function(t){return Object(n.jsx)(e.component,Object(j.a)(Object(j.a)({},t),e.props))}},e.path)})),C.length>0?Object(n.jsx)(l.a,{to:C[0].path}):null]})})})]})]}):null})}))),bb=function(e){var t=e.location,a=Object(c.useState)(""),i=Object(u.a)(a,2),r=i[0],o=i[1],s=Object(c.useState)(""),l=Object(u.a)(s,2),d=l[0],b=l[1];return Object(c.useEffect)((function(){var e=(t.search.match(/code=([^&]+)/)||[])[1],a=(t.search.match(/state=([^&]+)/)||[])[1],n=(t.search.match(/error=([^&]+)/)||[])[1],c=(t.search.match(/error_description=([^&]+)/)||[])[1];void 0!==n||void 0!==c?(o(n),b(c)):he.invoke("POST","/api/v1/login/oauth2/auth",{code:e,state:a}).then((function(e){e&&e.sessionId&&($.a.setItem("token",e.sessionId),window.location.href="/")})).catch((function(e){window.location.href="/login"}))}),[t.search]),""!==r||""!==d?Object(n.jsxs)("div",{children:[Object(n.jsx)("h2",{children:"IDP Error:"}),Object(n.jsx)("p",{children:r}),Object(n.jsx)("p",{children:d})]}):null},ub=a(443),jb="SESSION_RESPONSE";var mb=Object(s.b)((function(e){return{loggedIn:e.system.loggedIn}}),{userLoggedIn:P,consoleOperatorMode:function(e){return{type:E,operatorMode:e}},saveSessionResponse:function(e){return{type:jb,message:e}}})((function(e){var t=e.Component,a=e.loggedIn,i=e.userLoggedIn,r=e.consoleOperatorMode,o=e.saveSessionResponse,s=Object(c.useState)(!0),d=Object(u.a)(s,2),b=d[0],j=d[1];return Object(c.useEffect)((function(){he.invoke("GET","/api/v1/session").then((function(e){o(e),i(!0),j(!1),e.operator&&(r(!0),document.title="MinIO Operator")})).catch((function(){return j(!1)}))}),[o,r,i]),b?null:a?Object(n.jsx)(t,{}):Object(n.jsx)(l.a,{to:{pathname:"/login"}})})),hb=Object(ub.hot)((function(){return Object(n.jsx)(l.c,{history:b,children:Object(n.jsxs)(l.d,{children:[Object(n.jsx)(l.b,{exact:!0,path:"/oauth_callback",component:bb}),Object(n.jsx)(l.b,{exact:!0,path:"/login",component:ge}),Object(n.jsx)(mb,{Component:db})]})})})),pb=a(138),Ob=a(444),gb={loggedIn:!1,operatorMode:!1,session:"",userName:"",sidebarOpen:!0,serverNeedsRestart:!1,serverIsLoading:!1,loadingProgress:100,snackBar:{message:"",type:"message"},modalSnackBar:{message:"",type:"message"},serverDiagnosticStatus:""};var fb={messages:[]};var xb={messages:[]};var vb={message:{}};var yb={messages:[]};var Sb={session:{operator:!1,status:"",pages:[],features:[]}};var Cb={open:!1,addBucketName:"",addBucketVersioningEnabled:!1,addBucketLockingEnabled:!1,addBucketQuotaEnabled:!1,addBucketQuotaType:"hard",addBucketQuotaSize:"1",addBucketQuotaUnit:"TiB",addBucketRetentionEnabled:!1,addBucketRetentionMode:"compliance",addBucketRetentionUnit:"days",addBucketRetentionValidity:1};var kb=[{route:"/object-browser",label:"All Buckets",type:"path"}],wb={routesList:kb,downloadingFiles:[]};var Nb=a(445),Tb=a.n(Nb),Eb={createTenant:{page:0,validPages:[],advancedModeOn:!1,storageClasses:[],limitSize:{},fields:{nameTenant:{tenantName:"",namespace:"",selectedStorageClass:""},configure:{customImage:!1,imageName:"",consoleImage:"",customDockerhub:!1,imageRegistry:"",imageRegistryUsername:"",imageRegistryPassword:"",exposeMinIO:!0,exposeConsole:!0,logSearchCustom:!1,prometheusCustom:!1,logSearchVolumeSize:"5",logSearchSizeFactor:"Gi",logSearchImage:"",kesImage:"",logSearchPostgresImage:"",prometheusVolumeSize:"5",prometheusSizeFactor:"Gi",logSearchSelectedStorageClass:"",prometheusSelectedStorageClass:"",prometheusImage:""},identityProvider:{idpSelection:"Built-in",accessKeys:[ps(16)],secretKeys:[ps(32)],openIDURL:"",openIDClientID:"",openIDSecretID:"",ADURL:"",ADSkipTLS:!1,ADServerInsecure:!1,ADUserNameFilter:"",ADGroupBaseDN:"",ADGroupSearchFilter:"",ADNameAttribute:""},security:{enableAutoCert:!0,enableCustomCerts:!1,enableTLS:!0},encryption:{enableEncryption:!1,encryptionType:"vault",gemaltoEndpoint:"",gemaltoToken:"",gemaltoDomain:"",gemaltoRetry:"0",awsEndpoint:"",awsRegion:"",awsKMSKey:"",awsAccessKey:"",awsSecretKey:"",awsToken:"",vaultEndpoint:"",vaultEngine:"",vaultNamespace:"",vaultPrefix:"",vaultAppRoleEngine:"",vaultId:"",vaultSecret:"",vaultRetry:"0",vaultPing:"0",gcpProjectID:"",gcpEndpoint:"",gcpClientEmail:"",gcpClientID:"",gcpPrivateKeyID:"",gcpPrivateKey:"",enableCustomCertsForKES:!1},tenantSize:{volumeSize:"100",sizeFactor:"Gi",drivesPerServer:"1",nodes:"4",memoryNode:"2",ecParity:"",ecParityChoices:[],cleanECChoices:[],maxAllocableMemo:0,memorySize:{error:"",limit:0,request:0},distribution:{error:"",nodes:0,persistentVolumes:0,disks:0,volumePerDisk:0},ecParityCalc:{error:0,defaultEC:"",erasureCodeSet:0,maxEC:"",rawCapacity:"0",storageFactors:[]},limitSize:{}},affinity:{nodeSelectorLabels:"",podAffinity:"default",withPodAntiAffinity:!0}},certificates:{minioCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],caCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],consoleCertificate:{id:"console_cert_pair",key:"",cert:"",encoded_key:"",encoded_cert:""},serverCertificate:{id:"encryptionServerCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},clientCertificate:{id:"encryptionClientCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},vaultCertificate:{id:"encryptionVaultCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},vaultCA:{id:"encryptionVaultCA",key:"",cert:"",encoded_key:"",encoded_cert:""},gemaltoCA:{id:"encryptionGemaltoCA",key:"",cert:"",encoded_key:"",encoded_cert:""}}}};var Ab={selectedDrive:""};var _b=Object(pb.c)({system:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case T:return Object(j.a)(Object(j.a)({},e),{},{loggedIn:t.logged});case E:return Object(j.a)(Object(j.a)({},e),{},{operatorMode:t.operatorMode});case A:return Object(j.a)(Object(j.a)({},e),{},{sidebarOpen:t.open});case _:return Object(j.a)(Object(j.a)({},e),{},{serverNeedsRestart:t.needsRestart});case I:return Object(j.a)(Object(j.a)({},e),{},{serverIsLoading:t.isLoading});case F:return Object(j.a)(Object(j.a)({},e),{},{loadingProgress:t.loadingProgress});case M:return Object(j.a)(Object(j.a)({},e),{},{snackBar:{message:t.message,type:"message"}});case D:return Object(j.a)(Object(j.a)({},e),{},{snackBar:{message:t.message,type:"error"}});case B:return Object(j.a)(Object(j.a)({},e),{},{modalSnackBar:{message:t.message,type:"message"}});case R:return Object(j.a)(Object(j.a)({},e),{},{modalSnackBar:{message:t.message,type:"error"}});case L:return Object(j.a)(Object(j.a)({},e),{},{serverDiagnosticStatus:t.serverDiagnosticStatus});default:return e}},trace:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case yd:return Object(j.a)(Object(j.a)({},e),{},{messages:[].concat(Object(Je.a)(e.messages),[t.message])});case Sd:return Object(j.a)(Object(j.a)({},e),{},{messages:[]});default:return e}},logs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Td:return Object(j.a)(Object(j.a)({},e),{},{messages:[].concat(Object(Je.a)(e.messages),[t.message])});case Ed:return Object(j.a)(Object(j.a)({},e),{},{messages:[]});default:return e}},watch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Kd:return Object(j.a)(Object(j.a)({},e),{},{messages:[].concat(Object(Je.a)(e.messages),[t.message])});case Wd:return Object(j.a)(Object(j.a)({},e),{},{messages:[]});default:return e}},console:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Sb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case jb:return Object(j.a)(Object(j.a)({},e),{},{session:t.message});default:return e}},buckets:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ft:return Object(j.a)(Object(j.a)({},e),{},{open:t.open});case xt:return Object(j.a)(Object(j.a)({},e),{},{addBucketName:t.name});case vt:return Object(j.a)(Object(j.a)({},e),{},{addBucketVersioningEnabled:t.versioned});case yt:return Object(j.a)(Object(j.a)({},e),{},{addBucketLockingEnabled:t.locking});case St:return Object(j.a)(Object(j.a)({},e),{},{addBucketQuotaEnabled:t.quota});case Ct:return Object(j.a)(Object(j.a)({},e),{},{addBucketQuotaType:t.quotaType});case kt:return Object(j.a)(Object(j.a)({},e),{},{addBucketQuotaSize:t.quotaSize});case wt:return Object(j.a)(Object(j.a)({},e),{},{addBucketQuotaUnit:t.quotaUnit});case Tt:return Object(j.a)(Object(j.a)({},e),{},{addBucketRetentionEnabled:t.retention});case Et:return Object(j.a)(Object(j.a)({},e),{},{addBucketRetentionMode:t.retentionMode});case At:return Object(j.a)(Object(j.a)({},e),{},{addBucketRetentionUnit:t.retentionUnit});case _t:return Object(j.a)(Object(j.a)({},e),{},{addBucketRetentionValidity:t.retentionValidity});case Nt:return Object(j.a)(Object(j.a)({},e),{},{addBucketName:"",addBucketVersioningEnabled:!1,addBucketLockingEnabled:!1,addBucketQuotaEnabled:!1,addBucketQuotaType:"hard",addBucketQuotaSize:"1",addBucketQuotaUnit:"TiB",addBucketRetentionEnabled:!1,addBucketRetentionMode:"compliance",addBucketRetentionUnit:"days",addBucketRetentionValidity:1});default:return e}},objectBrowser:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case nl:var a=[].concat(Object(Je.a)(e.routesList),[{route:t.route,label:t.label,type:t.routeType}]);return b.push(t.route),Object(j.a)(Object(j.a)({},e),{},{routesList:a});case cl:return Object(j.a)(Object(j.a)({},e),{},{routesList:[].concat(kb)});case il:var n=e.routesList.findIndex((function(e){return e.route===t.toRoute}))+1,c=e.routesList.slice(0,n);return Object(j.a)(Object(j.a)({},e),{},{routesList:c});case rl:var i=t.currentRoute.split("/"),r=[],o=kb[0].route;i.forEach((function(e){""!==e&&"object-browser"!==e&&(o="".concat(o,"/").concat(e),r.push({route:o,label:e,type:"path"}))}));var s=[].concat(kb,r);return Object(j.a)(Object(j.a)({},e),{},{routesList:s});case ol:var l=Object(Je.a)(e.routesList),d=e.routesList[e.routesList.length-1].route,u=t.newRoute.split("/");return u.forEach((function(e){var t=e.trim();if(""!==t){var a={route:d="".concat(d,"/").concat(t),label:t,type:"path"};l.push(a)}})),b.push(d),Object(j.a)(Object(j.a)({},e),{},{routesList:l});case sl:var m=e.routesList,h=m.slice(-1)[0];"path"===h.type&&(h.type="file");var p=[].concat(Object(Je.a)(m.slice(0,-1)),[h]);return Object(j.a)(Object(j.a)({},e),{},{routesList:p});case ll:var O=Object(Je.a)(e.downloadingFiles);return O.push(t.path),Object(j.a)(Object(j.a)({},e),{},{downloadingFiles:Object(Je.a)(O)});case dl:var g=e.downloadingFiles.filter((function(e){return e!==t.path}));return Object(j.a)(Object(j.a)({},e),{},{downloadingFiles:Object(Je.a)(g)});default:return e}},healthInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Gd:return Object(j.a)(Object(j.a)({},e),{},{message:t.message});case qd:return Object(j.a)(Object(j.a)({},e),{},{message:{}});default:return e}},tenants:function(){var e,t,a,n,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Eb,i=arguments.length>1?arguments[1]:void 0,r=Object(j.a)({},c);switch(i.type){case Ho:return r.createTenant.page=i.page,Object(j.a)({},r);case Yo:return r.createTenant.advancedModeOn=i.state,Object(j.a)({},r);case Qo:if(Tb()(r.createTenant.fields,"".concat(i.pageName,".").concat(i.field))){var o=Z()(r.createTenant.fields,"".concat(i.pageName),{}),s={};s[i.field]=i.value;var l=Object(j.a)(Object(j.a)({},o),s);return r.createTenant.fields[i.pageName]=Object(j.a)({},l),Object(j.a)({},r)}return c;case Zo:var d=c.createTenant.validPages;if(i.valid)d.includes(i.pageName)||(d.push(i.pageName),r.createTenant.validPages=Object(Je.a)(d));else{var b=d.filter((function(e){return e!==i.pageName}));r.createTenant.validPages=Object(Je.a)(b)}return Object(j.a)({},r);case $o:var u=Object(j.a)(Object(j.a)({},c),{},{createTenant:Object(j.a)(Object(j.a)({},c.createTenant),{},{storageClasses:i.storageClasses})});return Object(j.a)({},u);case Xo:var m=[].concat(Object(Je.a)(c.createTenant.certificates.minioCertificates),[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}]);return r.createTenant.certificates.minioCertificates=Object(Je.a)(m),Object(j.a)({},r);case es:var h=c.createTenant.certificates.minioCertificates,p=h.map((function(e){var t;return e.id===i.id?Object(j.a)(Object(j.a)({},e),{},(t={},Object(fe.a)(t,i.key,i.fileName),Object(fe.a)(t,"encoded_".concat(i.key),i.value),t)):e}));return r.createTenant.certificates.minioCertificates=Object(Je.a)(p),Object(j.a)({},r);case ts:var O=c.createTenant.certificates.minioCertificates;if(O.length>1){var g=O.filter((function(e){return e.id!==i.id}));return r.createTenant.certificates.minioCertificates=Object(Je.a)(g),Object(j.a)({},r)}return Object(j.a)({},c);case as:var f=[].concat(Object(Je.a)(c.createTenant.certificates.caCertificates),[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}]);return r.createTenant.certificates.caCertificates=Object(Je.a)(f),Object(j.a)({},r);case ns:var x=c.createTenant.certificates.caCertificates,v=x.map((function(e){var t;return e.id===i.id?Object(j.a)(Object(j.a)({},e),{},(t={},Object(fe.a)(t,i.key,i.fileName),Object(fe.a)(t,"encoded_".concat(i.key),i.value),t)):e}));return r.createTenant.certificates.caCertificates=Object(Je.a)(v),Object(j.a)({},r);case cs:var y=c.createTenant.certificates.minioCertificates;if(y.length>1){var S=y.filter((function(e){return e.id!==i.id}));return r.createTenant.certificates.caCertificates=Object(Je.a)(S),Object(j.a)({},r)}return Object(j.a)({},c);case is:var C=c.createTenant.certificates.consoleCertificate;return r.createTenant.certificates.consoleCertificate=Object(j.a)(Object(j.a)({},C),{},(e={},Object(fe.a)(e,i.key,i.fileName),Object(fe.a)(e,"encoded_".concat(i.key),i.value),e)),Object(j.a)({},r);case rs:var k=c.createTenant.certificates.serverCertificate;return r.createTenant.certificates.serverCertificate=Object(j.a)(Object(j.a)({},k),{},(t={},Object(fe.a)(t,i.key,i.fileName),Object(fe.a)(t,"encoded_".concat(i.key),i.value),t)),Object(j.a)({},r);case os:var w=c.createTenant.certificates.clientCertificate;return r.createTenant.certificates.clientCertificate=Object(j.a)(Object(j.a)({},w),{},(a={},Object(fe.a)(a,i.key,i.fileName),Object(fe.a)(a,"encoded_".concat(i.key),i.value),a)),Object(j.a)({},r);case ss:var N=c.createTenant.certificates.vaultCertificate;return r.createTenant.certificates.vaultCertificate=Object(j.a)(Object(j.a)({},N),{},(n={},Object(fe.a)(n,i.key,i.fileName),Object(fe.a)(n,"encoded_".concat(i.key),i.value),n)),Object(j.a)({},r);case ls:var T=c.createTenant.certificates.vaultCA;return r.createTenant.certificates.vaultCA=Object(j.a)(Object(j.a)({},T),{},{cert:i.fileName,encoded_cert:i.value}),Object(j.a)({},r);case ds:var E=c.createTenant.certificates.gemaltoCA;return r.createTenant.certificates.gemaltoCA=Object(j.a)(Object(j.a)({},E),{},{cert:i.fileName,encoded_cert:i.value}),Object(j.a)({},r);case Jo:return Object(j.a)(Object(j.a)({},c),{},{createTenant:{page:0,validPages:[],advancedModeOn:!1,storageClasses:[],limitSize:{},fields:{nameTenant:{tenantName:"",namespace:"",selectedStorageClass:""},configure:{customImage:!1,imageName:"",consoleImage:"",customDockerhub:!1,imageRegistry:"",imageRegistryUsername:"",imageRegistryPassword:"",exposeMinIO:!0,exposeConsole:!0,logSearchCustom:!1,prometheusCustom:!1,logSearchVolumeSize:"5",logSearchSizeFactor:"Gi",logSearchSelectedStorageClass:"",logSearchImage:"",kesImage:"",logSearchPostgresImage:"",prometheusVolumeSize:"5",prometheusSizeFactor:"Gi",prometheusSelectedStorageClass:"",prometheusImage:""},identityProvider:{idpSelection:"Built-in",accessKeys:[ps(16)],secretKeys:[ps(32)],openIDURL:"",openIDClientID:"",openIDSecretID:"",ADURL:"",ADSkipTLS:!1,ADServerInsecure:!1,ADUserNameFilter:"",ADGroupBaseDN:"",ADGroupSearchFilter:"",ADNameAttribute:""},security:{enableAutoCert:!0,enableCustomCerts:!1,enableTLS:!0},encryption:{enableEncryption:!1,encryptionType:"vault",gemaltoEndpoint:"",gemaltoToken:"",gemaltoDomain:"",gemaltoRetry:"0",awsEndpoint:"",awsRegion:"",awsKMSKey:"",awsAccessKey:"",awsSecretKey:"",awsToken:"",vaultEndpoint:"",vaultEngine:"",vaultNamespace:"",vaultPrefix:"",vaultAppRoleEngine:"",vaultId:"",vaultSecret:"",vaultRetry:"0",vaultPing:"0",gcpProjectID:"",gcpEndpoint:"",gcpClientEmail:"",gcpClientID:"",gcpPrivateKeyID:"",gcpPrivateKey:"",enableCustomCertsForKES:!1},tenantSize:{volumeSize:"100",sizeFactor:"Gi",drivesPerServer:"1",nodes:"4",memoryNode:"2",ecParity:"",ecParityChoices:[],cleanECChoices:[],maxAllocableMemo:0,memorySize:{error:"",limit:0,request:0},distribution:{error:"",nodes:0,persistentVolumes:0,disks:0,volumePerDisk:0},ecParityCalc:{error:0,defaultEC:"",erasureCodeSet:0,maxEC:"",rawCapacity:"0",storageFactors:[]},limitSize:{}},affinity:{nodeSelectorLabels:"",podAffinity:"default",withPodAntiAffinity:!0}},certificates:{minioCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],caCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],consoleCertificate:{id:"console_cert_pair",key:"",cert:"",encoded_key:"",encoded_cert:""},serverCertificate:{id:"encryptionServerCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},clientCertificate:{id:"encryptionClientCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},vaultCertificate:{id:"encryptionVaultCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},vaultCA:{id:"encryptionVaultCA",key:"",cert:"",encoded_key:"",encoded_cert:""},gemaltoCA:{id:"encryptionGemaltoCA",key:"",cert:"",encoded_key:"",encoded_cert:""}}}});default:return c}},directCSI:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ab,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case eb:if(""!==t.driveName){var a=Object(j.a)({},e);return a.selectedDrive=t.driveName,a}return e;default:return e}}}),Ib=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||pb.d;Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var Fb=a(994),Mb=(a(905),a(906),a(907),a(908),a(446)),Lb=Object(Mb.a)({palette:{primary:{light:"#073052",main:"#081C42",dark:"#05122B",contrastText:"#fff"},secondary:{light:"#ff7961",main:"#f44336",dark:"#ba000d",contrastText:"#000"},error:{light:"#e03a48",main:"#dc1f2e",contrastText:"#ffffff"},grey:{100:"#f0f0f0",200:"#e6e6e6",300:"#cccccc",400:"#999999",500:"#8c8c8c",600:"#737373",700:"#666666",800:"#4d4d4d",900:"#333333"},background:{default:"#F4F4F4"}},typography:{fontFamily:["Lato","sans-serif"].join(","),h1:{fontWeight:"bold",color:"#081C42"},h2:{fontWeight:"bold",color:"#081C42"},h3:{fontWeight:"bold",color:"#081C42"},h4:{fontWeight:"bold",color:"#081C42"},h5:{fontWeight:"bold",color:"#081C42"},h6:{fontWeight:"bold",color:"#000000"}},overrides:{MuiButton:{root:{borderRadius:3,color:"white",height:40,padding:"0 20px",fontSize:14,fontWeight:600,boxShadow:"none","& .MuiSvgIcon-root":{maxHeight:18},"&.MuiButton-contained.Mui-disabled":{backgroundColor:"#EAEDEE",fontWeight:600,color:"#767676"},"& .MuiButton-iconSizeMedium > *:first-child":{fontSize:12}}}}}),Db=Object(N.a)({"@global":{".MuiButton-contained":{fontSize:"14px",textTransform:"capitalize",padding:"16px 25px 16px 25px",borderRadius:3},".MuiButton-sizeSmall":{padding:"4px 10px",fontSize:"0.8125rem"},".MuiTableCell-head":{borderRadius:"3px 3px 0px 0px",fontSize:13},".MuiPaper-root":{borderRadius:3},".MuiDrawer-paperAnchorDockedLeft":{borderRight:0},".MuiDrawer-root":{"& .MuiPaper-root":{borderRadius:0}}}})((function(){return null}));o.a.render(Object(n.jsxs)(s.a,{store:Object(pb.e)(_b,Ib(Object(pb.a)(Ob.a))),children:[Object(n.jsx)(Db,{}),Object(n.jsx)(Fb.a,{theme:Lb,children:Object(n.jsx)(hb,{})})]}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[909,1,2]]]); //# sourceMappingURL=main.e94e6cae.chunk.js.map \ No newline at end of file diff --git a/portal-ui/build/static/js/main.e94e6cae.chunk.js.map b/portal-ui/build/static/js/main.e94e6cae.chunk.js.map index 6adf5311c3..772104c3a4 100644 --- a/portal-ui/build/static/js/main.e94e6cae.chunk.js.map +++ b/portal-ui/build/static/js/main.e94e6cae.chunk.js.map @@ -1 +1 @@ -{"version":3,"sources":["history.ts","types.ts","actions.ts","screens/LoginPage/types.ts","common/utils.ts","common/api/index.ts","screens/LoginPage/LoginPage.tsx","screens/Console/Common/FormComponents/common/styleLibrary.ts","common/Copyright.tsx","screens/NotFoundPage.tsx","icons/CopyIcon.tsx","icons/CreateIcon.tsx","icons/DeleteIcon.tsx","icons/DashboardIcon.tsx","icons/BucketsIcon.tsx","icons/UsersIcon.tsx","icons/ServiceAccountsIcon.tsx","icons/GroupsIcon.tsx","icons/IAMPoliciesIcon.tsx","icons/TraceIcon.tsx","icons/ConfigurationsListIcon.tsx","icons/ClustersIcon.tsx","icons/WatchIcon.tsx","screens/Console/Buckets/actions.ts","screens/Console/Common/TableWrapper/TableActionIcons/common.ts","screens/Console/Common/TableWrapper/TableActionIcons/ViewIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/PencilIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/ShareIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/DeleteIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/DescriptionIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/CloudIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/ConsoleIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/DownloadIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/DisableIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/FormatDriveIcon.tsx","screens/Console/Common/TableWrapper/TableActionButton.tsx","icons/HelpIcon.tsx","screens/Console/Common/FormComponents/CheckboxWrapper/CheckboxWrapper.tsx","screens/Console/Common/TableWrapper/TableWrapper.tsx","screens/Console/Common/ModalWrapper/ModalWrapper.tsx","screens/Console/Common/FormComponents/InputBoxWrapper/InputBoxWrapper.tsx","screens/Console/Common/FormComponents/SelectWrapper/SelectWrapper.tsx","screens/Console/Common/FormComponents/RadioGroupSelector/RadioGroupSelector.tsx","screens/Console/Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper.tsx","screens/Console/Buckets/ListBuckets/AddBucket.tsx","screens/Console/Buckets/ListBuckets/DeleteBucket.tsx","screens/Console/Common/PageHeader/PageHeader.tsx","screens/Console/Common/FormComponents/PredefinedList/PredefinedList.tsx","screens/Console/Common/GenericWizard/WizardPage.tsx","screens/Console/Common/GenericWizard/GenericWizard.tsx","screens/Console/Buckets/ListBuckets/BulkReplicationModal.tsx","screens/Console/Buckets/ListBuckets/ListBuckets.tsx","screens/Console/Buckets/ViewBucket/SetAccessPolicy.tsx","screens/Console/Buckets/ViewBucket/SetRetentionConfig.tsx","screens/Console/Buckets/ViewBucket/AddEvent.tsx","screens/Console/Buckets/ViewBucket/DeleteEvent.tsx","screens/Console/Buckets/ViewBucket/AddReplicationModal.tsx","screens/Console/Buckets/ViewBucket/EnableBucketEncryption.tsx","screens/Console/Buckets/ViewBucket/EnableVersioningModal.tsx","icons/UsageIcon.tsx","screens/Console/Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper.tsx","screens/Console/Policies/AddPolicy.tsx","screens/Console/Buckets/ViewBucket/DeleteReplicationRule.tsx","icons/AddIcon.tsx","screens/Console/Common/FormComponents/QueryMultiSelector/QueryMultiSelector.tsx","screens/Console/Buckets/ViewBucket/EditLifecycleConfiguration.tsx","screens/Console/Common/FormComponents/DateSelector/utils.ts","screens/Console/Common/FormComponents/DateSelector/DateSelector.tsx","screens/Console/Buckets/ViewBucket/AddLifecycleModal.tsx","screens/Console/Buckets/ViewBucket/ViewBucket.tsx","screens/Console/Dashboard/Prometheus/types.ts","screens/Console/Buckets/Buckets.tsx","screens/Console/Policies/DeletePolicy.tsx","screens/Console/Policies/ListPolicies.tsx","screens/Console/Policies/PolicyDetails.tsx","screens/Console/Policies/Policies.tsx","screens/Console/Dashboard/Prometheus/utils.ts","screens/Console/Dashboard/Prometheus/Widgets/SingleValueWidget.tsx","screens/Console/Dashboard/Prometheus/Widgets/tooltips/LineChartTooltip.tsx","screens/Console/Dashboard/Prometheus/Widgets/LinearGraphWidget.tsx","screens/Console/Dashboard/Prometheus/Widgets/tooltips/BarChartTooltip.tsx","screens/Console/Dashboard/Prometheus/Widgets/BarChartWidget.tsx","screens/Console/Dashboard/Prometheus/Widgets/PieChartWidget.tsx","screens/Console/Dashboard/Prometheus/Widgets/SingleRepWidget.tsx","screens/Console/Common/FormComponents/DateTimePickerWrapper/DateTimePickerWrapper.tsx","icons/SyncIcon.tsx","screens/Console/Dashboard/Prometheus/PrDashboard.tsx","icons/AllBucketsIcon.tsx","icons/EgressIcon.tsx","screens/Console/Dashboard/BasicDashboard/BasicDashboard.tsx","screens/Console/Dashboard/Dashboard.tsx","icons/minio_console_logo.svg","icons/minio_operator_logo.svg","screens/Console/Menu/utils.ts","icons/LicenseIcon.tsx","icons/LogoutIcon.tsx","icons/ConsoleIcon.tsx","icons/HealIcon.tsx","screens/Console/Menu/Menu.tsx","screens/Console/Account/AddServiceAccount.tsx","screens/Console/Account/DeleteServiceAccount.tsx","screens/Console/Common/CredentialsPrompt/CredentialsPrompt.tsx","utils/sortFunctions.ts","screens/Console/Account/ChangePasswordModal.tsx","screens/Console/Account/Account.tsx","screens/Console/Users/GroupsSelectors.tsx","screens/Console/Users/AddUser.tsx","screens/Console/Users/DeleteUser.tsx","screens/Console/Users/BulkAddToGroup.tsx","screens/Console/Policies/PolicySelectors.tsx","screens/Console/Policies/SetPolicy.tsx","screens/Console/Users/ListUsers.tsx","screens/shared/tabs.tsx","screens/Console/Users/ChangeUserGroups.tsx","screens/Console/Users/SetUserPolicies.tsx","screens/Console/Users/UserDetails.tsx","screens/Console/Users/Users.tsx","screens/Console/Groups/UsersSelectors.tsx","screens/Console/Groups/AddGroup.tsx","screens/Console/Groups/DeleteGroup.tsx","screens/Console/Groups/Groups.tsx","screens/Console/Configurations/utils.ts","screens/Console/Common/FormComponents/CSVMultiSelector/CSVMultiSelector.tsx","screens/Console/Common/FormComponents/CommentBoxWrapper/CommentBoxWrapper.tsx","screens/Console/Configurations/ConfTargetGeneric.tsx","screens/Console/Configurations/CustomForms/EditConfiguration.tsx","screens/Console/Common/SlideOptions/SlideOptions.tsx","icons/BackSettingsIcon.tsx","screens/Console/Configurations/ConfigurationPanels/ConfigurationsList.tsx","screens/Console/Configurations/NotificationEndpoints/utils.ts","screens/Console/Configurations/CustomForms/ConfPostgres.tsx","screens/Console/Configurations/CustomForms/ConfMySql.tsx","screens/Console/Configurations/NotificationEndpoints/AddNotificationEndpoint.tsx","screens/Console/Configurations/NotificationEndpoints/NotificationTypeSelector.tsx","screens/Console/Configurations/NotificationEndpoints/ListNotificationEndpoints.tsx","screens/shared/ErrorBlock.tsx","screens/Console/Common/FormComponents/FileSelector/FileSelector.tsx","screens/Console/Common/FormComponents/FileSelector/utils.ts","screens/Console/Configurations/TiersConfiguration/AddTierConfiguration.tsx","screens/Console/Configurations/TiersConfiguration/UpdateTierCredentiasModal.tsx","screens/Console/Configurations/TiersConfiguration/ListTiersConfiguration.tsx","screens/Console/Configurations/ConfigurationMain.tsx","screens/Console/Configurations/ConfigurationPanels/WebhookPanel.tsx","screens/Console/Tenants/ListTenants/DeleteTenant.tsx","screens/Console/Tenants/TenantDetails/utils.ts","screens/Console/Tenants/types.ts","screens/Console/Tenants/actions.ts","utils/validationFunctions.ts","screens/Console/Tenants/utils.ts","screens/Console/Tenants/AddTenant/Steps/NameTenant.tsx","screens/Console/Tenants/ListTenants/utils.ts","screens/Console/Tenants/AddTenant/Steps/Configure.tsx","screens/Console/Tenants/AddTenant/Steps/IdentityProvider.tsx","screens/Console/Tenants/AddTenant/Steps/Security.tsx","screens/Console/Tenants/AddTenant/Steps/Encryption.tsx","screens/Console/Tenants/AddTenant/Steps/TenantSize.tsx","screens/Console/Tenants/AddTenant/Steps/Preview.tsx","screens/Console/Tenants/AddTenant/Steps/Affinity.tsx","screens/Console/Tenants/AddTenant/AddTenant.tsx","screens/Console/Tenants/ListTenants/ListTenants.tsx","screens/Console/Tenants/TenantsMain.tsx","screens/Console/Tenants/TenantDetails/AddPoolModal.tsx","screens/Console/Tenants/TenantDetails/ReplicationSetup.tsx","screens/Console/Common/UsageBarWrapper/UsageBarWrapper.tsx","screens/Console/Tenants/TenantDetails/UpdateTenantModal.tsx","screens/Console/Tenants/TenantDetails/TenantYAML.tsx","screens/Console/Tenants/TenantDetails/SubnetLicenseTenant.tsx","screens/Console/Tenants/TenantDetails/TenantDetails.tsx","screens/Console/ObjectBrowser/actions.ts","screens/Console/ObjectBrowser/BrowserBreadcrumbs.tsx","screens/Console/ObjectBrowser/BrowseBuckets.tsx","screens/Console/ObjectBrowser/ObjectBrowser.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/DeleteObject.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/CreateFolderModal.tsx","icons/UploadFile.tsx","screens/Console/Buckets/ListBuckets/Objects/utils.ts","screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjects.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ShareFile.tsx","icons/ShareIcon.tsx","icons/DownloadIcon.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/SetRetention.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/AddTagModal.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/DeleteTagModal.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/SetLegalHoldModal.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ObjectDetails.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/ObjectRouting.tsx","screens/Console/License/utils.ts","screens/Console/License/ActivationModal.tsx","screens/Console/License/License.tsx","screens/Console/Trace/actions.ts","utils/wsUtils.ts","screens/Console/Trace/Trace.tsx","screens/Console/Logs/actions.ts","screens/Console/Logs/ErrorLogs/ErrorLogs.tsx","screens/Console/Common/FormComponents/FilterInputWrapper/FilterInputWrapper.tsx","screens/Console/Logs/LogSearch/LogsSearchMain.tsx","screens/Console/Logs/LogsMain.tsx","screens/Console/Heal/Heal.tsx","screens/Console/Watch/actions.ts","screens/Console/Watch/Watch.tsx","screens/Console/HealthInfo/actions.ts","screens/Console/HealthInfo/types.ts","screens/Console/HealthInfo/HealthInfo.tsx","screens/Console/Storage/StoragePVCs.tsx","screens/Console/DirectCSI/types.ts","screens/Console/DirectCSI/FormatDrives.tsx","screens/Console/DirectCSI/FormatErrorsResult.tsx","screens/Console/DirectCSI/DirectCSIDrives.tsx","screens/Console/DirectCSI/actions.ts","screens/Console/Storage/Storage.tsx","screens/Console/Console.tsx","screens/LoginPage/LoginCallback.tsx","screens/Console/actions.ts","ProtectedRoutes.tsx","Routes.tsx","reducer.ts","screens/Console/Trace/reducers.ts","screens/Console/Logs/reducers.ts","screens/Console/HealthInfo/reducers.ts","screens/Console/Watch/reducers.ts","screens/Console/reducer.ts","screens/Console/Buckets/reducers.ts","screens/Console/ObjectBrowser/reducers.ts","screens/Console/Tenants/reducer.ts","screens/Console/DirectCSI/reducer.ts","store.ts","serviceWorker.ts","theme/main.ts","index.tsx"],"names":["createBrowserHistory","USER_LOGGED","OPERATOR_MODE","MENU_OPEN","SERVER_NEEDS_RESTART","SERVER_IS_LOADING","SET_LOADING_PROGRESS","SET_SNACK_BAR_MESSAGE","SET_SERVER_DIAG_STAT","SET_ERROR_SNACK_MESSAGE","SET_SNACK_MODAL_MESSAGE","SET_MODAL_ERROR_MESSAGE","userLoggedIn","loggedIn","type","logged","setMenuOpen","open","serverNeedsRestart","needsRestart","loginStrategyType","setSnackBarMessage","message","setErrorSnackMessage","setModalSnackMessage","setModalErrorSnackMessage","minStReq","minMemReq","units","k8sUnits","k8sCalcUnits","niceBytes","x","showK8sUnits","l","n","parseInt","k8sUnitsN","toFixed","clearSession","name","storage","removeItem","document","cookie","timeFromDate","d","h","getHours","m","getMinutes","s","getSeconds","getMilliseconds","getBytes","value","unit","fromk8s","vl","parseFloat","unitsTake","powFactor","findIndex","element","factor","Math","pow","total","toString","calculateStorage","requestedBytes","forcedNodes","limitSize","drivesPerServer","intReqBytes","structureCalc","nodes","desiredCapacity","maxDiskSize","maxClusterSize","disksPerNode","isNaN","error","persistentVolumes","disks","volumePerDisk","persistentVolumeSize","numberPersistentVolumes","volumesPerServer","floor","min","max","ceil","pvSize","generatePoolName","pools","poolCounter","length","niceDays","secondsValue","timeVariant","seconds","days","hours","minutes","years","months","diffDays","weeks","getTimeFromTimestamp","timestamp","fullDate","dateObject","Date","getFullYear","String","getMonth","padStart","getDay","nsToSeconds","nanoseconds","conversion","round","Number","EPSILON","textToRGBColor","text","hashColored","split","reduce","acc","currItem","charCodeAt","toUpperCase","api","method","url","data","request","send","then","res","body","catch","err","status","window","location","href","onError","errMessage","get","response","throwMessage","charAt","slice","Promise","reject","inputStyles","makeStyles","theme","createStyles","disabled","borderColor","borderBottomStyle","LoginField","props","classes","TextField","InputProps","connector","connect","state","withStyles","backgroundColor","paper","borderRadius","display","flexDirection","alignItems","width","height","margin","position","top","left","marginLeft","marginTop","avatar","spacing","palette","secondary","main","form","submit","boxShadow","padding","errorBlock","justifyContent","color","fontWeight","fontSize","boxSizing","mainContainer","theOcean","borderTopLeftRadius","borderBottomLeftRadius","background","oceanBg","backgroundImage","backgroundRepeat","backgroundPosition","theLogin","loadingLoginStrategy","textAlign","headerTitle","marginBottom","submitContainer","disclaimer","jwtInput","linearPredef","errorIconStyle","marginRight","useState","accessKey","setAccessKey","jwt","setJwt","secretKey","setSecretKey","setError","loginStrategy","unknown","redirect","setLoginStrategy","loginSending","setLoginSending","loginStrategyEndpoints","loginStrategyPayload","formSubmit","e","preventDefault","post","bodyResponse","localStorage","setItem","btoa","history","push","useEffect","invoke","loginDetails","loginComponent","Fragment","Typography","component","variant","className","noValidate","onSubmit","Grid","container","item","xs","fullWidth","id","onChange","target","label","autoComplete","Button","LinearProgress","replace","hostname","serviceAccount","required","CircularProgress","Paper","fieldBasic","inputLabel","overflow","fieldLabelError","paddingBottom","fieldContainer","maxWidth","tooltipContainer","switchContainer","modalBasic","formScrollable","maxHeight","overflowY","formSlider","clearButton","fontFamily","border","outline","cursor","floatingEnabled","right","zIndex","configureString","tooltipHelper","tooltip","checkBoxBasic","checkboxIcons","unCheckedIcon","checkedIcon","radioBasic","radioIcons","radioUnselectedIcon","radioSelectedIcon","actionsTray","alignSelf","whiteSpace","timeContainers","flexGrow","searchField","opacity","predefinedList","prefinedContainer","predefinedTitle","minHeight","innerContent","overflowX","scrollbarWidth","innerContentMultiline","objectBrowserCommon","obTitleSection","sectionTitle","lineHeight","breadcrumbs","textDecoration","selectorsCommon","multiSelectTable","settingsCommon","customTitle","borderBottom","settingsFormContainer","settingsButtonContainer","borderTop","innerSettingsButtonContainer","settingsOptionsContainer","backButton","backContainer","typesSelection","iconContainer","flexWrap","nonIconContainer","pickTitle","centerElements","logoButton","lambdaNotif","logsCommon","logsSubContainer","widgetCommon","singleValueContainer","titleContainer","contentContainer","contentContainerWithLabel","legendBlock","bottom","singleLegendContainer","colorContainer","minWidth","legendLabel","textOverflow","tooltipCommon","customTooltip","labelContainer","labelColor","itemValue","valueContainer","timeStampTitle","snackBarCommon","snackBar","errorSnackBar","snackBarExternal","snackDiv","snackBarModal","wizardCommon","multiContainer","sizeFactorContainer","headerElement","paddingTop","tableTitle","poolError","paddingLeft","h3Section","descriptionText","buttonsStyles","anchorButton","textTransform","hrClass","borderLeft","borderRight","Copyright","align","Link","useStyles","common","white","NotFound","Container","CssBaseline","Box","mt","CopyIcon","SvgIcon","xmlns","viewBox","data-name","CreateIcon","transform","fill","DeleteIcon","DashboardIcon","BucketsIcon","UsersIcon","cx","cy","rx","ry","ServiceAccountsIcon","GroupsIcon","r","TraceIcon","ConfigurationsListIcon","ClustersIcon","y","WatchIcon","ADD_BUCKET_OPEN","ADD_BUCKET_NAME","ADD_BUCKET_VERSIONED","ADD_BUCKET_LOCKING","ADD_BUCKET_QUOTA","ADD_BUCKET_QUOTA_TYPE","ADD_BUCKET_QUOTA_SIZE","ADD_BUCKET_QUOTA_UNIT","ADD_BUCKET_RESET","ADD_BUCKET_RETENTION","ADD_BUCKET_RETENTION_MODE","ADD_BUCKET_RETENTION_UNIT","ADD_BUCKET_RETENTION_VALIDITY","unSelected","selected","ViewIcon","active","PencilIcon","ShareIcon","DescriptionIcon","CloudIcon","ConsoleIcon","FormatDriveIcon","defineIcon","DisableIcon","buttonDisabled","filter","onClick","valueToSend","idField","to","sendOnlyId","valueClick","buttonElement","IconButton","aria-label","size","stopPropagation","isString","HelpIcon","flexBasis","checked","Checkbox","inputProps","icon","InputLabel","htmlFor","Tooltip","title","placement","rowText","borderWidth","transitionDuration","paddingRight","generateColumnsMap","columns","containerWidth","actionsWidth","hasSelect","hasActions","selectedItems","columnsSelector","columnsShown","sortColumn","sortDirection","commonRestWidth","colsItems","column","includes","elementKey","initialValue","currValue","el","calculateColumnRest","map","index","disableSort","enableSort","dataKey","headerClassName","headerTextAlign","headerRenderer","contentTextAlign","cellRenderer","rowData","isSelected","itemElement","renderConst","renderFullObject","renderElement","renderFunction","subRenderFunction","defaultSortDirection","dialogContainer","noBackground","defaultPaperHeight","allTableSettings","minTableHeader","rowUnselected","rowSelected","paginatorContainer","checkBoxHeader","actionsContainer","paginatorComponent","checkBoxRow","loadingBox","overlayColumnSelection","popoverContainer","popoverContent","shownColumnsLabel","userSelect","fontStyle","itemActions","onSelect","records","isLoading","loadingMessage","entityName","radioSelection","customEmptyMessage","customPaperHeight","textSelectable","onColumnChange","infiniteScrollConfig","sortConfig","autoScrollToBottom","columnSelectorOpen","setColumnSelectorOpen","React","anchorEl","setAnchorEl","findView","find","openColumnsSelector","event","currentTarget","closeColumnSelector","style","aria-describedby","Popover","anchorOrigin","vertical","horizontal","transformOrigin","onClose","columnsSelection","isRowLoaded","loadMoreRows","loadMoreRecords","rowCount","recordsCount","onRowsRendered","registerChild","optionsWidth","totalOptions","sizeOptions","calculateOptionsSize","hasOptions","ref","disableHeader","headerHeight","noRowsRenderer","overscanRowCount","rowHeight","rowGetter","onRowClick","rowItem","clickAction","rowClassName","sort","triggerSort","undefined","sortBy","currentSort","currentDirection","scrollToIndex","actions","action","vlSend","disableButtonFunction","showLoaderFunction","elementActions","baseCloseLine","content","modalSnackMessage","system","modalSnackBar","closeContainer","closeButton","modalCloseIcon","closeIcon","titleClass","modalContent","customDialogSize","modalOpen","children","wideLimit","noContentPadding","openSnackbar","setOpenSnackbar","customSize","Dialog","aria-labelledby","Snackbar","ContentProps","autoHideDuration","disableRipple","DialogTitle","DialogContent","root","input","InputField","textBoxContainer","textBoxWithIcon","errorState","overlayAction","multiline","placeholder","overlayIcon","errorInField","helperText","inputRebase","disableFocusRipple","disableTouchRipple","SelectStyled","InputBase","options","FormControl","Select","option","MenuItem","radioStyles","RadioButton","Radio","radioBoxContainer","optionLabel","checkedOption","selectorOptions","currentSelection","disableOptions","displayInColumn","RadioGroup","row","selectorOption","FormControlLabel","control","clsx","StyledSwitch","switchBase","track","thumb","Switch","seeMore","addSideBar","tableToolbar","wrapCell","wordWrap","noFound","tableContainer","stickyHeader","actionsTitle","tableBlock","filterField","divContainer","wrapperContainer","indicatorLabel","fieldDescription","switchOnly","description","indicatorLabels","containerClass","switchComponent","addBucketModalOpen","buckets","bucketName","addBucketName","versioningEnabled","addBucketVersioningEnabled","lockingEnabled","addBucketLockingEnabled","quotaEnabled","addBucketQuotaEnabled","quotaType","addBucketQuotaType","quotaSize","addBucketQuotaSize","quotaUnit","addBucketQuotaUnit","retentionEnabled","addBucketRetentionEnabled","retentionMode","addBucketRetentionMode","retentionUnit","addBucketRetentionUnit","retentionValidity","addBucketRetentionValidity","addBucketVersioned","versioned","enableObjectLocking","locking","addBucketQuota","quota","addBucketRetention","retention","mode","validity","setModalError","buttonContainer","quotaSizeContainer","closeModalAndRefresh","addLoading","setAddLoading","sendEnabled","setSendEnabled","lockingFieldDisabled","setLockingFieldDisabled","useDebounce","resetForm","valid","trim","versioning","amount","enabled","quota_type","addRecord","valueAsNumber","mapDispatchToProps","closeDeleteModalAndRefresh","deleteOpen","selectedBucket","deleteLoading","setDeleteLoading","DialogContentText","DialogActions","autoFocus","headerContainer","labelStyle","multiLine","wizardStepContainer","wizardComponent","wizardModal","buttonsContainer","buttonInnerContainer","page","pageChange","loadingStep","forModal","componentRender","buttons","btn","toPage","buttonAction","wizardMain","wizFromContainer","wizFromModal","wizardSteps","listStyle","modalWizardSteps","buttonList","paddedContentGrid","stepsLabel","stepsMasterContainer","currentStep","setCurrentStep","toElement","lastPage","nextPage","prevPage","pg","stepsList","step","sm","md","lg","xl","remoteBucketList","gridTemplateColumns","errorIcon","successIcon","hide","bucketsToAlter","setBucketsToAlter","externalLoading","setExternalLoading","targetURL","setTargetURL","region","setRegion","useTLS","setUseTLS","relationBuckets","setRelationBuckets","remoteBucketsOpts","setRemoteBucketOpts","responseItem","setResponseItem","optionsForBucketsDrop","remoteBucketName","bucketsAlter","relationBucketsAlter","forEach","LogoToShow","errString","updateItem","indexItem","updatedList","removeSuccessItems","newBucketsToAlter","newRelationBuckets","successElement","errorString","indexToRemove","indexOf","originBucket","splice","join","wizardPageJump","remoteConnectInfo","dataReturn","arrayReplaceBuckets","errorItem","initialBucket","bucketResponse","stateOfItem","replicate","destinationBucket","endURL","remoteBucketsInfo","bucketsRelation","states","replicationState","itm","setTimeout","addBucketOpen","addBucketReset","setRecords","loading","setLoading","setDeleteOpen","setSelectedBucket","filterBuckets","setFilterBuckets","loadingPerms","setLoadingPerms","canCreateBucket","setCanCreateBucket","selectedBuckets","setSelectedBuckets","replicationModalOpen","setReplicationModalOpen","permissions","canCreate","can","tableActions","bucket","filteredRecords","b","refresh","BulkReplicationModal","unselectAll","val","disableUnderline","startAdornment","InputAdornment","startIcon","date","targetD","elements","actualPolicy","accessPolicy","setAccessPolicy","access","setRetentionMode","setRetentionUnit","setRetentionValidity","setValid","prefix","setPrefix","suffix","setSuffix","arn","setArn","selectedEvents","setSelectedEvents","arnList","setArnList","fetchArnList","useCallback","arns","handleClick","selectedIndex","newSelected","concat","arnValues","arnConstant","configuration","events","ignoreExisting","Table","TableHead","TableRow","TableCell","TableBody","bucketEvent","removeRecord","targetBucket","setTargetBucket","itemVal","encryptionCfg","encryptionEnabled","kmsKeyID","setKmsKeyID","encryptionType","setEncryptionType","algorithm","kmsMasterKeyID","encType","closeVersioningModalAndRefresh","versioningCurrentState","versioningLoading","setVersioningLoading","UsageIcon","y1","x2","y2","gradientUnits","offset","stopColor","stroke","strokeMiterlimit","strokeWidth","require","onBeforeChange","readOnly","lineNumbers","jsonPolicyEditor","policyEdit","policyName","setPolicyName","policyDefinition","setPolicyDefinition","JSON","stringify","parse","policy","validSave","editor","ruleToDelete","AddIcon","inputWithBorder","lineInputBoxes","queryDiv","keyPlaceholder","valuePlaceholder","withBorder","currentKeys","setCurrentKeys","currentValues","setCurrentValues","bottomList","createRef","elementsSplit","keys","values","splittedVals","refScroll","current","scrollIntoView","firstUpdate","useRef","useLayoutEffect","debouncedOnChange","onChangeKey","persist","updatedElement","onChangeValue","debounce","queryString","keyVal","insertString","inputs","keysList","valuesList","addEmptyLine","strongText","keyName","lifecycle","tags","setTags","setEnabled","tgs","stringLab","key","disable","Array","from","_","num","currentYear","numYear","DateSelector","forwardRef","addSwitch","onDateChange","useImperativeHandle","resetDate","dateEnabled","setDateEnabled","month","setMonth","day","setDay","year","setYear","valueSplit","currentDate","parsedMonth","parsedDay","monthForString","dayForString","parsedDate","toISOString","dateString","validDate","isValid","isDateDisabled","fieldContainerBorder","dateInput","displayEmpty","dayNumber","flex","loadingTiers","setLoadingTiers","tiersList","setTiersList","storageClass","setStorageClass","NCTransitionSC","setNCTransitionSC","expiredObjectDM","setExpiredObjectDM","NCExpirationDays","setNCExpirationDays","NCTransitionDays","setNCTransitionDays","ilmType","setIlmType","expiryType","setExpiryType","expiryDays","setExpiryDays","expiryDate","setExpiryDate","transitionDays","setTransitionDays","transitionDate","setTransitionDate","transitionType","setTransitionType","isFormValid","setIsFormValid","objList","tier","tierType","rules","expiry","expiry_date","expiry_days","noncurrentversion_expiration_days","transition","transition_date","transition_days","noncurrentversion_transition_days","noncurrentversion_transition_storage_class","storage_class","lifecycleInsert","expired_object_delete_marker","TabPanel","other","role","hidden","a11yProps","widgetType","session","console","noRecords","gridWrapper","gridContainer","gridGap","masterActions","paperContainer","capitalizeFirst","doubleElement","encCheckbox","tabPan","fixedHeight","elementTitle","consumptionValue","reportedUsage","match","info","setInfo","replicationRules","setReplicationRules","bucketPolicy","setBucketPolicy","loadingPolicy","setLoadingPolicy","bucketUsers","setBucketUsers","loadingUsers","setLoadingUsers","loadingBucket","setLoadingBucket","loadingEvents","setLoadingEvents","loadingVersioning","setLoadingVersioning","loadingObjectLocking","setLoadingLocking","loadingReplication","setLoadingReplication","loadingSize","setLoadingSize","loadingEncryption","setLoadingEncryption","accessPolicyScreenOpen","setAccessPolicyScreenOpen","curTab","setCurTab","addScreenOpen","setAddScreenOpen","policyScreenOpen","setPolicyScreenOpen","enableEncryptionScreenOpen","setEnableEncryptionScreenOpen","editLifecycleOpen","setEditLifecycleOpen","selectedEvent","setSelectedEvent","bucketSize","setBucketSize","openSetReplication","setOpenSetReplication","isVersioned","setIsVersioned","hasObjectLocking","setHasObjectLocking","setEncryptionEnabled","setEncryptionCfg","retentionConfigOpen","setRetentionConfigOpen","setPolicyEdit","enableVersioningOpen","setEnableVersioningOpen","canPutReplication","setCanPutReplication","canGetReplication","setCanGetReplication","deleteReplicationModal","setDeleteReplicationModal","selectedRRule","setSelectedRRule","loadingLifecycle","setLoadingLifecycle","lifecycleRecords","setLifecycleRecords","addLifecycleOpen","setAddLifecycleOpen","params","usersEnabled","pages","bucket_name","userCanPutReplication","is_versioned","object_locking_enabled","policies","bucketInfo","loadAllBucketData","fetchPolicies","setOpenReplicationOpen","evnt","PolicyActions","replicationTableActions","replication","lifecycleColumns","expiration","objectST","userTableActions","user","Tabs","newValue","indicatorColor","textColor","scrollButtons","Tab","toLowerCase","direction","sidebarOpen","withRouter","path","ViewBucket","ListBuckets","NotFoundPage","selectedPolicy","setSelectedPolicy","filterPolicies","setFilterPolicies","fetchRecords","pa","pb","elementItem","containerHeader","infoGrid","updateButton","noUnderLine","poolLabel","licenseContainer","licenseInfo","licenseInfoTitle","licenseInfoValue","verifiedIcon","breadcrumLink","selectedTab","setSelectedTab","setPolicy","userList","setUserList","result","log","PolicyDetails","ListPolicies","dLocalStorageV","defaultWidgetsLayout","w","i","minW","moved","static","colorsMain","niceDaysFromNS","roundNumber","panelsConfiguration","singleValue","layoutIdentifier","labelDisplayFunction","dataOuter","widgetConfiguration","outerChart","colorList","innerRadius","outerRadius","startAngle","endAngle","innerChart","pieChart","innerLabel","keyLabel","lineColor","fillColor","linearGraph","yAxisFormatter","xAxisFormatter","customStructure","originTag","displayTag","barChart","singleRep","disableYAxis","calculateMainValue","metricCalc","sumValues","accumulator","sortResult","value1","value2","getWidgetsWithValue","payload","panelItem","payloadData","panelT","typeOfPayload","valueDisplay","chartSeries","valuesArray","totalValues","elementValue","metricKeyItem","Object","metric","metricName","targets","series","plotValues","targetMaster","results","legendFormat","itemVals","labelName","metrics","keysToReplace","expToReplace","RegExp","matchItem","nwMatchItem","constructLabelNames","valInfo","itemIndex","itemToPush","seriesWithColors","series1","series2","serialC","sortedVals","chartBars","sortFunction","structureItem","metricTake","lastValue","a","valuesForBackground","eachVal","saveDashboardDistribution","linearConfiguration","pl","containerElements","chartCont","legendChart","hideYAxis","panelWidth","intervalCount","ResponsiveContainer","AreaChart","CartesianGrid","strokeDasharray","strokeOpacity","XAxis","tickFormatter","interval","tick","tickCount","YAxis","domain","dataMax","section","Area","fillOpacity","wrapperStyle","barChartConfiguration","CustomizedAxisTick","textAnchor","dy","BarChart","layout","barCategoryGap","tickLine","axisLine","bar","Bar","pieChartConfiguration","dataInner","middleLabel","innerColors","outerColors","PieChart","Pie","entry","Cell","dominantBaseline","dateSelectorOverride","parentDateOverride","utils","MomentUtils","DateTimePicker","ampm","format","SyncIcon","displayErrorMessage","widgetsContainer","syncButton","timeStart","setTimeStart","timeEnd","setTimeEnd","panelInformation","setPanelInformation","dashboardDistr","currentItems","storedConfiguration","getItem","parsedConfig","atob","getDashboardDistribution","panels","singlePanelWidth","xSpacing","componentToUse","fetchUsage","stepCalc","secondsInPeriod","unix","periods","widgets","widgetsWithValue","hpanel","totalWidth","cols","containerPadding","onLayoutChange","AllBucketsIcon","EgressIcon","notationContainer","dashboardBG","backgroundSize","dashboardContainer","smallUnit","usage","fixedHeightPaper","prettyNumber","niceBytesUsage","prettyUsage","objects","basicResult","setBasicResult","menuGroups","group","collapsible","LicenseIcon","LogoutIcon","HealIcon","operatorMode","logo","menuList","extraMargin","groupTitle","subTitleMenu","selectorArrow","borderStyle","selectorArrowOpen","menuItem","menuStateBuilder","menuOpen","menuItems","NavLink","IAMPoliciesIcon","allowedPages","documentation","forceDisplay","hasOwnProperty","allowedItems","src","operator_logo","alt","List","groupMember","filterByGroup","ListItem","menuClicked","newMenu","setMenuCollapse","Collapse","in","timeout","unmountOnExit","button","ListItemIcon","ListItemText","primary","Divider","deleteSession","infoDetails","containerScrollable","addSending","setAddSending","isRestrictedByPolicy","setIsRestrictedByPolicy","addServiceAccount","wrapText","selectedServiceAccount","warningBlock","credentialsPanel","newServiceAccount","closeModal","entity","consoleCreds","isArray","credentialsPair","consoleExtras","cCreds","itemMap","access_key","secret_key","filename","createElement","setAttribute","encodeURIComponent","appendChild","click","removeChild","download","usersSort","policySort","stringSort","currentPassword","setCurrentPassword","newPassword","setNewPassword","reNewPassword","setReNewPassword","current_secret_key","new_secret_key","changePassword","imageIcon","iconRoot","setFilter","setSelectedServiceAccount","showNewCredentials","setShowNewCredentials","setNewServiceAccount","changePasswordModalOpen","setChangePasswordModalOpen","serviceAccounts","nsa","closeAddModalAndRefresh","ChangePasswordModal","selectedGroups","setSelectedGroups","fetchGroups","groups","selGroups","selectedUser","currentGroups","setCurrentGroups","getUserInformation","memberOf","checkedUsers","saving","isSaving","accepted","setAccepted","users","selectedGroup","setActualPolicy","groupPolicy","userPolicy","userName","entityType","setSelectedUser","addGroupOpen","setAddGroupOpen","setCheckedUsers","policyOpen","setPolicyOpen","selectionElement","topValue","close","unCheckAll","closeAddGroupBulk","currentPolicies","pol","setCurrentPolicies","isEnabled","Bookmark","UserDetails","ListUsers","selectedUsers","setSelectedUsers","editMode","fetchUsers","selUsers","groupName","setGroupName","groupEnabled","setGroupEnabled","loadingGroup","isLoadingGroup","validGroup","setValidGroup","members","isDeleting","closeNoAction","setGroupOpen","setSelectedGroup","resGroups","notifyPostgres","notifyMysql","notifyKafka","notifyAmqp","notifyMqtt","notifyRedis","notifyNats","notifyElasticsearch","notifyWebhooks","notifyNsq","configurationElements","configuration_id","configuration_label","fieldsConfigurations","cache","compression","etcd","identity_openid","identity_ldap","logger_webhook","audit_webhook","commonFields","notificationEndpointsFields","removeEmptyFields","formFields","field","commonPlaceholder","currentElements","setCurrentElements","onChangeElement","elementsString","elementsUp","cpList","cssOutlinedInput","rootContainer","InputLabelProps","shrink","notchedOutline","valueDef","defaults","defValue","storedConfig","fields","defaultVals","valueHolder","setValueHolder","fieldsElements","defValList","stateInsert","setValueElement","valuesDup","fieldDefinition","selectedConfiguration","valuesObj","setValueObj","setSaving","loadingConfig","setLoadingConfig","configValues","setConfigValues","configId","keyVals","key_values","onValueChange","masterContainer","sliderContainer","slide","float","slideOptions","currentSlide","currentSliderPosition","containerSize","block","BackSettingsIcon","strokeLinecap","initialConfiguration","iconText","customConfigurationPage","setSelectedConfiguration","currentConfiguration","setCurrentConfiguration","servicesList","actionTrigger","targetTitle","useConnectionString","setUseConnectionString","connectionString","setConnectionString","host","setHostname","dbName","setDbName","port","setPort","setUser","password","setPassword","sslMode","setSslMode","table","setTable","setFormat","queueDir","setQueueDir","queueLimit","setQueueLimit","comment","setComment","configToString","strValue","cs","kv","valueIndexes","n1","n2","kvFields","Map","j","substr","set","parseConnectionString","useDsnString","setUseDsnString","dsnString","setDsnString","configToDsnString","regex","exec","lastIndex","parseDsnString","lambdaFormIndicator","service","saveAndRefresh","valuesArr","setValueArr","srvComponent","targetElement","nonLogos","elService","withLogos","setService","lambdaContainer","setIsLoading","currentPanel","setCurrentPanel","resNotEndList","notification_endpoints","service_name","account_id","backClick","red","serviceName","errorMessage","withBreak","errorText","valueString","fileReselect","fieldBottom","fileInputField","accept","showFileSelector","setShowSelector","fileName","evt","callback","file","files","reader","FileReader","readAsDataURL","onload","fileBase64","fileArray","fileProcess","setName","endpoint","setEndpoint","setBucket","creds","setCreds","encodedCreds","setEncodedCreds","accountName","setAccountName","accountKey","setAccountKey","titleSelection","setTitleSelection","s3","accesskey","secretkey","storageclass","gcs","azure","accountname","accountkey","encodedValue","tierData","savingTiers","setSavingTiers","updateCredentialsOpen","setUpdateCredentialsOpen","selectedTier","setSelectedTier","setType","items","getItemName","getItemType","typeSelect","typeItem","UpdateTierCredentiasModal","headerLabel","logger","modalTitle","apiURL","audit","addWebhookOpen","setAddWebhookOpen","panelToDisplay","panelData","toLocaleLowerCase","selectedTenant","retypeTenant","setRetypeTenant","namespace","getDefaultAffinity","tenantName","poolName","podAntiAffinity","requiredDuringSchedulingIgnoredDuringExecution","labelSelector","matchExpressions","operator","topologyKey","getNodeSelector","labels","withPodAntiAffinity","splittedLabels","splitKeyValue","nodeSelector","nodeAffinity","nodeSelectorTerms","def","ADD_TENANT_SET_CURRENT_PAGE","ADD_TENANT_SET_ADVANCED_MODE","ADD_TENANT_UPDATE_FIELD","ADD_TENANT_SET_PAGE_VALID","ADD_TENANT_RESET_FORM","ADD_TENANT_SET_STORAGE_CLASSES_LIST","ADD_TENANT_ADD_MINIO_KEYPAIR","ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR","ADD_TENANT_DELETE_MINIO_KEYPAIR","ADD_TENANT_ADD_CA_KEYPAIR","ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR","ADD_TENANT_DELETE_CA_KEYPAIR","ADD_TENANT_ADD_CONSOLE_CERT","ADD_TENANT_ENCRYPTION_SERVER_CERT","ADD_TENANT_ENCRYPTION_CLIENT_CERT","ADD_TENANT_ENCRYPTION_VAULT_CERT","ADD_TENANT_ENCRYPTION_VAULT_CA","ADD_TENANT_ENCRYPTION_GEMALTO_CA","updateAddField","pageName","fieldName","isPageValid","addConsoleCertificate","commonFormValidation","fieldsValidate","returnErrors","fieldKey","customValidation","customValidationMessage","pattern","customPatternMessage","rgx","clearValidationError","validationErrors","newValidationElement","getRandomString","retval","legalcharacters","random","advancedMode","tenants","createTenant","advancedModeOn","nameTenant","selectedStorageClass","storageClasses","setAdvancedMode","setStorageClassesList","setLimitSize","setValidationErrors","emptyNamespace","setEmptyNamespace","loadingNamespaceInfo","setLoadingNamespaceInfo","updateField","getNamespaceInformation","tenantsList","resourceQuotas","quotas","returnQuotas","rsQuota","stCName","hard","used","getLimitSizes","newStorage","debounceNamespace","useMemo","cancel","customNamespaceError","commonValidation","frmValidationCleanup","customImage","configure","imageName","consoleImage","customDockerhub","imageRegistry","imageRegistryUsername","imageRegistryPassword","exposeMinIO","exposeConsole","prometheusCustom","logSearchCustom","logSearchVolumeSize","logSearchSizeFactor","prometheusVolumeSize","prometheusSizeFactor","logSearchSelectedStorageClass","logSearchImage","kesImage","logSearchPostgresImage","prometheusSelectedStorageClass","prometheusImage","customAccountValidation","commonVal","cleanValidation","idpSelection","identityProvider","accessKeys","secretKeys","openIDURL","openIDClientID","openIDSecretID","ADURL","ADSkipTLS","ADServerInsecure","ADUserNameFilter","ADGroupBaseDN","ADGroupSearchFilter","ADNameAttribute","shortened","buttonTray","updateUserField","newUserField","updatePwordField","customIDPValidation","gutterBottom","enableTLS","security","enableAutoCert","enableCustomCerts","minioCertificates","certificates","caCertificates","consoleCertificate","addFileToCaCertificates","deleteCaCertificate","addCaCertificate","addKeyPair","addFileToKeyPair","deleteKeyPair","keyPair","cert","enableEncryption","encryption","gemaltoEndpoint","gemaltoToken","gemaltoDomain","gemaltoRetry","awsEndpoint","awsRegion","awsKMSKey","awsAccessKey","awsSecretKey","awsToken","vaultEndpoint","vaultEngine","vaultNamespace","vaultPrefix","vaultAppRoleEngine","vaultId","vaultSecret","vaultRetry","vaultPing","gcpProjectID","gcpEndpoint","gcpClientEmail","gcpClientID","gcpPrivateKeyID","gcpPrivateKey","enableCustomCertsForKES","serverCertificate","clientCertificate","vaultCertificate","vaultCA","gemaltoCA","addFileServerCert","addFileClientCert","addFileVaultCert","addFileVaultCa","addFileGemaltoCa","encryptionAvailable","encoded_key","encoded_cert","encryptionValidation","volumeSize","tenantSize","sizeFactor","memoryNode","ecParity","ecParityChoices","cleanECChoices","maxAllocableMemo","memorySize","distribution","ecParityCalc","usableInformation","storageFactors","erasureCode","validateMemorySize","memSize","maxMemSize","clusterSizeFactor","memoSize","capacitySize","maxMemorySize","requestedSizeBytes","memReqSize","limit","capSize","memLimitSize","setMemoryResource","ecCodeValidated","parityValidValues","totalDisks","totalNodes","defaultEC","erasureCodeSet","maxEC","rawCapacity","totalStorage","erasureStripeSet","currentParity","parityNumber","storageFactor","maxCapacity","maxTolerations","maxFailureTolerations","fourVar","erasureCodeCalc","validateClusterSize","getECValue","maxMemory","max_memory","getMaxAllocableMemory","distrCalculate","capacityToUse","calculateDistribution","ecList","ecListTransform","parsedSize","scope","podAffinity","affinity","nodeSelectorLabels","splitItem","validPages","closeAndRefresh","createdAccount","setCreatedAccount","affinityType","affinityObject","dataSend","access_keys","secret_keys","enable_tls","enable_console","enable_prometheus","image","console_image","expose_minio","expose_console","servers","volumes_per_server","volume_configuration","storage_class_name","resources","requests","memory","limits","erasureCodingParity","image_registry","registry","username","logSearchConfiguration","storageSize","postgres_image","prometheusConfiguration","tenantCerts","consoleCerts","caCerts","ca_certificates","minio","crt","tls","insertEncrypt","gemaltoCAIntroduce","ca","gemalto","keysecure","credentials","token","retry","aws","secretsmanager","kmskey","gcp","secretmanager","project_id","client_email","client_id","private_key_id","private_key","vaultKeyPair","vaultCAInsert","vaultTLS","vault","engine","approle","secret","ping","encryptionServerKeyPair","encryptionClientKeyPair","client","server","dataIDP","keyarray","oidc","secret_id","active_directory","skip_tls_verification","server_insecure","username_format","user_search_filter","group_search_base_dn","group_search_filter","group_name_attribute","idp","consoleSAList","newSrvAcc","consoleItem","consoleKey","cancelButton","advancedOnly","filteredWizardSteps","resetAddTenantForm","tenantsContainer","setSelectedTenant","filterTenants","setFilterTenants","tenant","resTenants","capacity","total_size","reloadData","bottomContainer","factorElements","sizeNumber","sizeDescription","onClosePoolAndReload","numberOfNodes","setNumberOfNodes","setVolumeSize","setVolumesPerSever","setSelectedStorageClass","setStorageClasses","instanceCapacity","totalCapacity","defaultAffinity","sourceBucket","setSourceBucket","clusterSelected","setClusterSelected","setDestinationBucket","address","setAddress","BorderLinearProgress","colorPrimary","padChart","allValue","currentUsage","centerItem","maxValue","porcentualValue","idTenant","isSending","setIsSending","minioImage","setMinioImage","setConsoleImage","setImageRegistry","imageRegistryEndpoint","setImageRegistryEndpoint","setImageRegistryUsername","setImageRegistryPassword","validMinioImage","setValidMinioImage","validConsoleImage","setValidConsoleImage","validateImage","fieldToCheck","test","tenantYaml","setTenantYaml","setErrorMessage","yaml","loadingActivateProduct","loadingLicenseInfo","activateProduct","subnet_license","organization","storage_capacity","expires_at","plan","email","licenseButton","setCapacity","poolCount","setPoolCount","setPools","pods","setPods","instances","setInstances","volumes","setVolumes","addPoolOpen","setAddPool","setAddBucketOpen","addReplicationOpen","setAddReplicationOpen","setTenant","loadingUsage","setLoadingUsage","usageError","setUsageError","setUsage","updateMinioVersion","setUpdateMinioVersion","yamlScreenOpen","setYamlScreenOpen","setLicenseInfo","setLoadingLicenseInfo","setLoadingActivateProduct","logEnabled","setLogEnabled","monitoringEnabled","setMonitoringEnabled","adEnabled","setAdEnabled","oicEnabled","setOicEnabled","tenantNamespace","loadInfo","resPools","totalInstances","totalVolumes","poolNamedIndex","pool","cap","idpAdEnabled","idpOicEnabled","loadUsage","currentTime","time","timeCreated","editYaml","reload","aria-controls","aria-haspopup","keepMounted","Boolean","colSpan","endpoints","rel","currentState","OBJECT_BROWSER_ADD_ROUTE","OBJECT_BROWSER_RESET_ROUTES_LIST","OBJECT_BROWSER_REMOVE_ROUTE_LEVEL","OBJECT_BROWSER_SET_ALL_ROUTES","OBJECT_BROWSER_CREATE_FOLDER","OBJECT_BROWSER_SET_LAST_AS_FILE","OBJECT_BROWSER_DOWNLOAD_FILE_LOADER","OBJECT_BROWSER_DOWNLOADED_FILE","addRoute","route","routeType","removeRouteLevel","toRoute","setAllRoutes","currentRoute","fileIsBeingPrepared","fileDownloadStarted","objectBrowser","objectsList","listBreadcrumbs","objectItem","resetRoutesList","reset","usedSpaceCol","subTitleLabel","iconBucket","browsePaper","pop","idElement","currentPath","newPath","globalClass","rowClass","watchList","inputField","lastElementWPadding","pathIn","selectedObject","recursive","endsWith","createFolder","newRoute","pathLabel","folderName","pathUrl","setPathUrl","folderTruncated","UploadFile","objectPath","versionID","callBack","includeVersionInCallback","anchor","xhr","XMLHttpRequest","allPathData","objectName","isNullOrUndefined","responseType","this","blob","Blob","blobUrl","URL","createObjectURL","revokeObjectURL","remove","commonIcon","defLoading","setLastAsFile","setLoadingProgress","progress","loadingProgress","routesList","downloadingFiles","fileNameText","iconFolder","iconFile","listButton","createFolderOpen","setCreateFolderOpen","setSelectedObject","filterObjects","setFilterObjects","loadingStartTime","setLoadingStartTime","setLoadingMessage","delay","savedCallback","setInterval","clearInterval","useInterval","timeDelta","now","updateMessage","internalPaths","extraPath","currentTimestamp","folders","record","recordsInElement","verifyIfIsFile","removeDownloadAnimation","uploadObject","splitPaths","uploadUrl","areMultipleFiles","okMessage","withCredentials","upload","addEventListener","loaded","onerror","onloadend","formData","FormData","blobFile","append","idElementClean","pathInArray","object","version_id","Input","multiple","elementString","last_modified","copyButtonContainer","dataObject","shareURL","setShareURL","isLoadingFile","setIsLoadingFile","selectedDate","setSelectedDate","dateValid","setDateValid","slDate","currDate","diffDate","getTime","dateContainer","newDate","DownloadIcon","objectInfo","statusEnabled","setStatusEnabled","setDate","isDateValid","setIsDateValid","setIsSaving","alreadyConfigured","setAlreadyConfigured","retention_mode","retention_until_date","valueDate","getDate","dateElement","showSwitcher","versionId","expireDate","expires","addRetention","disableRetention","currentTags","onCloseAndUpdate","newKey","setNewKey","newLabel","setNewLabel","newTag","newTagList","selectedTag","setDeleteSending","tagKey","tagLabel","cleanObject","actualInfo","legalHoldEnabled","setLegalHoldEnabled","emptyFile","is_latest","legal_hold_status","objectNameContainer","objectPathContainer","objectPathLink","propertiesContainer","propertiesItem","propertiesItemBold","propertiesValue","propertiesIcon","actionsIconContainer","actionsIcon","tagsContainer","tagText","tag","search","loadObjectData","setLoadObjectData","shareFileModalOpen","setShareFileModalOpen","retentionModalOpen","setRetentionModalOpen","tagModalOpen","setTagModalOpen","deleteTagModalOpen","setDeleteTagModalOpen","setSelectedTag","legalholdOpen","setLegalholdOpen","setActualInfo","versions","setVersions","filterVersion","setFilterVersion","pathInBucket","tagKeys","shareObject","downloadObject","includeVersion","version","updateInfo","redirectBack","reloadObjectData","Chip","deleteIcon","onDelete","deleteTag","clickable","currentItem","planDetails","price","capacityMin","capacityMax","planItems","community","communityDetail","standard","standardDetail","enterprise","enterpriseDetail","planButtons","text2","link","subnetLicenseKey","subnetLoginForm","licenseKeyField","pageTitle","buttonSignup","license","setLicense","subnetPassword","setSubnetPassword","subnetEmail","setSubnetEmail","rows","detailsContainer","detailsContainerBorder","detailsContainerBorderHighlighted","detailsTitle","activePlanHeader","planHeader","detailsPrice","detailsCapacityMax","detailsCapacityMin","itemContainer","itemContainerDetail","alignContent","itemFirst","itemHighlighted","checkIcon","buttonContainerBlank","buttonContainerHighlighted","openSourcePolicy","activateLink","clear","subnetRefreshLicenseLink","midWidth","smallWidth","licenseDescription","currentPlanBG","currentPlanButton","planItemsPadding","subnetSubTitle","fetchLicenseInfo","setCurrentPlanID","activateProductModal","setActivateProductModal","currentPlanID","loadingRefreshLicense","setLoadingRefreshLicense","details","currentPlan","TRACE_MESSAGE_RECEIVED","TRACE_RESET_MESSAGES","wsProtocol","protocol","messages","trace","traceMessageReceived","traceResetMessages","logList","sizeItem","timeItem","wsProt","c","W3CWebSocket","onopen","onmessage","ptime","moment","toDate","onclose","timeParse","fullElement","statusCode","statusMsg","LOG_MESSAGE_RECEIVED","LOG_RESET_MESSAGES","logs","logMessageReceived","logResetMessages","tab","logerror","logerror_tab","ansidefault","highlight","setHighlight","renderLog","logElement","logMessage","ConsoleMsg","highlightedLine","startsWith","errorElems","deploymentid","requestID","remotehost","userAgent","source","renderError","renderLines","buttonKit","toggleButton","inputBar","advancedLabel","advancedLabelContainer","getInformationContainer","orderButton","recordsLabel","blockCollapsed","filterOpen","endLineAction","filtersContainer","innerContainer","noticeLabel","tableFOpen","tableFClosed","setFilterOpen","apiName","setApiName","setUserAgent","setObject","setRequestID","responseStatus","setResponseStatus","sortOrder","setSortOrder","setColumnsShown","setNextPage","alreadyFetching","setAlreadyFetching","recordsResp","queryParams","fetchedResults","newResultSet","response_status_code","response_status","colName","newArray","sortData","newSortDirection","resolve","currentTab","setCurrentTab","showLogSearch","setShowLogSearch","graphContainer","scanInfo","scanData","inlineCheckboxes","start","setStart","setBucketName","bucketList","setBucketList","setRecursive","forceStart","setForceStart","forceStop","setForceStop","beforeHeal","afterHeal","objectsHealed","objectsScanned","healDuration","sizeScanned","hStatus","setHStatus","colorHealthArr","Green","Yellow","Red","Grey","cB","cA","entries","healthAfterCols","itemsScanned","healthBeforeCols","bytesScanned","datasets","bucketNames","legend","WATCH_MESSAGE_RECEIVED","WATCH_RESET_MESSAGES","watch","watchMessageReceived","watchResetMessages","searchPrefix","some","Time","HEALTH_INFO_MESSAGE_RECEIVED","HEALTH_INFO_RESET_MESSAGE","DiagStatError","DiagStatSuccess","DiagStatInProgress","healthInfo","serverDiagnosticStatus","healthInfoMessageReceived","healthInfoResetMessage","setServerDiagStat","gap","startDiagnostic","setStartDiagnostic","downloadDisabled","setDownloadDisabled","code","tableWrapper","DIRECT_CSI_SELECT_DRIVE","closeFormatModalAndRefresh","allDrives","drivesToFormat","formatAll","setFormatAll","force","setForce","drives","formatIssuesList","errorsList","onCloseFormatErrorsList","selectDrive","driveName","notAvailableNotice","linkItem","checkedDrives","setCheckedDrives","formatOpen","setFormatOpen","formatErrorsResult","setFormatErrorsResult","formatErrorsOpen","setFormatErrorsOpen","setDrivesToFormat","notAvailable","setNotAvailable","newItem","joinName","node","drive","d1","d2","driveID","routes","tabsContainer","StoragePVCs","DirectCSIDrives","render","isServerLoading","serverIsLoading","snackBarMessage","toolbar","default","toolbarIcon","mixins","appBar","drawer","transitions","create","easing","sharp","duration","leavingScreen","appBarShift","enteringScreen","menuButton","menuButtonHidden","drawerPaper","drawerPaperClose","breakpoints","up","warningBar","heigh","widht","allowedRoutes","Dashboard","Buckets","ObjectBrowser","ObjectRouting","Watch","Users","Groups","Policies","Heal","Trace","LogsMain","HealthInfo","ConfigurationMain","Account","WebhookPanel","TenantsMain","Storage","TenantDetails","License","Drawer","exact","routerProps","LoginCallback","errorDescription","setErrorDescription","sessionId","SESSION_RESPONSE","consoleOperatorMode","saveSessionResponse","Component","sessionLoading","setSessionLoading","pathname","hot","Login","Console","initialState","features","initialRoute","selectedDrive","globalReducer","combineReducers","newRouteList","indexOfTopPath","newRouteLevels","splitRoutes","routesArray","initRoute","newSetOfRoutes","newFoldersRoutes","lastRoute","splitElements","folderTrim","currentList","lastItem","newList","actualFiles","newState","has","originPageNameItems","joinValue","originValidPages","newSetOfPages","elm","changeCL","minioCerts","NCertList","minioCertsList","cleanMinioCertsList","CACerts","NACList","CACertsList","consoleCert","encServerCert","encClientCert","encVaultCert","encVaultCA","encGemaltoCA","directCSI","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","createMuiTheme","light","dark","contrastText","grey","100","200","300","400","500","600","700","800","900","typography","h1","h2","h3","h4","h5","h6","overrides","MuiButton","GlobalCss","ReactDOM","store","createStore","applyMiddleware","thunk","ThemeProvider","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"oOAEeA,gB,6ICgCFC,EAAc,cACdC,EAAgB,gBAChBC,EAAY,YACZC,EAAuB,uBACvBC,EAAoB,oBACpBC,EAAuB,uBACvBC,EAAwB,wBACxBC,EAAuB,uBACvBC,EAA0B,0BAC1BC,EAA0B,0BAC1BC,EAA0B,0BCdhC,SAASC,EAAaC,GAC3B,MAAO,CACLC,KAAMb,EACNc,OAAQF,GAWL,SAASG,EAAYC,GAC1B,MAAO,CACLH,KAAMX,EACNc,KAAMA,GAIH,SAASC,EAAmBC,GACjC,MAAO,CACLL,KAAMV,EACNe,aAAcA,GAWX,IC5CKC,ED0DCC,EAAqB,SAACC,GACjC,MAAO,CACLR,KAAMP,EACNe,YAISC,EAAuB,SAACD,GACnC,MAAO,CACLR,KAAML,EACNa,YAISE,EAAuB,SAACF,GACnC,MAAO,CACLR,KAAMJ,EACNY,YAISG,EAA4B,SAACH,GACxC,MAAO,CACLR,KAAMH,EACNW,Y,qDEnFEI,EAAW,WACXC,GAAY,WAELC,GAAQ,CACnB,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,OAEWC,GAAW,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,MAC1CC,GAAY,CAAI,KAAJ,OAAYD,IAExBE,GAAY,SAACC,GAIxB,IAJsE,IAAnCC,EAAkC,wDACjEC,EAAI,EACNC,EAAIC,SAASJ,EAAG,KAAO,EAElBG,GAAK,QAAUD,GACpBC,GAAQ,KAIV,IAAME,EAAS,CAAI,KAAJ,OAAYR,IAC3B,OACEM,EAAEG,QAAQH,EAAI,IAAMD,EAAI,EAAI,EAAI,GAChC,KACCD,EAAeI,EAAUH,GAAKN,GAAMM,KAoB5BK,GAAe,WAJA,IAACC,EAK3BC,IAAQC,WAAW,SALQ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AC5D,CACEC,iBAAkB,SAClBC,oBAAqB,6BAEvB,CACED,iBAAkB,QAClBC,oBAAqB,4BAEvB,CACED,iBAAkB,cAClBC,oBAAqB,kCAEvB,CAAED,iBAAkB,OAAQC,oBAAqB,2BACjD,CACED,iBAAkB,kBAClBC,oBAAqB,sCAEvB,CACED,iBAAkB,gBAClBC,oBAAqB,oCAEvB,CACED,iBAAkB,iBAClBC,oBAAqB,qCAEvB,CACED,iBAAkB,gBAClBC,oBAAqB,qCAIZC,GAA4B,CACvC3yB,OAAQ,CACN,CACExwB,KAAM,OACN2O,UAAU,EACVP,MAAO,kBACPkC,QAAS,0DACThS,KAAM,SACNynB,YAAa,uBAEf,CACE/lB,KAAM,UACN2O,UAAU,EACVP,MAAO,UACPkC,QAAS,wCACThS,KAAM,UACNynB,YAAa,kBAGjBq9B,MAAO,CACL,CACEpjD,KAAM,SACN2O,UAAU,EACVP,MAAO,SACPkC,QACE,yEACFhS,KAAM,MACNynB,YAAa,qBAEf,CACE/lB,KAAM,SACN2O,UAAU,EACVP,MAAO,SACPkC,QAAS,0CACThS,KAAM,SACNynB,YAAa,wBAEf,CACE/lB,KAAM,QACN2O,UAAU,EACVP,MAAO,QACPkC,QAAS,kDACThS,KAAM,SACNynB,YAAa,cAEf,CACE/lB,KAAM,UACN2O,UAAU,EACVP,MAAO,UACPkC,QACE,0FACFhS,KAAM,MACNynB,YAAa,qCAEf,CACE/lB,KAAM,QACN2O,UAAU,EACVP,MAAO,QACPkC,QAAS,oDACThS,KAAM,SACNynB,YAAa,4BAEf,CACE/lB,KAAM,gBACN2O,UAAU,EACVP,MAAO,gBACPkC,QAAS,gBACThS,KAAM,SACNynB,YAAa,uBAEf,CACE/lB,KAAM,iBACN2O,UAAU,EACVP,MAAO,iBACPkC,QAAS,iBACThS,KAAM,SACNynB,YAAa,wBAEf,CACE/lB,KAAM,UACN2O,UAAU,EACVP,MAAO,UACPkC,QAAS,wCACThS,KAAM,UACNwnB,WAAW,EACXC,YAAa,kBAGjBs9B,YAAa,CACX,CACErjD,KAAM,aACN2O,UAAU,EACVP,MAAO,aACPkC,QACE,mFACFhS,KAAM,MACNynB,YAAa,qBACbiV,YAAY,GAEd,CACEh7B,KAAM,aACN2O,UAAU,EACVP,MAAO,aACPkC,QACE,gGACFhS,KAAM,MACNynB,YAAa,oBACbiV,YAAY,IAGhBsoB,KAAM,CACJ,CACEtjD,KAAM,YACN2O,UAAU,EACVP,MAAO,YACPkC,QACE,mFACFhS,KAAM,MACNynB,YAAa,kBAEf,CACE/lB,KAAM,cACN2O,UAAU,EACVP,MAAO,cACPkC,QAAS,wDACThS,KAAM,SACNynB,YAAa,qBAEf,CACE/lB,KAAM,eACN2O,UAAU,EACVP,MAAO,eACPkC,QAAS,kDACThS,KAAM,SACNynB,YAAa,sBAEf,CACE/lB,KAAM,cACN2O,UAAU,EACVP,MAAO,cACPkC,QAAS,sCACThS,KAAM,SACNynB,YAAa,qBAEf,CACE/lB,KAAM,kBACN2O,UAAU,EACVP,MAAO,kBACPkC,QAAS,0CACThS,KAAM,SACNynB,YAAa,yBAEf,CACE/lB,KAAM,UACN2O,UAAU,EACVP,MAAO,UACPkC,QAAS,wCACThS,KAAM,UACNwnB,WAAW,EACXC,YAAa,kBAGjBw9B,gBAAiB,CACf,CACEvjD,KAAM,aACN2O,UAAU,EACVP,MAAO,aACPkC,QAAS,yCACThS,KAAM,SACNynB,YAAa,oBAEf,CACE/lB,KAAM,YACN2O,UAAU,EACVP,MAAO,YACP9P,KAAM,SACNynB,YAAa,mBAEf,CACE/lB,KAAM,aACN2O,UAAU,EACVP,MAAO,aACPkC,QAAS,aACThS,KAAM,SACNynB,YAAa,oBAEf,CACE/lB,KAAM,eACN2O,UAAU,EACVP,MAAO,eACPkC,QAAS,eACThS,KAAM,SACNynB,YAAa,uBAGjBy9B,cAAe,CACb,CACExjD,KAAM,cACN2O,UAAU,EACVP,MAAO,cACPkC,QAAS,qDACThS,KAAM,SACNynB,YAAa,wBAEf,CACE/lB,KAAM,kBACN2O,UAAU,EACVP,MAAO,kBACPkC,QACE,mHACFhS,KAAM,MACNynB,YAAa,yBAEf,CACE/lB,KAAM,yBACN2O,UAAU,EACVP,MAAO,yBACPkC,QACE,mFACFhS,KAAM,SACNynB,YAAa,gCAEf,CACE/lB,KAAM,sBACN2O,UAAU,EACVP,MAAO,sBACPkC,QACE,8EACFhS,KAAM,SACNynB,YAAa,6BAEf,CACE/lB,KAAM,0BACN2O,UAAU,EACVP,MAAO,0BACPkC,QAAS,2DACThS,KAAM,MACNynB,YAAa,iCAEf,CACE/lB,KAAM,uBACN2O,UAAU,EACVP,MAAO,uBACPkC,QAAS,4CACThS,KAAM,SACNynB,YAAa,8BAEf,CACE/lB,KAAM,aACN2O,UAAU,EACVP,MAAO,aACPkC,QACE,sEACFhS,KAAM,SACNynB,YAAa,oBAEf,CACE/lB,KAAM,kBACN2O,UAAU,EACVP,MAAO,kBACPkC,QACE,oEACFhS,KAAM,UAER,CACE0B,KAAM,kBACN2O,UAAU,EACVP,MAAO,kBACPkC,QACE,mEACFhS,KAAM,UAER,CACE0B,KAAM,UACN2O,UAAU,EACVP,MAAO,UACPkC,QAAS,2CACThS,KAAM,UACNynB,YAAa,kBAGjB09B,eAAgB,CACd,CACEzjD,KAAM,WACN2O,UAAU,EACVP,MAAO,WACP9P,KAAM,SACNynB,YAAa,kBAEf,CACE/lB,KAAM,aACN2O,UAAU,EACVP,MAAO,aACP9P,KAAM,SACNynB,YAAa,qBAGjB29B,cAAe,CACb,CACE1jD,KAAM,WACN2O,UAAU,EACVP,MAAO,WACP9P,KAAM,SACNynB,YAAa,kBAEf,CACE/lB,KAAM,aACN2O,UAAU,EACVP,MAAO,aACP9P,KAAM,SACNynB,YAAa,sBAKb49B,GAAe,CACnB,CACE3jD,KAAM,YACNoO,MAAO,kBACPO,UAAU,EAEV2B,QAAS,2DACThS,KAAM,SACNynB,YAAa,yBAEf,CACE/lB,KAAM,cACNoO,MAAO,cACPO,UAAU,EAEV2B,QAAS,8DACThS,KAAM,SACNynB,YAAa,qBAEf,CACE/lB,KAAM,UACNoO,MAAO,UACPO,UAAU,EACVrQ,KAAM,UACNynB,YAAa,kBAIJ69B,IAAgC,sBAC1CpB,GAD0C,CAEzC,CACExiD,KAAM,UACNoO,MAAO,UACPO,UAAU,EAEV2B,QAAS,iDACThS,KAAM,SACNynB,YAAa,iBAEf,CACE/lB,KAAM,QACNoO,MAAO,QACPkC,QAAS,4CACThS,KAAM,SACNynB,YAAa,eAEf,CACE/lB,KAAM,gBACNoO,MAAO,gBACPkC,QAAS,uDACThS,KAAM,SACNynB,YAAa,uBAEf,CACE/lB,KAAM,gBACNoO,MAAO,gBACPkC,QAAS,uDACThS,KAAM,SACNynB,YAAa,uBAEf,CACE/lB,KAAM,iBACNoO,MAAO,iBACPkC,QAAS,iDACThS,KAAM,UAER,CACE0B,KAAM,kBACNoO,MAAO,kBACPkC,QACE,uEACFhS,KAAM,SACNynB,YAAa,yBAEf,CACE/lB,KAAM,OACNoO,MAAO,OACPkC,QAAS,4CACThS,KAAM,UAER,CACE0B,KAAM,MACNoO,MAAO,MACPkC,QAAS,4BACThS,KAAM,UAER,CACE0B,KAAM,kBACNoO,MAAO,kBACPkC,QACE,mEACFhS,KAAM,UAER,CACE0B,KAAM,kBACNoO,MAAO,kBACPkC,QAAS,2CACThS,KAAM,OACNynB,YAAa,yBAEf,CACE/lB,KAAM,iBACNoO,MAAO,iBACPkC,QAAS,mCACThS,KAAM,OACNynB,YAAa,wBAEf,CACE/lB,KAAM,UACNoO,MAAO,UACPkC,QAAS,uDACThS,KAAM,SACNynB,YAAa,wBApF0B,OAsFtC49B,KAtFsC,gBAwF1ClB,GAxF0C,CAyFzC,CACEziD,KAAM,MACN2O,UAAU,EACVP,MAAO,MACPkC,QACE,sEACFhS,KAAM,OAER,CACE0B,KAAM,WACNoO,MAAO,WACPkC,QAAS,4BACThS,KAAM,SACNynB,YAAa,kBAEf,CACE/lB,KAAM,gBACNoO,MAAO,gBACPkC,QAAS,qBACThS,KAAM,SACNynB,YAAa,uBAEf,CACE/lB,KAAM,cACNoO,MAAO,cACPkC,QAAS,6BACThS,KAAM,SACNynB,YAAa,qBAEf,CACE/lB,KAAM,YACNoO,MAAO,YACPkC,QACE,yEACFhS,KAAM,UAER,CACE0B,KAAM,UACNoO,MAAO,UACPkC,QACE,0EACFhS,KAAM,UAER,CACE0B,KAAM,UACNoO,MAAO,UACPkC,QACE,mEACFhS,KAAM,UAER,CACE0B,KAAM,WACNoO,MAAO,WACPkC,QACE,yGACFhS,KAAM,UAER,CACE0B,KAAM,eACNoO,MAAO,eACPkC,QACE,kEACFhS,KAAM,UAER,CACE0B,KAAM,gBACNoO,MAAO,gBACPkC,QAAS,4DACThS,KAAM,SACNynB,YAAa,wBA9J0B,OAgKtC49B,KAhKsC,gBAkK1ChB,GAlK0C,CAmKzC,CACE3iD,KAAM,UACN2O,UAAU,EACVP,MAAO,UACPkC,QAAS,wDACThS,KAAM,UACNynB,YAAa,iBAEf,CACE/lB,KAAM,MACN2O,UAAU,EACVP,MAAO,MACPkC,QAAS,wDACThS,KAAM,SACNynB,YAAa,aAEf,CACE/lB,KAAM,WACNoO,MAAO,WACPkC,QAAS,wBACThS,KAAM,SACNynB,YAAa,mBAxL0B,OA0LtC49B,KA1LsC,gBA4L1CjB,GA5L0C,CA6LzC,CACE1iD,KAAM,SACN2O,UAAU,EACVP,MAAO,SACPkC,QAAS,mDACThS,KAAM,MACNynB,YAAa,iBAEf,CACE/lB,KAAM,QACN2O,UAAU,EACVP,MAAO,QACPkC,QAAS,oCACThS,KAAM,SACNynB,YAAa,eAEf,CACE/lB,KAAM,WACNoO,MAAO,WACPkC,QAAS,gBACThS,KAAM,SACNynB,YAAa,kBAEf,CACE/lB,KAAM,WACNoO,MAAO,WACPkC,QAAS,gBACThS,KAAM,SACNynB,YAAa,kBAEf,CACE/lB,KAAM,MACNoO,MAAO,MACPkC,QAAS,uDACThS,KAAM,SACNynB,YAAa,aAEf,CACE/lB,KAAM,sBACNoO,MAAO,sBACPkC,QAAS,sDACThS,KAAM,WACNynB,YAAa,6BAEf,CACE/lB,KAAM,qBACNoO,MAAO,qBACPkC,QAAS,qDACThS,KAAM,WACNynB,YAAa,6BA9O0B,OAgPtC49B,KAhPsC,gBAkP1Cf,GAlP0C,CAmPzC,CACE5iD,KAAM,UACN2O,UAAU,EACVP,MAAO,UACPkC,QAAS,0CACThS,KAAM,UACNynB,YAAa,iBAEf,CACE/lB,KAAM,UACN2O,UAAU,EACVP,MAAO,UACPkC,QAAS,4BACThS,KAAM,SACNynB,YAAa,sBAEf,CACE/lB,KAAM,WACNoO,MAAO,WACPkC,QAAS,gBACThS,KAAM,SACNynB,YAAa,uBAEf,CACE/lB,KAAM,WACNoO,MAAO,WACPkC,QAAS,gBACThS,KAAM,SACNynB,YAAa,uBAEf,CACE/lB,KAAM,QACNoO,MAAO,QACPkC,QAAS,aACThS,KAAM,SACNynB,YAAa,oBAEf,CACE/lB,KAAM,MACNoO,MAAO,MACPkC,QAAS,4BACThS,KAAM,UAER,CACE0B,KAAM,kBACNoO,MAAO,kBACPkC,QACE,mEACFhS,KAAM,UAER,CACE0B,KAAM,gBACNoO,MAAO,gBACPkC,QAAS,gEACThS,KAAM,WACNynB,YAAa,uBAEf,CACE/lB,KAAM,YACNoO,MAAO,YACPkC,QAAS,4CACThS,KAAM,UAER,CACE0B,KAAM,kBACNoO,MAAO,kBACPkC,QAAS,8CACThS,KAAM,UAER,CACE0B,KAAM,mCACNoO,MAAO,uCACPkC,QAAS,yDACThS,KAAM,SACNynB,YAAa,mCAEf,CACE/lB,KAAM,uBACNoO,MAAO,uBACPkC,QAAS,uCACThS,KAAM,SACNynB,YAAa,8BAEf,CACE/lB,KAAM,iBACNoO,MAAO,iBACPkC,QAAS,sDACThS,KAAM,SACNynB,YAAa,wBAEf,CACE/lB,KAAM,cACNoO,MAAO,cACPkC,QAAS,iCACThS,KAAM,SACNynB,YAAa,qBAEf,CACE/lB,KAAM,aACNoO,M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ACjB,mBAAoB,CAClB1N,aAAc,MA1BJH,EA8Bf,kBAAM,QAETysF,IAAStI,OACP,eAAC,IAAD,CAAUuI,MHVHC,aAAYpE,GAAeuC,GAAiB8B,aAAgBC,QGUnE,UACE,cAACL,GAAD,IACA,cAACM,GAAA,EAAD,CAAe3tF,MAAOA,GAAtB,SAEE,cAAC,GAAD,SAGJrH,SAASi1F,eAAe,SFmEpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAMnvF,MAAK,SAACovF,GAClCA,EAAaC,kB","file":"static/js/main.e94e6cae.chunk.js","sourcesContent":["import { createBrowserHistory } from \"history\";\n\nexport default createBrowserHistory();\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 .\nexport interface snackBarMessage {\n message: string;\n type: \"message\" | \"error\";\n}\n\nexport interface SystemState {\n loggedIn: boolean;\n operatorMode: boolean;\n sidebarOpen: boolean;\n session: string;\n userName: string;\n serverNeedsRestart: boolean;\n serverIsLoading: boolean;\n loadingProgress: number;\n snackBar: snackBarMessage;\n modalSnackBar: snackBarMessage;\n serverDiagnosticStatus: string;\n}\n\nexport const USER_LOGGED = \"USER_LOGGED\";\nexport const OPERATOR_MODE = \"OPERATOR_MODE\";\nexport const MENU_OPEN = \"MENU_OPEN\";\nexport const SERVER_NEEDS_RESTART = \"SERVER_NEEDS_RESTART\";\nexport const SERVER_IS_LOADING = \"SERVER_IS_LOADING\";\nexport const SET_LOADING_PROGRESS = \"SET_LOADING_PROGRESS\";\nexport const SET_SNACK_BAR_MESSAGE = \"SET_SNACK_BAR_MESSAGE\";\nexport const SET_SERVER_DIAG_STAT = \"SET_SERVER_DIAG_STAT\";\nexport const SET_ERROR_SNACK_MESSAGE = \"SET_ERROR_SNACK_MESSAGE\";\nexport const SET_SNACK_MODAL_MESSAGE = \"SET_SNACK_MODAL_MESSAGE\";\nexport const SET_MODAL_ERROR_MESSAGE = \"SET_MODAL_ERROR_MESSAGE\";\n\ninterface UserLoggedAction {\n type: typeof USER_LOGGED;\n logged: boolean;\n}\n\ninterface OperatorModeAction {\n type: typeof OPERATOR_MODE;\n operatorMode: boolean;\n}\n\ninterface SetMenuOpenAction {\n type: typeof MENU_OPEN;\n open: boolean;\n}\n\ninterface ServerNeedsRestartAction {\n type: typeof SERVER_NEEDS_RESTART;\n needsRestart: boolean;\n}\n\ninterface ServerIsLoading {\n type: typeof SERVER_IS_LOADING;\n isLoading: boolean;\n}\ninterface SetLoadingProgress {\n type: typeof SET_LOADING_PROGRESS;\n loadingProgress: number;\n}\n\ninterface SetServerDiagStat {\n type: typeof SET_SERVER_DIAG_STAT;\n serverDiagnosticStatus: string;\n}\n\ninterface SetSnackBarMessage {\n type: typeof SET_SNACK_BAR_MESSAGE;\n message: string;\n}\n\ninterface SetErrorSnackMessage {\n type: typeof SET_ERROR_SNACK_MESSAGE;\n message: string;\n}\n\ninterface SetModalSnackMessage {\n type: typeof SET_SNACK_MODAL_MESSAGE;\n message: string;\n}\n\ninterface SetModalErrorMessage {\n type: typeof SET_MODAL_ERROR_MESSAGE;\n message: string;\n}\n\nexport type SystemActionTypes =\n | UserLoggedAction\n | OperatorModeAction\n | SetMenuOpenAction\n | ServerNeedsRestartAction\n | ServerIsLoading\n | SetLoadingProgress\n | SetServerDiagStat\n | SetSnackBarMessage\n | SetErrorSnackMessage\n | SetModalSnackMessage\n | SetModalErrorMessage;\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 {\n MENU_OPEN,\n OPERATOR_MODE,\n SERVER_IS_LOADING,\n SERVER_NEEDS_RESTART,\n USER_LOGGED,\n SET_LOADING_PROGRESS,\n SET_SNACK_BAR_MESSAGE,\n SET_SERVER_DIAG_STAT,\n SET_ERROR_SNACK_MESSAGE,\n SET_SNACK_MODAL_MESSAGE,\n SET_MODAL_ERROR_MESSAGE,\n} from \"./types\";\n\nexport function userLoggedIn(loggedIn: boolean) {\n return {\n type: USER_LOGGED,\n logged: loggedIn,\n };\n}\n\nexport function consoleOperatorMode(operatorMode: boolean) {\n return {\n type: OPERATOR_MODE,\n operatorMode: operatorMode,\n };\n}\n\nexport function setMenuOpen(open: boolean) {\n return {\n type: MENU_OPEN,\n open: open,\n };\n}\n\nexport function serverNeedsRestart(needsRestart: boolean) {\n return {\n type: SERVER_NEEDS_RESTART,\n needsRestart: needsRestart,\n };\n}\n\nexport function serverIsLoading(isLoading: boolean) {\n return {\n type: SERVER_IS_LOADING,\n isLoading: isLoading,\n };\n}\n\nexport const setLoadingProgress = (progress: number) => {\n return {\n type: SET_LOADING_PROGRESS,\n loadingProgress: progress,\n };\n};\n\nexport const setServerDiagStat = (status: string) => {\n return {\n type: SET_SERVER_DIAG_STAT,\n serverDiagnosticStatus: status,\n };\n};\n\nexport const setSnackBarMessage = (message: string) => {\n return {\n type: SET_SNACK_BAR_MESSAGE,\n message,\n };\n};\n\nexport const setErrorSnackMessage = (message: string) => {\n return {\n type: SET_ERROR_SNACK_MESSAGE,\n message,\n };\n};\n\nexport const setModalSnackMessage = (message: string) => {\n return {\n type: SET_SNACK_MODAL_MESSAGE,\n message,\n };\n};\n\nexport const setModalErrorSnackMessage = (message: string) => {\n return {\n type: SET_MODAL_ERROR_MESSAGE,\n message,\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\nexport interface ILoginDetails {\n loginStrategy: loginStrategyType;\n redirect: string;\n}\n\nexport enum loginStrategyType {\n unknown = \"unknown\",\n form = \"form\",\n redirect = \"redirect\",\n serviceAccount = \"service-account\",\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 storage from \"local-storage-fallback\";\nimport { ICapacity, IErasureCodeCalc, IStorageFactors } from \"./types\";\nimport { IPool } from \"../screens/Console/Tenants/ListTenants/types\";\n\nconst minStReq = 1073741824; // Minimal Space required for MinIO\nconst minMemReq = 2147483648; // Minimal Memory required for MinIO in bytes\n\nexport const units = [\n \"B\",\n \"KiB\",\n \"MiB\",\n \"GiB\",\n \"TiB\",\n \"PiB\",\n \"EiB\",\n \"ZiB\",\n \"YiB\",\n];\nexport const k8sUnits = [\"Ki\", \"Mi\", \"Gi\", \"Ti\", \"Pi\", \"Ei\"];\nexport const k8sCalcUnits = [\"B\", ...k8sUnits];\n\nexport const niceBytes = (x: string, showK8sUnits: boolean = false) => {\n let l = 0,\n n = parseInt(x, 10) || 0;\n\n while (n >= 1024 && ++l) {\n n = n / 1024;\n }\n //include a decimal point and a tenths-place digit if presenting\n //less than ten of KB or greater units\n const k8sUnitsN = [\"B\", ...k8sUnits];\n return (\n n.toFixed(n < 10 && l > 0 ? 1 : 0) +\n \" \" +\n (showK8sUnits ? k8sUnitsN[l] : units[l])\n );\n};\n\nexport const setCookie = (name: string, val: string) => {\n const date = new Date();\n const value = val;\n\n // Set it expire in 45 minutes\n date.setTime(date.getTime() + 45 * 60 * 1000);\n\n // Set it\n document.cookie =\n name + \"=\" + value + \"; expires=\" + date.toUTCString() + \"; path=/\";\n};\n\nexport const deleteCookie = (name: string) => {\n document.cookie = name + \"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;\";\n};\n\nexport const clearSession = () => {\n storage.removeItem(\"token\");\n deleteCookie(\"token\");\n};\n\n// timeFromDate gets time string from date input\nexport const timeFromDate = (d: Date) => {\n let h = d.getHours() < 10 ? `0${d.getHours()}` : `${d.getHours()}`;\n let m = d.getMinutes() < 10 ? `0${d.getMinutes()}` : `${d.getMinutes()}`;\n let s = d.getSeconds() < 10 ? `0${d.getSeconds()}` : `${d.getSeconds()}`;\n\n return `${h}:${m}:${s}:${d.getMilliseconds()}`;\n};\n\n// units to be used in a dropdown\nexport const factorForDropdown = () => {\n return units.map((unit) => {\n return { label: unit, value: unit };\n });\n};\n\n// units to be used in a dropdown\nexport const k8sfactorForDropdown = () => {\n return k8sUnits.map((unit) => {\n return { label: unit, value: unit };\n });\n};\n\n//getBytes, converts from a value and a unit from units array to bytes\nexport const getBytes = (\n value: string,\n unit: string,\n fromk8s: boolean = false\n) => {\n const vl: number = parseFloat(value);\n\n const unitsTake = fromk8s ? k8sCalcUnits : units;\n\n const powFactor = unitsTake.findIndex((element) => element === unit);\n\n if (powFactor === -1) {\n return \"0\";\n }\n const factor = Math.pow(1024, powFactor);\n const total = vl * factor;\n\n return total.toString(10);\n};\n\n//getTotalSize gets the total size of a value & unit\nexport const getTotalSize = (value: string, unit: string) => {\n const bytes = getBytes(value, unit, true).toString();\n return niceBytes(bytes);\n};\n\nexport const setMemoryResource = (\n memorySize: number,\n capacitySize: string,\n maxMemorySize: number\n) => {\n // value always comes as Gi\n const requestedSizeBytes = getBytes(memorySize.toString(10), \"Gi\", true);\n const memReqSize = parseInt(requestedSizeBytes, 10);\n if (maxMemorySize === 0) {\n return {\n error: \"There is no memory available for the selected number of nodes\",\n request: 0,\n limit: 0,\n };\n }\n\n if (maxMemorySize < minMemReq) {\n return {\n error: \"There are not enough memory resources available\",\n request: 0,\n limit: 0,\n };\n }\n\n if (memReqSize < minMemReq) {\n return {\n error: \"The requested memory size must be greater than 2Gi\",\n request: 0,\n limit: 0,\n };\n }\n if (memReqSize > maxMemorySize) {\n return {\n error:\n \"The requested memory is greater than the max available memory for the selected number of nodes\",\n request: 0,\n limit: 0,\n };\n }\n\n const capSize = parseInt(capacitySize, 10);\n let memLimitSize = memReqSize;\n // set memory limit based on the capacitySize\n // if capacity size is lower than 1TiB we use the limit equal to request\n if (capSize >= parseInt(getBytes(\"1\", \"Pi\", true), 10)) {\n memLimitSize = Math.max(\n memReqSize,\n parseInt(getBytes(\"64\", \"Gi\", true), 10)\n );\n } else if (capSize >= parseInt(getBytes(\"100\", \"Ti\"), 10)) {\n memLimitSize = Math.max(\n memReqSize,\n parseInt(getBytes(\"32\", \"Gi\", true), 10)\n );\n } else if (capSize >= parseInt(getBytes(\"10\", \"Ti\"), 10)) {\n memLimitSize = Math.max(\n memReqSize,\n parseInt(getBytes(\"16\", \"Gi\", true), 10)\n );\n } else if (capSize >= parseInt(getBytes(\"1\", \"Ti\"), 10)) {\n memLimitSize = Math.max(\n memReqSize,\n parseInt(getBytes(\"8\", \"Gi\", true), 10)\n );\n }\n\n return {\n error: \"\",\n request: memReqSize,\n limit: memLimitSize,\n };\n};\n\nexport const calculateDistribution = (\n capacityToUse: ICapacity,\n forcedNodes: number = 0,\n limitSize: number = 0,\n drivesPerServer: number = 0\n) => {\n let numberOfNodes = {};\n const requestedSizeBytes = getBytes(\n capacityToUse.value,\n capacityToUse.unit,\n true\n );\n\n if (parseInt(requestedSizeBytes, 10) < minStReq) {\n return {\n error: \"The pool size must be greater than 1Gi\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n pvSize: 0,\n };\n }\n\n if (forcedNodes < 4) {\n return {\n error: \"Number of nodes cannot be less than 4\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n pvSize: 0,\n };\n }\n\n if (drivesPerServer <= 0) {\n return {\n error: \"Number of drives must be at least 1\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n pvSize: 0,\n };\n }\n\n numberOfNodes = calculateStorage(\n requestedSizeBytes,\n forcedNodes,\n limitSize,\n drivesPerServer\n );\n\n return numberOfNodes;\n};\n\nconst calculateStorage = (\n requestedBytes: string,\n forcedNodes: number,\n limitSize: number,\n drivesPerServer: number\n) => {\n // Size validation\n const intReqBytes = parseInt(requestedBytes, 10);\n const maxDiskSize = minStReq * 256; // 256 GiB\n\n // We get the distribution\n return structureCalc(\n forcedNodes,\n intReqBytes,\n maxDiskSize,\n limitSize,\n drivesPerServer\n );\n};\n\nconst structureCalc = (\n nodes: number,\n desiredCapacity: number,\n maxDiskSize: number,\n maxClusterSize: number,\n disksPerNode: number = 0\n) => {\n if (\n isNaN(nodes) ||\n isNaN(desiredCapacity) ||\n isNaN(maxDiskSize) ||\n isNaN(maxClusterSize)\n ) {\n return {\n error: \"Some provided data is invalid, please try again.\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n volumePerDisk: 0,\n }; // Invalid Data\n }\n\n let persistentVolumeSize = 0;\n let numberPersistentVolumes = 0;\n let volumesPerServer = 0;\n\n if (disksPerNode === 0) {\n persistentVolumeSize = Math.floor(\n Math.min(desiredCapacity / Math.max(4, nodes), maxDiskSize)\n ); // pVS = min((desiredCapacity / max(4 | nodes)) | maxDiskSize)\n\n numberPersistentVolumes = desiredCapacity / persistentVolumeSize; // nPV = dC / pVS\n volumesPerServer = numberPersistentVolumes / nodes; // vPS = nPV / n\n }\n\n if (disksPerNode) {\n volumesPerServer = disksPerNode;\n numberPersistentVolumes = volumesPerServer * nodes;\n persistentVolumeSize = Math.floor(\n desiredCapacity / numberPersistentVolumes\n );\n }\n\n // Volumes are not exact, we force the volumes number & minimize the volume size\n if (volumesPerServer % 1 > 0) {\n volumesPerServer = Math.ceil(volumesPerServer); // Increment of volumes per server\n numberPersistentVolumes = volumesPerServer * nodes; // nPV = vPS * n\n persistentVolumeSize = Math.floor(\n desiredCapacity / numberPersistentVolumes\n ); // pVS = dC / nPV\n\n const limitSize = persistentVolumeSize * volumesPerServer * nodes; // lS = pVS * vPS * n\n\n if (limitSize > maxClusterSize) {\n return {\n error: \"We were not able to allocate this server.\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n volumePerDisk: 0,\n }; // Cannot allocate this server\n }\n }\n\n if (persistentVolumeSize < minStReq) {\n return {\n error:\n \"Disk Size with this combination would be less than 1Gi, please try another combination\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n volumePerDisk: 0,\n }; // Cannot allocate this volume size\n }\n\n return {\n error: \"\",\n nodes,\n persistentVolumes: numberPersistentVolumes,\n disks: volumesPerServer,\n pvSize: persistentVolumeSize,\n };\n};\n\n// Erasure Code Parity Calc\nexport const erasureCodeCalc = (\n parityValidValues: string[],\n totalDisks: number,\n pvSize: number,\n totalNodes: number\n): IErasureCodeCalc => {\n // Parity Values is empty\n if (parityValidValues.length < 1) {\n return {\n error: 1,\n defaultEC: \"\",\n erasureCodeSet: 0,\n maxEC: \"\",\n rawCapacity: \"0\",\n storageFactors: [],\n };\n }\n\n const totalStorage = totalDisks * pvSize;\n const maxEC = parityValidValues[0];\n const maxParityNumber = parseInt(maxEC.split(\":\")[1], 10);\n\n const erasureStripeSet = maxParityNumber * 2; // ESS is calculated by multiplying maximum parity by two.\n\n const storageFactors: IStorageFactors[] = parityValidValues.map(\n (currentParity) => {\n const parityNumber = parseInt(currentParity.split(\":\")[1], 10);\n const storageFactor =\n erasureStripeSet / (erasureStripeSet - parityNumber);\n\n const maxCapacity = Math.floor(totalStorage / storageFactor);\n const maxTolerations =\n totalDisks - Math.floor(totalDisks / storageFactor);\n return {\n erasureCode: currentParity,\n storageFactor,\n maxCapacity: maxCapacity.toString(10),\n maxFailureTolerations: maxTolerations,\n };\n }\n );\n\n let defaultEC = maxEC;\n\n const fourVar = parityValidValues.find((element) => element === \"EC:4\");\n\n if (totalDisks >= 8 && totalNodes > 16 && fourVar) {\n defaultEC = \"EC:4\";\n }\n\n return {\n error: 0,\n storageFactors,\n maxEC,\n rawCapacity: totalStorage.toString(10),\n erasureCodeSet: erasureStripeSet,\n defaultEC,\n };\n};\n\n// Pool Name Generator\nexport const generatePoolName = (pools: IPool[]) => {\n const poolCounter = pools.length;\n\n return `pool-${poolCounter}`;\n};\n\n// seconds / minutes /hours / Days / Years calculator\nexport const niceDays = (secondsValue: string, timeVariant: string = \"s\") => {\n let seconds = parseFloat(secondsValue);\n\n switch (timeVariant) {\n case \"ns\":\n seconds = Math.floor(seconds * 0.000000001);\n break;\n case \"ms\":\n seconds = Math.floor(seconds * 0.001);\n break;\n default:\n }\n\n const days = Math.floor(seconds / (3600 * 24));\n\n seconds -= days * 3600 * 24;\n const hours = Math.floor(seconds / 3600);\n seconds -= hours * 3600;\n const minutes = Math.floor(seconds / 60);\n seconds -= minutes * 60;\n\n if (days > 365) {\n const years = days / 365;\n return `${years} year${Math.floor(years) === 1 ? \"\" : \"s\"}`;\n }\n\n if (days > 30) {\n const months = Math.floor(days / 30);\n const diffDays = days - months * 30;\n\n return `${months} month${Math.floor(months) === 1 ? \"\" : \"s\"} ${\n diffDays > 0 ? `${diffDays} day${diffDays > 1 ? \"s\" : \"\"}` : \"\"\n }`;\n }\n\n if (days >= 7 && days <= 30) {\n const weeks = Math.floor(days / 7);\n\n return `${Math.floor(weeks)} week${weeks === 1 ? \"\" : \"s\"}`;\n }\n\n if (days >= 1 && days <= 6) {\n return `${days} day${days > 1 ? \"s\" : \"\"}`;\n }\n\n return `${hours >= 1 ? `${hours} hour${hours > 1 ? \"s\" : \"\"}` : \"\"} ${\n minutes >= 1 && hours === 0\n ? `${minutes} minute${minutes > 1 ? \"s\" : \"\"}`\n : \"\"\n } ${\n seconds >= 1 && minutes === 0 && hours === 0\n ? `${seconds} second${seconds > 1 ? \"s\" : \"\"}`\n : \"\"\n }`;\n};\n\nexport const getTimeFromTimestamp = (\n timestamp: string,\n fullDate: boolean = false\n) => {\n const dateObject = new Date(parseInt(timestamp) * 1000);\n\n if (fullDate) {\n return `${dateObject.getFullYear()}-${String(\n dateObject.getMonth() + 1\n ).padStart(2, \"0\")}-${String(dateObject.getDay()).padStart(\n 2,\n \"0\"\n )} ${dateObject.getHours()}:${String(dateObject.getMinutes()).padStart(\n 2,\n \"0\"\n )}:${String(dateObject.getSeconds()).padStart(2, \"0\")}`;\n }\n return `${dateObject.getHours()}:${String(dateObject.getMinutes()).padStart(\n 2,\n \"0\"\n )}`;\n};\n\nexport const calculateBytes = (\n x: string,\n showDecimals = false,\n roundFloor = true\n) => {\n const bytes = parseInt(x, 10);\n\n if (bytes === 0) {\n return { total: 0, unit: k8sCalcUnits[0] };\n }\n\n // Gi : GiB\n const k = 1024;\n\n // Get unit for measure\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n const fractionDigits = showDecimals ? 0 : 1;\n\n const bytesUnit = bytes / Math.pow(k, i);\n\n const roundedUnit = roundFloor ? Math.floor(bytesUnit) : bytesUnit;\n\n // Get Unit parsed\n const unitParsed = parseFloat(roundedUnit.toFixed(fractionDigits));\n const finalUnit = k8sCalcUnits[i];\n\n return { total: unitParsed, unit: finalUnit };\n};\n\nexport const nsToSeconds = (nanoseconds: number) => {\n const conversion = nanoseconds * 0.000000001;\n const round = Math.round((conversion + Number.EPSILON) * 10000) / 10000;\n\n return `${round} s`;\n};\n\nexport const textToRGBColor = (text: string) => {\n const splitText = text.split(\"\");\n\n const hashVl = splitText.reduce((acc, currItem) => {\n return acc + currItem.charCodeAt(0) + ((acc << 5) - acc);\n }, 0);\n\n const hashColored = ((hashVl * 100) & 0x00ffffff).toString(16).toUpperCase();\n\n return `#${hashColored.padStart(6, \"0\")}`;\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 request from \"superagent\";\nimport get from \"lodash/get\";\nimport { clearSession } from \"../utils\";\n\nexport class API {\n invoke(method: string, url: string, data?: object) {\n return request(method, url)\n .send(data)\n .then((res) => res.body)\n .catch((err) => {\n // if we get unauthorized, kick out the user\n if (err.status === 401) {\n clearSession();\n // Refresh the whole page to ensure cache is clear\n // and we dont end on an infinite loop\n window.location.href = \"/login\";\n return;\n }\n return this.onError(err);\n });\n }\n\n onError(err: any) {\n if (err.status) {\n const errMessage = get(\n err.response,\n \"body.message\",\n err.status.toString()\n );\n\n const throwMessage =\n errMessage.charAt(0).toUpperCase() + errMessage.slice(1);\n\n return Promise.reject(throwMessage);\n } else {\n clearSession();\n window.location.href = \"/login\";\n }\n }\n}\n\nconst api = new API();\nexport default api;\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, { useEffect, useState } from \"react\";\nimport request from \"superagent\";\nimport { connect } from \"react-redux\";\nimport ErrorIcon from \"@material-ui/icons/Error\";\nimport Button from \"@material-ui/core/Button\";\nimport TextField from \"@material-ui/core/TextField\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {\n CircularProgress,\n LinearProgress,\n Paper,\n TextFieldProps,\n} from \"@material-ui/core\";\nimport {\n createStyles,\n makeStyles,\n Theme,\n withStyles,\n} from \"@material-ui/core/styles\";\nimport { SystemState } from \"../../types\";\nimport { userLoggedIn } from \"../../actions\";\nimport api from \"../../common/api\";\nimport { ILoginDetails, loginStrategyType } from \"./types\";\nimport history from \"../../history\";\nimport { OutlinedInputProps } from \"@material-ui/core/OutlinedInput\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n \"@global\": {\n body: {\n backgroundColor: \"#FAFAFA\",\n },\n },\n paper: {\n borderRadius: 8,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n width: 800,\n height: 424,\n margin: \"auto\",\n position: \"absolute\",\n top: \"50%\",\n left: \"50%\",\n marginLeft: -400,\n marginTop: -212,\n \"&.MuiPaper-root\": {\n borderRadius: 8,\n },\n },\n avatar: {\n margin: theme.spacing(1),\n backgroundColor: theme.palette.secondary.main,\n },\n form: {\n width: \"100%\", // Fix IE 11 issue.\n },\n submit: {\n margin: \"30px 0px 16px\",\n height: 40,\n boxShadow: \"none\",\n padding: \"16px 30px\",\n },\n errorBlock: {\n backgroundColor: \"#C72C48\",\n width: 800,\n height: 64,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n marginLeft: -400,\n marginTop: -290,\n color: \"#fff\",\n fontWeight: 700,\n fontSize: 14,\n borderRadius: 8,\n padding: 10,\n boxSizing: \"border-box\",\n },\n mainContainer: {\n position: \"relative\",\n height: 424,\n },\n theOcean: {\n borderTopLeftRadius: 8,\n borderBottomLeftRadius: 8,\n background:\n \"transparent linear-gradient(to bottom, #073052 0%,#05122b 100%); 0% 0% no-repeat padding-box;\",\n },\n oceanBg: {\n backgroundImage: \"url(/images/BG_Illustration.svg)\",\n backgroundRepeat: \"no-repeat\",\n backgroundPosition: \"bottom left\",\n height: \"100%\",\n width: 324,\n },\n theLogin: {\n padding: \"40px 45px 20px 45px\",\n },\n loadingLoginStrategy: {\n textAlign: \"center\",\n },\n headerTitle: {\n marginBottom: 10,\n },\n submitContainer: {\n textAlign: \"right\",\n },\n disclaimer: {\n fontSize: 12,\n marginTop: 30,\n },\n jwtInput: {\n marginTop: 45,\n },\n linearPredef: {\n height: 10,\n },\n errorIconStyle: {\n marginRight: 3,\n },\n });\n\nconst inputStyles = makeStyles((theme: Theme) =>\n createStyles({\n disabled: {\n \"&.MuiInput-underline::before\": {\n borderColor: \"#eaeaea\",\n borderBottomStyle: \"solid\",\n },\n },\n })\n);\n\nfunction LoginField(props: TextFieldProps) {\n const classes = inputStyles();\n\n return (\n }\n {...props}\n />\n );\n}\n\nconst mapState = (state: SystemState) => ({\n loggedIn: state.loggedIn,\n});\n\nconst connector = connect(mapState, { userLoggedIn });\n\n// The inferred type will look like:\n// {isOn: boolean, toggleOn: () => void}\n\ninterface ILoginProps {\n userLoggedIn: typeof userLoggedIn;\n classes: any;\n}\n\ninterface LoginStrategyRoutes {\n [key: string]: string;\n}\n\ninterface LoginStrategyPayload {\n [key: string]: any;\n}\n\nconst Login = ({ classes, userLoggedIn }: ILoginProps) => {\n const [accessKey, setAccessKey] = useState(\"\");\n const [jwt, setJwt] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n const [error, setError] = useState(\"\");\n const [loginStrategy, setLoginStrategy] = useState({\n loginStrategy: loginStrategyType.unknown,\n redirect: \"\",\n });\n const [loginSending, setLoginSending] = useState(false);\n\n const loginStrategyEndpoints: LoginStrategyRoutes = {\n form: \"/api/v1/login\",\n \"service-account\": \"/api/v1/login/operator\",\n };\n const loginStrategyPayload: LoginStrategyPayload = {\n form: { accessKey, secretKey },\n \"service-account\": { jwt },\n };\n\n const fetchConfiguration = () => {\n api\n .invoke(\"GET\", \"/api/v1/login\")\n .then((loginDetails: ILoginDetails) => {\n setLoginStrategy(loginDetails);\n setError(\"\");\n if (\n loginDetails.loginStrategy === \"redirect\" &&\n loginDetails.redirect !== \"\"\n ) {\n //location.href = loginDetails.redirect;\n }\n })\n .catch((err: any) => {\n setError(err);\n });\n };\n\n const formSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n setLoginSending(true);\n request\n .post(\n loginStrategyEndpoints[loginStrategy.loginStrategy] || \"/api/v1/login\"\n )\n .send(loginStrategyPayload[loginStrategy.loginStrategy])\n .then((res: any) => {\n const bodyResponse = res.body;\n if (bodyResponse.error) {\n setLoginSending(false);\n // throw will be moved to catch block once bad login returns 403\n throw bodyResponse.error;\n }\n })\n .then(() => {\n // We set the state in redux\n userLoggedIn(true);\n if (loginStrategy.loginStrategy === loginStrategyType.form) {\n localStorage.setItem(\"userLoggedIn\", btoa(accessKey));\n }\n\n history.push(\"/\");\n })\n .catch((err) => {\n setLoginSending(false);\n setError(err.message);\n });\n };\n\n useEffect(() => {\n fetchConfiguration();\n }, []);\n\n let loginComponent = null;\n\n switch (loginStrategy.loginStrategy) {\n case loginStrategyType.form: {\n loginComponent = (\n \n \n Console Login\n \n
\n \n \n ) =>\n setAccessKey(e.target.value)\n }\n label=\"Enter Access Key\"\n name=\"accessKey\"\n autoComplete=\"username\"\n disabled={loginSending}\n />\n \n \n ) =>\n setSecretKey(e.target.value)\n }\n name=\"secretKey\"\n label=\"Enter Secret Key\"\n type=\"password\"\n id=\"secretKey\"\n autoComplete=\"current-password\"\n disabled={loginSending}\n />\n \n \n \n \n Login\n \n \n \n {loginSending && }\n \n \n Don't have an access key?\n
\n
\n Contact your administrator to have one made\n
\n
\n
\n );\n break;\n }\n case loginStrategyType.redirect: {\n loginComponent = (\n \n \n Welcome\n \n \n Login with SSO\n \n \n );\n break;\n }\n case loginStrategyType.serviceAccount: {\n loginComponent = (\n \n \n Operator Login\n \n
\n \n \n ) =>\n setJwt(e.target.value)\n }\n label=\"JWT\"\n name=\"jwt\"\n autoComplete=\"off\"\n disabled={loginSending}\n />\n \n \n \n \n Login\n \n \n \n {loginSending && }\n \n \n Don't have an access key?\n
\n Contact your administrator to have one made\n
\n
\n
\n );\n break;\n }\n default:\n loginComponent = (\n \n );\n }\n\n return (\n \n {error !== \"\" && (\n
\n {\" \"}\n {error}\n
\n )}\n \n \n \n
\n \n \n {loginComponent}\n \n \n \n \n );\n};\n\nexport default connector(withStyles(styles)(Login));\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\n// This object contains variables that will be used across form components.\n\nexport const fieldBasic = {\n inputLabel: {\n fontWeight: 600,\n marginRight: 10,\n fontSize: 15,\n color: \"#000\",\n textAlign: \"left\" as const,\n overflow: \"hidden\",\n \"& span\": {\n display: \"flex\",\n alignItems: \"center\",\n },\n display: \"flex\",\n },\n fieldLabelError: {\n paddingBottom: 22,\n },\n fieldContainer: {\n marginBottom: 20,\n position: \"relative\" as const,\n maxWidth: 840,\n },\n tooltipContainer: {\n marginLeft: 5,\n display: \"flex\",\n alignItems: \"center\",\n },\n switchContainer: {\n display: \"flex\",\n maxWidth: 840,\n },\n};\n\nexport const modalBasic = {\n formScrollable: {\n maxHeight: \"calc(100vh - 300px)\" as const,\n overflowY: \"auto\" as const,\n marginBottom: 25,\n },\n formSlider: {\n marginLeft: 0,\n },\n clearButton: {\n fontFamily: \"Lato, sans-serif\",\n border: \"0\",\n backgroundColor: \"transparent\",\n color: \"#393939\",\n fontWeight: 600,\n fontSize: 14,\n marginRight: 10,\n outline: \"0\",\n padding: \"16px 25px 16px 25px\",\n cursor: \"pointer\",\n },\n floatingEnabled: {\n position: \"absolute\" as const,\n right: 58,\n zIndex: 1000,\n marginTop: -38,\n },\n configureString: {\n border: \"#EAEAEA 1px solid\",\n borderRadius: 4,\n padding: \"24px 50px\",\n overflowY: \"auto\" as const,\n height: 170,\n maxWidth: 840,\n },\n};\n\nexport const tooltipHelper = {\n tooltip: {\n fontSize: 16,\n },\n};\n\nconst checkBoxBasic = {\n width: 14,\n height: 14,\n borderRadius: 2,\n};\n\nexport const checkboxIcons = {\n unCheckedIcon: { ...checkBoxBasic, border: \"1px solid #c3c3c3\" },\n checkedIcon: {\n ...checkBoxBasic,\n border: \"1px solid #081C42\",\n backgroundColor: \"#081C42\",\n },\n};\n\nconst radioBasic = {\n width: 12,\n height: 12,\n borderRadius: \"100%\",\n \"input:disabled ~ &\": {\n border: \"1px solid #9C9C9C\",\n },\n};\n\nexport const radioIcons = {\n radioUnselectedIcon: { ...radioBasic, border: \"1px solid #000\" },\n radioSelectedIcon: {\n ...radioBasic,\n border: \"1px solid #000\",\n backgroundColor: \"#000\",\n },\n};\n\nexport const containerForHeader = (bottomSpacing: any) => ({\n container: {\n padding: \"110px 33px 0\",\n \"& h6\": {\n color: \"#777777\",\n fontSize: 14,\n },\n \"& p\": {\n \"& span:not(*[class*='smallUnit'])\": {\n fontSize: 16,\n },\n },\n },\n});\n\nexport const actionsTray = {\n label: {\n color: \"#393939\",\n fontWeight: 600,\n fontSize: 13,\n alignSelf: \"center\" as const,\n whiteSpace: \"nowrap\" as const,\n \"&:not(:first-of-type)\": {\n marginLeft: 10,\n },\n },\n timeContainers: {\n height: 40,\n },\n actionsTray: {\n display: \"flex\" as const,\n justifyContent: \"space-between\" as const,\n \"& button\": {\n flexGrow: 0,\n marginLeft: 15,\n },\n },\n};\n\nexport const searchField = {\n searchField: {\n flexGrow: 1,\n height: 40,\n background: \"#FFFFFF\",\n borderRadius: 5,\n border: \"#EAEDEE 1px solid\",\n display: \"flex\",\n justifyContent: \"center\",\n padding: \"0 16px\",\n \"& input\": {\n fontSize: 12,\n fontWeight: 700,\n color: \"#000\",\n \"&::placeholder\": {\n color: \"#393939\",\n opacity: 1,\n },\n },\n \"&:hover\": {\n borderColor: \"#000\",\n },\n },\n};\n\nexport const predefinedList = {\n prefinedContainer: {\n maxWidth: 840,\n width: \"100%\",\n },\n predefinedTitle: {\n fontSize: 16,\n fontWeight: 600,\n color: \"#000\",\n margin: \"10px 0\",\n },\n predefinedList: {\n backgroundColor: \"#eaeaea\",\n padding: \"12px 10px\",\n color: \"#393939\",\n fontSize: 12,\n fontWeight: 600,\n minHeight: 41,\n },\n innerContent: {\n width: \"100%\",\n overflowX: \"auto\" as const,\n whiteSpace: \"nowrap\" as const,\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n innerContentMultiline: {\n width: \"100%\",\n maxHeight: 100,\n overflowY: \"auto\" as const,\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n};\n\nexport const objectBrowserCommon = {\n obTitleSection: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"flex-start\",\n marginBottom: 20,\n },\n sectionTitle: {\n fontSize: 22,\n color: \"#000\",\n fontWeight: 600,\n height: 40,\n lineHeight: \"40px\",\n },\n breadcrumbs: {\n fontSize: 10,\n color: \"#000\",\n marginTop: 2,\n \"& a\": {\n textDecoration: \"none\",\n color: \"#000\",\n \"&:hover\": {\n textDecoration: \"underline\",\n },\n },\n },\n};\n\nexport const selectorsCommon = {\n multiSelectTable: {\n height: 200,\n },\n};\n\nexport const settingsCommon = {\n customTitle: {\n fontSize: 18,\n color: \"#000\",\n fontWeight: 600,\n padding: \"12px 0\",\n borderBottom: \"#eaedee 1px solid\",\n marginBottom: 10,\n margin: \"15px 38px 27px\",\n },\n settingsFormContainer: {\n height: \"calc(100vh - 421px)\",\n padding: \"15px 38px\",\n overflowY: \"auto\" as const,\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n settingsButtonContainer: {\n borderTop: \"1px solid #EAEAEA\",\n padding: \"15px 38px\",\n textAlign: \"right\" as const,\n },\n innerSettingsButtonContainer: {\n maxWidth: 840,\n textAlign: \"right\" as const,\n },\n settingsOptionsContainer: {\n height: \"calc(100vh - 244px)\",\n backgroundColor: \"#fff\",\n border: \"#EAEDEE 1px solid\",\n borderRadius: 3,\n marginTop: 15,\n },\n backButton: {\n cursor: \"pointer\",\n fontSize: 10,\n fontWeight: 600,\n color: \"#000\",\n backgroundColor: \"transparent\",\n border: 0,\n padding: 0,\n display: \"flex\",\n alignItems: \"center\",\n \"&:active, &:focus\": {\n outline: 0,\n },\n \"& svg\": {\n width: 10,\n marginRight: 4,\n },\n },\n backContainer: {\n margin: \"20px 38px 0\",\n },\n};\n\nexport const typesSelection = {\n iconContainer: {\n display: \"flex\" as const,\n flexDirection: \"row\" as const,\n maxWidth: 455,\n justifyContent: \"space-between\" as const,\n flexWrap: \"wrap\" as const,\n width: \"100%\",\n },\n nonIconContainer: {\n marginBottom: 16,\n width: 455,\n marginTop: 15,\n \"& button\": {\n marginRight: 16,\n },\n },\n pickTitle: {\n fontWeight: 600,\n color: \"#393939\",\n fontSize: 14,\n marginBottom: 16,\n },\n centerElements: {\n display: \"flex\" as const,\n flexDirection: \"column\" as const,\n alignItems: \"center\" as const,\n justifyContent: \"center\" as const,\n },\n logoButton: {\n height: \"80px\",\n },\n lambdaNotif: {\n backgroundColor: \"#fff\",\n border: \"#393939 1px solid\",\n borderRadius: 5,\n width: 101,\n height: 91,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n marginBottom: 16,\n cursor: \"pointer\",\n \"& img\": {\n maxWidth: 71,\n maxHeight: 71,\n },\n },\n};\n\nexport const logsCommon = {\n logsSubContainer: {\n height: \"calc(100vh - 230px)\",\n padding: \"15px 0\",\n },\n};\n\nexport const widgetCommon = {\n singleValueContainer: {\n position: \"relative\" as const,\n flexGrow: 1,\n width: \"100%\",\n height: \"100%\",\n border: \"#EAEAEA 1px solid\",\n borderRadius: 5,\n backgroundColor: \"#fff\",\n },\n titleContainer: {\n color: \"#393939\",\n fontWeight: 600,\n height: 15,\n textAlign: \"center\" as const,\n fontSize: 10,\n },\n contentContainer: {\n flexGrow: 2,\n justifyContent: \"center\" as const,\n alignItems: \"center\" as const,\n display: \"flex\" as const,\n position: \"absolute\" as const,\n width: \"100%\",\n height: \"calc(100% - 15px)\",\n },\n contentContainerWithLabel: {\n height: \"calc(100% - 25px)\",\n },\n legendBlock: {\n position: \"absolute\" as const,\n bottom: 5,\n display: \"flex\" as const,\n width: \"100%\",\n height: 15,\n flexWrap: \"wrap\" as const,\n overflowY: \"auto\" as const,\n },\n singleLegendContainer: {\n display: \"flex\",\n alignItems: \"center\",\n padding: \"0 10px\",\n maxWidth: \"100%\",\n },\n colorContainer: {\n width: 8,\n height: 8,\n minWidth: 8,\n borderRadius: \"100%\",\n marginRight: 5,\n },\n legendLabel: {\n fontSize: \"80%\",\n color: \"#393939\",\n whiteSpace: \"nowrap\" as const,\n overflow: \"hidden\" as const,\n textOverflow: \"ellipsis\" as const,\n },\n};\n\nexport const tooltipCommon = {\n customTooltip: {\n backgroundColor: \"rgba(255, 255, 255, 0.90)\",\n border: \"#eaeaea 1px solid\",\n borderRadius: 3,\n padding: \"5px 10px\",\n maxHeight: 300,\n overflowY: \"auto\" as const,\n },\n labelContainer: {\n display: \"flex\" as const,\n alignItems: \"center\" as const,\n },\n labelColor: {\n width: 6,\n height: 6,\n display: \"block\" as const,\n borderRadius: \"100%\",\n marginRight: 5,\n },\n itemValue: {\n fontSize: \"75%\",\n color: \"#393939\",\n },\n valueContainer: {\n fontWeight: 600,\n },\n timeStampTitle: {\n fontSize: \"80%\",\n color: \"#9c9c9c\",\n textAlign: \"center\" as const,\n marginBottom: 6,\n },\n};\n\nexport const snackBarCommon = {\n snackBar: {\n backgroundColor: \"#081F44\",\n fontWeight: 400,\n fontFamily: \"Lato, sans-serif\",\n fontSize: 14,\n padding: \"0px 20px 0px 20px;\",\n boxShadow: \"none\" as const,\n \"&.MuiPaper-root.MuiSnackbarContent-root\": {\n borderRadius: \"0px 0px 5px 5px\",\n },\n \"& div\": {\n textAlign: \"center\" as const,\n padding: \"6px 30px\",\n width: \"100%\",\n overflowX: \"hidden\",\n textOverflow: \"ellipsis\",\n },\n },\n errorSnackBar: {\n backgroundColor: \"#C72C48\",\n color: \"#fff\",\n },\n snackBarExternal: {\n top: \"-17px\",\n position: \"absolute\" as const,\n minWidth: \"348px\",\n whiteSpace: \"nowrap\" as const,\n height: \"33px\",\n },\n snackDiv: {\n top: \"17px\",\n left: \"50%\",\n position: \"absolute\" as const,\n },\n snackBarModal: {\n top: 0,\n position: \"absolute\" as const,\n minWidth: \"348px\",\n whiteSpace: \"nowrap\" as const,\n height: \"33px\",\n maxWidth: \"calc(100% - 140px)\",\n },\n};\n\nexport const wizardCommon = {\n multiContainer: {\n display: \"flex\" as const,\n alignItems: \"center\" as const,\n justifyContent: \"flex-start\" as const,\n },\n sizeFactorContainer: {\n marginLeft: 8,\n alignSelf: \"flex-start\" as const,\n },\n headerElement: {\n position: \"sticky\" as const,\n top: 0,\n paddingTop: 5,\n marginBottom: 10,\n zIndex: 500,\n backgroundColor: \"#fff\",\n },\n tableTitle: {\n fontWeight: 700,\n width: \"30%\",\n },\n poolError: {\n color: \"#dc1f2e\",\n fontSize: \"0.75rem\",\n paddingLeft: 120,\n },\n error: {\n color: \"#dc1f2e\",\n fontSize: \"0.75rem\",\n },\n h3Section: {\n marginTop: 0,\n },\n descriptionText: {\n fontSize: 13,\n color: \"#777777\",\n },\n container: {\n padding: \"77px 0 0 0\",\n \"& h6\": {\n color: \"#777777\",\n fontSize: 14,\n },\n \"& p\": {\n \"& span:not(*[class*='smallUnit'])\": {\n fontSize: 16,\n },\n },\n },\n};\n\nexport const buttonsStyles = {\n anchorButton: {\n textDecoration: \"underline\" as const,\n textTransform: \"unset\" as const,\n fontWeight: \"normal\" as const,\n padding: 0,\n lineHeight: \"unset\" as const,\n height: \"unset\" as const,\n width: \"unset\" as const,\n textAlign: \"left\" as const,\n border: 0,\n minWidth: \"unset\" as const,\n },\n};\n\nexport const hrClass = {\n hrClass: {\n borderTop: 0,\n borderLeft: 0,\n borderRight: 0,\n borderColor: \"#999999\",\n backgroundColor: \"transparent\" as const,\n },\n};\n","import React from \"react\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Link from \"@material-ui/core/Link\";\n\nexport default function Copyright() {\n return (\n \n {\"Copyright © \"}\n \n MinIO\n {\" \"}\n {new Date().getFullYear()}\n {\".\"}\n \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 from \"react\";\nimport CssBaseline from \"@material-ui/core/CssBaseline\";\nimport Box from \"@material-ui/core/Box\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Container from \"@material-ui/core/Container\";\nimport Copyright from \"../common/Copyright\";\n\nconst useStyles = makeStyles((theme) => ({\n \"@global\": {\n body: {\n backgroundColor: theme.palette.common.white,\n },\n },\n paper: {\n marginTop: theme.spacing(8),\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n },\n}));\nconst NotFound: React.FC = () => {\n const classes = useStyles();\n return (\n \n \n
\n \n 404 Not Found\n \n
\n \n \n \n
\n );\n};\n\nexport default NotFound;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst CopyIcon = () => {\n return (\n \n \n ic_h_copy-new_sl\n \n \n \n \n \n \n \n );\n};\n\nexport default CopyIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst CreateIcon = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default CreateIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst DeleteIcon = () => {\n return (\n \n \n \n \n \n );\n};\n\nexport default DeleteIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst DashboardIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default DashboardIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst BucketsIcon = () => {\n return (\n \n \n \n \n \n );\n};\n\nexport default BucketsIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst UsersIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default UsersIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst ServiceAccountsIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default ServiceAccountsIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst GroupsIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default GroupsIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst BucketsIcon = () => {\n return (\n \n \n \n \n \n );\n};\n\nexport default BucketsIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst TraceIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default TraceIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst ConfigurationsListIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default ConfigurationsListIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst ClustersIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default ClustersIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst WatchIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default WatchIcon;\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\nexport const ADD_BUCKET_OPEN = \"ADD_BUCKET_OPEN\";\nexport const ADD_BUCKET_NAME = \"ADD_BUCKET_NAME\";\nexport const ADD_BUCKET_VERSIONED = \"ADD_BUCKET_VERSIONED\";\nexport const ADD_BUCKET_LOCKING = \"ADD_BUCKET_LOCKING\";\nexport const ADD_BUCKET_QUOTA = \"ADD_BUCKET_QUOTA\";\nexport const ADD_BUCKET_QUOTA_TYPE = \"ADD_BUCKET_QUOTA_TYPE\";\nexport const ADD_BUCKET_QUOTA_SIZE = \"ADD_BUCKET_QUOTA_SIZE\";\nexport const ADD_BUCKET_QUOTA_UNIT = \"ADD_BUCKET_QUOTA_UNIT\";\nexport const ADD_BUCKET_RESET = \"ADD_BUCKET_RESET\";\nexport const ADD_BUCKET_RETENTION = \"ADD_BUCKET_RETENTION\";\nexport const ADD_BUCKET_RETENTION_MODE = \"ADD_BUCKET_RETENTION_MODE\";\nexport const ADD_BUCKET_RETENTION_UNIT = \"ADD_BUCKET_RETENTION_UNIT\";\nexport const ADD_BUCKET_RETENTION_VALIDITY = \"ADD_BUCKET_RETENTION_VALIDITY\";\n\ninterface AddBucketOpenAction {\n type: typeof ADD_BUCKET_OPEN;\n open: boolean;\n}\n\ninterface AddBucketNameAction {\n type: typeof ADD_BUCKET_NAME;\n name: string;\n}\n\ninterface AddBucketVersionedAction {\n type: typeof ADD_BUCKET_VERSIONED;\n versioned: boolean;\n}\n\ninterface AddBucketLockingAction {\n type: typeof ADD_BUCKET_LOCKING;\n locking: boolean;\n}\n\ninterface AddBucketQuotaAction {\n type: typeof ADD_BUCKET_QUOTA;\n quota: boolean;\n}\n\ninterface AddBucketQuotaTypeAction {\n type: typeof ADD_BUCKET_QUOTA_TYPE;\n quotaType: string;\n}\n\ninterface AddBucketQuotaSizeAction {\n type: typeof ADD_BUCKET_QUOTA_SIZE;\n quotaSize: string;\n}\n\ninterface AddBucketQuotaUnitAction {\n type: typeof ADD_BUCKET_QUOTA_UNIT;\n quotaUnit: string;\n}\ninterface AddBucketResetAction {\n type: typeof ADD_BUCKET_RESET;\n}\n\ninterface AddBucketRetentionAction {\n type: typeof ADD_BUCKET_RETENTION;\n retention: boolean;\n}\n\ninterface AddBucketRetentionModeAction {\n type: typeof ADD_BUCKET_RETENTION_MODE;\n retentionMode: string;\n}\n\ninterface AddBucketRetentionUnitAction {\n type: typeof ADD_BUCKET_RETENTION_UNIT;\n retentionUnit: string;\n}\ninterface AddBucketRetentionValidityAction {\n type: typeof ADD_BUCKET_RETENTION_VALIDITY;\n retentionValidity: number;\n}\n\nexport type BucketActionTypes =\n | AddBucketOpenAction\n | AddBucketNameAction\n | AddBucketVersionedAction\n | AddBucketLockingAction\n | AddBucketQuotaAction\n | AddBucketQuotaTypeAction\n | AddBucketQuotaSizeAction\n | AddBucketQuotaUnitAction\n | AddBucketResetAction\n | AddBucketRetentionAction\n | AddBucketRetentionModeAction\n | AddBucketRetentionUnitAction\n | AddBucketRetentionValidityAction;\n\nexport function addBucketOpen(open: boolean) {\n return {\n type: ADD_BUCKET_OPEN,\n open: open,\n };\n}\nexport function addBucketName(name: string) {\n return {\n type: ADD_BUCKET_NAME,\n name: name,\n };\n}\n\nexport function addBucketVersioning(versioned: boolean) {\n return {\n type: ADD_BUCKET_VERSIONED,\n versioned: versioned,\n };\n}\n\nexport function addBucketEnableObjectLocking(locking: boolean) {\n return {\n type: ADD_BUCKET_LOCKING,\n locking: locking,\n };\n}\n\nexport function addBucketQuota(quota: boolean) {\n return {\n type: ADD_BUCKET_QUOTA,\n quota: quota,\n };\n}\n\nexport function addBucketQuotaType(quotaType: string) {\n return {\n type: ADD_BUCKET_QUOTA_TYPE,\n quotaType: quotaType,\n };\n}\n\nexport function addBucketQuotaSize(quotaSize: string) {\n return {\n type: ADD_BUCKET_QUOTA_SIZE,\n quotaSize: quotaSize,\n };\n}\n\nexport function addBucketQuotaUnit(quotaUnit: string) {\n return {\n type: ADD_BUCKET_QUOTA_UNIT,\n quotaUnit: quotaUnit,\n };\n}\n\nexport function addBucketReset() {\n return {\n type: ADD_BUCKET_RESET,\n };\n}\n\nexport function addBucketRetention(retention: boolean) {\n return {\n type: ADD_BUCKET_RETENTION,\n retention: retention,\n };\n}\n\nexport function addBucketRetentionMode(mode: string) {\n return {\n type: ADD_BUCKET_RETENTION_MODE,\n retentionMode: mode,\n };\n}\n\nexport function addBucketRetentionUnit(unit: string) {\n return {\n type: ADD_BUCKET_RETENTION_UNIT,\n retentionUnit: unit,\n };\n}\n\nexport function addBucketRetentionValidity(validity: number) {\n return {\n type: ADD_BUCKET_RETENTION_VALIDITY,\n retentionValidity: validity,\n };\n}\n","export interface IIcon {\n active: boolean;\n}\n\nexport const unSelected = \"#081C42\";\nexport const selected = \"#081C42\";\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst ViewIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default ViewIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst PencilIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default PencilIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst ShareIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n \n );\n};\n\nexport default ShareIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst DeleteIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default DeleteIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst DescriptionIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default DescriptionIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst CloudIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default CloudIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst ConsoleIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default ConsoleIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst DeleteIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n \n );\n};\n\nexport default DeleteIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst DescriptionIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default DescriptionIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst FormatDriveIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default FormatDriveIcon;\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 isString from \"lodash/isString\";\nimport { Link } from \"react-router-dom\";\nimport { createStyles, withStyles } from \"@material-ui/core/styles\";\nimport { IconButton } from \"@material-ui/core\";\nimport ViewIcon from \"./TableActionIcons/ViewIcon\";\nimport PencilIcon from \"./TableActionIcons/PencilIcon\";\nimport ShareIcon from \"./TableActionIcons/ShareIcon\";\nimport DeleteIcon from \"./TableActionIcons/DeleteIcon\";\nimport DescriptionIcon from \"./TableActionIcons/DescriptionIcon\";\nimport CloudIcon from \"./TableActionIcons/CloudIcon\";\nimport ConsoleIcon from \"./TableActionIcons/ConsoleIcon\";\nimport DownloadIcon from \"./TableActionIcons/DownloadIcon\";\nimport DisableIcon from \"./TableActionIcons/DisableIcon\";\nimport FormatDriveIcon from \"./TableActionIcons/FormatDriveIcon\";\n\nconst styles = () =>\n createStyles({\n spacing: {\n margin: \"0 8px\",\n },\n buttonDisabled: {\n \"&.MuiButtonBase-root.Mui-disabled\": {\n cursor: \"not-allowed\",\n filter: \"grayscale(100%)\",\n opacity: \"30%\",\n },\n },\n });\n\ninterface IActionButton {\n type: string;\n onClick?: (id: string) => any;\n to?: string;\n valueToSend: any;\n selected: boolean;\n sendOnlyId?: boolean;\n idField: string;\n disabled: boolean;\n classes: any;\n}\n\nconst defineIcon = (type: string, selected: boolean) => {\n switch (type) {\n case \"view\":\n return ;\n case \"edit\":\n return ;\n case \"delete\":\n return ;\n case \"description\":\n return ;\n case \"share\":\n return ;\n case \"cloud\":\n return ;\n case \"console\":\n return ;\n case \"download\":\n return ;\n case \"disable\":\n return ;\n case \"format\":\n return ;\n }\n\n return null;\n};\n\nconst TableActionButton = ({\n type,\n onClick,\n valueToSend,\n idField,\n selected,\n to,\n sendOnlyId = false,\n disabled = false,\n classes,\n}: IActionButton) => {\n const valueClick = sendOnlyId ? valueToSend[idField] : valueToSend;\n\n const buttonElement = (\n {\n e.stopPropagation();\n if (!disabled) {\n onClick(valueClick);\n } else {\n e.preventDefault();\n }\n }\n : () => null\n }\n className={`${classes.spacing} ${disabled ? classes.buttonDisabled : \"\"}`}\n disabled={disabled}\n >\n {defineIcon(type, selected)}\n \n );\n\n if (onClick) {\n return buttonElement;\n }\n\n if (isString(to)) {\n if (!disabled) {\n return (\n {\n e.stopPropagation();\n }}\n >\n {buttonElement}\n \n );\n }\n\n return buttonElement;\n }\n\n return null;\n};\n\nexport default withStyles(styles)(TableActionButton);\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst HelpIcon = (props: any) => {\n return (\n \n \n \n \n );\n};\n\nexport default HelpIcon;\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 { Checkbox, Grid, InputLabel, Tooltip } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n checkboxIcons,\n fieldBasic,\n tooltipHelper,\n} from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\ninterface CheckBoxProps {\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 checked: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n ...checkboxIcons,\n fieldContainer: {\n ...fieldBasic.fieldContainer,\n display: \"flex\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n margin: \"15px 0\",\n marginBottom: 0,\n flexBasis: \"initial\",\n },\n });\n\nconst CheckboxWrapper = ({\n label,\n onChange,\n value,\n id,\n name,\n checked = false,\n disabled = false,\n tooltip = \"\",\n classes,\n}: CheckBoxProps) => {\n return (\n \n \n
\n }\n icon={}\n disabled={disabled}\n />\n
\n {label !== \"\" && (\n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n )}\n
\n
\n );\n};\n\nexport default withStyles(styles)(CheckboxWrapper);\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, { Fragment, useState } from \"react\";\nimport get from \"lodash/get\";\nimport isString from \"lodash/isString\";\nimport {\n Checkbox,\n Grid,\n IconButton,\n LinearProgress,\n Paper,\n Popover,\n Typography,\n} from \"@material-ui/core\";\nimport { AutoSizer, Column, InfiniteLoader, Table } from \"react-virtualized\";\nimport { createStyles, withStyles } from \"@material-ui/core/styles\";\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\nimport ViewColumnIcon from \"@material-ui/icons/ViewColumn\";\nimport ArrowDropDownIcon from \"@material-ui/icons/ArrowDropDown\";\nimport ArrowDropUpIcon from \"@material-ui/icons/ArrowDropUp\";\nimport TableActionButton from \"./TableActionButton\";\nimport history from \"../../../../history\";\nimport {\n checkboxIcons,\n radioIcons,\n} from \"../FormComponents/common/styleLibrary\";\nimport CheckboxWrapper from \"../FormComponents/CheckboxWrapper/CheckboxWrapper\";\n\n//Interfaces for table Items\n\ninterface ItemActions {\n type: string;\n to?: string;\n sendOnlyId?: boolean;\n disableButtonFunction?: (itemValue: any) => boolean;\n showLoaderFunction?: (itemValue: any) => boolean;\n\n onClick?(valueToSend: any): any;\n}\n\ninterface IColumns {\n label: string;\n elementKey: string;\n renderFunction?: (input: any) => any;\n renderFullObject?: boolean;\n globalClass?: any;\n rowClass?: any;\n width?: number;\n headerTextAlign?: string;\n contentTextAlign?: string;\n enableSort?: boolean;\n}\n\ninterface IInfiniteScrollConfig {\n loadMoreRecords: (indexElements: {\n startIndex: number;\n stopIndex: number;\n }) => Promise;\n recordsCount: number;\n}\n\ninterface ISortConfig {\n triggerSort: (val: any) => any;\n currentSort: string;\n currentDirection: \"ASC\" | \"DESC\" | undefined;\n}\n\ninterface TableWrapperProps {\n itemActions?: ItemActions[] | null;\n columns: IColumns[];\n onSelect?: (e: React.ChangeEvent) => any;\n idField: string;\n isLoading: boolean;\n loadingMessage?: React.ReactNode;\n records: any[];\n classes: any;\n entityName: string;\n selectedItems?: string[];\n radioSelection?: boolean;\n customEmptyMessage?: string;\n customPaperHeight?: string;\n noBackground?: boolean;\n columnsSelector?: boolean;\n textSelectable?: boolean;\n columnsShown?: string[];\n onColumnChange?: (column: string, state: boolean) => any;\n autoScrollToBottom?: boolean;\n infiniteScrollConfig?: IInfiniteScrollConfig;\n sortConfig?: ISortConfig;\n}\n\nconst borderColor = \"#9c9c9c80\";\n\nconst rowText = {\n fontWeight: 400,\n fontSize: 14,\n borderColor: borderColor,\n borderWidth: \"0.5px\",\n height: 40,\n transitionDuration: \"0.3s\",\n padding: \"initial\",\n paddingRight: 6,\n paddingLeft: 6,\n};\n\nconst styles = () =>\n createStyles({\n dialogContainer: {\n padding: \"12px 26px 22px\",\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n padding: \"19px 38px\",\n boxShadow: \"none\",\n border: \"#EAEDEE 1px solid\",\n borderRadius: 3,\n minHeight: 200,\n overflowY: \"scroll\",\n position: \"relative\",\n \"&::-webkit-scrollbar\": {\n width: 3,\n height: 3,\n },\n },\n noBackground: {\n backgroundColor: \"transparent\",\n border: 0,\n },\n defaultPaperHeight: {\n height: \"calc(100vh - 205px)\",\n },\n allTableSettings: {\n \"& .MuiTableCell-sizeSmall:last-child\": {\n paddingRight: \"initial\",\n },\n \"& .MuiTableCell-body.MuiTableCell-sizeSmall:last-child\": {\n paddingRight: 6,\n },\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: 700,\n fontSize: 14,\n borderColor: \"#39393980\",\n borderWidth: \"0.5px\",\n padding: \"6px 0 10px\",\n },\n },\n },\n rowUnselected: {\n ...rowText,\n color: \"#393939\",\n },\n rowSelected: {\n ...rowText,\n color: \"#081C42\",\n fontWeight: 600,\n },\n paginatorContainer: {\n display: \"flex\",\n justifyContent: \"flex-end\",\n padding: \"5px 38px\",\n },\n checkBoxHeader: {\n width: 50,\n textAlign: \"left\",\n paddingRight: 10,\n \"&.MuiTableCell-paddingCheckbox\": {\n paddingBottom: 4,\n paddingLeft: 0,\n },\n },\n actionsContainer: {\n width: 150,\n borderColor: borderColor,\n },\n paginatorComponent: {\n borderBottom: 0,\n },\n checkBoxRow: {\n borderColor: borderColor,\n padding: \"0 10px 0 0\",\n },\n loadingBox: {\n paddingTop: \"100px\",\n paddingBottom: \"100px\",\n },\n overlayColumnSelection: {\n position: \"absolute\",\n right: 0,\n top: 0,\n },\n popoverContainer: {\n position: \"relative\",\n },\n popoverContent: {\n maxHeight: 250,\n overflowY: \"auto\",\n padding: \"0 10px 10px\",\n },\n shownColumnsLabel: {\n color: \"#9c9c9c\",\n fontSize: 12,\n padding: 10,\n borderBottom: \"#eaeaea 1px solid\",\n width: \"100%\",\n },\n \"@global\": {\n \".rowLine\": {\n borderBottom: `1px solid ${borderColor}`,\n height: 40,\n color: \"#393939\",\n fontSize: 14,\n transitionDuration: 0.3,\n \"&:focus\": {\n outline: \"initial\",\n },\n \"&:hover:not(.ReactVirtualized__Table__headerRow)\": {\n userSelect: \"none\",\n backgroundColor: \"#ececec\",\n fontWeight: 600,\n \"&.canClick\": {\n cursor: \"pointer\",\n },\n \"&.canSelectText\": {\n userSelect: \"text\",\n },\n },\n \"& .selected\": {\n color: \"#081C42\",\n fontWeight: 600,\n },\n },\n \".headerItem\": {\n userSelect: \"none\",\n fontWeight: 700,\n fontSize: 14,\n fontStyle: \"initial\",\n display: \"flex\",\n alignItems: \"center\",\n outline: \"none\",\n },\n \".ReactVirtualized__Table__headerRow\": {\n fontWeight: 700,\n fontSize: 14,\n borderColor: \"#39393980\",\n textTransform: \"initial\",\n },\n \".optionsAlignment\": {\n textAlign: \"center\",\n },\n \".text-center\": {\n textAlign: \"center\",\n },\n \".text-right\": {\n textAlign: \"right\",\n },\n \".progress-enabled\": {\n paddingTop: 3,\n display: \"inline-block\",\n margin: \"0 10px\",\n position: \"relative\",\n width: 18,\n height: 18,\n },\n \".progress-enabled > .MuiCircularProgress-root\": {\n position: \"absolute\",\n left: 0,\n top: 3,\n },\n },\n ...checkboxIcons,\n ...radioIcons,\n });\n\nconst selectWidth = 45;\n\n// Function to render elements in table\nconst subRenderFunction = (\n rowData: any,\n column: IColumns,\n isSelected: boolean\n) => {\n const itemElement = isString(rowData)\n ? rowData\n : get(rowData, column.elementKey, null); // If the element is just a string, we render it as it is\n const renderConst = column.renderFullObject ? rowData : itemElement;\n\n const renderElement = column.renderFunction\n ? column.renderFunction(renderConst)\n : renderConst; // If render function is set, we send the value to the function.\n\n return (\n \n {renderElement}\n \n );\n};\n\n// Function to calculate common column width for elements with no with size\nconst calculateColumnRest = (\n columns: IColumns[],\n containerWidth: number,\n actionsWidth: number,\n hasSelect: boolean,\n hasActions: boolean,\n columnsSelector: boolean,\n columnsShown: string[]\n) => {\n let colsItems = [...columns];\n\n if (columnsSelector) {\n colsItems = columns.filter((column) =>\n columnsShown.includes(column.elementKey)\n );\n }\n\n let initialValue = containerWidth;\n\n if (hasSelect) {\n initialValue -= selectWidth;\n }\n\n if (hasActions) {\n initialValue -= actionsWidth;\n }\n\n let freeSpacing = colsItems.reduce((total, currValue) => {\n return currValue.width ? total - currValue.width : total;\n }, initialValue);\n\n return freeSpacing / colsItems.filter((el) => !el.width).length;\n};\n\n// Function that renders Columns in table\nconst generateColumnsMap = (\n columns: IColumns[],\n containerWidth: number,\n actionsWidth: number,\n hasSelect: boolean,\n hasActions: boolean,\n selectedItems: string[],\n idField: string,\n columnsSelector: boolean,\n columnsShown: string[],\n sortColumn: string,\n sortDirection: \"ASC\" | \"DESC\" | undefined\n) => {\n const commonRestWidth = calculateColumnRest(\n columns,\n containerWidth,\n actionsWidth,\n hasSelect,\n hasActions,\n columnsSelector,\n columnsShown\n );\n return columns.map((column: IColumns, index: number) => {\n if (columnsSelector && !columnsShown.includes(column.elementKey)) {\n return null;\n }\n\n const disableSort = column.enableSort ? !column.enableSort : true;\n\n return (\n (\n \n {sortColumn === column.elementKey && (\n \n {sortDirection === \"ASC\" ? (\n \n ) : (\n \n )}\n \n )}\n {column.label}\n \n )}\n className={\n column.contentTextAlign ? `text-${column.contentTextAlign}` : \"\"\n }\n cellRenderer={({ rowData }) => {\n const isSelected = selectedItems\n ? selectedItems.includes(\n isString(rowData) ? rowData : rowData[idField]\n )\n : false;\n return subRenderFunction(rowData, column, isSelected);\n }}\n width={column.width || commonRestWidth}\n disableSort={disableSort}\n defaultSortDirection={\"ASC\"}\n />\n );\n });\n};\n\n// Function to render the action buttons\nconst elementActions = (\n actions: ItemActions[],\n valueToSend: any,\n selected: boolean,\n idField: string\n) => {\n return actions.map((action: ItemActions, index: number) => {\n if (action.type === \"view\") {\n return null;\n }\n\n const vlSend =\n typeof valueToSend === \"string\" ? valueToSend : valueToSend[idField];\n\n let disabled = false;\n\n if (action.disableButtonFunction) {\n if (action.disableButtonFunction(vlSend)) {\n disabled = true;\n }\n }\n\n if (action.showLoaderFunction) {\n if (action.showLoaderFunction(vlSend)) {\n return (\n
\n \n
\n );\n }\n }\n\n return (\n \n );\n });\n};\n\n// Function to calculate the options column width according elements inside\nconst calculateOptionsSize = (containerWidth: number, totalOptions: number) => {\n const minContainerSize = 80;\n const sizeOptions = totalOptions * 45;\n\n if (sizeOptions < minContainerSize) {\n return minContainerSize;\n }\n\n if (sizeOptions > containerWidth) {\n return containerWidth;\n }\n\n return sizeOptions;\n};\n\n// Main function to render the Table Wrapper\nconst TableWrapper = ({\n itemActions,\n columns,\n onSelect,\n records,\n isLoading,\n loadingMessage = Loading...,\n entityName,\n selectedItems,\n idField,\n classes,\n radioSelection = false,\n customEmptyMessage = \"\",\n customPaperHeight = \"\",\n noBackground = false,\n columnsSelector = false,\n textSelectable = false,\n columnsShown = [],\n onColumnChange = (column: string, state: boolean) => {},\n infiniteScrollConfig,\n sortConfig,\n autoScrollToBottom = false,\n}: TableWrapperProps) => {\n const [columnSelectorOpen, setColumnSelectorOpen] = useState(false);\n const [anchorEl, setAnchorEl] = React.useState(null);\n\n const findView = itemActions\n ? itemActions.find((el) => el.type === \"view\")\n : null;\n\n const clickAction = (rowItem: any) => {\n if (findView) {\n const valueClick = findView.sendOnlyId ? rowItem[idField] : rowItem;\n if (findView.to) {\n history.push(`${findView.to}/${valueClick}`);\n return;\n }\n\n if (findView.onClick) {\n findView.onClick(valueClick);\n }\n }\n };\n\n const openColumnsSelector = (event: { currentTarget: any }) => {\n setColumnSelectorOpen(!columnSelectorOpen);\n setAnchorEl(event.currentTarget);\n };\n\n const closeColumnSelector = () => {\n setColumnSelectorOpen(false);\n setAnchorEl(null);\n };\n\n const columnsSelection = (columns: IColumns[]) => {\n return (\n \n \n \n \n \n
Shown Columns
\n
\n {columns.map((column: IColumns) => {\n return (\n {\n onColumnChange(column.elementKey, e.target.checked);\n }}\n id={`chbox-${column.label}`}\n name={`chbox-${column.label}`}\n value={column.label}\n />\n );\n })}\n
\n \n
\n );\n };\n\n return (\n \n \n {isLoading && (\n \n \n {loadingMessage}\n \n \n \n \n \n )}\n {columnsSelector && !isLoading && records.length > 0 && (\n
\n {columnsSelection(columns)}\n
\n )}\n {records && !isLoading && records.length > 0 ? (\n !!records[index]}\n loadMoreRows={\n infiniteScrollConfig\n ? infiniteScrollConfig.loadMoreRecords\n : () => new Promise(() => true)\n }\n rowCount={\n infiniteScrollConfig\n ? infiniteScrollConfig.recordsCount\n : records.length\n }\n >\n {({ onRowsRendered, registerChild }) => (\n \n {({ width, height }: any) => {\n const optionsWidth = calculateOptionsSize(\n width,\n itemActions\n ? itemActions.filter((el) => el.type !== \"view\").length\n : 0\n );\n const hasSelect: boolean = !!(onSelect && selectedItems);\n const hasOptions: boolean = !!(\n (itemActions && itemActions.length > 1) ||\n (itemActions &&\n itemActions.length === 1 &&\n itemActions[0].type !== \"view\")\n );\n return (\n (\n \n {customEmptyMessage !== \"\"\n ? customEmptyMessage\n : `There are no ${entityName} yet.`}\n \n )}\n overscanRowCount={10}\n rowHeight={40}\n width={width}\n rowCount={records.length}\n rowGetter={({ index }) => records[index]}\n onRowClick={({ rowData }) => {\n clickAction(rowData);\n }}\n rowClassName={`rowLine ${findView ? \"canClick\" : \"\"} ${\n !findView && textSelectable ? \"canSelectText\" : \"\"\n }`}\n onRowsRendered={onRowsRendered}\n sort={sortConfig ? sortConfig.triggerSort : undefined}\n sortBy={sortConfig ? sortConfig.currentSort : undefined}\n sortDirection={\n sortConfig ? sortConfig.currentDirection : undefined\n }\n scrollToIndex={\n autoScrollToBottom ? records.length - 1 : -1\n }\n >\n {hasSelect && (\n Select}\n dataKey={idField}\n width={selectWidth}\n cellRenderer={({ rowData }) => {\n const isSelected = selectedItems\n ? selectedItems.includes(\n isString(rowData) ? rowData : rowData[idField]\n )\n : false;\n\n return (\n {\n e.stopPropagation();\n }}\n checkedIcon={\n \n }\n icon={\n \n }\n />\n );\n }}\n />\n )}\n {generateColumnsMap(\n columns,\n width,\n optionsWidth,\n hasSelect,\n hasOptions,\n selectedItems || [],\n idField,\n columnsSelector,\n columnsShown,\n sortConfig ? sortConfig.currentSort : \"\",\n sortConfig ? sortConfig.currentDirection : undefined\n )}\n {hasOptions && (\n Options}\n dataKey={idField}\n width={optionsWidth}\n headerClassName=\"optionsAlignment\"\n className=\"optionsAlignment\"\n cellRenderer={({ rowData }) => {\n const isSelected = selectedItems\n ? selectedItems.includes(\n isString(rowData) ? rowData : rowData[idField]\n )\n : false;\n return elementActions(\n itemActions || [],\n rowData,\n isSelected,\n idField\n );\n }}\n />\n )}\n \n );\n }}\n \n )}\n \n ) : (\n \n {!isLoading && (\n
\n {customEmptyMessage !== \"\"\n ? customEmptyMessage\n : `There are no ${entityName} yet.`}\n
\n )}\n
\n )}\n \n
\n );\n};\n\nexport default withStyles(styles)(TableWrapper);\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Snackbar from \"@material-ui/core/Snackbar\";\nimport { Dialog, DialogContent, DialogTitle } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { snackBarCommon } from \"../FormComponents/common/styleLibrary\";\nimport { AppState } from \"../../../../store\";\nimport { snackBarMessage } from \"../../../../types\";\nimport { setModalSnackMessage } from \"../../../../actions\";\n\ninterface IModalProps {\n classes: any;\n onClose: () => void;\n modalOpen: boolean;\n title: string;\n children: any;\n wideLimit?: boolean;\n modalSnackMessage?: snackBarMessage;\n noContentPadding?: boolean;\n setModalSnackMessage: typeof setModalSnackMessage;\n}\n\nconst baseCloseLine = {\n content: '\" \"',\n borderLeft: \"2px solid #9C9C9C\",\n height: 33,\n width: 1,\n position: \"absolute\",\n};\n\nconst styles = (theme: Theme) =>\n createStyles({\n dialogContainer: {\n padding: \"8px 15px 22px\",\n },\n closeContainer: {\n textAlign: \"right\",\n },\n closeButton: {\n width: 45,\n height: 45,\n padding: 0,\n backgroundColor: \"initial\",\n \"&:hover\": {\n backgroundColor: \"initial\",\n },\n \"&:active\": {\n backgroundColor: \"initial\",\n },\n },\n modalCloseIcon: {\n fontSize: 35,\n color: \"#9C9C9C\",\n fontWeight: 300,\n \"&:hover\": {\n color: \"#9C9C9C\",\n },\n },\n closeIcon: {\n \"&::before\": {\n ...baseCloseLine,\n transform: \"rotate(45deg)\",\n },\n \"&::after\": {\n ...baseCloseLine,\n transform: \"rotate(-45deg)\",\n },\n \"&:hover::before, &:hover::after\": {\n borderColor: \"#9C9C9C\",\n },\n width: 24,\n height: 24,\n display: \"block\",\n position: \"relative\",\n },\n titleClass: {\n padding: \"0px 50px 12px\",\n \"& h2\": {\n fontWeight: 600,\n color: \"#000\",\n fontSize: 22,\n },\n },\n modalContent: {\n padding: \"0 50px\",\n },\n customDialogSize: {\n width: \"100%\",\n maxWidth: 765,\n },\n ...snackBarCommon,\n });\n\nconst ModalWrapper = ({\n onClose,\n modalOpen,\n title,\n children,\n classes,\n wideLimit = true,\n modalSnackMessage,\n noContentPadding,\n setModalSnackMessage,\n}: IModalProps) => {\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n useEffect(() => {\n if (modalSnackMessage) {\n if (modalSnackMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n setOpenSnackbar(true);\n }\n }, [modalSnackMessage]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n setModalSnackMessage(\"\");\n };\n\n const customSize = wideLimit\n ? {\n classes: {\n paper: classes.customDialogSize,\n },\n }\n : { maxWidth: \"md\" as const, fullWidth: true };\n\n return (\n \n
\n {\n closeSnackBar();\n }}\n message={modalSnackMessage ? modalSnackMessage.message : \"\"}\n ContentProps={{\n className: `${classes.snackBar} ${\n modalSnackMessage && modalSnackMessage.type === \"error\"\n ? classes.errorSnackBar\n : \"\"\n }`,\n }}\n autoHideDuration={\n modalSnackMessage && modalSnackMessage.type === \"error\"\n ? 10000\n : 5000\n }\n />\n
\n \n \n \n
\n \n {title}\n \n \n {children}\n \n
\n \n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst connector = connect(mapState, {\n setModalSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ModalWrapper));\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 {\n Grid,\n IconButton,\n InputLabel,\n TextField,\n TextFieldProps,\n Tooltip,\n} from \"@material-ui/core\";\nimport { OutlinedInputProps } from \"@material-ui/core/OutlinedInput\";\nimport {\n createStyles,\n makeStyles,\n Theme,\n withStyles,\n} from \"@material-ui/core/styles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\ninterface InputBoxProps {\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 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 overlayIcon?: any;\n overlayAction?: () => void;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n textBoxContainer: {\n flexGrow: 1,\n },\n textBoxWithIcon: {\n position: \"relative\",\n paddingRight: 25,\n },\n errorState: {\n color: \"#b53b4b\",\n fontSize: 14,\n position: \"absolute\",\n top: 7,\n right: 7,\n },\n overlayAction: {\n position: \"absolute\",\n right: 0,\n top: 15,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n },\n });\n\nconst inputStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n borderRadius: 0,\n \"&::before\": {\n borderColor: \"#9c9c9c\",\n },\n },\n disabled: {\n \"&.MuiInput-underline::before\": {\n borderColor: \"#eaeaea\",\n borderBottomStyle: \"solid\",\n },\n },\n input: {\n padding: \"15px 30px 10px 5px\",\n color: \"#393939\",\n fontSize: 13,\n fontWeight: 600,\n \"&:placeholder\": {\n color: \"#393939\",\n opacity: 1,\n },\n },\n error: {\n color: \"#b53b4b\",\n },\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 overlayIcon = null,\n overlayAction,\n classes,\n}: InputBoxProps) => {\n let inputProps: any = { \"data-index\": index };\n\n if (type === \"number\" && min) {\n inputProps[\"min\"] = min;\n }\n\n if (type === \"number\" && max) {\n inputProps[\"max\"] = max;\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
\n {overlayIcon && (\n
\n {\n overlayAction();\n }\n : () => null\n }\n size={\"small\"}\n disableFocusRipple={false}\n disableRipple={false}\n disableTouchRipple={false}\n >\n {overlayIcon}\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 \"@material-ui/core/Grid\";\nimport {\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n InputBase,\n Tooltip,\n} from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\ninterface 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: (\n e: React.ChangeEvent<{ name?: string | undefined; value: unknown }>\n ) => void;\n disabled?: boolean;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n });\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n lineHeight: 1,\n \"label + &\": {\n marginTop: theme.spacing(3),\n },\n },\n input: {\n position: \"relative\",\n color: \"#393939\",\n fontSize: 13,\n fontWeight: 600,\n padding: \"15px 20px 10px 10px\",\n borderBottom: \"1px solid #9c9c9c\",\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","// 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 clsx from \"clsx\";\nimport Grid from \"@material-ui/core/Grid\";\nimport RadioGroup from \"@material-ui/core/RadioGroup\";\nimport FormControlLabel from \"@material-ui/core/FormControlLabel\";\nimport Radio, { RadioProps } from \"@material-ui/core/Radio\";\nimport { InputLabel, Tooltip } from \"@material-ui/core\";\nimport {\n createStyles,\n Theme,\n withStyles,\n makeStyles,\n} from \"@material-ui/core/styles\";\nimport { fieldBasic, radioIcons, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\nexport interface SelectorTypes {\n label: string;\n value: string;\n}\n\ninterface RadioGroupProps {\n selectorOptions: SelectorTypes[];\n currentSelection: string;\n label: string;\n id: string;\n name: string;\n tooltip?: string;\n disableOptions?: boolean;\n onChange: (e: React.ChangeEvent) => void;\n classes: any;\n displayInColumn?: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n radioBoxContainer: {},\n fieldContainer: {\n ...fieldBasic.fieldContainer,\n display: \"flex\",\n justifyContent: \"space-between\",\n borderBottom: \"#9c9c9c 1px solid\",\n paddingBottom: 10,\n marginTop: 11,\n },\n optionLabel: {\n \"&.Mui-disabled\": {\n \"& .MuiFormControlLabel-label\": {\n color: \"#9c9c9c\",\n },\n },\n \"&:last-child\": {\n marginRight: 0,\n },\n \"& .MuiFormControlLabel-label\": {\n fontSize: 12,\n color: \"#000\",\n },\n },\n checkedOption: {\n \"& .MuiFormControlLabel-label\": {\n fontSize: 12,\n color: \"#000\",\n fontWeight: 700,\n },\n },\n });\n\nconst radioStyles = makeStyles({\n root: {\n \"&:hover\": {\n backgroundColor: \"transparent\",\n },\n },\n ...radioIcons,\n});\n\nconst RadioButton = (props: RadioProps) => {\n const classes = radioStyles();\n\n return (\n }\n icon={}\n {...props}\n />\n );\n};\n\nexport const RadioGroupSelector = ({\n selectorOptions = [],\n currentSelection,\n label,\n id,\n name,\n onChange,\n tooltip = \"\",\n disableOptions = false,\n classes,\n displayInColumn = false,\n}: RadioGroupProps) => {\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n\n
\n \n {selectorOptions.map((selectorOption) => {\n return (\n }\n label={selectorOption.label}\n disabled={disableOptions}\n className={clsx(classes.optionLabel, {\n [classes.checkedOption]:\n selectorOption.value === currentSelection,\n })}\n />\n );\n })}\n \n
\n
\n
\n );\n};\n\nexport default withStyles(styles)(RadioGroupSelector);\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 from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { InputLabel, Switch, Tooltip, Typography } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { actionsTray, fieldBasic } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\ninterface IFormSwitch {\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 description?: string;\n index?: number;\n indicatorLabels?: string[];\n checked: boolean;\n switchOnly?: boolean;\n containerClass?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n paddingTop: 15,\n boxShadow: \"none\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n noFound: {\n textAlign: \"center\",\n padding: \"10px 0\",\n },\n tableContainer: {\n maxHeight: 200,\n },\n stickyHeader: {\n backgroundColor: \"#fff\",\n },\n actionsTitle: {\n fontWeight: 600,\n color: \"#081C42\",\n fontSize: 16,\n alignSelf: \"center\",\n },\n tableBlock: {\n marginTop: 15,\n },\n filterField: {\n width: 375,\n fontWeight: 600,\n \"& .input\": {\n \"&::placeholder\": {\n fontWeight: 600,\n color: \"#081C42\",\n },\n },\n },\n divContainer: {\n borderBottom: \"#9c9c9c 1px solid\",\n paddingBottom: 14,\n marginBottom: 20,\n maxWidth: 840,\n },\n wrapperContainer: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n maxWidth: 840,\n },\n indicatorLabel: {\n fontSize: 12,\n fontWeight: 600,\n color: \"#081C42\",\n margin: \"0 8px 0 10px\",\n },\n fieldDescription: {\n marginTop: 4,\n color: \"#999999\",\n },\n ...actionsTray,\n ...fieldBasic,\n });\n\nconst StyledSwitch = withStyles({\n root: {\n alignItems: \"flex-start\",\n height: 18,\n padding: \"0 12px\",\n display: \"flex\",\n position: \"relative\",\n },\n switchBase: {\n color: \"#fff\",\n padding: 0,\n top: \"initial\",\n \"&$checked\": {\n color: \"#fff\",\n },\n \"&$checked + $track\": {\n backgroundColor: \"#081C42\",\n opacity: 1,\n height: 15,\n },\n \"&:hover\": {\n backgroundColor: \"#fff\",\n },\n },\n checked: {},\n track: {\n height: 15,\n backgroundColor: \"#9C9C9C\",\n border: \"#081C42 1px solid\",\n opacity: 1,\n padding: 0,\n marginTop: 1.5,\n \"&$checked\": {\n backgroundColor: \"#081C42\",\n },\n },\n thumb: {\n backgroundColor: \"#fff\",\n border: \"#081C42 1px solid\",\n boxShadow: \"none\",\n width: 18,\n height: 18,\n padding: 0,\n marginLeft: 10,\n },\n})(Switch);\n\nconst FormSwitchWrapper = ({\n label = \"\",\n onChange,\n value,\n id,\n name,\n checked = false,\n disabled = false,\n switchOnly = false,\n tooltip = \"\",\n description = \"\",\n indicatorLabels = [],\n containerClass = \"\",\n classes,\n}: IFormSwitch) => {\n const switchComponent = (\n \n
\n \n {indicatorLabels.length === 2 && (\n \n {checked ? indicatorLabels[0] : indicatorLabels[1]}\n \n )}\n
\n
\n );\n\n if (switchOnly) {\n return switchComponent;\n }\n\n return (\n
\n \n {label !== \"\" && (\n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n )}\n {switchComponent}\n
\n {description !== \"\" && (\n \n \n {description}\n \n \n )}\n
\n );\n};\n\nexport default withStyles(styles)(FormSwitchWrapper);\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, { useEffect, useState } from \"react\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress, Typography } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../../common/api\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport RadioGroupSelector from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport { factorForDropdown, getBytes } from \"../../../../common/utils\";\nimport { AppState } from \"../../../../store\";\nimport { connect } from \"react-redux\";\nimport {\n addBucketEnableObjectLocking,\n addBucketName,\n addBucketQuota,\n addBucketQuotaSize,\n addBucketQuotaType,\n addBucketQuotaUnit,\n addBucketRetention,\n addBucketRetentionMode,\n addBucketRetentionUnit,\n addBucketRetentionValidity,\n addBucketVersioning,\n} from \"../actions\";\nimport { useDebounce } from \"use-debounce\";\nimport { MakeBucketRequest } from \"../types\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n multiContainer: {\n display: \"flex\",\n alignItems: \"center\" as const,\n justifyContent: \"flex-start\" as const,\n },\n quotaSizeContainer: {\n flexGrow: 1,\n },\n sizeFactorContainer: {\n flexGrow: 0,\n maxWidth: 80,\n marginLeft: 8,\n alignSelf: \"flex-start\" as const,\n },\n ...modalBasic,\n });\n\ninterface IAddBucketProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (refresh: boolean) => void;\n addBucketName: typeof addBucketName;\n addBucketVersioned: typeof addBucketVersioning;\n enableObjectLocking: typeof addBucketEnableObjectLocking;\n addBucketQuota: typeof addBucketQuota;\n addBucketQuotaType: typeof addBucketQuotaType;\n addBucketQuotaSize: typeof addBucketQuotaSize;\n addBucketQuotaUnit: typeof addBucketQuotaUnit;\n addBucketRetention: typeof addBucketRetention;\n addBucketRetentionMode: typeof addBucketRetentionMode;\n addBucketRetentionUnit: typeof addBucketRetentionUnit;\n addBucketRetentionValidity: typeof addBucketRetentionValidity;\n setModalError: typeof setModalErrorSnackMessage;\n bucketName: string;\n versioningEnabled: boolean;\n lockingEnabled: boolean;\n quotaEnabled: boolean;\n quotaType: string;\n quotaSize: string;\n quotaUnit: string;\n retentionEnabled: boolean;\n retentionMode: string;\n retentionUnit: string;\n retentionValidity: number;\n}\n\nconst AddBucket = ({\n classes,\n open,\n closeModalAndRefresh,\n addBucketName,\n addBucketVersioned,\n enableObjectLocking,\n addBucketQuota,\n addBucketQuotaType,\n addBucketQuotaSize,\n addBucketQuotaUnit,\n addBucketRetention,\n addBucketRetentionMode,\n addBucketRetentionUnit,\n addBucketRetentionValidity,\n setModalError,\n bucketName,\n versioningEnabled,\n lockingEnabled,\n quotaEnabled,\n quotaType,\n quotaSize,\n quotaUnit,\n retentionEnabled,\n retentionMode,\n retentionUnit,\n retentionValidity,\n}: IAddBucketProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [sendEnabled, setSendEnabled] = useState(false);\n const [lockingFieldDisabled, setLockingFieldDisabled] =\n useState(false);\n\n const addRecord = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n\n let request: MakeBucketRequest = {\n name: bucketName,\n versioning: versioningEnabled,\n locking: lockingEnabled,\n };\n\n if (quotaEnabled) {\n const amount = getBytes(quotaSize, quotaUnit, false);\n request.quota = {\n enabled: true,\n quota_type: quotaType,\n amount: parseInt(amount),\n };\n }\n\n if (retentionEnabled) {\n request.retention = {\n mode: retentionMode,\n unit: retentionUnit,\n validity: retentionValidity,\n };\n }\n\n api\n .invoke(\"POST\", \"/api/v1/buckets\", request)\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n setAddLoading(false);\n setModalError(err);\n });\n\n resetForm();\n };\n\n const [value] = useDebounce(bucketName, 1000);\n\n useEffect(() => {\n addBucketName(value);\n }, [value, addBucketName]);\n\n const resetForm = () => {\n addBucketName(\"\");\n addBucketVersioned(false);\n enableObjectLocking(false);\n addBucketQuota(false);\n addBucketQuotaType(\"hard\");\n addBucketQuotaSize(\"1\");\n addBucketQuotaUnit(\"TiB\");\n addBucketRetention(false);\n addBucketRetentionMode(\"compliance\");\n addBucketRetentionUnit(\"days\");\n addBucketRetentionValidity(1);\n };\n\n useEffect(() => {\n let valid = false;\n\n if (bucketName.trim() !== \"\") {\n valid = true;\n }\n\n if (quotaEnabled && valid) {\n if (quotaSize.trim() === \"\" || parseInt(quotaSize) === 0) {\n valid = false;\n }\n }\n\n if (!versioningEnabled || !retentionEnabled) {\n addBucketRetention(false);\n addBucketRetentionMode(\"compliance\");\n addBucketRetentionUnit(\"days\");\n addBucketRetentionValidity(1);\n }\n\n if (retentionEnabled) {\n // if retention is enabled, then objec locking should be enabled as well\n enableObjectLocking(true);\n setLockingFieldDisabled(true);\n } else {\n setLockingFieldDisabled(false);\n }\n\n if (\n retentionEnabled &&\n (Number.isNaN(retentionValidity) || retentionValidity < 1)\n ) {\n valid = false;\n }\n\n setSendEnabled(valid);\n }, [\n bucketName,\n retentionEnabled,\n lockingEnabled,\n quotaType,\n quotaSize,\n quotaUnit,\n quotaEnabled,\n addBucketRetention,\n addBucketRetentionMode,\n addBucketRetentionUnit,\n addBucketRetentionValidity,\n retentionValidity,\n versioningEnabled,\n enableObjectLocking,\n ]);\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n ) => {\n addRecord(e);\n }}\n >\n \n \n \n ) => {\n addBucketName(event.target.value);\n }}\n label=\"Bucket Name\"\n value={bucketName}\n />\n \n \n \n Features\n \n
\n
\n \n ) => {\n addBucketVersioned(event.target.checked);\n }}\n description={\n \"Allows to keep multiple versions of the same object under the same key.\"\n }\n label={\"Versioning\"}\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n \n ) => {\n enableObjectLocking(event.target.checked);\n }}\n label={\"Object Locking\"}\n description={\n \"Required to support retention and legal hold. Can only be enabled at bucket creation.\"\n }\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n \n ) => {\n addBucketQuota(event.target.checked);\n }}\n label={\"Quota\"}\n description={\"Limit the amount of data in the bucket.\"}\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n {quotaEnabled && (\n \n \n ) => {\n addBucketQuotaType(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"hard\", label: \"Hard\" },\n { value: \"fifo\", label: \"FIFO\" },\n ]}\n />\n \n \n
\n
\n ) => {\n addBucketQuotaSize(e.target.value);\n }}\n label=\"Quota\"\n value={quotaSize}\n required\n min=\"1\"\n />\n
\n
\n \n ) => {\n addBucketQuotaUnit(e.target.value as string);\n }}\n options={factorForDropdown()}\n />\n
\n
\n
\n
\n )}\n {versioningEnabled && (\n \n ) => {\n addBucketRetention(event.target.checked);\n }}\n label={\"Retention\"}\n description={\n \"Impose rules to prevent object deletion for a period of time.\"\n }\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n )}\n {retentionEnabled && (\n \n \n ) => {\n addBucketRetentionMode(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"compliance\", label: \"Compliance\" },\n { value: \"governance\", label: \"Governance\" },\n ]}\n />\n \n \n ) => {\n addBucketRetentionUnit(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"days\", label: \"Days\" },\n { value: \"years\", label: \"Years\" },\n ]}\n />\n \n \n ) => {\n addBucketRetentionValidity(e.target.valueAsNumber);\n }}\n label=\"Retention Validity\"\n value={String(retentionValidity)}\n required\n min=\"1\"\n />\n \n \n )}\n
\n \n \n Clear\n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n
\n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n addBucketModalOpen: state.buckets.open,\n bucketName: state.buckets.addBucketName,\n versioningEnabled: state.buckets.addBucketVersioningEnabled,\n lockingEnabled: state.buckets.addBucketLockingEnabled,\n quotaEnabled: state.buckets.addBucketQuotaEnabled,\n quotaType: state.buckets.addBucketQuotaType,\n quotaSize: state.buckets.addBucketQuotaSize,\n quotaUnit: state.buckets.addBucketQuotaUnit,\n retentionEnabled: state.buckets.addBucketRetentionEnabled,\n retentionMode: state.buckets.addBucketRetentionMode,\n retentionUnit: state.buckets.addBucketRetentionUnit,\n retentionValidity: state.buckets.addBucketRetentionValidity,\n});\n\nconst connector = connect(mapState, {\n addBucketName: addBucketName,\n addBucketVersioned: addBucketVersioning,\n enableObjectLocking: addBucketEnableObjectLocking,\n addBucketQuota: addBucketQuota,\n addBucketQuotaType: addBucketQuotaType,\n addBucketQuotaSize: addBucketQuotaSize,\n addBucketQuotaUnit: addBucketQuotaUnit,\n addBucketRetention: addBucketRetention,\n addBucketRetentionMode: addBucketRetentionMode,\n addBucketRetentionUnit: addBucketRetentionUnit,\n addBucketRetentionValidity: addBucketRetentionValidity,\n setModalError: setModalErrorSnackMessage,\n});\n\nexport default connector(withStyles(styles)(AddBucket));\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport { BucketList } from \"../types\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\n\ninterface IDeleteBucketProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedBucket: string;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteBucket = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedBucket,\n setErrorSnackMessage,\n}: IDeleteBucketProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n\n const removeRecord = () => {\n if (!deleteLoading) {\n setDeleteLoading(true);\n\n api\n .invoke(\"DELETE\", `/api/v1/buckets/${selectedBucket}`, {\n name: selectedBucket,\n })\n .then((res: BucketList) => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n }\n };\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete Bucket\n \n {deleteLoading && }\n \n Are you sure you want to delete bucket {selectedBucket}?
\n A bucket can only be deleted if it's empty.\n
\n
\n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n {\n removeRecord();\n }}\n color=\"secondary\"\n autoFocus\n >\n Delete\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(DeleteBucket);\n","import React from \"react\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Typography from \"@material-ui/core/Typography\";\n\ninterface IPageHeader {\n classes: any;\n label: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerContainer: {\n position: \"absolute\",\n width: \"100%\",\n height: 77,\n display: \"flex\",\n backgroundColor: \"#fff\",\n borderBottom: \"#E3E3E3 1px solid\",\n left: 0,\n },\n label: {\n display: \"flex\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n },\n labelStyle: {\n color: \"#000\",\n fontSize: 18,\n fontWeight: 700,\n marginLeft: 55,\n marginTop: 8,\n },\n });\n\nconst PageHeader = ({ classes, label }: IPageHeader) => {\n return (\n \n \n \n {label}\n \n \n \n );\n};\n\nexport default withStyles(styles)(PageHeader);\n","import React, { Fragment } from \"react\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { predefinedList } from \"../common/styleLibrary\";\n\ninterface IPredefinedList {\n classes: any;\n label?: string;\n content: any;\n multiLine?: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...predefinedList,\n });\n\nconst PredefinedList = ({\n classes,\n label = \"\",\n content,\n multiLine = false,\n}: IPredefinedList) => {\n return (\n \n \n {label !== \"\" && (\n \n {label}\n \n )}\n \n \n {content}\n \n \n \n \n );\n};\n\nexport default withStyles(styles)(PredefinedList);\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 from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { IWizardButton, IWizardPage } from \"./types\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n wizardStepContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n },\n wizardComponent: {\n overflowY: \"auto\",\n marginBottom: 10,\n height: \"calc(100vh - 435px)\",\n maxWidth: 840,\n width: \"100%\",\n },\n wizardModal: {\n overflowY: \"auto\",\n marginBottom: 10,\n height: \"calc(100vh - 515px)\",\n },\n buttonsContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"flex-start\" as const,\n padding: \"10px 0\",\n borderTop: \"#EAEAEA 1px solid\",\n \"& button\": {\n marginLeft: 10,\n },\n \"&.forModal\": {\n paddingBottom: 0,\n },\n },\n buttonInnerContainer: {\n maxWidth: 840,\n width: \"100%\",\n textAlign: \"right\" as const,\n },\n });\n\nconst WizardPage = ({\n classes,\n page,\n pageChange,\n loadingStep,\n forModal,\n}: IWizardPage) => {\n const buttonAction = (btn: IWizardButton) => {\n switch (btn.type) {\n case \"next\":\n pageChange(\"++\");\n break;\n case \"back\":\n pageChange(\"--\");\n break;\n case \"to\":\n pageChange(btn.toPage || 0);\n break;\n case \"custom\":\n default:\n }\n\n if (btn.action) {\n btn.action(pageChange);\n }\n };\n\n return (\n
\n
\n {page.componentRender}\n
\n {loadingStep && (\n
\n \n
\n )}\n \n
\n {page.buttons.map((btn) => {\n return (\n {\n buttonAction(btn);\n }}\n disabled={!btn.enabled}\n key={`button-${page.label}-${btn.label}`}\n >\n {btn.label}\n \n );\n })}\n
\n
\n
\n );\n};\n\nexport default withStyles(styles)(WizardPage);\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, { useState, Fragment } from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { IWizardMain } from \"./types\";\nimport WizardPage from \"./WizardPage\";\nimport { Grid } from \"@material-ui/core\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n wizardMain: {\n display: \"flex\",\n width: \"100%\",\n height: \"100%\",\n flexGrow: 1,\n },\n wizFromContainer: {\n height: \"calc(100vh - 365px)\",\n minHeight: 450,\n padding: \"0 30px\",\n },\n wizFromModal: {\n position: \"relative\",\n },\n wizardSteps: {\n minWidth: 180,\n marginRight: 10,\n borderRight: \"#eaeaea 1px solid\",\n display: \"flex\",\n flexGrow: 1,\n flexDirection: \"column\",\n height: \"100%\",\n \"& ul\": {\n padding: \"0 15px 0 40px\",\n marginTop: 0,\n\n \"& li\": {\n listStyle: \"lower-roman\",\n marginBottom: 12,\n },\n },\n },\n modalWizardSteps: {\n padding: 5,\n borderBottom: \"#eaeaea 1px solid\",\n \"& ul\": {\n padding: 0,\n marginTop: 0,\n display: \"flex\",\n justifyContent: \"space-evenly\",\n\n \"& li\": {\n listStyle: \"lower-roman\",\n \"&::marker\": {\n paddingLeft: 15,\n },\n },\n },\n },\n buttonList: {\n backgroundColor: \"transparent\",\n border: \"none\",\n cursor: \"pointer\",\n \"&:not(:disabled):hover\": {\n textDecoration: \"underline\",\n },\n \"&:selected, &:active, &:focus, &:focus:active\": {\n border: \"none\",\n outline: 0,\n boxShadow: \"none\",\n },\n },\n paddedContentGrid: {\n padding: \"0 10px\",\n },\n stepsLabel: {\n fontSize: 20,\n color: \"#393939\",\n fontWeight: 600,\n margin: \"15px 12px\",\n \"&.stepsModalTitle\": {\n textAlign: \"center\",\n width: \"100%\",\n marginTop: 0,\n marginBottom: 10,\n },\n },\n stepsMasterContainer: {\n position: \"sticky\",\n top: 0,\n backgroundColor: \"#FFFFFF\",\n width: \"100%\",\n maxHeight: 90,\n },\n });\n\nconst GenericWizard = ({\n classes,\n wizardSteps,\n loadingStep,\n forModal,\n}: IWizardMain) => {\n const [currentStep, setCurrentStep] = useState(0);\n\n const pageChange = (toElement: string | number) => {\n const lastPage = wizardSteps.length - 1;\n\n if (toElement === \"++\") {\n let nextPage = currentStep + 1;\n\n if (nextPage > lastPage) {\n nextPage = lastPage;\n }\n\n setCurrentStep(nextPage);\n }\n\n if (toElement === \"--\") {\n let prevPage = currentStep - 1;\n\n if (prevPage < 0) {\n prevPage = 0;\n }\n\n setCurrentStep(prevPage);\n }\n\n if (typeof toElement === \"number\") {\n let pg = toElement;\n if (toElement < 0) {\n pg = 0;\n }\n\n if (toElement > lastPage) {\n pg = lastPage;\n }\n\n setCurrentStep(pg);\n }\n };\n\n if (wizardSteps.length === 0) {\n return null;\n }\n\n const stepsList = () => {\n return (\n
    \n {wizardSteps.map((step, index) => {\n return (\n
  • \n pageChange(index)}\n disabled={index > currentStep}\n className={classes.buttonList}\n >\n {step.label}\n \n
  • \n );\n })}\n
\n );\n };\n\n return (\n \n {forModal ? (\n \n
\n
Steps
\n
{stepsList()}
\n
\n
\n ) : (\n \n \n
\n Steps\n {stepsList()}\n
\n
\n
\n )}\n\n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(GenericWizard);\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, { useState, useEffect, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Tooltip } from \"@material-ui/core\";\nimport get from \"lodash/get\";\nimport Grid from \"@material-ui/core/Grid\";\nimport ErrorOutlineIcon from \"@material-ui/icons/ErrorOutline\";\nimport CheckCircleOutlineIcon from \"@material-ui/icons/CheckCircleOutline\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport { BulkReplicationResponse, BulkReplicationItem } from \"../types\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport PredefinedList from \"../../Common/FormComponents/PredefinedList/PredefinedList\";\nimport api from \"../../../../common/api\";\nimport GenericWizard from \"../../Common/GenericWizard/GenericWizard\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { SelectorTypes } from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\n\ninterface IBulkReplicationModal {\n open: boolean;\n closeModalAndRefresh: (clearSelection: boolean) => any;\n classes: any;\n buckets: string[];\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n remoteBucketList: {\n display: \"grid\",\n gridTemplateColumns: \"auto auto 45px\",\n alignItems: \"center\",\n justifyContent: \"stretch\",\n },\n errorIcon: {\n color: \"#C72C48\",\n },\n successIcon: {\n color: \"#42C91A\",\n },\n hide: {\n opacity: 0,\n transitionDuration: \"0.3s\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst AddBulkReplicationModal = ({\n open,\n closeModalAndRefresh,\n classes,\n buckets,\n setModalErrorSnackMessage,\n}: IBulkReplicationModal) => {\n const [bucketsToAlter, setBucketsToAlter] = useState([]);\n const [addLoading, setAddLoading] = useState(false);\n const [externalLoading, setExternalLoading] = useState(false);\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n const [targetURL, setTargetURL] = useState(\"\");\n const [region, setRegion] = useState(\"\");\n const [useTLS, setUseTLS] = useState(true);\n const [relationBuckets, setRelationBuckets] = useState([]);\n const [remoteBucketsOpts, setRemoteBucketOpts] = useState([]);\n const [responseItem, setResponseItem] = useState([]);\n\n const optionsForBucketsDrop: SelectorTypes[] = remoteBucketsOpts.map(\n (remoteBucketName: string) => {\n return {\n label: remoteBucketName,\n value: remoteBucketName,\n };\n }\n );\n\n useEffect(() => {\n if (relationBuckets.length === 0) {\n const bucketsAlter: string[] = [];\n const relationBucketsAlter: string[] = [];\n\n buckets.forEach((item: string) => {\n bucketsAlter.push(item);\n relationBucketsAlter.push(\"\");\n });\n\n setRelationBuckets(relationBucketsAlter);\n setBucketsToAlter(bucketsAlter);\n }\n }, [buckets, relationBuckets.length]);\n\n const addRecord = () => {\n setAddLoading(true);\n const replicate = bucketsToAlter.map((bucketName, index) => {\n return {\n originBucket: bucketName,\n destinationBucket: relationBuckets[index],\n };\n });\n\n const endURL = `${useTLS ? \"https://\" : \"http://\"}${targetURL}`;\n const remoteBucketsInfo = {\n accessKey: accessKey,\n secretKey: secretKey,\n targetURL: endURL,\n region: region,\n bucketsRelation: replicate,\n };\n\n api\n .invoke(\"POST\", \"/api/v1/buckets-replication\", remoteBucketsInfo)\n .then((response: BulkReplicationResponse) => {\n setAddLoading(false);\n\n const states = response.replicationState;\n setResponseItem(states);\n\n const filterErrors = states.filter(\n (itm) => itm.errorString && itm.errorString !== \"\"\n );\n\n if (filterErrors.length === 0) {\n closeModalAndRefresh(true);\n } else {\n setTimeout(() => {\n removeSuccessItems(states);\n }, 500);\n }\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n const retrieveRemoteBuckets = (\n wizardPageJump: (page: number | string) => void\n ) => {\n const remoteConnectInfo = {\n accessKey: accessKey,\n secretKey: secretKey,\n targetURL: targetURL,\n useTLS,\n };\n setExternalLoading(true);\n\n api\n .invoke(\"POST\", \"api/v1/list-external-buckets\", remoteConnectInfo)\n .then((dataReturn) => {\n const buckets = get(dataReturn, \"buckets\", []);\n\n if (buckets && buckets.length > 0) {\n const arrayReplaceBuckets = buckets.map((element: any) => {\n return element.name;\n });\n\n setRemoteBucketOpts(arrayReplaceBuckets);\n }\n\n wizardPageJump(\"++\");\n setExternalLoading(false);\n })\n .catch((err) => {\n setExternalLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n const stateOfItem = (initialBucket: string) => {\n if (responseItem.length > 0) {\n const bucketResponse = responseItem.find(\n (item) => item.originBucket === initialBucket\n );\n\n if (bucketResponse) {\n const errString = get(bucketResponse, \"errorString\", \"\");\n\n if (errString) {\n return errString;\n }\n\n return \"\";\n }\n }\n return \"n/a\";\n };\n\n const LogoToShow = ({ errString }: { errString: string }) => {\n switch (errString) {\n case \"\":\n return (\n
\n \n
\n );\n case \"n/a\":\n return null;\n default:\n if (errString) {\n return (\n
\n \n \n \n
\n );\n }\n }\n return null;\n };\n\n const updateItem = (indexItem: number, value: string) => {\n const updatedList = [...relationBuckets];\n updatedList[indexItem] = value;\n setRelationBuckets(updatedList);\n };\n\n const itemDisplayBulk = (indexItem: number) => {\n if (remoteBucketsOpts.length > 0) {\n return (\n \n ) => {\n updateItem(indexItem, e.target.value as string);\n }}\n options={optionsForBucketsDrop}\n disabled={addLoading}\n />\n \n );\n }\n return (\n \n ) => {\n updateItem(indexItem, event.target.value);\n }}\n value={relationBuckets[indexItem]}\n disabled={addLoading}\n />\n \n );\n };\n\n const removeSuccessItems = (responseItem: BulkReplicationItem[]) => {\n let newBucketsToAlter = [...bucketsToAlter];\n let newRelationBuckets = [...relationBuckets];\n\n responseItem.forEach((successElement) => {\n const errorString = get(successElement, \"errorString\", \"\");\n\n if (!errorString || errorString === \"\") {\n const indexToRemove = newBucketsToAlter.indexOf(\n successElement.originBucket\n );\n\n newBucketsToAlter.splice(indexToRemove, 1);\n newRelationBuckets.splice(indexToRemove, 1);\n }\n });\n\n setBucketsToAlter(newBucketsToAlter);\n setRelationBuckets(newRelationBuckets);\n };\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n title=\"Set Multiple Bucket Replication\"\n >\n \n \n \n \n

Remote Endpoint Configuration

\n \n Please avoid the use of root credentials for this feature\n \n
\n
\n \n ) => {\n setAccessKey(e.target.value);\n }}\n label=\"Access Key\"\n value={accessKey}\n />\n \n \n ) => {\n setSecretKey(e.target.value);\n }}\n label=\"Secret Key\"\n value={secretKey}\n />\n \n \n ) => {\n setTargetURL(e.target.value);\n }}\n placeholder=\"play.min.io:9000\"\n label=\"Target URL\"\n value={targetURL}\n />\n \n \n {\n setUseTLS(e.target.checked);\n }}\n value=\"yes\"\n />\n \n \n ) => {\n setRegion(e.target.value);\n }}\n label=\"Region\"\n value={region}\n />\n \n \n ),\n buttons: [\n {\n type: \"custom\",\n label: \"Next\",\n enabled: !externalLoading,\n action: retrieveRemoteBuckets,\n },\n ],\n },\n {\n label: \"Buckets Assignation\",\n componentRender: (\n \n

Remote Buckets Assignation

\n \n Please select / type the desired remote bucket were you want\n the local data to be replicated.\n \n
\n {bucketsToAlter.map((bucketName: string, index: number) => {\n const errorItem = stateOfItem(bucketName);\n return (\n \n
\n {bucketName}\n
\n
\n {itemDisplayBulk(index)}\n
\n
\n {responseItem.length > 0 && (\n \n )}\n
\n \n );\n })}\n
\n
\n ),\n buttons: [\n {\n type: \"back\",\n label: \"Back\",\n enabled: true,\n },\n {\n type: \"next\",\n label: \"Create\",\n enabled: !addLoading,\n action: addRecord,\n },\n ],\n },\n ]}\n forModal\n />\n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(AddBulkReplicationModal));\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, { useEffect, useState, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport FileCopyIcon from \"@material-ui/icons/FileCopy\";\nimport Moment from \"react-moment\";\nimport { Bucket, BucketList, HasPermissionResponse } from \"../types\";\nimport { CreateIcon } from \"../../../../icons\";\nimport { niceBytes } from \"../../../../common/utils\";\nimport { AppState } from \"../../../../store\";\nimport { addBucketOpen, addBucketReset } from \"../actions\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../../common/api\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport AddBucket from \"./AddBucket\";\nimport DeleteBucket from \"./DeleteBucket\";\nimport PageHeader from \"../../Common/PageHeader/PageHeader\";\nimport BulkReplicationModal from \"./BulkReplicationModal\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IListBucketsProps {\n classes: any;\n addBucketOpen: typeof addBucketOpen;\n addBucketModalOpen: boolean;\n addBucketReset: typeof addBucketReset;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst ListBuckets = ({\n classes,\n addBucketOpen,\n addBucketModalOpen,\n addBucketReset,\n setErrorSnackMessage,\n}: IListBucketsProps) => {\n const [records, setRecords] = useState([]);\n const [loading, setLoading] = useState(true);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [selectedBucket, setSelectedBucket] = useState(\"\");\n const [filterBuckets, setFilterBuckets] = useState(\"\");\n const [loadingPerms, setLoadingPerms] = useState(true);\n const [canCreateBucket, setCanCreateBucket] = useState(false);\n const [selectedBuckets, setSelectedBuckets] = useState([]);\n const [replicationModalOpen, setReplicationModalOpen] = useState(\n false\n );\n\n // check the permissions for creating bucket\n useEffect(() => {\n if (loadingPerms) {\n api\n .invoke(\"POST\", `/api/v1/has-permission`, {\n actions: [\n {\n id: \"createBucket\",\n action: \"s3:CreateBucket\",\n },\n ],\n })\n .then((res: HasPermissionResponse) => {\n setLoadingPerms(false);\n if (!res.permissions) {\n return;\n }\n const actions = res.permissions ? res.permissions : [];\n\n let canCreate = actions.find((s) => s.id === \"createBucket\");\n if (canCreate && canCreate.can) {\n setCanCreateBucket(true);\n } else {\n setCanCreateBucket(false);\n }\n\n setLoadingPerms(false);\n })\n .catch((err: any) => {\n setLoadingPerms(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loadingPerms, setErrorSnackMessage]);\n\n useEffect(() => {\n if (loading) {\n const fetchRecords = () => {\n setLoading(true);\n api\n .invoke(\"GET\", `/api/v1/buckets`)\n .then((res: BucketList) => {\n setLoading(false);\n setRecords(res.buckets || []);\n })\n .catch((err: any) => {\n setLoading(false);\n setErrorSnackMessage(err);\n });\n };\n fetchRecords();\n }\n }, [loading, setErrorSnackMessage]);\n\n const closeAddModalAndRefresh = (refresh: boolean) => {\n addBucketOpen(false);\n addBucketReset();\n\n if (refresh) {\n setLoading(true);\n setSelectedBuckets([]);\n }\n };\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n if (refresh) {\n setLoading(true);\n setSelectedBuckets([]);\n }\n };\n\n const confirmDeleteBucket = (bucket: string) => {\n setDeleteOpen(true);\n setSelectedBucket(bucket);\n };\n\n const tableActions = [\n { type: \"view\", to: `/buckets`, sendOnlyId: true },\n { type: \"delete\", onClick: confirmDeleteBucket, sendOnlyId: true },\n ];\n\n const displayParsedDate = (date: string) => {\n return {date};\n };\n\n const filteredRecords = records.filter((b: Bucket) => {\n if (filterBuckets === \"\") {\n return true;\n } else {\n if (b.name.indexOf(filterBuckets) >= 0) {\n return true;\n } else {\n return false;\n }\n }\n });\n\n const selectListBuckets = (e: React.ChangeEvent) => {\n const targetD = e.target;\n const value = targetD.value;\n const checked = targetD.checked;\n\n let elements: string[] = [...selectedBuckets]; // We clone the selectedBuckets array\n\n if (checked) {\n // If the user has checked this field we need to push this to selectedBucketsList\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 setSelectedBuckets(elements);\n\n return elements;\n };\n\n const closeBulkReplicationModal = (unselectAll: boolean) => {\n setReplicationModalOpen(false);\n\n if (unselectAll) {\n setSelectedBuckets([]);\n }\n };\n\n return (\n \n {addBucketModalOpen && (\n \n )}\n {deleteOpen && (\n {\n closeDeleteModalAndRefresh(refresh);\n }}\n />\n )}\n {replicationModalOpen && (\n \n )}\n \n \n \n \n {\n setFilterBuckets(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n }\n onClick={() => {\n setReplicationModalOpen(true);\n }}\n disabled={selectedBuckets.length === 0}\n >\n Set Replication\n \n {canCreateBucket && (\n }\n onClick={() => {\n addBucketOpen(true);\n }}\n >\n Create Bucket\n \n )}\n \n \n
\n
\n \n \n \n
\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n addBucketModalOpen: state.buckets.open,\n});\n\nconst connector = connect(mapState, {\n addBucketOpen,\n addBucketReset,\n setErrorSnackMessage,\n});\n\nexport default connector(withStyles(styles)(ListBuckets));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n });\n\ninterface ISetAccessPolicyProps {\n classes: any;\n open: boolean;\n bucketName: string;\n actualPolicy: string;\n closeModalAndRefresh: () => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst SetAccessPolicy = ({\n classes,\n open,\n bucketName,\n actualPolicy,\n closeModalAndRefresh,\n setModalErrorSnackMessage,\n}: ISetAccessPolicyProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [accessPolicy, setAccessPolicy] = useState(\"\");\n const addRecord = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n api\n .invoke(\"PUT\", `/api/v1/buckets/${bucketName}/set-policy`, {\n access: accessPolicy,\n })\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n useEffect(() => {\n setAccessPolicy(actualPolicy);\n }, [setAccessPolicy, actualPolicy]);\n\n return (\n {\n closeModalAndRefresh();\n }}\n >\n ) => {\n addRecord(e);\n }}\n >\n \n \n \n ) => {\n setAccessPolicy(e.target.value as string);\n }}\n options={[\n { value: \"PRIVATE\", label: \"Private\" },\n { value: \"PUBLIC\", label: \"Public\" },\n ]}\n />\n \n \n \n \n Set\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(SetAccessPolicy));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport RadioGroupSelector from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n });\n\ninterface ISetRetentionConfigProps {\n classes: any;\n open: boolean;\n bucketName: string;\n closeModalAndRefresh: () => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst SetRetentionConfig = ({\n classes,\n open,\n bucketName,\n closeModalAndRefresh,\n setModalErrorSnackMessage,\n}: ISetRetentionConfigProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [retentionMode, setRetentionMode] = useState(\"compliance\");\n const [retentionUnit, setRetentionUnit] = useState(\"days\");\n const [retentionValidity, setRetentionValidity] = useState(1);\n const [valid, setValid] = useState(false);\n\n const setRetention = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n api\n .invoke(\"PUT\", `/api/v1/buckets/${bucketName}/retention`, {\n mode: retentionMode,\n unit: retentionUnit,\n validity: retentionValidity,\n })\n .then(() => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n useEffect(() => {\n if (Number.isNaN(retentionValidity) || retentionValidity < 1) {\n setValid(false);\n return;\n }\n setValid(true);\n }, [retentionValidity]);\n\n return (\n {\n closeModalAndRefresh();\n }}\n >\n ) => {\n setRetention(e);\n }}\n >\n \n \n \n ) => {\n setRetentionMode(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"compliance\", label: \"Compliance\" },\n { value: \"governance\", label: \"Governance\" },\n ]}\n />\n \n \n ) => {\n setRetentionUnit(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"days\", label: \"Days\" },\n { value: \"years\", label: \"Years\" },\n ]}\n />\n \n \n ) => {\n setRetentionValidity(e.target.valueAsNumber);\n }}\n label=\"Retention Validity\"\n value={String(retentionValidity)}\n required\n min=\"1\"\n />\n \n \n \n \n Set\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(SetRetentionConfig));\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, { ChangeEvent, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport api from \"../../../../common/api\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport Checkbox from \"@material-ui/core/Checkbox\";\nimport Table from \"@material-ui/core/Table\";\nimport { ArnList } from \"../types\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface IAddEventProps {\n classes: any;\n open: boolean;\n selectedBucket: string;\n closeModalAndRefresh: () => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst AddEvent = ({\n classes,\n open,\n selectedBucket,\n closeModalAndRefresh,\n setModalErrorSnackMessage,\n}: IAddEventProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [prefix, setPrefix] = useState(\"\");\n const [suffix, setSuffix] = useState(\"\");\n const [arn, setArn] = useState(\"\");\n const [selectedEvents, setSelectedEvents] = useState([]);\n const [arnList, setArnList] = useState([]);\n\n const addRecord = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n api\n .invoke(\"POST\", `/api/v1/buckets/${selectedBucket}/events`, {\n configuration: {\n arn: arn,\n events: selectedEvents,\n prefix: prefix,\n suffix: suffix,\n },\n ignoreExisting: true,\n })\n .then(() => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n const fetchArnList = useCallback(() => {\n setAddLoading(true);\n api\n .invoke(\"GET\", `/api/v1/admin/arns`)\n .then((res: ArnList) => {\n let arns: string[] = [];\n if (res.arns !== null) {\n arns = res.arns;\n }\n setAddLoading(false);\n setArnList(arns);\n })\n .catch((err: any) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n }, [setModalErrorSnackMessage]);\n\n useEffect(() => {\n fetchArnList();\n }, [fetchArnList]);\n\n const events = [\n { label: \"PUT - Object Uploaded\", value: \"put\" },\n { label: \"GET - Object accessed\", value: \"get\" },\n { label: \"DELETE - Object Deleted\", value: \"delete\" },\n ];\n\n const handleClick = (\n event: React.MouseEvent | ChangeEvent,\n name: string\n ) => {\n const selectedIndex = selectedEvents.indexOf(name);\n let newSelected: string[] = [];\n\n if (selectedIndex === -1) {\n newSelected = newSelected.concat(selectedEvents, name);\n } else if (selectedIndex === 0) {\n newSelected = newSelected.concat(selectedEvents.slice(1));\n } else if (selectedIndex === selectedEvents.length - 1) {\n newSelected = newSelected.concat(selectedEvents.slice(0, -1));\n } else if (selectedIndex > 0) {\n newSelected = newSelected.concat(\n selectedEvents.slice(0, selectedIndex),\n selectedEvents.slice(selectedIndex + 1)\n );\n }\n setSelectedEvents(newSelected);\n };\n\n const arnValues = arnList.map((arnConstant) => ({\n label: arnConstant,\n value: arnConstant,\n }));\n\n return (\n {\n closeModalAndRefresh();\n }}\n title=\"Subscribe To Event\"\n >\n ) => {\n addRecord(e);\n }}\n >\n \n \n \n ) => {\n setArn(e.target.value as string);\n }}\n id=\"select-access-policy\"\n name=\"select-access-policy\"\n label={\"ARN\"}\n value={arn}\n options={arnValues}\n />\n \n \n \n \n \n Select\n Event\n \n \n \n {events.map((row) => (\n handleClick(event, row.value)}\n >\n \n handleClick(event, row.value)}\n checked={selectedEvents.includes(row.value)}\n />\n \n \n {row.label}\n \n \n ))}\n \n
\n
\n \n
\n
\n \n ) => {\n setPrefix(e.target.value);\n }}\n />\n \n \n ) => {\n setSuffix(e.target.value);\n }}\n />\n \n \n
\n
\n
\n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n
\n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(AddEvent));\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, { useState } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport api from \"../../../../common/api\";\nimport { BucketEvent, BucketList } from \"../types\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\n\ninterface IDeleteEventProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedBucket: string;\n bucketEvent: BucketEvent | null;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteEvent = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedBucket,\n bucketEvent,\n setErrorSnackMessage,\n}: IDeleteEventProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n\n const removeRecord = () => {\n if (deleteLoading) {\n return;\n }\n if (bucketEvent == null) {\n return;\n }\n\n setDeleteLoading(true);\n\n const events = get(bucketEvent, \"events\", []);\n const prefix = get(bucketEvent, \"prefix\", \"\");\n const suffix = get(bucketEvent, \"suffix\", \"\");\n api\n .invoke(\n \"DELETE\",\n `/api/v1/buckets/${selectedBucket}/events/${bucketEvent.arn}`,\n {\n events,\n prefix,\n suffix,\n }\n )\n .then((res: BucketList) => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n };\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete Event\n \n {deleteLoading && }\n \n Are you sure you want to delete this event?\n \n \n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n {\n removeRecord();\n }}\n color=\"secondary\"\n autoFocus\n >\n Delete\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n});\n\nexport default connector(DeleteEvent);\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport get from \"lodash/get\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { BulkReplicationResponse } from \"../types\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport api from \"../../../../common/api\";\n\ninterface IReplicationModal {\n open: boolean;\n closeModalAndRefresh: () => any;\n classes: any;\n bucketName: string;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\nconst AddReplicationModal = ({\n open,\n closeModalAndRefresh,\n classes,\n bucketName,\n setModalErrorSnackMessage,\n}: IReplicationModal) => {\n const [addLoading, setAddLoading] = useState(false);\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n const [targetURL, setTargetURL] = useState(\"\");\n const [targetBucket, setTargetBucket] = useState(\"\");\n const [region, setRegion] = useState(\"\");\n\n const addRecord = () => {\n const replicate = [\n {\n originBucket: bucketName,\n destinationBucket: targetBucket,\n },\n ];\n\n const remoteBucketsInfo = {\n accessKey: accessKey,\n secretKey: secretKey,\n targetURL: targetURL,\n region: region,\n bucketsRelation: replicate,\n };\n\n api\n .invoke(\"POST\", \"/api/v1/buckets-replication\", remoteBucketsInfo)\n .then((response: BulkReplicationResponse) => {\n setAddLoading(false);\n\n const states = get(response, \"replicationState\", []);\n\n if (states.length > 0) {\n const itemVal = states[0];\n\n setAddLoading(false);\n\n if (itemVal.errorString && itemVal.errorString !== \"\") {\n setModalErrorSnackMessage(itemVal.errorString);\n return;\n }\n\n closeModalAndRefresh();\n\n return;\n }\n setModalErrorSnackMessage(\"No changes applied\");\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n return (\n {\n closeModalAndRefresh();\n }}\n title=\"Set Bucket Replication\"\n >\n ) => {\n e.preventDefault();\n setAddLoading(true);\n addRecord();\n }}\n >\n \n \n \n ) => {\n setAccessKey(e.target.value);\n }}\n label=\"Access Key\"\n value={accessKey}\n />\n \n \n ) => {\n setSecretKey(e.target.value);\n }}\n label=\"Secret Key\"\n value={secretKey}\n />\n \n \n ) => {\n setTargetURL(e.target.value);\n }}\n placeholder=\"https://play.min.io:9000\"\n label=\"Target URL\"\n value={targetURL}\n />\n \n \n ) => {\n setTargetBucket(e.target.value);\n }}\n label=\"Target Bucket\"\n value={targetBucket}\n />\n \n \n ) => {\n setRegion(e.target.value);\n }}\n label=\"Region\"\n value={region}\n />\n \n \n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(AddReplicationModal));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../../common/api\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { BucketEncryptionInfo } from \"../types\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface IEnableBucketEncryptionProps {\n classes: any;\n open: boolean;\n encryptionEnabled: boolean;\n encryptionCfg: BucketEncryptionInfo | null;\n selectedBucket: string;\n closeModalAndRefresh: () => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst EnableBucketEncryption = ({\n classes,\n open,\n encryptionEnabled,\n encryptionCfg,\n selectedBucket,\n closeModalAndRefresh,\n setModalErrorSnackMessage,\n}: IEnableBucketEncryptionProps) => {\n const [loading, setLoading] = useState(false);\n const [kmsKeyID, setKmsKeyID] = useState(\"\");\n const [encryptionType, setEncryptionType] = useState(\"disabled\");\n\n useEffect(() => {\n if (encryptionCfg) {\n if (encryptionCfg.algorithm === \"AES256\") {\n setEncryptionType(\"sse-s3\");\n } else {\n setEncryptionType(\"sse-kms\");\n setKmsKeyID(encryptionCfg.kmsMasterKeyID);\n }\n }\n }, [encryptionCfg]);\n\n const enableBucketEncryption = (event: React.FormEvent) => {\n event.preventDefault();\n if (loading) {\n return;\n }\n if (encryptionType === \"disabled\") {\n api\n .invoke(\"POST\", `/api/v1/buckets/${selectedBucket}/encryption/disable`)\n .then(() => {\n setLoading(false);\n closeModalAndRefresh();\n })\n .catch((err: any) => {\n setLoading(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n api\n .invoke(\"POST\", `/api/v1/buckets/${selectedBucket}/encryption/enable`, {\n encType: encryptionType,\n kmsKeyID: kmsKeyID,\n })\n .then(() => {\n setLoading(false);\n closeModalAndRefresh();\n })\n .catch((err: any) => {\n setLoading(false);\n setModalErrorSnackMessage(err);\n });\n }\n };\n\n return (\n {\n closeModalAndRefresh();\n }}\n title=\"Enable Bucket Encryption\"\n >\n ) => {\n enableBucketEncryption(e);\n }}\n >\n \n \n \n ) => {\n setEncryptionType(e.target.value as string);\n }}\n id=\"select-encryption-type\"\n name=\"select-encryption-type\"\n label={\"Encryption Type\"}\n value={encryptionType}\n options={[\n {\n label: \"Disabled\",\n value: \"disabled\",\n },\n {\n label: \"SSE-S3\",\n value: \"sse-s3\",\n },\n {\n label: \"SSE-KMS\",\n value: \"sse-kms\",\n },\n ]}\n />\n \n \n
\n
\n {encryptionType === \"sse-kms\" && (\n \n ) => {\n setKmsKeyID(e.target.value);\n }}\n />\n \n )}\n \n
\n
\n
\n \n \n Save\n \n \n {loading && (\n \n \n \n )}\n
\n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(EnableBucketEncryption));\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, { useState, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport api from \"../../../../common/api\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\n\ninterface IVersioningEventProps {\n closeVersioningModalAndRefresh: (refresh: boolean) => void;\n modalOpen: boolean;\n selectedBucket: string;\n versioningCurrentState: boolean;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst EnableVersioningModal = ({\n closeVersioningModalAndRefresh,\n modalOpen,\n selectedBucket,\n versioningCurrentState,\n setErrorSnackMessage,\n}: IVersioningEventProps) => {\n const [versioningLoading, setVersioningLoading] = useState(false);\n\n const enableVersioning = () => {\n if (versioningLoading) {\n return;\n }\n setVersioningLoading(true);\n\n api\n .invoke(\"PUT\", `/api/v1/buckets/${selectedBucket}/versioning`, {\n versioning: !versioningCurrentState,\n })\n .then(() => {\n setVersioningLoading(false);\n closeVersioningModalAndRefresh(true);\n })\n .catch((err) => {\n setVersioningLoading(false);\n setErrorSnackMessage(err);\n });\n };\n\n return (\n {\n closeVersioningModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Edit Versioning\n \n {versioningLoading && }\n \n Are you sure you want to{\" \"}\n {versioningCurrentState ? \"disable\" : \"enable\"}{\" \"}\n versioning for this bucket?\n {versioningCurrentState && (\n \n
\n
\n File versions won't be automatically deleted\n
\n )}\n
\n
\n \n {\n closeVersioningModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={versioningLoading}\n >\n Cancel\n \n {\n enableVersioning();\n }}\n color=\"secondary\"\n autoFocus\n >\n {versioningCurrentState ? \"Disable\" : \"Enable\"}\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n});\n\nexport default connector(EnableVersioningModal);\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst UsageIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default UsageIcon;\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 from \"react\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Controlled as CodeMirror } from \"react-codemirror2\";\nimport { InputLabel, Tooltip } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport { fieldBasic } from \"../common/styleLibrary\";\nimport \"./ConsoleCodeMirror.css\";\n\nrequire(\"codemirror/mode/javascript/javascript\");\n\ninterface ICodeWrapper {\n value: string;\n label?: string;\n mode?: string;\n tooltip?: string;\n classes: any;\n onChange?: (editor: any, data: any, value: string) => any;\n onBeforeChange: (editor: any, data: any, value: string) => any;\n readOnly?: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n });\n\nconst CodeMirrorWrapper = ({\n value,\n label = \"\",\n tooltip = \"\",\n mode = \"javascript\",\n classes,\n onChange = () => {},\n onBeforeChange,\n readOnly = false,\n}: ICodeWrapper) => {\n return (\n \n \n {label}\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)(CodeMirrorWrapper);\n","// This file is part of MinIO Kubernetes Cloud\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport api from \"../../../common/api\";\nimport { Policy } from \"./types\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport {\n fieldBasic,\n modalBasic,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport CodeMirrorWrapper from \"../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n jsonPolicyEditor: {\n minHeight: 400,\n width: \"100%\",\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...fieldBasic,\n });\n\ninterface IAddPolicyProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (refresh: boolean) => void;\n policyEdit: Policy;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst AddPolicy = ({\n classes,\n open,\n closeModalAndRefresh,\n policyEdit,\n setModalErrorSnackMessage,\n}: IAddPolicyProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [policyName, setPolicyName] = useState(\"\");\n const [policyDefinition, setPolicyDefinition] = useState(\"\");\n\n const addRecord = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n api\n .invoke(\"POST\", \"/api/v1/policies\", {\n name: policyName,\n policy: policyDefinition,\n })\n .then((res) => {\n setAddLoading(false);\n\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n useEffect(() => {\n if (policyEdit) {\n setPolicyName(policyEdit.name);\n setPolicyDefinition(\n policyEdit ? JSON.stringify(JSON.parse(policyEdit.policy), null, 4) : \"\"\n );\n }\n }, [policyEdit]);\n\n const resetForm = () => {\n setPolicyName(\"\");\n setPolicyDefinition(\"\");\n };\n\n const validSave = policyName.trim() !== \"\";\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n title={`${policyEdit ? \"Info\" : \"Create\"} Policy`}\n >\n ) => {\n addRecord(e);\n }}\n >\n \n \n \n ) => {\n setPolicyName(e.target.value);\n }}\n value={policyName}\n disabled={!!policyEdit}\n />\n \n \n
\n
\n {\n setPolicyDefinition(value);\n }}\n />\n
\n \n {!policyEdit && (\n {\n resetForm();\n }}\n >\n Clear\n \n )}\n\n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n
\n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddPolicy));\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\n\ninterface IDeleteReplicationProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedBucket: string;\n ruleToDelete: string;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteReplicationRule = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedBucket,\n ruleToDelete,\n setErrorSnackMessage,\n}: IDeleteReplicationProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n\n const removeRecord = () => {\n if (!deleteLoading) {\n setDeleteLoading(true);\n\n api\n .invoke(\n \"DELETE\",\n `/api/v1/buckets/${selectedBucket}/replication/${ruleToDelete}`\n )\n .then(() => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n }\n };\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete Replication Rule\n \n {deleteLoading && }\n \n Are you sure you want to delete replication rule {ruleToDelete}\n ?
\n Remember, at lease one rule must be present once replication has been\n enabled\n
\n
\n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n {\n removeRecord();\n }}\n color=\"secondary\"\n autoFocus\n >\n Delete\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(DeleteReplicationRule);\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst AddIcon = () => {\n return (\n \n \n \n );\n};\n\nexport default AddIcon;\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, {\n useState,\n useEffect,\n createRef,\n useLayoutEffect,\n ChangeEvent,\n useRef,\n} from \"react\";\nimport get from \"lodash/get\";\nimport debounce from \"lodash/debounce\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport HelpIcon from \"@material-ui/icons/Help\";\nimport { InputLabel, Tooltip } from \"@material-ui/core\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport InputBoxWrapper from \"../InputBoxWrapper/InputBoxWrapper\";\nimport AddIcon from \"../../../../../icons/AddIcon\";\n\ninterface IQueryMultiSelector {\n elements: string;\n name: string;\n label: string;\n tooltip?: string;\n keyPlaceholder?: string;\n valuePlaceholder?: string;\n classes: any;\n withBorder?: boolean;\n onChange: (elements: string) => void;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n inputWithBorder: {\n border: \"1px solid #EAEAEA\",\n padding: 15,\n height: 150,\n overflowY: \"auto\",\n position: \"relative\",\n marginTop: 15,\n },\n labelContainer: {\n display: \"flex\",\n },\n lineInputBoxes: {\n display: \"flex\",\n },\n queryDiv: {\n alignSelf: \"center\",\n margin: \"0 4px\",\n fontWeight: 600,\n },\n });\n\nconst QueryMultiSelector = ({\n elements,\n name,\n label,\n tooltip = \"\",\n keyPlaceholder = \"\",\n valuePlaceholder = \"\",\n onChange,\n withBorder = false,\n classes,\n}: IQueryMultiSelector) => {\n const [currentKeys, setCurrentKeys] = useState([\"\"]);\n const [currentValues, setCurrentValues] = useState([\"\"]);\n const bottomList = createRef();\n\n // Use effect to get the initial values from props\n useEffect(() => {\n if (\n currentKeys.length === 1 &&\n currentKeys[0] === \"\" &&\n currentValues.length === 1 &&\n currentValues[0] === \"\" &&\n elements &&\n elements !== \"\"\n ) {\n const elementsSplit = elements.split(\"&\");\n let keys = [];\n let values = [];\n\n elementsSplit.forEach((element: string) => {\n const splittedVals = element.split(\"=\");\n if (splittedVals.length === 2) {\n keys.push(splittedVals[0]);\n values.push(splittedVals[1]);\n }\n });\n\n keys.push(\"\");\n values.push(\"\");\n\n setCurrentKeys(keys);\n setCurrentValues(values);\n }\n }, [currentKeys, currentValues, elements]);\n\n // Use effect to send new values to onChange\n useEffect(() => {\n const refScroll = bottomList.current;\n if (refScroll) {\n refScroll.scrollIntoView(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentKeys]);\n\n // We avoid multiple re-renders / hang issue typing too fast\n const firstUpdate = useRef(true);\n useLayoutEffect(() => {\n if (firstUpdate.current) {\n firstUpdate.current = false;\n return;\n }\n debouncedOnChange();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentKeys, currentValues]);\n\n // If the last input is not empty, we add a new one\n const addEmptyLine = () => {\n if (\n currentKeys[currentKeys.length - 1].trim() !== \"\" &&\n currentValues[currentValues.length - 1].trim() !== \"\"\n ) {\n const keysList = [...currentKeys];\n const valuesList = [...currentValues];\n\n keysList.push(\"\");\n valuesList.push(\"\");\n\n setCurrentKeys(keysList);\n setCurrentValues(valuesList);\n }\n };\n\n // Onchange function for input box, we get the dataset-index & only update that value in the array\n const onChangeKey = (e: ChangeEvent) => {\n e.persist();\n\n let updatedElement = [...currentKeys];\n const index = get(e.target, \"dataset.index\", 0);\n updatedElement[index] = e.target.value;\n\n setCurrentKeys(updatedElement);\n };\n\n const onChangeValue = (e: ChangeEvent) => {\n e.persist();\n\n let updatedElement = [...currentValues];\n const index = get(e.target, \"dataset.index\", 0);\n updatedElement[index] = e.target.value;\n\n setCurrentValues(updatedElement);\n };\n\n // Debounce for On Change\n const debouncedOnChange = debounce(() => {\n let queryString = \"\";\n\n currentKeys.forEach((keyVal, index) => {\n if (currentKeys[index] && currentValues[index]) {\n let insertString = `${keyVal}=${currentValues[index]}`;\n if (index !== 0) {\n insertString = `&${insertString}`;\n }\n queryString = `${queryString}${insertString}`;\n }\n });\n\n onChange(queryString);\n }, 500);\n\n const inputs = currentValues.map((element, index) => {\n return (\n \n \n :\n : null}\n overlayAction={() => {\n addEmptyLine();\n }}\n />\n \n );\n });\n\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n
\n \n \n \n
\n )}\n
\n \n {inputs}\n
\n \n \n \n );\n};\nexport default withStyles(styles)(QueryMultiSelector);\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport QueryMultiSelector from \"../../Common/FormComponents/QueryMultiSelector/QueryMultiSelector\";\nimport { LifeCycleItem } from \"../types\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface IAddUserContentProps {\n classes: any;\n closeModalAndRefresh: (reload: boolean) => void;\n selectedBucket: string;\n lifecycle: LifeCycleItem;\n open: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst EditLifecycleConfiguration = ({\n classes,\n closeModalAndRefresh,\n selectedBucket,\n lifecycle,\n open,\n setModalErrorSnackMessage,\n}: IAddUserContentProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [tags, setTags] = useState(\"\");\n const [enabled, setEnabled] = useState(false);\n\n useEffect(() => {\n if (lifecycle.status === \"Enabled\") {\n setEnabled(true);\n }\n\n if (lifecycle.tags) {\n const tgs = lifecycle.tags.reduce(\n (stringLab: string, currItem: any, index: number) => {\n return `${stringLab}${index !== 0 ? \"&\" : \"\"}${currItem.key}=${\n currItem.value\n }`;\n },\n \"\"\n );\n\n setTags(tgs);\n }\n }, [lifecycle]);\n\n const saveRecord = (event: React.FormEvent) => {\n event.preventDefault();\n\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n if (selectedBucket !== null && lifecycle !== null) {\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${selectedBucket}/lifecycle/${lifecycle.id}`,\n {\n disable: !enabled,\n tags: tags,\n }\n )\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n }\n };\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n modalOpen={open}\n title={\"Edit Lifecycle Configuration\"}\n >\n
\n {\n setEnabled(e.target.checked);\n }}\n switchOnly\n />\n
\n\n \n ) => {\n saveRecord(e);\n }}\n >\n \n \n \n {}}\n disabled\n />\n \n \n {\n setTags(vl);\n }}\n keyPlaceholder=\"Tag Key\"\n valuePlaceholder=\"Tag Value\"\n withBorder\n />\n \n \n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(EditLifecycleConfiguration));\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\nexport const months = [\n { value: \"01\", label: \"January\" },\n { value: \"02\", label: \"February\" },\n { value: \"03\", label: \"March\" },\n { value: \"04\", label: \"April\" },\n { value: \"05\", label: \"May\" },\n { value: \"06\", label: \"June\" },\n { value: \"07\", label: \"July\" },\n { value: \"08\", label: \"August\" },\n { value: \"09\", label: \"September\" },\n { value: \"10\", label: \"October\" },\n { value: \"11\", label: \"November\" },\n { value: \"12\", label: \"December\" },\n];\n\nexport const days = Array.from(Array(31), (_, num) => num + 1);\n\nconst currentYear = new Date().getFullYear();\n\nexport const years = Array.from(\n Array(25),\n (_, numYear) => numYear + currentYear\n);\n\nexport const validDate = (year: string, month: string, day: string): any[] => {\n const currentDate = Date.parse(`${year}-${month}-${day}`);\n\n if (isNaN(currentDate)) {\n return [false, \"\"];\n }\n\n const parsedMonth = parseInt(month);\n const parsedDay = parseInt(day);\n\n const monthForString = parsedMonth < 10 ? `0${parsedMonth}` : parsedMonth;\n const dayForString = parsedDay < 10 ? `0${parsedDay}` : parsedDay;\n\n const parsedDate = new Date(currentDate).toISOString().split(\"T\")[0];\n const dateString = `${year}-${monthForString}-${dayForString}`;\n\n return [parsedDate === dateString, dateString];\n};\n\n// twoDigitDate gets a two digit string number used for months or days\n// returns \"NaN\" if number is NaN\nexport const twoDigitDate = (num: number): string => {\n return num < 10 ? `0${num}` : `${num}`;\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, {\n useState,\n forwardRef,\n useImperativeHandle,\n useEffect,\n} from \"react\";\nimport clsx from \"clsx\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport InputLabel from \"@material-ui/core/InputLabel\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport FormControl from \"@material-ui/core/FormControl\";\nimport Select from \"@material-ui/core/Select\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport InputBase from \"@material-ui/core/InputBase\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport FormSwitchWrapper from \"../FormSwitchWrapper/FormSwitchWrapper\";\nimport { days, months, validDate, years } from \"./utils\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n dateInput: {\n \"&:not(:last-child)\": {\n marginRight: 22,\n },\n },\n ...fieldBasic,\n ...tooltipHelper,\n labelContainer: {\n flex: 1,\n },\n fieldContainer: {\n ...fieldBasic.fieldContainer,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n paddingBottom: 10,\n marginTop: 11,\n marginBottom: 6,\n },\n fieldContainerBorder: {\n borderBottom: \"#9c9c9c 1px solid\",\n marginBottom: 20,\n },\n });\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n \"& .MuiSelect-icon\": {\n color: \"#000\",\n \"&.Mui-disabled\": {\n color: \"#9c9c9c\",\n },\n },\n },\n input: {\n borderBottom: 0,\n fontSize: 12,\n },\n })\n)(InputBase);\n\ninterface IDateSelectorProps {\n classes: any;\n id: string;\n label: string;\n disableOptions?: boolean;\n addSwitch?: boolean;\n tooltip?: string;\n borderBottom?: boolean;\n value?: string;\n onDateChange: (date: string, isValid: boolean) => any;\n}\n\nconst DateSelector = forwardRef(\n (\n {\n classes,\n id,\n label,\n disableOptions = false,\n addSwitch = false,\n tooltip = \"\",\n borderBottom = false,\n onDateChange,\n value = \"\",\n }: IDateSelectorProps,\n ref: any\n ) => {\n useImperativeHandle(ref, () => ({ resetDate }));\n\n const [dateEnabled, setDateEnabled] = useState(false);\n const [month, setMonth] = useState(\"\");\n const [day, setDay] = useState(\"\");\n const [year, setYear] = useState(\"\");\n\n useEffect(() => {\n // verify if there is a current value\n // assume is in the format \"2021-12-30\"\n if (value !== \"\") {\n const valueSplit = value.split(\"-\");\n setYear(valueSplit[0]);\n setMonth(valueSplit[1]);\n // Turn to single digit to be displayed on dropdown buttons\n setDay(`${parseInt(valueSplit[2])}`);\n }\n }, [value]);\n\n useEffect(() => {\n const [isValid, dateString] = validDate(year, month, day);\n onDateChange(dateString, isValid);\n }, [month, day, year, onDateChange]);\n\n const resetDate = () => {\n setMonth(\"\");\n setDay(\"\");\n setYear(\"\");\n };\n\n const isDateDisabled = () => {\n if (disableOptions) {\n return disableOptions;\n } else if (addSwitch) {\n return !dateEnabled;\n } else {\n return false;\n }\n };\n\n const onMonthChange = (\n e: React.ChangeEvent<{ name?: string | undefined; value: unknown }>\n ) => {\n setMonth(e.target.value as string);\n };\n\n const onDayChange = (\n e: React.ChangeEvent<{ name?: string | undefined; value: unknown }>\n ) => {\n setDay(e.target.value as string);\n };\n\n const onYearChange = (\n e: React.ChangeEvent<{ name?: string | undefined; value: unknown }>\n ) => {\n setYear(e.target.value as string);\n };\n\n return (\n \n
\n \n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n {addSwitch && (\n {\n setDateEnabled(e.target.checked);\n if (!e.target.checked) {\n onDateChange(\"\", true);\n }\n }}\n switchOnly\n />\n )}\n
\n
\n
\n \n }\n >\n \n {\"\"}\n \n {months.map((option) => (\n \n {option.label}\n \n ))}\n \n \n \n }\n >\n \n {\"\"}\n \n {days.map((dayNumber) => (\n \n {dayNumber}\n \n ))}\n \n \n \n }\n >\n \n {\"\"}\n \n {years.map((year) => (\n \n {year}\n \n ))}\n \n \n
\n \n );\n }\n);\n\nexport default withStyles(styles)(DateSelector);\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, { useState, useEffect, Fragment } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport {\n ITierResponse,\n ITierElement,\n} from \"../../Configurations/TiersConfiguration/types\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport api from \"../../../../common/api\";\nimport DateSelector from \"../../Common/FormComponents/DateSelector/DateSelector\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport QueryMultiSelector from \"../../Common/FormComponents/QueryMultiSelector/QueryMultiSelector\";\nimport RadioGroupSelector from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\n\ninterface IReplicationModal {\n open: boolean;\n closeModalAndRefresh: (refresh: boolean) => any;\n classes: any;\n bucketName: string;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\ninterface ITiersDropDown {\n label: string;\n value: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\nconst AddLifecycleModal = ({\n open,\n closeModalAndRefresh,\n classes,\n bucketName,\n setModalErrorSnackMessage,\n}: IReplicationModal) => {\n const [loadingTiers, setLoadingTiers] = useState(true);\n const [tiersList, setTiersList] = useState([]);\n const [addLoading, setAddLoading] = useState(false);\n const [prefix, setPrefix] = useState(\"\");\n const [tags, setTags] = useState(\"\");\n const [storageClass, setStorageClass] = useState(\"\");\n const [NCTransitionSC, setNCTransitionSC] = useState(\"\");\n const [expiredObjectDM, setExpiredObjectDM] = useState(false);\n const [NCExpirationDays, setNCExpirationDays] = useState(\"0\");\n const [NCTransitionDays, setNCTransitionDays] = useState(\"0\");\n const [ilmType, setIlmType] = useState(\"expiry\");\n const [expiryType, setExpiryType] = useState(\"date\");\n const [expiryDays, setExpiryDays] = useState(\"0\");\n const [expiryDate, setExpiryDate] = useState(\"\");\n const [transitionDays, setTransitionDays] = useState(\"0\");\n const [transitionDate, setTransitionDate] = useState(\"\");\n const [transitionType, setTransitionType] = useState(\"date\");\n const [isFormValid, setIsFormValid] = useState(false);\n\n useEffect(() => {\n if (loadingTiers) {\n api\n .invoke(\"GET\", `/api/v1/admin/tiers`)\n .then((res: ITierResponse) => {\n const tiersList: ITierElement[] | null = get(res, \"items\", []);\n\n if (tiersList !== null && tiersList.length >= 1) {\n const objList = tiersList.map((tier: ITierElement) => {\n const tierType = tier.type;\n const value = get(tier, `${tierType}.name`, \"\");\n\n return { label: value, value: value };\n });\n\n setTiersList(objList);\n if (objList.length > 0) {\n setStorageClass(objList[0].value);\n }\n }\n setLoadingTiers(false);\n })\n .catch((err) => {\n setLoadingTiers(false);\n });\n }\n }, [loadingTiers]);\n\n useEffect(() => {\n let valid = true;\n\n if (ilmType === \"expiry\") {\n if (expiryType === \"date\" && expiryDate === \"\") {\n valid = false;\n }\n if (expiryType === \"days\" && parseInt(expiryDays) < 1) {\n valid = false;\n }\n } else {\n if (transitionType === \"date\" && transitionDate === \"\") {\n valid = false;\n }\n if (transitionType === \"days\" && parseInt(transitionDays) < 1) {\n valid = false;\n }\n\n if (storageClass === \"\") {\n valid = false;\n }\n }\n setIsFormValid(valid);\n }, [\n ilmType,\n expiryType,\n expiryDate,\n expiryDays,\n transitionType,\n transitionDate,\n transitionDays,\n storageClass,\n ]);\n\n const addRecord = () => {\n let rules = {};\n\n if (ilmType === \"expiry\") {\n let expiry = {};\n\n if (expiryType === \"date\") {\n expiry = {\n expiry_date: `${expiryDate}T23:59:59Z`,\n };\n } else {\n expiry = {\n expiry_days: parseInt(expiryDays),\n };\n }\n\n rules = {\n ...expiry,\n noncurrentversion_expiration_days: parseInt(NCExpirationDays),\n };\n } else {\n let transition = {};\n\n if (transitionType === \"date\") {\n transition = {\n transition_date: `${transitionDate}T23:59:59Z`,\n };\n } else {\n transition = {\n transition_days: parseInt(transitionDays),\n };\n }\n\n rules = {\n ...transition,\n noncurrentversion_transition_days: parseInt(NCTransitionDays),\n noncurrentversion_transition_storage_class: NCTransitionSC,\n storage_class: storageClass,\n };\n }\n\n const lifecycleInsert = {\n prefix,\n tags,\n expired_object_delete_marker: expiredObjectDM,\n ...rules,\n };\n\n api\n .invoke(\n \"POST\",\n `/api/v1/buckets/${bucketName}/lifecycle`,\n lifecycleInsert\n )\n .then(() => {\n setAddLoading(false);\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n title=\"Add Lifecycle Rule\"\n >\n {loadingTiers && (\n \n \n \n \n \n )}\n\n {!loadingTiers && (\n ) => {\n e.preventDefault();\n setAddLoading(true);\n addRecord();\n }}\n >\n \n \n

Lifecycle Configuration

\n \n ) => {\n setIlmType(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"expiry\", label: \"Expiry\" },\n { value: \"transition\", label: \"Transition\" },\n ]}\n />\n \n {ilmType === \"expiry\" ? (\n \n \n ) => {\n setExpiryType(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"date\", label: \"Date\" },\n { value: \"days\", label: \"Days\" },\n ]}\n />\n \n \n {expiryType === \"date\" ? (\n {\n if (isValid) {\n setExpiryDate(date);\n }\n }}\n />\n ) : (\n ) => {\n setExpiryDays(e.target.value);\n }}\n label=\"Expiry Days\"\n value={expiryDays}\n min=\"0\"\n />\n )}\n \n \n ) => {\n setNCExpirationDays(e.target.value);\n }}\n label=\"Non-current Expiration Days\"\n value={NCExpirationDays}\n min=\"0\"\n />\n \n \n ) : (\n \n \n ) => {\n setTransitionType(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"date\", label: \"Date\" },\n { value: \"days\", label: \"Days\" },\n ]}\n />\n \n \n {transitionType === \"date\" ? (\n {\n if (isValid) {\n setTransitionDate(date);\n }\n }}\n />\n ) : (\n ) => {\n setTransitionDays(e.target.value);\n }}\n label=\"Transition Days\"\n value={transitionDays}\n min=\"0\"\n />\n )}\n \n \n ) => {\n setNCTransitionDays(e.target.value);\n }}\n label=\"Non-current Transition Days\"\n value={NCTransitionDays}\n min=\"0\"\n />\n \n \n ) => {\n setNCTransitionSC(e.target.value);\n }}\n placeholder=\"Set Non-current Version Transition Storage Class\"\n label=\"Non-current Version Transition Storage Class\"\n value={NCTransitionSC}\n />\n \n \n ) => {\n setStorageClass(e.target.value as string);\n }}\n options={tiersList}\n />\n \n \n )}\n

File Configuration

\n \n ) => {\n setPrefix(e.target.value);\n }}\n label=\"Prefix\"\n value={prefix}\n />\n \n \n {\n setTags(vl);\n }}\n keyPlaceholder=\"Tag Key\"\n valuePlaceholder=\"Tag Value\"\n withBorder\n />\n \n \n ) => {\n setExpiredObjectDM(event.target.checked);\n }}\n label={\"Expired Object Delete Marker\"}\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n
\n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n
\n \n )}\n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(AddLifecycleModal));\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, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, TextField } from \"@material-ui/core\";\nimport * as reactMoment from \"react-moment\";\nimport get from \"lodash/get\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport Tab from \"@material-ui/core/Tab\";\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\nimport Typography from \"@material-ui/core/Typography\";\nimport api from \"../../../../common/api\";\nimport {\n BucketEncryptionInfo,\n BucketEvent,\n BucketEventList,\n BucketInfo,\n BucketList,\n BucketObjectLocking,\n BucketReplication,\n BucketReplicationDestination,\n BucketReplicationRule,\n BucketReplicationRuleDeleteMarker,\n BucketVersioning,\n HasPermissionResponse,\n LifeCycleItem,\n} from \"../types\";\nimport { CreateIcon } from \"../../../../icons\";\nimport { niceBytes } from \"../../../../common/utils\";\nimport {\n actionsTray,\n buttonsStyles,\n containerForHeader,\n hrClass,\n searchField,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport { Policy } from \"../../Policies/types\";\nimport { User } from \"../../Users/types\";\nimport { AppState } from \"../../../../store\";\nimport { ISessionResponse } from \"../../types\";\nimport SetAccessPolicy from \"./SetAccessPolicy\";\nimport SetRetentionConfig from \"./SetRetentionConfig\";\nimport AddEvent from \"./AddEvent\";\nimport DeleteEvent from \"./DeleteEvent\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport AddReplicationModal from \"./AddReplicationModal\";\nimport PageHeader from \"../../Common/PageHeader/PageHeader\";\nimport EnableBucketEncryption from \"./EnableBucketEncryption\";\nimport EnableVersioningModal from \"./EnableVersioningModal\";\nimport UsageIcon from \"../../../../icons/UsageIcon\";\nimport AddPolicy from \"../../Policies/AddPolicy\";\nimport DeleteReplicationRule from \"../ViewBucket/DeleteReplicationRule\";\nimport EditLifecycleConfiguration from \"./EditLifecycleConfiguration\";\nimport AddLifecycleModal from \"./AddLifecycleModal\";\nimport history from \"../../../../history\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n noRecords: {\n lineHeight: \"24px\",\n textAlign: \"center\",\n padding: \"20px\",\n },\n gridWrapper: {\n width: 320,\n },\n gridContainer: {\n display: \"grid\",\n gridTemplateColumns: \"auto auto\",\n gridGap: 8,\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n \"& div:not(.MuiCircularProgress-root)\": {\n display: \"flex\",\n alignItems: \"center\",\n },\n \"& div:nth-child(odd)\": {\n justifyContent: \"flex-end\",\n fontWeight: 700,\n },\n \"& div:nth-child(2n)\": {\n minWidth: 150,\n },\n },\n masterActions: {\n width: \"25%\",\n minWidth: \"120px\",\n \"& div\": {\n margin: \"5px 0px\",\n },\n },\n paperContainer: {\n padding: 15,\n paddingLeft: 50,\n display: \"flex\",\n },\n headerContainer: {\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n capitalizeFirst: {\n textTransform: \"capitalize\",\n },\n doubleElement: {\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n encCheckbox: {\n margin: 0,\n padding: 0,\n },\n tabPan: {\n marginTop: \"5px\",\n },\n fixedHeight: {\n height: 165,\n minWidth: 247,\n padding: \"25px 28px\",\n \"& svg\": {\n maxHeight: 18,\n },\n },\n elementTitle: {\n fontWeight: 500,\n color: \"#777777\",\n fontSize: 14,\n marginTop: -9,\n },\n consumptionValue: {\n color: \"#000000\",\n fontSize: \"48px\",\n fontWeight: \"bold\",\n },\n reportedUsage: {\n padding: \"15px\",\n },\n ...searchField,\n ...actionsTray,\n actionsTray: {\n ...actionsTray.actionsTray,\n padding: \"15px 0 0\",\n },\n ...hrClass,\n ...buttonsStyles,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IViewBucketProps {\n classes: any;\n match: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n session: ISessionResponse;\n}\n\ninterface TabPanelProps {\n children?: React.ReactNode;\n index: any;\n value: any;\n}\n\nfunction TabPanel(props: TabPanelProps) {\n const { children, value, index, ...other } = props;\n\n return (\n
\n );\n}\n\nfunction a11yProps(index: any) {\n return {\n id: `simple-tab-${index}`,\n \"aria-controls\": `simple-tabpanel-${index}`,\n };\n}\n\nconst ViewBucket = ({\n classes,\n match,\n setErrorSnackMessage,\n session,\n}: IViewBucketProps) => {\n const [info, setInfo] = useState(null);\n const [records, setRecords] = useState([]);\n const [replicationRules, setReplicationRules] = useState<\n BucketReplicationRule[]\n >([]);\n const [bucketPolicy, setBucketPolicy] = useState([]);\n const [loadingPolicy, setLoadingPolicy] = useState(true);\n const [bucketUsers, setBucketUsers] = useState([]);\n const [loadingUsers, setLoadingUsers] = useState(true);\n const [loadingBucket, setLoadingBucket] = useState(true);\n const [loadingEvents, setLoadingEvents] = useState(true);\n const [loadingVersioning, setLoadingVersioning] = useState(true);\n const [loadingObjectLocking, setLoadingLocking] = useState(true);\n const [loadingReplication, setLoadingReplication] = useState(true);\n const [loadingSize, setLoadingSize] = useState(true);\n const [loadingEncryption, setLoadingEncryption] = useState(true);\n const [accessPolicyScreenOpen, setAccessPolicyScreenOpen] = useState(\n false\n );\n const [curTab, setCurTab] = useState(0);\n const [addScreenOpen, setAddScreenOpen] = useState(false);\n const [policyScreenOpen, setPolicyScreenOpen] = useState(false);\n const [\n enableEncryptionScreenOpen,\n setEnableEncryptionScreenOpen,\n ] = useState(false);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [editLifecycleOpen, setEditLifecycleOpen] = useState(false);\n const [selectedEvent, setSelectedEvent] = useState(null);\n const [bucketSize, setBucketSize] = useState(\"0\");\n const [openSetReplication, setOpenSetReplication] = useState(false);\n const [isVersioned, setIsVersioned] = useState(false);\n const [hasObjectLocking, setHasObjectLocking] = useState(false);\n const [encryptionEnabled, setEncryptionEnabled] = useState(false);\n const [\n encryptionCfg,\n setEncryptionCfg,\n ] = useState(null);\n const [retentionConfigOpen, setRetentionConfigOpen] = useState(\n false\n );\n const [policyEdit, setPolicyEdit] = useState(null);\n const [enableVersioningOpen, setEnableVersioningOpen] = useState(\n false\n );\n const [loadingPerms, setLoadingPerms] = useState(true);\n const [canPutReplication, setCanPutReplication] = useState(false);\n const [canGetReplication, setCanGetReplication] = useState(false);\n const [deleteReplicationModal, setDeleteReplicationModal] = useState(\n false\n );\n const [selectedRRule, setSelectedRRule] = useState(\"\");\n const [loadingLifecycle, setLoadingLifecycle] = useState(true);\n const [lifecycleRecords, setLifecycleRecords] = useState([]);\n const [addLifecycleOpen, setAddLifecycleOpen] = useState(false);\n\n const bucketName = match.params[\"bucketName\"];\n const usersEnabled = session.pages?.indexOf(\"/users\") > -1;\n\n // check the permissions for creating bucket\n useEffect(() => {\n if (loadingPerms) {\n api\n .invoke(\"POST\", `/api/v1/has-permission`, {\n actions: [\n {\n id: \"PutReplicationConfiguration\",\n action: \"s3:PutReplicationConfiguration\",\n bucket_name: bucketName,\n },\n {\n id: \"GetReplicationConfiguration\",\n action: \"s3:GetReplicationConfiguration\",\n bucket_name: bucketName,\n },\n ],\n })\n .then((res: HasPermissionResponse) => {\n setLoadingPerms(false);\n if (!res.permissions) {\n return;\n }\n const actions = res.permissions ? res.permissions : [];\n\n let userCanPutReplication = actions.find(\n (s) => s.id === \"PutReplicationConfiguration\"\n );\n\n if (userCanPutReplication && userCanPutReplication.can) {\n setCanPutReplication(true);\n } else {\n setCanPutReplication(false);\n }\n let canGetReplication = actions.find(\n (s) => s.id === \"GetReplicationConfiguration\"\n );\n\n if (canGetReplication && canGetReplication.can) {\n setCanGetReplication(true);\n } else {\n setCanGetReplication(false);\n }\n\n setLoadingPerms(false);\n })\n .catch((err: any) => {\n setLoadingPerms(false);\n setErrorSnackMessage(err);\n });\n }\n }, [bucketName, loadingPerms, setErrorSnackMessage]);\n\n useEffect(() => {\n if (loadingEvents) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/events`)\n .then((res: BucketEventList) => {\n const events = get(res, \"events\", []);\n setLoadingEvents(false);\n setRecords(events || []);\n })\n .catch((err: any) => {\n setLoadingEvents(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loadingEvents, setErrorSnackMessage, bucketName]);\n\n useEffect(() => {\n if (loadingVersioning) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/versioning`)\n .then((res: BucketVersioning) => {\n setIsVersioned(res.is_versioned);\n setLoadingVersioning(false);\n })\n .catch((err: any) => {\n setErrorSnackMessage(err);\n setLoadingVersioning(false);\n });\n }\n }, [loadingVersioning, setErrorSnackMessage, bucketName]);\n\n useEffect(() => {\n if (loadingVersioning) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/object-locking`)\n .then((res: BucketObjectLocking) => {\n setHasObjectLocking(res.object_locking_enabled);\n setLoadingLocking(false);\n })\n .catch((err: any) => {\n setErrorSnackMessage(err);\n setLoadingLocking(false);\n });\n }\n }, [\n loadingObjectLocking,\n setErrorSnackMessage,\n bucketName,\n loadingVersioning,\n ]);\n\n useEffect(() => {\n if (loadingReplication) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/replication`)\n .then((res: BucketReplication) => {\n const r = res.rules ? res.rules : [];\n setReplicationRules(r);\n setLoadingReplication(false);\n })\n .catch((err: any) => {\n setErrorSnackMessage(err);\n setLoadingReplication(false);\n });\n }\n }, [loadingReplication, setErrorSnackMessage, bucketName]);\n\n useEffect(() => {\n if (loadingPolicy) {\n api\n .invoke(\"GET\", `/api/v1/bucket-policy/${bucketName}`)\n .then((res: any) => {\n setBucketPolicy(res.policies);\n setLoadingPolicy(false);\n })\n .catch((err: any) => {\n setErrorSnackMessage(err);\n setLoadingPolicy(false);\n });\n }\n }, [loadingPolicy, setErrorSnackMessage, bucketName]);\n\n useEffect(() => {\n if (loadingUsers && usersEnabled) {\n api\n .invoke(\"GET\", `/api/v1/bucket-users/${bucketName}`)\n .then((res: any) => {\n setBucketUsers(res);\n setLoadingUsers(false);\n })\n .catch((err: any) => {\n setErrorSnackMessage(err);\n setLoadingUsers(false);\n });\n }\n }, [loadingUsers, setErrorSnackMessage, bucketName, usersEnabled]);\n\n useEffect(() => {\n if (loadingSize) {\n api\n .invoke(\"GET\", `/api/v1/buckets`)\n .then((res: BucketList) => {\n const resBuckets = get(res, \"buckets\", []);\n\n const bucketInfo = resBuckets.find(\n (bucket) => bucket.name === bucketName\n );\n const size = get(bucketInfo, \"size\", \"0\");\n\n setLoadingSize(false);\n setBucketSize(size);\n })\n .catch((err: any) => {\n setLoadingSize(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loadingSize, setErrorSnackMessage, bucketName]);\n\n useEffect(() => {\n if (loadingBucket) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}`)\n .then((res: BucketInfo) => {\n setLoadingBucket(false);\n setInfo(res);\n })\n .catch((err) => {\n setLoadingBucket(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loadingBucket, setErrorSnackMessage, bucketName]);\n\n useEffect(() => {\n if (loadingEncryption) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/encryption/info`)\n .then((res: BucketEncryptionInfo) => {\n if (res.algorithm) {\n setEncryptionEnabled(true);\n setEncryptionCfg(res);\n }\n setLoadingEncryption(false);\n })\n .catch((err) => {\n if (\n err === \"The server side encryption configuration was not found\"\n ) {\n setEncryptionEnabled(false);\n setEncryptionCfg(null);\n }\n setLoadingEncryption(false);\n });\n }\n }, [loadingEncryption, bucketName]);\n\n const setBucketVersioning = () => {\n setEnableVersioningOpen(true);\n };\n useEffect(() => {\n if (loadingLifecycle) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/lifecycle`)\n .then((res: any) => {\n const records = get(res, \"lifecycle\", []);\n\n setLifecycleRecords(records || []);\n setLoadingLifecycle(false);\n })\n .catch((err) => {\n console.error(err);\n setLoadingLifecycle(false);\n });\n }\n }, [loadingLifecycle, setLoadingLifecycle, bucketName]);\n\n const loadAllBucketData = () => {\n setLoadingBucket(true);\n setLoadingSize(true);\n setLoadingReplication(true);\n setLoadingVersioning(true);\n setLoadingEvents(true);\n setLoadingEncryption(true);\n };\n\n const closeAddModalAndRefresh = (refresh: boolean) => {\n setPolicyScreenOpen(false);\n\n if (refresh) {\n fetchPolicies();\n }\n };\n\n const fetchPolicies = () => {\n setLoadingPolicy(true);\n };\n\n const closeAddEventAndRefresh = () => {\n setAddScreenOpen(false);\n loadAllBucketData();\n };\n\n const closeEnableBucketEncryption = () => {\n setEnableEncryptionScreenOpen(false);\n loadAllBucketData();\n };\n\n const closeSetAccessPolicy = () => {\n setAccessPolicyScreenOpen(false);\n loadAllBucketData();\n };\n\n const closeRetentionConfig = () => {\n setRetentionConfigOpen(false);\n loadAllBucketData();\n };\n\n const closeAddReplication = () => {\n setOpenReplicationOpen(false);\n loadAllBucketData();\n };\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n if (refresh) {\n loadAllBucketData();\n }\n };\n\n const closeEditLCAndRefresh = (refresh: boolean) => {\n setEditLifecycleOpen(false);\n if (refresh) {\n setLoadingLifecycle(true);\n }\n };\n\n const confirmDeleteEvent = (evnt: BucketEvent) => {\n setDeleteOpen(true);\n setSelectedEvent(evnt);\n };\n\n const confirmDeleteReplication = (replication: BucketReplicationRule) => {\n setSelectedRRule(replication.id);\n setDeleteReplicationModal(true);\n };\n\n const closeEnableVersioning = (refresh: boolean) => {\n setEnableVersioningOpen(false);\n if (refresh) {\n loadAllBucketData();\n }\n };\n\n let accessPolicy = \"n/a\";\n\n if (info !== null) {\n accessPolicy = info.access;\n }\n\n const eventsDisplay = (events: string[]) => {\n return {events.join(\", \")};\n };\n\n const ruleDestDisplay = (events: BucketReplicationDestination) => {\n return {events.bucket.replace(\"arn:aws:s3:::\", \"\")};\n };\n\n const ruleDelDisplay = (events: BucketReplicationRuleDeleteMarker) => {\n return null;\n };\n\n const setOpenReplicationOpen = (open = false) => {\n setOpenSetReplication(open);\n };\n\n const closeReplicationModalDelete = (refresh: boolean) => {\n setDeleteReplicationModal(false);\n\n if (refresh) {\n setLoadingReplication(true);\n }\n };\n\n const closeAddLCAndRefresh = (refresh: boolean) => {\n setAddLifecycleOpen(false);\n if (refresh) {\n setLoadingLifecycle(true);\n }\n };\n\n const tableActions = [{ type: \"delete\", onClick: confirmDeleteEvent }];\n const viewAction = (row: any) => {\n setPolicyScreenOpen(true);\n setPolicyEdit(row);\n };\n\n const PolicyActions = [{ type: \"view\", onClick: viewAction }];\n const replicationTableActions = [\n {\n type: \"delete\",\n onClick: confirmDeleteReplication,\n disableButtonFunction: () => replicationRules.length <= 1,\n },\n ];\n\n const expirationRender = (expiration: any) => {\n if (expiration.days) {\n return `${expiration.days} day${expiration.days > 1 ? \"s\" : \"\"}`;\n }\n\n if (expiration.date === \"0001-01-01T00:00:00Z\") {\n return \"\";\n }\n\n return {expiration.date};\n };\n\n const transitionRender = (transition: any) => {\n if (transition.days) {\n return `${transition.days} day${transition.days > 1 ? \"s\" : \"\"}`;\n }\n\n if (transition.date === \"0001-01-01T00:00:00Z\") {\n return \"\";\n }\n\n return {transition.date};\n };\n\n const renderStorageClass = (objectST: any) => {\n const stClass = get(objectST, \"transition.storage_class\", \"\");\n\n return stClass;\n };\n\n const lifecycleColumns = [\n { label: \"ID\", elementKey: \"id\" },\n {\n label: \"Prefix\",\n elementKey: \"prefix\",\n },\n {\n label: \"Status\",\n elementKey: \"status\",\n },\n {\n label: \"Expiration\",\n elementKey: \"expiration\",\n renderFunction: expirationRender,\n },\n {\n label: \"Transition\",\n elementKey: \"transition\",\n renderFunction: transitionRender,\n },\n {\n label: \"Storage Class\",\n elementKey: \"storage_class\",\n renderFunction: renderStorageClass,\n renderFullObject: true,\n },\n ];\n\n const userViewAction = (user: any) => {\n history.push(`/users/${user}`);\n };\n\n const userTableActions = [{ type: \"view\", onClick: userViewAction }];\n\n return (\n \n {addScreenOpen && (\n \n )}\n {enableEncryptionScreenOpen && (\n \n )}\n {accessPolicyScreenOpen && (\n \n )}\n {policyScreenOpen && (\n \n )}\n {retentionConfigOpen && (\n \n )}\n {openSetReplication && (\n \n )}\n {deleteOpen && (\n \n )}\n {enableVersioningOpen && (\n \n )}\n {deleteReplicationModal && (\n \n )}\n {editLifecycleOpen && (\n \n )}\n {addLifecycleOpen && (\n \n )}\n\n ${match.params[\"bucketName\"]}`} />\n \n \n , newValue: number) => {\n setCurTab(newValue);\n }}\n indicatorColor=\"primary\"\n textColor=\"primary\"\n aria-label=\"cluster-tabs\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n \n \n {canGetReplication && }\n \n \n {usersEnabled && }\n \n \n \n \n
\n \n \n \n

Details

\n
\n \n \n \n \n \n \n \n \n \n \n {!hasObjectLocking ? (\n \n \n \n \n ) : (\n \n \n \n \n )}\n \n
Access Policy:\n {\n setAccessPolicyScreenOpen(true);\n }}\n >\n {loadingBucket ? (\n \n ) : (\n accessPolicy.toLowerCase()\n )}\n \n Encryption:\n {loadingEncryption ? (\n \n ) : (\n {\n setEnableEncryptionScreenOpen(true);\n }}\n >\n {encryptionEnabled ? \"Enabled\" : \"Disabled\"}\n \n )}\n
Replication:\n \n {replicationRules.length ? \"Enabled\" : \"Disabled\"}\n \n Object Locking:Disabled
\n
\n \n \n \n \n \n \n \n Reported Usage\n \n \n \n \n {niceBytes(bucketSize)}\n \n \n
\n
\n
\n
\n \n \n \n

Versioning

\n
\n \n \n \n \n \n
Versioning:\n {loadingVersioning ? (\n \n ) : (\n \n \n {isVersioned ? \"Enabled\" : \"Disabled\"}\n \n \n )}\n
\n
\n
\n
\n
\n
\n {hasObjectLocking && (\n \n \n \n

Object Locking

\n
\n \n \n \n \n \n \n
\n Retention:\n {loadingVersioning ? (\n \n ) : (\n \n {\n setRetentionConfigOpen(true);\n }}\n >\n Configure\n \n \n )}\n
\n
\n
\n
\n )}\n
\n \n \n \n {\n // setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n }\n size=\"medium\"\n onClick={() => {\n setAddScreenOpen(true);\n }}\n >\n Subscribe to Event\n \n \n \n
\n
\n \n \n \n
\n
\n {canGetReplication && (\n \n \n \n {\n // setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n {canPutReplication && (\n }\n size=\"medium\"\n onClick={() => {\n setOpenReplicationOpen(true);\n }}\n >\n Add Replication Rule\n \n )}\n \n \n
\n
\n \n \n \n
\n
\n )}\n \n \n \n {\n // setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n }\n size=\"medium\"\n onClick={() => {\n setAddLifecycleOpen(true);\n }}\n >\n Add Lifecycle Rule\n \n \n \n
\n
\n \n \n \n
\n
\n \n
\n \n
\n {usersEnabled && (\n \n
\n \n
\n )}\n
\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n session: state.console.session,\n});\n\nconst connector = connect(mapState, {\n setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ViewBucket));\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 {\n IBarChartConfiguration,\n IBarChartRelation,\n IDataSRep,\n ILinearGraphConfiguration,\n IPieChartConfiguration,\n} from \"./Widgets/types\";\n\nexport enum widgetType {\n singleValue = \"singleValue\",\n linearGraph = \"linearGraph\",\n barChart = \"barChart\",\n pieChart = \"pieChart\",\n singleRep = \"singleRep\",\n}\n\nexport interface IDashboardPanel {\n title: string;\n data: string | object[] | IDataSRep[];\n dataOuter?: string | object[];\n type: widgetType;\n layoutIdentifier: string;\n widgetConfiguration?:\n | ILinearGraphConfiguration[]\n | IBarChartConfiguration[]\n | IPieChartConfiguration;\n color?: string;\n fillColor?: string;\n innerLabel?: string;\n labelDisplayFunction?: (value: string) => any;\n disableYAxis?: boolean;\n xAxisFormatter?: (item: string) => string;\n yAxisFormatter?: (item: string) => string;\n customStructure?: IBarChartRelation[];\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 from \"react\";\nimport history from \"../../../history\";\nimport { Route, Router, Switch, withRouter } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../../store\";\nimport { setMenuOpen } from \"../../../actions\";\nimport NotFoundPage from \"../../NotFoundPage\";\nimport ListBuckets from \"./ListBuckets/ListBuckets\";\nimport ViewBucket from \"./ViewBucket/ViewBucket\";\n\nconst mapState = (state: AppState) => ({\n open: state.system.sidebarOpen,\n});\n\nconst connector = connect(mapState, { setMenuOpen });\n\nconst Buckets = () => {\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default withRouter(connector(Buckets));\n","// This file is part of MinIO Kubernetes Cloud\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport api from \"../../../common/api\";\nimport { PolicyList } from \"./types\";\nimport { setErrorSnackMessage } from \"../../../actions\";\n\ninterface IDeletePolicyProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedPolicy: string;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeletePolicy = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedPolicy,\n setErrorSnackMessage,\n}: IDeletePolicyProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n const removeRecord = () => {\n if (deleteLoading) {\n return;\n }\n setDeleteLoading(true);\n api\n .invoke(\"DELETE\", `/api/v1/policy?name=${selectedPolicy}`)\n .then((res: PolicyList) => {\n setDeleteLoading(false);\n\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n };\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete Policy\n \n {deleteLoading && }\n \n Are you sure you want to delete policy {selectedPolicy}?.\n \n \n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n {\n removeRecord();\n }}\n color=\"secondary\"\n autoFocus\n >\n Delete\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(DeletePolicy);\n","// This file is part of MinIO Kubernetes Cloud\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, { useState, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport { Policy, PolicyList } from \"./types\";\nimport { CreateIcon } from \"../../../icons\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport AddPolicy from \"./AddPolicy\";\nimport DeletePolicy from \"./DeletePolicy\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport api from \"../../../common/api\";\nimport history from \"../../../history\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IPoliciesProps {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst ListPolicies = ({ classes, setErrorSnackMessage }: IPoliciesProps) => {\n const [records, setRecords] = useState([]);\n const [loading, setLoading] = useState(false);\n const [addScreenOpen, setAddScreenOpen] = useState(false);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [selectedPolicy, setSelectedPolicy] = useState(\"\");\n const [filterPolicies, setFilterPolicies] = useState(\"\");\n const [policyEdit, setPolicyEdit] = useState(null);\n\n useEffect(() => {\n fetchRecords();\n }, []);\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\"GET\", `/api/v1/policies`)\n .then((res: PolicyList) => {\n const policies = get(res, \"policies\", []);\n\n policies.sort((pa, pb) => {\n if (pa.name > pb.name) {\n return 1;\n }\n\n if (pa.name < pb.name) {\n return -1;\n }\n\n return 0;\n });\n\n setLoading(false);\n setRecords(policies);\n })\n .catch((err) => {\n setLoading(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loading, setLoading, setRecords, setErrorSnackMessage]);\n\n const fetchRecords = () => {\n setLoading(true);\n };\n\n const closeAddModalAndRefresh = (refresh: boolean) => {\n setAddScreenOpen(false);\n\n if (refresh) {\n fetchRecords();\n }\n };\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n\n if (refresh) {\n fetchRecords();\n }\n };\n\n const confirmDeletePolicy = (policy: string) => {\n setDeleteOpen(true);\n setSelectedPolicy(policy);\n };\n\n const viewAction = (policy: any) => {\n history.push(`/policies/${policy.name}`);\n };\n\n const tableActions = [\n { type: \"view\", onClick: viewAction },\n { type: \"delete\", onClick: confirmDeletePolicy, sendOnlyId: true },\n ];\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.name.includes(filterPolicies)\n );\n\n return (\n \n {addScreenOpen && (\n \n )}\n {deleteOpen && (\n \n )}\n \n \n \n \n {\n setFilterPolicies(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n }\n onClick={() => {\n setAddScreenOpen(true);\n setPolicyEdit(null);\n }}\n >\n Create Policy\n \n \n \n
\n
\n \n \n \n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(ListPolicies));\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, useEffect, useState } from \"react\";\nimport { Policy } from \"./types\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n containerForHeader,\n modalBasic,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport Tab from \"@material-ui/core/Tab\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport { User } from \"../Users/types\";\nimport api from \"../../../common/api\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { Link } from \"react-router-dom\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport CodeMirrorWrapper from \"../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper\";\nimport history from \"../../../history\";\n\ninterface IPolicyDetailsProps {\n classes: any;\n match: any;\n closeModalAndRefresh: (refresh: boolean) => void;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n multiContainer: {\n display: \"flex\",\n alignItems: \"center\" as const,\n justifyContent: \"flex-start\" as const,\n },\n sizeFactorContainer: {\n marginLeft: 8,\n },\n containerHeader: {\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n paperContainer: {\n padding: \"15px 15px 15px 50px\",\n },\n infoGrid: {\n display: \"grid\",\n gridTemplateColumns: \"auto auto auto auto\",\n gridGap: 8,\n \"& div\": {\n display: \"flex\",\n alignItems: \"center\",\n },\n \"& div:nth-child(odd)\": {\n justifyContent: \"flex-end\",\n fontWeight: 700,\n },\n \"& div:nth-child(2n)\": {\n paddingRight: 35,\n },\n },\n masterActions: {\n width: \"25%\",\n minWidth: \"120px\",\n \"& div\": {\n margin: \"5px 0px\",\n },\n },\n actionsTray: {\n textAlign: \"right\",\n },\n updateButton: {\n backgroundColor: \"transparent\",\n border: 0,\n padding: \"0 6px\",\n cursor: \"pointer\",\n \"&:focus, &:active\": {\n outline: \"none\",\n },\n \"& svg\": {\n height: 12,\n },\n },\n noUnderLine: {\n textDecoration: \"none\",\n },\n poolLabel: {\n color: \"#666666\",\n },\n licenseContainer: {\n position: \"relative\",\n padding: \"20px 52px 0px 28px\",\n background: \"#032F51\",\n boxShadow: \"0px 3px 7px #00000014\",\n \"& h2\": {\n color: \"#FFF\",\n marginBottom: 67,\n },\n \"& a\": {\n textDecoration: \"none\",\n },\n \"& h3\": {\n color: \"#FFFFFF\",\n marginBottom: \"30px\",\n fontWeight: \"bold\",\n },\n \"& h6\": {\n color: \"#FFFFFF !important\",\n },\n },\n licenseInfo: { color: \"#FFFFFF\", position: \"relative\" },\n licenseInfoTitle: {\n textTransform: \"none\",\n color: \"#BFBFBF\",\n fontSize: 11,\n },\n licenseInfoValue: {\n textTransform: \"none\",\n fontSize: 14,\n fontWeight: \"bold\",\n },\n verifiedIcon: {\n width: 96,\n position: \"absolute\",\n right: 0,\n bottom: 29,\n },\n breadcrumLink: {\n textDecoration: \"none\",\n color: \"black\",\n },\n ...modalBasic,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst PolicyDetails = ({\n classes,\n match,\n closeModalAndRefresh,\n setErrorSnackMessage,\n}: IPolicyDetailsProps) => {\n const [selectedTab, setSelectedTab] = useState(0);\n const [policy, setPolicy] = useState(null);\n const [userList, setUserList] = useState([]);\n const [addLoading, setAddLoading] = useState(false);\n const [policyName, setPolicyName] = useState(\n match.params[\"policyName\"]\n );\n const [policyDefinition, setPolicyDefinition] = useState(\"\");\n const [loadingPolicy, setLoadingPolicy] = useState(true);\n\n const saveRecord = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n api\n .invoke(\"POST\", \"/api/v1/policies\", {\n name: policyName,\n policy: policyDefinition,\n })\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n setAddLoading(false);\n setErrorSnackMessage(err);\n });\n };\n\n useEffect(() => {\n const loadUsersForPolicy = () => {\n api\n .invoke(\"GET\", `/api/v1/policies/${policyName}/users`)\n .then((result: any) => {\n setUserList(result);\n })\n .catch((err) => {\n console.log(\"Error in loading users\");\n });\n };\n const loadPolicyDetails = () => {\n if (loadingPolicy) {\n api\n .invoke(\"GET\", `/api/v1/policy?name=${policyName}`)\n .then((result: any) => {\n if (result) {\n setPolicy(result);\n setPolicyDefinition(\n result ? JSON.stringify(JSON.parse(result.policy), null, 4) : \"\"\n );\n }\n setLoadingPolicy(false);\n })\n .catch((err) => {\n console.log(\"Error in loading policy\");\n });\n }\n };\n\n if (loadingPolicy) {\n loadPolicyDetails();\n loadUsersForPolicy();\n }\n }, [policyName, loadingPolicy]);\n\n const resetForm = () => {\n setPolicyName(\"\");\n setPolicyDefinition(\"\");\n };\n\n const validSave = policyName.trim() !== \"\";\n\n const userViewAction = (user: any) => {\n history.push(`/users/${user}`);\n };\n const userTableActions = [{ type: \"view\", onClick: userViewAction }];\n\n return (\n \n \n \n Policy\n \n {` > ${match.params[\"policyName\"]}`}\n \n }\n />\n \n \n \n {\n setSelectedTab(newValue);\n }}\n aria-label=\"policy-tabs\"\n >\n \n \n \n \n \n {selectedTab === 0 && (\n \n ) => {\n saveRecord(e);\n }}\n >\n \n \n {\n setPolicyDefinition(value);\n }}\n />\n \n \n {!policy && (\n {\n resetForm();\n }}\n >\n Clear\n \n )}\n\n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n )}\n {selectedTab === 1 && (\n \n )}\n \n \n \n \n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(PolicyDetails));\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 history from \"../../../history\";\nimport { Route, Router, Switch, withRouter } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../../store\";\nimport { setMenuOpen } from \"../../../actions\";\nimport NotFoundPage from \"../../NotFoundPage\";\n\nimport ListPolicies from \"./ListPolicies\";\nimport PolicyDetails from \"./PolicyDetails\";\n\nconst mapState = (state: AppState) => ({\n open: state.system.sidebarOpen,\n});\n\nconst connector = connect(mapState, { setMenuOpen });\n\nconst Users = () => {\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default withRouter(connector(Users));\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 get from \"lodash/get\";\nimport { Layout } from \"react-grid-layout\";\nimport { IDashboardPanel, widgetType } from \"./types\";\nimport {\n getTimeFromTimestamp,\n niceBytes,\n niceDays,\n textToRGBColor,\n} from \"../../../../common/utils\";\n\nconst dLocalStorageV = \"dashboardConfig\";\n\nexport const defaultWidgetsLayout: Layout[] = [\n {\n w: 1,\n h: 2,\n x: 0,\n y: 0,\n i: \"panel-0\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 1,\n y: 2,\n i: \"panel-1\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 1,\n y: 3,\n i: \"panel-2\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 2,\n x: 2,\n y: 0,\n i: \"panel-3\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 2,\n h: 2,\n x: 3,\n y: 0,\n i: \"panel-4\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 2,\n h: 2,\n x: 5,\n y: 0,\n i: \"panel-5\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 0,\n y: 2,\n i: \"panel-6\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 0,\n y: 3,\n i: \"panel-7\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 2,\n y: 2,\n i: \"panel-8\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 2,\n y: 3,\n i: \"panel-9\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 2,\n h: 2,\n x: 3,\n y: 2,\n i: \"panel-10\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 7,\n y: 0,\n i: \"panel-11\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 7,\n y: 1,\n i: \"panel-12\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 0,\n y: 10,\n i: \"panel-13\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 0,\n y: 4,\n i: \"panel-14\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 2,\n h: 2,\n x: 5,\n y: 2,\n i: \"panel-15\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 8,\n h: 3,\n x: 0,\n y: 7,\n i: \"panel-16\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 8,\n h: 3,\n x: 0,\n y: 19,\n i: \"panel-19\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 7,\n y: 2,\n i: \"panel-20\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 7,\n y: 3,\n i: \"panel-21\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 4,\n y: 4,\n i: \"panel-22\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 4,\n y: 10,\n i: \"panel-23\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 0,\n y: 13,\n i: \"panel-24\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 4,\n y: 13,\n i: \"panel-25\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 0,\n y: 16,\n i: \"panel-26\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 4,\n y: 16,\n i: \"panel-27\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 1,\n y: 0,\n i: \"panel-28\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 1,\n y: 1,\n i: \"panel-29\",\n minW: 1,\n moved: false,\n static: false,\n },\n];\n\nconst colorsMain = [\n \"#6992B7\",\n \"#E2AD17\",\n \"#22B573\",\n \"#F7655E\",\n \"#0071BC\",\n \"#F9E6C5\",\n \"#A6E8C4\",\n \"#F4CECE\",\n \"#ADD5E0\",\n];\n\nconst niceDaysFromNS = (seconds: string) => {\n return niceDays(seconds, \"ns\");\n};\n\nconst roundNumber = (value: string) => {\n return parseInt(value).toString(10);\n};\n\nexport const panelsConfiguration: IDashboardPanel[] = [\n {\n title: \"Uptime\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-0\",\n labelDisplayFunction: niceDays,\n },\n {\n title: \"Total Online Disks\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-1\",\n },\n {\n title: \"Total Offline Disks\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-2\",\n },\n {\n title: \"Current Usable Capacity\",\n data: [],\n dataOuter: [{ name: \"outer\", value: 100 }],\n widgetConfiguration: {\n outerChart: {\n colorList: [\"#9c9c9c\"],\n innerRadius: 51,\n outerRadius: 54,\n startAngle: -15,\n endAngle: 195,\n },\n innerChart: {\n colorList: colorsMain,\n innerRadius: 35,\n outerRadius: 50,\n startAngle: -15,\n endAngle: 195,\n },\n },\n type: widgetType.pieChart,\n layoutIdentifier: \"panel-3\",\n innerLabel: \"N/A\",\n labelDisplayFunction: niceBytes,\n },\n {\n title: \"Data Usage Growth\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-4\",\n yAxisFormatter: niceBytes,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Object size distribution\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"a\",\n color: colorsMain[0],\n background: {\n fill: \"rgba(0,0,0,0.1)\",\n },\n },\n ],\n customStructure: [\n { originTag: \"LESS_THAN_1024_B\", displayTag: \"Less than 1024B\" },\n {\n originTag: \"BETWEEN_1024_B_AND_1_MB\",\n displayTag: \"Between 1024B and 1MB\",\n },\n {\n originTag: \"BETWEEN_1_MB_AND_10_MB\",\n displayTag: \"Between 1MB and 10MB\",\n },\n {\n originTag: \"BETWEEN_10_MB_AND_64_MB\",\n displayTag: \"Between 10MB and 64MB\",\n },\n {\n originTag: \"BETWEEN_64_MB_AND_128_MB\",\n displayTag: \"Between 64MB and 128MB\",\n },\n {\n originTag: \"BETWEEN_128_MB_AND_512_MB\",\n displayTag: \"Between 128MB and 512MB\",\n },\n {\n originTag: \"GREATER_THAN_512_MB\",\n displayTag: \"Greater than 512MB\",\n },\n ],\n type: widgetType.barChart,\n layoutIdentifier: \"panel-5\",\n },\n {\n title: \"Total Online Servers\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-6\",\n },\n {\n title: \"Total Offline Servers\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-7\",\n },\n {\n title: \"Number of Buckets\",\n data: [],\n innerLabel: \"N/A\",\n type: widgetType.singleRep,\n color: \"#0071BC\",\n fillColor: \"#ADD5E0\",\n layoutIdentifier: \"panel-8\",\n },\n {\n title: \"Number of Objects\",\n data: [],\n innerLabel: \"N/A\",\n type: widgetType.singleRep,\n color: \"#0071BC\",\n fillColor: \"#ADD5E0\",\n layoutIdentifier: \"panel-9\",\n },\n {\n title: \"S3 API Data Received Rate\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-10\",\n xAxisFormatter: getTimeFromTimestamp,\n yAxisFormatter: niceBytes,\n },\n {\n title: \"Total Open FDs\",\n data: [],\n innerLabel: \"N/A\",\n type: widgetType.singleRep,\n layoutIdentifier: \"panel-11\",\n color: \"#22B573\",\n fillColor: \"#A6E8C4\",\n },\n {\n title: \"Total Goroutines\",\n data: [],\n innerLabel: \"N/A\",\n type: widgetType.singleRep,\n layoutIdentifier: \"panel-12\",\n color: \"#F7655E\",\n fillColor: \"#F4CECE\",\n },\n {\n title: \"Node CPU Usage\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-13\",\n yAxisFormatter: roundNumber,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"S3 API Request Rate\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-14\",\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"S3 API Data Sent Rate\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-15\",\n xAxisFormatter: getTimeFromTimestamp,\n yAxisFormatter: niceBytes,\n },\n {\n title: \"Internode Data Transfer\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-16\",\n yAxisFormatter: niceBytes,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Node IO\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-19\",\n yAxisFormatter: niceBytes,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Time Since Last Heal Activity\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-20\",\n labelDisplayFunction: niceDaysFromNS,\n },\n {\n title: \"Time Since Last Scan Activity\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-21\",\n labelDisplayFunction: niceDaysFromNS,\n },\n {\n title: \"S3 API Request Error Rate\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-22\",\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Node Memory Usage\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-23\",\n xAxisFormatter: getTimeFromTimestamp,\n yAxisFormatter: niceBytes,\n },\n {\n title: \"Drive Used Capacity\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-24\",\n xAxisFormatter: getTimeFromTimestamp,\n yAxisFormatter: niceBytes,\n },\n {\n title: \"Drives Free Inodes\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-25\",\n disableYAxis: true,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Node Syscalls\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-26\",\n yAxisFormatter: roundNumber,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Node File Descriptors\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-27\",\n yAxisFormatter: roundNumber,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Total S3 Traffic Inbound\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-28\",\n labelDisplayFunction: niceBytes,\n },\n {\n title: \"Total S3 Traffic Outbound\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-29\",\n labelDisplayFunction: niceBytes,\n },\n];\n\nconst calculateMainValue = (elements: any[], metricCalc: string) => {\n if (elements.length === 0) {\n return [\"\", \"0\"];\n }\n\n switch (metricCalc) {\n case \"mean\":\n const sumValues = elements.reduce((accumulator, currValue) => {\n return accumulator + parseFloat(currValue[1]);\n }, 0);\n\n const mean = Math.floor(sumValues / elements.length);\n\n return [\"\", mean.toString()];\n default:\n const sortResult = elements.sort(\n (value1: any[], value2: any[]) => value1[0] - value2[0]\n );\n\n return sortResult[sortResult.length - 1];\n }\n};\n\nconst constructLabelNames = (metrics: any, legendFormat: string) => {\n const keysToReplace = Object.keys(metrics);\n const expToReplace = new RegExp(`{{(${keysToReplace.join(\"|\")})}}`, \"g\");\n\n const replacedLegend = legendFormat.replace(expToReplace, (matchItem) => {\n const nwMatchItem = matchItem.replace(/({{|}})/g, \"\");\n return metrics[nwMatchItem];\n });\n\n // In case not all the legends were replaced, we remove the placeholders.\n return replacedLegend.replace(/{{(.*?)}}/g, \"\");\n};\n\nexport const getWidgetsWithValue = (payload: any[]) => {\n return panelsConfiguration.map((panelItem) => {\n const payloadData = payload.find(\n (panelT) =>\n panelT.title.toLowerCase().trim() ===\n panelItem.title.toLowerCase().trim()\n );\n\n if (!payloadData) {\n return panelItem;\n }\n\n const typeOfPayload = payloadData.type;\n\n switch (panelItem.type) {\n case widgetType.singleValue:\n if (typeOfPayload === \"stat\" || typeOfPayload === \"singlestat\") {\n // We sort values & get the last value\n let elements = get(payloadData, \"targets[0].result[0].values\", []);\n\n if (elements === null) {\n elements = [];\n }\n\n const metricCalc = get(\n payloadData,\n \"options.reduceOptions.calcs[0]\",\n \"lastNotNull\"\n );\n\n const valueDisplay = calculateMainValue(elements, metricCalc);\n\n const data = panelItem.labelDisplayFunction\n ? panelItem.labelDisplayFunction(valueDisplay[1])\n : valueDisplay[1];\n\n return {\n ...panelItem,\n data,\n };\n }\n break;\n case widgetType.pieChart:\n if (typeOfPayload === \"gauge\") {\n let chartSeries = get(payloadData, \"targets[0].result\", []);\n\n if (chartSeries === null) {\n chartSeries = [];\n }\n\n const metricCalc = get(\n payloadData,\n \"options.reduceOptions.calcs[0]\",\n \"lastNotNull\"\n );\n\n const valuesArray =\n chartSeries.length > 0 ? chartSeries[0].values : [];\n\n const totalValues = calculateMainValue(valuesArray, metricCalc);\n\n const values = chartSeries.map((elementValue: any) => {\n const values = get(elementValue, \"values\", []);\n const metricKeyItem = Object.keys(elementValue.metric);\n\n const sortResult = values.sort(\n (value1: any[], value2: any[]) => value1[0] - value2[0]\n );\n\n const metricName = elementValue.metric[metricKeyItem[0]];\n const value = sortResult[sortResult.length - 1];\n return { name: metricName, value: parseInt(value) };\n });\n\n const innerLabel = panelItem.labelDisplayFunction\n ? panelItem.labelDisplayFunction(totalValues[1])\n : totalValues[1];\n\n return {\n ...panelItem,\n data: values,\n innerLabel,\n };\n }\n break;\n case widgetType.linearGraph:\n if (typeOfPayload === \"graph\") {\n let targets = get(payloadData, \"targets\", []);\n if (targets === null) {\n targets = [];\n }\n\n const series: any[] = [];\n const plotValues: any[] = [];\n\n targets.forEach(\n (\n targetMaster: { legendFormat: string; result: any[] },\n index: number\n ) => {\n // Add a new serie to plot variables in case it is not from multiple values\n let results = get(targetMaster, \"result\", []);\n const legendFormat = targetMaster.legendFormat;\n if (results === null) {\n results = [];\n }\n\n results.forEach((itemVals: { metric: object; values: any[] }) => {\n // Label Creation\n const labelName = constructLabelNames(\n itemVals.metric,\n legendFormat\n );\n const keyName = `key_${index}${labelName}`;\n\n // series creation with recently created label\n series.push({\n dataKey: keyName,\n keyLabel: labelName,\n lineColor: \"\",\n fillColor: \"\",\n });\n\n // we iterate over values and create elements\n let values = get(itemVals, \"values\", []);\n if (values === null) {\n values = [];\n }\n\n values.forEach((valInfo: any[]) => {\n const itemIndex = plotValues.findIndex(\n (element) => element.name === valInfo[0]\n );\n\n // Element not exists yet\n if (itemIndex === -1) {\n let itemToPush: any = { name: valInfo[0] };\n itemToPush[keyName] = valInfo[1];\n\n plotValues.push(itemToPush);\n } else {\n plotValues[itemIndex][keyName] = valInfo[1];\n }\n });\n });\n }\n );\n\n const sortedSeries = series.sort((series1: any, series2: any) => {\n if (series1.keyLabel < series2.keyLabel) {\n return -1;\n }\n if (series1.keyLabel > series2.keyLabel) {\n return 1;\n }\n return 0;\n });\n\n const seriesWithColors = sortedSeries.map(\n (serialC: any, index: number) => {\n return {\n ...serialC,\n lineColor:\n colorsMain[index] || textToRGBColor(serialC.keyLabel),\n fillColor:\n colorsMain[index] || textToRGBColor(serialC.keyLabel),\n };\n }\n );\n\n const sortedVals = plotValues.sort(\n (value1: any, value2: any) => value1.name - value2.name\n );\n\n return {\n ...panelItem,\n widgetConfiguration: seriesWithColors,\n data: sortedVals,\n };\n }\n break;\n case widgetType.barChart:\n if (typeOfPayload === \"bargauge\") {\n let chartBars = get(payloadData, \"targets[0].result\", []);\n\n if (chartBars === null) {\n chartBars = [];\n }\n\n const sortFunction = (value1: any[], value2: any[]) =>\n value1[0] - value2[0];\n\n let values = [];\n if (panelItem.customStructure) {\n values = panelItem.customStructure.map((structureItem) => {\n const metricTake = chartBars.find((element: any) => {\n const metricKeyItem = Object.keys(element.metric);\n\n const metricName = element.metric[metricKeyItem[0]];\n\n return metricName === structureItem.originTag;\n });\n\n const elements = get(metricTake, \"values\", []);\n\n const sortResult = elements.sort(sortFunction);\n const lastValue = sortResult[sortResult.length - 1] || [\"\", \"0\"];\n\n return {\n name: structureItem.displayTag,\n a: parseInt(lastValue[1]),\n };\n });\n } else {\n // If no configuration is set, we construct the series for bar chart and return the element\n values = chartBars.map((elementValue: any) => {\n const metricKeyItem = Object.keys(elementValue.metric);\n\n const metricName = elementValue.metric[metricKeyItem[0]];\n\n const elements = get(elementValue, \"values\", []);\n\n const sortResult = elements.sort(sortFunction);\n const lastValue = sortResult[sortResult.length - 1] || [\"\", \"0\"];\n return { name: metricName, a: parseInt(lastValue[1]) };\n });\n }\n\n return {\n ...panelItem,\n data: values,\n };\n }\n break;\n case widgetType.singleRep:\n if (typeOfPayload === \"stat\") {\n // We sort values & get the last value\n let elements = get(payloadData, \"targets[0].result[0].values\", []);\n if (elements === null) {\n elements = [];\n }\n const metricCalc = get(\n payloadData,\n \"options.reduceOptions.calcs[0]\",\n \"lastNotNull\"\n );\n\n const valueDisplay = calculateMainValue(elements, metricCalc);\n\n const sortResult = elements.sort(\n (value1: any[], value2: any[]) => value1[0] - value2[0]\n );\n\n let valuesForBackground = [];\n\n if (sortResult.length === 1) {\n valuesForBackground.push({ value: 0 });\n }\n\n sortResult.forEach((eachVal: any) => {\n valuesForBackground.push({ value: parseInt(eachVal[1]) });\n });\n\n const innerLabel = panelItem.labelDisplayFunction\n ? panelItem.labelDisplayFunction(valueDisplay[1])\n : valueDisplay[1];\n\n return {\n ...panelItem,\n data: valuesForBackground,\n innerLabel,\n };\n }\n break;\n }\n\n return panelItem;\n });\n};\n\nexport const saveDashboardDistribution = (configuration: Layout[]) => {\n localStorage.setItem(dLocalStorageV, btoa(JSON.stringify(configuration)));\n};\n\nexport const getDashboardDistribution = (currentItems: number) => {\n const storedConfiguration = localStorage.getItem(dLocalStorageV);\n\n if (!storedConfiguration) {\n return defaultWidgetsLayout;\n }\n\n const parsedConfig = JSON.parse(atob(storedConfiguration));\n\n if (\n parsedConfig.length === 0 ||\n (parsedConfig.length > 0 && !parsedConfig[0].minW)\n ) {\n return defaultWidgetsLayout;\n }\n\n // Stored Widgets length is not the same as the currentItems, then we return the new configuration\n if (currentItems !== 0 && parsedConfig.length !== currentItems) {\n return defaultWidgetsLayout;\n }\n\n return parsedConfig;\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 from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\n\ninterface ISingleValueWidget {\n title: string;\n data: string;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n contentContainer: {\n ...widgetCommon.contentContainer,\n fontWeight: 700,\n color: \"#072045\",\n fontSize: 18,\n textAlign: \"center\" as const,\n },\n });\n\nconst SingleValueWidget = ({ title, data, classes }: ISingleValueWidget) => {\n return (\n
\n
{title}
\n
{data}
\n
\n );\n};\n\nexport default withStyles(styles)(SingleValueWidget);\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 from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { getTimeFromTimestamp } from \"../../../../../../common/utils\";\nimport { tooltipCommon } from \"../../../../Common/FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...tooltipCommon,\n });\n\nconst LineChartTooltip = ({\n active,\n payload,\n label,\n linearConfiguration,\n yAxisFormatter,\n classes,\n}: any) => {\n if (active) {\n return (\n
\n
\n {getTimeFromTimestamp(label, true)}\n
\n {payload &&\n payload.map((pl: any, index: number) => {\n return (\n \n \n
\n \n {linearConfiguration[index].keyLabel}:{\" \"}\n {yAxisFormatter(pl.value)}\n \n
\n
\n );\n })}\n \n );\n }\n\n return null;\n};\n\nexport default withStyles(styles)(LineChartTooltip);\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 from \"react\";\nimport {\n Area,\n AreaChart,\n CartesianGrid,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from \"recharts\";\nimport { ILinearGraphConfiguration } from \"./types\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\nimport LineChartTooltip from \"./tooltips/LineChartTooltip\";\n\ninterface ILinearGraphWidget {\n classes: any;\n title: string;\n linearConfiguration: ILinearGraphConfiguration[];\n data: object[];\n hideYAxis?: boolean;\n yAxisFormatter?: (item: string) => string;\n xAxisFormatter?: (item: string) => string;\n panelWidth?: number;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n containerElements: {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"calc(100% - 18px)\",\n },\n chartCont: {\n position: \"relative\",\n flexGrow: 1,\n minHeight: \"65%\",\n height: 1,\n },\n legendChart: {\n display: \"flex\",\n flexWrap: \"wrap\",\n flex: \"0 1 auto\",\n maxHeight: \"35%\",\n margin: 0,\n overflowY: \"auto\",\n position: \"relative\",\n textAlign: \"center\",\n },\n });\n\nconst LinearGraphWidget = ({\n classes,\n title,\n linearConfiguration,\n data,\n hideYAxis = false,\n yAxisFormatter = (item: string) => item,\n xAxisFormatter = (item: string) => item,\n panelWidth = 0,\n}: ILinearGraphWidget) => {\n let intervalCount = 5;\n\n if (panelWidth !== 0) {\n if (panelWidth > 400) {\n intervalCount = 5;\n } else if (panelWidth > 350) {\n intervalCount = 10;\n } else if (panelWidth > 300) {\n intervalCount = 15;\n } else if (panelWidth > 250) {\n intervalCount = 20;\n } else {\n intervalCount = 30;\n }\n }\n return (\n
\n
{title}
\n
\n
\n \n \n \n xAxisFormatter(value)}\n interval={intervalCount}\n tick={{ fontSize: \"70%\" }}\n tickCount={10}\n />\n dataMax * 4]}\n hide={hideYAxis}\n tickFormatter={(value: any) => yAxisFormatter(value)}\n tick={{ fontSize: \"70%\" }}\n />\n {linearConfiguration.map((section, index) => {\n return (\n \n );\n })}\n \n }\n wrapperStyle={{\n zIndex: 5000,\n }}\n />\n \n \n
\n
\n {linearConfiguration.map((section, index) => {\n return (\n \n \n
{section.keyLabel}
\n
\n );\n })}\n
\n
\n \n );\n};\n\nexport default withStyles(styles)(LinearGraphWidget);\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 from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { tooltipCommon } from \"../../../../Common/FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...tooltipCommon,\n });\n\nconst BarChartTooltip = ({\n active,\n payload,\n label,\n barChartConfiguration,\n classes,\n}: any) => {\n if (active) {\n return (\n
\n
{label}
\n {payload &&\n payload.map((pl: any, index: number) => {\n return (\n \n \n
\n {pl.value}\n
\n
\n );\n })}\n \n );\n }\n\n return null;\n};\n\nexport default withStyles(styles)(BarChartTooltip);\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 from \"react\";\nimport {\n Bar,\n BarChart,\n ResponsiveContainer,\n XAxis,\n YAxis,\n Tooltip,\n} from \"recharts\";\nimport { IBarChartConfiguration } from \"./types\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\nimport BarChartTooltip from \"./tooltips/BarChartTooltip\";\n\ninterface IBarChartWidget {\n classes: any;\n title: string;\n barChartConfiguration: IBarChartConfiguration[];\n data: object[];\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n });\n\nconst CustomizedAxisTick = ({ x, y, payload }: any) => {\n return (\n \n {payload.value}\n \n );\n};\n\nconst BarChartWidget = ({\n classes,\n title,\n barChartConfiguration,\n data,\n}: IBarChartWidget) => {\n return (\n
\n
{title}
\n
\n \n \n \n }\n tickLine={false}\n axisLine={false}\n width={150}\n />\n {barChartConfiguration.map((bar) => (\n \n ))}\n \n }\n />\n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(BarChartWidget);\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 from \"react\";\nimport get from \"lodash/get\";\nimport { Cell, Pie, PieChart, ResponsiveContainer } from \"recharts\";\nimport { IPieChartConfiguration } from \"./types\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\n\ninterface IPieChartWidget {\n classes: any;\n title: string;\n pieChartConfiguration: IPieChartConfiguration;\n dataInner: object[];\n dataOuter?: object[];\n middleLabel?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n });\n\nconst PieChartWidget = ({\n classes,\n title,\n pieChartConfiguration,\n dataInner,\n dataOuter,\n middleLabel = \"\",\n}: IPieChartWidget) => {\n const innerColors = get(pieChartConfiguration, \"innerChart.colorList\", []);\n const outerColors = get(pieChartConfiguration, \"outerChart.colorList\", []);\n\n return (\n
\n
{title}
\n
\n \n \n {dataOuter && (\n \n {dataOuter.map((entry, index) => (\n \n ))}\n \n )}\n {dataInner && (\n \n {dataInner.map((entry, index) => {\n return (\n \n );\n })}\n \n )}\n {middleLabel && (\n \n {middleLabel}\n \n )}\n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(PieChartWidget);\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 from \"react\";\nimport { Area, AreaChart, ResponsiveContainer, YAxis } from \"recharts\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { IDataSRep } from \"./types\";\n\ninterface ISingleRepWidget {\n classes: any;\n title: string;\n data: IDataSRep[];\n color: string;\n fillColor: string;\n label: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n });\n\nconst SingleRepWidget = ({\n classes,\n title,\n data,\n color,\n fillColor,\n label,\n}: ISingleRepWidget) => {\n return (\n
\n
{title}
\n
\n \n \n dataMax * 2]} hide={true} />\n \n \n {label}\n \n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(SingleRepWidget);\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 from \"react\";\nimport MomentUtils from \"@date-io/moment\";\nimport { DateTimePicker, MuiPickersUtilsProvider } from \"@material-ui/pickers\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport ScheduleIcon from \"@material-ui/icons/Schedule\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\n\ninterface IDateTimePicker {\n value: any;\n onChange: (value: any) => any;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n dateSelectorOverride: {\n height: 40,\n border: \"#EAEDEE 1px solid\",\n marginLeft: 15,\n backgroundColor: \"#fff\",\n padding: \"0 16px\",\n borderRadius: 5,\n \"&.MuiInput-underline:hover:not(.Mui-disabled):before\": {\n borderBottom: 0,\n },\n \"&:hover\": {\n borderColor: \"#000\",\n \"&:before, &:after\": {\n borderColor: \"transparent\",\n borderBottom: 0,\n },\n },\n \"&:before, &:after\": {\n borderColor: \"transparent\",\n borderBottom: 0,\n },\n \"& input\": {\n fontSize: 12,\n fontWeight: 600,\n color: \"#393939\",\n },\n },\n parentDateOverride: {\n flexGrow: 1,\n },\n });\n\nconst DateTimePickerWrapper = ({\n value,\n onChange,\n classes,\n}: IDateTimePicker) => {\n return (\n \n \n \n \n ),\n className: classes.dateSelectorOverride,\n }}\n label=\"\"\n ampm={false}\n variant={\"inline\"}\n className={classes.parentDateOverride}\n format=\"MMMM Do YYYY, h:mm a\"\n />\n \n );\n};\n\nexport default withStyles(styles)(DateTimePickerWrapper);\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst SyncIcon = () => {\n return (\n \n \n \n \n \n );\n};\n\nexport default SyncIcon;\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, { useEffect, useState, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport ReactGridLayout from \"react-grid-layout\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button } from \"@material-ui/core\";\nimport {\n actionsTray,\n containerForHeader,\n} from \"../../Common/FormComponents/common/styleLibrary\";\n\nimport { AutoSizer } from \"react-virtualized\";\nimport {\n IBarChartConfiguration,\n IDataSRep,\n ILinearGraphConfiguration,\n IPieChartConfiguration,\n} from \"./Widgets/types\";\nimport { IDashboardPanel, widgetType } from \"./types\";\nimport {\n getDashboardDistribution,\n getWidgetsWithValue,\n panelsConfiguration,\n saveDashboardDistribution,\n} from \"./utils\";\n\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport SingleValueWidget from \"./Widgets/SingleValueWidget\";\nimport LinearGraphWidget from \"./Widgets/LinearGraphWidget\";\nimport BarChartWidget from \"./Widgets/BarChartWidget\";\nimport PieChartWidget from \"./Widgets/PieChartWidget\";\nimport SingleRepWidget from \"./Widgets/SingleRepWidget\";\nimport DateTimePickerWrapper from \"../../Common/FormComponents/DateTimePickerWrapper/DateTimePickerWrapper\";\nimport api from \"../../../../common/api\";\nimport SyncIcon from \"../../../../icons/SyncIcon\";\n\ninterface IPrDashboard {\n classes: any;\n displayErrorMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...actionsTray,\n ...containerForHeader(theme.spacing(4)),\n widgetsContainer: {\n height: \"calc(100vh - 250px)\",\n paddingBottom: 235,\n },\n syncButton: {\n \"&.MuiButton-root .MuiButton-iconSizeMedium > *:first-child\": {\n fontSize: 18,\n },\n },\n actionsTray: {\n ...actionsTray.actionsTray,\n padding: \"0 10px\",\n },\n });\n\nconst PrDashboard = ({ classes, displayErrorMessage }: IPrDashboard) => {\n const [timeStart, setTimeStart] = useState(null);\n const [timeEnd, setTimeEnd] = useState(null);\n const [loading, setLoading] = useState(true);\n const [panelInformation, setPanelInformation] = useState(\n panelsConfiguration\n );\n\n const minHeight = 600;\n const colsInGrid = 8;\n const xSpacing = 10;\n const ySpacing = 10;\n\n const dashboardDistr = getDashboardDistribution(panelInformation.length);\n\n const autoSizerStyleProp = {\n width: \"100%\",\n height: \"auto\",\n paddingBottom: 45,\n };\n\n const panels = useCallback(\n (width: number) => {\n const singlePanelWidth = width / colsInGrid + xSpacing / 2;\n\n const componentToUse = (value: IDashboardPanel, index: number) => {\n switch (value.type) {\n case widgetType.singleValue:\n return (\n \n );\n case widgetType.pieChart:\n return (\n \n );\n case widgetType.linearGraph:\n return (\n \n );\n case widgetType.barChart:\n return (\n \n );\n case widgetType.singleRep:\n const fillColor = value.fillColor ? value.fillColor : value.color;\n return (\n \n );\n default:\n return null;\n }\n };\n\n return panelInformation.map((val, index) => {\n return (\n
{componentToUse(val, index)}
\n );\n });\n },\n [panelInformation, dashboardDistr]\n );\n\n const fetchUsage = useCallback(() => {\n let stepCalc = 0;\n\n if (timeStart !== null && timeEnd !== null) {\n const secondsInPeriod = timeEnd.unix() - timeStart.unix();\n const periods = Math.floor(secondsInPeriod / 60);\n\n stepCalc = periods < 1 ? 15 : periods;\n }\n\n api\n .invoke(\n \"GET\",\n `/api/v1/admin/info?step=${stepCalc}&${\n timeStart !== null ? `&start=${timeStart.unix()}` : \"\"\n }${timeStart !== null && timeEnd !== null ? \"&\" : \"\"}${\n timeEnd !== null ? `end=${timeEnd.unix()}` : \"\"\n }`\n )\n .then((res: any) => {\n if (res.widgets) {\n const widgetsWithValue = getWidgetsWithValue(res.widgets);\n setPanelInformation(widgetsWithValue);\n } else {\n displayErrorMessage(\n \"Widget information could not be retrieved at this time. Please try again\"\n );\n }\n\n setLoading(false);\n })\n .catch((err) => {\n displayErrorMessage(err);\n setLoading(false);\n });\n }, [timeStart, timeEnd, displayErrorMessage]);\n\n const triggerLoad = () => {\n setLoading(true);\n };\n\n useEffect(() => {\n if (loading) {\n fetchUsage();\n }\n }, [loading, fetchUsage]);\n\n return (\n \n \n Start Time\n \n End Time\n \n }\n className={classes.syncButton}\n >\n Sync\n \n \n \n \n {({ width, height }: any) => {\n let hpanel = height < minHeight ? minHeight : height;\n if (hpanel > 380) {\n hpanel = 480;\n }\n const totalWidth = width > 1920 ? 1920 : width;\n return (\n \n {panels(width)}\n \n );\n }}\n \n \n
\n );\n};\n\nconst connector = connect(null, {\n displayErrorMessage: setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(PrDashboard));\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst AllBucketsIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default AllBucketsIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst EgressIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default EgressIcon;\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\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport clsx from \"clsx\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { Usage } from \"../types\";\nimport { niceBytes } from \"../../../../common/utils\";\nimport { containerForHeader } from \"../../Common/FormComponents/common/styleLibrary\";\nimport AllBucketsIcon from \"../../../../icons/AllBucketsIcon\";\nimport UsageIcon from \"../../../../icons/UsageIcon\";\nimport EgressIcon from \"../../../../icons/EgressIcon\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...containerForHeader(theme.spacing(4)),\n paper: {\n padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n border: \"#eaedee 1px solid\",\n borderRadius: 5,\n boxShadow: \"none\",\n },\n fixedHeight: {\n height: 165,\n minWidth: 247,\n marginRight: 20,\n padding: \"25px 28px\",\n \"& svg\": {\n maxHeight: 18,\n },\n },\n consumptionValue: {\n color: \"#000000\",\n fontSize: \"60px\",\n fontWeight: \"bold\",\n },\n icon: {\n marginRight: 10,\n color: \"#777777\",\n },\n notationContainer: {\n display: \"flex\",\n },\n dashboardBG: {\n width: 390,\n height: 255,\n zIndex: 500,\n position: \"absolute\",\n backgroundSize: \"fill\",\n backgroundImage: \"url(/images/BG_IllustrationDarker.svg)\",\n backgroundPosition: \"right bottom\",\n right: 0,\n bottom: 0,\n backgroundRepeat: \"no-repeat\",\n },\n dashboardContainer: {\n zIndex: 600,\n position: \"absolute\",\n },\n elementTitle: {\n fontWeight: 500,\n color: \"#777777\",\n fontSize: 14,\n marginTop: -9,\n },\n smallUnit: {\n fontSize: 20,\n },\n });\n\ninterface IDashboardProps {\n classes: any;\n usage: Usage | null;\n}\n\nconst BasicDashboard = ({ classes, usage }: IDashboardProps) => {\n const fixedHeightPaper = clsx(classes.paper, classes.fixedHeight);\n\n const prettyUsage = (usage: string | undefined) => {\n if (usage === undefined) {\n return \"0\";\n }\n\n const niceBytesUsage = niceBytes(usage).split(\" \");\n\n if (niceBytesUsage.length !== 2) {\n return niceBytesUsage.join(\" \");\n }\n\n return (\n \n {niceBytesUsage[0]}\n {niceBytesUsage[1]}\n \n );\n };\n\n const prettyNumber = (usage: number | undefined) => {\n if (usage === undefined) {\n return 0;\n }\n\n return usage.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n };\n\n return (\n \n
\n \n \n \n \n \n \n \n \n \n \n All buckets\n \n \n \n \n {usage ? prettyNumber(usage.buckets) : 0}\n \n \n \n \n \n \n \n \n \n Usage\n \n \n \n \n {usage ? prettyUsage(usage.usage + \"\") : 0}\n \n \n \n \n \n \n \n \n \n {\" \"}\n Total Objects\n \n \n \n \n {usage ? prettyNumber(usage.objects) : 0}\n \n \n \n \n \n \n );\n};\n\nexport default withStyles(styles)(BasicDashboard);\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, { useEffect, useState, Fragment, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport PrDashboard from \"./Prometheus/PrDashboard\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport BasicDashboard from \"./BasicDashboard/BasicDashboard\";\nimport { LinearProgress } from \"@material-ui/core\";\nimport api from \"../../../common/api\";\nimport { Usage } from \"./types\";\nimport { setErrorSnackMessage } from \"../../../actions\";\n\ninterface IDashboardSimple {\n classes: any;\n displayErrorMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst Dashboard = ({ classes, displayErrorMessage }: IDashboardSimple) => {\n const [loading, setLoading] = useState(true);\n const [basicResult, setBasicResult] = useState(null);\n\n const fetchUsage = useCallback(() => {\n api\n .invoke(\"GET\", `/api/v1/admin/info`)\n .then((res: Usage) => {\n setBasicResult(res);\n setLoading(false);\n })\n .catch((err) => {\n displayErrorMessage(err);\n setLoading(false);\n });\n }, [setBasicResult, setLoading, displayErrorMessage]);\n\n useEffect(() => {\n if (loading) {\n fetchUsage();\n }\n }, [loading, fetchUsage]);\n\n const widgets = get(basicResult, \"widgets\", null);\n\n return (\n \n \n \n {loading ? (\n \n \n \n ) : (\n \n {widgets !== null ? (\n \n ) : (\n \n )}\n \n )}\n \n \n );\n};\n\nconst connector = connect(null, {\n displayErrorMessage: setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(Dashboard));\n","export default __webpack_public_path__ + \"static/media/minio_console_logo.0837460e.svg\";","export default __webpack_public_path__ + \"static/media/minio_operator_logo.1312b7c9.svg\";","// 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\nexport const menuGroups = [\n { label: \"\", group: \"common\", collapsible: false },\n { label: \"User\", group: \"User\", collapsible: true },\n { label: \"Admin\", group: \"Admin\", collapsible: true },\n { label: \"Tools\", group: \"Tools\", collapsible: true },\n { label: \"Operator\", group: \"Operator\", collapsible: false },\n { label: \"\", group: \"License\", collapsible: false },\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst LicenseIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default LicenseIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst LogoutIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default LogoutIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst ConsoleIcon = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default ConsoleIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst HealIcon = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default HealIcon;\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { NavLink } from \"react-router-dom\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport ListItemIcon from \"@material-ui/core/ListItemIcon\";\nimport DescriptionIcon from \"@material-ui/icons/Description\";\nimport Collapse from \"@material-ui/core/Collapse\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport List from \"@material-ui/core/List\";\nimport { Divider, withStyles } from \"@material-ui/core\";\nimport { createStyles, Theme } from \"@material-ui/core/styles\";\nimport history from \"../../../history\";\nimport logo from \"../../../icons/minio_console_logo.svg\";\nimport operator_logo from \"../../../icons/minio_operator_logo.svg\";\nimport { AppState } from \"../../../store\";\nimport { userLoggedIn } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport { menuGroups } from \"./utils\";\nimport { IMenuProps, IMenuItem } from \"./types\";\nimport {\n BucketsIcon,\n ClustersIcon,\n ConfigurationsListIcon,\n DashboardIcon,\n GroupsIcon,\n IAMPoliciesIcon,\n ServiceAccountsIcon,\n TraceIcon,\n UsersIcon,\n} from \"../../../icons\";\nimport LibraryBooksIcon from \"@material-ui/icons/LibraryBooks\";\nimport { clearSession } from \"../../../common/utils\";\nimport LicenseIcon from \"../../../icons/LicenseIcon\";\nimport LogoutIcon from \"../../../icons/LogoutIcon\";\nimport ConsoleIcon from \"../../../icons/ConsoleIcon\";\nimport HealIcon from \"../../../icons/HealIcon\";\nimport WatchIcon from \"../../../icons/WatchIcon\";\nimport TrackChangesSharpIcon from \"@material-ui/icons/TrackChangesSharp\";\nimport StorageIcon from \"@material-ui/icons/Storage\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n logo: {\n paddingTop: 25,\n marginBottom: 30,\n paddingLeft: 45,\n \"& img\": {\n width: 120,\n },\n },\n menuList: {\n \"& .active\": {\n borderTopLeftRadius: 2,\n borderBottomLeftRadius: 2,\n color: \"#fff\",\n backgroundColor: \"rgba(255, 255, 255, .18)\",\n \"& .MuiSvgIcon-root\": {\n color: \"white\",\n },\n \"& .MuiTypography-root\": {\n color: \"#fff\",\n fontWeight: 700,\n },\n },\n \"& .MuiSvgIcon-root\": {\n fontSize: 16,\n color: \"rgba(255, 255, 255, 0.8)\",\n maxWidth: 14,\n },\n \"& .MuiListItemIcon-root\": {\n minWidth: 25,\n },\n \"& .MuiTypography-root\": {\n fontSize: 12,\n color: \"rgba(255, 255, 255, 0.8)\",\n },\n \"& .MuiListItem-gutters\": {\n paddingRight: 0,\n fontWeight: 300,\n },\n \"& .MuiListItem-root\": {\n padding: \"2px 0 2px 16px\",\n marginBottom: 8,\n marginLeft: 30,\n width: \"calc(100% - 30px)\",\n },\n \"& .MuiCollapse-container .MuiCollapse-wrapper .MuiCollapse-wrapperInner .MuiDivider-root\": {\n backgroundColor: \"rgba(112,112,112,0.5)\",\n marginBottom: 12,\n height: 1,\n },\n },\n extraMargin: {\n \"&.MuiListItem-gutters\": {\n marginLeft: 5,\n },\n },\n groupTitle: {\n color: \"#fff\",\n fontSize: 10,\n textTransform: \"uppercase\",\n fontWeight: 700,\n marginBottom: 3,\n cursor: \"pointer\",\n userSelect: \"none\",\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n subTitleMenu: {\n fontWeight: 700,\n marginLeft: 10,\n \"&.MuiTypography-root\": {\n fontSize: 13,\n color: \"#fff\",\n },\n },\n selectorArrow: {\n marginRight: 20,\n marginTop: 1,\n display: \"inline-block\",\n width: 0,\n height: 0,\n borderStyle: \"solid\",\n borderWidth: \"4px 4px 0 4px\",\n borderColor:\n \"rgba(255, 255, 255, .29) transparent transparent transparent\",\n transform: \"rotateZ(0deg)\",\n transitionDuration: \"0.2s\",\n },\n selectorArrowOpen: {\n transform: \"rotateZ(180deg)\",\n },\n });\n\nconst mapState = (state: AppState) => ({\n open: state.system.loggedIn,\n operatorMode: state.system.operatorMode,\n});\n\nconst connector = connect(mapState, { userLoggedIn });\n\n// Menu State builder for groups\nconst menuStateBuilder = () => {\n let elements: any = [];\n menuGroups.forEach((menuItem) => {\n if (menuItem.collapsible) {\n elements[menuItem.group] = true;\n }\n });\n\n return elements;\n};\n\nconst Menu = ({ userLoggedIn, classes, pages, operatorMode }: IMenuProps) => {\n const [menuOpen, setMenuOpen] = useState(menuStateBuilder());\n\n const logout = () => {\n const deleteSession = () => {\n clearSession();\n userLoggedIn(false);\n localStorage.setItem(\"userLoggedIn\", \"\");\n\n history.push(\"/login\");\n };\n api\n .invoke(\"POST\", `/api/v1/logout`)\n .then(() => {\n deleteSession();\n })\n .catch((err: any) => {\n console.log(err);\n deleteSession();\n });\n };\n\n let menuItems: IMenuItem[] = [\n {\n group: \"common\",\n type: \"item\",\n component: NavLink,\n to: \"/dashboard\",\n name: \"Dashboard\",\n icon: ,\n },\n {\n group: \"User\",\n type: \"item\",\n component: NavLink,\n to: \"/object-browser\",\n name: \"Object Browser\",\n icon: ,\n },\n {\n group: \"User\",\n type: \"item\",\n component: NavLink,\n to: \"/account\",\n name: \"Account\",\n icon: ,\n },\n {\n group: \"Admin\",\n type: \"item\",\n component: NavLink,\n to: \"/buckets\",\n name: \"Buckets\",\n icon: ,\n },\n {\n group: \"Admin\",\n type: \"item\",\n component: NavLink,\n to: \"/users\",\n name: \"Users\",\n icon: ,\n },\n {\n group: \"Admin\",\n type: \"item\",\n component: NavLink,\n to: \"/groups\",\n name: \"Groups\",\n icon: ,\n },\n {\n group: \"Admin\",\n type: \"item\",\n component: NavLink,\n to: \"/policies\",\n name: \"IAM Policies\",\n icon: ,\n },\n {\n group: \"Tools\",\n type: \"item\",\n component: NavLink,\n to: \"/logs\",\n name: \"Logs\",\n icon: ,\n },\n {\n group: \"Tools\",\n type: \"item\",\n component: NavLink,\n to: \"/watch\",\n name: \"Watch\",\n icon: ,\n },\n {\n group: \"Tools\",\n type: \"item\",\n component: NavLink,\n to: \"/trace\",\n name: \"Trace\",\n icon: ,\n },\n {\n group: \"Tools\",\n type: \"item\",\n component: NavLink,\n to: \"/heal\",\n name: \"Heal\",\n icon: ,\n },\n {\n group: \"Tools\",\n type: \"item\",\n component: NavLink,\n to: \"/health-info\",\n name: \"Diagnostic\",\n icon: ,\n },\n {\n group: \"Admin\",\n type: \"item\",\n component: NavLink,\n to: \"/settings\",\n name: \"Settings\",\n icon: ,\n },\n {\n group: \"Operator\",\n type: \"item\",\n component: NavLink,\n to: \"/tenants\",\n name: \"Tenants\",\n icon: ,\n },\n {\n group: \"Operator\",\n type: \"item\",\n component: NavLink,\n to: \"/storage\",\n name: \"Storage\",\n icon: ,\n },\n ];\n\n const allowedPages = pages.reduce((result: any, item: any) => {\n result[item] = true;\n return result;\n }, {});\n\n const documentation: IMenuItem = {\n group: \"License\",\n type: \"item\",\n component: NavLink,\n to: \"/documentation\",\n name: \"Documentation\",\n icon: ,\n forceDisplay: true,\n };\n\n // Append the license page according to the allowedPages\n if (allowedPages.hasOwnProperty(\"/tenants\")) {\n menuItems.push(\n {\n group: \"Operator\",\n type: \"item\",\n component: NavLink,\n to: \"/license\",\n name: \"License\",\n icon: ,\n },\n {\n ...documentation,\n group: \"Operator\",\n onClick: (\n e:\n | React.MouseEvent\n | React.MouseEvent\n | React.MouseEvent\n ) => {\n e.preventDefault();\n window.open(\n `https://docs.min.io/?ref=${operatorMode ? \"op\" : \"con\"}`,\n \"_blank\"\n );\n },\n }\n );\n } else {\n menuItems.push(\n {\n group: \"License\",\n type: \"item\",\n component: NavLink,\n to: \"/license\",\n name: \"License\",\n icon: ,\n },\n {\n ...documentation,\n group: \"License\",\n onClick: (\n e:\n | React.MouseEvent\n | React.MouseEvent\n | React.MouseEvent\n ) => {\n e.preventDefault();\n window.open(\n `https://docs.min.io/?ref=${operatorMode ? \"op\" : \"con\"}`,\n \"_blank\"\n );\n },\n }\n );\n }\n\n const allowedItems = menuItems.filter(\n (item: any) =>\n allowedPages[item.to] || item.forceDisplay || item.type !== \"item\"\n );\n\n const setMenuCollapse = (menuClicked: string) => {\n let newMenu: any = { ...menuOpen };\n\n newMenu[menuClicked] = !newMenu[menuClicked];\n\n setMenuOpen(newMenu);\n };\n\n return (\n \n
\n \"logo\"\n
\n \n {menuGroups.map((groupMember, index) => {\n const filterByGroup = (allowedItems || []).filter(\n (item: any) => item.group === groupMember.group\n );\n\n const countableElements = filterByGroup.filter(\n (menuItem: any) => menuItem.type !== \"title\"\n );\n\n if (countableElements.length === 0) {\n return null;\n }\n\n return (\n \n {groupMember.label !== \"\" && (\n {\n if (groupMember.collapsible) {\n setMenuCollapse(groupMember.group);\n }\n }}\n >\n {groupMember.label}\n {groupMember.collapsible && (\n \n )}\n \n )}\n \n {filterByGroup.map((page: IMenuItem) => {\n switch (page.type) {\n case \"item\": {\n return (\n \n {page.icon && (\n {page.icon}\n )}\n {page.name && }\n \n );\n }\n case \"title\": {\n return (\n \n {page.name}\n \n );\n }\n default:\n return null;\n }\n })}\n \n \n \n );\n })}\n\n \n \n \n \n \n \n \n
\n );\n};\n\nexport default connector(withStyles(styles)(Menu));\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, { useEffect, useState } from \"react\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport api from \"../../../common/api\";\nimport { NewServiceAccount } from \"../Common/CredentialsPrompt/types\";\nimport CodeMirrorWrapper from \"../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport { connect } from \"react-redux\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n jsonPolicyEditor: {\n minHeight: 400,\n width: \"100%\",\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n infoDetails: {\n color: \"#393939\",\n fontSize: 12,\n fontStyle: \"italic\",\n marginBottom: \"8px\",\n },\n containerScrollable: {\n maxHeight: \"calc(100vh - 300px)\" as const,\n overflowY: \"auto\" as const,\n },\n ...modalBasic,\n });\n\ninterface IAddServiceAccountProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (res: NewServiceAccount | null) => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst AddServiceAccount = ({\n classes,\n open,\n closeModalAndRefresh,\n setModalErrorSnackMessage,\n}: IAddServiceAccountProps) => {\n const [addSending, setAddSending] = useState(false);\n const [policyDefinition, setPolicyDefinition] = useState(\"\");\n const [isRestrictedByPolicy, setIsRestrictedByPolicy] =\n useState(false);\n\n useEffect(() => {\n if (addSending) {\n api\n .invoke(\"POST\", \"/api/v1/service-accounts\", {\n policy: policyDefinition,\n })\n .then((res) => {\n setAddSending(false);\n closeModalAndRefresh(res);\n })\n .catch((err) => {\n setAddSending(false);\n setModalErrorSnackMessage(err);\n });\n }\n }, [\n addSending,\n setAddSending,\n setModalErrorSnackMessage,\n policyDefinition,\n closeModalAndRefresh,\n ]);\n\n const addServiceAccount = (e: React.FormEvent) => {\n e.preventDefault();\n setAddSending(true);\n };\n\n const resetForm = () => {\n setPolicyDefinition(\"\");\n };\n\n return (\n {\n closeModalAndRefresh(null);\n }}\n title={`Create Service Account`}\n >\n ) => {\n addServiceAccount(e);\n }}\n >\n \n \n
\n Service Accounts inherit the policy explicitly attached to the\n parent user and the policy attached to each group in which the\n parent user has membership. You can specify an optional\n JSON-formatted policy below to restrict the Service Account access\n to a subset of actions and resources explicitly allowed for the\n parent user. You cannot modify the Service Account optional policy\n after saving.\n
\n
\n \n ) => {\n setIsRestrictedByPolicy(event.target.checked);\n }}\n label={\"Restrict with policy\"}\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n {isRestrictedByPolicy && (\n \n {\n setPolicyDefinition(value);\n }}\n />\n \n )}\n
\n \n \n \n Clear\n \n \n Create\n \n \n {addSending && (\n \n \n \n )}\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddServiceAccount));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n wrapText: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n });\n\ninterface IDeleteServiceAccountProps {\n classes: any;\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedServiceAccount: string | null;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteServiceAccount = ({\n classes,\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedServiceAccount,\n setErrorSnackMessage,\n}: IDeleteServiceAccountProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n\n useEffect(() => {\n if (deleteLoading) {\n api\n .invoke(\"DELETE\", `/api/v1/service-accounts/${selectedServiceAccount}`)\n .then(() => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n }\n }, [\n deleteLoading,\n closeDeleteModalAndRefresh,\n selectedServiceAccount,\n setErrorSnackMessage,\n ]);\n\n const removeRecord = () => {\n if (selectedServiceAccount == null) {\n return;\n }\n\n setDeleteLoading(true);\n };\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete ServiceAccount\n \n {deleteLoading && }\n \n Are you sure you want to delete service account{\" \"}\n {selectedServiceAccount}?\n \n \n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(DeleteServiceAccount));\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 from \"react\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { NewServiceAccount } from \"./types\";\nimport { Button } from \"@material-ui/core\";\nimport Typography from \"@material-ui/core/Typography\";\nimport ModalWrapper from \"../ModalWrapper/ModalWrapper\";\nimport Grid from \"@material-ui/core/Grid\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n warningBlock: {\n color: \"red\",\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n credentialsPanel: {\n overflowY: \"auto\",\n maxHeight: 350,\n },\n });\n\ninterface ICredentialsPromptProps {\n classes: any;\n newServiceAccount: NewServiceAccount | null;\n open: boolean;\n entity: string;\n closeModal: () => void;\n}\n\nconst download = (filename: string, text: string) => {\n let element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:text/plain;charset=utf-8,\" + encodeURIComponent(text)\n );\n element.setAttribute(\"download\", filename);\n\n element.style.display = \"none\";\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n};\n\nconst CredentialsPrompt = ({\n classes,\n newServiceAccount,\n open,\n closeModal,\n entity,\n}: ICredentialsPromptProps) => {\n if (!newServiceAccount) {\n return null;\n }\n\n const consoleCreds = get(newServiceAccount, \"console\", null);\n\n return (\n {\n closeModal();\n }}\n title={`New ${entity} Created`}\n >\n \n \n \n A new {entity} has been created with the following details:\n {consoleCreds && (\n \n \n Console Credentials\n {Array.isArray(consoleCreds) &&\n consoleCreds.map((credentialsPair, index) => {\n return (\n
    \n
  • \n Access Key: {credentialsPair.accessKey}\n
  • \n
  • \n Secret Key: {credentialsPair.secretKey}\n
  • \n
\n );\n })}\n {!Array.isArray(consoleCreds) && (\n
    \n
  • \n Access Key: {consoleCreds.accessKey}\n
  • \n
  • \n Secret Key: {consoleCreds.secretKey}\n
  • \n
\n )}\n
\n
\n )}\n \n Write these down, as this is the only time the secret will be\n displayed.\n \n
\n \n {\n let consoleExtras = {};\n\n if (consoleCreds) {\n if (!Array.isArray(consoleCreds)) {\n consoleExtras = {\n console: [\n {\n access_key: consoleCreds.accessKey,\n secret_key: consoleCreds.secretKey,\n },\n ],\n };\n } else {\n const cCreds = consoleCreds.map((itemMap) => {\n return {\n access_key: itemMap.accessKey,\n secret_key: itemMap.secretKey,\n };\n });\n\n consoleExtras = {\n console: [...cCreds],\n };\n }\n }\n\n download(\n \"credentials.json\",\n JSON.stringify({\n ...consoleExtras,\n })\n );\n }}\n color=\"primary\"\n >\n Download\n \n {\n closeModal();\n }}\n color=\"secondary\"\n autoFocus\n >\n Done\n \n \n
\n
\n \n );\n};\n\nexport default withStyles(styles)(CredentialsPrompt);\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\ninterface userInterface {\n accessKey: string;\n}\n\ninterface policyInterface {\n name: string;\n}\n\nexport const usersSort = (a: userInterface, b: userInterface) => {\n if (a.accessKey > b.accessKey) {\n return 1;\n }\n if (a.accessKey < b.accessKey) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policySort = (a: policyInterface, b: policyInterface) => {\n if (a.name > b.name) {\n return 1;\n }\n if (a.name < b.name) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const stringSort = (a: string, b: string) => {\n if (a > b) {\n return 1;\n }\n if (a < b) {\n return -1;\n }\n // a must be equal to b\n return 0;\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport {\n actionsTray,\n containerForHeader,\n modalBasic,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { ChangePasswordRequest } from \"../Buckets/types\";\nimport api from \"../../../common/api\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...actionsTray,\n ...modalBasic,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IChangePasswordProps {\n classes: any;\n open: boolean;\n closeModal: () => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst ChangePassword = ({\n classes,\n open,\n closeModal,\n setModalErrorSnackMessage,\n}: IChangePasswordProps) => {\n const [currentPassword, setCurrentPassword] = useState(\"\");\n const [newPassword, setNewPassword] = useState(\"\");\n const [reNewPassword, setReNewPassword] = useState(\"\");\n const [loading, setLoading] = useState(false);\n\n const changePassword = (event: React.FormEvent) => {\n event.preventDefault();\n\n if (newPassword !== reNewPassword) {\n setModalErrorSnackMessage(\"New passwords don't match\");\n return;\n }\n\n if (loading) {\n return;\n }\n setLoading(true);\n\n let request: ChangePasswordRequest = {\n current_secret_key: currentPassword,\n new_secret_key: newPassword,\n };\n\n api\n .invoke(\"POST\", \"/api/v1/account/change-password\", request)\n .then((res) => {\n setLoading(false);\n setNewPassword(\"\");\n setReNewPassword(\"\");\n setCurrentPassword(\"\");\n closeModal();\n })\n .catch((err) => {\n setLoading(false);\n setNewPassword(\"\");\n setReNewPassword(\"\");\n setCurrentPassword(\"\");\n setModalErrorSnackMessage(err);\n });\n };\n\n return open ? (\n {\n setNewPassword(\"\");\n setReNewPassword(\"\");\n setCurrentPassword(\"\");\n closeModal();\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n ) => {\n changePassword(e);\n }}\n >\n \n \n \n ) => {\n setCurrentPassword(event.target.value);\n }}\n label=\"Current Password\"\n type=\"password\"\n value={currentPassword}\n />\n \n \n ) => {\n setNewPassword(event.target.value);\n }}\n label=\"New Password\"\n type=\"password\"\n value={newPassword}\n />\n \n \n ) => {\n setReNewPassword(event.target.value);\n }}\n label=\"Type New Password Again\"\n type=\"password\"\n value={reNewPassword}\n />\n \n \n \n 0 &&\n newPassword.length > 0 &&\n reNewPassword.length > 0\n )\n }\n >\n Save\n \n \n {loading && (\n \n \n \n )}\n \n \n \n ) : null;\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ChangePassword));\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, { useState, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport api from \"../../../common/api\";\nimport { Button } from \"@material-ui/core\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { NewServiceAccount } from \"../Common/CredentialsPrompt/types\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport AddServiceAccount from \"./AddServiceAccount\";\nimport DeleteServiceAccount from \"./DeleteServiceAccount\";\nimport CredentialsPrompt from \"../Common/CredentialsPrompt/CredentialsPrompt\";\nimport { CreateIcon } from \"../../../icons\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport { stringSort } from \"../../../utils/sortFunctions\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport Divider from \"@material-ui/core/Divider\";\nimport LockIcon from \"@material-ui/icons/Lock\";\nimport ChangePasswordModal from \"./ChangePasswordModal\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n addSideBar: {\n width: \"480px\",\n minWidth: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n imageIcon: {\n height: \"100%\",\n },\n iconRoot: {\n textAlign: \"center\",\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IServiceAccountsProps {\n classes: any;\n displayErrorMessage: typeof setErrorSnackMessage;\n changePassword: boolean;\n}\n\nconst Account = ({\n classes,\n displayErrorMessage,\n changePassword,\n}: IServiceAccountsProps) => {\n const [records, setRecords] = useState([]);\n const [loading, setLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n const [addScreenOpen, setAddScreenOpen] = useState(false);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [selectedServiceAccount, setSelectedServiceAccount] =\n useState(null);\n const [showNewCredentials, setShowNewCredentials] = useState(false);\n const [newServiceAccount, setNewServiceAccount] =\n useState(null);\n const [changePasswordModalOpen, setChangePasswordModalOpen] =\n useState(false);\n\n useEffect(() => {\n fetchRecords();\n }, []);\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\"GET\", `/api/v1/service-accounts`)\n .then((res: string[]) => {\n const serviceAccounts = res.sort(stringSort);\n\n setLoading(false);\n setRecords(serviceAccounts);\n })\n .catch((err) => {\n displayErrorMessage(err);\n setLoading(false);\n });\n }\n }, [loading, setLoading, setRecords, displayErrorMessage]);\n\n const fetchRecords = () => {\n setLoading(true);\n };\n\n const closeAddModalAndRefresh = (res: NewServiceAccount | null) => {\n setAddScreenOpen(false);\n fetchRecords();\n\n if (res !== null) {\n const nsa: NewServiceAccount = {\n console: {\n accessKey: `${res.accessKey}`,\n secretKey: `${res.secretKey}`,\n },\n };\n setNewServiceAccount(nsa);\n setShowNewCredentials(true);\n }\n };\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n\n if (refresh) {\n fetchRecords();\n }\n };\n\n const closeCredentialsModal = () => {\n setShowNewCredentials(false);\n setNewServiceAccount(null);\n };\n\n const confirmDeleteServiceAccount = (selectedServiceAccount: string) => {\n setSelectedServiceAccount(selectedServiceAccount);\n setDeleteOpen(true);\n };\n\n const tableActions = [\n { type: \"delete\", onClick: confirmDeleteServiceAccount },\n ];\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.toLowerCase().includes(filter.toLowerCase())\n );\n\n return (\n \n {addScreenOpen && (\n {\n closeAddModalAndRefresh(res);\n }}\n />\n )}\n {deleteOpen && (\n {\n closeDeleteModalAndRefresh(refresh);\n }}\n />\n )}\n {showNewCredentials && (\n {\n closeCredentialsModal();\n }}\n entity=\"Service Account\"\n />\n )}\n \n \n \n {changePassword && (\n \n \n \n Settings\n \n \n \n
\n
\n \n setChangePasswordModalOpen(false)}\n />\n }\n onClick={() => setChangePasswordModalOpen(true)}\n >\n Change Password\n \n \n \n
\n \n
\n
\n
\n )}\n \n \n Service Accounts\n \n \n \n
\n
\n \n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n }\n onClick={() => {\n setAddScreenOpen(true);\n setSelectedServiceAccount(null);\n }}\n >\n Create service account\n \n \n \n
\n
\n \n \n \n
\n
\n
\n );\n};\n\nconst connector = connect(null, {\n displayErrorMessage: setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(Account));\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\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { LinearProgress } from \"@material-ui/core\";\nimport get from \"lodash/get\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport TextField from \"@material-ui/core/TextField\";\n\nimport { stringSort } from \"../../../utils/sortFunctions\";\nimport { GroupsList } from \"../Groups/types\";\nimport {\n actionsTray,\n selectorsCommon,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\n\ninterface IGroupsProps {\n classes: any;\n selectedGroups: string[];\n setSelectedGroups: any;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n paddingTop: 15,\n boxShadow: \"none\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n noFound: {\n textAlign: \"center\",\n padding: \"10px 0\",\n },\n tableContainer: {\n maxHeight: 200,\n },\n stickyHeader: {\n backgroundColor: \"#fff\",\n },\n actionsTitle: {\n fontWeight: 600,\n color: \"#000\",\n fontSize: 16,\n alignSelf: \"center\",\n },\n tableBlock: {\n marginTop: 15,\n },\n filterField: {\n width: 375,\n fontWeight: 600,\n \"& .input\": {\n \"&::placeholder\": {\n fontWeight: 600,\n color: \"#000\",\n },\n },\n },\n ...actionsTray,\n ...selectorsCommon,\n });\n\nconst GroupsSelectors = ({\n classes,\n selectedGroups,\n setSelectedGroups,\n setModalErrorSnackMessage,\n}: IGroupsProps) => {\n // Local State\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const fetchGroups = useCallback(() => {\n api\n .invoke(\"GET\", `/api/v1/groups`)\n .then((res: GroupsList) => {\n let groups = get(res, \"groups\", []);\n\n if (!groups) {\n groups = [];\n }\n setRecords(groups.sort(stringSort));\n isLoading(false);\n })\n .catch((err) => {\n setModalErrorSnackMessage(err);\n isLoading(false);\n });\n }, [setModalErrorSnackMessage]);\n\n //Effects\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n fetchGroups();\n }\n }, [loading, fetchGroups]);\n\n const selGroups = !selectedGroups ? [] : selectedGroups;\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[] = [...selGroups]; // We clone the selectedGroups array\n\n if (checked) {\n // If the user has checked this field we need to push this to selectedGroupsList\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 setSelectedGroups(elements);\n\n return elements;\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.includes(filter)\n );\n\n return (\n \n \n \n {loading && }\n {records != null && records.length > 0 ? (\n \n \n Assign Groups\n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n \n \n \n \n \n ) : (\n
No Groups Available
\n )}\n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(GroupsSelectors));\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\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport { User } from \"./types\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport GroupsSelectors from \"./GroupsSelectors\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport PredefinedList from \"../Common/FormComponents/PredefinedList/PredefinedList\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface IAddUserContentProps {\n classes: any;\n closeModalAndRefresh: () => void;\n selectedUser: User | null;\n open: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst AddUser = ({\n classes,\n closeModalAndRefresh,\n selectedUser,\n open,\n setModalErrorSnackMessage,\n}: IAddUserContentProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n const [enabled, setEnabled] = useState(false);\n const [selectedGroups, setSelectedGroups] = useState([]);\n const [currentGroups, setCurrentGroups] = useState([]);\n\n const getUserInformation = useCallback(() => {\n if (!selectedUser) {\n return null;\n }\n\n api\n .invoke(\"GET\", `/api/v1/users/${selectedUser.accessKey}`)\n .then((res) => {\n setAddLoading(false);\n setAccessKey(res.accessKey);\n setSelectedGroups(res.memberOf || []);\n setCurrentGroups(res.memberOf || []);\n setEnabled(res.status === \"enabled\");\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n }, [selectedUser, setModalErrorSnackMessage]);\n\n useEffect(() => {\n if (selectedUser == null) {\n setAccessKey(\"\");\n setSecretKey(\"\");\n setSelectedGroups([]);\n } else {\n getUserInformation();\n }\n }, [selectedUser, getUserInformation]);\n\n const saveRecord = (event: React.FormEvent) => {\n event.preventDefault();\n\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n if (selectedUser !== null) {\n api\n .invoke(\"PUT\", `/api/v1/users/${selectedUser.accessKey}`, {\n status: enabled ? \"enabled\" : \"disabled\",\n groups: selectedGroups,\n })\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n api\n .invoke(\"POST\", \"/api/v1/users\", {\n accessKey,\n secretKey,\n groups: selectedGroups,\n })\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n }\n };\n\n const resetForm = () => {\n if (selectedUser !== null) {\n setSelectedGroups([]);\n return;\n }\n setAccessKey(\"\");\n setSecretKey(\"\");\n setSelectedGroups([]);\n };\n\n const sendEnabled =\n accessKey.trim() !== \"\" &&\n ((secretKey.trim() !== \"\" && selectedUser === null) ||\n selectedUser !== null);\n return (\n {\n closeModalAndRefresh();\n }}\n modalOpen={open}\n title={selectedUser !== null ? \"Edit User\" : \"Create User\"}\n >\n {selectedUser !== null && (\n
\n {\n setEnabled(e.target.checked);\n }}\n switchOnly\n />\n
\n )}\n\n \n ) => {\n saveRecord(e);\n }}\n >\n \n \n ) => {\n setAccessKey(e.target.value);\n }}\n disabled={selectedUser !== null}\n />\n\n {selectedUser !== null ? (\n \n ) : (\n ) => {\n setSecretKey(e.target.value);\n }}\n autoComplete=\"current-password\"\n />\n )}\n \n {\n setSelectedGroups(elements);\n }}\n />\n \n \n \n {\n resetForm();\n }}\n >\n Clear\n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddUser));\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport api from \"../../../common/api\";\nimport { User, UsersList } from \"./types\";\nimport { setErrorSnackMessage } from \"../../../actions\";\n\ninterface IDeleteUserProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedUser: User | null;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteUser = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedUser,\n setErrorSnackMessage,\n}: IDeleteUserProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n\n const removeRecord = () => {\n if (deleteLoading) {\n return;\n }\n if (selectedUser == null) {\n return;\n }\n setDeleteLoading(true);\n api\n .invoke(\"DELETE\", `/api/v1/users/${selectedUser.accessKey}`, {\n id: selectedUser.id,\n })\n .then((res: UsersList) => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n };\n\n if (selectedUser === null) {\n return
;\n }\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete User\n \n {deleteLoading && }\n \n Are you sure you want to delete user {selectedUser.accessKey}?\n \n \n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n {\n removeRecord();\n }}\n color=\"secondary\"\n autoFocus\n >\n Delete\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(DeleteUser);\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport GroupsSelectors from \"./GroupsSelectors\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport PredefinedList from \"../Common/FormComponents/PredefinedList/PredefinedList\";\n\ninterface IAddToGroup {\n open: boolean;\n checkedUsers: any;\n closeModalAndRefresh: any;\n classes: any;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\nconst BulkAddToGroup = ({\n open,\n checkedUsers,\n closeModalAndRefresh,\n classes,\n setModalErrorSnackMessage,\n}: IAddToGroup) => {\n //Local States\n const [saving, isSaving] = useState(false);\n const [accepted, setAccepted] = useState(false);\n const [selectedGroups, setSelectedGroups] = useState([]);\n\n //Effects\n useEffect(() => {\n if (saving) {\n if (selectedGroups.length > 0) {\n api\n .invoke(\"PUT\", \"/api/v1/users-groups-bulk\", {\n groups: selectedGroups,\n users: checkedUsers,\n })\n .then(() => {\n isSaving(false);\n setAccepted(true);\n })\n .catch((err) => {\n isSaving(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n isSaving(false);\n setModalErrorSnackMessage(\n \"You need to select at least one group to assign\"\n );\n }\n }\n }, [\n saving,\n isSaving,\n closeModalAndRefresh,\n selectedGroups,\n checkedUsers,\n setModalErrorSnackMessage,\n ]);\n\n //Fetch Actions\n const setSaving = (event: React.FormEvent) => {\n event.preventDefault();\n\n isSaving(true);\n };\n\n const resetForm = () => {\n setSelectedGroups([]);\n };\n\n return (\n {\n closeModalAndRefresh(accepted);\n }}\n title={\n accepted\n ? \"The selected users were added to the following groups.\"\n : \"Add Users to Group\"\n }\n >\n {accepted ? (\n \n \n \n \n \n
\n
\n
\n
\n ) : (\n
\n \n \n \n \n
\n
\n \n \n \n
\n \n \n Clear\n \n \n Save\n \n \n {saving && (\n \n \n \n )}\n
\n
\n )}\n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(BulkAddToGroup));\n","// This file is part of MinIO Kubernetes Cloud\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\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { LinearProgress } from \"@material-ui/core\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport TextField from \"@material-ui/core/TextField\";\nimport { policySort } from \"../../../utils/sortFunctions\";\nimport {\n actionsTray,\n selectorsCommon,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { PolicyList } from \"./types\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\n\ninterface ISelectPolicyProps {\n classes: any;\n selectedPolicy?: string[];\n setSelectedPolicy: any;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n paddingTop: 15,\n boxShadow: \"none\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n noFound: {\n textAlign: \"center\",\n padding: \"10px 0\",\n },\n tableContainer: {\n maxHeight: 200,\n },\n stickyHeader: {\n backgroundColor: \"#fff\",\n },\n actionsTitle: {\n fontWeight: 600,\n color: \"#000\",\n fontSize: 16,\n alignSelf: \"center\",\n },\n tableBlock: {\n marginTop: 15,\n },\n filterField: {\n width: 375,\n fontWeight: 600,\n \"& .input\": {\n \"&::placeholder\": {\n fontWeight: 600,\n color: \"#000\",\n },\n },\n },\n ...actionsTray,\n ...selectorsCommon,\n });\n\nconst PolicySelectors = ({\n classes,\n selectedPolicy = [],\n setSelectedPolicy,\n setModalErrorSnackMessage,\n}: ISelectPolicyProps) => {\n // Local State\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const fetchPolicies = useCallback(() => {\n isLoading(true);\n\n api\n .invoke(\"GET\", `/api/v1/policies?limit=1000`)\n .then((res: PolicyList) => {\n const policies = res.policies === null ? [] : res.policies;\n isLoading(false);\n setRecords(policies.sort(policySort));\n })\n .catch((err) => {\n isLoading(false);\n setModalErrorSnackMessage(err);\n });\n }, [setModalErrorSnackMessage]);\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[] = [...selectedPolicy]; // 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 setSelectedPolicy(elements);\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.name.includes(filter)\n );\n\n return (\n \n \n \n {loading && }\n {records.length > 0 ? (\n \n \n Assign Policies\n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n \n \n \n \n \n ) : (\n
No Policies Available
\n )}\n
\n
\n
\n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport { User } from \"../Users/types\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport api from \"../../../common/api\";\nimport PolicySelectors from \"./PolicySelectors\";\nimport PredefinedList from \"../Common/FormComponents/PredefinedList/PredefinedList\";\n\ninterface ISetPolicyProps {\n classes: any;\n closeModalAndRefresh: () => void;\n selectedUser: User | null;\n selectedGroup: string | null;\n open: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n buttonContainer: {\n textAlign: \"right\",\n },\n });\n\nconst SetPolicy = ({\n classes,\n closeModalAndRefresh,\n selectedUser,\n selectedGroup,\n setModalErrorSnackMessage,\n open,\n}: ISetPolicyProps) => {\n //Local States\n const [loading, setLoading] = useState(false);\n const [actualPolicy, setActualPolicy] = useState([]);\n const [selectedPolicy, setSelectedPolicy] = useState([]);\n\n const setPolicyAction = () => {\n let entity = \"user\";\n let value = null;\n if (selectedGroup !== null) {\n entity = \"group\";\n value = selectedGroup;\n } else {\n if (selectedUser !== null) {\n value = selectedUser.accessKey;\n }\n }\n\n setLoading(true);\n\n api\n .invoke(\"PUT\", `/api/v1/set-policy/${selectedPolicy}`, {\n entityName: value,\n entityType: entity,\n })\n .then(() => {\n setLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n const fetchGroupInformation = () => {\n if (selectedGroup) {\n api\n .invoke(\"GET\", `/api/v1/groups/${selectedGroup}`)\n .then((res: any) => {\n const groupPolicy: String = get(res, \"policy\", \"\");\n setActualPolicy(groupPolicy.split(\",\"));\n setSelectedPolicy(groupPolicy.split(\",\"));\n })\n .catch((err) => {\n setModalErrorSnackMessage(err);\n setLoading(false);\n });\n }\n };\n\n const resetSelection = () => {\n setSelectedPolicy(actualPolicy);\n };\n\n useEffect(() => {\n if (open) {\n if (selectedGroup !== null) {\n fetchGroupInformation();\n return;\n }\n\n const userPolicy: string[] = get(selectedUser, \"policy\", []);\n setActualPolicy(userPolicy);\n setSelectedPolicy(userPolicy);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, selectedGroup, selectedUser]);\n\n const userName = get(selectedUser, \"accessKey\", \"\");\n\n return (\n {\n closeModalAndRefresh();\n }}\n modalOpen={open}\n title=\"Set Policies\"\n >\n \n \n \n \n \n \n \n \n
\n
\n \n \n Clear\n \n \n Save\n \n \n {loading && (\n \n \n \n )}\n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(SetPolicy));\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\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport api from \"../../../common/api\";\nimport { Button, Grid, InputAdornment, TextField } from \"@material-ui/core\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport GroupIcon from \"@material-ui/icons/Group\";\nimport { User, UsersList } from \"./types\";\nimport { usersSort } from \"../../../utils/sortFunctions\";\nimport { CreateIcon } from \"../../../icons\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport AddUser from \"./AddUser\";\nimport DeleteUser from \"./DeleteUser\";\nimport AddToGroup from \"./BulkAddToGroup\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport SetPolicy from \"../Policies/SetPolicy\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport history from \"../../../history\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n // padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IUsersProps {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst ListUsers = ({ classes, setErrorSnackMessage }: IUsersProps) => {\n const [records, setRecords] = useState([]);\n const [loading, setLoading] = useState(false);\n const [addScreenOpen, setAddScreenOpen] = useState(false);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [selectedUser, setSelectedUser] = useState(null);\n const [addGroupOpen, setAddGroupOpen] = useState(false);\n const [filter, setFilter] = useState(\"\");\n const [checkedUsers, setCheckedUsers] = useState([]);\n const [policyOpen, setPolicyOpen] = useState(false);\n\n const fetchRecords = useCallback(() => {\n setLoading(true);\n api\n .invoke(\"GET\", `/api/v1/users`)\n .then((res: UsersList) => {\n const users = res.users === null ? [] : res.users;\n\n setLoading(false);\n setRecords(users.sort(usersSort));\n })\n .catch((err) => {\n setLoading(false);\n setErrorSnackMessage(err);\n });\n }, [setLoading, setRecords, setErrorSnackMessage]);\n\n const closeAddModalAndRefresh = () => {\n setAddScreenOpen(false);\n fetchRecords();\n };\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n if (refresh) {\n fetchRecords();\n }\n };\n\n const closeAddGroupBulk = (unCheckAll: boolean = false) => {\n setAddGroupOpen(false);\n if (unCheckAll) {\n setCheckedUsers([]);\n }\n };\n\n useEffect(() => {\n fetchRecords();\n }, [fetchRecords]);\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.accessKey.includes(filter)\n );\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[] = [...checkedUsers]; // 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\n setCheckedUsers(elements);\n\n return elements;\n };\n\n const viewAction = (selectionElement: any): void => {\n history.push(`/users/${selectionElement.accessKey}`);\n };\n\n const deleteAction = (selectionElement: any): void => {\n setDeleteOpen(true);\n setSelectedUser(selectionElement);\n };\n\n const userLoggedIn = atob(localStorage.getItem(\"userLoggedIn\") || \"\");\n\n const tableActions = [\n { type: \"view\", onClick: viewAction },\n {\n type: \"delete\",\n onClick: deleteAction,\n disableButtonFunction: (topValue: any) => topValue === userLoggedIn,\n },\n ];\n\n return (\n \n {addScreenOpen && (\n {\n closeAddModalAndRefresh();\n }}\n />\n )}\n {policyOpen && (\n {\n setPolicyOpen(false);\n fetchRecords();\n }}\n />\n )}\n {deleteOpen && (\n {\n closeDeleteModalAndRefresh(refresh);\n }}\n />\n )}\n {addGroupOpen && (\n {\n closeAddGroupBulk(close);\n }}\n />\n )}\n \n \n \n \n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n }\n disabled={checkedUsers.length <= 0}\n onClick={() => {\n if (checkedUsers.length > 0) {\n setAddGroupOpen(true);\n }\n }}\n >\n Add to Group\n \n }\n onClick={() => {\n setAddScreenOpen(true);\n setSelectedUser(null);\n }}\n >\n Create User\n \n \n\n \n
\n
\n \n \n \n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(ListUsers));\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 );\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\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport GroupsSelectors from \"./GroupsSelectors\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface IChangeUserGroupsContentProps {\n classes: any;\n closeModalAndRefresh: () => void;\n selectedUser: string;\n open: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst ChangeUserGroups = ({\n classes,\n closeModalAndRefresh,\n selectedUser,\n open,\n setModalErrorSnackMessage,\n}: IChangeUserGroupsContentProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n const [enabled, setEnabled] = useState(false);\n const [selectedGroups, setSelectedGroups] = useState([]);\n\n const getUserInformation = useCallback(() => {\n if (!selectedUser) {\n return null;\n }\n\n api\n .invoke(\"GET\", `/api/v1/users/${selectedUser}`)\n .then((res) => {\n setAddLoading(false);\n setAccessKey(res.accessKey);\n setSelectedGroups(res.memberOf || []);\n setEnabled(res.status === \"enabled\");\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n }, [selectedUser, setModalErrorSnackMessage]);\n\n useEffect(() => {\n if (selectedUser == null) {\n setAccessKey(\"\");\n setSecretKey(\"\");\n setSelectedGroups([]);\n } else {\n getUserInformation();\n }\n }, [selectedUser, getUserInformation]);\n\n const saveRecord = (event: React.FormEvent) => {\n event.preventDefault();\n\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n if (selectedUser !== null) {\n api\n .invoke(\"PUT\", `/api/v1/users/${selectedUser}`, {\n status: enabled ? \"enabled\" : \"disabled\",\n groups: selectedGroups,\n })\n .then((_) => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n api\n .invoke(\"POST\", \"/api/v1/users\", {\n accessKey,\n secretKey,\n groups: selectedGroups,\n })\n .then((_) => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n }\n };\n\n const resetForm = () => {\n if (selectedUser !== null) {\n setSelectedGroups([]);\n return;\n }\n setAccessKey(\"\");\n setSecretKey(\"\");\n setSelectedGroups([]);\n };\n\n const sendEnabled =\n accessKey.trim() !== \"\" &&\n ((secretKey.trim() !== \"\" && selectedUser === null) ||\n selectedUser !== null);\n return (\n {\n closeModalAndRefresh();\n }}\n modalOpen={open}\n title={\"Set Groups\"}\n >\n \n ) => {\n saveRecord(e);\n }}\n >\n \n \n \n {\n setSelectedGroups(elements);\n }}\n />\n \n \n \n {\n resetForm();\n }}\n >\n Clear\n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(ChangeUserGroups));\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// 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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport { IPolicyItem } from \"../Users/types\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport api from \"../../../common/api\";\nimport PolicySelectors from \"../Policies/PolicySelectors\";\n\ninterface ISetUserPoliciesProps {\n classes: any;\n closeModalAndRefresh: () => void;\n selectedUser: string;\n currentPolicies: IPolicyItem[];\n open: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n buttonContainer: {\n textAlign: \"right\",\n },\n });\n\nconst SetUserPolicies = ({\n classes,\n closeModalAndRefresh,\n selectedUser,\n currentPolicies,\n setModalErrorSnackMessage,\n open,\n}: ISetUserPoliciesProps) => {\n //Local States\n const [loading, setLoading] = useState(false);\n const [actualPolicy, setActualPolicy] = useState([]);\n const [selectedPolicy, setSelectedPolicy] = useState([]);\n\n const SetUserPoliciesAction = () => {\n let entity = \"user\";\n let value = selectedUser;\n\n setLoading(true);\n\n api\n .invoke(\"PUT\", `/api/v1/set-policy/${selectedPolicy}`, {\n entityName: value,\n entityType: entity,\n })\n .then(() => {\n setLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n const resetSelection = () => {\n setSelectedPolicy(actualPolicy);\n };\n\n useEffect(() => {\n if (open) {\n const userPolicy: string[] = [];\n for (let pol of currentPolicies) {\n userPolicy.push(pol.policy);\n }\n setActualPolicy(userPolicy);\n setSelectedPolicy(userPolicy);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, selectedUser]);\n\n return (\n {\n closeModalAndRefresh();\n }}\n modalOpen={open}\n title=\"Set Policies\"\n >\n \n \n
\n
\n \n \n Clear\n \n \n Save\n \n \n {loading && (\n \n \n \n )}\n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(SetUserPolicies));\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, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, Grid } from \"@material-ui/core\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { CreateIcon } from \"../../../icons\";\nimport {\n setErrorSnackMessage,\n setModalErrorSnackMessage,\n} from \"../../../actions\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { IPolicyItem } from \"./types\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport Tab from \"@material-ui/core/Tab\";\nimport { TabPanel } from \"../../shared/tabs\";\nimport Paper from \"@material-ui/core/Paper\";\nimport api from \"../../../common/api\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport ChangeUserGroups from \"./ChangeUserGroups\";\nimport SetUserPolicies from \"./SetUserPolicies\";\nimport { Bookmark } from \"@material-ui/icons\";\nimport history from \"../../../history\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n // padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n fixedHeight: {\n height: 165,\n minWidth: 247,\n padding: \"25px 28px\",\n \"& svg\": {\n maxHeight: 18,\n },\n },\n paperContainer: {\n padding: 15,\n paddingLeft: 50,\n display: \"flex\",\n },\n gridContainer: {\n display: \"grid\",\n gridTemplateColumns: \"auto auto\",\n gridGap: 8,\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n \"& div:not(.MuiCircularProgress-root)\": {\n display: \"flex\",\n alignItems: \"center\",\n },\n \"& div:nth-child(odd)\": {\n justifyContent: \"flex-end\",\n fontWeight: 700,\n },\n \"& div:nth-child(2n)\": {\n minWidth: 150,\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IUserDetailsProps {\n classes: any;\n match: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nfunction a11yProps(index: any) {\n return {\n id: `simple-tab-${index}`,\n \"aria-controls\": `simple-tabpanel-${index}`,\n };\n}\n\ninterface IGroupItem {\n group: string;\n}\n\nconst UserDetails = ({ classes, match }: IUserDetailsProps) => {\n const [curTab, setCurTab] = useState(0);\n const [loading, setLoading] = useState(false);\n const [addGroupOpen, setAddGroupOpen] = useState(false);\n const [policyOpen, setPolicyOpen] = useState(false);\n const [addLoading, setAddLoading] = useState(false);\n\n const [enabled, setEnabled] = useState(false);\n const [selectedGroups, setSelectedGroups] = useState([]);\n const [currentGroups, setCurrentGroups] = useState([]);\n const [currentPolicies, setCurrentPolicies] = useState([]);\n\n const userName = match.params[\"userName\"];\n\n const getUserInformation = useCallback(() => {\n if (userName === \"\") {\n return null;\n }\n setLoading(true);\n api\n .invoke(\"GET\", `/api/v1/users/${userName}`)\n .then((res) => {\n setAddLoading(false);\n const memberOf = res.memberOf || [];\n setSelectedGroups(memberOf);\n let currentGroups: IGroupItem[] = [];\n for (let group of memberOf) {\n currentGroups.push({\n group: group,\n });\n }\n setCurrentGroups(currentGroups);\n let currentPolicies: IPolicyItem[] = [];\n for (let policy of res.policy) {\n currentPolicies.push({\n policy: policy,\n });\n }\n setCurrentPolicies(currentPolicies);\n setEnabled(res.status === \"enabled\");\n setLoading(false);\n })\n .catch((err) => {\n setAddLoading(false);\n setLoading(false);\n setModalErrorSnackMessage(err);\n });\n }, [userName]);\n\n const saveRecord = (isEnabled: boolean) => {\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n api\n .invoke(\"PUT\", `/api/v1/users/${userName}`, {\n status: isEnabled ? \"enabled\" : \"disabled\",\n groups: selectedGroups,\n })\n .then((_) => {\n setAddLoading(false);\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n useEffect(() => {\n getUserInformation();\n }, [getUserInformation]);\n\n const userLoggedIn = atob(localStorage.getItem(\"userLoggedIn\") || \"\");\n\n return (\n \n \n {addGroupOpen && (\n {\n setAddGroupOpen(false);\n getUserInformation();\n }}\n />\n )}\n {policyOpen && (\n {\n setPolicyOpen(false);\n getUserInformation();\n }}\n />\n )}\n \n \n \n \n \n \n
\n
Enabled:
\n
\n {\n setEnabled(e.target.checked);\n saveRecord(e.target.checked);\n }}\n switchOnly\n />\n
\n
\n
\n
\n
\n
\n \n
\n
\n \n \n , newValue: number) => {\n setCurTab(newValue);\n }}\n indicatorColor=\"primary\"\n textColor=\"primary\"\n aria-label=\"cluster-tabs\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n \n \n \n \n \n {curTab === 0 && (\n }\n size=\"medium\"\n onClick={() => {\n setAddGroupOpen(true);\n }}\n >\n Add to Groups\n \n )}\n {curTab === 1 && (\n \n }\n size=\"medium\"\n onClick={() => {\n setPolicyOpen(true);\n }}\n >\n Assign Policies\n \n \n )}\n \n \n \n \n \n \n\n \n {\n history.push(`/policies/${policy.policy}`);\n },\n },\n ]}\n columns={[{ label: \"Name\", elementKey: \"policy\" }]}\n isLoading={loading}\n records={currentPolicies}\n entityName=\"Policies\"\n idField=\"policy\"\n />\n \n \n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(UserDetails));\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 from \"react\";\nimport history from \"../../../history\";\nimport { Route, Router, Switch, withRouter } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../../store\";\nimport { setMenuOpen } from \"../../../actions\";\nimport NotFoundPage from \"../../NotFoundPage\";\n\nimport ListUsers from \"./ListUsers\";\nimport UserDetails from \"./UserDetails\";\n\nconst mapState = (state: AppState) => ({\n open: state.system.sidebarOpen,\n});\n\nconst connector = connect(mapState, { setMenuOpen });\n\nconst Users = () => {\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default withRouter(connector(Users));\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, { useState, useEffect, useCallback } from \"react\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { LinearProgress } from \"@material-ui/core\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { UsersList } from \"../Users/types\";\nimport { usersSort } from \"../../../utils/sortFunctions\";\nimport api from \"../../../common/api\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport {\n actionsTray,\n selectorsCommon,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport { connect } from \"react-redux\";\n\ninterface IGroupsProps {\n classes: any;\n selectedUsers: string[];\n setSelectedUsers: any;\n editMode?: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n paddingTop: 15,\n boxShadow: \"none\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n noFound: {\n textAlign: \"center\",\n padding: \"10px 0\",\n },\n tableContainer: {\n maxHeight: 200,\n },\n stickyHeader: {\n backgroundColor: \"#fff\",\n },\n actionsTitle: {\n fontWeight: 600,\n color: \"#000\",\n fontSize: 16,\n alignSelf: \"center\",\n },\n tableBlock: {\n marginTop: 15,\n },\n filterField: {\n width: 375,\n fontWeight: 600,\n \"& .input\": {\n \"&::placeholder\": {\n fontWeight: 600,\n color: \"#000\",\n },\n },\n },\n ...actionsTray,\n ...selectorsCommon,\n });\n\nconst UsersSelectors = ({\n classes,\n selectedUsers,\n setSelectedUsers,\n editMode = false,\n setModalErrorSnackMessage,\n}: IGroupsProps) => {\n //Local States\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const fetchUsers = useCallback(() => {\n api\n .invoke(\"GET\", `/api/v1/users`)\n .then((res: UsersList) => {\n let users = get(res, \"users\", []);\n\n if (!users) {\n users = [];\n }\n\n setRecords(users.sort(usersSort));\n isLoading(false);\n })\n .catch((err) => {\n setModalErrorSnackMessage(err);\n isLoading(false);\n });\n }, [setModalErrorSnackMessage]);\n\n //Effects\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n fetchUsers();\n }\n }, [loading, fetchUsers]);\n\n const selUsers = !selectedUsers ? [] : selectedUsers;\n\n //Fetch Actions\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[] = [...selUsers]; // We clone the selectedGroups array\n\n if (checked) {\n // If the user has checked this field we need to push this to selectedGroupsList\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 setSelectedUsers(elements);\n\n return elements;\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.accessKey.includes(filter)\n );\n\n return (\n \n \n \n {loading && }\n {records != null && records.length > 0 ? (\n \n \n \n {editMode ? \"Edit Members\" : \"Assign Users\"}\n \n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n \n \n \n \n \n ) : (\n
No Users Available
\n )}\n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(UsersSelectors));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport UsersSelectors from \"./UsersSelectors\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport PredefinedList from \"../Common/FormComponents/PredefinedList/PredefinedList\";\n\ninterface IGroupProps {\n open: boolean;\n selectedGroup: any;\n closeModalAndRefresh: any;\n classes: any;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\ninterface MainGroupProps {\n members: string[];\n name: string;\n status: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\nconst AddGroup = ({\n open,\n selectedGroup,\n closeModalAndRefresh,\n classes,\n setModalErrorSnackMessage,\n}: IGroupProps) => {\n //Local States\n const [groupName, setGroupName] = useState(\"\");\n const [groupEnabled, setGroupEnabled] = useState(false);\n const [saving, isSaving] = useState(false);\n const [selectedUsers, setSelectedUsers] = useState([]);\n const [loadingGroup, isLoadingGroup] = useState(false);\n const [validGroup, setValidGroup] = useState(false);\n\n //Effects\n useEffect(() => {\n if (selectedGroup !== null) {\n isLoadingGroup(true);\n } else {\n setGroupName(\"\");\n setSelectedUsers([]);\n }\n }, [selectedGroup]);\n\n useEffect(() => {\n setValidGroup(groupName.trim() !== \"\");\n }, [groupName, selectedUsers]);\n\n useEffect(() => {\n if (saving) {\n const saveRecord = () => {\n if (selectedGroup !== null) {\n api\n .invoke(\"PUT\", `/api/v1/groups/${groupName}`, {\n group: groupName,\n members: selectedUsers,\n status: groupEnabled ? \"enabled\" : \"disabled\",\n })\n .then((res) => {\n isSaving(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n isSaving(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n api\n .invoke(\"POST\", \"/api/v1/groups\", {\n group: groupName,\n members: selectedUsers,\n })\n .then((res) => {\n isSaving(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n isSaving(false);\n setModalErrorSnackMessage(err);\n });\n }\n };\n saveRecord();\n }\n }, [\n saving,\n groupName,\n selectedUsers,\n groupEnabled,\n selectedGroup,\n closeModalAndRefresh,\n setModalErrorSnackMessage,\n ]);\n\n useEffect(() => {\n if (selectedGroup && loadingGroup) {\n const fetchGroupInfo = () => {\n api\n .invoke(\"GET\", `/api/v1/groups/${selectedGroup}`)\n .then((res: MainGroupProps) => {\n setGroupEnabled(res.status === \"enabled\");\n setGroupName(res.name);\n setSelectedUsers(res.members);\n })\n .catch((err) => {\n setModalErrorSnackMessage(err);\n isLoadingGroup(false);\n });\n };\n fetchGroupInfo();\n }\n }, [loadingGroup, selectedGroup, setModalErrorSnackMessage]);\n\n //Fetch Actions\n const setSaving = (event: React.FormEvent) => {\n event.preventDefault();\n\n isSaving(true);\n };\n\n const resetForm = () => {\n if (selectedGroup === null) {\n setGroupName(\"\");\n }\n\n setSelectedUsers([]);\n };\n\n return (\n \n {selectedGroup !== null && (\n
\n {\n setGroupEnabled(e.target.checked);\n }}\n switchOnly\n />\n
\n )}\n
\n \n \n {selectedGroup === null ? (\n \n \n ) => {\n setGroupName(e.target.value);\n }}\n />\n \n \n ) : (\n \n \n \n )}\n \n \n \n \n \n \n Clear\n \n \n Save\n \n \n {saving && (\n \n \n \n )}\n \n
\n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddGroup));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport api from \"../../../common/api\";\nimport { setErrorSnackMessage } from \"../../../actions\";\n\ninterface IDeleteGroup {\n selectedGroup: string;\n deleteOpen: boolean;\n closeDeleteModalAndRefresh: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteGroup = ({\n selectedGroup,\n deleteOpen,\n closeDeleteModalAndRefresh,\n setErrorSnackMessage,\n}: IDeleteGroup) => {\n const [isDeleting, setDeleteLoading] = useState(false);\n\n useEffect(() => {\n if (isDeleting) {\n const removeRecord = () => {\n if (!selectedGroup) {\n return;\n }\n\n api\n .invoke(\"DELETE\", `/api/v1/groups/${selectedGroup}`)\n .then(() => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n };\n removeRecord();\n }\n }, [\n isDeleting,\n selectedGroup,\n closeDeleteModalAndRefresh,\n setErrorSnackMessage,\n ]);\n\n const closeNoAction = () => {\n closeDeleteModalAndRefresh(false);\n };\n\n return (\n \n \n Delete User\n \n {isDeleting && }\n \n Are you sure you want to delete group {selectedGroup}?\n \n \n \n \n {\n setDeleteLoading(true);\n }}\n color=\"secondary\"\n autoFocus\n >\n Delete\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(DeleteGroup);\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport { Button } from \"@material-ui/core\";\nimport { CreateIcon } from \"../../../icons\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport { GroupsList } from \"./types\";\nimport { stringSort } from \"../../../utils/sortFunctions\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../common/api\";\nimport AddGroup from \"../Groups/AddGroup\";\nimport DeleteGroup from \"./DeleteGroup\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport SetPolicy from \"../Policies/SetPolicy\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\n\ninterface IGroupsProps {\n classes: any;\n openGroupModal: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n // padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst Groups = ({ classes, setErrorSnackMessage }: IGroupsProps) => {\n const [addGroupOpen, setGroupOpen] = useState(false);\n const [selectedGroup, setSelectedGroup] = useState(null);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [loading, isLoading] = useState(false);\n const [records, setRecords] = useState([]);\n const [filter, setFilter] = useState(\"\");\n const [policyOpen, setPolicyOpen] = useState(false);\n\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n const fetchRecords = () => {\n api\n .invoke(\"GET\", `/api/v1/groups`)\n .then((res: GroupsList) => {\n let resGroups: string[] = [];\n if (res.groups !== null) {\n resGroups = res.groups.sort(stringSort);\n }\n setRecords(resGroups);\n isLoading(false);\n })\n .catch((err) => {\n setErrorSnackMessage(err);\n isLoading(false);\n });\n };\n fetchRecords();\n }\n }, [loading, setErrorSnackMessage]);\n\n const closeAddModalAndRefresh = () => {\n setGroupOpen(false);\n isLoading(true);\n };\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n\n if (refresh) {\n isLoading(true);\n }\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.includes(filter)\n );\n\n const viewAction = (group: any) => {\n setGroupOpen(true);\n setSelectedGroup(group);\n };\n\n const deleteAction = (group: any) => {\n setDeleteOpen(true);\n setSelectedGroup(group);\n };\n\n const setPolicyAction = (selectionElement: any): void => {\n setPolicyOpen(true);\n setSelectedGroup(selectionElement);\n };\n\n const tableActions = [\n { type: \"view\", onClick: viewAction },\n { type: \"description\", onClick: setPolicyAction },\n { type: \"delete\", onClick: deleteAction },\n ];\n\n return (\n \n {addGroupOpen && (\n \n )}\n {deleteOpen && (\n \n )}\n {setPolicyOpen && (\n {\n setPolicyOpen(false);\n }}\n />\n )}\n \n \n \n \n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n }\n onClick={() => {\n setSelectedGroup(null);\n setGroupOpen(true);\n }}\n >\n Create Group\n \n \n\n \n
\n
\n \n \n \n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(Groups));\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 { IConfigurationElement, IElementValue } from \"./types\";\n\nexport const notifyPostgres = \"notify_postgres\";\nexport const notifyMysql = \"notify_mysql\";\nexport const notifyKafka = \"notify_kafka\";\nexport const notifyAmqp = \"notify_amqp\";\nexport const notifyMqtt = \"notify_mqtt\";\nexport const notifyRedis = \"notify_redis\";\nexport const notifyNats = \"notify_nats\";\nexport const notifyElasticsearch = \"notify_elasticsearch\";\nexport const notifyWebhooks = \"notify_webhooks\";\nexport const notifyNsq = \"notify_nsq\";\n\nexport const configurationElements: IConfigurationElement[] = [\n {\n configuration_id: \"region\",\n configuration_label: \"Edit Region Configuration\",\n },\n {\n configuration_id: \"cache\",\n configuration_label: \"Edit Cache Configuration\",\n },\n {\n configuration_id: \"compression\",\n configuration_label: \"Edit Compression Configuration\",\n },\n { configuration_id: \"etcd\", configuration_label: \"Edit Etcd Configuration\" },\n {\n configuration_id: \"identity_openid\",\n configuration_label: \"Edit Identity Openid Configuration\",\n },\n {\n configuration_id: \"identity_ldap\",\n configuration_label: \"Edit Identity LDAP Configuration\",\n },\n {\n configuration_id: \"logger_webhook\",\n configuration_label: \"Edit Logger Webhook Configuration\",\n },\n {\n configuration_id: \"audit_webhook\",\n configuration_label: \"Edit Audit Webhook Configuration\",\n },\n];\n\nexport const fieldsConfigurations: any = {\n region: [\n {\n name: \"name\",\n required: true,\n label: \"Server Location\",\n tooltip: 'Name of the location of the server e.g. \"us-west-rack2\"',\n type: \"string\",\n placeholder: \"e.g. us-west-rack-2\",\n },\n {\n name: \"comment\",\n required: false,\n label: \"Comment\",\n tooltip: \"You can add a comment to this setting\",\n type: \"comment\",\n placeholder: \"Enter Comment\",\n },\n ],\n cache: [\n {\n name: \"drives\",\n required: true,\n label: \"Drives\",\n tooltip:\n 'Mountpoints e.g. \"/optane1\" or \"/optane2\", you can write one per field',\n type: \"csv\",\n placeholder: \"Enter Mount Point\",\n },\n {\n name: \"expiry\",\n required: false,\n label: \"Expiry\",\n tooltip: 'Cache expiry duration in days e.g. \"90\"',\n type: \"number\",\n placeholder: \"Enter Number of Days\",\n },\n {\n name: \"quota\",\n required: false,\n label: \"Quota\",\n tooltip: 'Limit cache drive usage in percentage e.g. \"90\"',\n type: \"number\",\n placeholder: \"Enter in %\",\n },\n {\n name: \"exclude\",\n required: false,\n label: \"Exclude\",\n tooltip:\n 'Wildcard exclusion patterns e.g. \"bucket/*.tmp\" or \"*.exe\", you can write one per field',\n type: \"csv\",\n placeholder: \"Enter Wildcard Exclusion Patterns\",\n },\n {\n name: \"after\",\n required: false,\n label: \"After\",\n tooltip: \"Minimum number of access before caching an object\",\n type: \"number\",\n placeholder: \"Enter Number of Attempts\",\n },\n {\n name: \"watermark_low\",\n required: false,\n label: \"Watermark Low\",\n tooltip: \"Watermark Low\",\n type: \"number\",\n placeholder: \"Enter Watermark Low\",\n },\n {\n name: \"watermark_high\",\n required: false,\n label: \"Watermark High\",\n tooltip: \"Watermark High\",\n type: \"number\",\n placeholder: \"Enter Watermark High\",\n },\n {\n name: \"comment\",\n required: false,\n label: \"Comment\",\n tooltip: \"You can add a comment to this setting\",\n type: \"comment\",\n multiline: true,\n placeholder: \"Enter Comment\",\n },\n ],\n compression: [\n {\n name: \"extensions\",\n required: false,\n label: \"Extensions\",\n tooltip:\n 'Extensions to compress e.g. \".txt\",\".log\" or \".csv\", you can write one per field',\n type: \"csv\",\n placeholder: \"Enter an Extension\",\n withBorder: true,\n },\n {\n name: \"mime_types\",\n required: false,\n label: \"Mime Types\",\n tooltip:\n 'Mime types e.g. \"text/*\",\"application/json\" or \"application/xml\", you can write one per field',\n type: \"csv\",\n placeholder: \"Enter a Mime Type\",\n withBorder: true,\n },\n ],\n etcd: [\n {\n name: \"endpoints\",\n required: true,\n label: \"Endpoints\",\n tooltip:\n 'List of etcd endpoints e.g. \"http://localhost:2379\", you can write one per field',\n type: \"csv\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"path_prefix\",\n required: false,\n label: \"Path Prefix\",\n tooltip: 'namespace prefix to isolate tenants e.g. \"customer1/\"',\n type: \"string\",\n placeholder: \"Enter Path Prefix\",\n },\n {\n name: \"coredns_path\",\n required: false,\n label: \"Coredns Path\",\n tooltip: 'Shared bucket DNS records, default is \"/skydns\"',\n type: \"string\",\n placeholder: \"Enter Coredns Path\",\n },\n {\n name: \"client_cert\",\n required: false,\n label: \"Client Cert\",\n tooltip: \"Client cert for mTLS authentication\",\n type: \"string\",\n placeholder: \"Enter Client Cert\",\n },\n {\n name: \"client_cert_key\",\n required: false,\n label: \"Client Cert Key\",\n tooltip: \"Client cert key for mTLS authentication\",\n type: \"string\",\n placeholder: \"Enter Client Cert Key\",\n },\n {\n name: \"comment\",\n required: false,\n label: \"Comment\",\n tooltip: \"You can add a comment to this setting\",\n type: \"comment\",\n multiline: true,\n placeholder: \"Enter Comment\",\n },\n ],\n identity_openid: [\n {\n name: \"config_url\",\n required: false,\n label: \"Config URL\",\n tooltip: \"Config URL for Client ID configuration\",\n type: \"string\",\n placeholder: \"Enter Config URL\",\n },\n {\n name: \"client_id\",\n required: false,\n label: \"Client ID\",\n type: \"string\",\n placeholder: \"Enter Client ID\",\n },\n {\n name: \"claim_name\",\n required: false,\n label: \"Claim Name\",\n tooltip: \"Claim Name\",\n type: \"string\",\n placeholder: \"Enter Claim Name\",\n },\n {\n name: \"claim_prefix\",\n required: false,\n label: \"Claim Prefix\",\n tooltip: \"Claim Prefix\",\n type: \"string\",\n placeholder: \"Enter Claim Prefix\",\n },\n ],\n identity_ldap: [\n {\n name: \"server_addr\",\n required: true,\n label: \"Server Addr\",\n tooltip: 'AD/LDAP server address e.g. \"myldapserver.com:636\"',\n type: \"string\",\n placeholder: \"Enter Server Address\",\n },\n {\n name: \"username_format\",\n required: true,\n label: \"Username Format\",\n tooltip:\n 'List of username bind DNs e.g. \"uid=%s\",\"cn=accounts\",\"dc=myldapserver\" or \"dc=com\", you can write one per field',\n type: \"csv\",\n placeholder: \"Enter Username Format\",\n },\n {\n name: \"username_search_filter\",\n required: true,\n label: \"Username Search Filter\",\n tooltip:\n 'User search filter, for example \"(cn=%s)\" or \"(sAMAccountName=%s)\" or \"(uid=%s)\"',\n type: \"string\",\n placeholder: \"Enter Username Search Filter\",\n },\n {\n name: \"group_search_filter\",\n required: true,\n label: \"Group Search Filter\",\n tooltip:\n 'Search filter for groups e.g. \"(&(objectclass=groupOfNames)(memberUid=%s))\"',\n type: \"string\",\n placeholder: \"Enter Group Search Filter\",\n },\n {\n name: \"username_search_base_dn\",\n required: false,\n label: \"Username Search Base DN\",\n tooltip: \"List of username search DNs, you can write one per field\",\n type: \"csv\",\n placeholder: \"Enter Username Search Base DN\",\n },\n {\n name: \"group_name_attribute\",\n required: false,\n label: \"Group Name Attribute\",\n tooltip: 'Search attribute for group name e.g. \"cn\"',\n type: \"string\",\n placeholder: \"Enter Group Name Attribute\",\n },\n {\n name: \"sts_expiry\",\n required: false,\n label: \"STS Expiry\",\n tooltip:\n 'temporary credentials validity duration in s,m,h,d. Default is \"1h\"',\n type: \"string\",\n placeholder: \"Enter STS Expiry\",\n },\n {\n name: \"tls_skip_verify\",\n required: false,\n label: \"TLS Skip Verify\",\n tooltip:\n 'Trust server TLS without verification, defaults to \"off\" (verify)',\n type: \"on|off\",\n },\n {\n name: \"server_insecure\",\n required: false,\n label: \"Server Insecure\",\n tooltip:\n 'Allow plain text connection to AD/LDAP server, defaults to \"off\"',\n type: \"on|off\",\n },\n {\n name: \"comment\",\n required: false,\n label: \"Comment\",\n tooltip: \"Optionally add a comment to this setting\",\n type: \"comment\",\n placeholder: \"Enter Comment\",\n },\n ],\n logger_webhook: [\n {\n name: \"endpoint\",\n required: true,\n label: \"Endpoint\",\n type: \"string\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"auth_token\",\n required: true,\n label: \"Auth Token\",\n type: \"string\",\n placeholder: \"Enter Auth Token\",\n },\n ],\n audit_webhook: [\n {\n name: \"endpoint\",\n required: true,\n label: \"Endpoint\",\n type: \"string\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"auth_token\",\n required: true,\n label: \"Auth Token\",\n type: \"string\",\n placeholder: \"Enter Auth Token\",\n },\n ],\n};\n\nconst commonFields = [\n {\n name: \"queue-dir\",\n label: \"Queue Directory\",\n required: true,\n\n tooltip: \"staging dir for undelivered messages e.g. '/home/events'\",\n type: \"string\",\n placeholder: \"Enter Queue Directory\",\n },\n {\n name: \"queue-limit\",\n label: \"Queue Limit\",\n required: false,\n\n tooltip: \"maximum limit for undelivered messages, defaults to '10000'\",\n type: \"number\",\n placeholder: \"Enter Queue Limit\",\n },\n {\n name: \"comment\",\n label: \"Comment\",\n required: false,\n type: \"comment\",\n placeholder: \"Enter Comment\",\n },\n];\n\nexport const notificationEndpointsFields: any = {\n [notifyKafka]: [\n {\n name: \"brokers\",\n label: \"Brokers\",\n required: true,\n\n tooltip: \"Comma separated list of Kafka broker addresses\",\n type: \"string\",\n placeholder: \"Enter Brokers\",\n },\n {\n name: \"topic\",\n label: \"Topic\",\n tooltip: \"Kafka topic used for bucket notifications\",\n type: \"string\",\n placeholder: \"Enter Topic\",\n },\n {\n name: \"sasl_username\",\n label: \"SASL Username\",\n tooltip: \"Username for SASL/PLAIN or SASL/SCRAM authentication\",\n type: \"string\",\n placeholder: \"Enter SASL Username\",\n },\n {\n name: \"sasl_password\",\n label: \"SASL Password\",\n tooltip: \"Password for SASL/PLAIN or SASL/SCRAM authentication\",\n type: \"string\",\n placeholder: \"Enter SASL Password\",\n },\n {\n name: \"sasl_mechanism\",\n label: \"SASL Mechanism\",\n tooltip: \"SASL authentication mechanism, default 'PLAIN'\",\n type: \"string\",\n },\n {\n name: \"tls_client_auth\",\n label: \"TLS Client Auth\",\n tooltip:\n \"Client Auth determines the Kafka server's policy for TLS client auth\",\n type: \"string\",\n placeholder: \"Enter TLS Client Auth\",\n },\n {\n name: \"sasl\",\n label: \"SASL\",\n tooltip: \"Set to 'on' to enable SASL authentication\",\n type: \"on|off\",\n },\n {\n name: \"tls\",\n label: \"TLS\",\n tooltip: \"Set to 'on' to enable TLS\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n label: \"TLS skip verify\",\n tooltip:\n 'Trust server TLS without verification, defaults to \"on\" (verify)',\n type: \"on|off\",\n },\n {\n name: \"client_tls_cert\",\n label: \"client TLS cert\",\n tooltip: \"Path to client certificate for mTLS auth\",\n type: \"path\",\n placeholder: \"Enter TLS Client Cert\",\n },\n {\n name: \"client_tls_key\",\n label: \"client TLS key\",\n tooltip: \"Path to client key for mTLS auth\",\n type: \"path\",\n placeholder: \"Enter TLS Client Key\",\n },\n {\n name: \"version\",\n label: \"Version\",\n tooltip: \"Specify the version of the Kafka cluster e.g '2.2.0'\",\n type: \"string\",\n placeholder: \"Enter Kafka Version\",\n },\n ...commonFields,\n ],\n [notifyAmqp]: [\n {\n name: \"url\",\n required: true,\n label: \"URL\",\n tooltip:\n \"AMQP server endpoint e.g. `amqp://myuser:mypassword@localhost:5672`\",\n type: \"url\",\n },\n {\n name: \"exchange\",\n label: \"Exchange\",\n tooltip: \"Name of the AMQP exchange\",\n type: \"string\",\n placeholder: \"Enter Exchange\",\n },\n {\n name: \"exchange_type\",\n label: \"Exchange Type\",\n tooltip: \"AMQP exchange type\",\n type: \"string\",\n placeholder: \"Enter Exchange Type\",\n },\n {\n name: \"routing_key\",\n label: \"Routing Key\",\n tooltip: \"Routing key for publishing\",\n type: \"string\",\n placeholder: \"Enter Routing Key\",\n },\n {\n name: \"mandatory\",\n label: \"Mandatory\",\n tooltip:\n \"Quietly ignore undelivered messages when set to 'off', default is 'on'\",\n type: \"on|off\",\n },\n {\n name: \"durable\",\n label: \"Durable\",\n tooltip:\n \"Persist queue across broker restarts when set to 'on', default is 'off'\",\n type: \"on|off\",\n },\n {\n name: \"no_wait\",\n label: \"No Wait\",\n tooltip:\n \"Non-blocking message delivery when set to 'on', default is 'off'\",\n type: \"on|off\",\n },\n {\n name: \"internal\",\n label: \"Internal\",\n tooltip:\n \"Set to 'on' for exchange to be not used directly by publishers, but only when bound to other exchanges\",\n type: \"on|off\",\n },\n {\n name: \"auto_deleted\",\n label: \"Auto Deleted\",\n tooltip:\n \"Auto delete queue when set to 'on', when there are no consumers\",\n type: \"on|off\",\n },\n {\n name: \"delivery_mode\",\n label: \"Delivery Mode\",\n tooltip: \"Set to '1' for non-persistent or '2' for persistent queue\",\n type: \"number\",\n placeholder: \"Enter Delivery Mode\",\n },\n ...commonFields,\n ],\n [notifyRedis]: [\n {\n name: \"address\",\n required: true,\n label: \"Address\",\n tooltip: \"Redis server's address. For example: `localhost:6379`\",\n type: \"address\",\n placeholder: \"Enter Address\",\n },\n {\n name: \"key\",\n required: true,\n label: \"Key\",\n tooltip: \"Redis key to store/update events, key is auto-created\",\n type: \"string\",\n placeholder: \"Enter Key\",\n },\n {\n name: \"password\",\n label: \"Password\",\n tooltip: \"Redis server password\",\n type: \"string\",\n placeholder: \"Enter Password\",\n },\n ...commonFields,\n ],\n [notifyMqtt]: [\n {\n name: \"broker\",\n required: true,\n label: \"Broker\",\n tooltip: \"MQTT server endpoint e.g. `tcp://localhost:1883`\",\n type: \"uri\",\n placeholder: \"Enter Brokers\",\n },\n {\n name: \"topic\",\n required: true,\n label: \"Topic\",\n tooltip: \"name of the MQTT topic to publish\",\n type: \"string\",\n placeholder: \"Enter Topic\",\n },\n {\n name: \"username\",\n label: \"Username\",\n tooltip: \"MQTT username\",\n type: \"string\",\n placeholder: \"Enter Username\",\n },\n {\n name: \"password\",\n label: \"Password\",\n tooltip: \"MQTT password\",\n type: \"string\",\n placeholder: \"Enter Password\",\n },\n {\n name: \"qos\",\n label: \"QOS\",\n tooltip: \"Set the quality of service priority, defaults to '0'\",\n type: \"number\",\n placeholder: \"Enter QOS\",\n },\n {\n name: \"keep_alive_interval\",\n label: \"Keep Alive Interval\",\n tooltip: \"Keep-alive interval for MQTT connections in s,m,h,d\",\n type: \"duration\",\n placeholder: \"Enter Keep Alive Internal\",\n },\n {\n name: \"reconnect_interval\",\n label: \"Reconnect Interval\",\n tooltip: \"Reconnect interval for MQTT connections in s,m,h,d\",\n type: \"duration\",\n placeholder: \"Enter Reconnect Interval\",\n },\n ...commonFields,\n ],\n [notifyNats]: [\n {\n name: \"address\",\n required: true,\n label: \"Address\",\n tooltip: \"NATS server address e.g. '0.0.0.0:4222'\",\n type: \"address\",\n placeholder: \"Enter Address\",\n },\n {\n name: \"subject\",\n required: true,\n label: \"Subject\",\n tooltip: \"NATS subscription subject\",\n type: \"string\",\n placeholder: \"Enter NATS Subject\",\n },\n {\n name: \"username\",\n label: \"Username\",\n tooltip: \"NATS username\",\n type: \"string\",\n placeholder: \"Enter NATS Username\",\n },\n {\n name: \"password\",\n label: \"Password\",\n tooltip: \"NATS password\",\n type: \"string\",\n placeholder: \"Enter NATS password\",\n },\n {\n name: \"token\",\n label: \"Token\",\n tooltip: \"NATS token\",\n type: \"string\",\n placeholder: \"Enter NATS token\",\n },\n {\n name: \"tls\",\n label: \"TLS\",\n tooltip: \"Set to 'on' to enable TLS\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n label: \"TLS Skip Verify\",\n tooltip:\n 'Trust server TLS without verification, defaults to \"on\" (verify)',\n type: \"on|off\",\n },\n {\n name: \"ping_interval\",\n label: \"Ping Interval\",\n tooltip: \"Client ping commands interval in s,m,h,d. Disabled by default\",\n type: \"duration\",\n placeholder: \"Enter Ping Interval\",\n },\n {\n name: \"streaming\",\n label: \"Streaming\",\n tooltip: \"Set to 'on', to use streaming NATS server\",\n type: \"on|off\",\n },\n {\n name: \"streaming_async\",\n label: \"Streaming async\",\n tooltip: \"Set to 'on', to enable asynchronous publish\",\n type: \"on|off\",\n },\n {\n name: \"streaming_max_pub_acks_in_flight\",\n label: \"Streaming max publish ACKS in flight\",\n tooltip: \"Number of messages to publish without waiting for ACKs\",\n type: \"number\",\n placeholder: \"Enter Streaming in flight value\",\n },\n {\n name: \"streaming_cluster_id\",\n label: \"Streaming Cluster ID\",\n tooltip: \"Unique ID for NATS streaming cluster\",\n type: \"string\",\n placeholder: \"Enter Streaming Cluster ID\",\n },\n {\n name: \"cert_authority\",\n label: \"Cert Authority\",\n tooltip: \"Path to certificate chain of the target NATS server\",\n type: \"string\",\n placeholder: \"Enter Cert Authority\",\n },\n {\n name: \"client_cert\",\n label: \"Client Cert\",\n tooltip: \"Client cert for NATS mTLS auth\",\n type: \"string\",\n placeholder: \"Enter Client Cert\",\n },\n {\n name: \"client_key\",\n label: \"Client Key\",\n tooltip: \"Client cert key for NATS mTLS auth\",\n type: \"string\",\n placeholder: \"Enter Client Key\",\n },\n ...commonFields,\n ],\n [notifyElasticsearch]: [\n {\n name: \"url\",\n required: true,\n label: \"URL\",\n tooltip:\n \"Elasticsearch server's address, with optional authentication info\",\n type: \"url\",\n placeholder: \"Enter URL\",\n },\n {\n name: \"index\",\n required: true,\n label: \"Index\",\n tooltip:\n \"Elasticsearch index to store/update events, index is auto-created\",\n type: \"string\",\n placeholder: \"Enter Index\",\n },\n {\n name: \"format\",\n required: true,\n label: \"Format\",\n tooltip:\n \"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'\",\n type: \"enum\",\n placeholder: \"Enter Format\",\n },\n ...commonFields,\n ],\n [notifyWebhooks]: [\n {\n name: \"endpoint\",\n required: true,\n label: \"Endpoint\",\n tooltip:\n \"webhook server endpoint e.g. http://localhost:8080/minio/events\",\n type: \"url\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"auth_token\",\n label: \"Auth Token\",\n tooltip: \"opaque string or JWT authorization token\",\n type: \"string\",\n placeholder: \"Enter auth_token\",\n },\n ...commonFields,\n ],\n [notifyNsq]: [\n {\n name: \"nsqd_address\",\n required: true,\n label: \"NSQD Address\",\n tooltip: \"NSQ server address e.g. '127.0.0.1:4150'\",\n type: \"address\",\n placeholder: \"Enter nsqd_address\",\n },\n {\n name: \"topic\",\n required: true,\n label: \"Topic\",\n tooltip: \"NSQ topic\",\n type: \"string\",\n placeholder: \"Enter Topic\",\n },\n {\n name: \"tls\",\n label: \"TLS\",\n tooltip: \"set to 'on' to enable TLS\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n label: \"TLS Skip Verify\",\n tooltip:\n 'trust server TLS without verification, defaults to \"on\" (verify)',\n type: \"on|off\",\n },\n ...commonFields,\n ],\n};\n\nexport const removeEmptyFields = (formFields: IElementValue[]) => {\n const nonEmptyFields = formFields.filter((field) => field.value !== \"\");\n\n return nonEmptyFields;\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 .\nimport React, {\n useState,\n useEffect,\n createRef,\n useLayoutEffect,\n ChangeEvent,\n useRef,\n} from \"react\";\nimport get from \"lodash/get\";\nimport debounce from \"lodash/debounce\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { InputLabel, Tooltip } from \"@material-ui/core\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport InputBoxWrapper from \"../InputBoxWrapper/InputBoxWrapper\";\nimport AddIcon from \"../../../../../icons/AddIcon\";\n\ninterface ICSVMultiSelector {\n elements: string;\n name: string;\n label: string;\n tooltip?: string;\n commonPlaceholder?: string;\n classes: any;\n withBorder?: boolean;\n onChange: (elements: string) => void;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n inputWithBorder: {\n border: \"1px solid #EAEAEA\",\n padding: 15,\n height: 150,\n overflowY: \"auto\",\n position: \"relative\",\n marginTop: 15,\n },\n labelContainer: {\n display: \"flex\",\n },\n });\n\nconst CSVMultiSelector = ({\n elements,\n name,\n label,\n tooltip = \"\",\n commonPlaceholder = \"\",\n onChange,\n withBorder = false,\n classes,\n}: ICSVMultiSelector) => {\n const [currentElements, setCurrentElements] = useState([\"\"]);\n const bottomList = createRef();\n\n // Use effect to get the initial values from props\n useEffect(() => {\n if (\n currentElements.length === 1 &&\n currentElements[0] === \"\" &&\n elements &&\n elements !== \"\"\n ) {\n const elementsSplit = elements.split(\",\");\n elementsSplit.push(\"\");\n\n setCurrentElements(elementsSplit);\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [elements, currentElements]);\n\n // Use effect to send new values to onChange\n useEffect(() => {\n if (currentElements.length > 1) {\n const refScroll = bottomList.current;\n if (refScroll) {\n refScroll.scrollIntoView(false);\n }\n }\n }, [currentElements, bottomList]);\n\n // We avoid multiple re-renders / hang issue typing too fast\n const firstUpdate = useRef(true);\n useLayoutEffect(() => {\n if (firstUpdate.current) {\n firstUpdate.current = false;\n return;\n }\n debouncedOnChange();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentElements]);\n\n // If the last input is not empty, we add a new one\n const addEmptyLine = (elementsUp: string[]) => {\n if (elementsUp[elementsUp.length - 1].trim() !== \"\") {\n const cpList = [...elementsUp];\n cpList.push(\"\");\n setCurrentElements(cpList);\n }\n };\n\n // Onchange function for input box, we get the dataset-index & only update that value in the array\n const onChangeElement = (e: ChangeEvent) => {\n e.persist();\n\n let updatedElement = [...currentElements];\n const index = get(e.target, \"dataset.index\", 0);\n updatedElement[index] = e.target.value;\n\n setCurrentElements(updatedElement);\n };\n\n // Debounce for On Change\n const debouncedOnChange = debounce(() => {\n const elementsString = currentElements\n .filter((element) => element.trim() !== \"\")\n .join(\",\");\n\n onChange(elementsString);\n }, 500);\n\n const inputs = currentElements.map((element, index) => {\n return (\n : null}\n overlayAction={() => {\n addEmptyLine(currentElements);\n }}\n />\n );\n });\n\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n \n {inputs}\n
\n \n \n \n );\n};\nexport default withStyles(styles)(CSVMultiSelector);\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, InputLabel, TextField, Tooltip } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\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 marginBottom: 16,\n fontSize: 14,\n },\n textBoxContainer: {\n flexGrow: 1,\n position: \"relative\",\n },\n errorState: {\n color: \"#b53b4b\",\n fontSize: 14,\n position: \"absolute\",\n top: 7,\n right: 7,\n },\n cssOutlinedInput: {\n borderColor: \"#9C9C9C\",\n padding: 16,\n },\n rootContainer: {\n \"& .MuiOutlinedInput-inputMultiline\": {\n ...fieldBasic.inputLabel,\n fontSize: 13,\n minHeight: 150,\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 .\n\nimport React, { useEffect, useState, Fragment } from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { IElementValue, KVField } from \"./types\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport CSVMultiSelector from \"../Common/FormComponents/CSVMultiSelector/CSVMultiSelector\";\nimport CommentBoxWrapper from \"../Common/FormComponents/CommentBoxWrapper/CommentBoxWrapper\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\n\ninterface IConfGenericProps {\n onChange: (newValue: IElementValue[]) => void;\n fields: KVField[];\n defaultVals?: IElementValue[];\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n });\n\n// Function to get defined values,\n//we make this because the backed sometimes don't return all the keys when there is an initial configuration\nexport const valueDef = (\n key: string,\n type: string,\n defaults: IElementValue[]\n) => {\n let defValue = type === \"on|off\" ? \"false\" : \"\";\n\n if (defaults.length > 0) {\n const storedConfig = defaults.find((element) => element.key === key);\n\n if (storedConfig) {\n defValue = storedConfig.value;\n }\n }\n\n return defValue;\n};\n\nconst ConfTargetGeneric = ({\n onChange,\n fields,\n defaultVals,\n classes,\n}: IConfGenericProps) => {\n const [valueHolder, setValueHolder] = useState([]);\n const fieldsElements = !fields ? [] : fields;\n const defValList = !defaultVals ? [] : defaultVals;\n\n // Effect to create all the values to hold\n useEffect(() => {\n const values: IElementValue[] = [];\n fields.forEach((field) => {\n const stateInsert: IElementValue = {\n key: field.name,\n value: valueDef(field.name, field.type, defValList),\n };\n values.push(stateInsert);\n });\n\n setValueHolder(values);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fields, defaultVals]);\n\n useEffect(() => {\n onChange(valueHolder);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [valueHolder]);\n\n const setValueElement = (key: string, value: string, index: number) => {\n const valuesDup = [...valueHolder];\n valuesDup[index] = { key, value };\n\n setValueHolder(valuesDup);\n };\n\n const fieldDefinition = (field: KVField, item: number) => {\n switch (field.type) {\n case \"on|off\":\n const value = valueHolder[item] ? valueHolder[item].value : \"false\";\n\n return (\n ) => {\n const value = e.target.checked ? \"true\" : \"false\";\n setValueElement(field.name, value, item);\n }}\n id={field.name}\n name={field.name}\n label={field.label}\n value={\"switch_on\"}\n tooltip={field.tooltip}\n checked={value === \"true\"}\n />\n );\n case \"csv\":\n return (\n \n setValueElement(field.name, value, item)\n }\n tooltip={field.tooltip}\n commonPlaceholder={field.placeholder}\n withBorder={!!field.withBorder}\n />\n );\n case \"comment\":\n return (\n ) =>\n setValueElement(field.name, e.target.value, item)\n }\n placeholder={field.placeholder}\n />\n );\n default:\n return (\n ) =>\n setValueElement(field.name, e.target.value, item)\n }\n multiline={!!field.multiline}\n placeholder={field.placeholder}\n />\n );\n }\n };\n\n return (\n \n \n {fieldsElements.map((field, item) => (\n \n \n {fieldDefinition(field, item)}\n \n \n ))}\n \n \n );\n};\n\nexport default withStyles(styles)(ConfTargetGeneric);\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, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport api from \"../../../../common/api\";\nimport ConfTargetGeneric from \"../ConfTargetGeneric\";\nimport { serverNeedsRestart, setErrorSnackMessage } from \"../../../../actions\";\nimport {\n fieldBasic,\n settingsCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { fieldsConfigurations, removeEmptyFields } from \"../utils\";\nimport { IConfigurationElement, IElementValue } from \"../types\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...settingsCommon,\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n logoButton: {\n height: \"80px\",\n },\n\n customTitle: {\n ...settingsCommon.customTitle,\n marginTop: 0,\n },\n });\n\ninterface IAddNotificationEndpointProps {\n closeModalAndRefresh: any;\n serverNeedsRestart: typeof serverNeedsRestart;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n selectedConfiguration: IConfigurationElement;\n classes: any;\n}\n\nconst EditConfiguration = ({\n closeModalAndRefresh,\n serverNeedsRestart,\n selectedConfiguration,\n setErrorSnackMessage,\n classes,\n}: IAddNotificationEndpointProps) => {\n //Local States\n const [valuesObj, setValueObj] = useState([]);\n const [saving, setSaving] = useState(false);\n const [loadingConfig, setLoadingConfig] = useState(true);\n const [configValues, setConfigValues] = useState([]);\n //Effects\n useEffect(() => {\n const configId = get(selectedConfiguration, \"configuration_id\", false);\n\n if (configId) {\n api\n .invoke(\"GET\", `/api/v1/configs/${configId}`)\n .then((res) => {\n const keyVals = get(res, \"key_values\", []);\n setConfigValues(keyVals);\n })\n .catch((err) => {\n setLoadingConfig(false);\n setErrorSnackMessage(err);\n });\n }\n setLoadingConfig(false);\n }, [selectedConfiguration, setErrorSnackMessage]);\n\n useEffect(() => {\n if (saving) {\n const payload = {\n key_values: removeEmptyFields(valuesObj),\n };\n api\n .invoke(\n \"PUT\",\n `/api/v1/configs/${selectedConfiguration.configuration_id}`,\n payload\n )\n .then(() => {\n setSaving(false);\n serverNeedsRestart(true);\n\n closeModalAndRefresh();\n })\n .catch((err) => {\n setSaving(false);\n setErrorSnackMessage(err);\n });\n }\n }, [\n saving,\n serverNeedsRestart,\n selectedConfiguration,\n valuesObj,\n closeModalAndRefresh,\n setErrorSnackMessage,\n ]);\n\n //Fetch Actions\n const submitForm = (event: React.FormEvent) => {\n event.preventDefault();\n setSaving(true);\n };\n\n const onValueChange = useCallback(\n (newValue) => {\n setValueObj(newValue);\n },\n [setValueObj]\n );\n\n return (\n \n \n {selectedConfiguration.configuration_label}\n \n \n
\n \n {loadingConfig && (\n \n \n \n )}\n \n \n \n \n \n Save\n \n \n \n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n serverNeedsRestart,\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(EditConfiguration));\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\";\nimport { AutoSizer } from \"react-virtualized\";\nimport { createStyles, withStyles } from \"@material-ui/core/styles\";\n\ninterface ISlideOptions {\n classes: any;\n slideOptions: any;\n currentSlide: number;\n}\n\nconst styles = () =>\n createStyles({\n masterContainer: {\n overflowX: \"hidden\",\n overflowY: \"auto\",\n },\n sliderContainer: {\n width: \"auto\",\n transitionDuration: \"0.3s\",\n position: \"relative\",\n },\n slide: {\n float: \"left\",\n },\n });\n\nconst SlideOptions = ({\n classes,\n slideOptions,\n currentSlide,\n}: ISlideOptions) => {\n return (\n \n {({ width, height }: any) => {\n const currentSliderPosition = currentSlide * width;\n const containerSize = width * slideOptions.length;\n return (\n \n
\n \n {slideOptions.map((block: any, index: number) => {\n return (\n \n {block}\n
\n );\n })}\n
\n
\n
\n );\n }}\n \n );\n};\n\nexport default withStyles(styles)(SlideOptions);\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst BackSettingsIcon = () => (\n \n \n \n \n \n \n \n);\n\nexport default BackSettingsIcon;\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, { useState, Fragment } from \"react\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport history from \"../../../../history\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport { configurationElements } from \"../utils\";\nimport { IConfigurationElement } from \"../types\";\nimport EditConfiguration from \"../CustomForms/EditConfiguration\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n settingsCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport SlideOptions from \"../../Common/SlideOptions/SlideOptions\";\nimport BackSettingsIcon from \"../../../../icons/BackSettingsIcon\";\n\ninterface IListConfiguration {\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n iconText: {\n lineHeight: \"24px\",\n },\n customConfigurationPage: {\n height: \"calc(100vh - 324px)\",\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n ...searchField,\n ...actionsTray,\n ...settingsCommon,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst initialConfiguration = {\n configuration_id: \"\",\n configuration_label: \"\",\n};\n\nconst ConfigurationsList = ({ classes }: IListConfiguration) => {\n const [selectedConfiguration, setSelectedConfiguration] = useState(\n initialConfiguration\n );\n const [currentConfiguration, setCurrentConfiguration] = useState(0);\n\n const tableActions = [\n {\n type: \"edit\",\n onClick: (element: IConfigurationElement) => {\n const url = get(element, \"url\", \"\");\n if (url !== \"\") {\n // We redirect Browser\n history.push(url);\n } else {\n setCurrentConfiguration(1);\n setSelectedConfiguration(element);\n }\n },\n },\n ];\n\n const backToInitialConfig = () => {\n setCurrentConfiguration(0);\n setSelectedConfiguration(initialConfiguration);\n };\n\n return (\n \n \n \n \n
\n \n \n ,\n \n \n \n \n Back To Configurations\n \n \n \n {currentConfiguration === 1 ? (\n {\n setCurrentConfiguration(0);\n }}\n selectedConfiguration={selectedConfiguration}\n />\n ) : null}\n \n ,\n ]}\n currentSlide={currentConfiguration}\n />\n
\n
\n
\n
\n
\n );\n};\n\nexport default withStyles(styles)(ConfigurationsList);\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 { NotificationEndpointItem } from \"./types\";\nimport {\n notifyAmqp,\n notifyElasticsearch,\n notifyKafka,\n notifyMqtt,\n notifyMysql,\n notifyNats,\n notifyNsq,\n notifyPostgres,\n notifyRedis,\n notifyWebhooks,\n} from \"../utils\";\n\nexport const notificationTransform = (\n notificationElements: NotificationEndpointItem[]\n) => {\n return notificationElements.map((element) => {\n return {\n service_name: `${element.service}:${element.account_id}`,\n status: element.status,\n };\n });\n};\n\nexport const servicesList = [\n {\n actionTrigger: notifyPostgres,\n targetTitle: \"Postgres SQL\",\n logo: \"/postgres.png\",\n },\n {\n actionTrigger: notifyKafka,\n targetTitle: \"Kafka\",\n logo: \"/kafka.png\",\n },\n {\n actionTrigger: notifyAmqp,\n targetTitle: \"AMQP\",\n logo: \"/amqp.png\",\n },\n {\n actionTrigger: notifyMqtt,\n targetTitle: \"MQTT\",\n logo: \"/mqtt.png\",\n },\n {\n actionTrigger: notifyRedis,\n targetTitle: \"Redis\",\n logo: \"/redis.png\",\n },\n {\n actionTrigger: notifyNats,\n targetTitle: \"NATS\",\n logo: \"/nats.png\",\n },\n {\n actionTrigger: notifyMysql,\n targetTitle: \"Mysql\",\n logo: \"/mysql.png\",\n },\n {\n actionTrigger: notifyElasticsearch,\n targetTitle: \"Elastic Search\",\n logo: \"/elasticsearch.png\",\n },\n {\n actionTrigger: notifyWebhooks,\n targetTitle: \"Webhook\",\n logo: \"\",\n },\n {\n actionTrigger: notifyNsq,\n targetTitle: \"NSQ\",\n logo: \"\",\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\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport RadioGroupSelector from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { IElementValue } from \"../types\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport CommentBoxWrapper from \"../../Common/FormComponents/CommentBoxWrapper/CommentBoxWrapper\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport PredefinedList from \"../../Common/FormComponents/PredefinedList/PredefinedList\";\n\ninterface IConfPostgresProps {\n onChange: (newValue: IElementValue[]) => void;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n });\n\nconst ConfPostgres = ({ onChange, classes }: IConfPostgresProps) => {\n //Local States\n const [useConnectionString, setUseConnectionString] =\n useState(false);\n const [connectionString, setConnectionString] = useState(\"\");\n const [host, setHostname] = useState(\"\");\n const [dbName, setDbName] = useState(\"\");\n const [port, setPort] = useState(\"\");\n const [user, setUser] = useState(\"\");\n const [password, setPassword] = useState(\"\");\n const [sslMode, setSslMode] = useState(\" \");\n\n const [table, setTable] = useState(\"\");\n const [format, setFormat] = useState(\"namespace\");\n const [queueDir, setQueueDir] = useState(\"\");\n const [queueLimit, setQueueLimit] = useState(\"\");\n const [comment, setComment] = useState(\"\");\n\n // connection_string* (string) Postgres server connection-string e.g. \"host=localhost port=5432 dbname=minio_events user=postgres password=password sslmode=disable\"\n\n // \"host=localhost\n // port=5432\n //dbname=minio_events\n //user=postgres\n //password=password\n //sslmode=disable\"\n\n // table* (string) DB table name to store/update events, table is auto-created\n // format* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'\n // queue_dir (path) staging dir for undelivered messages e.g. '/home/events'\n // queue_limit (number) maximum limit for undelivered messages, defaults to '10000'\n // comment (sentence) optionally add a comment to this setting\n\n const KvSeparator = \"=\";\n const parseConnectionString = (\n input: string,\n keys: string[]\n ): Map => {\n let valueIndexes: number[] = [];\n\n for (const key of keys) {\n const i = input.indexOf(key + KvSeparator);\n if (i === -1) {\n continue;\n }\n valueIndexes.push(i);\n }\n valueIndexes.sort((n1, n2) => n1 - n2);\n\n let kvFields = new Map();\n let fields: string[] = new Array(valueIndexes.length);\n for (let i = 0; i < valueIndexes.length; i++) {\n const j = i + 1;\n if (j < valueIndexes.length) {\n fields[i] = input.substr(\n valueIndexes[i],\n valueIndexes[j] - valueIndexes[i]\n );\n } else {\n fields[i] = input.substr(valueIndexes[i]);\n }\n }\n\n for (let field of fields) {\n if (field === undefined) {\n continue;\n }\n const key = field.substr(0, field.indexOf(\"=\"));\n const value = field.substr(field.indexOf(\"=\") + 1).trim();\n kvFields.set(key, value);\n }\n return kvFields;\n };\n\n const configToString = useCallback((): string => {\n let strValue = \"\";\n if (host !== \"\") {\n strValue = `${strValue} host=${host}`;\n }\n if (dbName !== \"\") {\n strValue = `${strValue} dbname=${dbName}`;\n }\n if (user !== \"\") {\n strValue = `${strValue} user=${user}`;\n }\n if (password !== \"\") {\n strValue = `${strValue} password=${password}`;\n }\n if (port !== \"\") {\n strValue = `${strValue} port=${port}`;\n }\n if (sslMode !== \" \") {\n strValue = `${strValue} sslmode=${sslMode}`;\n }\n\n strValue = `${strValue} `;\n\n return strValue.trim();\n }, [host, dbName, user, password, port, sslMode]);\n\n useEffect(() => {\n if (connectionString !== \"\") {\n const formValues = [\n { key: \"connection_string\", value: connectionString },\n { key: \"table\", value: table },\n { key: \"format\", value: format },\n { key: \"queue_dir\", value: queueDir },\n { key: \"queue_limit\", value: queueLimit },\n { key: \"comment\", value: comment },\n ];\n\n onChange(formValues);\n }\n }, [\n connectionString,\n table,\n format,\n queueDir,\n queueLimit,\n comment,\n onChange,\n ]);\n\n useEffect(() => {\n const cs = configToString();\n setConnectionString(cs);\n }, [\n user,\n dbName,\n password,\n port,\n sslMode,\n host,\n setConnectionString,\n configToString,\n ]);\n\n useEffect(() => {\n if (useConnectionString) {\n // build connection_string\n const cs = configToString();\n setConnectionString(cs);\n\n return;\n }\n // parse connection_string\n const kv = parseConnectionString(connectionString, [\n \"host\",\n \"port\",\n \"dbname\",\n \"user\",\n \"password\",\n \"sslmode\",\n ]);\n setHostname(kv.get(\"host\") ? kv.get(\"host\") + \"\" : \"\");\n setPort(kv.get(\"port\") ? kv.get(\"port\") + \"\" : \"\");\n setDbName(kv.get(\"dbname\") ? kv.get(\"dbname\") + \"\" : \"\");\n setUser(kv.get(\"user\") ? kv.get(\"user\") + \"\" : \"\");\n setPassword(kv.get(\"password\") ? kv.get(\"password\") + \"\" : \"\");\n setSslMode(kv.get(\"sslmode\") ? kv.get(\"sslmode\") + \"\" : \" \");\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [useConnectionString]);\n\n return (\n \n \n {\n setUseConnectionString(e.target.checked);\n }}\n value={\"manualString\"}\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n {useConnectionString ? (\n \n \n ) => {\n setConnectionString(e.target.value);\n }}\n />\n \n \n ) : (\n \n \n \n \n ) => {\n setHostname(e.target.value);\n }}\n />\n \n \n ) => {\n setDbName(e.target.value);\n }}\n />\n \n \n ) => {\n setPort(e.target.value);\n }}\n />\n \n \n {\n if (e.target.value !== undefined) {\n setSslMode(e.target.value + \"\");\n }\n }}\n options={[\n { label: \"Enter SSL Mode\", value: \" \" },\n { label: \"Require\", value: \"require\" },\n { label: \"Disable\", value: \"disable\" },\n { label: \"Verify CA\", value: \"verify-ca\" },\n { label: \"Verify Full\", value: \"verify-full\" },\n ]}\n />\n \n \n ) => {\n setUser(e.target.value);\n }}\n />\n \n \n ) => {\n setPassword(e.target.value);\n }}\n />\n \n \n \n \n \n
\n
\n
\n )}\n \n ) => {\n setTable(e.target.value);\n }}\n />\n \n \n {\n setFormat(e.target.value);\n }}\n tooltip=\"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'\"\n selectorOptions={[\n { label: \"Namespace\", value: \"namespace\" },\n { label: \"Access\", value: \"access\" },\n ]}\n />\n \n \n ) => {\n setQueueDir(e.target.value);\n }}\n />\n \n \n ) => {\n setQueueLimit(e.target.value);\n }}\n />\n \n \n ) => {\n setComment(e.target.value);\n }}\n />\n \n
\n );\n};\n\nexport default withStyles(styles)(ConfPostgres);\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\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport RadioGroupSelector from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport { IElementValue } from \"../types\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport CommentBoxWrapper from \"../../Common/FormComponents/CommentBoxWrapper/CommentBoxWrapper\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport PredefinedList from \"../../Common/FormComponents/PredefinedList/PredefinedList\";\n\ninterface IConfMySqlProps {\n onChange: (newValue: IElementValue[]) => void;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n });\n\nconst ConfMySql = ({ onChange, classes }: IConfMySqlProps) => {\n //Local States\n const [useDsnString, setUseDsnString] = useState(false);\n const [dsnString, setDsnString] = useState(\"\");\n const [host, setHostname] = useState(\"\");\n const [dbName, setDbName] = useState(\"\");\n const [port, setPort] = useState(\"\");\n const [user, setUser] = useState(\"\");\n const [password, setPassword] = useState(\"\");\n\n const [table, setTable] = useState(\"\");\n const [format, setFormat] = useState(\"namespace\");\n const [queueDir, setQueueDir] = useState(\"\");\n const [queueLimit, setQueueLimit] = useState(\"\");\n const [comment, setComment] = useState(\"\");\n\n // dsn_string* (string) MySQL data-source-name connection string e.g. \":@tcp(:)/\"\n // table* (string) DB table name to store/update events, table is auto-created\n // format* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'\n // queue_dir (path) staging dir for undelivered messages e.g. '/home/events'\n // queue_limit (number) maximum limit for undelivered messages, defaults to '100000'\n // comment (sentence) optionally add a comment to this setting\n\n const parseDsnString = (\n input: string,\n keys: string[]\n ): Map => {\n let kvFields: Map = new Map();\n const regex = /(.*?):(.*?)@tcp\\((.*?):(.*?)\\)\\/(.*?)$/gm;\n let m;\n\n while ((m = regex.exec(input)) !== null) {\n // This is necessary to avoid infinite loops with zero-width matches\n if (m.index === regex.lastIndex) {\n regex.lastIndex++;\n }\n\n kvFields.set(\"user\", m[1]);\n kvFields.set(\"password\", m[2]);\n kvFields.set(\"host\", m[3]);\n kvFields.set(\"port\", m[4]);\n kvFields.set(\"dbname\", m[5]);\n }\n\n return kvFields;\n };\n\n const configToDsnString = useCallback((): string => {\n return `${user}:${password}@tcp(${host}:${port})/${dbName}`;\n }, [user, password, host, port, dbName]);\n\n useEffect(() => {\n if (dsnString !== \"\") {\n const formValues = [\n { key: \"dsn_string\", value: dsnString },\n { key: \"table\", value: table },\n { key: \"format\", value: format },\n { key: \"queue_dir\", value: queueDir },\n { key: \"queue_limit\", value: queueLimit },\n { key: \"comment\", value: comment },\n ];\n\n onChange(formValues);\n }\n }, [dsnString, table, format, queueDir, queueLimit, comment, onChange]);\n\n useEffect(() => {\n const cs = configToDsnString();\n setDsnString(cs);\n }, [user, dbName, password, port, host, setDsnString, configToDsnString]);\n\n const switcherChangeEvt = (event: React.ChangeEvent) => {\n if (event.target.checked) {\n // build dsn_string\n const cs = configToDsnString();\n setDsnString(cs);\n } else {\n // parse dsn_string\n const kv = parseDsnString(dsnString, [\n \"host\",\n \"port\",\n \"dbname\",\n \"user\",\n \"password\",\n ]);\n setHostname(kv.get(\"host\") ? kv.get(\"host\") + \"\" : \"\");\n setPort(kv.get(\"port\") ? kv.get(\"port\") + \"\" : \"\");\n setDbName(kv.get(\"dbname\") ? kv.get(\"dbname\") + \"\" : \"\");\n setUser(kv.get(\"user\") ? kv.get(\"user\") + \"\" : \"\");\n setPassword(kv.get(\"password\") ? kv.get(\"password\") + \"\" : \"\");\n }\n\n setUseDsnString(event.target.checked);\n };\n\n return (\n \n \n \n \n {useDsnString ? (\n \n \n ) => {\n setDsnString(e.target.value);\n }}\n />\n \n \n ) : (\n \n \n \n \n ) => {\n setHostname(e.target.value);\n }}\n />\n \n \n ) => {\n setDbName(e.target.value);\n }}\n />\n \n \n ) => {\n setPort(e.target.value);\n }}\n />\n \n\n \n ) => {\n setUser(e.target.value);\n }}\n />\n \n \n ) => {\n setPassword(e.target.value);\n }}\n />\n \n \n \n \n \n
\n
\n
\n )}\n \n ) => {\n setTable(e.target.value);\n }}\n />\n \n \n {\n setFormat(e.target.value);\n }}\n tooltip=\"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'\"\n selectorOptions={[\n { label: \"Namespace\", value: \"namespace\" },\n { label: \"Access\", value: \"access\" },\n ]}\n />\n \n \n ) => {\n setQueueDir(e.target.value);\n }}\n />\n \n \n ) => {\n setQueueLimit(e.target.value);\n }}\n />\n \n \n ) => {\n setComment(e.target.value);\n }}\n />\n \n
\n );\n};\n\nexport default withStyles(styles)(ConfMySql);\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, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button } from \"@material-ui/core\";\nimport ConfPostgres from \"../CustomForms/ConfPostgres\";\nimport api from \"../../../../common/api\";\nimport { serverNeedsRestart, setErrorSnackMessage } from \"../../../../actions\";\nimport {\n notificationEndpointsFields,\n notifyMysql,\n notifyPostgres,\n removeEmptyFields,\n} from \"../utils\";\nimport { IElementValue } from \"../types\";\nimport {\n modalBasic,\n settingsCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { servicesList } from \"./utils\";\nimport ConfMySql from \"../CustomForms/ConfMySql\";\nimport ConfTargetGeneric from \"../ConfTargetGeneric\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n ...settingsCommon,\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n lambdaFormIndicator: {\n display: \"flex\",\n marginBottom: 40,\n },\n customTitle: {\n ...settingsCommon.customTitle,\n marginTop: 0,\n },\n settingsFormContainer: {\n ...settingsCommon.settingsFormContainer,\n height: \"calc(100vh - 422px)\",\n },\n });\n\ninterface IAddNotificationEndpointProps {\n service: string;\n saveAndRefresh: any;\n serverNeedsRestart: typeof serverNeedsRestart;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n classes: any;\n}\n\nconst AddNotificationEndpoint = ({\n service,\n saveAndRefresh,\n serverNeedsRestart,\n classes,\n setErrorSnackMessage,\n}: IAddNotificationEndpointProps) => {\n //Local States\n const [valuesArr, setValueArr] = useState([]);\n const [saving, setSaving] = useState(false);\n\n //Effects\n\n useEffect(() => {\n if (saving) {\n const payload = {\n key_values: removeEmptyFields(valuesArr),\n };\n api\n .invoke(\"PUT\", `/api/v1/configs/${service}`, payload)\n .then(() => {\n setSaving(false);\n serverNeedsRestart(true);\n saveAndRefresh();\n })\n .catch((err) => {\n setSaving(false);\n setErrorSnackMessage(err);\n });\n }\n }, [\n saving,\n serverNeedsRestart,\n service,\n valuesArr,\n saveAndRefresh,\n setErrorSnackMessage,\n ]);\n\n //Fetch Actions\n const submitForm = (event: React.FormEvent) => {\n event.preventDefault();\n setSaving(true);\n };\n\n const onValueChange = useCallback(\n (newValue) => {\n setValueArr(newValue);\n },\n [setValueArr]\n );\n\n let srvComponent;\n switch (service) {\n case notifyPostgres: {\n srvComponent = ;\n break;\n }\n case notifyMysql: {\n srvComponent = ;\n break;\n }\n default: {\n const fields = get(notificationEndpointsFields, service, []);\n\n srvComponent = (\n \n );\n }\n }\n\n const targetElement = servicesList.find(\n (element) => element.actionTrigger === service\n );\n\n return (\n \n {service !== \"\" && (\n \n
\n \n {targetElement ? targetElement.targetTitle : \"\"} - Add Lambda\n Notification Target\n \n \n {srvComponent}\n \n \n \n \n Save\n \n \n \n \n \n
\n )}\n
\n );\n};\n\nconst mapDispatchToProps = {\n serverNeedsRestart,\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(AddNotificationEndpoint));\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\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { servicesList } from \"./utils\";\nimport {\n settingsCommon,\n typesSelection,\n} from \"../../Common/FormComponents/common/styleLibrary\";\n\ninterface INotificationTypeSelector {\n classes: any;\n setService: (trigger: string) => any;\n}\n\nconst nonLogos = servicesList.filter((elService) => elService.logo === \"\");\nconst withLogos = servicesList.filter((elService) => elService.logo !== \"\");\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...settingsCommon,\n customTitle: {\n ...settingsCommon.customTitle,\n marginTop: 0,\n },\n ...typesSelection,\n });\n\nconst NotificationTypeSelector = ({\n classes,\n setService,\n}: INotificationTypeSelector) => {\n return (\n \n \n \n \n Pick a supported service\n \n \n
\n {nonLogos.map((item) => {\n return (\n {\n setService(item.actionTrigger);\n }}\n >\n {item.targetTitle.toUpperCase()}\n \n );\n })}\n
\n
\n {withLogos.map((item) => {\n return (\n {\n setService(item.actionTrigger);\n }}\n >\n \n \n );\n })}\n
\n
\n
\n
\n
\n );\n};\n\nexport default withStyles(styles)(NotificationTypeSelector);\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, { useEffect, useState, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { IconButton, TextField } from \"@material-ui/core\";\nimport { red } from \"@material-ui/core/colors\";\nimport Grid from \"@material-ui/core/Grid\";\nimport FiberManualRecordIcon from \"@material-ui/icons/FiberManualRecord\";\nimport Button from \"@material-ui/core/Button\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport {\n NotificationEndpointItem,\n NotificationEndpointsList,\n TransformedEndpointItem,\n} from \"./types\";\nimport { notificationTransform } from \"./utils\";\nimport { CreateIcon } from \"../../../../icons\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport AddNotificationEndpoint from \"./AddNotificationEndpoint\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n settingsCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../../common/api\";\nimport SlideOptions from \"../../Common/SlideOptions/SlideOptions\";\nimport BackSettingsIcon from \"../../../../icons/BackSettingsIcon\";\nimport NotificationTypeSelector from \"./NotificationTypeSelector\";\nimport RefreshIcon from \"@material-ui/icons/Refresh\";\n\ninterface IListNotificationEndpoints {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...actionsTray,\n ...searchField,\n ...settingsCommon,\n ...containerForHeader(theme.spacing(4)),\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n iconText: {\n lineHeight: \"24px\",\n },\n customConfigurationPage: {\n height: \"calc(100vh - 410px)\",\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n lambdaContainer: {\n padding: \"15px 0\",\n },\n actionsTray: {\n ...actionsTray.actionsTray,\n padding: \"0 38px\",\n },\n });\n\nconst ListNotificationEndpoints = ({\n classes,\n setErrorSnackMessage,\n}: IListNotificationEndpoints) => {\n //Local States\n const [records, setRecords] = useState([]);\n const [filter, setFilter] = useState(\"\");\n const [isLoading, setIsLoading] = useState(false);\n const [currentPanel, setCurrentPanel] = useState(0);\n const [service, setService] = useState(\"\");\n\n //Effects\n // load records on mount\n useEffect(() => {\n if (isLoading) {\n const fetchRecords = () => {\n api\n .invoke(\"GET\", `/api/v1/admin/notification_endpoints`)\n .then((res: NotificationEndpointsList) => {\n let resNotEndList: NotificationEndpointItem[] = [];\n if (res.notification_endpoints !== null) {\n resNotEndList = res.notification_endpoints;\n }\n setRecords(notificationTransform(resNotEndList));\n setIsLoading(false);\n })\n .catch((err) => {\n setErrorSnackMessage(err);\n setIsLoading(false);\n });\n };\n fetchRecords();\n }\n }, [isLoading, setErrorSnackMessage]);\n\n useEffect(() => {\n setIsLoading(true);\n }, []);\n\n const filteredRecords = records.filter((b: TransformedEndpointItem) => {\n if (filter === \"\") {\n return true;\n }\n return b.service_name.indexOf(filter) >= 0;\n });\n\n const statusDisplay = (status: string) => {\n return (\n \n \n {status}\n \n );\n };\n\n const openNewLambdaSelector = () => {\n setCurrentPanel(1);\n };\n\n const backClick = () => {\n setService(\"\");\n setCurrentPanel(currentPanel - 1);\n };\n\n const saveAndRefresh = () => {\n setIsLoading(true);\n setCurrentPanel(0);\n setService(\"\");\n };\n\n return (\n \n \n \n \n
\n \n \n \n {\n setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n {\n setIsLoading(true);\n }}\n >\n \n \n }\n onClick={openNewLambdaSelector}\n >\n Add Notification Target\n \n \n \n
\n
\n \n \n \n
\n ,\n \n \n \n \n Back To Lambda Notifications\n \n \n \n {\n setService(serviceName);\n setCurrentPanel(2);\n }}\n />\n \n ,\n \n \n \n \n Back To Supported Services\n \n \n \n \n \n ,\n ]}\n currentSlide={currentPanel}\n />\n
\n
\n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(ListNotificationEndpoints));\n","import React from \"react\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n errorBlock: {\n color: theme.palette.error.main,\n },\n });\n\ninterface IErrorBlockProps {\n classes: any;\n errorMessage: string;\n withBreak?: boolean;\n}\n\nconst ErrorBlock = ({\n classes,\n errorMessage,\n withBreak = true,\n}: IErrorBlockProps) => {\n return (\n \n {withBreak &&
}\n \n {errorMessage}\n \n
\n );\n};\n\nexport default withStyles(styles)(ErrorBlock);\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, { useState } from \"react\";\nimport get from \"lodash/get\";\nimport { Grid, InputLabel, Tooltip } from \"@material-ui/core\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport AttachFileIcon from \"@material-ui/icons/AttachFile\";\nimport CancelIcon from \"@material-ui/icons/Cancel\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport { fileProcess } from \"./utils\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport ErrorBlock from \"../../../../shared/ErrorBlock\";\n\ninterface InputBoxProps {\n label: string;\n classes: any;\n onChange: (e: string, i: string) => void;\n id: string;\n name: string;\n disabled?: boolean;\n tooltip?: string;\n required?: boolean;\n error?: string;\n accept?: string;\n value?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n textBoxContainer: {\n flexGrow: 1,\n position: \"relative\",\n flexDirection: \"column\",\n },\n errorState: {\n color: \"#b53b4b\",\n fontSize: 14,\n position: \"absolute\",\n top: 7,\n right: 7,\n },\n errorText: {\n margin: \"0\",\n fontSize: \"0.75rem\",\n marginTop: 3,\n textAlign: \"left\",\n fontFamily: \"Lato,sans-serif\",\n fontWeight: 400,\n lineHeight: \"1.66\",\n color: \"#dc1f2e\",\n },\n valueString: {\n maxWidth: 350,\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n marginTop: 2,\n },\n fileReselect: {\n display: \"flex\",\n alignItems: \"center\",\n },\n fieldBottom: {\n borderBottom: \"#9c9c9c 1px solid\",\n },\n fileInputField: {\n margin: \"13px 0\",\n },\n });\n\nconst FileSelector = ({\n label,\n classes,\n onChange,\n id,\n name,\n disabled = false,\n tooltip = \"\",\n required,\n error = \"\",\n accept = \"\",\n value = \"\",\n}: InputBoxProps) => {\n const [showFileSelector, setShowSelector] = useState(false);\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 {showFileSelector || value === \"\" ? (\n
\n {\n const fileName = get(e, \"target.files[0].name\", \"\");\n fileProcess(e, (data: any) => {\n onChange(data, fileName);\n });\n }}\n accept={accept}\n required={required}\n disabled={disabled}\n className={classes.fileInputField}\n />\n\n {value !== \"\" && (\n {\n setShowSelector(false);\n }}\n disableRipple={false}\n disableFocusRipple={false}\n >\n \n \n )}\n\n {error !== \"\" && }\n
\n ) : (\n
\n
{value}
\n {\n setShowSelector(true);\n }}\n disableRipple={false}\n disableFocusRipple={false}\n >\n \n \n
\n )}\n \n
\n );\n};\n\nexport default withStyles(styles)(FileSelector);\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\nexport const fileProcess = (evt: any, callback: any) => {\n const file = evt.target.files[0];\n const reader = new FileReader();\n reader.readAsDataURL(file);\n\n reader.onload = () => {\n // reader.readAsDataURL(file) output will be something like: data:application/x-x509-ca-cert;base64,LS0tLS1CRUdJTiBDRVJUSU\n // we care only about the actual base64 part (everything after \"data:application/x-x509-ca-cert;base64,\")\n const fileBase64 = reader.result;\n if (fileBase64) {\n const fileArray = fileBase64.toString().split(\"base64,\");\n\n if (fileArray.length === 2) {\n callback(fileArray[1]);\n }\n }\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, { Fragment, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button } from \"@material-ui/core\";\nimport api from \"../../../../common/api\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport {\n modalBasic,\n settingsCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FileSelector from \"../../Common/FormComponents/FileSelector/FileSelector\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n ...settingsCommon,\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n customTitle: {\n ...settingsCommon.customTitle,\n marginTop: 0,\n },\n settingsFormContainer: {\n ...settingsCommon.settingsFormContainer,\n height: \"calc(100vh - 422px)\",\n },\n });\n\ninterface IAddNotificationEndpointProps {\n saveAndRefresh: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n classes: any;\n type: string;\n}\n\nconst AddTierConfiguration = ({\n saveAndRefresh,\n classes,\n setErrorSnackMessage,\n type,\n}: IAddNotificationEndpointProps) => {\n //Local States\n const [saving, setSaving] = useState(false);\n\n // Form Items\n const [name, setName] = useState(\"\");\n const [endpoint, setEndpoint] = useState(\"\");\n const [bucket, setBucket] = useState(\"\");\n const [prefix, setPrefix] = useState(\"\");\n const [region, setRegion] = useState(\"\");\n const [storageClass, setStorageClass] = useState(\"\");\n\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n\n const [creds, setCreds] = useState(\"\");\n const [encodedCreds, setEncodedCreds] = useState(\"\");\n\n const [accountName, setAccountName] = useState(\"\");\n const [accountKey, setAccountKey] = useState(\"\");\n\n const [titleSelection, setTitleSelection] = useState(\"\");\n\n // Validations\n const [isFormValid, setIsFormValid] = useState(true);\n\n //Effects\n\n useEffect(() => {\n if (saving) {\n let request = {};\n let fields = {\n name,\n endpoint,\n bucket,\n prefix,\n region,\n };\n\n let tierType = type;\n\n if (type === \"minio\") {\n tierType = \"s3\";\n }\n\n switch (type) {\n case \"minio\":\n case \"s3\":\n request = {\n s3: {\n ...fields,\n accesskey: accessKey,\n secretkey: secretKey,\n storageclass: storageClass,\n },\n };\n break;\n case \"gcs\":\n request = {\n gcs: {\n ...fields,\n creds: encodedCreds,\n },\n };\n break;\n case \"azure\":\n request = {\n azure: {\n ...fields,\n accountname: accountName,\n accountkey: accountKey,\n },\n };\n }\n\n let payload = {\n type: tierType,\n ...request,\n };\n\n api\n .invoke(\"POST\", `/api/v1/admin/tiers`, payload)\n .then(() => {\n setSaving(false);\n saveAndRefresh();\n })\n .catch((err) => {\n setSaving(false);\n setErrorSnackMessage(err);\n });\n }\n }, [\n accessKey,\n accountKey,\n accountName,\n bucket,\n encodedCreds,\n endpoint,\n name,\n prefix,\n region,\n saveAndRefresh,\n saving,\n secretKey,\n setErrorSnackMessage,\n storageClass,\n type,\n ]);\n\n useEffect(() => {\n let valid = true;\n if (type === \"\") {\n valid = false;\n }\n\n if (type === \"\") {\n valid = false;\n }\n if (name === \"\") {\n valid = false;\n }\n if (endpoint === \"\") {\n valid = false;\n }\n if (bucket === \"\") {\n valid = false;\n }\n if (prefix === \"\") {\n valid = false;\n }\n if (region === \"\") {\n valid = false;\n }\n\n if (type === \"s3\" || type === \"minio\") {\n if (accessKey === \"\") {\n valid = false;\n }\n if (secretKey === \"\") {\n valid = false;\n }\n }\n\n if (type === \"gcs\") {\n if (encodedCreds === \"\") {\n valid = false;\n }\n }\n\n if (type === \"azure\") {\n if (accountName === \"\") {\n valid = false;\n }\n if (accountKey === \"\") {\n valid = false;\n }\n }\n\n setIsFormValid(valid);\n }, [\n accessKey,\n accountKey,\n accountName,\n bucket,\n encodedCreds,\n endpoint,\n isFormValid,\n name,\n prefix,\n region,\n secretKey,\n storageClass,\n type,\n ]);\n\n useEffect(() => {\n switch (type) {\n case \"gcs\":\n setEndpoint(\"https://storage.googleapis.com/\");\n setTitleSelection(\"Google Cloud\");\n break;\n case \"s3\":\n setEndpoint(\"https://s3.amazonaws.com\");\n setTitleSelection(\"Amazon S3\");\n break;\n case \"azure\":\n setEndpoint(\"http://blob.core.windows.net\");\n setTitleSelection(\"Azure\");\n break;\n case \"minio\":\n setEndpoint(\"\");\n setTitleSelection(\"MinIO\");\n }\n }, [type]);\n\n //Fetch Actions\n const submitForm = (event: React.FormEvent) => {\n event.preventDefault();\n setSaving(true);\n };\n\n return (\n \n
\n \n {titleSelection} - Add Tier Configuration\n \n \n \n {type !== \"\" && (\n \n ) => {\n setName(e.target.value);\n }}\n />\n ) => {\n setEndpoint(e.target.value);\n }}\n />\n {type === \"s3\" ||\n (type === \"minio\" && (\n \n ) => {\n setAccessKey(e.target.value);\n }}\n />\n ) => {\n setSecretKey(e.target.value);\n }}\n />\n \n ))}\n {type === \"gcs\" && (\n \n {\n setEncodedCreds(encodedValue);\n setCreds(fileName);\n }}\n value={creds}\n />\n \n )}\n {type === \"azure\" && (\n \n ) => {\n setAccountName(e.target.value);\n }}\n />\n ) => {\n setAccountKey(e.target.value);\n }}\n />\n \n )}\n ) => {\n setBucket(e.target.value);\n }}\n />\n ) => {\n setPrefix(e.target.value);\n }}\n />\n ) => {\n setRegion(e.target.value);\n }}\n />\n {type === \"s3\" ||\n (type === \"minio\" && (\n ) => {\n setStorageClass(e.target.value);\n }}\n />\n ))}\n \n )}\n \n \n \n \n \n Save\n \n \n \n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddTierConfiguration));\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, { useState, useEffect, Fragment } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FileSelector from \"../../Common/FormComponents/FileSelector/FileSelector\";\nimport api from \"../../../../common/api\";\nimport { ITierElement } from \"./types\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\n\ninterface ITierCredentialsModal {\n open: boolean;\n closeModalAndRefresh: (refresh: boolean) => any;\n classes: any;\n tierData: ITierElement;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\nconst UpdateTierCredentialsModal = ({\n open,\n closeModalAndRefresh,\n classes,\n tierData,\n setModalErrorSnackMessage,\n}: ITierCredentialsModal) => {\n const [savingTiers, setSavingTiers] = useState(false);\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n\n const [creds, setCreds] = useState(\"\");\n const [encodedCreds, setEncodedCreds] = useState(\"\");\n\n const [accountName, setAccountName] = useState(\"\");\n const [accountKey, setAccountKey] = useState(\"\");\n\n // Validations\n const [isFormValid, setIsFormValid] = useState(true);\n\n const type = get(tierData, \"type\", \"\");\n const name = get(tierData, `${type}.name`, \"\");\n\n useEffect(() => {\n let valid = true;\n\n if (type === \"s3\" || type === \"azure\") {\n if (accountName === \"\" || accountKey === \"\") {\n valid = false;\n }\n } else if (type === \"gcs\") {\n if (encodedCreds === \"\") {\n valid = false;\n }\n }\n setIsFormValid(valid);\n }, [accountKey, accountName, encodedCreds, type]);\n\n const addRecord = () => {\n let rules = {};\n\n if (type === \"s3\" || type === \"azure\") {\n rules = {\n access_key: accountName,\n secret_key: accountKey,\n };\n } else if (type === \"gcs\") {\n rules = {\n creds: encodedCreds,\n };\n }\n if (name !== \"\") {\n api\n .invoke(\"PUT\", `/api/v1/admin/tiers/${type}/${name}/credentials`, rules)\n .then(() => {\n setSavingTiers(false);\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n setSavingTiers(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n setModalErrorSnackMessage(\n \"There was an error retrieving tier information\"\n );\n }\n };\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n title={`Update Credentials - ${type} / ${name}`}\n >\n ) => {\n e.preventDefault();\n setSavingTiers(true);\n addRecord();\n }}\n >\n \n \n {type === \"s3\" && (\n \n ) => {\n setAccessKey(e.target.value);\n }}\n />\n ) => {\n setSecretKey(e.target.value);\n }}\n />\n \n )}\n {type === \"gcs\" && (\n \n {\n setEncodedCreds(encodedValue);\n setCreds(fileName);\n }}\n value={creds}\n />\n \n )}\n {type === \"azure\" && (\n \n ) => {\n setAccountName(e.target.value);\n }}\n />\n ) => {\n setAccountKey(e.target.value);\n }}\n />\n \n )}\n \n \n \n Save\n \n \n {savingTiers && (\n \n \n \n )}\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(UpdateTierCredentialsModal));\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, { useEffect, useState, Fragment } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { IconButton, TextField } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Button from \"@material-ui/core/Button\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n settingsCommon,\n typesSelection,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { CreateIcon } from \"../../../../icons\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport { ITierElement, ITierResponse } from \"./types\";\nimport api from \"../../../../common/api\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport SlideOptions from \"../../Common/SlideOptions/SlideOptions\";\nimport BackSettingsIcon from \"../../../../icons/BackSettingsIcon\";\nimport AddTierConfiguration from \"./AddTierConfiguration\";\nimport UpdateTierCredentiasModal from \"./UpdateTierCredentiasModal\";\nimport RefreshIcon from \"@material-ui/icons/Refresh\";\n\ninterface IListTiersConfig {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...actionsTray,\n ...searchField,\n ...settingsCommon,\n ...typesSelection,\n ...containerForHeader(theme.spacing(4)),\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n iconText: {\n lineHeight: \"24px\",\n },\n customConfigurationPage: {\n height: \"calc(100vh - 410px)\",\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n lambdaContainer: {\n padding: \"15px 0\",\n },\n actionsTray: {\n ...actionsTray.actionsTray,\n padding: \"0 38px\",\n },\n customTitle: {\n ...settingsCommon.customTitle,\n marginTop: 0,\n },\n });\n\nconst ListTiersConfiguration = ({\n classes,\n setErrorSnackMessage,\n}: IListTiersConfig) => {\n const [records, setRecords] = useState([]);\n const [filter, setFilter] = useState(\"\");\n const [isLoading, setIsLoading] = useState(true);\n const [currentPanel, setCurrentPanel] = useState(0);\n const [updateCredentialsOpen, setUpdateCredentialsOpen] = useState(\n false\n );\n const [selectedTier, setSelectedTier] = useState({\n type: \"unsupported\",\n });\n const [type, setType] = useState(\"\");\n\n useEffect(() => {\n if (isLoading) {\n const fetchRecords = () => {\n api\n .invoke(\"GET\", `/api/v1/admin/tiers`)\n .then((res: ITierResponse) => {\n setRecords(res.items || []);\n setIsLoading(false);\n })\n .catch((err) => {\n setErrorSnackMessage(err);\n setIsLoading(false);\n });\n };\n fetchRecords();\n }\n }, [isLoading, setErrorSnackMessage]);\n\n const filteredRecords = records.filter((b: ITierElement) => {\n if (filter === \"\") {\n return true;\n }\n const getItemName = get(b, `${b.type}.name`, \"\");\n const getItemType = get(b, `type`, \"\");\n\n return getItemName.indexOf(filter) >= 0 || getItemType.indexOf(filter) >= 0;\n });\n\n const backClick = () => {\n setCurrentPanel(currentPanel - 1);\n };\n\n const addTier = () => {\n setCurrentPanel(1);\n };\n\n const tierAdded = () => {\n setCurrentPanel(0);\n setIsLoading(true);\n };\n\n const renderTierName = (item: ITierElement) => {\n const name = get(item, `${item.type}.name`, \"\");\n\n if (name !== null) {\n return name;\n }\n\n return \"\";\n };\n\n const renderTierPrefix = (item: ITierElement) => {\n const prefix = get(item, `${item.type}.prefix`, \"\");\n\n if (prefix !== null) {\n return prefix;\n }\n\n return \"\";\n };\n\n const renderTierEndpoint = (item: ITierElement) => {\n const endpoint = get(item, `${item.type}.endpoint`, \"\");\n\n if (endpoint !== null) {\n return endpoint;\n }\n\n return \"\";\n };\n\n const renderTierBucket = (item: ITierElement) => {\n const bucket = get(item, `${item.type}.bucket`, \"\");\n\n if (bucket !== null) {\n return bucket;\n }\n\n return \"\";\n };\n\n const renderTierRegion = (item: ITierElement) => {\n const region = get(item, `${item.type}.region`, \"\");\n\n if (region !== null) {\n return region;\n }\n\n return \"\";\n };\n\n const closeTierCredentials = () => {\n setUpdateCredentialsOpen(false);\n };\n\n const typeSelect = (typeItem: string) => {\n setType(typeItem);\n setCurrentPanel(2);\n };\n\n return (\n \n {updateCredentialsOpen && (\n \n )}\n \n \n \n
\n \n \n \n {\n setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n {\n setIsLoading(true);\n }}\n >\n \n \n }\n onClick={addTier}\n >\n Add Tier\n \n \n \n
\n
\n \n {\n setSelectedTier(tierData);\n setUpdateCredentialsOpen(true);\n },\n },\n ]}\n columns={[\n {\n label: \"Tier Name\",\n elementKey: \"type\",\n renderFunction: renderTierName,\n renderFullObject: true,\n },\n {\n label: \"Type\",\n elementKey: \"type\",\n width: 150,\n },\n {\n label: \"Endpoint\",\n elementKey: \"type\",\n renderFunction: renderTierEndpoint,\n renderFullObject: true,\n },\n {\n label: \"Bucket\",\n elementKey: \"type\",\n renderFunction: renderTierBucket,\n renderFullObject: true,\n },\n {\n label: \"Prefix\",\n elementKey: \"type\",\n renderFunction: renderTierPrefix,\n renderFullObject: true,\n },\n {\n label: \"Region\",\n elementKey: \"type\",\n renderFunction: renderTierRegion,\n renderFullObject: true,\n },\n ]}\n isLoading={isLoading}\n records={filteredRecords}\n entityName=\"Tiers\"\n idField=\"service_name\"\n customPaperHeight={classes.customConfigurationPage}\n noBackground\n />\n \n
\n ,\n \n \n \n \n Back To Tiers\n \n \n \n \n Add Tier Configuration\n \n \n \n \n
\n {\n typeSelect(\"minio\");\n }}\n >\n \n \n {\n typeSelect(\"gcs\");\n }}\n >\n \n \n {\n typeSelect(\"s3\");\n }}\n >\n \n \n {\n typeSelect(\"azure\");\n }}\n >\n \n \n
\n
\n
\n
\n \n
,\n \n \n \n \n Back To Tier Type Selection\n \n \n \n {currentPanel === 2 && (\n \n )}\n \n ,\n ]}\n currentSlide={currentPanel}\n />\n
\n
\n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(ListTiersConfiguration));\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, useState } from \"react\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { Grid } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport Tab from \"@material-ui/core/Tab\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport ConfigurationsList from \"./ConfigurationPanels/ConfigurationsList\";\nimport ListNotificationEndpoints from \"./NotificationEndpoints/ListNotificationEndpoints\";\nimport ListTiersConfiguration from \"./TiersConfiguration/ListTiersConfiguration\";\nimport { AppState } from \"../../../store\";\nimport { connect } from \"react-redux\";\nimport { ISessionResponse } from \"../types\";\n\ninterface IConfigurationMain {\n classes: any;\n session: ISessionResponse;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerLabel: {\n fontSize: 22,\n fontWeight: 600,\n color: \"#000\",\n marginTop: 4,\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst ConfigurationMain = ({ classes, session }: IConfigurationMain) => {\n const [selectedTab, setSelectedTab] = useState(0);\n\n return (\n \n \n \n \n {\n setSelectedTab(newValue);\n }}\n aria-label=\"tenant-tabs\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n \n \n \n \n \n {selectedTab === 0 && (\n \n \n \n )}\n {selectedTab === 1 && (\n \n \n \n )}\n {selectedTab === 2 && (\n \n \n \n )}\n \n \n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n session: state.console.session,\n});\n\nconst connector = connect(mapState, {});\n\nexport default withStyles(styles)(connector(ConfigurationMain));\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, { useState } from \"react\";\nimport get from \"lodash/get\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { Button, TextField } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport AddIcon from \"@material-ui/icons/Add\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport EditConfiguration from \"../CustomForms/EditConfiguration\";\n\ninterface IMatchParams {\n isExact: boolean;\n params: any;\n path: string;\n}\n\ninterface IWebhookPanel {\n match: IMatchParams;\n classes: any;\n}\n\ninterface IWebhook {\n name: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n actionsTray: {\n textAlign: \"right\",\n \"& button\": {\n marginLeft: 10,\n },\n },\n searchField: {\n background: \"#FFFFFF\",\n padding: 12,\n borderRadius: 5,\n boxShadow: \"0px 3px 6px #00000012\",\n },\n iconText: {\n lineHeight: \"24px\",\n },\n });\n\nconst panels = {\n logger: {\n main: \"logger\",\n title: \"Logger Webhook Configuration\",\n modalTitle: \"Logger Webhook\",\n apiURL: \"\",\n configuration: {\n configuration_id: \"logger_webhook\",\n configuration_label: \"Logger Webhook\",\n },\n },\n audit: {\n main: \"audit\",\n title: \"Audit Webhook Configuration\",\n modalTitle: \"Audit Webhook\",\n apiURL: \"\",\n configuration: {\n configuration_id: \"audit_webhook\",\n configuration_label: \"Audit Webhook\",\n },\n },\n};\n\nconst WebhookPanel = ({ match, classes }: IWebhookPanel) => {\n const [addWebhookOpen, setAddWebhookOpen] = useState(false);\n const [filter, setFilter] = useState(\"\");\n const [isLoading, setIsLoading] = useState(false);\n // const [webhooks, setWebhooks] = useState([]);\n\n const pathIn = get(match, \"path\", \"\");\n const panelToDisplay = pathIn.split(\"/\");\n const panelData = get(panels, panelToDisplay[2], false);\n\n if (!panelData) {\n return null;\n }\n\n const webhooks: IWebhook[] = [];\n\n const filteredRecords: IWebhook[] = webhooks.filter((elementItem) =>\n elementItem.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase())\n );\n\n const tableActions = [\n {\n type: \"edit\",\n onClick: () => {},\n },\n ];\n\n return (\n \n {addWebhookOpen && (\n {\n setIsLoading(true);\n setAddWebhookOpen(false);\n }}\n selectedConfiguration={panelData.configuration}\n />\n )}\n \n \n {panelData.title}\n \n \n
\n
\n \n {\n setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n }\n onClick={() => {\n setAddWebhookOpen(true);\n }}\n >\n Add Webhook Configuration\n \n \n \n
\n
\n \n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(WebhookPanel);\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, { useEffect, useState } from \"react\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport api from \"../../../../common/api\";\nimport { ITenant } from \"./types\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { connect } from \"react-redux\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\n\ninterface IDeleteTenant {\n deleteOpen: boolean;\n selectedTenant: ITenant;\n closeDeleteModalAndRefresh: (refreshList: boolean) => any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteTenant = ({\n deleteOpen,\n selectedTenant,\n closeDeleteModalAndRefresh,\n setErrorSnackMessage,\n}: IDeleteTenant) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n const [retypeTenant, setRetypeTenant] = useState(\"\");\n\n useEffect(() => {\n if (deleteLoading) {\n api\n .invoke(\n \"DELETE\",\n `/api/v1/namespaces/${selectedTenant.namespace}/tenants/${selectedTenant.name}`\n )\n .then(() => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [deleteLoading]);\n\n const removeRecord = () => {\n if (retypeTenant !== selectedTenant.name) {\n setErrorSnackMessage(\"Tenant name is not correct\");\n return;\n }\n setDeleteLoading(true);\n };\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete Tenant\n \n {deleteLoading && }\n \n To continue please type {selectedTenant.name} in the box.\n \n ) => {\n setRetypeTenant(event.target.value);\n }}\n label=\"\"\n value={retypeTenant}\n />\n \n \n \n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n \n Delete\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n});\n\nexport default connector(DeleteTenant);\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 { IAffinityModel } from \"../../../../common/types\";\n\nexport const getDefaultAffinity = (tenantName: string, poolName: string) => {\n const defaultAffinity: IAffinityModel = {\n podAntiAffinity: {\n requiredDuringSchedulingIgnoredDuringExecution: [\n {\n labelSelector: {\n matchExpressions: [\n {\n key: \"v1.min.io/tenant\",\n operator: \"In\",\n values: [tenantName],\n },\n {\n key: \"v1.min.io/pool\",\n operator: \"In\",\n values: [poolName],\n },\n ],\n },\n topologyKey: \"kubernetes.io/hostname\",\n },\n ],\n },\n };\n return defaultAffinity;\n};\n\nexport const getNodeSelector = (\n labels: string,\n withPodAntiAffinity: boolean,\n tenantName: string,\n poolName: string\n) => {\n // Labels in the form of key1=value1&key2=value2&key3=value3...\n const splittedLabels = labels.split(\"&\");\n let matchExpressions: any = [];\n\n splittedLabels.forEach((label: string) => {\n const splitKeyValue = label.split(\"=\");\n if (splitKeyValue.length === 2) {\n matchExpressions.push({\n key: splitKeyValue[0],\n operator: \"In\",\n values: [splitKeyValue[1]],\n });\n }\n });\n\n const nodeSelector: IAffinityModel = {\n nodeAffinity: {\n requiredDuringSchedulingIgnoredDuringExecution: {\n nodeSelectorTerms: [\n {\n matchExpressions: matchExpressions,\n },\n ],\n },\n },\n };\n if (withPodAntiAffinity) {\n const def = getDefaultAffinity(tenantName, poolName);\n nodeSelector.podAntiAffinity = def.podAntiAffinity;\n }\n console.log(nodeSelector);\n return nodeSelector;\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 { IErasureCodeCalc } from \"../../../common/types\";\nimport { IMemorySize } from \"./ListTenants/types\";\nimport { KeyPair, Opts } from \"./ListTenants/utils\";\n\nexport const ADD_TENANT_SET_CURRENT_PAGE = \"ADD_TENANT/SET_CURRENT_PAGE\";\nexport const ADD_TENANT_SET_ADVANCED_MODE = \"ADD_TENANT/SET_ADVANCED_MODE\";\nexport const ADD_TENANT_UPDATE_FIELD = \"ADD_TENANT/UPDATE_FIELD\";\nexport const ADD_TENANT_SET_PAGE_VALID = \"ADD_TENANT/SET_PAGE_VALID\";\nexport const ADD_TENANT_RESET_FORM = \"ADD_TENANT/RESET_FORM\";\n\n// Name Tenant\nexport const ADD_TENANT_SET_STORAGE_CLASSES_LIST =\n \"ADD_TENANT/SET_STORAGE_CLASSES_LIST\";\nexport const ADD_TENANT_SET_LIMIT_SIZE = \"ADD_TENANT/SET_LIMIT_SIZE\";\n\n// Security\nexport const ADD_TENANT_ADD_MINIO_KEYPAIR = \"ADD_TENANT/ADD_MINIO_KEYPAIR\";\nexport const ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR =\n \"ADD_TENANT/ADD_FILE_MINIO_KEYPAIR\";\nexport const ADD_TENANT_DELETE_MINIO_KEYPAIR =\n \"ADD_TENANT/DELETE_MINIO_KEYPAIR\";\nexport const ADD_TENANT_ADD_CA_KEYPAIR = \"ADD_TENANT/ADD_CA_KEYPAIR\";\nexport const ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR =\n \"ADD_TENANT/ADD_FILE_TO_CA_KEYPAIR\";\nexport const ADD_TENANT_DELETE_CA_KEYPAIR = \"ADD_TENANT/DELETE_CA_KEYPAIR\";\nexport const ADD_TENANT_ADD_CONSOLE_CERT = \"ADD_TENANT/ADD_CONSOLE_CERT\";\n\n// Encryption\nexport const ADD_TENANT_ENCRYPTION_SERVER_CERT =\n \"ADD_TENANT/ENCRYPTION_SERVER_CERT\";\nexport const ADD_TENANT_ENCRYPTION_CLIENT_CERT =\n \"ADD_TENANT/ENCRYPTION_CLIENT_CERT\";\nexport const ADD_TENANT_ENCRYPTION_VAULT_CERT =\n \"ADD_TENANT/ENCRYPTION_VAULT_CERT\";\nexport const ADD_TENANT_ENCRYPTION_VAULT_CA = \"ADD_TENANT/ENCRYPTION_VAULT_CA\";\nexport const ADD_TENANT_ENCRYPTION_GEMALTO_CA =\n \"ADD_TENANT/ENCRYPTION_GEMALTO_CA\";\n\nexport interface ICreateTenant {\n page: number;\n validPages: string[];\n advancedModeOn: boolean;\n storageClasses: Opts[];\n limitSize: any;\n fields: IFieldStore;\n certificates: ICertificatesItems;\n}\n\nexport interface ICertificatesItems {\n minioCertificates: KeyPair[];\n caCertificates: KeyPair[];\n consoleCertificate: KeyPair;\n serverCertificate: KeyPair;\n clientCertificate: KeyPair;\n vaultCertificate: KeyPair;\n vaultCA: KeyPair;\n gemaltoCA: KeyPair;\n}\n\nexport interface IFieldStore {\n nameTenant: INameTenantFields;\n configure: IConfigureFields;\n identityProvider: IIdentityProviderFields;\n security: ISecurityFields;\n encryption: IEncryptionFields;\n tenantSize: ITenantSizeFields;\n affinity: ITenantAffinity;\n}\n\nexport interface INameTenantFields {\n tenantName: string;\n namespace: string;\n selectedStorageClass: string;\n}\n\nexport interface IConfigureFields {\n customImage: boolean;\n imageName: string;\n consoleImage: string;\n customDockerhub: boolean;\n imageRegistry: string;\n imageRegistryUsername: string;\n imageRegistryPassword: string;\n exposeMinIO: boolean;\n exposeConsole: boolean;\n prometheusCustom: boolean;\n logSearchCustom: boolean;\n logSearchVolumeSize: string;\n logSearchSizeFactor: string;\n logSearchSelectedStorageClass: string;\n logSearchImage: string;\n kesImage: string;\n logSearchPostgresImage: string;\n prometheusVolumeSize: string;\n prometheusSizeFactor: string;\n prometheusSelectedStorageClass: string;\n prometheusImage: string;\n}\n\nexport interface IIdentityProviderFields {\n idpSelection: string;\n accessKeys: string[];\n secretKeys: string[];\n openIDURL: string;\n openIDClientID: string;\n openIDSecretID: string;\n ADURL: string;\n ADSkipTLS: boolean;\n ADServerInsecure: boolean;\n ADUserNameFilter: string;\n ADGroupBaseDN: string;\n ADGroupSearchFilter: string;\n ADNameAttribute: string;\n}\n\nexport interface ISecurityFields {\n enableTLS: boolean;\n enableAutoCert: boolean;\n enableCustomCerts: boolean;\n}\n\nexport interface IEncryptionFields {\n enableEncryption: boolean;\n encryptionType: string;\n gemaltoEndpoint: string;\n gemaltoToken: string;\n gemaltoDomain: string;\n gemaltoRetry: string;\n awsEndpoint: string;\n awsRegion: string;\n awsKMSKey: string;\n awsAccessKey: string;\n awsSecretKey: string;\n awsToken: string;\n vaultEndpoint: string;\n vaultEngine: string;\n vaultNamespace: string;\n vaultPrefix: string;\n vaultAppRoleEngine: string;\n vaultId: string;\n vaultSecret: string;\n vaultRetry: string;\n vaultPing: string;\n gcpProjectID: string;\n gcpEndpoint: string;\n gcpClientEmail: string;\n gcpClientID: string;\n gcpPrivateKeyID: string;\n gcpPrivateKey: string;\n enableCustomCertsForKES: boolean;\n}\n\nexport interface ITenantSizeFields {\n volumeSize: string;\n sizeFactor: string;\n drivesPerServer: string;\n nodes: string;\n memoryNode: string;\n ecParity: string;\n ecParityChoices: Opts[];\n cleanECChoices: string[];\n maxAllocableMemo: number;\n memorySize: IMemorySize;\n distribution: any;\n ecParityCalc: IErasureCodeCalc;\n limitSize: any;\n}\n\nexport interface ITenantAffinity {\n podAffinity: \"default\" | \"nodeSelector\" | \"none\";\n nodeSelectorLabels: string;\n withPodAntiAffinity: boolean;\n}\n\nexport interface ITenantState {\n createTenant: ICreateTenant;\n}\n\nexport interface ILabelKeyPair {\n labelKey: string;\n labelValue: string;\n}\n\ninterface SetTenantWizardPage {\n type: typeof ADD_TENANT_SET_CURRENT_PAGE;\n page: number;\n}\n\ninterface SetAdvancedMode {\n type: typeof ADD_TENANT_SET_ADVANCED_MODE;\n state: boolean;\n}\n\ninterface UpdateATField {\n type: typeof ADD_TENANT_UPDATE_FIELD;\n pageName: keyof IFieldStore;\n field: keyof FieldsToHandle;\n value: any;\n}\n\ninterface SetPageValid {\n type: typeof ADD_TENANT_SET_PAGE_VALID;\n pageName: keyof IFieldStore;\n valid: boolean;\n}\n\ninterface SetStorageClassesList {\n type: typeof ADD_TENANT_SET_STORAGE_CLASSES_LIST;\n storageClasses: Opts[];\n}\n\ninterface SetLimitSize {\n type: typeof ADD_TENANT_SET_LIMIT_SIZE;\n limitSize: any;\n}\n\ninterface AddMinioKeyPair {\n type: typeof ADD_TENANT_ADD_MINIO_KEYPAIR;\n}\n\ninterface AddFileToMinioKeyPair {\n type: typeof ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR;\n id: string;\n key: string;\n fileName: string;\n value: string;\n}\n\ninterface DeleteMinioKeyPair {\n type: typeof ADD_TENANT_DELETE_MINIO_KEYPAIR;\n id: string;\n}\ninterface AddCAKeyPair {\n type: typeof ADD_TENANT_ADD_CA_KEYPAIR;\n}\n\ninterface AddFileToCAKeyPair {\n type: typeof ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR;\n id: string;\n key: string;\n fileName: string;\n value: string;\n}\n\ninterface DeleteCAKeyPair {\n type: typeof ADD_TENANT_DELETE_CA_KEYPAIR;\n id: string;\n}\n\ninterface AddFileConsoleCert {\n type: typeof ADD_TENANT_ADD_CONSOLE_CERT;\n key: string;\n fileName: string;\n value: string;\n}\n\n// Encryption Certs\ninterface AddFileServerCert {\n type: typeof ADD_TENANT_ENCRYPTION_SERVER_CERT;\n key: string;\n fileName: string;\n value: string;\n}\n\ninterface AddFileClientCert {\n type: typeof ADD_TENANT_ENCRYPTION_CLIENT_CERT;\n key: string;\n fileName: string;\n value: string;\n}\n\ninterface AddFileVaultCert {\n type: typeof ADD_TENANT_ENCRYPTION_VAULT_CERT;\n key: string;\n fileName: string;\n value: string;\n}\n\ninterface AddFileVaultCa {\n type: typeof ADD_TENANT_ENCRYPTION_VAULT_CA;\n fileName: string;\n value: string;\n}\n\ninterface AddFileGemaltoCa {\n type: typeof ADD_TENANT_ENCRYPTION_GEMALTO_CA;\n fileName: string;\n value: string;\n}\n\ninterface ResetForm {\n type: typeof ADD_TENANT_RESET_FORM;\n}\n\nexport type FieldsToHandle = INameTenantFields;\n\nexport type TenantsManagementTypes =\n | SetTenantWizardPage\n | SetAdvancedMode\n | UpdateATField\n | SetPageValid\n | SetStorageClassesList\n | SetLimitSize\n | AddMinioKeyPair\n | DeleteMinioKeyPair\n | AddCAKeyPair\n | DeleteCAKeyPair\n | AddFileConsoleCert\n | AddFileToMinioKeyPair\n | AddFileToCAKeyPair\n | AddFileServerCert\n | AddFileClientCert\n | AddFileVaultCert\n | AddFileVaultCa\n | AddFileGemaltoCa\n | ResetForm;\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 { Opts } from \"./ListTenants/utils\";\nimport {\n ADD_TENANT_SET_ADVANCED_MODE,\n ADD_TENANT_SET_CURRENT_PAGE,\n ADD_TENANT_UPDATE_FIELD,\n ADD_TENANT_SET_PAGE_VALID,\n ADD_TENANT_SET_STORAGE_CLASSES_LIST,\n ADD_TENANT_SET_LIMIT_SIZE,\n ADD_TENANT_ADD_CA_KEYPAIR,\n ADD_TENANT_DELETE_CA_KEYPAIR,\n ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR,\n ADD_TENANT_ADD_MINIO_KEYPAIR,\n ADD_TENANT_DELETE_MINIO_KEYPAIR,\n ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR,\n ADD_TENANT_ADD_CONSOLE_CERT,\n ADD_TENANT_ENCRYPTION_SERVER_CERT,\n ADD_TENANT_ENCRYPTION_CLIENT_CERT,\n ADD_TENANT_ENCRYPTION_VAULT_CERT,\n ADD_TENANT_ENCRYPTION_VAULT_CA,\n ADD_TENANT_ENCRYPTION_GEMALTO_CA,\n ADD_TENANT_RESET_FORM,\n} from \"./types\";\n\n// Basic actions\nexport const setWizardPage = (page: number) => {\n return {\n type: ADD_TENANT_SET_CURRENT_PAGE,\n page,\n };\n};\n\nexport const setAdvancedMode = (state: boolean) => {\n return {\n type: ADD_TENANT_SET_ADVANCED_MODE,\n state,\n };\n};\n\nexport const updateAddField = (\n pageName: string,\n fieldName: string,\n value: any\n) => {\n return {\n type: ADD_TENANT_UPDATE_FIELD,\n pageName,\n field: fieldName,\n value,\n };\n};\n\nexport const isPageValid = (pageName: string, valid: boolean) => {\n return {\n type: ADD_TENANT_SET_PAGE_VALID,\n pageName,\n valid,\n };\n};\n\n// Name Tenant actions\n\nexport const setStorageClassesList = (storageClasses: Opts[]) => {\n return {\n type: ADD_TENANT_SET_STORAGE_CLASSES_LIST,\n storageClasses,\n };\n};\n\nexport const setLimitSize = (limitSize: any) => {\n return {\n type: ADD_TENANT_SET_LIMIT_SIZE,\n limitSize,\n };\n};\n\n// Security actions\n\nexport const addCaCertificate = () => {\n return {\n type: ADD_TENANT_ADD_CA_KEYPAIR,\n };\n};\n\nexport const deleteCaCertificate = (id: string) => {\n return {\n type: ADD_TENANT_DELETE_CA_KEYPAIR,\n id,\n };\n};\n\nexport const addFileToCaCertificates = (\n id: string,\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR,\n id,\n key,\n fileName,\n value,\n };\n};\n\nexport const addKeyPair = () => {\n return {\n type: ADD_TENANT_ADD_MINIO_KEYPAIR,\n };\n};\n\nexport const deleteKeyPair = (id: string) => {\n return {\n type: ADD_TENANT_DELETE_MINIO_KEYPAIR,\n id,\n };\n};\n\nexport const addFileToKeyPair = (\n id: string,\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR,\n id,\n key,\n fileName,\n value,\n };\n};\n\nexport const addConsoleCertificate = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_CONSOLE_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileServerCert = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ENCRYPTION_SERVER_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileClientCert = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ENCRYPTION_CLIENT_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileVaultCert = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ENCRYPTION_VAULT_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileVaultCa = (fileName: string, value: string) => {\n return {\n type: ADD_TENANT_ENCRYPTION_VAULT_CA,\n fileName,\n value,\n };\n};\n\nexport const addFileGemaltoCa = (fileName: string, value: string) => {\n return {\n type: ADD_TENANT_ENCRYPTION_GEMALTO_CA,\n fileName,\n value,\n };\n};\n\nexport const resetAddTenantForm = () => {\n return {\n type: ADD_TENANT_RESET_FORM,\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\nexport interface IValidation {\n fieldKey: string;\n required: boolean;\n pattern?: RegExp;\n customPatternMessage?: string;\n customValidation?: boolean; // The validation to trigger the error\n customValidationMessage?: string;\n value: string;\n}\n\nexport const commonFormValidation = (fieldsValidate: IValidation[]) => {\n let returnErrors: any = {};\n\n fieldsValidate.forEach((field) => {\n if (field.required && field.value.trim() === \"\") {\n returnErrors[field.fieldKey] = \"Field cannot be empty\";\n return;\n }\n // if it's not required and the value is empty, we are done here\n if (!field.required && field.value.trim() === \"\") {\n return;\n }\n\n if (field.customValidation && field.customValidationMessage) {\n returnErrors[field.fieldKey] = field.customValidationMessage;\n return;\n }\n\n if (field.pattern && field.customPatternMessage) {\n const rgx = new RegExp(field.pattern, \"g\");\n\n if (!field.value.match(rgx)) {\n returnErrors[field.fieldKey] = field.customPatternMessage;\n }\n return;\n }\n });\n\n return returnErrors;\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\nexport const clearValidationError = (\n validationErrors: any,\n fieldKey: string\n) => {\n const newValidationElement = { ...validationErrors };\n delete newValidationElement[fieldKey];\n\n return newValidationElement;\n};\n\n// Generates a valid access/secret key string\nexport const getRandomString = function (length = 16): string {\n let retval = \"\";\n let legalcharacters =\n \"1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n for (let i = 0; i < length; i++) {\n retval +=\n legalcharacters[Math.floor(Math.random() * legalcharacters.length)];\n }\n return retval;\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, { useEffect, useState, useMemo, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport get from \"lodash/get\";\nimport debounce from \"lodash/debounce\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../../actions\";\nimport {\n setAdvancedMode,\n updateAddField,\n isPageValid,\n setStorageClassesList,\n setLimitSize,\n} from \"../../actions\";\nimport {\n IQuotaElement,\n IQuotas,\n Opts,\n getLimitSizes,\n} from \"../../ListTenants/utils\";\nimport { AppState } from \"../../../../../store\";\nimport { commonFormValidation } from \"../../../../../utils/validationFunctions\";\nimport { clearValidationError } from \"../../utils\";\nimport api from \"../../../../../common/api\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\ninterface INameTenantScreen {\n classes: any;\n storageClasses: Opts[];\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n setAdvancedMode: typeof setAdvancedMode;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n setStorageClassesList: typeof setStorageClassesList;\n setLimitSize: typeof setLimitSize;\n tenantName: string;\n namespace: string;\n selectedStorageClass: string;\n advancedMode: boolean;\n}\n\nconst NameTenant = ({\n classes,\n storageClasses,\n advancedMode,\n tenantName,\n namespace,\n selectedStorageClass,\n setAdvancedMode,\n updateAddField,\n setStorageClassesList,\n setLimitSize,\n isPageValid,\n setModalErrorSnackMessage,\n}: INameTenantScreen) => {\n const [validationErrors, setValidationErrors] = useState({});\n const [emptyNamespace, setEmptyNamespace] = useState(true);\n const [loadingNamespaceInfo, setLoadingNamespaceInfo] =\n useState(false);\n\n // Common\n const updateField = useCallback(\n (field: string, value: string) => {\n updateAddField(\"nameTenant\", field, value);\n },\n [updateAddField]\n );\n\n // Storage classes retrieval\n const getNamespaceInformation = useCallback(() => {\n updateField(\"selectedStorageClass\", \"\");\n\n setStorageClassesList([]);\n\n // Empty tenantValidation\n api\n .invoke(\"GET\", `/api/v1/namespaces/${namespace}/tenants`)\n .then((res: any[]) => {\n const tenantsList = get(res, \"tenants\", []);\n\n if (tenantsList && tenantsList.length > 0) {\n setEmptyNamespace(false);\n setLoadingNamespaceInfo(false);\n return;\n }\n setEmptyNamespace(true);\n\n // Storagequotas retrieval\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${namespace}/resourcequotas/${namespace}-storagequota`\n )\n .then((res: IQuotas) => {\n const elements: IQuotaElement[] = get(res, \"elements\", []);\n setLimitSize(getLimitSizes(res));\n\n const newStorage = elements.map((storageClass: any) => {\n const name = get(storageClass, \"name\", \"\").split(\n \".storageclass.storage.k8s.io/requests.storage\"\n )[0];\n\n return { label: name, value: name };\n });\n\n setStorageClassesList(newStorage);\n if (newStorage.length > 0) {\n updateField(\"selectedStorageClass\", newStorage[0].value);\n }\n setLoadingNamespaceInfo(false);\n })\n .catch((err: any) => {\n setLoadingNamespaceInfo(false);\n console.error(\"Namespace error: \", err);\n });\n })\n .catch((err: any) => {\n console.error(err);\n setModalErrorSnackMessage(\n \"Error validating if namespace already has tenants\"\n );\n });\n }, [\n namespace,\n setLimitSize,\n setModalErrorSnackMessage,\n setStorageClassesList,\n updateField,\n ]);\n\n const debounceNamespace = useMemo(\n () => debounce(getNamespaceInformation, 500),\n [getNamespaceInformation]\n );\n\n useEffect(() => {\n if (namespace !== \"\") {\n debounceNamespace();\n setLoadingNamespaceInfo(true);\n\n // Cancel previous debounce calls during useEffect cleanup.\n return debounceNamespace.cancel;\n }\n }, [debounceNamespace, namespace]);\n\n // Validation\n useEffect(() => {\n let customNamespaceError = false;\n let errorMessage = \"\";\n\n if (!emptyNamespace && !loadingNamespaceInfo) {\n customNamespaceError = true;\n errorMessage = \"You can only create one tenant per namespace\";\n } else if (\n storageClasses.length < 1 &&\n emptyNamespace &&\n !loadingNamespaceInfo\n ) {\n customNamespaceError = true;\n errorMessage = \"Please enter a valid namespace\";\n }\n\n const commonValidation = commonFormValidation([\n {\n fieldKey: \"tenant-name\",\n required: true,\n pattern: /^[a-z0-9-]{3,63}$/,\n customPatternMessage:\n \"Name only can contain lowercase letters, numbers and '-'. Min. Length: 3\",\n value: tenantName,\n },\n {\n fieldKey: \"namespace\",\n required: true,\n value: namespace,\n customValidation: customNamespaceError,\n customValidationMessage: errorMessage,\n },\n ]);\n\n const isValid =\n !(\"tenant-name\" in commonValidation) &&\n !(\"namespace\" in commonValidation) &&\n storageClasses.length > 0;\n\n isPageValid(\"nameTenant\", isValid);\n\n setValidationErrors(commonValidation);\n }, [\n storageClasses,\n namespace,\n tenantName,\n isPageValid,\n emptyNamespace,\n loadingNamespaceInfo,\n ]);\n\n const frmValidationCleanup = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n return (\n \n
\n

Name Tenant

\n \n How would you like to name this new tenant?\n \n
\n \n ) => {\n updateField(\"tenantName\", e.target.value);\n frmValidationCleanup(\"tenant-name\");\n }}\n label=\"Name\"\n value={tenantName}\n required\n error={validationErrors[\"tenant-name\"] || \"\"}\n />\n \n \n ) => {\n updateField(\"namespace\", e.target.value);\n frmValidationCleanup(\"namespace\");\n }}\n label=\"Namespace\"\n value={namespace}\n error={validationErrors[\"namespace\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"selectedStorageClass\", e.target.value as string);\n }}\n label=\"Storage Class\"\n value={selectedStorageClass}\n options={storageClasses}\n disabled={storageClasses.length < 1}\n />\n \n \n
\n \n Check 'Advanced Mode' for additional configuration options, such as\n configuring an Identity Provider, Encryption at rest, and customized\n TLS/SSL Certificates.\n
\n Leave 'Advanced Mode' unchecked to use the secure default settings for\n the tenant.\n
\n
\n
\n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n setAdvancedMode(checked);\n }}\n label={\"Advanced Mode\"}\n />\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n advancedMode: state.tenants.createTenant.advancedModeOn,\n tenantName: state.tenants.createTenant.fields.nameTenant.tenantName,\n namespace: state.tenants.createTenant.fields.nameTenant.namespace,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n storageClasses: state.tenants.createTenant.storageClasses,\n});\n\nconst connector = connect(mapState, {\n setModalErrorSnackMessage,\n setAdvancedMode,\n updateAddField,\n setStorageClassesList,\n setLimitSize,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(NameTenant));\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 get from \"lodash/get\";\n\nexport interface Opts {\n label: string;\n value: string;\n}\n\nexport interface IQuotaElement {\n hard: number;\n name: string;\n}\n\nexport interface IQuotas {\n elements?: IQuotaElement[];\n name: string;\n}\n\nexport const minMemReq = 2147483648;\n\nexport interface KeyPair {\n id: string;\n encoded_cert: string;\n encoded_key: string;\n cert: string;\n key: string;\n}\n\nexport const ecListTransform = (ecList: string[]): Opts[] => {\n return ecList.map((value) => {\n return { label: value, value };\n });\n};\n\nexport const getLimitSizes = (resourceQuotas: IQuotas) => {\n const quotas: IQuotaElement[] = get(resourceQuotas, \"elements\", []);\n\n const returnQuotas: any = {};\n\n quotas.forEach((rsQuota) => {\n const stCName = rsQuota.name.split(\n \".storageclass.storage.k8s.io/requests.storage\"\n )[0];\n const hard = get(rsQuota, \"hard\", 0);\n const used = get(rsQuota, \"used\", 0);\n\n returnQuotas[stCName] = hard - used;\n });\n\n return returnQuotas;\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, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Grid } from \"@material-ui/core\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { isPageValid, updateAddField } from \"../../actions\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError } from \"../../utils\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\n\ninterface IConfigureProps {\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n storageClasses: any;\n classes: any;\n customImage: boolean;\n imageName: string;\n consoleImage: string;\n customDockerhub: boolean;\n imageRegistry: string;\n imageRegistryUsername: string;\n imageRegistryPassword: string;\n exposeMinIO: boolean;\n exposeConsole: boolean;\n prometheusCustom: boolean;\n logSearchCustom: boolean;\n logSearchVolumeSize: string;\n logSearchSizeFactor: string;\n prometheusVolumeSize: string;\n prometheusSizeFactor: string;\n logSearchSelectedStorageClass: string;\n logSearchImage: string;\n kesImage: string;\n logSearchPostgresImage: string;\n prometheusSelectedStorageClass: string;\n prometheusImage: string;\n selectedStorageClass: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Configure = ({\n classes,\n storageClasses,\n customImage,\n imageName,\n consoleImage,\n customDockerhub,\n imageRegistry,\n imageRegistryUsername,\n imageRegistryPassword,\n exposeMinIO,\n exposeConsole,\n prometheusCustom,\n logSearchCustom,\n logSearchVolumeSize,\n logSearchSizeFactor,\n logSearchImage,\n kesImage,\n logSearchPostgresImage,\n prometheusVolumeSize,\n prometheusSizeFactor,\n logSearchSelectedStorageClass,\n prometheusSelectedStorageClass,\n prometheusImage,\n updateAddField,\n isPageValid,\n selectedStorageClass,\n}: IConfigureProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"configure\", field, value);\n },\n [updateAddField]\n );\n\n // Validation\n useEffect(() => {\n let customAccountValidation: IValidation[] = [];\n\n if (prometheusCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"prometheus_storage_class\",\n required: true,\n value: prometheusSelectedStorageClass,\n customValidation: prometheusSelectedStorageClass === \"\",\n customValidationMessage: \"Field cannot be empty\",\n },\n {\n fieldKey: \"prometheus_volume_size\",\n required: true,\n value: prometheusVolumeSize,\n customValidation:\n prometheusVolumeSize === \"\" || parseInt(prometheusVolumeSize) <= 0,\n customValidationMessage: `Volume size must be present and be greatter than 0`,\n },\n ];\n }\n if (logSearchCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"log_search_storage_class\",\n required: true,\n value: logSearchSelectedStorageClass,\n customValidation: logSearchSelectedStorageClass === \"\",\n customValidationMessage: \"Field cannot be empty\",\n },\n {\n fieldKey: \"log_search_volume_size\",\n required: true,\n value: logSearchVolumeSize,\n customValidation:\n logSearchVolumeSize === \"\" || parseInt(logSearchVolumeSize) <= 0,\n customValidationMessage: `Volume size must be present and be greatter than 0`,\n },\n ];\n }\n\n if (customImage) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"image\",\n required: false,\n value: imageName,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage: \"Format must be of form: 'minio/minio:VERSION'\",\n },\n {\n fieldKey: \"consoleImage\",\n required: false,\n value: consoleImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/console:VERSION'\",\n },\n {\n fieldKey: \"logSearchImage\",\n required: false,\n value: logSearchImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/logsearchapi:VERSION'\",\n },\n {\n fieldKey: \"kesImage\",\n required: false,\n value: kesImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage: \"Format must be of form: 'minio/kes:VERSION'\",\n },\n {\n fieldKey: \"logSearchPostgresImage\",\n required: false,\n value: logSearchPostgresImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/postgres:VERSION'\",\n },\n {\n fieldKey: \"prometheusImage\",\n required: false,\n value: prometheusImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/prometheus:VERSION'\",\n },\n ];\n if (customDockerhub) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"registry\",\n required: true,\n value: imageRegistry,\n },\n {\n fieldKey: \"registryUsername\",\n required: true,\n value: imageRegistryUsername,\n },\n {\n fieldKey: \"registryPassword\",\n required: true,\n value: imageRegistryPassword,\n },\n ];\n }\n }\n\n const commonVal = commonFormValidation(customAccountValidation);\n\n isPageValid(\"configure\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n customImage,\n imageName,\n consoleImage,\n logSearchImage,\n kesImage,\n logSearchPostgresImage,\n prometheusImage,\n customDockerhub,\n imageRegistry,\n imageRegistryUsername,\n imageRegistryPassword,\n isPageValid,\n prometheusCustom,\n logSearchCustom,\n prometheusSelectedStorageClass,\n prometheusVolumeSize,\n logSearchSelectedStorageClass,\n logSearchVolumeSize,\n ]);\n\n useEffect(() => {\n // New default values is current selection is invalid\n if (storageClasses.length > 0) {\n const filterPrometheus = storageClasses.filter(\n (item: any) => item.value === prometheusSelectedStorageClass\n );\n if (filterPrometheus.length === 0) {\n updateField(\"prometheusSelectedStorageClass\", selectedStorageClass);\n }\n\n const filterLogSearch = storageClasses.filter(\n (item: any) => item.value === logSearchSelectedStorageClass\n );\n if (filterLogSearch.length === 0) {\n updateField(\"logSearchSelectedStorageClass\", selectedStorageClass);\n }\n }\n }, [\n logSearchSelectedStorageClass,\n prometheusSelectedStorageClass,\n selectedStorageClass,\n storageClasses,\n updateField,\n ]);\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n return (\n \n
\n

Configure

\n \n Basic configurations for tenant management\n \n
\n\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"customImage\", checked);\n }}\n label={\"Use custom image\"}\n />\n \n {customImage && (\n \n Please enter the MinIO docker image to use\n \n ) => {\n updateField(\"imageName\", e.target.value);\n cleanValidation(\"image\");\n }}\n label=\"MinIO's Image\"\n value={imageName}\n error={validationErrors[\"image\"] || \"\"}\n placeholder=\"E.g. minio/minio:RELEASE.2021-04-22T15-44-28Z\"\n />\n \n \n ) => {\n updateField(\"consoleImage\", e.target.value);\n cleanValidation(\"consoleImage\");\n }}\n label=\"Console's Image\"\n value={consoleImage}\n error={validationErrors[\"consoleImage\"] || \"\"}\n placeholder=\"E.g. minio/console:v0.7.1\"\n />\n \n \n ) => {\n updateField(\"logSearchImage\", e.target.value);\n cleanValidation(\"logSearchImage\");\n }}\n label=\"Log Search API's Image\"\n value={logSearchImage}\n error={validationErrors[\"logSearchImage\"] || \"\"}\n placeholder=\"E.g. minio/logsearchapi:v4.0.9\"\n />\n \n \n ) => {\n updateField(\"kesImage\", e.target.value);\n cleanValidation(\"kesImage\");\n }}\n label=\"KES Image\"\n value={kesImage}\n error={validationErrors[\"kesImage\"] || \"\"}\n placeholder=\"E.g. minio/kes:v0.14.0\"\n />\n \n \n ) => {\n updateField(\"logSearchPostgresImage\", e.target.value);\n cleanValidation(\"logSearchPostgresImage\");\n }}\n label=\"Log Search Postgres's Image\"\n value={logSearchPostgresImage}\n error={validationErrors[\"logSearchPostgresImage\"] || \"\"}\n placeholder=\"E.g. library/postgres:13\"\n />\n \n \n ) => {\n updateField(\"prometheusImage\", e.target.value);\n cleanValidation(\"prometheusImage\");\n }}\n label=\"Prometheus Image\"\n value={prometheusImage}\n error={validationErrors[\"prometheusImage\"] || \"\"}\n placeholder=\"E.g. quay.io/prometheus/prometheus:latest\"\n />\n \n \n )}\n {customImage && (\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"customDockerhub\", checked);\n }}\n label={\"Set/Update Image Registry\"}\n />\n \n \n )}\n {customDockerhub && (\n \n \n ) => {\n updateField(\"imageRegistry\", e.target.value);\n }}\n label=\"Endpoint\"\n value={imageRegistry}\n error={validationErrors[\"registry\"] || \"\"}\n placeholder=\"E.g. https://index.docker.io/v1/\"\n required\n />\n \n \n ) => {\n updateField(\"imageRegistryUsername\", e.target.value);\n }}\n label=\"Username\"\n value={imageRegistryUsername}\n error={validationErrors[\"registryUsername\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"imageRegistryPassword\", e.target.value);\n }}\n label=\"Password\"\n value={imageRegistryPassword}\n error={validationErrors[\"registryPassword\"] || \"\"}\n required\n />\n \n \n )}\n
\n

Expose Services

\n \n Whether the tenant's services should request an external IP.\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"exposeMinIO\", checked);\n }}\n label={\"Expose MiniO Service\"}\n />\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"exposeConsole\", checked);\n }}\n label={\"Expose Console Service\"}\n />\n \n\n
\n

Additional Configurations

\n \n Configure Storage Classes & Storage size for Log Search and Prometheus\n add-ons\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"logSearchCustom\", checked);\n }}\n label={\"Override Log Search defaults\"}\n />\n \n {logSearchCustom && (\n \n \n ) => {\n updateField(\n \"logSearchSelectedStorageClass\",\n e.target.value as string\n );\n }}\n label=\"Log Search Storage Class\"\n value={logSearchSelectedStorageClass}\n options={storageClasses}\n disabled={storageClasses.length < 1}\n />\n \n \n
\n
\n ) => {\n updateField(\"logSearchVolumeSize\", e.target.value);\n cleanValidation(\"log_search_volume_size\");\n }}\n label=\"Storage Size [Gi]\"\n value={logSearchVolumeSize}\n required\n error={validationErrors[\"log_search_volume_size\"] || \"\"}\n min=\"0\"\n />\n
\n
\n
\n
\n
\n )}\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"prometheusCustom\", checked);\n }}\n label={\"Override Prometheus defaults\"}\n />\n \n {prometheusCustom && (\n \n \n ) => {\n updateField(\n \"prometheusSelectedStorageClass\",\n e.target.value as string\n );\n }}\n label=\"Prometheus Storage Class\"\n value={prometheusSelectedStorageClass}\n options={storageClasses}\n disabled={storageClasses.length < 1}\n />\n \n \n
\n
\n ) => {\n updateField(\"prometheusVolumeSize\", e.target.value);\n cleanValidation(\"prometheus_volume_size\");\n }}\n label=\"Storage Size [Gi]\"\n value={prometheusVolumeSize}\n required\n error={validationErrors[\"prometheus_volume_size\"] || \"\"}\n min=\"0\"\n />\n
\n
\n
\n
\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n storageClasses: state.tenants.createTenant.storageClasses,\n customImage: state.tenants.createTenant.fields.configure.customImage,\n imageName: state.tenants.createTenant.fields.configure.imageName,\n consoleImage: state.tenants.createTenant.fields.configure.consoleImage,\n customDockerhub: state.tenants.createTenant.fields.configure.customDockerhub,\n imageRegistry: state.tenants.createTenant.fields.configure.imageRegistry,\n imageRegistryUsername:\n state.tenants.createTenant.fields.configure.imageRegistryUsername,\n imageRegistryPassword:\n state.tenants.createTenant.fields.configure.imageRegistryPassword,\n exposeMinIO: state.tenants.createTenant.fields.configure.exposeMinIO,\n exposeConsole: state.tenants.createTenant.fields.configure.exposeConsole,\n prometheusCustom:\n state.tenants.createTenant.fields.configure.prometheusCustom,\n logSearchCustom: state.tenants.createTenant.fields.configure.logSearchCustom,\n logSearchVolumeSize:\n state.tenants.createTenant.fields.configure.logSearchVolumeSize,\n logSearchSizeFactor:\n state.tenants.createTenant.fields.configure.logSearchSizeFactor,\n prometheusVolumeSize:\n state.tenants.createTenant.fields.configure.prometheusVolumeSize,\n prometheusSizeFactor:\n state.tenants.createTenant.fields.configure.prometheusSizeFactor,\n logSearchSelectedStorageClass:\n state.tenants.createTenant.fields.configure.logSearchSelectedStorageClass,\n logSearchImage: state.tenants.createTenant.fields.configure.logSearchImage,\n kesImage: state.tenants.createTenant.fields.configure.kesImage,\n logSearchPostgresImage:\n state.tenants.createTenant.fields.configure.logSearchPostgresImage,\n prometheusSelectedStorageClass:\n state.tenants.createTenant.fields.configure.prometheusSelectedStorageClass,\n prometheusImage: state.tenants.createTenant.fields.configure.prometheusImage,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(Configure));\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, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Grid, IconButton, Tooltip, Typography } from \"@material-ui/core\";\nimport CasinoIcon from \"@material-ui/icons/Casino\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { isPageValid, updateAddField } from \"../../actions\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError, getRandomString } from \"../../utils\";\nimport RadioGroupSelector from \"../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport AddIcon from \"@material-ui/icons/Add\";\n\ninterface IIdentityProviderProps {\n classes: any;\n idpSelection: string;\n accessKeys: string[];\n secretKeys: string[];\n openIDURL: string;\n openIDClientID: string;\n openIDSecretID: string;\n ADURL: string;\n ADSkipTLS: boolean;\n ADServerInsecure: boolean;\n ADUserNameFilter: string;\n ADGroupBaseDN: string;\n ADGroupSearchFilter: string;\n ADNameAttribute: string;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n shortened: {\n gridTemplateColumns: \"auto auto 50px 50px\",\n display: \"grid\",\n gridGap: 20,\n },\n buttonTray: {\n gridTemplateColumns: \"auto auto 10px 10px\",\n display: \"grid\",\n gridGap: 0,\n height: 16,\n marginTop: 12,\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst IdentityProvider = ({\n classes,\n idpSelection,\n accessKeys,\n secretKeys,\n openIDURL,\n openIDClientID,\n openIDSecretID,\n ADURL,\n ADSkipTLS,\n ADServerInsecure,\n ADUserNameFilter,\n ADGroupBaseDN,\n ADGroupSearchFilter,\n ADNameAttribute,\n updateAddField,\n isPageValid,\n}: IIdentityProviderProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"identityProvider\", field, value);\n },\n [updateAddField]\n );\n const updateUserField = (index: number, value: string) => {\n const newUserField = [...accessKeys];\n newUserField[index] = value;\n updateField(\"accessKeys\", newUserField);\n };\n const updatePwordField = (index: number, value: string) => {\n const newUserField = [...secretKeys];\n newUserField[index] = value;\n updateField(\"secretKeys\", newUserField);\n };\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n // Validation\n\n useEffect(() => {\n let customIDPValidation: IValidation[] = [];\n\n if (idpSelection === \"Built-in\") {\n customIDPValidation = [...customIDPValidation];\n for (var i = 0; i < accessKeys.length; i++) {\n customIDPValidation.push({\n fieldKey: `accesskey-${i.toString()}`,\n required: true,\n value: accessKeys[i],\n pattern: /^[a-zA-Z0-9-]{8,63}$/,\n customPatternMessage: \"Keys must be at least length 8\",\n });\n customIDPValidation.push({\n fieldKey: `secretkey-${i.toString()}`,\n required: true,\n value: secretKeys[i],\n pattern: /^[a-zA-Z0-9-]{8,63}$/,\n customPatternMessage: \"Keys must be at least length 8\",\n });\n }\n }\n\n if (idpSelection === \"OpenID\") {\n customIDPValidation = [\n ...customIDPValidation,\n {\n fieldKey: \"openID_URL\",\n required: true,\n value: openIDURL,\n },\n {\n fieldKey: \"openID_clientID\",\n required: true,\n value: openIDClientID,\n },\n {\n fieldKey: \"openID_secretID\",\n required: true,\n value: openIDSecretID,\n },\n ];\n }\n\n if (idpSelection === \"AD\") {\n customIDPValidation = [\n ...customIDPValidation,\n {\n fieldKey: \"AD_URL\",\n required: true,\n value: ADURL,\n },\n {\n fieldKey: \"ad_userNameFilter\",\n required: true,\n value: ADUserNameFilter,\n },\n {\n fieldKey: \"ad_groupBaseDN\",\n required: true,\n value: ADGroupBaseDN,\n },\n {\n fieldKey: \"ad_groupSearchFilter\",\n required: true,\n value: ADGroupSearchFilter,\n },\n {\n fieldKey: \"ad_nameAttribute\",\n required: true,\n value: ADNameAttribute,\n },\n ];\n }\n\n const commonVal = commonFormValidation(customIDPValidation);\n\n isPageValid(\"identityProvider\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n idpSelection,\n accessKeys,\n secretKeys,\n openIDURL,\n openIDClientID,\n openIDSecretID,\n ADURL,\n ADUserNameFilter,\n ADGroupBaseDN,\n ADGroupSearchFilter,\n ADNameAttribute,\n isPageValid,\n ]);\n let inputs = null;\n if (idpSelection === \"Built-in\") {\n inputs = accessKeys.map((_, index) => {\n return (\n \n
\n ) => {\n updateUserField(index, e.target.value);\n cleanValidation(`accesskey-${index.toString()}`);\n }}\n index={index}\n key={`csv-accesskey-${index.toString()}`}\n error={validationErrors[`accesskey-${index.toString()}`] || \"\"}\n />\n ) => {\n updatePwordField(index, e.target.value);\n cleanValidation(`secretkey-${index.toString()}`);\n }}\n index={index}\n key={`csv-secretkey-${index.toString()}`}\n error={validationErrors[`secretkey-${index.toString()}`] || \"\"}\n />\n
\n \n {\n accessKeys.push(\"\");\n secretKeys.push(\"\");\n updateUserField(accessKeys.length - 1, \"\");\n updatePwordField(secretKeys.length - 1, \"\");\n }}\n >\n \n \n \n \n {\n updateUserField(index, getRandomString(16));\n updatePwordField(index, getRandomString(32));\n }}\n size={\"small\"}\n >\n \n \n \n \n {\n if (accessKeys.length > 1) {\n accessKeys.splice(index, 1);\n secretKeys.splice(index, 1);\n updateUserField(\n accessKeys.length - 1,\n accessKeys[accessKeys.length - 1]\n );\n }\n }}\n >\n \n \n \n
\n
\n
\n );\n });\n }\n return (\n \n
\n

Identity Provider

\n \n Access to the tenant can be controlled via an external Identity\n Manager.\n \n
\n \n {\n updateField(\"idpSelection\", e.target.value);\n }}\n selectorOptions={[\n { label: \"Built-in\", value: \"Built-in\" },\n { label: \"OpenID\", value: \"OpenID\" },\n { label: \"Active Directory\", value: \"AD\" },\n ]}\n />\n Add additional users\n {\" \"}\n {idpSelection === \"Built-in\" && {inputs}}\n {idpSelection === \"OpenID\" && (\n \n \n ) => {\n updateField(\"openIDURL\", e.target.value);\n cleanValidation(\"openID_URL\");\n }}\n label=\"URL\"\n value={openIDURL}\n error={validationErrors[\"openID_URL\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"openIDClientID\", e.target.value);\n cleanValidation(\"openID_clientID\");\n }}\n label=\"Client ID\"\n value={openIDClientID}\n error={validationErrors[\"openID_clientID\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"openIDSecretID\", e.target.value);\n cleanValidation(\"openID_secretID\");\n }}\n label=\"Secret ID\"\n value={openIDSecretID}\n error={validationErrors[\"openID_secretID\"] || \"\"}\n required\n />\n \n \n )}\n {idpSelection === \"AD\" && (\n \n \n ) => {\n updateField(\"ADURL\", e.target.value);\n cleanValidation(\"AD_URL\");\n }}\n label=\"URL\"\n value={ADURL}\n error={validationErrors[\"AD_URL\"] || \"\"}\n required\n />\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"ADSkipTLS\", checked);\n }}\n label={\"Skip TLS Verification\"}\n />\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"ADServerInsecure\", checked);\n }}\n label={\"Server Insecure\"}\n />\n \n {ADServerInsecure ? (\n \n \n Warning: All traffic with Active Directory will be unencrypted\n \n
\n
\n ) : null}\n \n ) => {\n updateField(\"ADUserNameFilter\", e.target.value);\n cleanValidation(\"ad_userNameFilter\");\n }}\n label=\"User Search Filter\"\n value={ADUserNameFilter}\n error={validationErrors[\"ad_userNameFilter\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"ADGroupBaseDN\", e.target.value);\n cleanValidation(\"ad_groupBaseDN\");\n }}\n label=\"Group Search Base DN\"\n value={ADGroupBaseDN}\n error={validationErrors[\"ad_groupBaseDN\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"ADGroupSearchFilter\", e.target.value);\n cleanValidation(\"ad_groupSearchFilter\");\n }}\n label=\"Group Search Filter\"\n value={ADGroupSearchFilter}\n error={validationErrors[\"ad_groupSearchFilter\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"ADNameAttribute\", e.target.value);\n cleanValidation(\"ad_nameAttribute\");\n }}\n label=\"Group Name Attribute\"\n value={ADNameAttribute}\n error={validationErrors[\"ad_nameAttribute\"] || \"\"}\n required\n />\n \n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n idpSelection: state.tenants.createTenant.fields.identityProvider.idpSelection,\n accessKeys: state.tenants.createTenant.fields.identityProvider.accessKeys,\n secretKeys: state.tenants.createTenant.fields.identityProvider.secretKeys,\n openIDURL: state.tenants.createTenant.fields.identityProvider.openIDURL,\n openIDClientID:\n state.tenants.createTenant.fields.identityProvider.openIDClientID,\n openIDSecretID:\n state.tenants.createTenant.fields.identityProvider.openIDSecretID,\n ADURL: state.tenants.createTenant.fields.identityProvider.ADURL,\n ADSkipTLS: state.tenants.createTenant.fields.identityProvider.ADSkipTLS,\n ADServerInsecure:\n state.tenants.createTenant.fields.identityProvider.ADServerInsecure,\n ADUserNameFilter:\n state.tenants.createTenant.fields.identityProvider.ADUserNameFilter,\n ADGroupBaseDN:\n state.tenants.createTenant.fields.identityProvider.ADGroupBaseDN,\n ADGroupSearchFilter:\n state.tenants.createTenant.fields.identityProvider.ADGroupSearchFilter,\n ADNameAttribute:\n state.tenants.createTenant.fields.identityProvider.ADNameAttribute,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(IdentityProvider));\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, { useEffect, useCallback, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, Divider, Grid, Typography } from \"@material-ui/core\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport {\n updateAddField,\n isPageValid,\n addFileToCaCertificates,\n deleteCaCertificate,\n addCaCertificate,\n addKeyPair,\n addFileToKeyPair,\n deleteKeyPair,\n addConsoleCertificate,\n} from \"../../actions\";\nimport { AppState } from \"../../../../../store\";\nimport { KeyPair } from \"../../ListTenants/utils\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport FileSelector from \"../../../Common/FormComponents/FileSelector/FileSelector\";\n\ninterface ISecurityProps {\n classes: any;\n enableTLS: boolean;\n enableAutoCert: boolean;\n enableCustomCerts: boolean;\n minioCertificates: KeyPair[];\n caCertificates: KeyPair[];\n consoleCertificate: KeyPair;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n addFileToCaCertificates: typeof addFileToCaCertificates;\n deleteCaCertificate: typeof deleteCaCertificate;\n addCaCertificate: typeof addCaCertificate;\n addKeyPair: typeof addKeyPair;\n addFileToKeyPair: typeof addFileToKeyPair;\n deleteKeyPair: typeof deleteKeyPair;\n addConsoleCertificate: typeof addConsoleCertificate;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Security = ({\n classes,\n enableTLS,\n enableAutoCert,\n enableCustomCerts,\n minioCertificates,\n caCertificates,\n consoleCertificate,\n updateAddField,\n isPageValid,\n addFileToCaCertificates,\n deleteCaCertificate,\n addCaCertificate,\n addKeyPair,\n addFileToKeyPair,\n deleteKeyPair,\n}: ISecurityProps) => {\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"security\", field, value);\n },\n [updateAddField]\n );\n\n // Validation\n\n useEffect(() => {\n if (!enableTLS) {\n isPageValid(\"security\", true);\n return;\n }\n if (enableAutoCert) {\n isPageValid(\"security\", true);\n return;\n }\n if (enableCustomCerts) {\n isPageValid(\"security\", true);\n return;\n }\n isPageValid(\"security\", false);\n }, [enableTLS, enableAutoCert, enableCustomCerts, isPageValid]);\n\n return (\n \n
\n

Security

\n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableTLS\", checked);\n }}\n label={\"Enable TLS\"}\n />\n Enable TLS for the tenant, this is required for Encryption Configuration\n {enableTLS && (\n \n
\n
\n \n AutoCert: MinIO Operator will generate all TLS certificates\n automatically\n \n \n Custom certificates: Allow user to provide your own certificates\n \n
\n
\n )}\n
\n {enableTLS && (\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableAutoCert\", checked);\n }}\n label={\"Enable AutoCert\"}\n />\n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableCustomCerts\", checked);\n }}\n label={\"Custom Certificates\"}\n />\n \n {enableCustomCerts && (\n \n \n \n \n MinIO Certificates\n \n \n {minioCertificates.map((keyPair: KeyPair) => (\n \n \n {\n addFileToKeyPair(\n keyPair.id,\n \"key\",\n fileName,\n encodedValue\n );\n }}\n accept=\".key,.pem\"\n id=\"tlsKey\"\n name=\"tlsKey\"\n label=\"Key\"\n value={keyPair.key}\n />\n \n \n {\n addFileToKeyPair(\n keyPair.id,\n \"cert\",\n fileName,\n encodedValue\n );\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"tlsCert\"\n name=\"tlsCert\"\n label=\"Cert\"\n value={keyPair.cert}\n />\n \n \n {\n deleteKeyPair(keyPair.id);\n }}\n color=\"secondary\"\n >\n Remove\n \n \n \n ))}\n \n \n \n \n \n \n
\n \n
\n
\n
\n \n \n \n CA Certificates\n \n \n {caCertificates.map((keyPair: KeyPair) => (\n \n \n {\n addFileToCaCertificates(\n keyPair.id,\n \"cert\",\n fileName,\n encodedValue\n );\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"tlsCert\"\n name=\"tlsCert\"\n label=\"Cert\"\n value={keyPair.cert}\n />\n \n \n {\n deleteCaCertificate(keyPair.id);\n }}\n color=\"secondary\"\n >\n Remove\n \n \n \n ))}\n \n \n \n \n \n \n
\n \n
\n
\n
\n \n \n \n Console Certificates\n \n \n \n {\n addConsoleCertificate(\"key\", fileName, encodedValue);\n }}\n accept=\".key,.pem\"\n id=\"consoleKey\"\n name=\"consoleKey\"\n label=\"Key\"\n value={consoleCertificate.key}\n />\n \n \n {\n addConsoleCertificate(\"cert\", fileName, encodedValue);\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"consoleCert\"\n name=\"consoleCert\"\n label=\"Cert\"\n value={consoleCertificate.cert}\n />\n \n \n
\n )}\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n enableTLS: state.tenants.createTenant.fields.security.enableTLS,\n enableAutoCert: state.tenants.createTenant.fields.security.enableAutoCert,\n enableCustomCerts:\n state.tenants.createTenant.fields.security.enableCustomCerts,\n minioCertificates: state.tenants.createTenant.certificates.minioCertificates,\n caCertificates: state.tenants.createTenant.certificates.caCertificates,\n consoleCertificate:\n state.tenants.createTenant.certificates.consoleCertificate,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n addFileToCaCertificates,\n deleteCaCertificate,\n addCaCertificate,\n addKeyPair,\n addFileToKeyPair,\n deleteKeyPair,\n addConsoleCertificate,\n});\n\nexport default withStyles(styles)(connector(Security));\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, useState, useEffect, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Typography } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {\n updateAddField,\n isPageValid,\n addFileServerCert,\n addFileClientCert,\n addFileVaultCert,\n addFileVaultCa,\n addFileGemaltoCa,\n} from \"../../actions\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError } from \"../../utils\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport FileSelector from \"../../../Common/FormComponents/FileSelector/FileSelector\";\nimport RadioGroupSelector from \"../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport { KeyPair } from \"../../ListTenants/utils\";\n\ninterface IEncryptionProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n addFileServerCert: typeof addFileServerCert;\n addFileClientCert: typeof addFileClientCert;\n addFileVaultCert: typeof addFileVaultCert;\n addFileVaultCa: typeof addFileVaultCa;\n addFileGemaltoCa: typeof addFileGemaltoCa;\n enableEncryption: boolean;\n encryptionType: string;\n gemaltoEndpoint: string;\n gemaltoToken: string;\n gemaltoDomain: string;\n gemaltoRetry: string;\n awsEndpoint: string;\n awsRegion: string;\n awsKMSKey: string;\n awsAccessKey: string;\n awsSecretKey: string;\n awsToken: string;\n vaultEndpoint: string;\n vaultEngine: string;\n vaultNamespace: string;\n vaultPrefix: string;\n vaultAppRoleEngine: string;\n vaultId: string;\n vaultSecret: string;\n vaultRetry: string;\n vaultPing: string;\n gcpProjectID: string;\n gcpEndpoint: string;\n gcpClientEmail: string;\n gcpClientID: string;\n gcpPrivateKeyID: string;\n gcpPrivateKey: string;\n enableCustomCertsForKES: boolean;\n enableAutoCert: boolean;\n enableTLS: boolean;\n enableCustomCerts: boolean;\n minioCertificates: KeyPair[];\n serverCertificate: KeyPair;\n clientCertificate: KeyPair;\n vaultCertificate: KeyPair;\n vaultCA: KeyPair;\n gemaltoCA: KeyPair;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Encryption = ({\n classes,\n updateAddField,\n isPageValid,\n addFileServerCert,\n addFileClientCert,\n addFileVaultCert,\n addFileVaultCa,\n addFileGemaltoCa,\n enableEncryption,\n enableCustomCerts,\n encryptionType,\n gemaltoEndpoint,\n gemaltoToken,\n gemaltoDomain,\n gemaltoRetry,\n awsEndpoint,\n awsRegion,\n awsKMSKey,\n awsAccessKey,\n awsSecretKey,\n awsToken,\n vaultEndpoint,\n vaultEngine,\n vaultNamespace,\n vaultPrefix,\n vaultAppRoleEngine,\n vaultId,\n vaultSecret,\n vaultRetry,\n vaultPing,\n gcpProjectID,\n gcpEndpoint,\n gcpClientEmail,\n gcpClientID,\n gcpPrivateKeyID,\n gcpPrivateKey,\n enableCustomCertsForKES,\n enableAutoCert,\n enableTLS,\n minioCertificates,\n serverCertificate,\n clientCertificate,\n vaultCertificate,\n vaultCA,\n gemaltoCA,\n}: IEncryptionProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n let encryptionAvailable = false;\n if (\n enableTLS &&\n (enableAutoCert ||\n (minioCertificates &&\n minioCertificates.filter(\n (item) => item.encoded_key && item.encoded_cert\n ).length > 0))\n ) {\n encryptionAvailable = true;\n }\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"encryption\", field, value);\n },\n [updateAddField]\n );\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n // Validation\n useEffect(() => {\n let encryptionValidation: IValidation[] = [];\n\n if (enableEncryption) {\n if (enableCustomCerts) {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"serverKey\",\n required: !enableAutoCert,\n value: serverCertificate.encoded_key,\n },\n {\n fieldKey: \"serverCert\",\n required: !enableAutoCert,\n value: serverCertificate.encoded_cert,\n },\n {\n fieldKey: \"clientKey\",\n required: !enableAutoCert,\n value: clientCertificate.encoded_key,\n },\n {\n fieldKey: \"clientCert\",\n required: !enableAutoCert,\n value: clientCertificate.encoded_cert,\n },\n ];\n }\n\n if (encryptionType === \"vault\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"vault_endpoint\",\n required: true,\n value: vaultEndpoint,\n },\n {\n fieldKey: \"vault_id\",\n required: true,\n value: vaultId,\n },\n {\n fieldKey: \"vault_secret\",\n required: true,\n value: vaultSecret,\n },\n {\n fieldKey: \"vault_ping\",\n required: false,\n value: vaultPing,\n customValidation: parseInt(vaultPing) < 0,\n customValidationMessage: \"Value needs to be 0 or greater\",\n },\n {\n fieldKey: \"vault_retry\",\n required: false,\n value: vaultRetry,\n customValidation: parseInt(vaultRetry) < 0,\n customValidationMessage: \"Value needs to be 0 or greater\",\n },\n ];\n }\n\n if (encryptionType === \"aws\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"aws_endpoint\",\n required: true,\n value: awsEndpoint,\n },\n {\n fieldKey: \"aws_region\",\n required: true,\n value: awsRegion,\n },\n {\n fieldKey: \"aws_accessKey\",\n required: true,\n value: awsAccessKey,\n },\n {\n fieldKey: \"aws_secretKey\",\n required: true,\n value: awsSecretKey,\n },\n ];\n }\n\n if (encryptionType === \"gemalto\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"gemalto_endpoint\",\n required: true,\n value: gemaltoEndpoint,\n },\n {\n fieldKey: \"gemalto_token\",\n required: true,\n value: gemaltoToken,\n },\n {\n fieldKey: \"gemalto_domain\",\n required: true,\n value: gemaltoDomain,\n },\n {\n fieldKey: \"gemalto_retry\",\n required: false,\n value: gemaltoRetry,\n customValidation: parseInt(gemaltoRetry) < 0,\n customValidationMessage: \"Value needs to be 0 or greater\",\n },\n ];\n }\n }\n\n const commonVal = commonFormValidation(encryptionValidation);\n\n isPageValid(\"encryption\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n enableEncryption,\n encryptionType,\n vaultEndpoint,\n vaultEngine,\n vaultId,\n vaultSecret,\n vaultPing,\n vaultRetry,\n awsEndpoint,\n awsRegion,\n awsSecretKey,\n awsAccessKey,\n gemaltoEndpoint,\n gemaltoToken,\n gemaltoDomain,\n gemaltoRetry,\n gcpProjectID,\n isPageValid,\n enableAutoCert,\n enableCustomCerts,\n serverCertificate.encoded_key,\n serverCertificate.encoded_cert,\n clientCertificate.encoded_key,\n clientCertificate.encoded_cert,\n ]);\n\n return (\n \n
\n

Encryption

\n \n How would you like to encrypt the information at rest.\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableEncryption\", checked);\n }}\n label={\"Enable Server Side Encryption\"}\n disabled={!encryptionAvailable}\n />\n \n {enableEncryption && (\n \n \n {\n updateField(\"encryptionType\", e.target.value);\n }}\n selectorOptions={[\n { label: \"Vault\", value: \"vault\" },\n { label: \"AWS\", value: \"aws\" },\n { label: \"Gemalto\", value: \"gemalto\" },\n { label: \"GCP\", value: \"gcp\" },\n ]}\n />\n \n {encryptionType === \"vault\" && (\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableCustomCertsForKES\", checked);\n }}\n label={\"Custom Certificates\"}\n disabled={!enableAutoCert}\n />\n \n {(enableCustomCertsForKES || !enableAutoCert) && (\n \n \n \n Encryption Service Certificates\n \n \n \n \n {\n addFileServerCert(\"key\", fileName, encodedValue);\n cleanValidation(\"serverKey\");\n }}\n accept=\".key,.pem\"\n id=\"serverKey\"\n name=\"serverKey\"\n label=\"Key\"\n error={validationErrors[\"serverKey\"] || \"\"}\n value={serverCertificate.key}\n required={!enableAutoCert}\n />\n \n \n {\n addFileServerCert(\"cert\", fileName, encodedValue);\n cleanValidation(\"serverCert\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"serverCert\"\n name=\"serverCert\"\n label=\"Cert\"\n error={validationErrors[\"serverCert\"] || \"\"}\n value={serverCertificate.cert}\n required={!enableAutoCert}\n />\n \n \n\n \n \n Mutual TLS authentication\n \n \n \n \n {\n addFileClientCert(\"key\", fileName, encodedValue);\n cleanValidation(\"clientKey\");\n }}\n accept=\".key,.pem\"\n id=\"clientKey\"\n name=\"clientKey\"\n label=\"Key\"\n error={validationErrors[\"clientKey\"] || \"\"}\n value={clientCertificate.key}\n required={!enableAutoCert}\n />\n \n \n {\n addFileClientCert(\"cert\", fileName, encodedValue);\n cleanValidation(\"clientCert\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"clientCert\"\n name=\"clientCert\"\n label=\"Cert\"\n error={validationErrors[\"clientCert\"] || \"\"}\n value={clientCertificate.cert}\n required={!enableAutoCert}\n />\n \n \n \n )}\n \n ) => {\n updateField(\"vaultEndpoint\", e.target.value);\n cleanValidation(\"vault_endpoint\");\n }}\n label=\"Endpoint\"\n value={vaultEndpoint}\n error={validationErrors[\"vault_endpoint\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"vaultEngine\", e.target.value);\n cleanValidation(\"vault_engine\");\n }}\n label=\"Engine\"\n value={vaultEngine}\n />\n \n \n ) => {\n updateField(\"vaultNamespace\", e.target.value);\n }}\n label=\"Namespace\"\n value={vaultNamespace}\n />\n \n \n ) => {\n updateField(\"vaultPrefix\", e.target.value);\n }}\n label=\"Prefix\"\n value={vaultPrefix}\n />\n \n
App Role
\n \n ) => {\n updateField(\"vaultAppRoleEngine\", e.target.value);\n }}\n label=\"Engine\"\n value={vaultAppRoleEngine}\n />\n \n \n ) => {\n updateField(\"vaultId\", e.target.value);\n cleanValidation(\"vault_id\");\n }}\n label=\"AppRole ID\"\n value={vaultId}\n error={validationErrors[\"vault_id\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"vaultSecret\", e.target.value);\n cleanValidation(\"vault_secret\");\n }}\n label=\"AppRole Secret\"\n value={vaultSecret}\n error={validationErrors[\"vault_secret\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"vaultRetry\", e.target.value);\n cleanValidation(\"vault_retry\");\n }}\n label=\"Retry (Seconds)\"\n value={vaultRetry}\n error={validationErrors[\"vault_retry\"] || \"\"}\n />\n \n
Mutual TLS authentication (optional)
\n \n \n {\n addFileVaultCert(\"key\", fileName, encodedValue);\n cleanValidation(\"vault_key\");\n }}\n accept=\".key,.pem\"\n id=\"vault_key\"\n name=\"vault_key\"\n label=\"Key\"\n value={vaultCertificate.key}\n />\n \n \n {\n addFileVaultCert(\"cert\", fileName, encodedValue);\n cleanValidation(\"vault_cert\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"vault_cert\"\n name=\"vault_cert\"\n label=\"Cert\"\n value={vaultCertificate.cert}\n />\n \n \n \n {\n addFileVaultCa(fileName, encodedValue);\n cleanValidation(\"vault_ca\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"vault_ca\"\n name=\"vault_ca\"\n label=\"CA\"\n value={vaultCA.cert}\n />\n \n
Status
\n \n ) => {\n updateField(\"vaultPing\", e.target.value);\n cleanValidation(\"vault_ping\");\n }}\n label=\"Ping (Seconds)\"\n value={vaultPing}\n error={validationErrors[\"vault_ping\"] || \"\"}\n />\n \n
\n )}\n {encryptionType === \"gcp\" && (\n \n \n ) => {\n updateField(\"gcpProjectID\", e.target.value);\n }}\n label=\"Project ID\"\n value={gcpProjectID}\n />\n \n \n ) => {\n updateField(\"gcpEndpoint\", e.target.value);\n }}\n label=\"Endpoint\"\n value={gcpEndpoint}\n />\n \n
Credentials
\n \n ) => {\n updateField(\"gcpClientEmail\", e.target.value);\n }}\n label=\"Client Email\"\n value={gcpClientEmail}\n />\n \n \n ) => {\n updateField(\"gcpClientID\", e.target.value);\n }}\n label=\"Client ID\"\n value={gcpClientID}\n />\n \n \n ) => {\n updateField(\"gcpPrivateKeyID\", e.target.value);\n }}\n label=\"Private Key ID\"\n value={gcpPrivateKeyID}\n />\n \n \n ) => {\n updateField(\"gcpPrivateKey\", e.target.value);\n }}\n label=\"Private Key\"\n value={gcpPrivateKey}\n />\n \n
\n )}\n {encryptionType === \"aws\" && (\n \n \n ) => {\n updateField(\"awsEndpoint\", e.target.value);\n cleanValidation(\"aws_endpoint\");\n }}\n label=\"Endpoint\"\n value={awsEndpoint}\n error={validationErrors[\"aws_endpoint\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsRegion\", e.target.value);\n cleanValidation(\"aws_region\");\n }}\n label=\"Region\"\n value={awsRegion}\n error={validationErrors[\"aws_region\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsKMSKey\", e.target.value);\n }}\n label=\"KMS Key\"\n value={awsKMSKey}\n />\n \n
Credentials
\n \n ) => {\n updateField(\"awsAccessKey\", e.target.value);\n cleanValidation(\"aws_accessKey\");\n }}\n label=\"Access Key\"\n value={awsAccessKey}\n error={validationErrors[\"aws_accessKey\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsSecretKey\", e.target.value);\n cleanValidation(\"aws_secretKey\");\n }}\n label=\"Secret Key\"\n value={awsSecretKey}\n error={validationErrors[\"aws_secretKey\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsToken\", e.target.value);\n }}\n label=\"Token\"\n value={awsToken}\n />\n \n
\n )}\n {encryptionType === \"gemalto\" && (\n \n \n ) => {\n updateField(\"gemaltoEndpoint\", e.target.value);\n cleanValidation(\"gemalto_endpoint\");\n }}\n label=\"Endpoint\"\n value={gemaltoEndpoint}\n error={validationErrors[\"gemalto_endpoint\"] || \"\"}\n required\n />\n \n
Credentials
\n \n ) => {\n updateField(\"gemaltoToken\", e.target.value);\n cleanValidation(\"gemalto_token\");\n }}\n label=\"Token\"\n value={gemaltoToken}\n error={validationErrors[\"gemalto_token\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"gemaltoDomain\", e.target.value);\n cleanValidation(\"gemalto_domain\");\n }}\n label=\"Domain\"\n value={gemaltoDomain}\n error={validationErrors[\"gemalto_domain\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"gemaltoRetry\", e.target.value);\n cleanValidation(\"gemalto_retry\");\n }}\n label=\"Retry (seconds)\"\n value={gemaltoRetry}\n error={validationErrors[\"gemalto_retry\"] || \"\"}\n />\n \n
Custom CA Root certificate verification
\n \n {\n addFileGemaltoCa(fileName, encodedValue);\n cleanValidation(\"gemalto_ca\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"gemalto_ca\"\n name=\"gemalto_ca\"\n label=\"CA\"\n value={gemaltoCA.cert}\n />\n \n
\n )}\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n enableEncryption:\n state.tenants.createTenant.fields.encryption.enableEncryption,\n encryptionType: state.tenants.createTenant.fields.encryption.encryptionType,\n gemaltoEndpoint: state.tenants.createTenant.fields.encryption.gemaltoEndpoint,\n gemaltoToken: state.tenants.createTenant.fields.encryption.gemaltoToken,\n gemaltoDomain: state.tenants.createTenant.fields.encryption.gemaltoDomain,\n gemaltoRetry: state.tenants.createTenant.fields.encryption.gemaltoRetry,\n awsEndpoint: state.tenants.createTenant.fields.encryption.awsEndpoint,\n awsRegion: state.tenants.createTenant.fields.encryption.awsRegion,\n awsKMSKey: state.tenants.createTenant.fields.encryption.awsKMSKey,\n awsAccessKey: state.tenants.createTenant.fields.encryption.awsAccessKey,\n awsSecretKey: state.tenants.createTenant.fields.encryption.awsSecretKey,\n awsToken: state.tenants.createTenant.fields.encryption.awsToken,\n vaultEndpoint: state.tenants.createTenant.fields.encryption.vaultEndpoint,\n vaultEngine: state.tenants.createTenant.fields.encryption.vaultEngine,\n vaultNamespace: state.tenants.createTenant.fields.encryption.vaultNamespace,\n vaultPrefix: state.tenants.createTenant.fields.encryption.vaultPrefix,\n vaultAppRoleEngine:\n state.tenants.createTenant.fields.encryption.vaultAppRoleEngine,\n vaultId: state.tenants.createTenant.fields.encryption.vaultId,\n vaultSecret: state.tenants.createTenant.fields.encryption.vaultSecret,\n vaultRetry: state.tenants.createTenant.fields.encryption.vaultRetry,\n vaultPing: state.tenants.createTenant.fields.encryption.vaultPing,\n gcpProjectID: state.tenants.createTenant.fields.encryption.gcpProjectID,\n gcpEndpoint: state.tenants.createTenant.fields.encryption.gcpEndpoint,\n gcpClientEmail: state.tenants.createTenant.fields.encryption.gcpClientEmail,\n gcpClientID: state.tenants.createTenant.fields.encryption.gcpClientID,\n gcpPrivateKeyID: state.tenants.createTenant.fields.encryption.gcpPrivateKeyID,\n gcpPrivateKey: state.tenants.createTenant.fields.encryption.gcpPrivateKey,\n enableCustomCertsForKES:\n state.tenants.createTenant.fields.encryption.enableCustomCertsForKES,\n enableAutoCert: state.tenants.createTenant.fields.security.enableAutoCert,\n enableTLS: state.tenants.createTenant.fields.security.enableTLS,\n minioCertificates: state.tenants.createTenant.certificates.minioCertificates,\n serverCertificate: state.tenants.createTenant.certificates.serverCertificate,\n clientCertificate: state.tenants.createTenant.certificates.clientCertificate,\n vaultCertificate: state.tenants.createTenant.certificates.vaultCertificate,\n vaultCA: state.tenants.createTenant.certificates.vaultCA,\n gemaltoCA: state.tenants.createTenant.certificates.gemaltoCA,\n enableCustomCerts:\n state.tenants.createTenant.fields.security.enableCustomCerts,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n addFileServerCert,\n addFileClientCert,\n addFileVaultCert,\n addFileVaultCa,\n addFileGemaltoCa,\n});\n\nexport default withStyles(styles)(connector(Encryption));\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, useState, useEffect, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { AppState } from \"../../../../../store\";\nimport { updateAddField, isPageValid } from \"../../actions\";\nimport {\n wizardCommon,\n modalBasic,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport {\n getBytes,\n k8sfactorForDropdown,\n niceBytes,\n calculateDistribution,\n erasureCodeCalc,\n setMemoryResource,\n} from \"../../../../../common/utils\";\nimport { clearValidationError } from \"../../utils\";\nimport { ecListTransform, Opts } from \"../../ListTenants/utils\";\nimport { IMemorySize } from \"../../ListTenants/types\";\nimport { ICapacity, IErasureCodeCalc } from \"../../../../../common/types\";\nimport api from \"../../../../../common/api\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { commonFormValidation } from \"../../../../../utils/validationFunctions\";\n\ninterface ITenantSizeProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n advancedMode: boolean;\n volumeSize: string;\n sizeFactor: string;\n drivesPerServer: string;\n nodes: string;\n memoryNode: string;\n ecParity: string;\n ecParityChoices: Opts[];\n cleanECChoices: string[];\n maxAllocableMemo: number;\n memorySize: IMemorySize;\n distribution: any;\n ecParityCalc: IErasureCodeCalc;\n limitSize: any;\n selectedStorageClass: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst TenantSize = ({\n classes,\n updateAddField,\n isPageValid,\n advancedMode,\n volumeSize,\n sizeFactor,\n drivesPerServer,\n nodes,\n memoryNode,\n ecParity,\n ecParityChoices,\n cleanECChoices,\n maxAllocableMemo,\n memorySize,\n distribution,\n ecParityCalc,\n limitSize,\n selectedStorageClass,\n}: ITenantSizeProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n const usableInformation = ecParityCalc.storageFactors.find(\n (element) => element.erasureCode === ecParity\n );\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"tenantSize\", field, value);\n },\n [updateAddField]\n );\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n /*Debounce functions*/\n\n // Storage Quotas\n\n const validateMemorySize = useCallback(() => {\n const memSize = parseInt(memoryNode) || 0;\n const clusterSize = volumeSize || 0;\n const maxMemSize = maxAllocableMemo || 0;\n const clusterSizeFactor = sizeFactor;\n\n const clusterSizeBytes = getBytes(\n clusterSize.toString(10),\n clusterSizeFactor\n );\n const memoSize = setMemoryResource(memSize, clusterSizeBytes, maxMemSize);\n\n updateField(\"memorySize\", memoSize);\n }, [maxAllocableMemo, memoryNode, sizeFactor, updateField, volumeSize]);\n\n const getMaxAllocableMemory = (nodes: string) => {\n if (nodes !== \"\" && !isNaN(parseInt(nodes))) {\n api\n .invoke(\n \"GET\",\n `/api/v1/cluster/max-allocatable-memory?num_nodes=${nodes}`\n )\n .then((res: { max_memory: number }) => {\n const maxMemory = res.max_memory ? res.max_memory : 0;\n updateField(\"maxAllocableMemo\", maxMemory);\n })\n .catch((err: any) => {\n updateField(\"maxAllocableMemo\", 0);\n console.error(err);\n });\n }\n };\n\n useEffect(() => {\n validateMemorySize();\n }, [memoryNode, validateMemorySize]);\n\n useEffect(() => {\n validateMemorySize();\n }, [maxAllocableMemo, validateMemorySize]);\n\n useEffect(() => {\n if (ecParityChoices.length > 0 && distribution.error === \"\") {\n const ecCodeValidated = erasureCodeCalc(\n cleanECChoices,\n distribution.persistentVolumes,\n distribution.pvSize,\n distribution.nodes\n );\n\n updateField(\"ecParityCalc\", ecCodeValidated);\n updateField(\"ecParity\", ecCodeValidated.defaultEC);\n }\n }, [ecParityChoices.length, distribution, cleanECChoices, updateField]);\n /*End debounce functions*/\n\n /*Calculate Allocation*/\n useEffect(() => {\n validateClusterSize();\n getECValue();\n getMaxAllocableMemory(nodes);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [nodes, volumeSize, sizeFactor, drivesPerServer]);\n\n const validateClusterSize = () => {\n const size = volumeSize;\n const factor = sizeFactor;\n const limitSize = getBytes(\"12\", \"Ti\", true);\n\n const clusterCapacity: ICapacity = {\n unit: factor,\n value: size.toString(),\n };\n\n const distrCalculate = calculateDistribution(\n clusterCapacity,\n parseInt(nodes),\n parseInt(limitSize),\n parseInt(drivesPerServer)\n );\n\n updateField(\"distribution\", distrCalculate);\n };\n\n const getECValue = () => {\n updateField(\"ecParity\", \"\");\n\n if (nodes.trim() !== \"\" && drivesPerServer.trim() !== \"\") {\n api\n .invoke(\"GET\", `/api/v1/get-parity/${nodes}/${drivesPerServer}`)\n .then((ecList: string[]) => {\n updateField(\"ecParityChoices\", ecListTransform(ecList));\n updateField(\"cleanECChoices\", ecList);\n })\n .catch((err: any) => {\n updateField(\"ecparityChoices\", []);\n isPageValid(\"tenantSize\", false);\n updateField(\"ecParity\", \"\");\n });\n }\n };\n /*Calculate Allocation End*/\n\n /* Validations of pages */\n\n useEffect(() => {\n const parsedSize = getBytes(volumeSize, sizeFactor, true);\n\n const commonValidation = commonFormValidation([\n {\n fieldKey: \"nodes\",\n required: true,\n value: nodes,\n customValidation: parseInt(nodes) < 4,\n customValidationMessage: \"Number of nodes cannot be less than 4\",\n },\n {\n fieldKey: \"volume_size\",\n required: true,\n value: volumeSize,\n customValidation:\n parseInt(parsedSize) < 1073741824 ||\n parseInt(parsedSize) > limitSize[selectedStorageClass],\n customValidationMessage: `Volume size must be greater than 1Gi and less than ${niceBytes(\n limitSize[selectedStorageClass],\n true\n )}`,\n },\n {\n fieldKey: \"memory_per_node\",\n required: true,\n value: memoryNode,\n customValidation: parseInt(memoryNode) < 2,\n customValidationMessage: \"Memory size must be greater than 2Gi\",\n },\n {\n fieldKey: \"drivesps\",\n required: true,\n value: drivesPerServer,\n customValidation: parseInt(drivesPerServer) < 1,\n customValidationMessage: \"There must be at least one drive\",\n },\n ]);\n\n isPageValid(\n \"tenantSize\",\n !(\"nodes\" in commonValidation) &&\n !(\"volume_size\" in commonValidation) &&\n !(\"memory_per_node\" in commonValidation) &&\n !(\"drivesps\" in commonValidation) &&\n distribution.error === \"\" &&\n ecParityCalc.error === 0 &&\n memorySize.error === \"\"\n );\n\n setValidationErrors(commonValidation);\n }, [\n nodes,\n volumeSize,\n sizeFactor,\n memoryNode,\n distribution,\n drivesPerServer,\n ecParityCalc,\n memorySize,\n limitSize,\n selectedStorageClass,\n isPageValid,\n ]);\n\n /* End Validation of pages */\n\n return (\n \n
\n

Tenant Size

\n \n Please select the desired capacity\n \n
\n {distribution.error}\n {memorySize.error}\n \n ) => {\n updateField(\"nodes\", e.target.value);\n cleanValidation(\"nodes\");\n }}\n label=\"Number of Servers\"\n value={nodes}\n min=\"4\"\n required\n error={validationErrors[\"nodes\"] || \"\"}\n />\n \n \n ) => {\n updateField(\"drivesPerServer\", e.target.value);\n cleanValidation(\"drivesps\");\n }}\n label=\"Number of Drives per Server\"\n value={drivesPerServer}\n min=\"1\"\n required\n error={validationErrors[\"drivesps\"] || \"\"}\n />\n \n \n
\n
\n ) => {\n updateField(\"volumeSize\", e.target.value);\n cleanValidation(\"volume_size\");\n }}\n label=\"Total Size\"\n value={volumeSize}\n required\n error={validationErrors[\"volume_size\"] || \"\"}\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"sizeFactor\", e.target.value as string);\n }}\n options={k8sfactorForDropdown()}\n />\n
\n
\n
\n {advancedMode && (\n \n \n ) => {\n updateField(\"memoryNode\", e.target.value);\n cleanValidation(\"memory_per_node\");\n }}\n label=\"Memory per Node [Gi]\"\n value={memoryNode}\n required\n error={validationErrors[\"memory_per_node\"] || \"\"}\n min=\"2\"\n />\n \n \n ) => {\n updateField(\"ecParity\", e.target.value as string);\n }}\n label=\"Erasure Code Parity\"\n value={ecParity}\n options={ecParityChoices}\n />\n \n Please select the desired parity. This setting will change the max\n usable capacity in the cluster\n \n \n \n )}\n

Resource Allocation

\n \n \n \n \n Number of Servers\n \n \n {parseInt(nodes) > 0 ? nodes : \"-\"}\n \n \n \n \n Drives per Server\n \n \n {distribution ? distribution.disks : \"-\"}\n \n \n \n \n Drive Capacity\n \n \n {distribution ? niceBytes(distribution.pvSize) : \"-\"}\n \n \n \n \n Total Number of Volumes\n \n \n {distribution ? distribution.persistentVolumes : \"-\"}\n \n \n {!advancedMode && (\n \n \n Memory per Node\n \n {memoryNode} Gi\n \n )}\n \n
\n {ecParityCalc.error === 0 && usableInformation && (\n \n

Erasure Code Configuration

\n \n \n \n \n EC Parity\n \n \n {ecParity !== \"\" ? ecParity : \"-\"}\n \n \n \n \n Raw Capacity\n \n \n {niceBytes(ecParityCalc.rawCapacity)}\n \n \n \n \n Usable Capacity\n \n \n {niceBytes(usableInformation.maxCapacity)}\n \n \n \n \n Number of server failures to tolerate\n \n \n {distribution\n ? Math.floor(\n usableInformation.maxFailureTolerations /\n distribution.disks\n )\n : \"-\"}\n \n \n \n
\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n advancedMode: state.tenants.createTenant.advancedModeOn,\n volumeSize: state.tenants.createTenant.fields.tenantSize.volumeSize,\n sizeFactor: state.tenants.createTenant.fields.tenantSize.sizeFactor,\n drivesPerServer: state.tenants.createTenant.fields.tenantSize.drivesPerServer,\n nodes: state.tenants.createTenant.fields.tenantSize.nodes,\n memoryNode: state.tenants.createTenant.fields.tenantSize.memoryNode,\n ecParity: state.tenants.createTenant.fields.tenantSize.ecParity,\n ecParityChoices: state.tenants.createTenant.fields.tenantSize.ecParityChoices,\n cleanECChoices: state.tenants.createTenant.fields.tenantSize.cleanECChoices,\n maxAllocableMemo:\n state.tenants.createTenant.fields.tenantSize.maxAllocableMemo,\n memorySize: state.tenants.createTenant.fields.tenantSize.memorySize,\n distribution: state.tenants.createTenant.fields.tenantSize.distribution,\n ecParityCalc: state.tenants.createTenant.fields.tenantSize.ecParityCalc,\n limitSize: state.tenants.createTenant.fields.tenantSize.limitSize,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(TenantSize));\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\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport { AppState } from \"../../../../../store\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\n\ninterface IPreviewProps {\n classes: any;\n tenantName: string;\n customImage: boolean;\n imageName: string;\n consoleImage: string;\n namespace: string;\n selectedStorageClass: string;\n volumeSize: string;\n sizeFactor: string;\n advancedMode: boolean;\n enableTLS: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Preview = ({\n classes,\n tenantName,\n customImage,\n imageName,\n consoleImage,\n namespace,\n selectedStorageClass,\n volumeSize,\n sizeFactor,\n advancedMode,\n enableTLS,\n}: IPreviewProps) => {\n return (\n \n
\n

Review

\n \n Review the details of the new tenant\n \n
\n \n \n \n \n Tenant Name\n \n {tenantName}\n \n\n {customImage && (\n \n \n \n MinIO Image\n \n {imageName}\n \n \n \n Console Image\n \n {consoleImage}\n \n \n )}\n\n {namespace !== \"\" && (\n \n \n Namespace\n \n {namespace}\n \n )}\n\n \n \n Storage Class\n \n {selectedStorageClass}\n \n\n \n \n Total Size\n \n \n {volumeSize} {sizeFactor}\n \n \n {advancedMode && (\n \n \n \n Enable TLS\n \n {enableTLS ? \"Enabled\" : \"Disabled\"}\n \n \n )}\n \n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n advancedMode: state.tenants.createTenant.advancedModeOn,\n enableTLS: state.tenants.createTenant.fields.security.enableTLS,\n tenantName: state.tenants.createTenant.fields.nameTenant.tenantName,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n customImage: state.tenants.createTenant.fields.configure.customImage,\n imageName: state.tenants.createTenant.fields.configure.imageName,\n consoleImage: state.tenants.createTenant.fields.configure.consoleImage,\n namespace: state.tenants.createTenant.fields.nameTenant.namespace,\n volumeSize: state.tenants.createTenant.fields.tenantSize.volumeSize,\n sizeFactor: state.tenants.createTenant.fields.tenantSize.sizeFactor,\n});\n\nconst connector = connect(mapState, {});\n\nexport default withStyles(styles)(connector(Preview));\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, { useEffect, useState, useCallback, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { AppState } from \"../../../../../store\";\nimport { updateAddField, isPageValid } from \"../../actions\";\nimport { setModalErrorSnackMessage } from \"../../../../../actions\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { Grid } from \"@material-ui/core\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport RadioGroupSelector from \"../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport QueryMultiSelector from \"../../../Common/FormComponents/QueryMultiSelector/QueryMultiSelector\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\n\ninterface IAffinityProps {\n classes: any;\n podAffinity: string;\n nodeSelectorLabels: string;\n withPodAntiAffinity: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Affinity = ({\n classes,\n podAffinity,\n nodeSelectorLabels,\n withPodAntiAffinity,\n setModalErrorSnackMessage,\n updateAddField,\n isPageValid,\n}: IAffinityProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"affinity\", field, value);\n },\n [updateAddField]\n );\n\n // Validation\n useEffect(() => {\n let customAccountValidation: IValidation[] = [];\n\n if (podAffinity === \"nodeSelector\") {\n let valid = true;\n\n const splittedLabels = nodeSelectorLabels.split(\"&\");\n\n if (splittedLabels.length === 1 && splittedLabels[0] === \"\") {\n valid = false;\n }\n\n splittedLabels.forEach((item: string, index: number) => {\n const splitItem = item.split(\"=\");\n\n if (splitItem.length !== 2) {\n valid = false;\n }\n\n if (index + 1 !== splittedLabels.length) {\n if (splitItem[0] === \"\" || splitItem[1] === \"\") {\n valid = false;\n }\n }\n });\n\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"labels\",\n required: true,\n value: nodeSelectorLabels,\n customValidation: !valid,\n customValidationMessage:\n \"You need to add at least one label key-pair\",\n },\n ];\n }\n\n const commonVal = commonFormValidation(customAccountValidation);\n\n isPageValid(\"affinity\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [isPageValid, podAffinity, nodeSelectorLabels]);\n\n return (\n \n
\n

Pod Affinity

\n \n Configure how pods will be assigned to nodes\n \n
\n \n {\n updateField(\"podAffinity\", e.target.value);\n }}\n selectorOptions={[\n { label: \"None\", value: \"none\" },\n { label: \"Default (Pod Anti-afinnity)\", value: \"default\" },\n { label: \"Node Selector\", value: \"nodeSelector\" },\n ]}\n />\n MinIO supports multiple configurations for Pod Afinnity\n \n {podAffinity === \"nodeSelector\" && (\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"withPodAntiAffinity\", checked);\n }}\n label={\"With Pod Anti-Affinity\"}\n />\n \n \n {\n updateField(\"nodeSelectorLabels\", vl);\n }}\n keyPlaceholder=\"Label Key\"\n valuePlaceholder=\"Label Value\"\n tooltip=\"Labels to be used in nodeSelector assignation. Invalid key-pairs will be ignored\"\n withBorder\n />\n {validationErrors[\"labels\"]}\n \n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n podAffinity: state.tenants.createTenant.fields.affinity.podAffinity,\n nodeSelectorLabels:\n state.tenants.createTenant.fields.affinity.nodeSelectorLabels,\n withPodAntiAffinity:\n state.tenants.createTenant.fields.affinity.withPodAntiAffinity,\n});\n\nconst connector = connect(mapState, {\n setModalErrorSnackMessage,\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(Affinity));\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, useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { LinearProgress } from \"@material-ui/core\";\n\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n modalBasic,\n settingsCommon,\n wizardCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../../common/api\";\nimport { generatePoolName } from \"../../../../common/utils\";\nimport GenericWizard from \"../../Common/GenericWizard/GenericWizard\";\nimport { IWizardElement } from \"../../Common/GenericWizard/types\";\nimport { NewServiceAccount } from \"../../Common/CredentialsPrompt/types\";\nimport { ITenantCreator } from \"../../../../common/types\";\nimport { KeyPair } from \"../ListTenants/utils\";\n\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport { getDefaultAffinity, getNodeSelector } from \"../TenantDetails/utils\";\nimport CredentialsPrompt from \"../../Common/CredentialsPrompt/CredentialsPrompt\";\nimport NameTenant from \"./Steps/NameTenant\";\nimport { AppState } from \"../../../../store\";\nimport { ICertificatesItems, IFieldStore } from \"../types\";\nimport { updateAddField } from \"../actions\";\nimport Configure from \"./Steps/Configure\";\nimport IdentityProvider from \"./Steps/IdentityProvider\";\nimport Security from \"./Steps/Security\";\nimport Encryption from \"./Steps/Encryption\";\nimport TenantSize from \"./Steps/TenantSize\";\nimport Preview from \"./Steps/Preview\";\nimport Affinity from \"./Steps/Affinity\";\n\ninterface IAddTenantProps {\n closeAndRefresh: (reloadData: boolean) => any;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n updateAddField: typeof updateAddField;\n fields: IFieldStore;\n certificates: ICertificatesItems;\n namespace: string;\n validPages: string[];\n advancedMode: boolean;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n ...settingsCommon,\n });\n\nconst AddTenant = ({\n classes,\n advancedMode,\n fields,\n certificates,\n namespace,\n validPages,\n setModalErrorSnackMessage,\n closeAndRefresh,\n}: IAddTenantProps) => {\n // Modals\n const [showNewCredentials, setShowNewCredentials] = useState(false);\n const [\n createdAccount,\n setCreatedAccount,\n ] = useState(null);\n\n // Fields\n const [addSending, setAddSending] = useState(false);\n\n /* Send Information to backend */\n useEffect(() => {\n const tenantName = fields.nameTenant.tenantName;\n const selectedStorageClass = fields.nameTenant.selectedStorageClass;\n const imageName = fields.configure.imageName;\n const consoleImage = fields.configure.consoleImage;\n const customDockerhub = fields.configure.customDockerhub;\n const imageRegistry = fields.configure.imageRegistry;\n const imageRegistryUsername = fields.configure.imageRegistryUsername;\n const imageRegistryPassword = fields.configure.imageRegistryPassword;\n const exposeMinIO = fields.configure.exposeMinIO;\n const exposeConsole = fields.configure.exposeConsole;\n const idpSelection = fields.identityProvider.idpSelection;\n const openIDURL = fields.identityProvider.openIDURL;\n const openIDClientID = fields.identityProvider.openIDClientID;\n const openIDSecretID = fields.identityProvider.openIDSecretID;\n const ADURL = fields.identityProvider.ADURL;\n const ADSkipTLS = fields.identityProvider.ADSkipTLS;\n const ADServerInsecure = fields.identityProvider.ADServerInsecure;\n const ADUserNameFilter = fields.identityProvider.ADUserNameFilter;\n const ADGroupBaseDN = fields.identityProvider.ADGroupBaseDN;\n const ADGroupSearchFilter = fields.identityProvider.ADGroupSearchFilter;\n const ADNameAttribute = fields.identityProvider.ADNameAttribute;\n const accessKeys = fields.identityProvider.accessKeys;\n const secretKeys = fields.identityProvider.secretKeys;\n const minioCertificates = certificates.minioCertificates;\n const caCertificates = certificates.caCertificates;\n const consoleCertificate = certificates.consoleCertificate;\n const serverCertificate = certificates.serverCertificate;\n const clientCertificate = certificates.clientCertificate;\n const vaultCertificate = certificates.vaultCertificate;\n const vaultCA = certificates.vaultCA;\n const gemaltoCA = certificates.gemaltoCA;\n const enableEncryption = fields.encryption.enableEncryption;\n const encryptionType = fields.encryption.encryptionType;\n const gemaltoEndpoint = fields.encryption.gemaltoEndpoint;\n const gemaltoToken = fields.encryption.gemaltoToken;\n const gemaltoDomain = fields.encryption.gemaltoDomain;\n const gemaltoRetry = fields.encryption.gemaltoRetry;\n const awsEndpoint = fields.encryption.awsEndpoint;\n const awsRegion = fields.encryption.awsRegion;\n const awsKMSKey = fields.encryption.awsKMSKey;\n const awsAccessKey = fields.encryption.awsAccessKey;\n const awsSecretKey = fields.encryption.awsSecretKey;\n const awsToken = fields.encryption.awsToken;\n const vaultEndpoint = fields.encryption.vaultEndpoint;\n const vaultEngine = fields.encryption.vaultEngine;\n const vaultNamespace = fields.encryption.vaultNamespace;\n const vaultPrefix = fields.encryption.vaultPrefix;\n const vaultAppRoleEngine = fields.encryption.vaultAppRoleEngine;\n const vaultId = fields.encryption.vaultId;\n const vaultSecret = fields.encryption.vaultSecret;\n const vaultRetry = fields.encryption.vaultRetry;\n const vaultPing = fields.encryption.vaultPing;\n const gcpProjectID = fields.encryption.gcpProjectID;\n const gcpEndpoint = fields.encryption.gcpEndpoint;\n const gcpClientEmail = fields.encryption.gcpClientEmail;\n const gcpClientID = fields.encryption.gcpClientID;\n const gcpPrivateKeyID = fields.encryption.gcpPrivateKeyID;\n const gcpPrivateKey = fields.encryption.gcpPrivateKey;\n const enableAutoCert = fields.security.enableAutoCert;\n const enableTLS = fields.security.enableTLS;\n const ecParity = fields.tenantSize.ecParity;\n const distribution = fields.tenantSize.distribution;\n const memorySize = fields.tenantSize.memorySize;\n const logSearchCustom = fields.configure.logSearchCustom;\n const prometheusCustom = fields.configure.prometheusCustom;\n const logSearchVolumeSize = fields.configure.logSearchVolumeSize;\n const logSearchSelectedStorageClass =\n fields.configure.logSearchSelectedStorageClass;\n const logSearchImage = fields.configure.logSearchImage;\n const kesImage = fields.configure.kesImage;\n const logSearchPostgresImage = fields.configure.logSearchPostgresImage;\n const prometheusImage = fields.configure.prometheusImage;\n const prometheusSelectedStorageClass =\n fields.configure.prometheusSelectedStorageClass;\n const prometheusVolumeSize = fields.configure.prometheusVolumeSize;\n const affinityType = fields.affinity.podAffinity;\n const nodeSelectorLabels = fields.affinity.nodeSelectorLabels;\n const withPodAntiAffinity = fields.affinity.withPodAntiAffinity;\n\n if (addSending) {\n const poolName = generatePoolName([]);\n\n let affinityObject = {};\n\n switch (affinityType) {\n case \"default\":\n affinityObject = {\n affinity: getDefaultAffinity(tenantName, poolName),\n };\n break;\n case \"nodeSelector\":\n affinityObject = {\n affinity: getNodeSelector(\n nodeSelectorLabels,\n withPodAntiAffinity,\n tenantName,\n poolName\n ),\n };\n break;\n }\n\n const erasureCode = ecParity.split(\":\")[1];\n\n let dataSend: ITenantCreator = {\n name: tenantName,\n namespace: namespace,\n access_key: \"\",\n secret_key: \"\",\n access_keys: [],\n secret_keys: [],\n enable_tls: enableTLS && enableAutoCert,\n enable_console: true,\n enable_prometheus: true,\n service_name: \"\",\n image: imageName,\n console_image: consoleImage,\n expose_minio: exposeMinIO,\n expose_console: exposeConsole,\n pools: [\n {\n name: poolName,\n servers: distribution.nodes,\n volumes_per_server: distribution.disks,\n volume_configuration: {\n size: distribution.pvSize,\n storage_class_name: selectedStorageClass,\n },\n resources: {\n requests: {\n memory: memorySize.request,\n },\n limits: {\n memory: memorySize.limit,\n },\n },\n ...affinityObject,\n },\n ],\n erasureCodingParity: parseInt(erasureCode, 10),\n };\n\n if (customDockerhub) {\n dataSend = {\n ...dataSend,\n image_registry: {\n registry: imageRegistry,\n username: imageRegistryUsername,\n password: imageRegistryPassword,\n },\n };\n }\n\n if (logSearchCustom) {\n dataSend = {\n ...dataSend,\n logSearchConfiguration: {\n storageClass: logSearchSelectedStorageClass,\n storageSize: parseInt(logSearchVolumeSize),\n image: logSearchImage,\n postgres_image: logSearchPostgresImage,\n },\n };\n } else {\n dataSend = {\n ...dataSend,\n logSearchConfiguration: {\n image: logSearchImage,\n postgres_image: logSearchPostgresImage,\n },\n };\n }\n\n if (prometheusCustom) {\n dataSend = {\n ...dataSend,\n prometheusConfiguration: {\n storageClass: prometheusSelectedStorageClass,\n storageSize: parseInt(prometheusVolumeSize),\n image: prometheusImage,\n },\n };\n } else {\n dataSend = {\n ...dataSend,\n prometheusConfiguration: {\n image: prometheusImage,\n },\n };\n }\n\n let tenantCerts: any = null;\n let consoleCerts: any = null;\n let caCerts: any = null;\n\n if (caCertificates.length > 0) {\n caCerts = {\n ca_certificates: caCertificates\n .map((keyPair: KeyPair) => keyPair.encoded_cert)\n .filter((keyPair) => keyPair),\n };\n }\n\n if (enableTLS && minioCertificates.length > 0) {\n tenantCerts = {\n minio: minioCertificates\n .map((keyPair: KeyPair) => ({\n crt: keyPair.encoded_cert,\n key: keyPair.encoded_key,\n }))\n .filter((keyPair) => keyPair.crt && keyPair.key),\n };\n }\n\n if (\n enableTLS &&\n consoleCertificate.encoded_cert !== \"\" &&\n consoleCertificate.encoded_key !== \"\"\n ) {\n consoleCerts = {\n console: {\n crt: consoleCertificate.encoded_cert,\n key: consoleCertificate.encoded_key,\n },\n };\n }\n\n if (tenantCerts || consoleCerts || caCerts) {\n dataSend = {\n ...dataSend,\n tls: {\n ...tenantCerts,\n ...consoleCerts,\n ...caCerts,\n },\n };\n }\n\n if (enableEncryption) {\n let insertEncrypt = {};\n\n switch (encryptionType) {\n case \"gemalto\":\n let gemaltoCAIntroduce = {};\n\n if (gemaltoCA.encoded_cert !== \"\") {\n gemaltoCAIntroduce = {\n ca: gemaltoCA.encoded_cert,\n };\n }\n insertEncrypt = {\n gemalto: {\n keysecure: {\n endpoint: gemaltoEndpoint,\n credentials: {\n token: gemaltoToken,\n domain: gemaltoDomain,\n retry: parseInt(gemaltoRetry),\n },\n tls: {\n ...gemaltoCAIntroduce,\n },\n },\n },\n };\n break;\n case \"aws\":\n insertEncrypt = {\n aws: {\n secretsmanager: {\n endpoint: awsEndpoint,\n region: awsRegion,\n kmskey: awsKMSKey,\n credentials: {\n accesskey: awsAccessKey,\n secretkey: awsSecretKey,\n token: awsToken,\n },\n },\n },\n };\n break;\n case \"gcp\":\n insertEncrypt = {\n gcp: {\n secretmanager: {\n project_id: gcpProjectID,\n endpoint: gcpEndpoint,\n credentials: {\n client_email: gcpClientEmail,\n client_id: gcpClientID,\n private_key_id: gcpPrivateKeyID,\n private_key: gcpPrivateKey,\n },\n },\n },\n };\n break;\n case \"vault\":\n let vaultKeyPair = null;\n let vaultCAInsert = null;\n if (\n vaultCertificate.encoded_key !== \"\" &&\n vaultCertificate.encoded_cert !== \"\"\n ) {\n vaultKeyPair = {\n key: vaultCertificate.encoded_key,\n crt: vaultCertificate.encoded_cert,\n };\n }\n if (vaultCA.encoded_cert !== \"\") {\n vaultCAInsert = {\n ca: vaultCA.encoded_cert,\n };\n }\n let vaultTLS = null;\n if (vaultKeyPair || vaultCA) {\n vaultTLS = {\n tls: {\n ...vaultKeyPair,\n ...vaultCAInsert,\n },\n };\n }\n insertEncrypt = {\n vault: {\n endpoint: vaultEndpoint,\n engine: vaultEngine,\n namespace: vaultNamespace,\n prefix: vaultPrefix,\n approle: {\n engine: vaultAppRoleEngine,\n id: vaultId,\n secret: vaultSecret,\n retry: parseInt(vaultRetry),\n },\n ...vaultTLS,\n status: {\n ping: parseInt(vaultPing),\n },\n },\n };\n break;\n }\n\n let encryptionServerKeyPair: any = {};\n let encryptionClientKeyPair: any = {};\n\n if (\n clientCertificate.encoded_key !== \"\" &&\n clientCertificate.encoded_cert !== \"\"\n ) {\n encryptionClientKeyPair = {\n client: {\n key: clientCertificate.encoded_key,\n crt: clientCertificate.encoded_cert,\n },\n };\n }\n\n if (\n serverCertificate.encoded_key !== \"\" &&\n serverCertificate.encoded_cert !== \"\"\n ) {\n encryptionServerKeyPair = {\n server: {\n key: serverCertificate.encoded_key,\n crt: serverCertificate.encoded_cert,\n },\n };\n }\n\n dataSend = {\n ...dataSend,\n encryption: {\n image: kesImage,\n ...encryptionClientKeyPair,\n ...encryptionServerKeyPair,\n ...insertEncrypt,\n },\n };\n }\n\n let dataIDP: any = {};\n switch (idpSelection) {\n case \"Built-in\":\n let keyarray = [];\n for (let i = 0; i < accessKeys.length; i++) {\n keyarray.push({\n access_key: accessKeys[i],\n secret_key: secretKeys[i],\n });\n }\n dataIDP = {\n keys: keyarray,\n };\n break;\n case \"OpenID\":\n dataIDP = {\n oidc: {\n url: openIDURL,\n client_id: openIDClientID,\n secret_id: openIDSecretID,\n },\n };\n break;\n case \"AD\":\n dataIDP = {\n active_directory: {\n url: ADURL,\n skip_tls_verification: ADSkipTLS,\n server_insecure: ADServerInsecure,\n username_format: \"\",\n user_search_filter: ADUserNameFilter,\n group_search_base_dn: ADGroupBaseDN,\n group_search_filter: ADGroupSearchFilter,\n group_name_attribute: ADNameAttribute,\n },\n };\n break;\n }\n\n dataSend = {\n ...dataSend,\n idp: { ...dataIDP },\n };\n\n api\n .invoke(\"POST\", `/api/v1/tenants`, dataSend)\n .then((res) => {\n const consoleSAList = get(res, \"console\", []);\n\n let newSrvAcc: NewServiceAccount = {\n console: [],\n };\n\n if (consoleSAList && Array.isArray(consoleSAList)) {\n const consoleItem = consoleSAList.map((consoleKey) => {\n return {\n accessKey: consoleKey.access_key,\n secretKey: consoleKey.secret_key,\n };\n });\n\n newSrvAcc.console = consoleItem;\n } else {\n newSrvAcc = {\n console: {\n accessKey: res.console.access_key,\n secretKey: res.console.secret_key,\n },\n };\n }\n\n setAddSending(false);\n\n setShowNewCredentials(true);\n setCreatedAccount(newSrvAcc);\n })\n .catch((err) => {\n setAddSending(false);\n setModalErrorSnackMessage(err);\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [addSending]);\n\n const cancelButton = {\n label: \"Cancel\",\n type: \"other\",\n enabled: true,\n action: () => {\n closeAndRefresh(false);\n },\n };\n\n const wizardSteps: IWizardElement[] = [\n {\n label: \"Name Tenant\",\n componentRender: ,\n buttons: [\n cancelButton,\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"nameTenant\"),\n },\n ],\n },\n {\n label: \"Configure\",\n advancedOnly: true,\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"configure\"),\n },\n ],\n },\n {\n label: \"Pod Affinity\",\n advancedOnly: true,\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"affinity\"),\n },\n ],\n },\n {\n label: \"Identity Provider\",\n advancedOnly: true,\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"identityProvider\"),\n },\n ],\n },\n {\n label: \"Security\",\n advancedOnly: true,\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"security\"),\n },\n ],\n },\n {\n label: \"Encryption\",\n advancedOnly: true,\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"encryption\"),\n },\n ],\n },\n {\n label: \"Tenant Size\",\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"tenantSize\"),\n },\n ],\n },\n {\n label: \"Preview Configuration\",\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Create\",\n type: \"submit\",\n enabled: !addSending,\n action: () => {\n setAddSending(true);\n },\n },\n ],\n },\n ];\n\n let filteredWizardSteps = wizardSteps;\n\n if (!advancedMode) {\n filteredWizardSteps = wizardSteps.filter((step) => !step.advancedOnly);\n }\n\n const closeCredentialsModal = () => {\n closeAndRefresh(true);\n };\n\n return (\n \n \n Create New Tenant\n \n {addSending && (\n \n \n \n )}\n {showNewCredentials && (\n {\n closeCredentialsModal();\n }}\n entity=\"Tenant\"\n />\n )}\n \n \n \n \n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n advancedMode: state.tenants.createTenant.advancedModeOn,\n namespace: state.tenants.createTenant.fields.nameTenant.namespace,\n validPages: state.tenants.createTenant.validPages,\n fields: state.tenants.createTenant.fields,\n certificates: state.tenants.createTenant.certificates,\n});\n\nconst connector = connect(mapState, {\n setModalErrorSnackMessage,\n updateAddField,\n});\n\nexport default withStyles(styles)(connector(AddTenant));\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, { useEffect, useState, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport { Button, IconButton } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { ITenant, ITenantsResponse } from \"./types\";\nimport { niceBytes } from \"../../../../common/utils\";\nimport { NewServiceAccount } from \"../../Common/CredentialsPrompt/types\";\nimport {\n actionsTray,\n searchField,\n settingsCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport { CreateIcon } from \"../../../../icons\";\nimport api from \"../../../../common/api\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport DeleteTenant from \"./DeleteTenant\";\nimport AddTenant from \"../AddTenant/AddTenant\";\nimport CredentialsPrompt from \"../../Common/CredentialsPrompt/CredentialsPrompt\";\nimport history from \"../../../../history\";\nimport RefreshIcon from \"@material-ui/icons/Refresh\";\nimport SlideOptions from \"../../Common/SlideOptions/SlideOptions\";\nimport BackSettingsIcon from \"../../../../icons/BackSettingsIcon\";\nimport { resetAddTenantForm } from \"../actions\";\n\ninterface ITenantsList {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n resetAddTenantForm: typeof resetAddTenantForm;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...actionsTray,\n ...searchField,\n ...settingsCommon,\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n actionsTray: {\n ...actionsTray.actionsTray,\n padding: \"0 38px\",\n },\n tenantsContainer: {\n padding: \"15px 0\",\n },\n customConfigurationPage: {\n height: \"calc(100vh - 440px)\",\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n });\n\nconst ListTenants = ({\n classes,\n setErrorSnackMessage,\n resetAddTenantForm,\n}: ITenantsList) => {\n const [currentPanel, setCurrentPanel] = useState(0);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [selectedTenant, setSelectedTenant] = useState(null);\n const [isLoading, setIsLoading] = useState(false);\n const [filterTenants, setFilterTenants] = useState(\"\");\n const [records, setRecords] = useState([]);\n const [showNewCredentials, setShowNewCredentials] = useState(false);\n const [createdAccount, setCreatedAccount] =\n useState(null);\n\n const closeAddModalAndRefresh = (reloadData: boolean) => {\n setCurrentPanel(0);\n resetAddTenantForm();\n\n if (reloadData) {\n setIsLoading(true);\n }\n };\n\n const closeDeleteModalAndRefresh = (reloadData: boolean) => {\n setDeleteOpen(false);\n\n if (reloadData) {\n setIsLoading(true);\n }\n };\n\n const confirmDeleteTenant = (tenant: ITenant) => {\n setSelectedTenant(tenant);\n setDeleteOpen(true);\n };\n\n const redirectToTenantDetails = (tenant: ITenant) => {\n history.push(`/namespaces/${tenant.namespace}/tenants/${tenant.name}`);\n return;\n };\n\n const closeCredentialsModal = () => {\n setShowNewCredentials(false);\n setCreatedAccount(null);\n };\n\n const backClick = () => {\n setCurrentPanel(currentPanel - 1);\n resetAddTenantForm();\n };\n\n const tableActions = [\n { type: \"view\", onClick: redirectToTenantDetails },\n { type: \"delete\", onClick: confirmDeleteTenant },\n ];\n\n const filteredRecords = records.filter((b: any) => {\n if (filterTenants === \"\") {\n return true;\n } else {\n if (b.name.indexOf(filterTenants) >= 0) {\n return true;\n } else {\n return false;\n }\n }\n });\n\n useEffect(() => {\n if (isLoading) {\n const fetchRecords = () => {\n api\n .invoke(\"GET\", `/api/v1/tenants`)\n .then((res: ITenantsResponse) => {\n if (res === null) {\n setIsLoading(false);\n return;\n }\n let resTenants: ITenant[] = [];\n if (res.tenants !== null) {\n resTenants = res.tenants;\n }\n\n for (let i = 0; i < resTenants.length; i++) {\n resTenants[i].capacity = niceBytes(resTenants[i].total_size + \"\");\n }\n\n setRecords(resTenants);\n setIsLoading(false);\n })\n .catch((err) => {\n setErrorSnackMessage(err);\n setIsLoading(false);\n });\n };\n fetchRecords();\n }\n }, [isLoading, setErrorSnackMessage]);\n\n useEffect(() => {\n setIsLoading(true);\n }, []);\n\n const createTenant = () => {\n setCurrentPanel(1);\n };\n\n return (\n \n {deleteOpen && (\n \n )}\n {showNewCredentials && (\n {\n closeCredentialsModal();\n }}\n entity=\"Tenant\"\n />\n )}\n \n \n \n
\n \n \n \n {\n setFilterTenants(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n {\n setIsLoading(true);\n }}\n >\n \n \n }\n onClick={createTenant}\n >\n Create Tenant\n \n \n \n \n \n \n ,\n \n \n \n \n Back To Tenants List\n \n \n \n {currentPanel === 1 && (\n \n )}\n \n ,\n ]}\n currentSlide={currentPanel}\n />\n
\n
\n
\n
\n
\n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n resetAddTenantForm,\n});\n\nexport default withStyles(styles)(connector(ListTenants));\n","import React, { Fragment } from \"react\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { Grid } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport ListTenants from \"./ListTenants/ListTenants\";\n\ninterface IConfigurationMain {\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerLabel: {\n fontSize: 22,\n fontWeight: 600,\n color: \"#000\",\n marginTop: 4,\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst TenantsMain = ({ classes }: IConfigurationMain) => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default withStyles(styles)(TenantsMain);\n","import React, { useState, useEffect } from \"react\";\nimport get from \"lodash/get\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { generatePoolName, niceBytes } from \"../../../../common/utils\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport api from \"../../../../common/api\";\nimport { IAddPoolRequest, ITenant } from \"../ListTenants/types\";\nimport { IAffinityModel } from \"../../../../common/types\";\nimport { getDefaultAffinity } from \"./utils\";\n\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { IQuotaElement, IQuotas, Opts } from \"../ListTenants/utils\";\n\ninterface IAddPoolProps {\n tenant: ITenant;\n classes: any;\n open: boolean;\n onClosePoolAndReload: (shouldReload: boolean) => void;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n multiContainer: {\n display: \"flex\",\n alignItems: \"center\" as const,\n justifyContent: \"flex-start\" as const,\n },\n sizeFactorContainer: {\n marginLeft: 8,\n },\n bottomContainer: {\n display: \"flex\",\n flexGrow: 1,\n alignItems: \"center\",\n \"& div\": {\n flexGrow: 1,\n width: \"100%\",\n },\n },\n factorElements: {\n display: \"flex\",\n justifyContent: \"flex-start\",\n },\n sizeNumber: {\n fontSize: 35,\n fontWeight: 700,\n textAlign: \"center\",\n },\n sizeDescription: {\n fontSize: 14,\n color: \"#777\",\n textAlign: \"center\",\n },\n ...modalBasic,\n });\n\nconst AddPoolModal = ({\n tenant,\n classes,\n open,\n onClosePoolAndReload,\n}: IAddPoolProps) => {\n const [addSending, setAddSending] = useState(false);\n const [numberOfNodes, setNumberOfNodes] = useState(0);\n const [volumeSize, setVolumeSize] = useState(0);\n const [volumesPerServer, setVolumesPerSever] = useState(0);\n const [selectedStorageClass, setSelectedStorageClass] = useState(\"\");\n const [storageClasses, setStorageClasses] = useState([]);\n\n const instanceCapacity: number = volumeSize * 1073741824 * volumesPerServer;\n const totalCapacity: number = instanceCapacity * numberOfNodes;\n\n useEffect(() => {\n setSelectedStorageClass(\"\");\n\n setStorageClasses([]);\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${tenant.namespace}/resourcequotas/${tenant.namespace}-storagequota`\n )\n .then((res: IQuotas) => {\n const elements: IQuotaElement[] = get(res, \"elements\", []);\n\n const newStorage = elements.map((storageClass: any) => {\n const name = get(storageClass, \"name\", \"\").split(\n \".storageclass.storage.k8s.io/requests.storage\"\n )[0];\n\n return { label: name, value: name };\n });\n\n setStorageClasses(newStorage);\n if (newStorage.length > 0) {\n setSelectedStorageClass(newStorage[0].value);\n }\n })\n .catch((err: any) => {\n console.error(err);\n });\n }, [tenant]);\n\n return (\n onClosePoolAndReload(false)}\n modalOpen={open}\n title=\"Add Pool\"\n >\n ) => {\n e.preventDefault();\n setAddSending(true);\n\n const poolName = generatePoolName(tenant.pools);\n\n const defaultAffinity: IAffinityModel = getDefaultAffinity(\n tenant.name,\n poolName\n );\n\n const data: IAddPoolRequest = {\n name: poolName,\n servers: numberOfNodes,\n volumes_per_server: volumesPerServer,\n volume_configuration: {\n size: volumeSize * 1073741824,\n storage_class_name: selectedStorageClass,\n labels: null,\n },\n affinity: defaultAffinity,\n };\n\n api\n .invoke(\n \"POST\",\n `/api/v1/namespaces/${tenant.namespace}/tenants/${tenant.name}/pools`,\n data\n )\n .then(() => {\n setAddSending(false);\n onClosePoolAndReload(true);\n })\n .catch((err) => {\n setAddSending(false);\n // setDeleteError(err);\n });\n }}\n >\n \n ) => {\n setNumberOfNodes(parseInt(e.target.value));\n }}\n label=\"Number o Nodes\"\n value={numberOfNodes.toString(10)}\n />\n \n \n ) => {\n setVolumeSize(parseInt(e.target.value));\n }}\n label=\"Volume Size (Gi)\"\n value={volumeSize.toString(10)}\n />\n \n \n ) => {\n setVolumesPerSever(parseInt(e.target.value));\n }}\n label=\"Volumes per Server\"\n value={volumesPerServer.toString(10)}\n />\n \n \n ) => {\n setSelectedStorageClass(e.target.value as string);\n }}\n label=\"Storage Class\"\n value={selectedStorageClass}\n options={storageClasses}\n disabled={storageClasses.length < 1}\n />\n \n \n \n
\n
\n
\n {niceBytes(instanceCapacity.toString(10))}\n
\n
Instance Capacity
\n
\n
\n
\n {niceBytes(totalCapacity.toString(10))}\n
\n
Total Capacity
\n
\n
\n
\n \n Save\n \n
\n
\n {addSending && (\n \n \n \n )}\n
\n \n \n );\n};\n\nexport default withStyles(styles)(AddPoolModal);\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, { useState } from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport Grid from \"@material-ui/core/Grid\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport Tab from \"@material-ui/core/Tab\";\nimport Tabs from \"@material-ui/core/Tabs\";\n\ninterface IReplicationProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (refreshList: boolean) => void;\n}\n\ninterface IDropDownElements {\n label: string;\n value: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n multiContainer: {\n display: \"flex\",\n alignItems: \"center\" as const,\n justifyContent: \"flex-start\" as const,\n },\n sizeFactorContainer: {\n marginLeft: 8,\n },\n ...modalBasic,\n });\n\nconst ReplicationSetup = ({\n classes,\n open,\n closeModalAndRefresh,\n}: IReplicationProps) => {\n const [addSending, setAddSending] = useState(false);\n const [selectedTab, setSelectedTab] = useState(0);\n const [sourceBucket, setSourceBucket] = useState(\"\");\n const [clusterSelected, setClusterSelected] = useState(\"\");\n const [destinationBucket, setDestinationBucket] = useState(\"\");\n const [address, setAddress] = useState(\"\");\n const [bucket, setBucket] = useState(\"\");\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n\n const clustersList: IDropDownElements[] = [];\n const sourceBuckets: IDropDownElements[] = [];\n const destinationBuckets: IDropDownElements[] = [];\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n >\n ) => {\n e.preventDefault();\n setAddSending(true);\n }}\n >\n \n ) => {\n setSourceBucket(e.target.value as string);\n }}\n value={sourceBucket}\n name=\"source_bucket\"\n id=\"source_bucket\"\n />\n \n \n {\n setSelectedTab(newValue);\n }}\n aria-label=\"cluster-tabs\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n \n \n \n \n \n
\n
\n {selectedTab === 0 && (\n \n \n ) => {\n setClusterSelected(e.target.value as string);\n }}\n value={clusterSelected}\n name=\"cluster\"\n id=\"cluster\"\n />\n \n \n ) => {\n setDestinationBucket(e.target.value as string);\n }}\n value={destinationBucket}\n name=\"destination_bucket\"\n id=\"destination_bucket\"\n />\n \n \n )}\n\n {selectedTab === 1 && (\n \n \n ) => {\n setAddress(e.target.value);\n }}\n label=\"Address\"\n value={address}\n />\n \n \n ) => {\n setBucket(e.target.value);\n }}\n label=\"Bucket\"\n value={bucket}\n />\n \n \n ) => {\n setAccessKey(e.target.value);\n }}\n label=\"Access Key\"\n value={accessKey}\n />\n \n \n ) => {\n setSecretKey(e.target.value);\n }}\n label=\"Secret Key\"\n value={secretKey}\n />\n \n \n )}\n \n \n Save\n \n \n {addSending && (\n \n \n \n )}\n \n \n );\n};\n\nexport default withStyles(styles)(ReplicationSetup);\n","import React from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\nimport ErrorBlock from \"../../../shared/ErrorBlock\";\n\ninterface IProgressBar {\n maxValue: number;\n currValue: number;\n label: string;\n renderFunction?: (element: string) => any;\n error: string;\n loading: boolean;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n paperContainer: {\n padding: 15,\n },\n allValue: {\n fontSize: 16,\n fontWeight: 700,\n marginBottom: 8,\n },\n currentUsage: {\n fontSize: 12,\n marginTop: 8,\n },\n centerItem: {\n textAlign: \"center\",\n },\n });\n\nconst BorderLinearProgress = withStyles((theme) => ({\n root: {\n height: 10,\n borderRadius: 5,\n },\n colorPrimary: {\n backgroundColor: \"#F4F4F4\",\n },\n bar: {\n borderRadius: 5,\n backgroundColor: \"#081C42\",\n },\n padChart: {\n padding: \"5px\",\n },\n}))(LinearProgress);\n\nconst UsageBarWrapper = ({\n classes,\n maxValue,\n currValue,\n label,\n renderFunction,\n loading,\n error,\n}: IProgressBar) => {\n const porcentualValue = (currValue * 100) / maxValue;\n\n const renderComponent = () => {\n if (!loading) {\n return error !== \"\" ? (\n \n ) : (\n \n \n {label}{\" \"}\n {renderFunction ? renderFunction(maxValue.toString()) : maxValue}\n \n \n \n Used:{\" \"}\n {renderFunction ? renderFunction(currValue.toString()) : currValue}\n \n \n );\n }\n\n return null;\n };\n\n return (\n \n {loading && (\n
\n \n \n \n
\n )}\n {renderComponent()}\n
\n );\n};\n\nexport default withStyles(styles)(UsageBarWrapper);\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, { useState, Fragment, useEffect, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, Grid } from \"@material-ui/core\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport api from \"../../../../common/api\";\n\ninterface IUpdateTenantModal {\n open: boolean;\n closeModalAndRefresh: (update: boolean) => any;\n namespace: string;\n idTenant: string;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\nconst UpdateTenantModal = ({\n open,\n closeModalAndRefresh,\n namespace,\n idTenant,\n setModalErrorSnackMessage,\n classes,\n}: IUpdateTenantModal) => {\n const [isSending, setIsSending] = useState(false);\n const [minioImage, setMinioImage] = useState(\"\");\n const [consoleImage, setConsoleImage] = useState(\"\");\n const [imageRegistry, setImageRegistry] = useState(false);\n const [imageRegistryEndpoint, setImageRegistryEndpoint] =\n useState(\"\");\n const [imageRegistryUsername, setImageRegistryUsername] =\n useState(\"\");\n const [imageRegistryPassword, setImageRegistryPassword] =\n useState(\"\");\n const [validMinioImage, setValidMinioImage] = useState(true);\n const [validConsoleImage, setValidConsoleImage] = useState(true);\n\n const validateImage = useCallback(\n (fieldToCheck: string) => {\n const pattern = new RegExp(\"^$|^((.*?)/(.*?):(.+))$\");\n\n switch (fieldToCheck) {\n case \"consoleImage\":\n setValidConsoleImage(pattern.test(consoleImage));\n break;\n case \"minioImage\":\n setValidMinioImage(pattern.test(minioImage));\n break;\n }\n },\n [consoleImage, minioImage]\n );\n\n useEffect(() => {\n validateImage(\"minioImage\");\n }, [minioImage, validateImage]);\n\n useEffect(() => {\n validateImage(\"consoleImage\");\n }, [consoleImage, validateImage]);\n\n const closeAction = () => {\n closeModalAndRefresh(false);\n };\n\n const resetForm = () => {\n setMinioImage(\"\");\n setConsoleImage(\"\");\n setImageRegistry(false);\n setImageRegistryEndpoint(\"\");\n setImageRegistryUsername(\"\");\n setImageRegistryPassword(\"\");\n };\n\n const updateMinIOImage = () => {\n setIsSending(true);\n\n let payload = {\n image: minioImage,\n console_image: consoleImage,\n enable_prometheus: true,\n };\n\n if (imageRegistry) {\n const registry: any = {\n image_registry: {\n registry: imageRegistryEndpoint,\n username: imageRegistryUsername,\n password: imageRegistryPassword,\n },\n };\n payload = {\n ...payload,\n ...registry,\n };\n }\n\n api\n .invoke(\n \"PUT\",\n `/api/v1/namespaces/${namespace}/tenants/${idTenant}`,\n payload\n )\n .then(() => {\n setIsSending(false);\n closeModalAndRefresh(true);\n })\n .catch((error) => {\n setModalErrorSnackMessage(error);\n setIsSending(false);\n });\n };\n\n return (\n \n \n \n \n Please enter the MinIO image from dockerhub to use. If blank, then\n latest build will be used.\n \n
\n
\n \n {\n setMinioImage(e.target.value);\n }}\n />\n \n \n {\n setConsoleImage(e.target.value);\n }}\n />\n \n \n ) => {\n setImageRegistry(!imageRegistry);\n }}\n label={\"Set Custom Image Registry\"}\n indicatorLabels={[\"Yes\", \"No\"]}\n />\n \n {imageRegistry && (\n \n \n {\n setImageRegistryEndpoint(e.target.value);\n }}\n />\n \n \n {\n setImageRegistryUsername(e.target.value);\n }}\n />\n \n \n {\n setImageRegistryPassword(e.target.value);\n }}\n />\n \n \n )}\n
\n \n \n Clear\n \n \n Save\n \n \n
\n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(UpdateTenantModal));\n","// This file is part of MinIO Kubernetes Cloud\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport api from \"../../../../common/api\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport {\n fieldBasic,\n modalBasic,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport CodeMirrorWrapper from \"../../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n jsonPolicyEditor: {\n minHeight: 400,\n width: \"100%\",\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n errorState: {\n color: \"#b53b4b\",\n fontSize: 14,\n fontWeight: \"bold\",\n },\n ...modalBasic,\n ...fieldBasic,\n });\n\ninterface ITenantYAML {\n yaml: string;\n}\n\ninterface ITenantYAMLProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (refresh: boolean) => void;\n tenant: string;\n namespace: string;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst TenantYAML = ({\n classes,\n open,\n closeModalAndRefresh,\n tenant,\n namespace,\n setModalErrorSnackMessage,\n}: ITenantYAMLProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [loading, setLoading] = useState(false);\n const [tenantYaml, setTenantYaml] = useState(\"\");\n const [errorMessage, setErrorMessage] = useState(\"\");\n\n const updateTenant = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n setErrorMessage(\"\");\n api\n .invoke(\"PUT\", `/api/v1/namespaces/${namespace}/tenants/${tenant}/yaml`, {\n yaml: tenantYaml,\n })\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh(true);\n setErrorMessage(\"\");\n })\n .catch((err) => {\n setAddLoading(false);\n console.log(err);\n setErrorMessage(err);\n });\n };\n\n // check the permissions for creating bucket\n useEffect(() => {\n api\n .invoke(\"GET\", `/api/v1/namespaces/${namespace}/tenants/${tenant}/yaml`)\n .then((res: ITenantYAML) => {\n setLoading(false);\n setTenantYaml(res.yaml);\n })\n .catch((err: any) => {\n setLoading(false);\n setModalErrorSnackMessage(err);\n });\n }, [tenant, namespace, setModalErrorSnackMessage]);\n\n useEffect(() => {}, []);\n\n const validSave = tenantYaml.trim() !== \"\";\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n title={`YAML`}\n >\n {loading && }\n {errorMessage !== \"\" && (\n
{errorMessage}
\n )}\n {!loading && (\n ) => {\n updateTenant(e);\n }}\n >\n \n \n \n
\n
\n {\n setTenantYaml(value);\n }}\n />\n
\n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n
\n \n )}\n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(TenantYAML));\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 from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { containerForHeader } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { Button, Typography } from \"@material-ui/core\";\nimport { niceBytes } from \"../../../../common/utils\";\nimport Moment from \"react-moment\";\nimport { Link } from \"react-router-dom\";\nimport Paper from \"@material-ui/core/Paper\";\nimport { ITenant } from \"../ListTenants/types\";\nimport { LicenseInfo } from \"../../License/types\";\n\ninterface ISubnetLicenseTenant {\n classes: any;\n tenant: ITenant | null;\n loadingActivateProduct: any;\n loadingLicenseInfo: boolean;\n licenseInfo: LicenseInfo | undefined;\n activateProduct: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n paperContainer: {\n padding: \"15px 15px 15px 50px\",\n },\n licenseInfoValue: {\n textTransform: \"none\",\n fontSize: 14,\n fontWeight: \"bold\",\n },\n licenseContainer: {\n position: \"relative\",\n padding: \"20px 52px 0px 28px\",\n background: \"#032F51\",\n boxShadow: \"0px 3px 7px #00000014\",\n \"& h2\": {\n color: \"#FFF\",\n marginBottom: 67,\n },\n \"& a\": {\n textDecoration: \"none\",\n },\n \"& h3\": {\n color: \"#FFFFFF\",\n marginBottom: \"30px\",\n fontWeight: \"bold\",\n },\n \"& h6\": {\n color: \"#FFFFFF !important\",\n },\n },\n licenseInfo: { color: \"#FFFFFF\", position: \"relative\" },\n licenseInfoTitle: {\n textTransform: \"none\",\n color: \"#BFBFBF\",\n fontSize: 11,\n },\n verifiedIcon: {\n width: 96,\n position: \"absolute\",\n right: 0,\n bottom: 29,\n },\n noUnderLine: {\n textDecoration: \"none\",\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst SubnetLicenseTenant = ({\n classes,\n tenant,\n loadingActivateProduct,\n loadingLicenseInfo,\n licenseInfo,\n activateProduct,\n}: ISubnetLicenseTenant) => {\n return (\n \n {tenant && tenant.subnet_license ? (\n \n \n \n \n License\n \n \n Commercial License\n \n \n Organization\n \n \n {tenant.subnet_license.organization}\n \n \n Registered Capacity\n \n \n {niceBytes(\n (tenant.subnet_license.storage_capacity * 1099511627776) // 1 Terabyte = 1099511627776 Bytes\n .toString(10)\n )}\n \n \n Expiry Date\n \n \n \n {tenant.subnet_license.expires_at}\n \n \n \n \n \n Subscription Plan\n \n \n {tenant.subnet_license.plan}\n \n \n Requester\n \n \n {tenant.subnet_license.email}\n \n \n \n \n \n ) : (\n !loadingLicenseInfo && (\n \n {!licenseInfo && (\n {\n e.stopPropagation();\n }}\n className={classes.noUnderLine}\n >\n \n Activate Product\n \n \n )}\n {licenseInfo && tenant && (\n activateProduct(tenant.namespace, tenant.name)}\n >\n Attach License\n \n )}\n \n )\n )}\n
\n );\n};\n\nexport default withStyles(styles)(SubnetLicenseTenant);\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, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n actionsTray,\n buttonsStyles,\n containerForHeader,\n hrClass,\n modalBasic,\n searchField,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {\n Button,\n IconButton,\n Menu,\n MenuItem,\n TextField,\n} from \"@material-ui/core\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport Tab from \"@material-ui/core/Tab\";\nimport { CreateIcon } from \"../../../../icons\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport Paper from \"@material-ui/core/Paper\";\nimport { niceBytes, niceDays } from \"../../../../common/utils\";\nimport AddPoolModal from \"./AddPoolModal\";\nimport AddBucket from \"../../Buckets/ListBuckets/AddBucket\";\nimport ReplicationSetup from \"./ReplicationSetup\";\nimport api from \"../../../../common/api\";\nimport { IPodListElement, IPool, ITenant } from \"../ListTenants/types\";\nimport PageHeader from \"../../Common/PageHeader/PageHeader\";\nimport UsageBarWrapper from \"../../Common/UsageBarWrapper/UsageBarWrapper\";\nimport UpdateTenantModal from \"./UpdateTenantModal\";\nimport { LicenseInfo } from \"../../License/types\";\nimport { Link } from \"react-router-dom\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport MoreVertIcon from \"@material-ui/icons/MoreVert\";\nimport TenantYAML from \"./TenantYAML\";\nimport SubnetLicenseTenant from \"./SubnetLicenseTenant\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\n\ninterface ITenantDetailsProps {\n classes: any;\n match: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\ninterface ITenantUsage {\n used: string;\n disk_used: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n multiContainer: {\n display: \"flex\",\n alignItems: \"center\" as const,\n justifyContent: \"flex-start\" as const,\n },\n sizeFactorContainer: {\n marginLeft: 8,\n },\n containerHeader: {\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n paperContainer: {\n padding: \"15px 15px 15px 50px\",\n },\n infoGrid: {\n display: \"grid\",\n gridTemplateColumns: \"auto auto auto auto\",\n gridGap: 8,\n \"& div\": {\n display: \"flex\",\n alignItems: \"center\",\n },\n \"& div:nth-child(odd)\": {\n justifyContent: \"flex-end\",\n fontWeight: 700,\n },\n \"& div:nth-child(2n)\": {\n paddingRight: 35,\n },\n },\n masterActions: {\n width: \"25%\",\n minWidth: \"120px\",\n \"& div\": {\n margin: \"5px 0px\",\n },\n },\n updateButton: {\n backgroundColor: \"transparent\",\n border: 0,\n padding: \"0 6px\",\n cursor: \"pointer\",\n \"&:focus, &:active\": {\n outline: \"none\",\n },\n \"& svg\": {\n height: 12,\n },\n },\n poolLabel: {\n color: \"#666666\",\n },\n breadcrumLink: {\n textDecoration: \"none\",\n color: \"black\",\n },\n ...modalBasic,\n ...actionsTray,\n ...buttonsStyles,\n ...searchField,\n ...hrClass,\n actionsTray: {\n ...actionsTray.actionsTray,\n padding: \"15px 0 0\",\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst TenantDetails = ({\n classes,\n match,\n setErrorSnackMessage,\n}: ITenantDetailsProps) => {\n const [selectedTab, setSelectedTab] = useState(0);\n const [capacity, setCapacity] = useState(0);\n const [poolCount, setPoolCount] = useState(0);\n const [pools, setPools] = useState([]);\n const [pods, setPods] = useState([]);\n const [instances, setInstances] = useState(0);\n const [volumes, setVolumes] = useState(0);\n const [addPoolOpen, setAddPool] = useState(false);\n const [addBucketOpen, setAddBucketOpen] = useState(false);\n const [addReplicationOpen, setAddReplicationOpen] = useState(false);\n const [tenant, setTenant] = useState(null);\n const [loadingUsage, setLoadingUsage] = useState(true);\n const [usageError, setUsageError] = useState(\"\");\n const [usage, setUsage] = useState(0);\n const [updateMinioVersion, setUpdateMinioVersion] = useState(false);\n const [yamlScreenOpen, setYamlScreenOpen] = useState(false);\n const [licenseInfo, setLicenseInfo] = useState();\n const [loadingLicenseInfo, setLoadingLicenseInfo] = useState(true);\n const [loadingActivateProduct, setLoadingActivateProduct] = useState(\n false\n );\n const [logEnabled, setLogEnabled] = useState(false);\n const [monitoringEnabled, setMonitoringEnabled] = useState(false);\n const [encryptionEnabled, setEncryptionEnabled] = useState(false);\n const [adEnabled, setAdEnabled] = useState(false);\n const [oicEnabled, setOicEnabled] = useState(false);\n\n const tenantName = match.params[\"tenantName\"];\n const tenantNamespace = match.params[\"tenantNamespace\"];\n\n const onClosePoolAndRefresh = (reload: boolean) => {\n setAddPool(false);\n\n if (reload) {\n loadInfo();\n loadUsage();\n }\n };\n\n const closeBucketsAndRefresh = () => {\n setAddBucketOpen(false);\n };\n\n const closeReplicationAndRefresh = (reload: boolean) => {\n setAddReplicationOpen(false);\n\n if (reload) {\n loadInfo();\n loadUsage();\n }\n };\n\n const activateProduct = (namespace: string, tenant: string) => {\n if (loadingActivateProduct) {\n return;\n }\n setLoadingActivateProduct(true);\n api\n .invoke(\n \"POST\",\n `/api/v1/subscription/namespaces/${namespace}/tenants/${tenant}/activate`,\n {}\n )\n .then(() => {\n setLoadingActivateProduct(false);\n loadInfo();\n })\n .catch((err) => {\n setLoadingActivateProduct(false);\n setErrorSnackMessage(err);\n });\n };\n\n const loadInfo = () => {\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${tenantNamespace}/tenants/${tenantName}`\n )\n .then((res: ITenant) => {\n const resPools = !res.pools ? [] : res.pools;\n\n let totalInstances = 0;\n let totalVolumes = 0;\n let poolNamedIndex = 0;\n for (let pool of resPools) {\n const cap =\n pool.volumes_per_server *\n pool.servers *\n pool.volume_configuration.size;\n pool.label = `pool-${poolNamedIndex}`;\n if (pool.name === undefined || pool.name === \"\") {\n pool.name = pool.label;\n }\n pool.capacity = niceBytes(cap + \"\");\n pool.volumes = pool.servers * pool.volumes_per_server;\n totalInstances += pool.servers;\n totalVolumes += pool.volumes;\n poolNamedIndex += 1;\n }\n setCapacity(res.total_size || 0);\n setPoolCount(resPools.length);\n setVolumes(totalVolumes);\n setInstances(totalInstances);\n\n setPools(resPools);\n\n setLogEnabled(res.logEnabled);\n setMonitoringEnabled(res.monitoringEnabled);\n setEncryptionEnabled(res.encryptionEnabled);\n setAdEnabled(res.idpAdEnabled);\n setOicEnabled(res.idpOicEnabled);\n\n setTenant(res);\n })\n .catch((err) => {\n setErrorSnackMessage(err);\n });\n };\n\n const loadUsage = () => {\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${tenantNamespace}/tenants/${tenantName}/usage`\n )\n .then((result: ITenantUsage) => {\n const usage = get(result, \"disk_used\", \"0\");\n setUsage(parseInt(usage));\n setUsageError(\"\");\n setLoadingUsage(false);\n })\n .catch((err) => {\n setUsageError(err);\n setUsage(0);\n setLoadingUsage(false);\n });\n };\n\n const loadPods = () => {\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${tenantNamespace}/tenants/${tenantName}/pods`\n )\n .then((result: IPodListElement[]) => {\n for (let i = 0; i < result.length; i++) {\n let currentTime = new Date().getSeconds();\n result[i].time = niceDays(\n (currentTime - parseInt(result[i].timeCreated)).toString()\n );\n }\n setPods(result);\n })\n .catch((err) => {\n setErrorSnackMessage(\"Error loading pods\");\n });\n };\n\n const fetchLicenseInfo = () => {\n setLoadingLicenseInfo(true);\n api\n .invoke(\"GET\", `/api/v1/subscription/info`)\n .then((res: LicenseInfo) => {\n setLicenseInfo(res);\n setLoadingLicenseInfo(false);\n })\n .catch((err: any) => {\n setLoadingLicenseInfo(false);\n });\n };\n\n useEffect(() => {\n loadInfo();\n loadUsage();\n fetchLicenseInfo();\n loadPods();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const [anchorEl, setAnchorEl] = React.useState(null);\n\n const handleTenantMenu = (event: any) => {\n setAnchorEl(event.currentTarget);\n };\n\n const editYaml = () => {\n setAnchorEl(null);\n setYamlScreenOpen(true);\n };\n\n const closeYAMLModalAndRefresh = () => {\n setYamlScreenOpen(false);\n loadInfo();\n };\n\n return (\n \n {addPoolOpen && tenant !== null && (\n \n )}\n {addBucketOpen && (\n \n )}\n {addReplicationOpen && (\n \n )}\n {updateMinioVersion && (\n {\n setUpdateMinioVersion(false);\n }}\n idTenant={tenantName}\n namespace={tenantNamespace}\n />\n )}\n {yamlScreenOpen && (\n \n )}\n \n \n Tenant\n \n {` > ${match.params[\"tenantName\"]}`}\n \n \n \n \n \n Edit YAML\n \n \n \n }\n />\n \n \n \n {\n setSelectedTab(newValue);\n }}\n aria-label=\"tenant-tabs\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n \n \n \n \n \n \n \n {selectedTab === 0 && (\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {tenant?.endpoints && (\n \n \n \n \n \n \n )}\n \n \n \n \n
\n

Details

\n
\n
Capacity:{niceBytes(capacity.toString(10))}MinIO:\n {\n setUpdateMinioVersion(true);\n }}\n >\n {tenant ? tenant.image : \"\"}\n \n
Clusters:{poolCount}Console:\n {\n setUpdateMinioVersion(true);\n }}\n >\n {tenant ? tenant.console_image : \"\"}\n \n
Instances:{instances}Volumes:{volumes}
Endpoint:\n \n {tenant?.endpoints.minio}\n \n Console:\n \n {tenant?.endpoints.console}\n \n
State:{tenant?.currentState}
\n
\n \n \n \n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {adEnabled ||\n (!adEnabled && !oicEnabled && (\n \n \n \n \n ))}\n {oicEnabled ||\n (!oicEnabled && !adEnabled && (\n \n \n \n \n ))}\n \n
\n

Features

\n
\n
Logs:\n \n {logEnabled ? \"Enabled\" : \"Disabled\"}\n \n Monitoring:\n \n {monitoringEnabled ? \"Enabled\" : \"Disabled\"}\n \n
Encryption:\n \n {encryptionEnabled ? \"Enabled\" : \"Disabled\"}\n \n
Active Directory:\n \n {adEnabled ? \"Enabled\" : \"Disabled\"}\n \n OpenID:\n \n {oicEnabled ? \"Enabled\" : \"Disabled\"}\n \n
\n
\n
\n
\n
\n )}\n {selectedTab === 1 && (\n \n \n {\n // setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n }\n onClick={() => {\n setAddPool(true);\n }}\n >\n Expand Tenant\n \n \n \n
\n
\n\n \n {\n console.log(element);\n },\n sendOnlyId: true,\n },\n ]}\n columns={[\n { label: \"Name\", elementKey: \"name\" },\n { label: \"Capacity\", elementKey: \"capacity\" },\n { label: \"# of Instances\", elementKey: \"servers\" },\n { label: \"# of Drives\", elementKey: \"volumes\" },\n ]}\n isLoading={false}\n records={pools}\n entityName=\"Servers\"\n idField=\"name\"\n />\n \n
\n )}\n {selectedTab === 2 && (\n \n
\n {\n return input != null ? input : 0;\n },\n },\n { label: \"Node\", elementKey: \"node\" },\n ]}\n isLoading={false}\n records={pods}\n entityName=\"Servers\"\n idField=\"name\"\n />\n
\n )}\n {selectedTab === 3 && (\n \n
\n \n \n \n \n \n
\n )}\n
\n
\n
\n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(TenantDetails));\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\nexport const OBJECT_BROWSER_ADD_ROUTE = \"OBJECT_BROWSER/ADD_ROUTE\";\nexport const OBJECT_BROWSER_RESET_ROUTES_LIST =\n \"OBJECT_BROWSER/RESET_ROUTES_LIST\";\nexport const OBJECT_BROWSER_REMOVE_ROUTE_LEVEL =\n \"OBJECT_BROWSER/REMOVE_ROUTE_LEVEL\";\nexport const OBJECT_BROWSER_SET_ALL_ROUTES = \"OBJECT_BROWSER/SET_ALL_ROUTES\";\nexport const OBJECT_BROWSER_CREATE_FOLDER = \"OBJECT_BROWSER/CREATE_FOLDER\";\nexport const OBJECT_BROWSER_SET_LAST_AS_FILE =\n \"OBJECT_BROWSER/SET_LAST_AS_FILE\";\nexport const OBJECT_BROWSER_DOWNLOAD_FILE_LOADER =\n \"OBJECT_BROWSER/DOWNLOAD_FILE_LOADER\";\nexport const OBJECT_BROWSER_DOWNLOADED_FILE = \"OBJECT_BROWSER/DOWNLOADED_FILE\";\n\ninterface AddRouteAction {\n type: typeof OBJECT_BROWSER_ADD_ROUTE;\n route: string;\n label: string;\n routeType: string;\n}\n\ninterface ResetRoutesList {\n type: typeof OBJECT_BROWSER_RESET_ROUTES_LIST;\n reset: boolean;\n}\n\ninterface RemoveRouteLevel {\n type: typeof OBJECT_BROWSER_REMOVE_ROUTE_LEVEL;\n toRoute: string;\n}\n\ninterface SetAllRoutes {\n type: typeof OBJECT_BROWSER_SET_ALL_ROUTES;\n currentRoute: string;\n}\n\ninterface CreateFolder {\n type: typeof OBJECT_BROWSER_CREATE_FOLDER;\n newRoute: string;\n}\n\ninterface SetLastAsFile {\n type: typeof OBJECT_BROWSER_SET_LAST_AS_FILE;\n}\n\ninterface SetFileDownload {\n type: typeof OBJECT_BROWSER_DOWNLOAD_FILE_LOADER;\n path: string;\n}\n\ninterface FileDownloaded {\n type: typeof OBJECT_BROWSER_DOWNLOADED_FILE;\n path: string;\n}\n\nexport type ObjectBrowserActionTypes =\n | AddRouteAction\n | ResetRoutesList\n | RemoveRouteLevel\n | SetAllRoutes\n | CreateFolder\n | SetLastAsFile\n | SetFileDownload\n | FileDownloaded;\n\nexport const addRoute = (route: string, label: string, routeType: string) => {\n return {\n type: OBJECT_BROWSER_ADD_ROUTE,\n route,\n label,\n routeType,\n };\n};\n\nexport const resetRoutesList = (reset: boolean) => {\n return {\n type: OBJECT_BROWSER_RESET_ROUTES_LIST,\n reset,\n };\n};\n\nexport const removeRouteLevel = (toRoute: string) => {\n return {\n type: OBJECT_BROWSER_REMOVE_ROUTE_LEVEL,\n toRoute,\n };\n};\n\nexport const setAllRoutes = (currentRoute: string) => {\n return {\n type: OBJECT_BROWSER_SET_ALL_ROUTES,\n currentRoute,\n };\n};\n\nexport const createFolder = (newRoute: string) => {\n return {\n type: OBJECT_BROWSER_CREATE_FOLDER,\n newRoute,\n };\n};\n\nexport const setLastAsFile = () => {\n return {\n type: OBJECT_BROWSER_SET_LAST_AS_FILE,\n };\n};\n\nexport const fileIsBeingPrepared = (path: string) => {\n return {\n type: OBJECT_BROWSER_DOWNLOAD_FILE_LOADER,\n path,\n };\n};\n\nexport const fileDownloadStarted = (path: string) => {\n return {\n type: OBJECT_BROWSER_DOWNLOADED_FILE,\n path,\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 from \"react\";\nimport get from \"lodash/get\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { connect } from \"react-redux\";\nimport { withStyles } from \"@material-ui/core\";\nimport { createStyles, Theme } from \"@material-ui/core/styles\";\nimport { removeRouteLevel } from \"./actions\";\nimport { ObjectBrowserState, Route } from \"./reducers\";\nimport { objectBrowserCommon } from \"../Common/FormComponents/common/styleLibrary\";\nimport { Link } from \"react-router-dom\";\n\ninterface ObjectBrowserReducer {\n objectBrowser: ObjectBrowserState;\n}\n\ninterface IObjectBrowser {\n classes: any;\n objectsList: Route[];\n removeRouteLevel: (path: string) => any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...objectBrowserCommon,\n });\n\nconst BrowserBreadcrumbs = ({\n classes,\n objectsList,\n removeRouteLevel,\n}: IObjectBrowser) => {\n const listBreadcrumbs = objectsList.map((objectItem, index) => {\n return (\n \n {\n removeRouteLevel(objectItem.route);\n }}\n >\n {objectItem.label}\n \n {index < objectsList.length - 1 && / }\n \n );\n });\n\n return (\n \n \n
\n {objectsList && objectsList.length > 0\n ? objectsList.slice(-1)[0].label\n : \"\"}\n
\n
\n \n {listBreadcrumbs}\n \n
\n );\n};\n\nconst mapStateToProps = ({ objectBrowser }: ObjectBrowserReducer) => ({\n objectsList: get(objectBrowser, \"routesList\", []),\n});\n\nconst mapDispatchToProps = {\n removeRouteLevel,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(BrowserBreadcrumbs));\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, { useState, useEffect, Fragment } from \"react\";\nimport { withRouter } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport { Button, IconButton } from \"@material-ui/core\";\nimport { CreateIcon } from \"../../../icons\";\nimport { niceBytes } from \"../../../common/utils\";\nimport { Bucket, BucketList, HasPermissionResponse } from \"../Buckets/types\";\nimport {\n actionsTray,\n objectBrowserCommon,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { addRoute, resetRoutesList } from \"./actions\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport BrowserBreadcrumbs from \"./BrowserBreadcrumbs\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport AddBucket from \"../Buckets/ListBuckets/AddBucket\";\nimport api from \"../../../common/api\";\nimport RefreshIcon from \"@material-ui/icons/Refresh\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n usedSpaceCol: {\n width: 150,\n textAlign: \"right\",\n },\n subTitleLabel: {\n alignItems: \"center\",\n display: \"flex\",\n },\n bucketName: {\n display: \"flex\",\n alignItems: \"center\",\n },\n iconBucket: {\n backgroundImage: \"url(/images/ob_bucket_clear.svg)\",\n backgroundRepeat: \"no-repeat\",\n backgroundPosition: \"center center\",\n width: 16,\n height: 40,\n marginRight: 10,\n },\n \"@global\": {\n \".rowLine:hover .iconBucketElm\": {\n backgroundImage: \"url(/images/ob_bucket_filled.svg)\",\n },\n },\n browsePaper: {\n height: \"calc(100vh - 280px)\",\n },\n ...actionsTray,\n ...searchField,\n ...objectBrowserCommon,\n });\n\ninterface IBrowseBucketsProps {\n classes: any;\n addRoute: (path: string, label: string, type: string) => any;\n resetRoutesList: (doVar: boolean) => any;\n displayErrorMessage: typeof setErrorSnackMessage;\n match: any;\n}\n\nconst BrowseBuckets = ({\n classes,\n match,\n addRoute,\n resetRoutesList,\n displayErrorMessage,\n}: IBrowseBucketsProps) => {\n const [loading, setLoading] = useState(true);\n const [records, setRecords] = useState([]);\n const [addScreenOpen, setAddScreenOpen] = useState(false);\n const [filterBuckets, setFilterBuckets] = useState(\"\");\n const [loadingPerms, setLoadingPerms] = useState(true);\n const [canCreateBucket, setCanCreateBucket] = useState(false);\n\n // check the permissions for creating bucket\n useEffect(() => {\n if (loadingPerms) {\n api\n .invoke(\"POST\", `/api/v1/has-permission`, {\n actions: [\n {\n id: \"createBucket\",\n action: \"s3:CreateBucket\",\n },\n ],\n })\n .then((res: HasPermissionResponse) => {\n const canCreate = res.permissions\n .filter((s) => s.id === \"createBucket\")\n .pop();\n if (canCreate && canCreate.can) {\n setCanCreateBucket(true);\n } else {\n setCanCreateBucket(false);\n }\n\n setLoadingPerms(false);\n // setRecords(res.buckets || []);\n })\n .catch((err: any) => {\n setLoadingPerms(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loadingPerms]);\n\n useEffect(() => {\n resetRoutesList(true);\n }, [match, resetRoutesList]);\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\"GET\", `/api/v1/buckets`)\n .then((res: BucketList) => {\n setLoading(false);\n setRecords(res.buckets || []);\n })\n .catch((err: any) => {\n setLoading(false);\n displayErrorMessage(err);\n });\n }\n }, [loading, displayErrorMessage]);\n\n const closeAddModalAndRefresh = (refresh: boolean) => {\n setAddScreenOpen(false);\n\n if (refresh) {\n setLoading(true);\n }\n };\n\n const filteredRecords = records.filter((b: Bucket) => {\n if (filterBuckets === \"\") {\n return true;\n }\n return b.name.indexOf(filterBuckets) >= 0;\n });\n\n const handleViewChange = (idElement: string) => {\n const currentPath = get(match, \"url\", \"/object-browser\");\n const newPath = `${currentPath}/${idElement}`;\n\n addRoute(newPath, idElement, \"path\");\n };\n\n const renderBucket = (bucketName: string) => {\n return (\n
\n
\n {bucketName}\n
\n );\n };\n\n return (\n \n {addScreenOpen && (\n \n )}\n \n \n
\n \n
\n
\n \n {\n setFilterBuckets(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n {\n setLoading(true);\n }}\n >\n \n \n {canCreateBucket && (\n
\n }\n onClick={() => {\n setAddScreenOpen(true);\n }}\n >\n Create Bucket\n \n
\n )}\n
\n \n
\n
\n \n \n \n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n addRoute,\n resetRoutesList,\n displayErrorMessage: setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withRouter(connector(withStyles(styles)(BrowseBuckets)));\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 from \"react\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Grid } from \"@material-ui/core\";\nimport BrowseBuckets from \"./BrowseBuckets\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\n\ninterface IObjectBrowserProps {\n match: any;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n watchList: {\n background: \"white\",\n maxHeight: \"400\",\n overflow: \"auto\",\n \"& ul\": {\n margin: \"4\",\n padding: \"0\",\n },\n \"& ul li\": {\n listStyle: \"none\",\n margin: \"0\",\n padding: \"0\",\n borderBottom: \"1px solid #dedede\",\n },\n },\n actionsTray: {\n textAlign: \"right\",\n \"& button\": {\n marginLeft: 10,\n },\n },\n inputField: {\n background: \"#FFFFFF\",\n padding: 12,\n borderRadius: 5,\n marginLeft: 10,\n boxShadow: \"0px 3px 6px #00000012\",\n },\n fieldContainer: {\n background: \"#FFFFFF\",\n padding: 0,\n borderRadius: 5,\n marginLeft: 10,\n textAlign: \"left\",\n minWidth: \"206\",\n boxShadow: \"0px 3px 6px #00000012\",\n },\n lastElementWPadding: {\n paddingRight: \"78\",\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst ObjectBrowser = ({ match, classes }: IObjectBrowserProps) => {\n const pathIn = get(match, \"url\", \"\");\n\n return (\n \n \n \n \n {pathIn === \"/object-browser\" && }\n \n \n \n );\n};\n\nexport default withStyles(styles)(ObjectBrowser);\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport { setErrorSnackMessage } from \"../../../../../../actions\";\nimport api from \"../../../../../../common/api\";\n\ninterface IDeleteObjectProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedObject: string;\n selectedBucket: string;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteObject = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedBucket,\n selectedObject,\n setErrorSnackMessage,\n}: IDeleteObjectProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n\n const removeRecord = () => {\n if (deleteLoading) {\n return;\n }\n let recursive = false;\n if (selectedObject.endsWith(\"/\")) {\n recursive = true;\n }\n setDeleteLoading(true);\n api\n .invoke(\n \"DELETE\",\n `/api/v1/buckets/${selectedBucket}/objects?path=${selectedObject}&recursive=${recursive}`\n )\n .then(() => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n };\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete\n \n {deleteLoading && }\n \n Are you sure you want to delete: {selectedObject}?{\" \"}\n \n \n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n {\n removeRecord();\n }}\n color=\"secondary\"\n disabled={deleteLoading}\n >\n Delete\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(DeleteObject);\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, { useState } from \"react\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport { Button, Grid } from \"@material-ui/core\";\nimport InputBoxWrapper from \"../../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { connect } from \"react-redux\";\nimport { createFolder } from \"../../../../ObjectBrowser/actions\";\n\ninterface ICreateFolder {\n classes: any;\n modalOpen: boolean;\n folderName: string;\n createFolder: (newFolder: string) => any;\n onClose: () => any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n pathLabel: {\n marginTop: 0,\n marginBottom: 32,\n },\n ...modalBasic,\n });\n\nconst CreateFolderModal = ({\n modalOpen,\n folderName,\n onClose,\n createFolder,\n classes,\n}: ICreateFolder) => {\n const [pathUrl, setPathUrl] = useState(\"\");\n\n const resetForm = () => {\n setPathUrl(\"\");\n };\n\n const createProcess = () => {\n createFolder(pathUrl);\n onClose();\n };\n\n const folderTruncated = folderName.split(\"/\").slice(2).join(\"/\");\n\n return (\n \n \n \n

\n Current Path: {folderTruncated}/\n

\n \n {\n setPathUrl(e.target.value);\n }}\n />\n \n \n \n Clear\n \n \n Save\n \n \n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n createFolder,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(CreateFolderModal));\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst UploadFile = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default UploadFile;\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 { isNullOrUndefined } from \"util\";\n\nexport const download = (\n bucketName: string,\n objectPath: string,\n versionID: any,\n callBack?: (objIdentifier: string) => void,\n includeVersionInCallback?: boolean\n) => {\n const anchor = document.createElement(\"a\");\n document.body.appendChild(anchor);\n const xhr = new XMLHttpRequest();\n const allPathData = objectPath.split(\"/\");\n const objectName = allPathData[allPathData.length - 1];\n\n let path = `/api/v1/buckets/${bucketName}/objects/download?prefix=${objectPath}`;\n if (!isNullOrUndefined(versionID) && versionID !== \"null\") {\n path = path.concat(`&version_id=${versionID}`);\n }\n\n xhr.open(\"GET\", path, true);\n xhr.responseType = \"blob\";\n\n xhr.onload = function (e) {\n if (this.status === 200) {\n const blob = new Blob([this.response], {\n type: \"octet/stream\",\n });\n const blobUrl = window.URL.createObjectURL(blob);\n\n anchor.href = blobUrl;\n anchor.download = objectName;\n\n anchor.click();\n window.URL.revokeObjectURL(blobUrl);\n anchor.remove();\n\n if (callBack) {\n callBack(\n `${bucketName}/${objectPath}${\n includeVersionInCallback ? `-${versionID}` : \"\"\n }`\n );\n }\n }\n };\n xhr.send();\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, { useEffect, useRef, useState } from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport { BucketObject, BucketObjectsList } from \"./types\";\nimport api from \"../../../../../../common/api\";\nimport TableWrapper from \"../../../../Common/TableWrapper/TableWrapper\";\nimport { niceBytes } from \"../../../../../../common/utils\";\nimport DeleteObject from \"./DeleteObject\";\n\nimport {\n actionsTray,\n containerForHeader,\n objectBrowserCommon,\n searchField,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport PageHeader from \"../../../../Common/PageHeader/PageHeader\";\nimport { Button, IconButton, Input, Typography } from \"@material-ui/core\";\nimport * as reactMoment from \"react-moment\";\nimport { CreateIcon } from \"../../../../../../icons\";\nimport BrowserBreadcrumbs from \"../../../../ObjectBrowser/BrowserBreadcrumbs\";\nimport get from \"lodash/get\";\nimport { withRouter } from \"react-router-dom\";\nimport {\n addRoute,\n setAllRoutes,\n setLastAsFile,\n fileIsBeingPrepared,\n fileDownloadStarted,\n} from \"../../../../ObjectBrowser/actions\";\nimport { connect } from \"react-redux\";\nimport {\n ObjectBrowserReducer,\n Route,\n} from \"../../../../ObjectBrowser/reducers\";\nimport CreateFolderModal from \"./CreateFolderModal\";\nimport UploadFile from \"../../../../../../icons/UploadFile\";\nimport { download } from \"../utils\";\nimport {\n setLoadingProgress,\n setSnackBarMessage,\n setErrorSnackMessage,\n} from \"../../../../../../actions\";\nimport RefreshIcon from \"@material-ui/icons/Refresh\";\n\nconst commonIcon = {\n backgroundRepeat: \"no-repeat\",\n backgroundPosition: \"center center\",\n width: 16,\n minWidth: 16,\n height: 40,\n marginRight: 10,\n};\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n fileName: {\n display: \"flex\",\n alignItems: \"center\",\n },\n fileNameText: {\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n },\n iconFolder: {\n backgroundImage: \"url(/images/ob_folder_clear.svg)\",\n ...commonIcon,\n },\n iconFile: {\n backgroundImage: \"url(/images/ob_file_clear.svg)\",\n ...commonIcon,\n },\n buttonsContainer: {\n \"& .MuiButtonBase-root\": {\n marginLeft: 10,\n },\n },\n browsePaper: {\n height: \"calc(100vh - 280px)\",\n },\n \"@global\": {\n \".rowLine:hover .iconFileElm\": {\n backgroundImage: \"url(/images/ob_file_filled.svg)\",\n },\n \".rowLine:hover .iconFolderElm\": {\n backgroundImage: \"url(/images/ob_folder_filled.svg)\",\n },\n },\n listButton: {\n marginLeft: \"10px\",\n },\n ...actionsTray,\n ...searchField,\n ...objectBrowserCommon,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IListObjectsProps {\n classes: any;\n match: any;\n addRoute: (param1: string, param2: string, param3: string) => any;\n setAllRoutes: (path: string) => any;\n routesList: Route[];\n downloadingFiles: string[];\n setLastAsFile: () => any;\n setLoadingProgress: typeof setLoadingProgress;\n setSnackBarMessage: typeof setSnackBarMessage;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n fileIsBeingPrepared: typeof fileIsBeingPrepared;\n fileDownloadStarted: typeof fileDownloadStarted;\n}\n\nfunction useInterval(callback: any, delay: number) {\n const savedCallback = useRef(null);\n\n // Remember the latest callback.\n useEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n\n // Set up the interval.\n useEffect(() => {\n function tick() {\n if (savedCallback !== undefined && savedCallback.current) {\n savedCallback.current();\n }\n }\n if (delay !== null) {\n let id = setInterval(tick, delay);\n return () => clearInterval(id);\n }\n }, [delay]);\n}\n\nconst defLoading = Loading...;\n\nconst ListObjects = ({\n classes,\n match,\n addRoute,\n setAllRoutes,\n routesList,\n downloadingFiles,\n setLastAsFile,\n setLoadingProgress,\n setSnackBarMessage,\n setErrorSnackMessage,\n fileIsBeingPrepared,\n fileDownloadStarted,\n}: IListObjectsProps) => {\n const [records, setRecords] = useState([]);\n const [loading, setLoading] = useState(true);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [createFolderOpen, setCreateFolderOpen] = useState(false);\n const [selectedObject, setSelectedObject] = useState(\"\");\n const [selectedBucket, setSelectedBucket] = useState(\"\");\n const [filterObjects, setFilterObjects] = useState(\"\");\n const [loadingStartTime, setLoadingStartTime] = useState(0);\n const [loadingMessage, setLoadingMessage] = useState(\n defLoading\n );\n\n const updateMessage = () => {\n let timeDelta = Date.now() - loadingStartTime;\n\n if (timeDelta / 1000 >= 6) {\n setLoadingMessage(\n \n \n This operation is taking longer than expected... (\n {Math.ceil(timeDelta / 1000)}s)\n \n \n );\n } else if (timeDelta / 1000 >= 3) {\n setLoadingMessage(\n \n This operation is taking longer than expected...\n \n );\n }\n };\n\n useInterval(() => {\n // Your custom logic here\n if (loading) {\n updateMessage();\n }\n }, 1000);\n\n useEffect(() => {\n const bucketName = match.params[\"bucket\"];\n const internalPaths = match.params[0];\n\n const verifyIfIsFile = () => {\n const bucketName = match.params[\"bucket\"];\n const internalPaths = match.params[0];\n\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects?prefix=${internalPaths}`\n )\n .then((res: BucketObjectsList) => {\n //It is a file since it has elements in the object, setting file flag and waiting for component mount\n if (res.objects !== null) {\n setLastAsFile();\n } else {\n // It is a folder, we remove loader\n setLoading(false);\n }\n })\n .catch((err: any) => {\n setLoading(false);\n setErrorSnackMessage(err);\n });\n };\n\n if (loading) {\n let extraPath = \"\";\n if (internalPaths) {\n extraPath = `?prefix=${internalPaths}/`;\n }\n\n let currentTimestamp = Date.now() + 0;\n setLoadingStartTime(currentTimestamp);\n setLoadingMessage(defLoading);\n\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/objects${extraPath}`)\n .then((res: BucketObjectsList) => {\n setSelectedBucket(bucketName);\n\n const records: BucketObject[] = res.objects || [];\n const folders: BucketObject[] = [];\n const files: BucketObject[] = [];\n\n records.forEach((record) => {\n // this is a folder\n if (record.name.endsWith(\"/\")) {\n folders.push(record);\n } else {\n // this is a file\n files.push(record);\n }\n });\n\n const recordsInElement = [...folders, ...files];\n\n setRecords(recordsInElement);\n // In case no objects were retrieved, We check if item is a file\n if (!res.objects && extraPath !== \"\") {\n verifyIfIsFile();\n return;\n }\n setLoading(false);\n })\n .catch((err: any) => {\n setLoading(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loading, match, setLastAsFile, setErrorSnackMessage]);\n\n useEffect(() => {\n const url = get(match, \"url\", \"/object-browser\");\n if (url !== routesList[routesList.length - 1].route) {\n setAllRoutes(url);\n }\n }, [match, routesList, setAllRoutes]);\n\n useEffect(() => {\n setLoading(true);\n }, [routesList, setLoading]);\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n\n if (refresh) {\n setSnackBarMessage(`Object '${selectedObject}' deleted successfully.`);\n setLoading(true);\n }\n };\n\n const closeAddFolderModal = () => {\n setCreateFolderOpen(false);\n };\n\n const upload = (e: any, bucketName: string, path: string) => {\n if (\n e === null ||\n e === undefined ||\n e.target === null ||\n e.target === undefined\n ) {\n return;\n }\n e.preventDefault();\n let files = e.target.files;\n let uploadUrl = `/api/v1/buckets/${bucketName}/objects/upload`;\n if (path !== \"\") {\n uploadUrl = `${uploadUrl}?prefix=${path}`;\n }\n let xhr = new XMLHttpRequest();\n const areMultipleFiles = files.length > 1 ? true : false;\n const errorMessage = `An error occurred while uploading the file${\n areMultipleFiles ? \"s\" : \"\"\n }.`;\n const okMessage = `Object${\n areMultipleFiles ? \"s\" : ``\n } uploaded successfully.`;\n\n xhr.open(\"POST\", uploadUrl, true);\n\n xhr.withCredentials = false;\n xhr.onload = function (event) {\n if (\n xhr.status === 401 ||\n xhr.status === 403 ||\n xhr.status === 400 ||\n xhr.status === 500\n ) {\n setSnackBarMessage(errorMessage);\n }\n if (xhr.status === 200) {\n setSnackBarMessage(okMessage);\n }\n };\n\n xhr.upload.addEventListener(\"error\", (event) => {\n setSnackBarMessage(errorMessage);\n });\n\n xhr.upload.addEventListener(\"progress\", (event) => {\n setLoadingProgress(Math.floor((event.loaded * 100) / event.total));\n });\n\n xhr.onerror = () => {\n setSnackBarMessage(errorMessage);\n };\n xhr.onloadend = () => {\n setLoading(true);\n setLoadingProgress(100);\n };\n\n const formData = new FormData();\n\n for (let file of files) {\n const fileName = file.name;\n const blobFile = new Blob([file]);\n formData.append(fileName, blobFile);\n }\n\n xhr.send(formData);\n e.target.value = null;\n };\n\n const displayParsedDate = (object: BucketObject) => {\n if (object.name.endsWith(\"/\")) {\n return \"\";\n }\n return {object.last_modified};\n };\n\n const displayNiceBytes = (object: BucketObject) => {\n if (object.name.endsWith(\"/\")) {\n return \"\";\n }\n return niceBytes(String(object.size));\n };\n\n const confirmDeleteObject = (object: string) => {\n setDeleteOpen(true);\n setSelectedObject(object);\n };\n\n const removeDownloadAnimation = (path: string) => {\n fileDownloadStarted(path);\n };\n\n const downloadObject = (object: BucketObject) => {\n fileIsBeingPrepared(`${selectedBucket}/${object.name}`);\n if (object.size > 104857600) {\n // If file is bigger than 100MB we show a notification\n setSnackBarMessage(\n \"Download process started, it may take a few moments to complete\"\n );\n }\n\n download(\n selectedBucket,\n object.name,\n object.version_id,\n removeDownloadAnimation\n );\n };\n\n const openPath = (idElement: string) => {\n const currentPath = get(match, \"url\", \"/object-browser\");\n\n // Element is a folder, we redirect to it\n if (idElement.endsWith(\"/\")) {\n const idElementClean = idElement\n .substr(0, idElement.length - 1)\n .split(\"/\");\n const lastIndex = idElementClean.length - 1;\n const newPath = `${currentPath}/${idElementClean[lastIndex]}`;\n\n addRoute(newPath, idElementClean[lastIndex], \"path\");\n return;\n }\n // Element is a file. we open details here\n const pathInArray = idElement.split(\"/\");\n const fileName = pathInArray[pathInArray.length - 1];\n const newPath = `${currentPath}/${fileName}`;\n\n addRoute(newPath, fileName, \"file\");\n return;\n };\n\n const uploadObject = (e: any): void => {\n // Handle of deeper routes.\n const currentPath = routesList[routesList.length - 1].route;\n const splitPaths = currentPath\n .split(\"/\")\n .filter((item) => item.trim() !== \"\");\n\n let path = \"\";\n\n if (splitPaths.length > 2) {\n path = `${splitPaths.slice(2).join(\"/\")}/`;\n }\n\n upload(e, selectedBucket, path);\n };\n\n const tableActions = [\n { type: \"view\", onClick: openPath, sendOnlyId: true },\n {\n type: \"download\",\n onClick: downloadObject,\n showLoaderFunction: (item: string) =>\n downloadingFiles.includes(`${match.params[\"bucket\"]}/${item}`),\n },\n { type: \"delete\", onClick: confirmDeleteObject, sendOnlyId: true },\n ];\n\n const displayName = (element: string) => {\n let elementString = element;\n let icon = `${classes.iconFile} iconFileElm`;\n // Element is a folder\n if (element.endsWith(\"/\")) {\n icon = `${classes.iconFolder} iconFolderElm`;\n elementString = element.substr(0, element.length - 1);\n }\n\n const splitItem = elementString.split(\"/\");\n\n return (\n
\n
\n \n {splitItem[splitItem.length - 1]}\n \n
\n );\n };\n\n const filteredRecords = records.filter((b: BucketObject) => {\n if (filterObjects === \"\") {\n return true;\n } else {\n if (b.name.indexOf(filterObjects) >= 0) {\n return true;\n } else {\n return false;\n }\n }\n });\n\n return (\n \n {deleteOpen && (\n \n )}\n {createFolderOpen && (\n \n )}\n \n \n \n \n
\n \n
\n
\n \n {\n setFilterObjects(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n {\n setLoading(true);\n }}\n >\n \n \n }\n component=\"label\"\n onClick={() => {\n setCreateFolderOpen(true);\n }}\n className={classes.listButton}\n >\n Create Folder\n \n }\n component=\"label\"\n className={classes.listButton}\n >\n File\n uploadObject(e)}\n id=\"file-input\"\n style={{ display: \"none\" }}\n />\n \n \n \n
\n
\n \n \n \n
\n
\n
\n );\n};\n\nconst mapStateToProps = ({ objectBrowser }: ObjectBrowserReducer) => ({\n routesList: get(objectBrowser, \"routesList\", []),\n downloadingFiles: get(objectBrowser, \"downloadingFiles\", []),\n});\n\nconst mapDispatchToProps = {\n addRoute,\n setAllRoutes,\n setLastAsFile,\n setLoadingProgress,\n setSnackBarMessage,\n setErrorSnackMessage,\n fileIsBeingPrepared,\n fileDownloadStarted,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default withRouter(connector(withStyles(styles)(ListObjects)));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Button from \"@material-ui/core/Button\";\nimport { modalBasic } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { CopyIcon } from \"../../../../../../icons\";\nimport { IFileInfo } from \"./types\";\nimport {\n setModalErrorSnackMessage,\n setModalSnackMessage,\n} from \"../../../../../../actions\";\nimport api from \"../../../../../../common/api\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport DateSelector from \"../../../../Common/FormComponents/DateSelector/DateSelector\";\nimport PredefinedList from \"../../../../Common/FormComponents/PredefinedList/PredefinedList\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n copyButtonContainer: {\n paddingLeft: 16,\n },\n modalContent: {\n paddingBottom: 53,\n },\n ...modalBasic,\n });\n\ninterface IShareFileProps {\n classes: any;\n open: boolean;\n bucketName: string;\n dataObject: IFileInfo;\n closeModalAndRefresh: () => void;\n setModalSnackMessage: typeof setModalSnackMessage;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst ShareFile = ({\n classes,\n open,\n closeModalAndRefresh,\n bucketName,\n dataObject,\n setModalSnackMessage,\n setModalErrorSnackMessage,\n}: IShareFileProps) => {\n const [shareURL, setShareURL] = useState(\"\");\n const [isLoadingFile, setIsLoadingFile] = useState(false);\n const [selectedDate, setSelectedDate] = useState(\"\");\n const [dateValid, setDateValid] = useState(true);\n\n const dateChanged = (newDate: string, isValid: boolean) => {\n setDateValid(isValid);\n if (isValid) {\n setSelectedDate(newDate);\n return;\n }\n setSelectedDate(\"\");\n };\n\n useEffect(() => {\n if (dateValid) {\n setIsLoadingFile(true);\n setShareURL(\"\");\n\n const slDate = new Date(`${selectedDate}T23:59:59`);\n const currDate = new Date();\n\n const diffDate = slDate.getTime() - currDate.getTime();\n\n if (diffDate < 0) {\n setModalErrorSnackMessage(\n \"Selected date must be greater than current time.\"\n );\n setShareURL(\"\");\n setIsLoadingFile(false);\n\n return;\n }\n\n if (diffDate > 604800000) {\n setModalErrorSnackMessage(\n \"You can share a file only for less than 7 days.\"\n );\n setShareURL(\"\");\n setIsLoadingFile(false);\n\n return;\n }\n\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects/share?prefix=${\n dataObject.name\n }&version_id=${dataObject.version_id}${\n selectedDate !== \"\" ? `&expires=${diffDate}ms` : \"\"\n }`\n )\n .then((res: string) => {\n setShareURL(res);\n setIsLoadingFile(false);\n })\n .catch((error) => {\n setModalErrorSnackMessage(error);\n setShareURL(\"\");\n setIsLoadingFile(false);\n });\n return;\n }\n }, [\n dataObject,\n selectedDate,\n bucketName,\n dateValid,\n setShareURL,\n setModalErrorSnackMessage,\n ]);\n\n return (\n \n {\n closeModalAndRefresh();\n }}\n >\n \n \n \n \n \n \n \n \n \n \n }\n onClick={() => {\n setModalSnackMessage(\"Share URL Copied to clipboard\");\n }}\n disabled={shareURL === \"\" || isLoadingFile}\n >\n Copy\n \n \n \n \n \n \n \n );\n};\n\nconst connector = connect(null, {\n setModalSnackMessage,\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ShareFile));\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 from \"react\";\nimport SvgIcon from \"@material-ui/core/SvgIcon\";\n\nconst ShareIcon = () => {\n return (\n \n \n \n \n \n \n );\n};\n\nexport default ShareIcon;\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 from \"react\";\nimport SvgIcon from \"@material-ui/core/SvgIcon\";\n\nconst DownloadIcon = () => {\n return (\n \n \n \n \n \n \n );\n};\n\nexport default DownloadIcon;\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, { useEffect, useRef, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Button from \"@material-ui/core/Button\";\nimport { modalBasic } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { IFileInfo } from \"./types\";\nimport { setModalErrorSnackMessage } from \"../../../../../../actions\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport RadioGroupSelector from \"../../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport DateSelector from \"../../../../Common/FormComponents/DateSelector/DateSelector\";\nimport api from \"../../../../../../common/api\";\nimport { twoDigitDate } from \"../../../../Common/FormComponents/DateSelector/utils\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n objectName: {\n fontSize: 18,\n fontWeight: 700,\n marginBottom: 40,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface ISetRetentionProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (updateInfo: boolean) => void;\n objectName: string;\n bucketName: string;\n objectInfo: IFileInfo;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\ninterface IRefObject {\n resetDate: () => void;\n}\n\nconst SetRetention = ({\n classes,\n open,\n closeModalAndRefresh,\n objectName,\n objectInfo,\n bucketName,\n setModalErrorSnackMessage,\n}: ISetRetentionProps) => {\n const [statusEnabled, setStatusEnabled] = useState(true);\n const [type, setType] = useState(\"\");\n const [date, setDate] = useState(\"\");\n const [isDateValid, setIsDateValid] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const [alreadyConfigured, setAlreadyConfigured] = useState(false);\n\n useEffect(() => {\n if (objectInfo.retention_mode) {\n setType(objectInfo.retention_mode.toLowerCase());\n setAlreadyConfigured(true);\n }\n // get retention_until_date if defined\n if (objectInfo.retention_until_date) {\n const valueDate = new Date(objectInfo.retention_until_date);\n if (valueDate.toString() !== \"Invalid Date\") {\n const year = valueDate.getFullYear();\n const month = twoDigitDate(valueDate.getMonth() + 1);\n const day = valueDate.getDate();\n if (!isNaN(day) && month !== \"NaN\" && !isNaN(year)) {\n setDate(`${year}-${month}-${day}`);\n }\n }\n setAlreadyConfigured(true);\n }\n }, [objectInfo]);\n\n const dateElement = useRef(null);\n\n const dateFieldDisabled = () => {\n return !(statusEnabled && (type === \"governance\" || type === \"compliance\"));\n };\n\n const onSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n };\n\n const resetForm = () => {\n setStatusEnabled(false);\n setType(\"\");\n if (dateElement.current) {\n dateElement.current.resetDate();\n }\n };\n\n const addRetention = (\n selectedObject: string,\n versionId: string | null,\n expireDate: string\n ) => {\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${bucketName}/objects/retention?prefix=${selectedObject}&version_id=${versionId}`,\n {\n expires: expireDate,\n mode: type,\n }\n )\n .then((res: any) => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((error) => {\n setModalErrorSnackMessage(error);\n setIsSaving(false);\n });\n };\n\n const disableRetention = (\n selectedObject: string,\n versionId: string | null\n ) => {\n api\n .invoke(\n \"DELETE\",\n `/api/v1/buckets/${bucketName}/objects/retention?prefix=${selectedObject}&version_id=${versionId}`\n )\n .then(() => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((error) => {\n setModalErrorSnackMessage(error);\n setIsSaving(false);\n });\n };\n\n const saveNewRetentionPolicy = () => {\n setIsSaving(true);\n const selectedObject = objectInfo.name;\n const versionId = objectInfo.version_id;\n\n const expireDate =\n !statusEnabled && type === \"governance\" ? \"\" : `${date}T23:59:59Z`;\n\n if (!statusEnabled && type === \"governance\") {\n disableRetention(selectedObject, versionId);\n\n return;\n }\n\n addRetention(selectedObject, versionId, expireDate);\n };\n\n const showSwitcher =\n alreadyConfigured && (type === \"governance\" || type === \"\");\n\n return (\n {\n resetForm();\n closeModalAndRefresh(false);\n }}\n >\n \n {objectName}\n \n ) => {\n onSubmit(e);\n }}\n >\n {showSwitcher && (\n \n ) => {\n setStatusEnabled(!statusEnabled);\n }}\n label={\"Status\"}\n indicatorLabels={[\"Enabled\", \"Disabled\"]}\n />\n \n )}\n \n {\n setType(e.target.value);\n }}\n selectorOptions={[\n { label: \"Governance\", value: \"governance\" },\n { label: \"Compliance\", value: \"compliance\" },\n ]}\n />\n \n \n {\n setIsDateValid(isValid);\n if (isValid) {\n setDate(date);\n }\n }}\n />\n \n \n \n Reset\n \n \n Save\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(SetRetention));\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Button, Grid } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../../../actions\";\nimport InputBoxWrapper from \"../../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport api from \"../../../../../../common/api\";\n\ninterface ITagModal {\n modalOpen: boolean;\n currentTags: any;\n bucketName: string;\n versionId: string | null;\n onCloseAndUpdate: (refresh: boolean) => void;\n selectedObject: string;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n pathLabel: {\n marginTop: 0,\n marginBottom: 32,\n },\n ...modalBasic,\n });\n\nconst AddTagModal = ({\n modalOpen,\n currentTags,\n selectedObject,\n onCloseAndUpdate,\n bucketName,\n versionId,\n setModalErrorSnackMessage,\n classes,\n}: ITagModal) => {\n const [newKey, setNewKey] = useState(\"\");\n const [newLabel, setNewLabel] = useState(\"\");\n const [isSending, setIsSending] = useState(false);\n\n const resetForm = () => {\n setNewLabel(\"\");\n setNewKey(\"\");\n };\n\n const addTagProcess = () => {\n setIsSending(true);\n const newTag: any = {};\n\n newTag[newKey] = newLabel;\n const newTagList = { ...currentTags, ...newTag };\n\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${bucketName}/objects/tags?prefix=${selectedObject}&version_id=${versionId}`,\n { tags: newTagList }\n )\n .then((res: any) => {\n setIsSending(false);\n onCloseAndUpdate(true);\n })\n .catch((error) => {\n setModalErrorSnackMessage(error);\n setIsSending(false);\n });\n };\n\n return (\n \n {\n onCloseAndUpdate(false);\n }}\n >\n \n

\n Selected Object: {selectedObject}\n

\n \n {\n setNewKey(e.target.value);\n }}\n />\n \n \n {\n setNewLabel(e.target.value);\n }}\n />\n \n \n \n Clear\n \n \n Save\n \n \n
\n \n
\n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddTagModal));\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { setErrorSnackMessage } from \"../../../../../../actions\";\nimport api from \"../../../../../../common/api\";\n\ninterface IDeleteTagModal {\n deleteOpen: boolean;\n currentTags: any;\n bucketName: string;\n versionId: string | null;\n selectedTag: string[];\n onCloseAndUpdate: (refresh: boolean) => void;\n selectedObject: string;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n pathLabel: {\n marginTop: 0,\n marginBottom: 32,\n },\n ...modalBasic,\n });\n\nconst DeleteTagModal = ({\n deleteOpen,\n currentTags,\n selectedObject,\n selectedTag,\n onCloseAndUpdate,\n bucketName,\n versionId,\n setErrorSnackMessage,\n classes,\n}: IDeleteTagModal) => {\n const [deleteLoading, setDeleteSending] = useState(false);\n const [tagKey, tagLabel] = selectedTag;\n\n const removeTagProcess = () => {\n setDeleteSending(true);\n const cleanObject = { ...currentTags };\n delete cleanObject[tagKey];\n\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${bucketName}/objects/tags?prefix=${selectedObject}&version_id=${versionId}`,\n { tags: cleanObject }\n )\n .then((res: any) => {\n setDeleteSending(false);\n onCloseAndUpdate(true);\n })\n .catch((error) => {\n setErrorSnackMessage(error);\n setDeleteSending(false);\n });\n };\n\n return (\n {\n onCloseAndUpdate(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete Tag\n \n {deleteLoading && }\n \n Are you sure you want to delete the tag{\" \"}\n \n {tagKey} : {tagLabel}\n {\" \"}\n from {selectedObject}?\n \n \n \n {\n onCloseAndUpdate(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(DeleteTagModal));\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, { useState, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport get from \"lodash/get\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Button from \"@material-ui/core/Button\";\nimport { modalBasic } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../../../actions\";\nimport { IFileInfo } from \"./types\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport api from \"../../../../../../common/api\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n objectName: {\n fontSize: 18,\n fontWeight: 700,\n marginBottom: 40,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface ISetRetentionProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (reload: boolean) => void;\n objectName: string;\n bucketName: string;\n actualInfo: IFileInfo;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst SetLegalHoldModal = ({\n classes,\n open,\n closeModalAndRefresh,\n objectName,\n bucketName,\n actualInfo,\n setModalErrorSnackMessage,\n}: ISetRetentionProps) => {\n const [legalHoldEnabled, setLegalHoldEnabled] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const versionId = actualInfo.version_id;\n\n useEffect(() => {\n const status = get(actualInfo, \"legal_hold_status\", \"OFF\");\n setLegalHoldEnabled(status === \"ON\");\n }, [actualInfo]);\n\n const onSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n setIsSaving(true);\n\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${bucketName}/objects/legalhold?prefix=${objectName}&version_id=${versionId}`,\n { status: legalHoldEnabled ? \"enabled\" : \"disabled\" }\n )\n .then(() => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((error) => {\n setModalErrorSnackMessage(error);\n setIsSaving(false);\n });\n };\n\n const resetForm = () => {\n setLegalHoldEnabled(false);\n };\n\n return (\n {\n resetForm();\n closeModalAndRefresh(false);\n }}\n >\n \n {objectName}\n \n ) => {\n onSubmit(e);\n }}\n >\n \n ) => {\n setLegalHoldEnabled(!legalHoldEnabled);\n }}\n label={\"Legal Hold Status\"}\n indicatorLabels={[\"Enabled\", \"Disabled\"]}\n tooltip={\n \"To enable this feature you need to enable versioning on the bucket before creation\"\n }\n />\n \n \n \n Reset\n \n \n Save\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(SetLegalHoldModal));\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, { useState, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport * as reactMoment from \"react-moment\";\nimport clsx from \"clsx\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Chip from \"@material-ui/core/Chip\";\nimport TextField from \"@material-ui/core/TextField\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport AddIcon from \"@material-ui/icons/Add\";\nimport CloseIcon from \"@material-ui/icons/Close\";\nimport ShareFile from \"./ShareFile\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { IFileInfo } from \"./types\";\nimport {\n removeRouteLevel,\n fileIsBeingPrepared,\n fileDownloadStarted,\n} from \"../../../../ObjectBrowser/actions\";\nimport {\n ObjectBrowserReducer,\n Route,\n} from \"../../../../ObjectBrowser/reducers\";\nimport { download } from \"../utils\";\nimport history from \"../../../../../../history\";\nimport api from \"../../../../../../common/api\";\nimport PageHeader from \"../../../../Common/PageHeader/PageHeader\";\nimport ShareIcon from \"../../../../../../icons/ShareIcon\";\nimport DownloadIcon from \"../../../../../../icons/DownloadIcon\";\nimport DeleteIcon from \"../../../../../../icons/DeleteIcon\";\nimport TableWrapper from \"../../../../Common/TableWrapper/TableWrapper\";\nimport PencilIcon from \"../../../../Common/TableWrapper/TableActionIcons/PencilIcon\";\nimport SetRetention from \"./SetRetention\";\nimport BrowserBreadcrumbs from \"../../../../ObjectBrowser/BrowserBreadcrumbs\";\nimport DeleteObject from \"../ListObjects/DeleteObject\";\nimport AddTagModal from \"./AddTagModal\";\nimport DeleteTagModal from \"./DeleteTagModal\";\nimport SetLegalHoldModal from \"./SetLegalHoldModal\";\nimport {\n setSnackBarMessage,\n setErrorSnackMessage,\n} from \"../../../../../../actions\";\nimport { CircularProgress } from \"@material-ui/core\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n objectNameContainer: {\n marginBottom: 8,\n },\n objectPathContainer: {\n marginBottom: 26,\n fontSize: 10,\n },\n objectPathLink: {\n \"&:visited\": {\n color: \"#000\",\n },\n },\n objectName: {\n fontSize: 24,\n },\n propertiesContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n marginBottom: 15,\n },\n propertiesItem: {\n display: \"flex\",\n flexDirection: \"row\",\n marginRight: 21,\n },\n propertiesItemBold: {\n fontWeight: 700,\n },\n propertiesValue: {\n marginLeft: 8,\n textTransform: \"capitalize\",\n },\n propertiesIcon: {\n marginLeft: 5,\n },\n actionsIconContainer: {\n marginLeft: 12,\n },\n actionsIcon: {\n height: 16,\n width: 16,\n \"& .MuiSvgIcon-root\": {\n height: 16,\n },\n },\n tagsContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n marginBottom: 15,\n },\n tagText: {\n marginRight: 13,\n },\n tag: {\n marginRight: 6,\n fontSize: 10,\n fontWeight: 700,\n \"&.MuiChip-sizeSmall\": {\n height: 18,\n },\n \"& .MuiSvgIcon-root\": {\n height: 10,\n width: 10,\n },\n },\n search: {\n marginBottom: 8,\n \"&.MuiFormControl-root\": {\n marginRight: 0,\n },\n },\n \"@global\": {\n \".progressDetails\": {\n paddingTop: 3,\n display: \"inline-block\",\n position: \"relative\",\n width: 18,\n height: 18,\n },\n \".progressDetails > .MuiCircularProgress-root\": {\n position: \"absolute\",\n left: 0,\n top: 3,\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IObjectDetailsProps {\n classes: any;\n routesList: Route[];\n downloadingFiles: string[];\n removeRouteLevel: (newRoute: string) => any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n setSnackBarMessage: typeof setSnackBarMessage;\n fileIsBeingPrepared: typeof fileIsBeingPrepared;\n fileDownloadStarted: typeof fileDownloadStarted;\n}\n\nconst emptyFile: IFileInfo = {\n is_latest: true,\n last_modified: \"\",\n legal_hold_status: \"\",\n name: \"\",\n retention_mode: \"\",\n retention_until_date: \"\",\n size: \"0\",\n tags: {},\n version_id: null,\n};\n\nconst ObjectDetails = ({\n classes,\n routesList,\n downloadingFiles,\n removeRouteLevel,\n setErrorSnackMessage,\n setSnackBarMessage,\n fileIsBeingPrepared,\n fileDownloadStarted,\n}: IObjectDetailsProps) => {\n const [loadObjectData, setLoadObjectData] = useState(true);\n const [shareFileModalOpen, setShareFileModalOpen] = useState(false);\n const [retentionModalOpen, setRetentionModalOpen] = useState(false);\n const [tagModalOpen, setTagModalOpen] = useState(false);\n const [deleteTagModalOpen, setDeleteTagModalOpen] = useState(false);\n const [selectedTag, setSelectedTag] = useState([\"\", \"\"]);\n const [legalholdOpen, setLegalholdOpen] = useState(false);\n const [actualInfo, setActualInfo] = useState(emptyFile);\n const [versions, setVersions] = useState([]);\n const [filterVersion, setFilterVersion] = useState(\"\");\n const [deleteOpen, setDeleteOpen] = useState(false);\n\n const currentItem = routesList[routesList.length - 1];\n const allPathData = currentItem.route.split(\"/\");\n const objectName = allPathData[allPathData.length - 1];\n const bucketName = allPathData[2];\n const pathInBucket = allPathData.slice(3).join(\"/\");\n\n useEffect(() => {\n if (loadObjectData) {\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects?prefix=${pathInBucket}&with_versions=true`\n )\n .then((res: IFileInfo[]) => {\n const result = get(res, \"objects\", []);\n setActualInfo(\n result.find((el: IFileInfo) => el.is_latest) || emptyFile\n );\n setVersions(result.filter((el: IFileInfo) => !el.is_latest));\n setLoadObjectData(false);\n })\n .catch((error) => {\n setErrorSnackMessage(error);\n setLoadObjectData(false);\n });\n }\n }, [loadObjectData, bucketName, pathInBucket, setErrorSnackMessage]);\n\n let tagKeys: string[] = [];\n\n if (actualInfo.tags) {\n tagKeys = Object.keys(actualInfo.tags);\n }\n\n const openRetentionModal = () => {\n setRetentionModalOpen(true);\n };\n\n const closeRetentionModal = (updateInfo: boolean) => {\n setRetentionModalOpen(false);\n if (updateInfo) {\n setLoadObjectData(true);\n }\n };\n\n const shareObject = () => {\n setShareFileModalOpen(true);\n };\n\n const closeShareModal = () => {\n setShareFileModalOpen(false);\n };\n\n const deleteTag = (tagKey: string, tagLabel: string) => {\n setSelectedTag([tagKey, tagLabel]);\n setDeleteTagModalOpen(true);\n };\n\n const removeDownloadAnimation = (path: string) => {\n fileDownloadStarted(path);\n };\n\n const downloadObject = (object: IFileInfo, includeVersion?: boolean) => {\n fileIsBeingPrepared(\n `${bucketName}/${object.name}${\n includeVersion ? `-${object.version_id}` : \"\"\n }`\n );\n if (object.size && parseInt(object.size) > 104857600) {\n // If file is bigger than 100MB we show a notification\n setSnackBarMessage(\n \"Download process started, it may take a few moments to complete\"\n );\n }\n download(\n bucketName,\n pathInBucket,\n object.version_id,\n removeDownloadAnimation,\n includeVersion\n );\n };\n\n const tableActions = [\n { type: \"share\", onClick: shareObject, sendOnlyId: true },\n {\n type: \"download\",\n onClick: (item: IFileInfo) => {\n downloadObject(item, true);\n },\n showLoaderFunction: (version: string) => {\n return downloadingFiles.includes(\n `${bucketName}/${objectName}-${version}`\n );\n },\n },\n ];\n\n const filteredRecords = versions.filter((version) => {\n if (version.version_id) {\n return version.version_id.includes(filterVersion);\n }\n return false;\n });\n\n const displayParsedDate = (date: string) => {\n return {date};\n };\n\n const closeDeleteModal = (redirectBack: boolean) => {\n setDeleteOpen(false);\n\n if (redirectBack) {\n const newPath = allPathData.slice(0, -1).join(\"/\");\n\n removeRouteLevel(newPath);\n history.push(newPath);\n }\n };\n\n const closeAddTagModal = (reloadObjectData: boolean) => {\n setTagModalOpen(false);\n\n if (reloadObjectData) {\n setLoadObjectData(true);\n }\n };\n\n const closeLegalholdModal = (reload: boolean) => {\n setLegalholdOpen(false);\n\n if (reload) {\n setLoadObjectData(true);\n }\n };\n\n const closeDeleteTagModal = (reloadObjectData: boolean) => {\n setDeleteTagModalOpen(false);\n\n if (reloadObjectData) {\n setLoadObjectData(true);\n }\n };\n\n return (\n \n \n {shareFileModalOpen && (\n \n )}\n {retentionModalOpen && (\n \n )}\n {deleteOpen && (\n \n )}\n {tagModalOpen && (\n \n )}\n {deleteTagModalOpen && (\n \n )}\n {legalholdOpen && (\n \n )}\n \n \n \n
\n \n
\n
\n
\n \n {actualInfo.version_id && actualInfo.version_id !== \"null\" && (\n \n
\n
\n \n Legal Hold:\n \n \n {actualInfo.legal_hold_status\n ? actualInfo.legal_hold_status.toLowerCase()\n : \"Off\"}\n \n
\n
\n {\n setLegalholdOpen(true);\n }}\n >\n \n \n
\n
\n
\n
\n \n Retention:\n \n \n {actualInfo.retention_mode\n ? actualInfo.retention_mode.toLowerCase()\n : \"Undefined\"}\n \n
\n
\n {\n openRetentionModal();\n }}\n >\n \n \n
\n
\n
\n )}\n
\n
File Actions:
\n
\n {\n shareObject();\n }}\n >\n \n \n
\n
\n {downloadingFiles.includes(\n `${bucketName}/${actualInfo.name}`\n ) ? (\n
\n \n
\n ) : (\n {\n downloadObject(actualInfo);\n }}\n >\n \n \n )}\n
\n
\n {\n setDeleteOpen(true);\n }}\n >\n \n \n
\n
\n
\n \n
Tags:
\n {tagKeys &&\n tagKeys.map((tagKey, index) => {\n const tag = get(actualInfo, `tags.${tagKey}`, \"\");\n if (tag !== \"\") {\n return (\n }\n onDelete={() => {\n deleteTag(tagKey, tag);\n }}\n />\n );\n }\n return null;\n })}\n }\n clickable\n size=\"small\"\n label=\"Add tag\"\n color=\"primary\"\n variant=\"outlined\"\n onClick={() => {\n setTagModalOpen(true);\n }}\n />\n
\n\n \n {actualInfo.version_id && actualInfo.version_id !== \"null\" && (\n {\n setFilterVersion(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n )}\n \n \n {actualInfo.version_id && actualInfo.version_id !== \"null\" && (\n \n )}\n \n
\n
\n
\n );\n};\n\nconst mapStateToProps = ({ objectBrowser }: ObjectBrowserReducer) => ({\n downloadingFiles: get(objectBrowser, \"downloadingFiles\", []),\n});\n\nconst mapDispatchToProps = {\n removeRouteLevel,\n setErrorSnackMessage,\n fileIsBeingPrepared,\n fileDownloadStarted,\n setSnackBarMessage,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(ObjectDetails));\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, { useEffect } from \"react\";\nimport ListObjects from \"./ListObjects\";\nimport ObjectDetails from \"../ObjectDetails/ObjectDetails\";\nimport get from \"lodash/get\";\nimport { setAllRoutes } from \"../../../../ObjectBrowser/actions\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport { ObjectBrowserState, Route } from \"../../../../ObjectBrowser/reducers\";\n\ninterface ObjectBrowserReducer {\n objectBrowser: ObjectBrowserState;\n}\n\ninterface ObjectRoutingProps {\n routesList: Route[];\n setAllRoutes: (path: string) => any;\n match: any;\n}\n\nconst ObjectRouting = ({\n routesList,\n match,\n setAllRoutes,\n}: ObjectRoutingProps) => {\n const currentItem = routesList[routesList.length - 1];\n\n useEffect(() => {\n const url = get(match, \"url\", \"/object-browser\");\n\n if (url !== routesList[routesList.length - 1].route) {\n setAllRoutes(url);\n }\n }, [match, routesList, setAllRoutes]);\n\n return currentItem.type === \"path\" ? (\n \n ) : (\n \n );\n};\n\nconst mapStateToProps = ({ objectBrowser }: ObjectBrowserReducer) => ({\n routesList: get(objectBrowser, \"routesList\", []),\n});\n\nconst mapDispatchToProps = {\n setAllRoutes,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default withRouter(connector(ObjectRouting));\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\nexport const planDetails = [\n {\n id: 0,\n title: \"Community\",\n price: \"Open Source\",\n capacityMin: \"\",\n },\n {\n id: 1,\n title: \"Standard\",\n price: \"$10/TB/month\",\n capacityMax: \"Up to 10PB. No additional charges for capacity over 10PB\",\n capacityMin: \"\",\n },\n {\n id: 2,\n title: \"Enterprise\",\n price: \"$20/TB/month\",\n capacityMax: \"Up to 5PB. No additional charges for capacity over 5PB\",\n capacityMin: \"\",\n },\n];\n\nexport const planItems = [\n {\n id: 0,\n field: \"License\",\n community: \"GNU AGPL v3\",\n communityDetail: \"\",\n standard: \"Commercial License\",\n standardDetail: \"\",\n enterprise: \"Commercial License\",\n enterpriseDetail: \"\",\n },\n {\n id: 1,\n field: \"Software Release\",\n community: \"Update to latest\",\n standard: \"1 Year Long Term Support\",\n enterprise: \"5 Years Long Term Support\",\n },\n {\n id: 2,\n field: \"SLA\",\n community: \"No SLA\",\n standard: \"<24 hours\",\n enterprise: \"<1 hour\",\n },\n {\n id: 3,\n field: \"Support\",\n community: \"Community:\",\n communityDetail: \"Public Slack Channel + Github Issues\",\n standard: \"24x7 L4 direct engineering\",\n standardDetail: \"Support via SUBNET\",\n enterprise: \"24x7 L4 direct engineering\",\n enterpriseDetail: \"Support via SUBNET\",\n },\n {\n id: 4,\n field: \"Security Updates & Critical Bugs\",\n community: \"Self Update\",\n standard: \"Guided Update\",\n enterprise: \"Guided Update\",\n },\n {\n id: 5,\n field: \"Panic Button\",\n community: \"N/A\",\n standard: \"1 per year\",\n enterprise: \"Unlimited\",\n },\n {\n id: 6,\n field: \"Annual Architecture Review\",\n community: \"N/A\",\n standard: \"Yes\",\n enterprise: \"Yes\",\n },\n {\n id: 7,\n field: \"Annual Performance Review\",\n community: \"N/A\",\n standard: \"Yes\",\n enterprise: \"Yes\",\n },\n {\n id: 8,\n field: \"Indemnification\",\n community: \"N/A\",\n standard: \"N/A\",\n enterprise: \"Yes\",\n },\n {\n id: 9,\n field: \"Security + Policy Review\",\n community: \"N/A\",\n standard: \"N/A\",\n enterprise: \"Yes\",\n },\n];\n\nexport const planButtons = [\n {\n id: 0,\n text: \"Join Slack\",\n text2: \"\",\n link: \"https://slack.min.io\",\n plan: \"community\",\n },\n {\n id: 1,\n text: \"Subscribe\",\n text2: \"Upgrade\",\n link: \"https://subnet.min.io/subscription\",\n plan: \"standard\",\n },\n {\n id: 2,\n text: \"Subscribe\",\n text2: \"Upgrade\",\n link: \"https://subnet.min.io/subscription\",\n plan: \"enterprise\",\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { LinearProgress, TextField } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport { SubscriptionActivateRequest } from \"../Buckets/types\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport api from \"../../../common/api\";\nimport PersonOutlineOutlinedIcon from \"@material-ui/icons/PersonOutlineOutlined\";\nimport LockOutlinedIcon from \"@material-ui/icons/LockOutlined\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n errorBlock: {\n color: \"red\",\n },\n subnetLicenseKey: {\n padding: \"10px 10px 10px 0px\",\n borderRight: \"1px solid rgba(0, 0, 0, 0.12)\",\n opacity: 0.5,\n \"&:hover\": { opacity: 1 },\n },\n subnetLoginForm: {\n padding: \"10px 0px 10px 10px\",\n opacity: 0.5,\n \"&:hover\": { opacity: 1 },\n },\n licenseKeyField: {},\n pageTitle: {\n marginBottom: 20,\n },\n button: {\n textTransform: \"none\",\n fontSize: 15,\n fontWeight: 700,\n background:\n \"transparent linear-gradient(90deg, #073052 0%, #081c42 100%) 0% 0% no-repeat padding-box\",\n color: \"#fff\",\n },\n buttonSignup: {\n textTransform: \"none\",\n fontSize: 15,\n fontWeight: 700,\n marginLeft: 15,\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IActivationModal {\n classes: any;\n open: boolean;\n closeModal: () => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst ActivationModal = ({\n classes,\n open,\n closeModal,\n setModalErrorSnackMessage,\n}: IActivationModal) => {\n const [license, setLicense] = useState(\"\");\n const [subnetPassword, setSubnetPassword] = useState(\"\");\n const [subnetEmail, setSubnetEmail] = useState(\"\");\n const [loading, setLoading] = useState(false);\n\n const activateProduct = () => {\n if (loading) {\n return;\n }\n setLoading(true);\n let request: SubscriptionActivateRequest = {\n license: license,\n email: subnetEmail,\n password: subnetPassword,\n };\n api\n .invoke(\"POST\", \"/api/v1/subscription/validate\", request)\n .then(() => {\n setLoading(false);\n setLicense(\"\");\n setSubnetPassword(\"\");\n setSubnetEmail(\"\");\n closeModal();\n })\n .catch((err) => {\n setLoading(false);\n setLicense(\"\");\n setSubnetPassword(\"\");\n setSubnetEmail(\"\");\n setModalErrorSnackMessage(err);\n });\n };\n\n return open ? (\n {\n setLicense(\"\");\n setSubnetPassword(\"\");\n setSubnetEmail(\"\");\n closeModal();\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n \n \n \n Activate SUBNET License\n \n \n \n \n \n Enter your license key here\n \n \n ) =>\n setLicense(event.target.value)\n }\n fullWidth\n className={classes.licenseKeyField}\n variant=\"outlined\"\n />\n
\n
\n activateProduct()}\n disabled={loading || license.trim().length === 0}\n >\n Activate\n \n
\n \n \n \n }\n id=\"subnet-email\"\n name=\"subnet-email\"\n onChange={(event: React.ChangeEvent) => {\n setSubnetEmail(event.target.value);\n }}\n placeholder=\"email\"\n label=\"\"\n type=\"text\"\n value={subnetEmail}\n />\n \n \n }\n id=\"subnet-password\"\n name=\"subnet-password\"\n onChange={(event: React.ChangeEvent) => {\n setSubnetPassword(event.target.value);\n }}\n placeholder=\"password\"\n label=\"\"\n type=\"password\"\n value={subnetPassword}\n />\n \n \n activateProduct()}\n disabled={\n loading ||\n subnetEmail.trim().length === 0 ||\n subnetPassword.trim().length === 0\n }\n variant=\"contained\"\n >\n Activate\n \n {\n e.preventDefault();\n window.open(\"https://min.io/pricing\", \"_blank\");\n }}\n variant=\"outlined\"\n >\n Sign Up\n \n \n \n \n
\n {loading && (\n \n \n \n )}\n \n ) : null;\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(ActivationModal));\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, { useEffect, useState } from \"react\";\nimport clsx from \"clsx\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Button from \"@material-ui/core/Button\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Typography from \"@material-ui/core/Typography\";\nimport CheckCircleIcon from \"@material-ui/icons/CheckCircle\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport { planDetails, planItems, planButtons } from \"./utils\";\nimport ActivationModal from \"./ActivationModal\";\nimport api from \"../../../common/api\";\nimport { LicenseInfo } from \"./types\";\nimport { CircularProgress, LinearProgress } from \"@material-ui/core\";\nimport { AppState } from \"../../../store\";\nimport { connect } from \"react-redux\";\nimport { niceBytes } from \"../../../common/utils\";\nimport Moment from \"react-moment\";\n\nconst mapState = (state: AppState) => ({\n operatorMode: state.system.operatorMode,\n});\n\nconst connector = connect(mapState, null);\n\nconst styles = (theme: Theme) =>\n createStyles({\n pageTitle: {\n fontSize: 18,\n marginBottom: 20,\n },\n paper: {\n padding: \"20px 52px 20px 28px\",\n },\n licenseContainer: {\n position: \"relative\",\n padding: \"20px 52px 0px 28px\",\n background: \"#032F51\",\n boxShadow: \"0px 3px 7px #00000014\",\n \"& h2\": {\n color: \"#FFF\",\n marginBottom: 67,\n },\n \"& a\": {\n textDecoration: \"none\",\n },\n \"& h3\": {\n color: \"#FFFFFF\",\n marginBottom: \"30px\",\n fontWeight: \"bold\",\n },\n \"& h6\": {\n color: \"#FFFFFF !important\",\n },\n },\n tableContainer: {\n marginLeft: 28,\n },\n detailsContainer: {\n textAlign: \"center\",\n paddingBottom: 12,\n borderRadius: \"3px 3px 0 0\",\n marginLeft: 8,\n maxWidth: \"calc(25% - 8px)\",\n },\n detailsContainerBorder: {\n border: \"1px solid #e2e2e2\",\n borderBottom: 0,\n borderRadius: \"4px 4px 0px 0px\",\n },\n detailsContainerBorderHighlighted: {\n border: \"1px solid #B5B5B5\",\n borderBottom: 0,\n },\n detailsTitle: {\n fontSize: 19,\n fontWeight: 700,\n marginBottom: 26,\n paddingTop: 18,\n },\n activePlanHeader: {\n fontWeight: 700,\n background: \"#D5DDE5\",\n borderRadius: \"3px 3px 0px 0px\",\n color: \"#121212\",\n padding: 8,\n borderTop: \"1px solid #D5DDE5\",\n marginTop: -2,\n },\n planHeader: {\n background: \"#FFFFFF\",\n borderRadius: \"3px 3px 0px 0px\",\n padding: 8,\n borderTop: \"1px solid #D5DDE5\",\n },\n detailsPrice: {\n fontSize: 13,\n fontWeight: 700,\n marginBottom: 8,\n },\n detailsCapacityMax: {\n minHeight: 28,\n fontSize: 10,\n fontWeight: 700,\n marginBottom: 12,\n padding: \"0% 15%\",\n },\n detailsCapacityMin: {\n fontSize: 10,\n },\n itemContainer: {\n height: 36,\n },\n itemContainerDetail: {\n height: 48,\n },\n item: {\n height: \"100%\",\n borderLeft: \"1px solid #e2e2e2\",\n borderRight: \"1px solid #e2e2e2\",\n textAlign: \"center\",\n fontSize: 10,\n fontWeight: 700,\n display: \"flex\",\n alignItems: \"center\",\n alignContent: \"center\",\n marginLeft: 8,\n maxWidth: \"calc(25% - 8px)\",\n borderTop: \"1px solid #e5e5e5\",\n },\n itemFirst: {\n borderLeft: 0,\n borderRight: 0,\n },\n itemHighlighted: {\n borderLeft: \"1px solid #B5B5B5\",\n borderRight: \"1px solid #B5B5B5\",\n },\n field: {\n textAlign: \"left\",\n fontWeight: 400,\n fontSize: 12,\n },\n checkIcon: {\n height: 12,\n color:\n \"transparent linear-gradient(90deg, #073052 0%, #081c42 100%) 0% 0% no-repeat padding-box\",\n },\n buttonContainer: {\n paddingTop: 8,\n paddingBottom: 24,\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n borderRadius: \"0 0 3px 3px\",\n border: \"1px solid #e2e2e2\",\n borderTop: 0,\n marginLeft: 8,\n maxWidth: \"calc(25% - 8px)\",\n },\n buttonContainerBlank: {\n border: 0,\n },\n buttonContainerHighlighted: {\n border: \"1px solid #B5B5B5\",\n borderTop: 0,\n },\n button: {\n textTransform: \"none\",\n fontSize: 15,\n fontWeight: 700,\n },\n licenseButton: {\n float: \"right\",\n marginTop: 25,\n marginRight: 25,\n },\n openSourcePolicy: {\n color: \"#1C5A8D\",\n fontWeight: \"bold\",\n },\n activateLink: {\n color: \"#1C5A8D\",\n fontWeight: \"bold\",\n clear: \"both\",\n background: \"none\",\n border: \"none\",\n textDecoration: \"underline\",\n cursor: \"pointer\",\n },\n subnetRefreshLicenseLink: {\n color: \"#1C5A8D\",\n fontWeight: \"bold\",\n clear: \"both\",\n background: \"none\",\n border: \"none\",\n textDecoration: \"underline\",\n cursor: \"pointer\",\n fontSize: 13,\n },\n fullWidth: {\n width: \"100%\",\n height: \"100%\",\n },\n midWidth: {\n width: \"70%\",\n float: \"left\",\n height: \"100%\",\n },\n smallWidth: {\n width: \"30%\",\n float: \"right\",\n height: \"100%\",\n borderRadius: \"0px 3px 0px 0px !important\",\n },\n licenseInfo: { color: \"#FFFFFF\", position: \"relative\" },\n licenseInfoTitle: {\n textTransform: \"none\",\n color: \"#BFBFBF\",\n fontSize: 11,\n },\n licenseInfoValue: {\n textTransform: \"none\",\n fontSize: 14,\n fontWeight: \"bold\",\n },\n licenseDescription: {\n background: \"#032F51\",\n padding: \"30px 30px\",\n borderTop: \"1px solid #e2e5e4\",\n borderLeft: \"1px solid #e2e5e4\",\n borderRight: \"1px solid #e2e5e4\",\n bottom: 0,\n left: \"5%\",\n right: \"5%\",\n position: \"absolute\",\n },\n currentPlanBG: {\n background: \"#022A4A 0% 0% no-repeat padding-box\",\n color: \"#FFFFFF\",\n borderTop: \"1px solid #52687d\",\n },\n currentPlanButton: {\n background: \"#FFFFFF\",\n color: \"#022A4A\",\n \"&:hover\": {\n background: \"#FFFFFF\",\n },\n },\n planItemsPadding: {\n padding: \"23px 33px\",\n },\n subnetSubTitle: {\n fontSize: 12,\n },\n verifiedIcon: {\n width: 96,\n position: \"absolute\",\n right: 0,\n bottom: 29,\n },\n loadingLoginStrategy: {\n textAlign: \"center\",\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface ILicenseProps {\n classes: any;\n operatorMode: boolean;\n}\n\nconst License = ({ classes, operatorMode }: ILicenseProps) => {\n const closeModalAndFetchLicenseInfo = () => {\n setActivateProductModal(false);\n fetchLicenseInfo();\n };\n const fetchLicenseInfo = () => {\n setLoadingLicenseInfo(true);\n api\n .invoke(\"GET\", `/api/v1/subscription/info`)\n .then((res: LicenseInfo) => {\n if (res) {\n if (res.plan === \"STANDARD\") {\n setCurrentPlanID(1);\n } else if (res.plan === \"ENTERPRISE\") {\n setCurrentPlanID(2);\n } else {\n setCurrentPlanID(1);\n }\n setLicenseInfo(res);\n }\n setLoadingLicenseInfo(false);\n })\n .catch((err: any) => {\n setLoadingLicenseInfo(false);\n });\n };\n const refreshLicense = () => {\n setLoadingRefreshLicense(true);\n api\n .invoke(\"POST\", `/api/v1/subscription/refresh`, {})\n .then((res: LicenseInfo) => {\n if (res) {\n if (res.plan === \"STANDARD\") {\n setCurrentPlanID(1);\n } else if (res.plan === \"ENTERPRISE\") {\n setCurrentPlanID(2);\n } else {\n setCurrentPlanID(1);\n }\n setLicenseInfo(res);\n }\n setLoadingRefreshLicense(false);\n })\n .catch((err: any) => {\n setLoadingRefreshLicense(false);\n });\n };\n\n const [activateProductModal, setActivateProductModal] =\n useState(false);\n\n const [licenseInfo, setLicenseInfo] = useState();\n const [currentPlanID, setCurrentPlanID] = useState(0);\n const [loadingLicenseInfo, setLoadingLicenseInfo] = useState(true);\n const [loadingRefreshLicense, setLoadingRefreshLicense] =\n useState(false);\n\n useEffect(() => {\n fetchLicenseInfo();\n }, []);\n\n if (loadingLicenseInfo) {\n return (\n \n \n \n );\n }\n return (\n \n \n \n \n \n \n {licenseInfo ? (\n \n \n \n \n License\n \n \n Commercial License\n \n \n Organization\n \n \n {licenseInfo.organization}\n \n \n Registered Capacity\n \n \n {niceBytes(\n (licenseInfo.storage_capacity * 1099511627776) // 1 Terabyte = 1099511627776 Bytes\n .toString(10)\n )}\n \n \n Expiry Date\n \n \n \n {licenseInfo.expires_at}\n \n \n \n \n \n Subscription Plan\n \n \n {licenseInfo.plan}\n \n \n Requester\n \n \n {licenseInfo.email}\n \n \n \n \n \n ) : (\n \n \"agpl\"\n \n GNU Affero General Public License\n \n \n
\n Version 3\n \n The GNU Affero General Public License is a free,\n copyleft license for software and other kinds of works,\n specifically designed to ensure cooperation with the\n Community in the case of network server software.\n \n
\n \n
\n )}\n \n \n {licenseInfo ? (\n \n {\" \"}\n \n Login to MinIO SUBNET !\n \n \n It combines a commercial license with a support experience\n unlike any other.\n \n
\n \n Login to SUBNET\n \n {operatorMode && (\n \n {\" \"}\n
\n
\n {\n e.preventDefault();\n refreshLicense();\n }}\n >\n Refresh Licence\n \n {loadingRefreshLicense && (\n \n )}\n
\n )}\n
\n ) : (\n \n \n Choosing between GNU AGPL v3 and Commercial License\n \n \n If you are building proprietary applications, you may want\n to choose the commercial license included as part of the\n Standard and Enterprise subscription plans. Applications\n must otherwise comply with all the GNU AGPLv3 License &\n Trademark obligations. Follow the links below to learn more\n about the compliance policy.\n \n
\n \n Open Source Policy Compliance\n \n
\n
\n \n Trademark Policy\n \n
\n )}\n
\n
\n \n \n \n {operatorMode ? (\n closeModalAndFetchLicenseInfo()}\n />\n ) : null}\n \n \n \n {planDetails.map((details: any) => {\n let currentPlan =\n (!licenseInfo && details.title === \"Community\") ||\n (licenseInfo &&\n licenseInfo.plan.toLowerCase() ===\n details.title.toLowerCase());\n return (\n \n \n {currentPlan ? \"Current Plan\" : \"\\u00A0\"}\n \n \n {details.title}\n \n \n {details.price}\n \n \n {details.capacityMax || \"\"}\n \n \n );\n })}\n \n {planItems.map((item: any) => {\n return (\n \n \n {item.field}\n \n \n \n {item.community === \"N/A\" ? (\n \"\"\n ) : item.community === \"Yes\" ? (\n \n ) : (\n item.community\n )}\n \n {item.communityDetail !== undefined && (\n \n {item.communityDetail}\n \n )}\n
\n \n \n {item.standard === \"N/A\" ? (\n \"\"\n ) : item.standard === \"Yes\" ? (\n \n ) : (\n item.standard\n )}\n \n \n \n \n {item.enterprise === \"N/A\" ? (\n \"\"\n ) : item.enterprise === \"Yes\" ? (\n \n ) : (\n item.enterprise\n )}\n \n \n \n );\n })}\n \n \n {planButtons.map((button: any, index: any) => {\n return (\n \n \n {\n e.preventDefault();\n window.open(\n `${button.link}/?ref=${\n operatorMode ? \"op\" : \"con\"\n }`,\n \"_blank\"\n );\n }}\n >\n {currentPlanID !== index && index > 0\n ? button.text2\n : button.text}\n \n \n {operatorMode &&\n button.text === \"Subscribe\" &&\n !(\n licenseInfo &&\n licenseInfo.plan.toLowerCase() ===\n button.plan.toLowerCase()\n ) && (\n \n {\n e.preventDefault();\n setActivateProductModal(true);\n }}\n >\n Activate\n \n \n )}\n \n );\n })}\n \n \n \n \n \n \n
\n
\n );\n};\n\nexport default connector(withStyles(styles)(License));\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 { TraceMessage } from \"./types\";\n\nexport const TRACE_MESSAGE_RECEIVED = \"TRACE_MESSAGE_RECEIVED\";\nexport const TRACE_RESET_MESSAGES = \"TRACE_RESET_MESSAGES\";\n\ninterface TraceMessageReceivedAction {\n type: typeof TRACE_MESSAGE_RECEIVED;\n message: TraceMessage;\n}\n\ninterface TraceResetMessagesAction {\n type: typeof TRACE_RESET_MESSAGES;\n}\n\nexport type TraceActionTypes =\n | TraceMessageReceivedAction\n | TraceResetMessagesAction;\n\nexport function traceMessageReceived(message: TraceMessage) {\n return {\n type: TRACE_MESSAGE_RECEIVED,\n message: message,\n };\n}\n\nexport function traceResetMessages() {\n return {\n type: TRACE_RESET_MESSAGES,\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\n// Close codes for websockets defined in RFC 6455\nexport const WSCloseNormalClosure = 1000;\nexport const WSCloseCloseGoingAway = 1001;\nexport const WSCloseAbnormalClosure = 1006;\nexport const WSClosePolicyViolation = 1008;\nexport const WSCloseInternalServerErr = 1011;\n\nexport const wsProtocol = (protocol: string): string => {\n let wsProtocol = \"ws\";\n if (protocol === \"https:\") {\n wsProtocol = \"wss\";\n }\n return wsProtocol;\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, { useEffect } from \"react\";\nimport { IMessageEvent, w3cwebsocket as W3CWebSocket } from \"websocket\";\nimport { AppState } from \"../../../store\";\nimport { connect } from \"react-redux\";\nimport { traceMessageReceived, traceResetMessages } from \"./actions\";\nimport { TraceMessage } from \"./types\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { niceBytes, timeFromDate } from \"../../../common/utils\";\nimport { wsProtocol } from \"../../../utils/wsUtils\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport { Grid } from \"@material-ui/core\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport moment from \"moment/moment\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n logList: {\n background: \"white\",\n height: \"400px\",\n overflow: \"auto\",\n \"& ul\": {\n margin: \"4px\",\n padding: \"0px\",\n },\n \"& ul li\": {\n listStyle: \"none\",\n margin: \"0px\",\n padding: \"0px\",\n borderBottom: \"1px solid #dedede\",\n },\n },\n sizeItem: {\n width: 150,\n },\n timeItem: {\n width: 100,\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface ITrace {\n classes: any;\n traceMessageReceived: typeof traceMessageReceived;\n traceResetMessages: typeof traceResetMessages;\n messages: TraceMessage[];\n namespace: string;\n tenant: string;\n}\n\nconst Trace = ({\n classes,\n traceMessageReceived,\n traceResetMessages,\n messages,\n}: ITrace) => {\n useEffect(() => {\n traceResetMessages();\n const url = new URL(window.location.toString());\n const isDev = process.env.NODE_ENV === \"development\";\n const port = isDev ? \"9090\" : url.port;\n\n const wsProt = wsProtocol(url.protocol);\n const c = new W3CWebSocket(`${wsProt}://${url.hostname}:${port}/ws/trace`);\n\n let interval: any | null = null;\n if (c !== null) {\n c.onopen = () => {\n console.log(\"WebSocket Client Connected\");\n c.send(\"ok\");\n interval = setInterval(() => {\n c.send(\"ok\");\n }, 10 * 1000);\n };\n c.onmessage = (message: IMessageEvent) => {\n let m: TraceMessage = JSON.parse(message.data.toString());\n m.ptime = moment(m.time, \"YYYY-MM-DD HH:mm:s.SSSS +0000 UTC\").toDate();\n m.key = Math.random();\n traceMessageReceived(m);\n };\n c.onclose = () => {\n clearInterval(interval);\n console.log(\"connection closed by server\");\n };\n return () => {\n c.close(1000);\n clearInterval(interval);\n console.log(\"closing websockets\");\n };\n }\n }, [traceMessageReceived, traceResetMessages]);\n\n return (\n \n \n \n \n {\n const timeParse = new Date(time);\n return timeFromDate(timeParse);\n },\n globalClass: classes.timeItem,\n },\n { label: \"Name\", elementKey: \"api\" },\n {\n label: \"Status\",\n elementKey: \"\",\n renderFunction: (fullElement: TraceMessage) =>\n `${fullElement.statusCode} ${fullElement.statusMsg}`,\n renderFullObject: true,\n },\n {\n label: \"Location\",\n elementKey: \"configuration_id\",\n renderFunction: (fullElement: TraceMessage) =>\n `${fullElement.host} ${fullElement.client}`,\n renderFullObject: true,\n },\n {\n label: \"Load Time\",\n elementKey: \"callStats.duration\",\n globalClass: classes.timeItem,\n },\n {\n label: \"Upload\",\n elementKey: \"callStats.rx\",\n renderFunction: niceBytes,\n globalClass: classes.sizeItem,\n },\n {\n label: \"Download\",\n elementKey: \"callStats.tx\",\n renderFunction: niceBytes,\n globalClass: classes.sizeItem,\n },\n ]}\n isLoading={false}\n records={messages}\n entityName=\"Traces\"\n idField=\"api\"\n customEmptyMessage=\"There are no traced Elements yet\"\n autoScrollToBottom\n />\n \n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n messages: state.trace.messages,\n});\n\nconst connector = connect(mapState, {\n traceMessageReceived: traceMessageReceived,\n traceResetMessages: traceResetMessages,\n});\n\nexport default connector(withStyles(styles)(Trace));\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 { LogMessage } from \"./types\";\n\nexport const LOG_MESSAGE_RECEIVED = \"LOG_MESSAGE_RECEIVED\";\nexport const LOG_RESET_MESSAGES = \"LOG_RESET_MESSAGES\";\n\ninterface LogMessageReceivedAction {\n type: typeof LOG_MESSAGE_RECEIVED;\n message: LogMessage;\n}\n\ninterface LogResetMessagesAction {\n type: typeof LOG_RESET_MESSAGES;\n}\n\nexport type LogActionTypes = LogMessageReceivedAction | LogResetMessagesAction;\n\nexport function logMessageReceived(message: LogMessage) {\n return {\n type: LOG_MESSAGE_RECEIVED,\n message: message,\n };\n}\n\nexport function logResetMessages() {\n return {\n type: LOG_RESET_MESSAGES,\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 .\nimport React, { Fragment, useState, useEffect } from \"react\";\nimport { IMessageEvent, w3cwebsocket as W3CWebSocket } from \"websocket\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { connect } from \"react-redux\";\nimport { Grid } from \"@material-ui/core\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport moment from \"moment/moment\";\nimport { AppState } from \"../../../../store\";\nimport { logMessageReceived, logResetMessages } from \"../actions\";\nimport { LogMessage } from \"../types\";\nimport { timeFromDate } from \"../../../../common/utils\";\nimport { wsProtocol } from \"../../../../utils/wsUtils\";\nimport {\n actionsTray,\n logsCommon,\n searchField,\n} from \"../../Common/FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n logList: {\n background: \"#fff\",\n minHeight: 400,\n height: \"calc(100vh - 304px)\",\n overflow: \"auto\",\n fontSize: 13,\n padding: \"25px 45px 0\",\n border: \"1px solid #EAEDEE\",\n borderRadius: 4,\n },\n tab: {\n paddingLeft: 25,\n },\n logerror: {\n color: \"#A52A2A\",\n },\n logerror_tab: {\n color: \"#A52A2A\",\n paddingLeft: 25,\n },\n ansidefault: {\n color: \"#000\",\n },\n highlight: {\n \"& span\": {\n backgroundColor: \"#082F5238\",\n },\n },\n ...actionsTray,\n ...searchField,\n ...logsCommon,\n });\n\ninterface ILogs {\n classes: any;\n logMessageReceived: typeof logMessageReceived;\n logResetMessages: typeof logResetMessages;\n messages: LogMessage[];\n}\n\nconst ErrorLogs = ({\n classes,\n logMessageReceived,\n logResetMessages,\n messages,\n}: ILogs) => {\n const [highlight, setHighlight] = useState(\"\");\n\n useEffect(() => {\n logResetMessages();\n const url = new URL(window.location.toString());\n const isDev = process.env.NODE_ENV === \"development\";\n const port = isDev ? \"9090\" : url.port;\n\n const wsProt = wsProtocol(url.protocol);\n\n const c = new W3CWebSocket(\n `${wsProt}://${url.hostname}:${port}/ws/console`\n );\n\n let interval: any | null = null;\n if (c !== null) {\n c.onopen = () => {\n console.log(\"WebSocket Client Connected\");\n c.send(\"ok\");\n interval = setInterval(() => {\n c.send(\"ok\");\n }, 10 * 1000);\n };\n c.onmessage = (message: IMessageEvent) => {\n // console.log(message.data.toString())\n // FORMAT: 00:35:17 UTC 01/01/2021\n let m: LogMessage = JSON.parse(message.data.toString());\n m.time = moment(m.time, \"HH:mm:s UTC MM/DD/YYYY\").toDate();\n m.key = Math.random();\n logMessageReceived(m);\n };\n c.onclose = () => {\n clearInterval(interval);\n console.log(\"connection closed by server\");\n };\n return () => {\n c.close(1000);\n clearInterval(interval);\n console.log(\"closing websockets\");\n };\n }\n }, [logMessageReceived, logResetMessages]);\n\n const renderError = (logElement: LogMessage) => {\n let errorElems = [];\n if (logElement.error !== null && logElement.error !== undefined) {\n if (logElement.api && logElement.api.name) {\n const errorText = `API: ${logElement.api.name}`;\n\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n\n errorElems.push(\n \n
\n {errorText}\n
\n );\n }\n if (logElement.time) {\n const errorText = `Time: ${timeFromDate(logElement.time)}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n
\n );\n }\n if (logElement.deploymentid) {\n const errorText = `DeploymentID: ${logElement.deploymentid}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n if (logElement.requestID) {\n const errorText = `RequestID: ${logElement.requestID}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n if (logElement.remotehost) {\n const errorText = `RemoteHost: ${logElement.remotehost}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n if (logElement.host) {\n const errorText = `Host: ${logElement.host}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n if (logElement.userAgent) {\n const errorText = `UserAgent: ${logElement.userAgent}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n if (logElement.error.message) {\n const errorText = `Error: ${logElement.error.message}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n if (logElement.error.source) {\n // for all sources add padding\n for (let s in logElement.error.source) {\n const errorText = logElement.error.source[s];\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n }\n }\n return errorElems;\n };\n\n const renderLog = (logElement: LogMessage) => {\n let logMessage = logElement.ConsoleMsg;\n // remove any non ascii characters, exclude any control codes\n logMessage = logMessage.replace(/([^\\x20-\\x7F])/g, \"\");\n\n // regex for terminal colors like e.g. `[31;4m `\n const tColorRegex = /((\\[[0-9;]+m))/g;\n\n // get substring if there was a match for to split what\n // is going to be colored and what not, here we add color\n // only to the first match.\n let substr = logMessage.replace(tColorRegex, \"\");\n\n // in case highlight is set, we select the line that contains the requested string\n let highlightedLine =\n highlight !== \"\"\n ? logMessage.toLowerCase().includes(highlight.toLowerCase())\n : false;\n\n // if starts with multiple spaces add padding\n if (substr.startsWith(\" \")) {\n return (\n \n {substr}\n \n );\n } else if (logElement.error !== null && logElement.error !== undefined) {\n // list error message and all sources and error elems\n return renderError(logElement);\n } else {\n // for all remaining set default class\n return (\n \n {substr}\n \n );\n }\n };\n\n const renderLines = messages.map((m) => {\n return renderLog(m);\n });\n\n return (\n \n \n \n {\n setHighlight(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n \n \n
\n
\n \n
{renderLines}
\n
\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n messages: state.logs.messages,\n});\n\nconst connector = connect(mapState, {\n logMessageReceived: logMessageReceived,\n logResetMessages: logResetMessages,\n});\n\nexport default withStyles(styles)(connector(ErrorLogs));\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\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport TextField from \"@material-ui/core/TextField\";\nimport { searchField } from \"../common/styleLibrary\";\n\ninterface IFilterInputWrapper {\n classes: any;\n value: string;\n onChange: (txtVar: string) => any;\n label: string;\n placeholder?: string;\n id: string;\n name: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n searchField: {\n ...searchField.searchField,\n height: 30,\n padding: 0,\n \"& input\": {\n padding: \"0 12px\",\n height: 28,\n fontSize: 12,\n fontWeight: 600,\n color: \"#393939\",\n },\n \"&.isDisabled\": {\n \"&:hover\": {\n borderColor: \"#EAEDEE\",\n },\n },\n \"& input.Mui-disabled\": {\n backgroundColor: \"#EAEAEA\",\n },\n },\n labelStyle: {\n color: \"#393939\",\n fontSize: 12,\n marginBottom: 4,\n },\n buttonKit: {\n display: \"flex\",\n alignItems: \"center\",\n },\n toggleButton: {\n marginRight: 10,\n },\n fieldContainer: {\n flexGrow: 1,\n margin: \"0 15px\",\n },\n });\n\nconst FilterInputWrapper = ({\n classes,\n label,\n onChange,\n value,\n placeholder = \"\",\n id,\n name,\n}: IFilterInputWrapper) => {\n return (\n \n
\n
{label}
\n
\n {\n onChange(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n }}\n className={classes.searchField}\n value={value}\n />\n
\n
\n
\n );\n};\n\nexport default withStyles(styles)(FilterInputWrapper);\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, useState, useEffect, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, Grid } from \"@material-ui/core\";\nimport { ArrowDropUp } from \"@material-ui/icons\";\nimport ArrowDropDownIcon from \"@material-ui/icons/ArrowDropDown\";\nimport {\n actionsTray,\n containerForHeader,\n logsCommon,\n searchField,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { IReqInfoSearchResults, ISearchResponse } from \"./types\";\nimport { niceBytes, nsToSeconds } from \"../../../../common/utils\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport FilterInputWrapper from \"../../Common/FormComponents/FilterInputWrapper/FilterInputWrapper\";\nimport DateTimePickerWrapper from \"../../Common/FormComponents/DateTimePickerWrapper/DateTimePickerWrapper\";\n\ninterface ILogSearchProps {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n inputBar: {\n flexGrow: 1,\n marginLeft: 15,\n },\n advancedLabel: {\n display: \"flex\",\n alignItems: \"center\",\n color: \"#091C42\",\n border: 0,\n backgroundColor: \"transparent\",\n cursor: \"pointer\",\n \"&:focus, &:active\": {\n outline: \"none\",\n },\n },\n advancedLabelContainer: {\n marginTop: 10,\n },\n getInformationContainer: {\n textAlign: \"right\",\n },\n orderButton: {\n width: 93,\n },\n recordsLabel: {\n alignSelf: \"center\",\n marginLeft: 15,\n },\n blockCollapsed: {\n height: 0,\n overflowY: \"hidden\",\n transitionDuration: \"0.3s\",\n },\n filterOpen: {\n height: 200,\n marginBottom: 12,\n },\n endLineAction: {\n marginBottom: 15,\n },\n filtersContainer: {\n display: \"flex\",\n justifyContent: \"space-between\",\n marginBottom: 12,\n },\n innerContainer: {\n backgroundColor: \"#fff\",\n border: \"#EAEDEE 1px solid\",\n borderRadius: 3,\n padding: 10,\n marginBottom: 15,\n },\n noticeLabel: {\n marginLeft: 15,\n marginBottom: 15,\n fontSize: 12,\n color: \"#9C9C9C\",\n },\n\n tableFOpen: {\n height: \"calc(100vh - 561px)\",\n },\n tableFClosed: {\n height: \"calc(100vh - 349px)\",\n },\n \"@global\": {\n \".overrideMargin\": {\n marginLeft: 0,\n },\n },\n ...searchField,\n ...actionsTray,\n ...logsCommon,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst LogsSearchMain = ({ classes, setErrorSnackMessage }: ILogSearchProps) => {\n const [loading, setLoading] = useState(true);\n const [timeStart, setTimeStart] = useState(null);\n const [timeEnd, setTimeEnd] = useState(null);\n const [filterOpen, setFilterOpen] = useState(false);\n const [records, setRecords] = useState([]);\n const [bucket, setBucket] = useState(\"\");\n const [apiName, setApiName] = useState(\"\");\n const [userAgent, setUserAgent] = useState(\"\");\n const [object, setObject] = useState(\"\");\n const [requestID, setRequestID] = useState(\"\");\n const [responseStatus, setResponseStatus] = useState(\"\");\n const [sortOrder, setSortOrder] =\n useState<\"ASC\" | \"DESC\" | undefined>(\"DESC\");\n const [columnsShown, setColumnsShown] = useState([\n \"time\",\n \"api_name\",\n \"bucket\",\n \"object\",\n \"remote_host\",\n \"request_id\",\n \"user_agent\",\n \"response_status\",\n ]);\n const [nextPage, setNextPage] = useState(0);\n const [alreadyFetching, setAlreadyFetching] = useState(false);\n\n let recordsResp: any = null;\n\n const fetchRecords = useCallback(() => {\n if (!alreadyFetching) {\n setAlreadyFetching(true);\n let queryParams = `${bucket !== \"\" ? `&fp=bucket:${bucket}` : \"\"}${\n object !== \"\" ? `&fp=object:${object}` : \"\"\n }${apiName !== \"\" ? `&fp=api_name:${apiName}` : \"\"}${\n requestID !== \"\" ? `&fp=request_id:${requestID}` : \"\"\n }${userAgent !== \"\" ? `&fp=user_agent:${userAgent}` : \"\"}${\n responseStatus !== \"\" ? `&fp=response_status:${responseStatus}` : \"\"\n }`;\n\n queryParams = queryParams.trim();\n\n if (queryParams.endsWith(\",\")) {\n queryParams = queryParams.slice(0, -1);\n }\n\n api\n .invoke(\n \"GET\",\n `/api/v1/logs/search?q=reqinfo${\n queryParams !== \"\" ? `${queryParams}` : \"\"\n }&pageSize=100&pageNo=${nextPage}&order=${\n sortOrder === \"DESC\" ? \"timeDesc\" : \"timeAsc\"\n }${\n timeStart !== null ? `&timeStart=${timeStart.toISOString()}` : \"\"\n }${timeEnd !== null ? `&timeEnd=${timeEnd.toISOString()}` : \"\"}`\n )\n .then((res: ISearchResponse) => {\n const fetchedResults = res.results || [];\n const newResultSet = [...records, ...fetchedResults];\n\n setLoading(false);\n setAlreadyFetching(false);\n setRecords(newResultSet);\n setNextPage(nextPage + 1);\n\n if (recordsResp !== null) {\n recordsResp();\n }\n })\n .catch((err: any) => {\n setLoading(false);\n setAlreadyFetching(false);\n setErrorSnackMessage(err);\n });\n }\n }, [\n bucket,\n object,\n apiName,\n requestID,\n userAgent,\n responseStatus,\n nextPage,\n sortOrder,\n timeStart,\n timeEnd,\n alreadyFetching,\n records,\n recordsResp,\n setErrorSnackMessage,\n ]);\n\n useEffect(() => {\n if (loading) {\n setRecords([]);\n fetchRecords();\n }\n }, [loading, sortOrder, fetchRecords]);\n\n const triggerLoad = () => {\n setNextPage(0);\n setLoading(true);\n };\n\n const selectColumn = (colName: string, active: boolean) => {\n let newArray = [...columnsShown];\n\n if (!active) {\n newArray = columnsShown.filter((element) => element !== colName);\n } else {\n if (!newArray.includes(colName)) {\n newArray.push(colName);\n }\n }\n setColumnsShown(newArray);\n };\n\n const sortChange = (sortData: any) => {\n const newSortDirection = get(sortData, \"sortDirection\", \"DESC\");\n setSortOrder(newSortDirection);\n setNextPage(0);\n setLoading(true);\n };\n\n const loadMoreRecords = (_: { startIndex: number; stopIndex: number }) => {\n fetchRecords();\n return new Promise((resolve) => {\n recordsResp = resolve;\n });\n };\n\n return (\n \n \n \n Start Time\n \n End Time\n \n \n \n \n
\n
\n Enable your preferred options to get filtered records.\n
\n You can use '*' to match any character, '.' to signify a single\n character or '\\' to scape an special character (E.g. mybucket-*)\n
\n
\n \n \n \n
\n
\n \n \n \n
\n
\n \n
\n \n
\n {\n setFilterOpen(!filterOpen);\n }}\n >\n Advanced Filters{\" \"}\n {filterOpen ? : }\n \n
\n \n Get Information\n \n \n \n (\n \n \n {element.response_status_code} ({element.response_status})\n \n \n ),\n renderFullObject: true,\n },\n {\n label: \"Request Content Length\",\n elementKey: \"request_content_length\",\n renderFunction: niceBytes,\n },\n {\n label: \"Response Content Length\",\n elementKey: \"response_content_length\",\n renderFunction: niceBytes,\n },\n {\n label: \"Time to Response NS\",\n elementKey: \"time_to_response_ns\",\n renderFunction: nsToSeconds,\n contentTextAlign: \"right\",\n },\n ]}\n isLoading={loading}\n records={records}\n entityName=\"Logs\"\n customEmptyMessage={\"There is no information with this criteria\"}\n idField=\"request_id\"\n columnsSelector\n columnsShown={columnsShown}\n onColumnChange={selectColumn}\n customPaperHeight={\n filterOpen ? classes.tableFOpen : classes.tableFClosed\n }\n sortConfig={{\n currentSort: \"time\",\n currentDirection: sortOrder,\n triggerSort: sortChange,\n }}\n infiniteScrollConfig={{\n recordsCount: 1000000,\n loadMoreRecords: loadMoreRecords,\n }}\n textSelectable\n />\n \n \n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(LogsSearchMain));\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, useState, useEffect } from \"react\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { Grid, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Tab from \"@material-ui/core/Tab\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport ErrorLogs from \"./ErrorLogs/ErrorLogs\";\nimport LogsSearchMain from \"./LogSearch/LogsSearchMain\";\nimport api from \"../../../common/api\";\n\ninterface ILogsMainProps {\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerLabel: {\n fontSize: 22,\n fontWeight: 600,\n color: \"#000\",\n marginTop: 4,\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst LogsMain = ({ classes }: ILogsMainProps) => {\n const [currentTab, setCurrentTab] = useState(0);\n const [loading, setLoading] = useState(true);\n const [showLogSearch, setShowLogSearch] = useState(false);\n\n useEffect(() => {\n api\n .invoke(\"GET\", `/api/v1/logs/search?q=reqinfo&pageSize=10&pageNo=0`)\n .then(() => {\n setShowLogSearch(true);\n setLoading(false);\n })\n .catch((err: any) => {\n setLoading(false);\n console.info(\"Log Search API not available.\");\n });\n }, [loading]);\n\n return (\n \n \n \n \n {!loading ? (\n \n \n All Logs\n \n , newValue: number) => {\n setCurrentTab(newValue);\n }}\n indicatorColor=\"primary\"\n textColor=\"primary\"\n aria-label=\"cluster-tabs\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n \n {showLogSearch && }\n \n \n {currentTab === 0 && (\n \n \n \n )}\n {currentTab === 1 && showLogSearch && (\n \n \n \n )}\n \n \n ) : (\n \n )}\n \n \n \n );\n};\n\nexport default withStyles(styles)(LogsMain);\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 { HorizontalBar } from \"react-chartjs-2\";\nimport React, { useEffect, useState } from \"react\";\nimport { Button, Grid, TextField, InputBase } from \"@material-ui/core\";\nimport { IMessageEvent, w3cwebsocket as W3CWebSocket } from \"websocket\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { wsProtocol } from \"../../../utils/wsUtils\";\nimport api from \"../../../common/api\";\nimport { FormControl, MenuItem, Select } from \"@material-ui/core\";\nimport { BucketList, Bucket } from \"../Watch/types\";\nimport { HealStatus, colorH } from \"./types\";\nimport { niceBytes } from \"../../../common/utils\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport CheckboxWrapper from \"../Common/FormComponents/CheckboxWrapper/CheckboxWrapper\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n watchList: {\n background: \"white\",\n maxHeight: \"400\",\n overflow: \"auto\",\n \"& ul\": {\n margin: \"4\",\n padding: \"0\",\n },\n \"& ul li\": {\n listStyle: \"none\",\n margin: \"0\",\n padding: \"0\",\n borderBottom: \"1px solid #dedede\",\n },\n },\n graphContainer: {\n backgroundColor: \"#fff\",\n border: \"#EAEDEE 1px solid\",\n borderRadius: 3,\n padding: \"19px 38px\",\n },\n scanInfo: {\n marginTop: 20,\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n },\n scanData: {\n fontSize: 13,\n },\n inlineCheckboxes: {\n display: \"flex\",\n justifyContent: \"flex-start\",\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IHeal {\n classes: any;\n}\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n width: 450,\n lineHeight: \"50px\",\n marginRight: 15,\n \"label + &\": {\n marginTop: theme.spacing(3),\n },\n \"& .MuiSelect-select:focus\": {\n backgroundColor: \"transparent\",\n },\n },\n input: {\n height: 50,\n fontSize: 13,\n lineHeight: \"50px\",\n width: 450,\n },\n })\n)(InputBase);\n\nconst Heal = ({ classes }: IHeal) => {\n const [start, setStart] = useState(false);\n const [bucketName, setBucketName] = useState(\"\");\n const [bucketList, setBucketList] = useState([]);\n const [prefix, setPrefix] = useState(\"\");\n const [recursive, setRecursive] = useState(false);\n const [forceStart, setForceStart] = useState(false);\n const [forceStop, setForceStop] = useState(false);\n // healStatus states\n const [hStatus, setHStatus] = useState({\n beforeHeal: [0, 0, 0, 0],\n afterHeal: [0, 0, 0, 0],\n objectsHealed: 0,\n objectsScanned: 0,\n healDuration: 0,\n sizeScanned: \"\",\n });\n\n const fetchBucketList = () => {\n api\n .invoke(\"GET\", `/api/v1/buckets`)\n .then((res: BucketList) => {\n let buckets: Bucket[] = [];\n if (res.buckets !== null) {\n buckets = res.buckets;\n }\n setBucketList(buckets);\n })\n .catch((err: any) => {\n console.log(err);\n });\n };\n\n useEffect(() => {\n fetchBucketList();\n }, []);\n\n // forceStart and forceStop need to be mutually exclusive\n useEffect(() => {\n if (forceStart === true) {\n setForceStop(false);\n }\n }, [forceStart]);\n\n useEffect(() => {\n if (forceStop === true) {\n setForceStart(false);\n }\n }, [forceStop]);\n\n const colorHealthArr = (color: colorH) => {\n return [color.Green, color.Yellow, color.Red, color.Grey];\n };\n\n useEffect(() => {\n // begin watch if bucketName in bucketList and start pressed\n if (start) {\n // values stored here to update chart\n const cB: colorH = { Green: 0, Yellow: 0, Red: 0, Grey: 0 };\n const cA: colorH = { Green: 0, Yellow: 0, Red: 0, Grey: 0 };\n\n const url = new URL(window.location.toString());\n const isDev = process.env.NODE_ENV === \"development\";\n const port = isDev ? \"9090\" : url.port;\n\n const wsProt = wsProtocol(url.protocol);\n const c = new W3CWebSocket(\n `${wsProt}://${url.hostname}:${port}/ws/heal/${bucketName}?prefix=${prefix}&recursive=${recursive}&force-start=${forceStart}&force-stop=${forceStop}`\n );\n\n if (c !== null) {\n c.onopen = () => {\n console.log(\"WebSocket Client Connected\");\n c.send(\"ok\");\n };\n c.onmessage = (message: IMessageEvent) => {\n let m: HealStatus = JSON.parse(message.data.toString());\n // Store percentage per health color\n for (const [key, value] of Object.entries(m.healthAfterCols)) {\n cA[key] = (value * 100) / m.itemsScanned;\n }\n for (const [key, value] of Object.entries(m.healthBeforeCols)) {\n cB[key] = (value * 100) / m.itemsScanned;\n }\n setHStatus({\n beforeHeal: colorHealthArr(cB),\n afterHeal: colorHealthArr(cA),\n objectsHealed: m.objectsHealed,\n objectsScanned: m.objectsScanned,\n healDuration: m.healDuration,\n sizeScanned: niceBytes(m.bytesScanned.toString()),\n });\n };\n c.onclose = () => {\n setStart(false);\n console.log(\"connection closed by server\");\n };\n return () => {\n // close websocket on useEffect cleanup\n c.close(1000);\n console.log(\"closing websockets\");\n };\n }\n }\n }, [start, bucketName, forceStart, forceStop, prefix, recursive]);\n\n let data = {\n labels: [\"Green\", \"Yellow\", \"Red\", \"Grey\"],\n datasets: [\n {\n label: \"After Healing\",\n data: hStatus.afterHeal,\n backgroundColor: \"rgba(0, 0, 255, 0.2)\",\n borderColor: \"rgba(54, 162, 235, 1)\",\n borderWidth: 1,\n },\n {\n label: \"Before Healing\",\n data: hStatus.beforeHeal,\n backgroundColor: \"rgba(153, 102, 255, 0.2)\",\n borderColor: \"rgba(153, 102, 255, 1)\",\n borderWidth: 1,\n },\n ],\n };\n const bucketNames = bucketList.map((bucketName) => ({\n label: bucketName.name,\n value: bucketName.name,\n }));\n return (\n \n \n \n \n \n \n {\n setBucketName(e.target.value as string);\n }}\n className={classes.searchField}\n input={}\n displayEmpty\n >\n \n Select Bucket\n \n {bucketNames.map((option) => (\n \n {option.label}\n \n ))}\n \n \n {\n setPrefix(e.target.value);\n }}\n />\n setStart(true)}\n >\n Start\n \n \n \n {\n setRecursive(e.target.checked);\n }}\n disabled={false}\n label=\"Recursive\"\n />\n {\n setForceStart(e.target.checked);\n }}\n disabled={false}\n label=\"Force Start\"\n />\n {\n setForceStop(e.target.checked);\n }}\n disabled={false}\n label=\"Force Stop\"\n />\n \n \n
\n
\n \n \n \n
\n Size scanned: {hStatus.sizeScanned}\n
\n
\n Objects healed: {hStatus.objectsHealed} /{\" \"}\n {hStatus.objectsScanned}\n
\n
\n Healing time: {hStatus.healDuration}s\n
\n
\n
\n
\n
\n
\n );\n};\n\nexport default withStyles(styles)(Heal);\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 { EventInfo } from \"./types\";\n\nexport const WATCH_MESSAGE_RECEIVED = \"WATCH_MESSAGE_RECEIVED\";\nexport const WATCH_RESET_MESSAGES = \"WATCH_RESET_MESSAGES\";\n\ninterface WatchMessageReceivedAction {\n type: typeof WATCH_MESSAGE_RECEIVED;\n message: EventInfo;\n}\n\ninterface WatchResetMessagesAction {\n type: typeof WATCH_RESET_MESSAGES;\n}\n\nexport type WatchActionTypes =\n | WatchMessageReceivedAction\n | WatchResetMessagesAction;\n\nexport function watchMessageReceived(message: EventInfo) {\n return {\n type: WATCH_MESSAGE_RECEIVED,\n message: message,\n };\n}\n\nexport function watchResetMessages() {\n return {\n type: WATCH_RESET_MESSAGES,\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 .\nimport React, { useEffect, useState } from \"react\";\nimport { Button, Grid, TextField, InputBase } from \"@material-ui/core\";\nimport { IMessageEvent, w3cwebsocket as W3CWebSocket } from \"websocket\";\nimport { AppState } from \"../../../store\";\nimport { connect } from \"react-redux\";\nimport { watchMessageReceived, watchResetMessages } from \"./actions\";\nimport { EventInfo, BucketList, Bucket } from \"./types\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { niceBytes, timeFromDate } from \"../../../common/utils\";\nimport { wsProtocol } from \"../../../utils/wsUtils\";\nimport api from \"../../../common/api\";\nimport { FormControl, MenuItem, Select } from \"@material-ui/core\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n watchList: {\n background: \"white\",\n height: \"400px\",\n overflow: \"auto\",\n \"& ul\": {\n margin: \"4px\",\n padding: \"0px\",\n },\n \"& ul li\": {\n listStyle: \"none\",\n margin: \"0px\",\n padding: \"0px\",\n borderBottom: \"1px solid #dedede\",\n },\n },\n searchPrefix: {\n flexGrow: 1,\n marginLeft: 15,\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n width: 450,\n lineHeight: \"50px\",\n \"label + &\": {\n marginTop: theme.spacing(3),\n },\n \"& .MuiSelect-select:focus\": {\n backgroundColor: \"transparent\",\n },\n },\n input: {\n height: 50,\n fontSize: 13,\n lineHeight: \"50px\",\n width: 450,\n },\n })\n)(InputBase);\n\ninterface IWatch {\n classes: any;\n watchMessageReceived: typeof watchMessageReceived;\n watchResetMessages: typeof watchResetMessages;\n messages: EventInfo[];\n}\n\nconst Watch = ({\n classes,\n watchMessageReceived,\n watchResetMessages,\n messages,\n}: IWatch) => {\n const [start, setStart] = useState(false);\n const [bucketName, setBucketName] = useState(\"Select Bucket\");\n const [prefix, setPrefix] = useState(\"\");\n const [suffix, setSuffix] = useState(\"\");\n const [bucketList, setBucketList] = useState([]);\n\n const fetchBucketList = () => {\n api\n .invoke(\"GET\", `/api/v1/buckets`)\n .then((res: BucketList) => {\n let buckets: Bucket[] = [];\n if (res.buckets !== null) {\n buckets = res.buckets;\n }\n setBucketList(buckets);\n })\n .catch((err: any) => {\n console.log(err);\n });\n };\n useEffect(() => {\n fetchBucketList();\n }, []);\n\n useEffect(() => {\n watchResetMessages();\n // begin watch if bucketName in bucketList and start pressed\n if (start && bucketList.some((bucket) => bucket.name === bucketName)) {\n const url = new URL(window.location.toString());\n const isDev = process.env.NODE_ENV === \"development\";\n const port = isDev ? \"9090\" : url.port;\n\n const wsProt = wsProtocol(url.protocol);\n const c = new W3CWebSocket(\n `${wsProt}://${url.hostname}:${port}/ws/watch/${bucketName}?prefix=${prefix}&suffix=${suffix}`\n );\n\n let interval: any | null = null;\n if (c !== null) {\n c.onopen = () => {\n console.log(\"WebSocket Client Connected\");\n c.send(\"ok\");\n interval = setInterval(() => {\n c.send(\"ok\");\n }, 10 * 1000);\n };\n c.onmessage = (message: IMessageEvent) => {\n let m: EventInfo = JSON.parse(message.data.toString());\n m.Time = new Date(m.Time.toString());\n m.key = Math.random();\n watchMessageReceived(m);\n };\n c.onclose = () => {\n clearInterval(interval);\n console.log(\"connection closed by server\");\n // reset start status\n setStart(false);\n };\n return () => {\n // close websocket on useEffect cleanup\n c.close(1000);\n clearInterval(interval);\n console.log(\"closing websockets\");\n };\n }\n } else {\n // reset start status\n setStart(false);\n }\n }, [\n watchMessageReceived,\n start,\n bucketList,\n bucketName,\n prefix,\n suffix,\n watchResetMessages,\n ]);\n\n const bucketNames = bucketList.map((bucketName) => ({\n label: bucketName.name,\n value: bucketName.name,\n }));\n\n return (\n \n \n \n \n \n \n {\n setBucketName(e.target.value as string);\n }}\n className={classes.searchField}\n disabled={start}\n input={}\n >\n \n Select Bucket\n \n {bucketNames.map((option) => (\n \n {option.label}\n \n ))}\n \n \n {\n setPrefix(e.target.value);\n }}\n />\n {\n setSuffix(e.target.value);\n }}\n />\n setStart(true)}\n >\n Start\n \n \n \n
\n
\n \n
\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n messages: state.watch.messages,\n});\n\nconst connector = connect(mapState, {\n watchMessageReceived: watchMessageReceived,\n watchResetMessages: watchResetMessages,\n});\n\nexport default connector(withStyles(styles)(Watch));\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 { HealthInfoMessage } from \"./types\";\n\nexport const HEALTH_INFO_MESSAGE_RECEIVED = \"HEALTH_INFO_MESSAGE_RECEIVED\";\nexport const HEALTH_INFO_RESET_MESSAGE = \"HEALTH_INFO_RESET_MESSAGE\";\n\ninterface HealthInfoMessageReceivedAction {\n type: typeof HEALTH_INFO_MESSAGE_RECEIVED;\n message: HealthInfoMessage;\n}\n\ninterface HealthInfoResetMessagesAction {\n type: typeof HEALTH_INFO_RESET_MESSAGE;\n}\n\nexport type HealthInfoActionTypes =\n | HealthInfoMessageReceivedAction\n | HealthInfoResetMessagesAction;\n\nexport function healthInfoMessageReceived(message: HealthInfoMessage) {\n return {\n type: HEALTH_INFO_MESSAGE_RECEIVED,\n message: message,\n };\n}\n\nexport function healthInfoResetMessage() {\n return {\n type: HEALTH_INFO_RESET_MESSAGE,\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\nexport const DiagStatError = \"error\";\nexport const DiagStatSuccess = \"success\";\nexport const DiagStatInProgress = \"inProgress\";\nexport interface HealthInfoMessage {\n timestamp: Date;\n error: string;\n perf: perfInfo;\n minio: minioHealthInfo;\n sys: sysHealthInfo;\n}\n\nexport interface perfInfo {\n drives: serverDrivesInfo[];\n net: serverNetHealthInfo[];\n net_parallel: serverNetHealthInfo;\n error: string;\n}\n\nexport interface serverDrivesInfo {\n addr: string;\n serial: drivePerfInfo[];\n parallel: drivePerfInfo[];\n error: string;\n}\n\nexport interface drivePerfInfo {\n endpoint: string;\n latency: diskLatency;\n throughput: diskThroughput;\n error: string;\n}\nexport interface diskLatency {\n avg_secs: number;\n percentile50_secs: number;\n percentile90_secs: number;\n percentile99_secs: number;\n min_secs: number;\n max_secs: number;\n}\n\nexport interface diskThroughput {\n avg_bytes_per_sec: number;\n percentile50_bytes_per_sec: number;\n percentile90_bytes_per_sec: number;\n percentile99_bytes_per_sec: number;\n min_bytes_per_sec: number;\n max_bytes_per_sec: number;\n}\n\nexport interface serverNetHealthInfo {\n addr: string;\n net: netPerfInfo[];\n error: string;\n}\n\nexport interface netPerfInfo {\n remote: string;\n latency: netLatency;\n throughput: netThroughput;\n error: string;\n}\n\nexport interface netLatency {\n avg_secs: number;\n percentile50_secs: number;\n percentile90_secs: number;\n percentile99_secs: number;\n min_secs: number;\n max_secs: number;\n}\nexport interface netThroughput {\n avg_bytes_per_sec: number;\n percentile50_bytes_per_sec: number;\n percentile90_bytes_per_sec: number;\n percentile99_bytes_per_sec: number;\n min_bytes_per_sec: number;\n max_bytes_per_sec: number;\n}\n\nexport interface minioHealthInfo {\n info: infoMessage;\n config: any;\n error: string;\n}\n\nexport interface infoMessage {\n mode: string;\n domain: string[];\n region: string;\n sqsARN: string[];\n deploymentID: string;\n buckets: buckets;\n objects: objects;\n usage: usage;\n services: services;\n backend: any;\n servers: serverProperties[];\n}\n\nexport interface buckets {\n count: number;\n}\n\nexport interface objects {\n count: number;\n}\n\nexport interface usage {\n size: number;\n}\n\nexport interface services {\n vault: vault;\n ldap: ldap;\n logger: Map[];\n audit: Map[];\n notifications: Map[]>;\n}\n\nexport interface vault {\n status: string;\n encrypt: string;\n decrypt: string;\n}\n\nexport interface ldap {\n status: string;\n}\n\nexport interface status {\n status: string;\n}\n\nexport interface serverProperties {\n state: string;\n endpoint: string;\n uptime: number;\n version: string;\n commitID: string;\n network: Map;\n drives: disk[];\n}\n\nexport interface disk {\n endpoint: string;\n rootDisk: boolean;\n path: string;\n healing: boolean;\n state: string;\n uuid: string;\n model: string;\n totalspace: number;\n usedspace: number;\n availspace: number;\n readthroughput: number;\n writethroughput: number;\n readlatency: number;\n writelatency: number;\n utilization: number;\n}\n\nexport interface sysHealthInfo {\n cpus: serverCpuInfo[];\n drives: serverDiskHwInfo[];\n osinfos: serverOsInfo[];\n meminfos: serverMemInfo[];\n procinfos: serverProcInfo[];\n error: string;\n}\n\nexport interface serverCpuInfo {\n addr: string;\n cpu: cpuInfoStat[];\n time: cpuTimeStat[];\n error: string;\n}\n\nexport interface cpuInfoStat {\n cpu: number;\n vendorId: string;\n family: string;\n model: string;\n stepping: number;\n physicalId: string;\n coreId: string;\n cores: number;\n modelName: string;\n mhz: number;\n cacheSize: number;\n flags: string[];\n microcode: string;\n}\n\nexport interface cpuTimeStat {\n cpu: string;\n user: number;\n system: number;\n idle: number;\n nice: number;\n iowait: number;\n irq: number;\n softirq: number;\n steal: number;\n guest: number;\n guestNice: number;\n}\n\nexport interface serverDiskHwInfo {\n addr: string;\n usages: diskUsageStat[];\n partitions: partitionStat[];\n counters: Map;\n error: string;\n}\n\nexport interface diskUsageStat {\n path: string;\n fstype: string;\n total: number;\n free: number;\n used: number;\n usedPercent: number;\n inodesTotal: number;\n inodesUsed: number;\n inodesFree: number;\n inodesUsedPercent: number;\n}\n\nexport interface partitionStat {\n device: string;\n mountpoint: string;\n fstype: string;\n opts: string;\n smartInfo: smartInfo;\n}\n\nexport interface smartInfo {\n device: string;\n scsi: scsiInfo;\n nvme: nvmeInfo;\n ata: ataInfo;\n error: string;\n}\n\nexport interface scsiInfo {\n scsiCapacityBytes: number;\n scsiModeSenseBuf: string;\n scsirespLen: number;\n scsiBdLen: number;\n scsiOffset: number;\n sciRpm: number;\n}\n\nexport interface nvmeInfo {\n serialNum: string;\n vendorId: string;\n firmwareVersion: string;\n modelNum: string;\n spareAvailable: string;\n spareThreshold: string;\n temperature: string;\n criticalWarning: string;\n maxDataTransferPages: number;\n controllerBusyTime: number;\n powerOnHours: number;\n powerCycles: number;\n unsafeShutdowns: number;\n mediaAndDataIntgerityErrors: number;\n dataUnitsReadBytes: number;\n dataUnitsWrittenBytes: number;\n hostReadCommands: number;\n hostWriteCommands: number;\n}\n\nexport interface ataInfo {\n scsiLuWWNDeviceID: string;\n serialNum: string;\n modelNum: string;\n firmwareRevision: string;\n RotationRate: string;\n MajorVersion: string;\n MinorVersion: string;\n smartSupportAvailable: boolean;\n smartSupportEnabled: boolean;\n smartErrorLog: string;\n transport: string;\n}\n\nexport interface diskIOCountersStat {\n readCount: number;\n mergedReadCount: number;\n DriteCount: number;\n mergedWriteCount: number;\n readBytes: number;\n writeBytes: number;\n readTime: number;\n writeTime: number;\n iopsInProgress: number;\n ioTime: number;\n weightedIO: number;\n name: string;\n serialNumber: string;\n label: string;\n}\n\nexport interface serverOsInfo {\n addr: string;\n info: infoStat;\n sensors: temperatureStat[];\n users: userStat[];\n error: string;\n}\n\nexport interface infoStat {\n hostname: string;\n uptime: number;\n bootTime: number;\n procs: number;\n os: string;\n platform: string;\n platformFamily: string;\n platformVersion: string;\n kernelVersion: string;\n kernelArch: string;\n virtualizationSystem: string;\n virtualizationRole: string;\n hostid: string;\n}\n\nexport interface temperatureStat {\n sensorKey: string;\n sensorTemperature: number;\n}\n\nexport interface userStat {\n user: string;\n terminal: string;\n host: string;\n started: number;\n}\n\nexport interface serverMemInfo {\n addr: string;\n swap: swapMemoryStat;\n virtualmem: virtualMemoryStat;\n error: string;\n}\n\nexport interface swapMemoryStat {\n total: number;\n used: number;\n free: number;\n usedPercent: number;\n sin: number;\n sout: number;\n pgin: number;\n pgout: number;\n pgfault: number;\n pgmajfault: number;\n}\n\nexport interface virtualMemoryStat {\n total: number;\n available: number;\n used: number;\n usedPercent: number;\n free: number;\n active: number;\n inactive: number;\n wired: number;\n laundry: number;\n buffers: number;\n cached: number;\n writeback: number;\n dirty: number;\n writebacktmp: number;\n shared: number;\n slab: number;\n sreclaimable: number;\n sunreclaim: number;\n pagetables: number;\n swapcached: number;\n commitlimit: number;\n committedas: number;\n hightotal: number;\n highfree: number;\n lowtotal: number;\n lowfree: number;\n swaptotal: number;\n swapfree: number;\n mapped: number;\n vmalloctotal: number;\n vmallocused: number;\n vmallocchunk: number;\n hugepagestotal: number;\n hugepagesfree: number;\n hugepagesize: number;\n}\n\nexport interface serverProcInfo {\n addr: string;\n processes: sysProcess[];\n error: string;\n}\n\nexport interface sysProcess {\n pid: number;\n background: boolean;\n cpupercent: number;\n children: number[];\n cmd: string;\n connections: nethwConnectionStat[];\n createtime: number;\n cwd: string;\n exe: string;\n gids: number[];\n iocounters: processIOCountersStat;\n isrunning: boolean;\n meminfo: memoryInfoStat;\n memmaps: any[];\n mempercent: number;\n name: string;\n netiocounters: nethwIOCounterStat[];\n nice: number;\n numctxswitches: processNmCtxSwitchesStat;\n numfds: number;\n numthreads: number;\n pagefaults: processPageFaultsStat;\n parent: number;\n ppid: number;\n rlimit: processRLimitStat[];\n status: string;\n tgid: number;\n cputimes: cpuTimeStat;\n uids: number[];\n username: string;\n}\n\nexport interface nethwConnectionStat {\n fd: number;\n family: number;\n type: number;\n localaddr: netAddr;\n remoteaddr: netAddr;\n status: string;\n uids: number[];\n pid: number;\n}\n\nexport interface netAddr {\n ip: string;\n port: number;\n}\n\nexport interface processIOCountersStat {\n readCount: number;\n writeCount: number;\n readBytes: number;\n writeBytes: number;\n}\n\nexport interface memoryInfoStat {\n rss: number;\n vms: number;\n hwm: number;\n data: number;\n stack: number;\n locked: number;\n swap: number;\n}\n\nexport interface nethwIOCounterStat {\n name: string;\n bytesSent: number;\n bytesRecv: number;\n packetsSent: number;\n packetsRecv: number;\n errin: number;\n errout: number;\n dropin: number;\n dropout: number;\n fifoin: number;\n fifoout: number;\n}\n\nexport interface processNmCtxSwitchesStat {\n voluntary: number;\n involuntary: number;\n}\n\nexport interface processPageFaultsStat {\n minorFaults: number;\n majorFaults: number;\n childMinorFaults: number;\n childMajorFaults: number;\n}\n\nexport interface processRLimitStat {\n resource: number;\n soft: number;\n hard: number;\n used: number;\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 .\nimport React, { useState, useEffect } from \"react\";\nimport {\n IMessageEvent,\n w3cwebsocket as W3CWebSocket,\n ICloseEvent,\n} from \"websocket\";\nimport { AppState } from \"../../../store\";\nimport { connect } from \"react-redux\";\nimport { healthInfoMessageReceived, healthInfoResetMessage } from \"./actions\";\nimport {\n HealthInfoMessage,\n DiagStatInProgress,\n DiagStatSuccess,\n DiagStatError,\n} from \"./types\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n wsProtocol,\n WSCloseInternalServerErr,\n WSClosePolicyViolation,\n WSCloseAbnormalClosure,\n} from \"../../../utils/wsUtils\";\nimport {\n actionsTray,\n containerForHeader,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { Grid, Button } from \"@material-ui/core\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { setSnackBarMessage, setServerDiagStat } from \"../../../actions\";\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n logList: {\n background: \"#fff\",\n minHeight: 400,\n height: \"calc(100vh - 270px)\",\n overflow: \"auto\",\n fontSize: 13,\n padding: \"25px 45px\",\n border: \"1px solid #EAEDEE\",\n borderRadius: 4,\n },\n loading: {\n paddingTop: 8,\n paddingLeft: 40,\n },\n buttons: {\n justifyContent: \"flex-start\",\n gap: 20,\n },\n ...actionsTray,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst download = (filename: string, text: string) => {\n let element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:text/plain;charset=utf-8,\" + encodeURIComponent(text)\n );\n element.setAttribute(\"download\", filename);\n\n element.style.display = \"none\";\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n};\n\ninterface IHealthInfo {\n classes: any;\n healthInfoMessageReceived: typeof healthInfoMessageReceived;\n healthInfoResetMessage: typeof healthInfoResetMessage;\n message: HealthInfoMessage;\n namespace: string;\n tenant: string;\n setSnackBarMessage: typeof setSnackBarMessage;\n setServerDiagStat: typeof setServerDiagStat;\n serverDiagnosticStatus: string;\n}\n\nconst HealthInfo = ({\n classes,\n healthInfoMessageReceived,\n healthInfoResetMessage,\n message,\n setSnackBarMessage,\n setServerDiagStat,\n serverDiagnosticStatus,\n}: IHealthInfo) => {\n const [startDiagnostic, setStartDiagnostic] = useState(false);\n const [downloadDisabled, setDownloadDisabled] = useState(true);\n\n useEffect(() => {\n if (\n serverDiagnosticStatus === DiagStatSuccess &&\n message !== ({} as HealthInfoMessage)\n ) {\n // Allow download of diagnostics file only when\n // it succeded fetching all the results and info is not empty.\n setDownloadDisabled(false);\n }\n if (serverDiagnosticStatus === DiagStatInProgress) {\n // Disable Start Diagnotic and Disable Download buttons\n // if a Diagnosis is in progress.\n setDownloadDisabled(true);\n }\n setStartDiagnostic(false);\n }, [serverDiagnosticStatus, message]);\n\n useEffect(() => {\n if (startDiagnostic) {\n healthInfoResetMessage();\n const url = new URL(window.location.toString());\n const isDev = process.env.NODE_ENV === \"development\";\n const port = isDev ? \"9090\" : url.port;\n\n const wsProt = wsProtocol(url.protocol);\n\n const c = new W3CWebSocket(\n `${wsProt}://${url.hostname}:${port}/ws/health-info?deadline=1h`\n );\n\n let interval: any | null = null;\n if (c !== null) {\n c.onopen = () => {\n console.log(\"WebSocket Client Connected\");\n c.send(\"ok\");\n interval = setInterval(() => {\n c.send(\"ok\");\n }, 10 * 1000);\n setSnackBarMessage(\n \"Diagnostic started. Please do not refresh page during diagnosis.\"\n );\n setServerDiagStat(DiagStatInProgress);\n };\n c.onmessage = (message: IMessageEvent) => {\n let m: HealthInfoMessage = JSON.parse(message.data.toString());\n m.timestamp = new Date(m.timestamp.toString());\n healthInfoMessageReceived(m);\n };\n c.onerror = (error: Error) => {\n console.log(\"error closing websocket:\", error.message);\n c.close(1000);\n clearInterval(interval);\n setServerDiagStat(DiagStatError);\n };\n c.onclose = (event: ICloseEvent) => {\n clearInterval(interval);\n if (\n event.code === WSCloseInternalServerErr ||\n event.code === WSClosePolicyViolation ||\n event.code === WSCloseAbnormalClosure\n ) {\n // handle close with error\n console.log(\"connection closed by server with code:\", event.code);\n setSnackBarMessage(\n \"An error occurred while getting Diagnostic file.\"\n );\n setServerDiagStat(DiagStatError);\n } else {\n console.log(\"connection closed by server\");\n setSnackBarMessage(\"Diagnostic file is ready to be downloaded.\");\n setServerDiagStat(DiagStatSuccess);\n }\n };\n }\n } else {\n // reset start status\n setStartDiagnostic(false);\n }\n }, [\n healthInfoMessageReceived,\n healthInfoResetMessage,\n startDiagnostic,\n setSnackBarMessage,\n setServerDiagStat,\n ]);\n\n return (\n \n \n\n \n \n \n \n setStartDiagnostic(true)}\n >\n Start Diagnostic\n \n \n \n {serverDiagnosticStatus === DiagStatInProgress ? (\n
\n \n
\n ) : (\n {\n download(\n \"diagnostic.json\",\n JSON.stringify(message, null, 2)\n );\n }}\n disabled={downloadDisabled}\n >\n Download\n \n )}\n
\n
\n
\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n message: state.healthInfo.message,\n serverDiagnosticStatus: state.system.serverDiagnosticStatus,\n});\n\nconst connector = connect(mapState, {\n healthInfoMessageReceived: healthInfoMessageReceived,\n healthInfoResetMessage: healthInfoResetMessage,\n setSnackBarMessage,\n setServerDiagStat,\n});\n\nexport default connector(withStyles(styles)(HealthInfo));\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, useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Grid, InputAdornment, TextField } from \"@material-ui/core\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { IPVCsResponse, IStoragePVCs } from \"./types\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\n\ninterface IStorageVolumesProps {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerLabel: {\n fontSize: 22,\n fontWeight: 600,\n color: \"#000\",\n marginTop: 4,\n },\n breadcrumLink: {\n textDecoration: \"none\",\n color: \"black\",\n },\n tableWrapper: {\n height: \"calc(100vh - 267px)\",\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst StorageVolumes = ({\n classes,\n setErrorSnackMessage,\n}: IStorageVolumesProps) => {\n const [records, setRecords] = useState([]);\n const [filter, setFilter] = useState(\"\");\n const [loading, setLoading] = useState(true);\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\"GET\", `/api/v1/list-pvcs`)\n .then((res: IPVCsResponse) => {\n let volumes = get(res, \"pvcs\", []);\n setRecords(volumes);\n setLoading(false);\n })\n .catch((err) => {\n setLoading(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loading, setErrorSnackMessage]);\n\n const filteredRecords: IStoragePVCs[] = records.filter((elementItem) =>\n elementItem.name.includes(filter)\n );\n\n return (\n \n \n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n \n \n
\n
\n \n \n \n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(StorageVolumes));\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\nexport const DIRECT_CSI_SELECT_DRIVE = \"DIRECT_CSI/SELECT_DRIVE\";\n\nexport interface IDirectCSIDrives {\n joinName: string;\n drive: string;\n capacity: string;\n allocated: string;\n volumes: number;\n node: string;\n status: \"Available\" | \"Unavailable\" | \"InUse\" | \"Ready\" | \"Terminating\";\n}\n\nexport interface IDirectCSIVolumes {\n volume: string;\n capacity: string;\n node: string;\n drive: string;\n}\n\nexport interface IDrivesResponse {\n drives: IDirectCSIDrives[];\n}\n\nexport interface IVolumesResponse {\n volumes: IDirectCSIVolumes[];\n}\n\nexport interface IDirectCSIFormatResult {\n formatIssuesList: IDirectCSIFormatResItem[];\n}\n\nexport interface IDirectCSIFormatResItem {\n node: string;\n drive: string;\n error: string;\n}\n\ninterface SelectDrive {\n type: typeof DIRECT_CSI_SELECT_DRIVE;\n driveName: string;\n}\n\nexport interface IDirectCSIState {\n selectedDrive: string;\n}\n\nexport type DirectCSITypes = SelectDrive;\n","// This file is part of MinIO Kubernetes Cloud\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, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n Grid,\n LinearProgress,\n} from \"@material-ui/core\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport PredefinedList from \"../Common/FormComponents/PredefinedList/PredefinedList\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport { IDirectCSIFormatResItem, IDirectCSIFormatResult } from \"./types\";\n\ninterface IFormatAllDrivesProps {\n closeFormatModalAndRefresh: (\n refresh: boolean,\n formatIssuesList: IDirectCSIFormatResItem[]\n ) => void;\n deleteOpen: boolean;\n allDrives: boolean;\n drivesToFormat: string[];\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst FormatDrives = ({\n closeFormatModalAndRefresh,\n deleteOpen,\n allDrives,\n drivesToFormat,\n setErrorSnackMessage,\n}: IFormatAllDrivesProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n const [formatAll, setFormatAll] = useState(\"\");\n const [force, setForce] = useState(false);\n\n const removeRecord = () => {\n if (deleteLoading) {\n return;\n }\n setDeleteLoading(true);\n api\n .invoke(\"POST\", `/api/v1/direct-csi/drives/format`, {\n drives: drivesToFormat,\n force,\n })\n .then((res: IDirectCSIFormatResult) => {\n setDeleteLoading(false);\n closeFormatModalAndRefresh(true, res.formatIssuesList);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n };\n return (\n {\n closeFormatModalAndRefresh(false, []);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n \n Format {allDrives ? \"All \" : \"\"}Drives\n \n \n \n {!allDrives && (\n \n 1 ? \"s\" : \"\"}`}\n content={drivesToFormat.join(\", \")}\n />\n
\n
\n )}\n \n ) => {\n setForce(event.target.checked);\n }}\n label={\"Force Format\"}\n indicatorLabels={[\"Yes\", \"No\"]}\n />\n \n Are you sure you want to format{\" \"}\n {allDrives ? All : \"the selected\"} drive\n {drivesToFormat.length > 1 || allDrives ? \"s\" : \"\"}?.\n
\n
\n \n All information contained will be erased and cannot be recovered\n \n
\n
\n To continue please type YES, PROCEED in the box.\n \n ) => {\n setFormatAll(event.target.value);\n }}\n label=\"\"\n value={formatAll}\n />\n \n
\n
\n {deleteLoading && }\n \n {\n closeFormatModalAndRefresh(false, []);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n \n Format Drive{drivesToFormat.length > 1 || allDrives ? \"s\" : \"\"}\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(FormatDrives);\n","// This file is part of MinIO Kubernetes Cloud\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 {\n Button,\n createStyles,\n Grid,\n Theme,\n withStyles,\n} from \"@material-ui/core\";\nimport React from \"react\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport { IDirectCSIFormatResItem } from \"./types\";\n\ninterface IFormatErrorsProps {\n open: boolean;\n onCloseFormatErrorsList: () => void;\n errorsList: IDirectCSIFormatResItem[];\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n warningBlock: {\n color: \"red\",\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n errorsList: {\n height: \"calc(100vh - 280px)\",\n },\n });\n\nconst download = (filename: string, text: string) => {\n let element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:application/json;charset=utf-8,\" + encodeURIComponent(text)\n );\n console.log(filename);\n element.setAttribute(\"download\", filename);\n\n element.style.display = \"none\";\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n};\n\nconst FormatErrorsResult = ({\n open,\n onCloseFormatErrorsList,\n errorsList,\n classes,\n}: IFormatErrorsProps) => {\n return (\n \n \n \n There were some issues trying to format the selected CSI Drives,\n please fix the issues and try again.\n
\n \n
\n \n {\n download(\"csiFormatErrors.json\", JSON.stringify([...errorsList]));\n }}\n color=\"primary\"\n >\n Download\n \n \n \n
\n \n );\n};\n\nexport default withStyles(styles)(FormatErrorsResult);\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, useState, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n Button,\n Grid,\n InputAdornment,\n TextField,\n IconButton,\n} from \"@material-ui/core\";\nimport get from \"lodash/get\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport GroupIcon from \"@material-ui/icons/Group\";\nimport RefreshIcon from \"@material-ui/icons/Refresh\";\nimport { CreateIcon } from \"../../../icons\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport {\n IDirectCSIDrives,\n IDirectCSIFormatResItem,\n IDrivesResponse,\n} from \"./types\";\nimport { niceBytes } from \"../../../common/utils\";\nimport { selectDrive } from \"./actions\";\nimport api from \"../../../common/api\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport FormatDrives from \"./FormatDrives\";\nimport FormatErrorsResult from \"./FormatErrorsResult\";\n\ninterface IDirectCSIMain {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n selectDrive: typeof selectDrive;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerLabel: {\n fontSize: 22,\n fontWeight: 600,\n color: \"#000\",\n marginTop: 4,\n },\n tableWrapper: {\n height: \"calc(100vh - 275px)\",\n },\n notAvailableNotice: {\n border: \"#EAEDEE 1px solid\",\n backgroundColor: \"#FFF\",\n display: \"flex\",\n padding: \"19px 38px\",\n overflow: \"auto\",\n position: \"relative\",\n boxShadow: \"none\",\n minHeight: 200,\n overflowY: \"scroll\",\n borderRadius: 3,\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: \"calc(100vh - 275px)\",\n fontSize: 18,\n fontWeight: 600,\n textAlign: \"center\",\n },\n linkItem: {\n display: \"default\",\n color: \"#072F51\",\n textDecoration: \"none\",\n \"&:hover\": {\n textDecoration: \"underline\",\n color: \"#000\",\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst DirectCSIMain = ({\n classes,\n selectDrive,\n setErrorSnackMessage,\n}: IDirectCSIMain) => {\n const [records, setRecords] = useState([]);\n const [filter, setFilter] = useState(\"\");\n const [checkedDrives, setCheckedDrives] = useState([]);\n const [loading, setLoading] = useState(true);\n const [formatOpen, setFormatOpen] = useState(false);\n const [formatAll, setFormatAll] = useState(false);\n const [formatErrorsResult, setFormatErrorsResult] = useState<\n IDirectCSIFormatResItem[]\n >([]);\n const [formatErrorsOpen, setFormatErrorsOpen] = useState(false);\n const [drivesToFormat, setDrivesToFormat] = useState([]);\n const [notAvailable, setNotAvailable] = useState(true);\n\n useEffect(() => {\n if (loading && !notAvailable) {\n api\n .invoke(\"GET\", \"/api/v1/direct-csi/drives\")\n .then((res: IDrivesResponse) => {\n let drives: IDirectCSIDrives[] = get(res, \"drives\", []);\n\n if (!drives) {\n drives = [];\n }\n\n drives = drives.map((item) => {\n const newItem = { ...item };\n newItem.joinName = `${newItem.node}:${newItem.drive}`;\n\n return newItem;\n });\n\n drives.sort((d1, d2) => {\n if (d1.drive > d2.drive) {\n return 1;\n }\n\n if (d1.drive < d2.drive) {\n return -1;\n }\n\n return 0;\n });\n\n setRecords(drives);\n setLoading(false);\n setNotAvailable(false);\n })\n .catch((err) => {\n setLoading(false);\n setNotAvailable(true);\n });\n }\n }, [loading, setErrorSnackMessage, notAvailable]);\n\n const formatAllDrives = () => {\n const allDrives = records.map((item) => {\n return `${item.node}:${item.drive}`;\n });\n setFormatAll(true);\n setDrivesToFormat(allDrives);\n setFormatOpen(true);\n };\n\n const formatSingleUnit = (driveID: string) => {\n const selectedUnit = [driveID];\n setDrivesToFormat(selectedUnit);\n setFormatAll(false);\n setFormatOpen(true);\n };\n\n const formatSelectedDrives = () => {\n if (checkedDrives.length > 0) {\n setDrivesToFormat(checkedDrives);\n setFormatAll(false);\n setFormatOpen(true);\n }\n };\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[] = [...checkedDrives]; // We clone the checkedDrives array\n\n if (checked) {\n // If the user has checked this field we need to push this to checkedDrivesList\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\n setCheckedDrives(elements);\n\n return elements;\n };\n\n const closeFormatModal = (\n refresh: boolean,\n errorsList: IDirectCSIFormatResItem[]\n ) => {\n setFormatOpen(false);\n if (refresh) {\n // Errors are present, we trigger the modal box to show these changes.\n if (errorsList && errorsList.length > 0) {\n setFormatErrorsResult(errorsList);\n setFormatErrorsOpen(true);\n }\n setLoading(true);\n setCheckedDrives([]);\n }\n };\n\n const tableActions = [\n {\n type: \"format\",\n onClick: formatSingleUnit,\n sendOnlyId: true,\n },\n ];\n\n const filteredRecords: IDirectCSIDrives[] = records.filter((elementItem) =>\n elementItem.drive.includes(filter)\n );\n\n return (\n \n {formatOpen && (\n \n )}\n\n {formatErrorsOpen && (\n {\n setFormatErrorsOpen(false);\n }}\n />\n )}\n\n \n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n disabled={notAvailable}\n />\n {\n setLoading(true);\n }}\n disabled={notAvailable}\n >\n \n \n }\n disabled={checkedDrives.length <= 0 || notAvailable}\n onClick={formatSelectedDrives}\n >\n Format Selected Drives\n \n }\n onClick={formatAllDrives}\n disabled={notAvailable}\n >\n Format All Drives\n \n \n\n \n
\n
\n \n {notAvailable ? (\n
\n To manage locally attached drives you need to install direct-csi,\n for more information\n
\n please follow this\n \n Link\n \n
\n ) : (\n \n )}\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n selectDrive,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(DirectCSIMain));\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 { DIRECT_CSI_SELECT_DRIVE } from \"./types\";\n\nexport const selectDrive = (driveName: string) => {\n return {\n type: DIRECT_CSI_SELECT_DRIVE,\n driveName,\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, { Fragment, useState, useEffect } from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Grid, Tab, Tabs } from \"@material-ui/core\";\nimport { Route, Router, Switch, Redirect } from \"react-router-dom\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport history from \"../../../history\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport StoragePVCs from \"./StoragePVCs\";\nimport DirectCSIDrives from \"../DirectCSI/DirectCSIDrives\";\n\ninterface IStorageProps {\n classes: any;\n match: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerLabel: {\n fontSize: 22,\n fontWeight: 600,\n color: \"#000\",\n marginTop: 4,\n },\n tabsContainer: {\n marginBottom: 15,\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst routes = [\"/storage/volumes\", \"/storage/drives\"];\n\nconst Storage = ({ classes, match }: IStorageProps) => {\n const [selectedTab, setSelectedTab] = useState(0);\n\n useEffect(() => {\n const index = routes.findIndex((route) => route === match.path);\n setSelectedTab(index);\n }, [match]);\n\n const routeChange = (e: React.ChangeEvent<{}>, newValue: number) => {\n history.push(routes[newValue]);\n };\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n } />\n \n \n \n \n \n );\n};\n\nexport default withStyles(styles)(Storage);\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, useState, useEffect } from \"react\";\nimport clsx from \"clsx\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport CssBaseline from \"@material-ui/core/CssBaseline\";\nimport Drawer from \"@material-ui/core/Drawer\";\nimport Container from \"@material-ui/core/Container\";\nimport Snackbar from \"@material-ui/core/Snackbar\";\nimport history from \"../../history\";\nimport { Redirect, Route, Router, Switch } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../store\";\nimport {\n serverIsLoading,\n serverNeedsRestart,\n setMenuOpen,\n setSnackBarMessage,\n} from \"../../actions\";\nimport { ISessionResponse } from \"./types\";\nimport { snackBarMessage } from \"../../types\";\nimport { snackBarCommon } from \"./Common/FormComponents/common/styleLibrary\";\nimport Buckets from \"./Buckets/Buckets\";\nimport Policies from \"./Policies/Policies\";\nimport Dashboard from \"./Dashboard/Dashboard\";\nimport Menu from \"./Menu/Menu\";\nimport api from \"../../common/api\";\nimport Account from \"./Account/Account\";\nimport Users from \"./Users/Users\";\nimport Groups from \"./Groups/Groups\";\nimport ConfigurationMain from \"./Configurations/ConfigurationMain\";\nimport WebhookPanel from \"./Configurations/ConfigurationPanels/WebhookPanel\";\nimport TenantsMain from \"./Tenants/TenantsMain\";\nimport TenantDetails from \"./Tenants/TenantDetails/TenantDetails\";\nimport ObjectBrowser from \"./ObjectBrowser/ObjectBrowser\";\nimport ObjectRouting from \"./Buckets/ListBuckets/Objects/ListObjects/ObjectRouting\";\nimport License from \"./License/License\";\nimport Trace from \"./Trace/Trace\";\nimport LogsMain from \"./Logs/LogsMain\";\nimport Heal from \"./Heal/Heal\";\nimport Watch from \"./Watch/Watch\";\nimport HealthInfo from \"./HealthInfo/HealthInfo\";\nimport Storage from \"./Storage/Storage\";\n\nconst drawerWidth = 245;\n\nconst styles = (theme: Theme) =>\n createStyles({\n root: {\n display: \"flex\",\n \"& .MuiPaper-root.MuiSnackbarContent-root\": {\n borderRadius: \"0px 0px 5px 5px\",\n boxShadow: \"none\",\n },\n },\n toolbar: {\n background: theme.palette.background.default,\n color: \"black\",\n paddingRight: 24, // keep right padding when drawer closed\n },\n toolbarIcon: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n padding: \"0 8px\",\n ...theme.mixins.toolbar,\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n },\n appBarShift: {\n marginLeft: drawerWidth,\n width: `calc(100% - ${drawerWidth}px)`,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n menuButton: {\n marginRight: 36,\n },\n menuButtonHidden: {\n display: \"none\",\n },\n title: {\n flexGrow: 1,\n },\n drawerPaper: {\n position: \"relative\",\n whiteSpace: \"nowrap\",\n width: drawerWidth,\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n overflowX: \"hidden\",\n background:\n \"transparent linear-gradient(90deg, #073052 0%, #081C42 100%) 0% 0% no-repeat padding-box\",\n boxShadow: \"0px 3px 7px #00000014\",\n },\n drawerPaperClose: {\n overflowX: \"hidden\",\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n width: theme.spacing(7),\n [theme.breakpoints.up(\"sm\")]: {\n width: theme.spacing(9),\n },\n },\n content: {\n flexGrow: 1,\n height: \"100vh\",\n overflow: \"auto\",\n position: \"relative\",\n },\n container: {\n paddingBottom: theme.spacing(4),\n margin: 0,\n width: \"100%\",\n maxWidth: \"initial\",\n },\n paper: {\n padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n fixedHeight: {\n minHeight: 240,\n },\n warningBar: {\n background: theme.palette.primary.main,\n color: \"white\",\n heigh: \"60px\",\n widht: \"100%\",\n lineHeight: \"60px\",\n textAlign: \"center\",\n },\n progress: {\n height: \"3px\",\n backgroundColor: \"#eaeaea\",\n },\n ...snackBarCommon,\n });\n\ninterface IConsoleProps {\n open: boolean;\n needsRestart: boolean;\n isServerLoading: boolean;\n title: string;\n classes: any;\n setMenuOpen: typeof setMenuOpen;\n serverNeedsRestart: typeof serverNeedsRestart;\n serverIsLoading: typeof serverIsLoading;\n session: ISessionResponse;\n loadingProgress: number;\n snackBarMessage: snackBarMessage;\n setSnackBarMessage: typeof setSnackBarMessage;\n}\n\nconst Console = ({\n classes,\n open,\n needsRestart,\n isServerLoading,\n serverNeedsRestart,\n serverIsLoading,\n session,\n loadingProgress,\n snackBarMessage,\n setSnackBarMessage,\n}: IConsoleProps) => {\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n const restartServer = () => {\n serverIsLoading(true);\n api\n .invoke(\"POST\", \"/api/v1/service/restart\", {})\n .then((res) => {\n console.log(\"success restarting service\");\n console.log(res);\n serverIsLoading(false);\n serverNeedsRestart(false);\n })\n .catch((err) => {\n serverIsLoading(false);\n console.log(\"failure restarting service\");\n console.log(err);\n });\n };\n\n const allowedPages = session.pages.reduce(\n (result: any, item: any, index: any) => {\n result[item] = true;\n return result;\n },\n {}\n );\n const routes = [\n {\n component: Dashboard,\n path: \"/dashboard\",\n },\n {\n component: Buckets,\n path: \"/buckets\",\n },\n {\n component: Buckets,\n path: \"/buckets/:bucketName\",\n },\n {\n component: ObjectBrowser,\n path: \"/object-browser\",\n },\n {\n component: ObjectRouting,\n path: \"/object-browser/:bucket\",\n },\n {\n component: ObjectRouting,\n path: \"/object-browser/:bucket/*\",\n },\n {\n component: Watch,\n path: \"/watch\",\n },\n {\n component: Users,\n path: \"/users/:userName\",\n },\n {\n component: Users,\n path: \"/users\",\n },\n {\n component: Groups,\n path: \"/groups\",\n },\n {\n component: Policies,\n path: \"/policies/:policyName\",\n },\n {\n component: Policies,\n path: \"/policies\",\n },\n {\n component: Heal,\n path: \"/heal\",\n },\n {\n component: Trace,\n path: \"/trace\",\n },\n {\n component: LogsMain,\n path: \"/logs\",\n },\n {\n component: HealthInfo,\n path: \"/health-info\",\n },\n {\n component: ConfigurationMain,\n path: \"/settings\",\n },\n {\n component: Account,\n path: \"/account\",\n props: {\n changePassword: session.pages.includes(\"/account/change-password\"),\n },\n },\n {\n component: WebhookPanel,\n path: \"/webhook/logger\",\n },\n {\n component: WebhookPanel,\n path: \"/webhook/audit\",\n },\n {\n component: TenantsMain,\n path: \"/tenants\",\n },\n {\n component: Storage,\n path: \"/storage\",\n },\n {\n component: Storage,\n path: \"/storage/volumes\",\n },\n {\n component: Storage,\n path: \"/storage/drives\",\n },\n {\n component: TenantDetails,\n path: \"/namespaces/:tenantNamespace/tenants/:tenantName\",\n },\n {\n component: License,\n path: \"/license\",\n },\n ];\n const allowedRoutes = routes.filter((route: any) => allowedPages[route.path]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n setSnackBarMessage(\"\");\n };\n\n useEffect(() => {\n if (snackBarMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n setOpenSnackbar(true);\n }, [snackBarMessage]);\n\n return (\n \n {session.status === \"ok\" ? (\n
\n \n \n \n \n\n
\n {needsRestart && (\n
\n {isServerLoading ? (\n \n The server is restarting.\n \n \n ) : (\n \n The instance needs to be restarted for configuration changes\n to take effect.{\" \"}\n {\n restartServer();\n }}\n >\n Restart\n \n \n )}\n
\n )}\n {loadingProgress < 100 && (\n \n )}\n
\n {\n closeSnackBar();\n }}\n autoHideDuration={\n snackBarMessage.type === \"error\" ? 10000 : 5000\n }\n message={snackBarMessage.message}\n className={classes.snackBarExternal}\n ContentProps={{\n className: `${classes.snackBar} ${\n snackBarMessage.type === \"error\"\n ? classes.errorSnackBar\n : \"\"\n }`,\n }}\n />\n
\n \n \n \n {allowedRoutes.map((route: any) => (\n (\n \n )}\n />\n ))}\n {allowedRoutes.length > 0 ? (\n \n ) : null}\n \n \n \n
\n
\n ) : null}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n open: state.system.sidebarOpen,\n needsRestart: state.system.serverNeedsRestart,\n isServerLoading: state.system.serverIsLoading,\n session: state.console.session,\n loadingProgress: state.system.loadingProgress,\n snackBarMessage: state.system.snackBar,\n});\n\nconst connector = connect(mapState, {\n setMenuOpen,\n serverNeedsRestart,\n serverIsLoading,\n setSnackBarMessage,\n});\n\nexport default withStyles(styles)(connector(Console));\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, { FC, useEffect, useState } from \"react\"; // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { RouteComponentProps } from \"react-router\";\nimport storage from \"local-storage-fallback\";\nimport api from \"../../common/api\";\n\nconst LoginCallback: FC = ({ location }) => {\n const [error, setError] = useState(\"\");\n const [errorDescription, setErrorDescription] = useState(\"\");\n useEffect(() => {\n const code = (location.search.match(/code=([^&]+)/) || [])[1];\n const state = (location.search.match(/state=([^&]+)/) || [])[1];\n const error = (location.search.match(/error=([^&]+)/) || [])[1];\n const errorDescription = (location.search.match(\n /error_description=([^&]+)/\n ) || [])[1];\n if (error !== undefined || errorDescription !== undefined) {\n setError(error);\n setErrorDescription(errorDescription);\n } else {\n api\n .invoke(\"POST\", \"/api/v1/login/oauth2/auth\", { code, state })\n .then((res: any) => {\n if (res && res.sessionId) {\n // store the jwt token\n storage.setItem(\"token\", res.sessionId);\n // We push to history the new URL.\n window.location.href = \"/\";\n }\n })\n .catch((res: any) => {\n window.location.href = \"/login\";\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }\n }, [location.search]);\n return error !== \"\" || errorDescription !== \"\" ? (\n
\n

IDP Error:

\n

{error}

\n

{errorDescription}

\n
\n ) : null;\n};\n\nexport default LoginCallback;\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 { ISessionResponse } from \"./types\";\n\nexport const SESSION_RESPONSE = \"SESSION_RESPONSE\";\n\ninterface SessionAction {\n type: typeof SESSION_RESPONSE;\n message: ISessionResponse;\n}\nexport type SessionActionTypes = SessionAction;\n\nexport function saveSessionResponse(message: ISessionResponse) {\n return {\n type: SESSION_RESPONSE,\n message: message,\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, { useEffect, useState } from \"react\";\nimport { Redirect } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"./store\";\nimport { consoleOperatorMode, userLoggedIn } from \"./actions\";\nimport api from \"./common/api\";\nimport { saveSessionResponse } from \"./screens/Console/actions\";\nimport { ISessionResponse } from \"./screens/Console/types\";\n\nconst mapState = (state: AppState) => ({\n loggedIn: state.system.loggedIn,\n});\n\nconst connector = connect(mapState, {\n userLoggedIn,\n consoleOperatorMode,\n saveSessionResponse,\n});\n\ninterface ProtectedRouteProps {\n loggedIn: boolean;\n Component: any;\n userLoggedIn: typeof userLoggedIn;\n consoleOperatorMode: typeof consoleOperatorMode;\n saveSessionResponse: typeof saveSessionResponse;\n}\n\nconst ProtectedRoute = ({\n Component,\n loggedIn,\n userLoggedIn,\n consoleOperatorMode,\n saveSessionResponse,\n}: ProtectedRouteProps) => {\n const [sessionLoading, setSessionLoading] = useState(true);\n useEffect(() => {\n api\n .invoke(\"GET\", `/api/v1/session`)\n .then((res: ISessionResponse) => {\n saveSessionResponse(res);\n userLoggedIn(true);\n setSessionLoading(false);\n // check for tenants presence, that indicates we are in operator mode\n if (res.operator) {\n consoleOperatorMode(true);\n document.title = \"MinIO Operator\";\n }\n })\n .catch(() => setSessionLoading(false));\n }, [saveSessionResponse, consoleOperatorMode, userLoggedIn]);\n\n // if we still trying to retrieve user session render nothing\n if (sessionLoading) {\n return null;\n }\n // redirect user to the right page based on session status\n return loggedIn ? : ;\n};\n\nexport default connector(ProtectedRoute);\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 from \"react\";\nimport { Route, Router, Switch } from \"react-router-dom\";\nimport history from \"./history\";\nimport Login from \"./screens/LoginPage/LoginPage\";\nimport Console from \"./screens/Console/Console\";\nimport LoginCallback from \"./screens/LoginPage/LoginCallback\";\nimport { hot } from \"react-hot-loader/root\";\nimport ProtectedRoute from \"./ProtectedRoutes\";\n\nconst Routes = () => {\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default hot(Routes);\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 {\n MENU_OPEN,\n OPERATOR_MODE,\n SERVER_IS_LOADING,\n SERVER_NEEDS_RESTART,\n SystemActionTypes,\n SystemState,\n USER_LOGGED,\n SET_LOADING_PROGRESS,\n SET_SNACK_BAR_MESSAGE,\n SET_ERROR_SNACK_MESSAGE,\n SET_SERVER_DIAG_STAT,\n SET_SNACK_MODAL_MESSAGE,\n SET_MODAL_ERROR_MESSAGE,\n} from \"./types\";\n\nconst initialState: SystemState = {\n loggedIn: false,\n operatorMode: false,\n session: \"\",\n userName: \"\",\n sidebarOpen: true,\n serverNeedsRestart: false,\n serverIsLoading: false,\n loadingProgress: 100,\n snackBar: {\n message: \"\",\n type: \"message\",\n },\n modalSnackBar: {\n message: \"\",\n type: \"message\",\n },\n serverDiagnosticStatus: \"\",\n};\n\nexport function systemReducer(\n state = initialState,\n action: SystemActionTypes\n): SystemState {\n switch (action.type) {\n case USER_LOGGED:\n return {\n ...state,\n loggedIn: action.logged,\n };\n case OPERATOR_MODE:\n return {\n ...state,\n operatorMode: action.operatorMode,\n };\n case MENU_OPEN:\n return {\n ...state,\n sidebarOpen: action.open,\n };\n case SERVER_NEEDS_RESTART:\n return {\n ...state,\n serverNeedsRestart: action.needsRestart,\n };\n\n case SERVER_IS_LOADING:\n return {\n ...state,\n serverIsLoading: action.isLoading,\n };\n case SET_LOADING_PROGRESS:\n return {\n ...state,\n loadingProgress: action.loadingProgress,\n };\n case SET_SNACK_BAR_MESSAGE:\n return {\n ...state,\n snackBar: { message: action.message, type: \"message\" },\n };\n case SET_ERROR_SNACK_MESSAGE:\n return {\n ...state,\n snackBar: { message: action.message, type: \"error\" },\n };\n case SET_SNACK_MODAL_MESSAGE:\n return {\n ...state,\n modalSnackBar: { message: action.message, type: \"message\" },\n };\n case SET_MODAL_ERROR_MESSAGE:\n return {\n ...state,\n modalSnackBar: { message: action.message, type: \"error\" },\n };\n case SET_SERVER_DIAG_STAT:\n return {\n ...state,\n serverDiagnosticStatus: action.serverDiagnosticStatus,\n };\n default:\n return state;\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 {\n TRACE_MESSAGE_RECEIVED,\n TRACE_RESET_MESSAGES,\n TraceActionTypes,\n} from \"./actions\";\nimport { TraceMessage } from \"./types\";\n\nexport interface TraceState {\n messages: TraceMessage[];\n}\n\nconst initialState: TraceState = {\n messages: [],\n};\n\nexport function traceReducer(\n state = initialState,\n action: TraceActionTypes\n): TraceState {\n switch (action.type) {\n case TRACE_MESSAGE_RECEIVED:\n return {\n ...state,\n messages: [...state.messages, action.message],\n };\n case TRACE_RESET_MESSAGES:\n return {\n ...state,\n messages: [],\n };\n default:\n return state;\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 {\n LOG_MESSAGE_RECEIVED,\n LOG_RESET_MESSAGES,\n LogActionTypes,\n} from \"./actions\";\nimport { LogMessage } from \"./types\";\n\nexport interface LogState {\n messages: LogMessage[];\n}\n\nconst initialState: LogState = {\n messages: [],\n};\n\nexport function logReducer(\n state = initialState,\n action: LogActionTypes\n): LogState {\n switch (action.type) {\n case LOG_MESSAGE_RECEIVED:\n return {\n ...state,\n messages: [...state.messages, action.message],\n };\n case LOG_RESET_MESSAGES:\n return {\n ...state,\n messages: [],\n };\n default:\n return state;\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 {\n HEALTH_INFO_MESSAGE_RECEIVED,\n HEALTH_INFO_RESET_MESSAGE,\n HealthInfoActionTypes,\n} from \"./actions\";\nimport { HealthInfoMessage } from \"./types\";\n\nexport interface HealthInfoState {\n message: HealthInfoMessage;\n}\n\nconst initialState: HealthInfoState = {\n message: {} as HealthInfoMessage,\n};\n\nexport function healthInfoReducer(\n state = initialState,\n action: HealthInfoActionTypes\n): HealthInfoState {\n switch (action.type) {\n case HEALTH_INFO_MESSAGE_RECEIVED:\n return {\n ...state,\n message: action.message,\n };\n case HEALTH_INFO_RESET_MESSAGE:\n return {\n ...state,\n message: {} as HealthInfoMessage,\n };\n default:\n return state;\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 {\n WATCH_MESSAGE_RECEIVED,\n WATCH_RESET_MESSAGES,\n WatchActionTypes,\n} from \"./actions\";\nimport { EventInfo } from \"./types\";\n\nexport interface WatchState {\n messages: EventInfo[];\n}\n\nconst initialState: WatchState = {\n messages: [],\n};\n\nexport function watchReducer(\n state = initialState,\n action: WatchActionTypes\n): WatchState {\n switch (action.type) {\n case WATCH_MESSAGE_RECEIVED:\n return {\n ...state,\n messages: [...state.messages, action.message],\n };\n case WATCH_RESET_MESSAGES:\n return {\n ...state,\n messages: [],\n };\n default:\n return state;\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 { ISessionResponse } from \"./types\";\nimport { SessionActionTypes, SESSION_RESPONSE } from \"./actions\";\n\nexport interface ConsoleState {\n session: ISessionResponse;\n}\n\nconst initialState: ConsoleState = {\n session: {\n operator: false,\n status: \"\",\n pages: [],\n features: [],\n },\n};\n\nexport function consoleReducer(\n state = initialState,\n action: SessionActionTypes\n): ConsoleState {\n switch (action.type) {\n case SESSION_RESPONSE:\n return {\n ...state,\n session: action.message,\n };\n default:\n return state;\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 {\n ADD_BUCKET_NAME,\n ADD_BUCKET_OPEN,\n ADD_BUCKET_QUOTA,\n ADD_BUCKET_QUOTA_SIZE,\n ADD_BUCKET_QUOTA_TYPE,\n ADD_BUCKET_QUOTA_UNIT,\n ADD_BUCKET_RESET,\n ADD_BUCKET_VERSIONED,\n ADD_BUCKET_RETENTION,\n ADD_BUCKET_RETENTION_MODE,\n ADD_BUCKET_RETENTION_UNIT,\n ADD_BUCKET_RETENTION_VALIDITY,\n BucketActionTypes,\n ADD_BUCKET_LOCKING,\n} from \"./actions\";\n\nexport interface BucketsState {\n open: boolean;\n addBucketName: string;\n addBucketVersioningEnabled: boolean;\n addBucketLockingEnabled: boolean;\n addBucketQuotaEnabled: boolean;\n addBucketQuotaType: string;\n addBucketQuotaSize: string;\n addBucketQuotaUnit: string;\n addBucketRetentionEnabled: boolean;\n addBucketRetentionMode: string;\n addBucketRetentionUnit: string;\n addBucketRetentionValidity: number;\n}\n\nconst initialState: BucketsState = {\n open: false,\n addBucketName: \"\",\n addBucketVersioningEnabled: false,\n addBucketLockingEnabled: false,\n addBucketQuotaEnabled: false,\n addBucketQuotaType: \"hard\",\n addBucketQuotaSize: \"1\",\n addBucketQuotaUnit: \"TiB\",\n addBucketRetentionEnabled: false,\n addBucketRetentionMode: \"compliance\",\n addBucketRetentionUnit: \"days\",\n addBucketRetentionValidity: 1,\n};\n\nexport function bucketsReducer(\n state = initialState,\n action: BucketActionTypes\n): BucketsState {\n switch (action.type) {\n case ADD_BUCKET_OPEN:\n return {\n ...state,\n open: action.open,\n };\n case ADD_BUCKET_NAME:\n return {\n ...state,\n addBucketName: action.name,\n };\n case ADD_BUCKET_VERSIONED:\n return {\n ...state,\n addBucketVersioningEnabled: action.versioned,\n };\n case ADD_BUCKET_LOCKING:\n return {\n ...state,\n addBucketLockingEnabled: action.locking,\n };\n case ADD_BUCKET_QUOTA:\n return {\n ...state,\n addBucketQuotaEnabled: action.quota,\n };\n case ADD_BUCKET_QUOTA_TYPE:\n return {\n ...state,\n addBucketQuotaType: action.quotaType,\n };\n case ADD_BUCKET_QUOTA_SIZE:\n return {\n ...state,\n addBucketQuotaSize: action.quotaSize,\n };\n case ADD_BUCKET_QUOTA_UNIT:\n return {\n ...state,\n addBucketQuotaUnit: action.quotaUnit,\n };\n case ADD_BUCKET_RETENTION:\n return {\n ...state,\n addBucketRetentionEnabled: action.retention,\n };\n case ADD_BUCKET_RETENTION_MODE:\n return {\n ...state,\n addBucketRetentionMode: action.retentionMode,\n };\n case ADD_BUCKET_RETENTION_UNIT:\n return {\n ...state,\n addBucketRetentionUnit: action.retentionUnit,\n };\n case ADD_BUCKET_RETENTION_VALIDITY:\n return {\n ...state,\n addBucketRetentionValidity: action.retentionValidity,\n };\n\n case ADD_BUCKET_RESET:\n return {\n ...state,\n addBucketName: \"\",\n addBucketVersioningEnabled: false,\n addBucketLockingEnabled: false,\n addBucketQuotaEnabled: false,\n addBucketQuotaType: \"hard\",\n addBucketQuotaSize: \"1\",\n addBucketQuotaUnit: \"TiB\",\n addBucketRetentionEnabled: false,\n addBucketRetentionMode: \"compliance\",\n addBucketRetentionUnit: \"days\",\n addBucketRetentionValidity: 1,\n };\n default:\n return state;\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 .\nimport history from \"../../../history\";\n\nimport {\n OBJECT_BROWSER_ADD_ROUTE,\n OBJECT_BROWSER_CREATE_FOLDER,\n OBJECT_BROWSER_REMOVE_ROUTE_LEVEL,\n OBJECT_BROWSER_RESET_ROUTES_LIST,\n OBJECT_BROWSER_SET_ALL_ROUTES,\n OBJECT_BROWSER_SET_LAST_AS_FILE,\n OBJECT_BROWSER_DOWNLOAD_FILE_LOADER,\n OBJECT_BROWSER_DOWNLOADED_FILE,\n ObjectBrowserActionTypes,\n} from \"./actions\";\n\nexport interface Route {\n route: string;\n label: string;\n type: string;\n}\n\nexport interface ObjectBrowserState {\n routesList: Route[];\n downloadingFiles: string[];\n}\n\nexport interface ObjectBrowserReducer {\n objectBrowser: ObjectBrowserState;\n}\n\nconst initialRoute = [\n { route: \"/object-browser\", label: \"All Buckets\", type: \"path\" },\n];\n\nconst initialState: ObjectBrowserState = {\n routesList: initialRoute,\n downloadingFiles: [],\n};\n\nexport function objectBrowserReducer(\n state = initialState,\n action: ObjectBrowserActionTypes\n): ObjectBrowserState {\n switch (action.type) {\n case OBJECT_BROWSER_ADD_ROUTE:\n const newRouteList = [\n ...state.routesList,\n { route: action.route, label: action.label, type: action.routeType },\n ];\n history.push(action.route);\n\n return { ...state, routesList: newRouteList };\n case OBJECT_BROWSER_RESET_ROUTES_LIST:\n return {\n ...state,\n routesList: [...initialRoute],\n };\n case OBJECT_BROWSER_REMOVE_ROUTE_LEVEL:\n const indexOfTopPath =\n state.routesList.findIndex(\n (element) => element.route === action.toRoute\n ) + 1;\n const newRouteLevels = state.routesList.slice(0, indexOfTopPath);\n\n return {\n ...state,\n routesList: newRouteLevels,\n };\n case OBJECT_BROWSER_SET_ALL_ROUTES:\n const splitRoutes = action.currentRoute.split(\"/\");\n const routesArray: Route[] = [];\n let initRoute = initialRoute[0].route;\n\n splitRoutes.forEach((route) => {\n if (route !== \"\" && route !== \"object-browser\") {\n initRoute = `${initRoute}/${route}`;\n\n routesArray.push({\n route: initRoute,\n label: route,\n type: \"path\",\n });\n }\n });\n\n const newSetOfRoutes = [...initialRoute, ...routesArray];\n\n return {\n ...state,\n routesList: newSetOfRoutes,\n };\n case OBJECT_BROWSER_CREATE_FOLDER:\n const newFoldersRoutes = [...state.routesList];\n let lastRoute = state.routesList[state.routesList.length - 1].route;\n\n const splitElements = action.newRoute.split(\"/\");\n\n splitElements.forEach((element) => {\n const folderTrim = element.trim();\n if (folderTrim !== \"\") {\n lastRoute = `${lastRoute}/${folderTrim}`;\n\n const newItem = { route: lastRoute, label: folderTrim, type: \"path\" };\n newFoldersRoutes.push(newItem);\n }\n });\n\n history.push(lastRoute);\n\n return {\n ...state,\n routesList: newFoldersRoutes,\n };\n case OBJECT_BROWSER_SET_LAST_AS_FILE:\n const currentList = state.routesList;\n const lastItem = currentList.slice(-1)[0];\n\n if (lastItem.type === \"path\") {\n lastItem.type = \"file\";\n }\n\n const newList = [...currentList.slice(0, -1), lastItem];\n\n return {\n ...state,\n routesList: newList,\n };\n case OBJECT_BROWSER_DOWNLOAD_FILE_LOADER:\n const actualFiles = [...state.downloadingFiles];\n\n actualFiles.push(action.path);\n\n return {\n ...state,\n downloadingFiles: [...actualFiles],\n };\n case OBJECT_BROWSER_DOWNLOADED_FILE:\n const downloadingFiles = state.downloadingFiles.filter(\n (item) => item !== action.path\n );\n\n return {\n ...state,\n downloadingFiles: [...downloadingFiles],\n };\n default:\n return state;\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 .\nimport has from \"lodash/has\";\nimport get from \"lodash/get\";\nimport {\n TenantsManagementTypes,\n ITenantState,\n ADD_TENANT_SET_CURRENT_PAGE,\n ADD_TENANT_SET_ADVANCED_MODE,\n ADD_TENANT_UPDATE_FIELD,\n ADD_TENANT_SET_PAGE_VALID,\n ADD_TENANT_SET_STORAGE_CLASSES_LIST,\n ADD_TENANT_ADD_MINIO_KEYPAIR,\n ADD_TENANT_DELETE_MINIO_KEYPAIR,\n ADD_TENANT_ADD_CA_KEYPAIR,\n ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR,\n ADD_TENANT_DELETE_CA_KEYPAIR,\n ADD_TENANT_ADD_CONSOLE_CERT,\n ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR,\n ADD_TENANT_ENCRYPTION_SERVER_CERT,\n ADD_TENANT_ENCRYPTION_CLIENT_CERT,\n ADD_TENANT_ENCRYPTION_VAULT_CERT,\n ADD_TENANT_ENCRYPTION_VAULT_CA,\n ADD_TENANT_ENCRYPTION_GEMALTO_CA,\n ADD_TENANT_RESET_FORM,\n} from \"./types\";\nimport { KeyPair } from \"./ListTenants/utils\";\nimport { getRandomString } from \"./utils\";\n\nconst initialState: ITenantState = {\n createTenant: {\n page: 0,\n validPages: [],\n advancedModeOn: false,\n storageClasses: [],\n limitSize: {},\n fields: {\n nameTenant: {\n tenantName: \"\",\n namespace: \"\",\n selectedStorageClass: \"\",\n },\n configure: {\n customImage: false,\n imageName: \"\",\n consoleImage: \"\",\n customDockerhub: false,\n imageRegistry: \"\",\n imageRegistryUsername: \"\",\n imageRegistryPassword: \"\",\n exposeMinIO: true,\n exposeConsole: true,\n logSearchCustom: false,\n prometheusCustom: false,\n logSearchVolumeSize: \"5\",\n logSearchSizeFactor: \"Gi\",\n logSearchImage: \"\",\n kesImage: \"\",\n logSearchPostgresImage: \"\",\n prometheusVolumeSize: \"5\",\n prometheusSizeFactor: \"Gi\",\n logSearchSelectedStorageClass: \"\",\n prometheusSelectedStorageClass: \"\",\n prometheusImage: \"\",\n },\n identityProvider: {\n idpSelection: \"Built-in\",\n accessKeys: [getRandomString(16)],\n secretKeys: [getRandomString(32)],\n openIDURL: \"\",\n openIDClientID: \"\",\n openIDSecretID: \"\",\n ADURL: \"\",\n ADSkipTLS: false,\n ADServerInsecure: false,\n ADUserNameFilter: \"\",\n ADGroupBaseDN: \"\",\n ADGroupSearchFilter: \"\",\n ADNameAttribute: \"\",\n },\n security: {\n enableAutoCert: true,\n enableCustomCerts: false,\n enableTLS: true,\n },\n encryption: {\n enableEncryption: false,\n encryptionType: \"vault\",\n gemaltoEndpoint: \"\",\n gemaltoToken: \"\",\n gemaltoDomain: \"\",\n gemaltoRetry: \"0\",\n awsEndpoint: \"\",\n awsRegion: \"\",\n awsKMSKey: \"\",\n awsAccessKey: \"\",\n awsSecretKey: \"\",\n awsToken: \"\",\n vaultEndpoint: \"\",\n vaultEngine: \"\",\n vaultNamespace: \"\",\n vaultPrefix: \"\",\n vaultAppRoleEngine: \"\",\n vaultId: \"\",\n vaultSecret: \"\",\n vaultRetry: \"0\",\n vaultPing: \"0\",\n gcpProjectID: \"\",\n gcpEndpoint: \"\",\n gcpClientEmail: \"\",\n gcpClientID: \"\",\n gcpPrivateKeyID: \"\",\n gcpPrivateKey: \"\",\n enableCustomCertsForKES: false,\n },\n tenantSize: {\n volumeSize: \"100\",\n sizeFactor: \"Gi\",\n drivesPerServer: \"1\",\n nodes: \"4\",\n memoryNode: \"2\",\n ecParity: \"\",\n ecParityChoices: [],\n cleanECChoices: [],\n maxAllocableMemo: 0,\n memorySize: {\n error: \"\",\n limit: 0,\n request: 0,\n },\n distribution: {\n error: \"\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n volumePerDisk: 0,\n },\n ecParityCalc: {\n error: 0,\n defaultEC: \"\",\n erasureCodeSet: 0,\n maxEC: \"\",\n rawCapacity: \"0\",\n storageFactors: [],\n },\n limitSize: {},\n },\n affinity: {\n nodeSelectorLabels: \"\",\n podAffinity: \"default\",\n withPodAntiAffinity: true,\n },\n },\n certificates: {\n minioCertificates: [\n {\n id: Date.now().toString(),\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n ],\n caCertificates: [\n {\n id: Date.now().toString(),\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n ],\n consoleCertificate: {\n id: \"console_cert_pair\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n serverCertificate: {\n id: \"encryptionServerCertificate\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n clientCertificate: {\n id: \"encryptionClientCertificate\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n vaultCertificate: {\n id: \"encryptionVaultCertificate\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n vaultCA: {\n id: \"encryptionVaultCA\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n gemaltoCA: {\n id: \"encryptionGemaltoCA\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n },\n },\n};\n\nexport function tenantsReducer(\n state = initialState,\n action: TenantsManagementTypes\n): ITenantState {\n let newState: ITenantState = { ...state };\n\n switch (action.type) {\n case ADD_TENANT_SET_CURRENT_PAGE:\n newState.createTenant.page = action.page;\n\n return { ...newState };\n case ADD_TENANT_SET_ADVANCED_MODE:\n newState.createTenant.advancedModeOn = action.state;\n\n return { ...newState };\n case ADD_TENANT_UPDATE_FIELD:\n if (\n has(newState.createTenant.fields, `${action.pageName}.${action.field}`)\n ) {\n const originPageNameItems = get(\n newState.createTenant.fields,\n `${action.pageName}`,\n {}\n );\n\n let newValue: typeof originPageNameItems = {};\n newValue[action.field] = action.value;\n\n const joinValue = { ...originPageNameItems, ...newValue };\n\n newState.createTenant.fields[action.pageName] = { ...joinValue };\n\n return { ...newState };\n }\n return state;\n case ADD_TENANT_SET_PAGE_VALID:\n let originValidPages = state.createTenant.validPages;\n\n if (action.valid) {\n if (!originValidPages.includes(action.pageName)) {\n originValidPages.push(action.pageName);\n\n newState.createTenant.validPages = [...originValidPages];\n }\n } else {\n const newSetOfPages = originValidPages.filter(\n (elm) => elm !== action.pageName\n );\n\n newState.createTenant.validPages = [...newSetOfPages];\n }\n\n return { ...newState };\n case ADD_TENANT_SET_STORAGE_CLASSES_LIST:\n const changeCL = {\n ...state,\n createTenant: {\n ...state.createTenant,\n storageClasses: action.storageClasses,\n },\n };\n return { ...changeCL };\n case ADD_TENANT_ADD_MINIO_KEYPAIR:\n const minioCerts = [\n ...state.createTenant.certificates.minioCertificates,\n {\n id: Date.now().toString(),\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n ];\n newState.createTenant.certificates.minioCertificates = [...minioCerts];\n return { ...newState };\n case ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR:\n const minioCertificates =\n state.createTenant.certificates.minioCertificates;\n\n const NCertList = minioCertificates.map((item: KeyPair) => {\n if (item.id === action.id) {\n return {\n ...item,\n [action.key]: action.fileName,\n [`encoded_${action.key}`]: action.value,\n };\n }\n return item;\n });\n newState.createTenant.certificates.minioCertificates = [...NCertList];\n return { ...newState };\n case ADD_TENANT_DELETE_MINIO_KEYPAIR:\n const minioCertsList = state.createTenant.certificates.minioCertificates;\n\n if (minioCertsList.length > 1) {\n const cleanMinioCertsList = minioCertsList.filter(\n (item: KeyPair) => item.id !== action.id\n );\n newState.createTenant.certificates.minioCertificates = [\n ...cleanMinioCertsList,\n ];\n return { ...newState };\n }\n return { ...state };\n case ADD_TENANT_ADD_CA_KEYPAIR:\n const CACerts = [\n ...state.createTenant.certificates.caCertificates,\n {\n id: Date.now().toString(),\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n ];\n newState.createTenant.certificates.caCertificates = [...CACerts];\n return { ...newState };\n case ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR:\n const caCertificates = state.createTenant.certificates.caCertificates;\n\n const NACList = caCertificates.map((item: KeyPair) => {\n if (item.id === action.id) {\n return {\n ...item,\n [action.key]: action.fileName,\n [`encoded_${action.key}`]: action.value,\n };\n }\n return item;\n });\n newState.createTenant.certificates.caCertificates = [...NACList];\n return { ...newState };\n case ADD_TENANT_DELETE_CA_KEYPAIR:\n const CACertsList = state.createTenant.certificates.minioCertificates;\n\n if (CACertsList.length > 1) {\n const cleanMinioCertsList = CACertsList.filter(\n (item: KeyPair) => item.id !== action.id\n );\n newState.createTenant.certificates.caCertificates = [\n ...cleanMinioCertsList,\n ];\n return { ...newState };\n }\n return { ...state };\n case ADD_TENANT_ADD_CONSOLE_CERT:\n const consoleCert = state.createTenant.certificates.consoleCertificate;\n\n newState.createTenant.certificates.consoleCertificate = {\n ...consoleCert,\n [action.key]: action.fileName,\n [`encoded_${action.key}`]: action.value,\n };\n\n return { ...newState };\n case ADD_TENANT_ENCRYPTION_SERVER_CERT:\n const encServerCert = state.createTenant.certificates.serverCertificate;\n\n newState.createTenant.certificates.serverCertificate = {\n ...encServerCert,\n [action.key]: action.fileName,\n [`encoded_${action.key}`]: action.value,\n };\n\n return { ...newState };\n case ADD_TENANT_ENCRYPTION_CLIENT_CERT:\n const encClientCert = state.createTenant.certificates.clientCertificate;\n\n newState.createTenant.certificates.clientCertificate = {\n ...encClientCert,\n [action.key]: action.fileName,\n [`encoded_${action.key}`]: action.value,\n };\n\n return { ...newState };\n case ADD_TENANT_ENCRYPTION_VAULT_CERT:\n const encVaultCert = state.createTenant.certificates.vaultCertificate;\n\n newState.createTenant.certificates.vaultCertificate = {\n ...encVaultCert,\n [action.key]: action.fileName,\n [`encoded_${action.key}`]: action.value,\n };\n\n return { ...newState };\n case ADD_TENANT_ENCRYPTION_VAULT_CA:\n const encVaultCA = state.createTenant.certificates.vaultCA;\n\n newState.createTenant.certificates.vaultCA = {\n ...encVaultCA,\n cert: action.fileName,\n encoded_cert: action.value,\n };\n\n return { ...newState };\n case ADD_TENANT_ENCRYPTION_GEMALTO_CA:\n const encGemaltoCA = state.createTenant.certificates.gemaltoCA;\n\n newState.createTenant.certificates.gemaltoCA = {\n ...encGemaltoCA,\n cert: action.fileName,\n encoded_cert: action.value,\n };\n\n return { ...newState };\n case ADD_TENANT_RESET_FORM:\n return {\n ...state,\n createTenant: {\n page: 0,\n validPages: [],\n advancedModeOn: false,\n storageClasses: [],\n limitSize: {},\n fields: {\n nameTenant: {\n tenantName: \"\",\n namespace: \"\",\n selectedStorageClass: \"\",\n },\n configure: {\n customImage: false,\n imageName: \"\",\n consoleImage: \"\",\n customDockerhub: false,\n imageRegistry: \"\",\n imageRegistryUsername: \"\",\n imageRegistryPassword: \"\",\n exposeMinIO: true,\n exposeConsole: true,\n logSearchCustom: false,\n prometheusCustom: false,\n logSearchVolumeSize: \"5\",\n logSearchSizeFactor: \"Gi\",\n logSearchSelectedStorageClass: \"\",\n logSearchImage: \"\",\n kesImage: \"\",\n logSearchPostgresImage: \"\",\n prometheusVolumeSize: \"5\",\n prometheusSizeFactor: \"Gi\",\n prometheusSelectedStorageClass: \"\",\n prometheusImage: \"\",\n },\n identityProvider: {\n idpSelection: \"Built-in\",\n accessKeys: [getRandomString(16)],\n secretKeys: [getRandomString(32)],\n openIDURL: \"\",\n openIDClientID: \"\",\n openIDSecretID: \"\",\n ADURL: \"\",\n ADSkipTLS: false,\n ADServerInsecure: false,\n ADUserNameFilter: \"\",\n ADGroupBaseDN: \"\",\n ADGroupSearchFilter: \"\",\n ADNameAttribute: \"\",\n },\n security: {\n enableAutoCert: true,\n enableCustomCerts: false,\n enableTLS: true,\n },\n encryption: {\n enableEncryption: false,\n encryptionType: \"vault\",\n gemaltoEndpoint: \"\",\n gemaltoToken: \"\",\n gemaltoDomain: \"\",\n gemaltoRetry: \"0\",\n awsEndpoint: \"\",\n awsRegion: \"\",\n awsKMSKey: \"\",\n awsAccessKey: \"\",\n awsSecretKey: \"\",\n awsToken: \"\",\n vaultEndpoint: \"\",\n vaultEngine: \"\",\n vaultNamespace: \"\",\n vaultPrefix: \"\",\n vaultAppRoleEngine: \"\",\n vaultId: \"\",\n vaultSecret: \"\",\n vaultRetry: \"0\",\n vaultPing: \"0\",\n gcpProjectID: \"\",\n gcpEndpoint: \"\",\n gcpClientEmail: \"\",\n gcpClientID: \"\",\n gcpPrivateKeyID: \"\",\n gcpPrivateKey: \"\",\n enableCustomCertsForKES: false,\n },\n tenantSize: {\n volumeSize: \"100\",\n sizeFactor: \"Gi\",\n drivesPerServer: \"1\",\n nodes: \"4\",\n memoryNode: \"2\",\n ecParity: \"\",\n ecParityChoices: [],\n cleanECChoices: [],\n maxAllocableMemo: 0,\n memorySize: {\n error: \"\",\n limit: 0,\n request: 0,\n },\n distribution: {\n error: \"\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n volumePerDisk: 0,\n },\n ecParityCalc: {\n error: 0,\n defaultEC: \"\",\n erasureCodeSet: 0,\n maxEC: \"\",\n rawCapacity: \"0\",\n storageFactors: [],\n },\n limitSize: {},\n },\n affinity: {\n nodeSelectorLabels: \"\",\n podAffinity: \"default\",\n withPodAntiAffinity: true,\n },\n },\n certificates: {\n minioCertificates: [\n {\n id: Date.now().toString(),\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n ],\n caCertificates: [\n {\n id: Date.now().toString(),\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n ],\n consoleCertificate: {\n id: \"console_cert_pair\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n serverCertificate: {\n id: \"encryptionServerCertificate\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n clientCertificate: {\n id: \"encryptionClientCertificate\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n vaultCertificate: {\n id: \"encryptionVaultCertificate\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n vaultCA: {\n id: \"encryptionVaultCA\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n gemaltoCA: {\n id: \"encryptionGemaltoCA\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n },\n },\n };\n default:\n return state;\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 {\n DirectCSITypes,\n DIRECT_CSI_SELECT_DRIVE,\n IDirectCSIState,\n} from \"./types\";\n\nconst initialState: IDirectCSIState = {\n selectedDrive: \"\",\n};\n\nexport function directCSIReducer(\n state = initialState,\n action: DirectCSITypes\n): IDirectCSIState {\n switch (action.type) {\n case DIRECT_CSI_SELECT_DRIVE:\n if (action.driveName !== \"\") {\n const newState = { ...state };\n newState.selectedDrive = action.driveName;\n return newState;\n }\n return state;\n default:\n return state;\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 { applyMiddleware, combineReducers, compose, createStore } from \"redux\";\nimport thunk from \"redux-thunk\";\nimport { systemReducer } from \"./reducer\";\nimport { traceReducer } from \"./screens/Console/Trace/reducers\";\nimport { logReducer } from \"./screens/Console/Logs/reducers\";\nimport { healthInfoReducer } from \"./screens/Console/HealthInfo/reducers\";\nimport { watchReducer } from \"./screens/Console/Watch/reducers\";\nimport { consoleReducer } from \"./screens/Console/reducer\";\nimport { bucketsReducer } from \"./screens/Console/Buckets/reducers\";\nimport { objectBrowserReducer } from \"./screens/Console/ObjectBrowser/reducers\";\nimport { tenantsReducer } from \"./screens/Console/Tenants/reducer\";\nimport { directCSIReducer } from \"./screens/Console/DirectCSI/reducer\";\n\nconst globalReducer = combineReducers({\n system: systemReducer,\n trace: traceReducer,\n logs: logReducer,\n watch: watchReducer,\n console: consoleReducer,\n buckets: bucketsReducer,\n objectBrowser: objectBrowserReducer,\n healthInfo: healthInfoReducer,\n tenants: tenantsReducer,\n directCSI: directCSIReducer,\n});\n\ndeclare global {\n interface Window {\n __REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: typeof compose;\n }\n}\n\nconst composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n\nexport type AppState = ReturnType;\n\nexport default function configureStore() {\n return createStore(globalReducer, composeEnhancers(applyMiddleware(thunk)));\n}\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === \"localhost\" ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === \"[::1]\" ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === \"production\" && \"serviceWorker\" in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n (process as { env: { [key: string]: string } }).env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener(\"load\", () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n \"This web app is being served cache-first by a service \" +\n \"worker. To learn more, visit https://bit.ly/CRA-PWA\"\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === \"installed\") {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n \"New content is available and will be used when all \" +\n \"tabs for this page are closed. See https://bit.ly/CRA-PWA.\"\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log(\"Content is cached for offline use.\");\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error(\"Error during service worker registration:\", error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get(\"content-type\");\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf(\"javascript\") === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n \"No internet connection found. App is running in offline mode.\"\n );\n });\n}\n\nexport function unregister() {\n if (\"serviceWorker\" in navigator) {\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister();\n });\n }\n}\n","import { createMuiTheme } from \"@material-ui/core\";\n\nconst theme = createMuiTheme({\n palette: {\n primary: {\n light: \"#073052\",\n main: \"#081C42\",\n dark: \"#05122B\",\n contrastText: \"#fff\",\n },\n secondary: {\n light: \"#ff7961\",\n main: \"#f44336\",\n dark: \"#ba000d\",\n contrastText: \"#000\",\n },\n error: {\n light: \"#e03a48\",\n main: \"#dc1f2e\",\n contrastText: \"#ffffff\",\n },\n grey: {\n 100: \"#f0f0f0\",\n 200: \"#e6e6e6\",\n 300: \"#cccccc\",\n 400: \"#999999\",\n 500: \"#8c8c8c\",\n 600: \"#737373\",\n 700: \"#666666\",\n 800: \"#4d4d4d\",\n 900: \"#333333\",\n },\n background: {\n default: \"#F4F4F4\",\n },\n },\n typography: {\n fontFamily: [\"Lato\", \"sans-serif\"].join(\",\"),\n h1: {\n fontWeight: \"bold\",\n color: \"#081C42\",\n },\n h2: {\n fontWeight: \"bold\",\n color: \"#081C42\",\n },\n h3: {\n fontWeight: \"bold\",\n color: \"#081C42\",\n },\n h4: {\n fontWeight: \"bold\",\n color: \"#081C42\",\n },\n h5: {\n fontWeight: \"bold\",\n color: \"#081C42\",\n },\n h6: {\n fontWeight: \"bold\",\n color: \"#000000\",\n },\n },\n overrides: {\n MuiButton: {\n root: {\n borderRadius: 3,\n color: \"white\",\n height: 40,\n padding: \"0 20px\",\n fontSize: 14,\n fontWeight: 600,\n boxShadow: \"none\",\n \"& .MuiSvgIcon-root\": {\n maxHeight: 18,\n },\n \"&.MuiButton-contained.Mui-disabled\": {\n backgroundColor: \"#EAEDEE\",\n fontWeight: 600,\n color: \"#767676\",\n },\n \"& .MuiButton-iconSizeMedium > *:first-child\": {\n fontSize: 12,\n },\n },\n },\n },\n});\n\nexport default theme;\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 from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport Routes from \"./Routes\";\nimport configureStore from \"./store\";\nimport * as serviceWorker from \"./serviceWorker\";\nimport { ThemeProvider, withStyles } from \"@material-ui/core/styles\";\nimport \"react-virtualized/styles.css\";\nimport \"react-grid-layout/css/styles.css\";\nimport \"react-resizable/css/styles.css\";\n\nimport \"./index.css\";\nimport theme from \"./theme/main\";\n\nconst GlobalCss = withStyles({\n // @global is handled by jss-plugin-global.\n \"@global\": {\n // You should target [class*=\"MuiButton-root\"] instead if you nest themes.\n \".MuiButton-contained\": {\n fontSize: \"14px\",\n textTransform: \"capitalize\",\n padding: \"16px 25px 16px 25px\",\n borderRadius: 3,\n },\n \".MuiButton-sizeSmall\": {\n padding: \"4px 10px\",\n fontSize: \"0.8125rem\",\n },\n \".MuiTableCell-head\": {\n borderRadius: \"3px 3px 0px 0px\",\n fontSize: 13,\n },\n \".MuiPaper-root\": {\n borderRadius: 3,\n },\n \".MuiDrawer-paperAnchorDockedLeft\": {\n borderRight: 0,\n },\n \".MuiDrawer-root\": {\n \"& .MuiPaper-root\": {\n borderRadius: 0,\n },\n },\n },\n})(() => null);\n\nReactDOM.render(\n \n \n \n {/**/}\n \n \n ,\n document.getElementById(\"root\")\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["history.ts","types.ts","actions.ts","screens/LoginPage/types.ts","common/utils.ts","common/api/index.ts","screens/LoginPage/LoginPage.tsx","screens/Console/Common/FormComponents/common/styleLibrary.ts","common/Copyright.tsx","screens/NotFoundPage.tsx","icons/CopyIcon.tsx","icons/CreateIcon.tsx","icons/DeleteIcon.tsx","icons/DashboardIcon.tsx","icons/BucketsIcon.tsx","icons/UsersIcon.tsx","icons/ServiceAccountsIcon.tsx","icons/GroupsIcon.tsx","icons/IAMPoliciesIcon.tsx","icons/TraceIcon.tsx","icons/ConfigurationsListIcon.tsx","icons/ClustersIcon.tsx","icons/WatchIcon.tsx","screens/Console/Buckets/actions.ts","screens/Console/Common/TableWrapper/TableActionIcons/common.ts","screens/Console/Common/TableWrapper/TableActionIcons/ViewIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/PencilIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/ShareIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/DeleteIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/DescriptionIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/CloudIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/ConsoleIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/DownloadIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/DisableIcon.tsx","screens/Console/Common/TableWrapper/TableActionIcons/FormatDriveIcon.tsx","screens/Console/Common/TableWrapper/TableActionButton.tsx","icons/HelpIcon.tsx","screens/Console/Common/FormComponents/CheckboxWrapper/CheckboxWrapper.tsx","screens/Console/Common/TableWrapper/TableWrapper.tsx","screens/Console/Common/ModalWrapper/ModalWrapper.tsx","screens/Console/Common/FormComponents/InputBoxWrapper/InputBoxWrapper.tsx","screens/Console/Common/FormComponents/SelectWrapper/SelectWrapper.tsx","screens/Console/Common/FormComponents/RadioGroupSelector/RadioGroupSelector.tsx","screens/Console/Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper.tsx","screens/Console/Buckets/ListBuckets/AddBucket.tsx","screens/Console/Buckets/ListBuckets/DeleteBucket.tsx","screens/Console/Common/PageHeader/PageHeader.tsx","screens/Console/Common/FormComponents/PredefinedList/PredefinedList.tsx","screens/Console/Common/GenericWizard/WizardPage.tsx","screens/Console/Common/GenericWizard/GenericWizard.tsx","screens/Console/Buckets/ListBuckets/BulkReplicationModal.tsx","screens/Console/Buckets/ListBuckets/ListBuckets.tsx","screens/Console/Buckets/ViewBucket/SetAccessPolicy.tsx","screens/Console/Buckets/ViewBucket/SetRetentionConfig.tsx","screens/Console/Buckets/ViewBucket/AddEvent.tsx","screens/Console/Buckets/ViewBucket/DeleteEvent.tsx","screens/Console/Buckets/ViewBucket/AddReplicationModal.tsx","screens/Console/Buckets/ViewBucket/EnableBucketEncryption.tsx","screens/Console/Buckets/ViewBucket/EnableVersioningModal.tsx","icons/UsageIcon.tsx","screens/Console/Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper.tsx","screens/Console/Policies/AddPolicy.tsx","screens/Console/Buckets/ViewBucket/DeleteReplicationRule.tsx","icons/AddIcon.tsx","screens/Console/Common/FormComponents/QueryMultiSelector/QueryMultiSelector.tsx","screens/Console/Buckets/ViewBucket/EditLifecycleConfiguration.tsx","screens/Console/Common/FormComponents/DateSelector/utils.ts","screens/Console/Common/FormComponents/DateSelector/DateSelector.tsx","screens/Console/Buckets/ViewBucket/AddLifecycleModal.tsx","screens/Console/Buckets/ViewBucket/ViewBucket.tsx","screens/Console/Dashboard/Prometheus/types.ts","screens/Console/Buckets/Buckets.tsx","screens/Console/Policies/DeletePolicy.tsx","screens/Console/Policies/ListPolicies.tsx","screens/Console/Policies/PolicyDetails.tsx","screens/Console/Policies/Policies.tsx","screens/Console/Dashboard/Prometheus/utils.ts","screens/Console/Dashboard/Prometheus/Widgets/SingleValueWidget.tsx","screens/Console/Dashboard/Prometheus/Widgets/tooltips/LineChartTooltip.tsx","screens/Console/Dashboard/Prometheus/Widgets/LinearGraphWidget.tsx","screens/Console/Dashboard/Prometheus/Widgets/tooltips/BarChartTooltip.tsx","screens/Console/Dashboard/Prometheus/Widgets/BarChartWidget.tsx","screens/Console/Dashboard/Prometheus/Widgets/PieChartWidget.tsx","screens/Console/Dashboard/Prometheus/Widgets/SingleRepWidget.tsx","screens/Console/Common/FormComponents/DateTimePickerWrapper/DateTimePickerWrapper.tsx","icons/SyncIcon.tsx","screens/Console/Dashboard/Prometheus/PrDashboard.tsx","icons/AllBucketsIcon.tsx","icons/EgressIcon.tsx","screens/Console/Dashboard/BasicDashboard/BasicDashboard.tsx","screens/Console/Dashboard/Dashboard.tsx","icons/minio_console_logo.svg","icons/minio_operator_logo.svg","screens/Console/Menu/utils.ts","icons/LicenseIcon.tsx","icons/LogoutIcon.tsx","icons/ConsoleIcon.tsx","icons/HealIcon.tsx","screens/Console/Menu/Menu.tsx","screens/Console/Account/AddServiceAccount.tsx","screens/Console/Account/DeleteServiceAccount.tsx","screens/Console/Common/CredentialsPrompt/CredentialsPrompt.tsx","utils/sortFunctions.ts","screens/Console/Account/ChangePasswordModal.tsx","screens/Console/Account/Account.tsx","screens/Console/Users/GroupsSelectors.tsx","screens/Console/Users/AddUser.tsx","screens/Console/Users/DeleteUser.tsx","screens/Console/Users/BulkAddToGroup.tsx","screens/Console/Policies/PolicySelectors.tsx","screens/Console/Policies/SetPolicy.tsx","screens/Console/Users/ListUsers.tsx","screens/shared/tabs.tsx","screens/Console/Users/ChangeUserGroups.tsx","screens/Console/Users/SetUserPolicies.tsx","screens/Console/Users/UserDetails.tsx","screens/Console/Users/Users.tsx","screens/Console/Groups/UsersSelectors.tsx","screens/Console/Groups/AddGroup.tsx","screens/Console/Groups/DeleteGroup.tsx","screens/Console/Groups/Groups.tsx","screens/Console/Configurations/utils.ts","screens/Console/Common/FormComponents/CSVMultiSelector/CSVMultiSelector.tsx","screens/Console/Common/FormComponents/CommentBoxWrapper/CommentBoxWrapper.tsx","screens/Console/Configurations/ConfTargetGeneric.tsx","screens/Console/Configurations/CustomForms/EditConfiguration.tsx","screens/Console/Common/SlideOptions/SlideOptions.tsx","icons/BackSettingsIcon.tsx","screens/Console/Configurations/ConfigurationPanels/ConfigurationsList.tsx","screens/Console/Configurations/NotificationEndpoints/utils.ts","screens/Console/Configurations/CustomForms/ConfPostgres.tsx","screens/Console/Configurations/CustomForms/ConfMySql.tsx","screens/Console/Configurations/NotificationEndpoints/AddNotificationEndpoint.tsx","screens/Console/Configurations/NotificationEndpoints/NotificationTypeSelector.tsx","screens/Console/Configurations/NotificationEndpoints/ListNotificationEndpoints.tsx","screens/shared/ErrorBlock.tsx","screens/Console/Common/FormComponents/FileSelector/FileSelector.tsx","screens/Console/Common/FormComponents/FileSelector/utils.ts","screens/Console/Configurations/TiersConfiguration/AddTierConfiguration.tsx","screens/Console/Configurations/TiersConfiguration/UpdateTierCredentiasModal.tsx","screens/Console/Configurations/TiersConfiguration/ListTiersConfiguration.tsx","screens/Console/Configurations/ConfigurationMain.tsx","screens/Console/Configurations/ConfigurationPanels/WebhookPanel.tsx","screens/Console/Tenants/ListTenants/DeleteTenant.tsx","screens/Console/Tenants/TenantDetails/utils.ts","screens/Console/Tenants/types.ts","screens/Console/Tenants/actions.ts","utils/validationFunctions.ts","screens/Console/Tenants/utils.ts","screens/Console/Tenants/AddTenant/Steps/NameTenant.tsx","screens/Console/Tenants/ListTenants/utils.ts","screens/Console/Tenants/AddTenant/Steps/Configure.tsx","screens/Console/Tenants/AddTenant/Steps/IdentityProvider.tsx","screens/Console/Tenants/AddTenant/Steps/Security.tsx","screens/Console/Tenants/AddTenant/Steps/Encryption.tsx","screens/Console/Tenants/AddTenant/Steps/TenantSize.tsx","screens/Console/Tenants/AddTenant/Steps/Preview.tsx","screens/Console/Tenants/AddTenant/Steps/Affinity.tsx","screens/Console/Tenants/AddTenant/AddTenant.tsx","screens/Console/Tenants/ListTenants/ListTenants.tsx","screens/Console/Tenants/TenantsMain.tsx","screens/Console/Tenants/TenantDetails/AddPoolModal.tsx","screens/Console/Tenants/TenantDetails/ReplicationSetup.tsx","screens/Console/Common/UsageBarWrapper/UsageBarWrapper.tsx","screens/Console/Tenants/TenantDetails/UpdateTenantModal.tsx","screens/Console/Tenants/TenantDetails/TenantYAML.tsx","screens/Console/Tenants/TenantDetails/SubnetLicenseTenant.tsx","screens/Console/Tenants/TenantDetails/TenantDetails.tsx","screens/Console/ObjectBrowser/actions.ts","screens/Console/ObjectBrowser/BrowserBreadcrumbs.tsx","screens/Console/ObjectBrowser/BrowseBuckets.tsx","screens/Console/ObjectBrowser/ObjectBrowser.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/DeleteObject.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/CreateFolderModal.tsx","icons/UploadFile.tsx","screens/Console/Buckets/ListBuckets/Objects/utils.ts","screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjects.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ShareFile.tsx","icons/ShareIcon.tsx","icons/DownloadIcon.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/SetRetention.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/AddTagModal.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/DeleteTagModal.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/SetLegalHoldModal.tsx","screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/ObjectDetails.tsx","screens/Console/Buckets/ListBuckets/Objects/ListObjects/ObjectRouting.tsx","screens/Console/License/utils.ts","screens/Console/License/ActivationModal.tsx","screens/Console/License/License.tsx","screens/Console/Trace/actions.ts","utils/wsUtils.ts","screens/Console/Trace/Trace.tsx","screens/Console/Logs/actions.ts","screens/Console/Logs/ErrorLogs/ErrorLogs.tsx","screens/Console/Common/FormComponents/FilterInputWrapper/FilterInputWrapper.tsx","screens/Console/Logs/LogSearch/LogsSearchMain.tsx","screens/Console/Logs/LogsMain.tsx","screens/Console/Heal/Heal.tsx","screens/Console/Watch/actions.ts","screens/Console/Watch/Watch.tsx","screens/Console/HealthInfo/actions.ts","screens/Console/HealthInfo/types.ts","screens/Console/HealthInfo/HealthInfo.tsx","screens/Console/Storage/StoragePVCs.tsx","screens/Console/DirectCSI/types.ts","screens/Console/DirectCSI/FormatDrives.tsx","screens/Console/DirectCSI/FormatErrorsResult.tsx","screens/Console/DirectCSI/DirectCSIDrives.tsx","screens/Console/DirectCSI/actions.ts","screens/Console/Storage/Storage.tsx","screens/Console/Console.tsx","screens/LoginPage/LoginCallback.tsx","screens/Console/actions.ts","ProtectedRoutes.tsx","Routes.tsx","reducer.ts","screens/Console/Trace/reducers.ts","screens/Console/Logs/reducers.ts","screens/Console/HealthInfo/reducers.ts","screens/Console/Watch/reducers.ts","screens/Console/reducer.ts","screens/Console/Buckets/reducers.ts","screens/Console/ObjectBrowser/reducers.ts","screens/Console/Tenants/reducer.ts","screens/Console/DirectCSI/reducer.ts","store.ts","serviceWorker.ts","theme/main.ts","index.tsx"],"names":["createBrowserHistory","USER_LOGGED","OPERATOR_MODE","MENU_OPEN","SERVER_NEEDS_RESTART","SERVER_IS_LOADING","SET_LOADING_PROGRESS","SET_SNACK_BAR_MESSAGE","SET_SERVER_DIAG_STAT","SET_ERROR_SNACK_MESSAGE","SET_SNACK_MODAL_MESSAGE","SET_MODAL_ERROR_MESSAGE","userLoggedIn","loggedIn","type","logged","setMenuOpen","open","serverNeedsRestart","needsRestart","loginStrategyType","setSnackBarMessage","message","setErrorSnackMessage","setModalSnackMessage","setModalErrorSnackMessage","minStReq","minMemReq","units","k8sUnits","k8sCalcUnits","niceBytes","x","showK8sUnits","l","n","parseInt","k8sUnitsN","toFixed","clearSession","name","storage","removeItem","document","cookie","timeFromDate","d","h","getHours","m","getMinutes","s","getSeconds","getMilliseconds","getBytes","value","unit","fromk8s","vl","parseFloat","unitsTake","powFactor","findIndex","element","factor","Math","pow","total","toString","calculateStorage","requestedBytes","forcedNodes","limitSize","drivesPerServer","intReqBytes","structureCalc","nodes","desiredCapacity","maxDiskSize","maxClusterSize","disksPerNode","isNaN","error","persistentVolumes","disks","volumePerDisk","persistentVolumeSize","numberPersistentVolumes","volumesPerServer","floor","min","max","ceil","pvSize","generatePoolName","pools","poolCounter","length","niceDays","secondsValue","timeVariant","seconds","days","hours","minutes","years","months","diffDays","weeks","getTimeFromTimestamp","timestamp","fullDate","dateObject","Date","getFullYear","String","getMonth","padStart","getDay","nsToSeconds","nanoseconds","conversion","round","Number","EPSILON","textToRGBColor","text","hashColored","split","reduce","acc","currItem","charCodeAt","toUpperCase","api","method","url","data","request","send","then","res","body","catch","err","status","window","location","href","onError","errMessage","get","response","throwMessage","charAt","slice","Promise","reject","inputStyles","makeStyles","theme","createStyles","disabled","borderColor","borderBottomStyle","LoginField","props","classes","TextField","InputProps","connector","connect","state","withStyles","backgroundColor","paper","borderRadius","display","flexDirection","alignItems","width","height","margin","position","top","left","marginLeft","marginTop","avatar","spacing","palette","secondary","main","form","submit","boxShadow","padding","errorBlock","justifyContent","color","fontWeight","fontSize","boxSizing","mainContainer","theOcean","borderTopLeftRadius","borderBottomLeftRadius","background","oceanBg","backgroundImage","backgroundRepeat","backgroundPosition","theLogin","loadingLoginStrategy","textAlign","headerTitle","marginBottom","submitContainer","disclaimer","jwtInput","linearPredef","errorIconStyle","marginRight","useState","accessKey","setAccessKey","jwt","setJwt","secretKey","setSecretKey","setError","loginStrategy","unknown","redirect","setLoginStrategy","loginSending","setLoginSending","loginStrategyEndpoints","loginStrategyPayload","formSubmit","e","preventDefault","post","bodyResponse","localStorage","setItem","btoa","history","push","useEffect","invoke","loginDetails","loginComponent","Fragment","Typography","component","variant","className","noValidate","onSubmit","Grid","container","item","xs","fullWidth","id","onChange","target","label","autoComplete","Button","LinearProgress","replace","hostname","serviceAccount","required","CircularProgress","Paper","fieldBasic","inputLabel","overflow","fieldLabelError","paddingBottom","fieldContainer","maxWidth","tooltipContainer","switchContainer","modalBasic","formScrollable","maxHeight","overflowY","formSlider","clearButton","fontFamily","border","outline","cursor","floatingEnabled","right","zIndex","configureString","tooltipHelper","tooltip","checkBoxBasic","checkboxIcons","unCheckedIcon","checkedIcon","radioBasic","radioIcons","radioUnselectedIcon","radioSelectedIcon","actionsTray","alignSelf","whiteSpace","timeContainers","flexGrow","searchField","opacity","predefinedList","prefinedContainer","predefinedTitle","minHeight","innerContent","overflowX","scrollbarWidth","innerContentMultiline","objectBrowserCommon","obTitleSection","sectionTitle","lineHeight","breadcrumbs","textDecoration","selectorsCommon","multiSelectTable","settingsCommon","customTitle","borderBottom","settingsFormContainer","settingsButtonContainer","borderTop","innerSettingsButtonContainer","settingsOptionsContainer","backButton","backContainer","typesSelection","iconContainer","flexWrap","nonIconContainer","pickTitle","centerElements","logoButton","lambdaNotif","logsCommon","logsSubContainer","widgetCommon","singleValueContainer","titleContainer","contentContainer","contentContainerWithLabel","legendBlock","bottom","singleLegendContainer","colorContainer","minWidth","legendLabel","textOverflow","tooltipCommon","customTooltip","labelContainer","labelColor","itemValue","valueContainer","timeStampTitle","snackBarCommon","snackBar","errorSnackBar","snackBarExternal","snackDiv","snackBarModal","wizardCommon","multiContainer","sizeFactorContainer","headerElement","paddingTop","tableTitle","poolError","paddingLeft","h3Section","descriptionText","buttonsStyles","anchorButton","textTransform","hrClass","borderLeft","borderRight","Copyright","align","Link","useStyles","common","white","NotFound","Container","CssBaseline","Box","mt","CopyIcon","SvgIcon","xmlns","viewBox","data-name","CreateIcon","transform","fill","DeleteIcon","DashboardIcon","BucketsIcon","UsersIcon","cx","cy","rx","ry","ServiceAccountsIcon","GroupsIcon","r","TraceIcon","ConfigurationsListIcon","ClustersIcon","y","WatchIcon","ADD_BUCKET_OPEN","ADD_BUCKET_NAME","ADD_BUCKET_VERSIONED","ADD_BUCKET_LOCKING","ADD_BUCKET_QUOTA","ADD_BUCKET_QUOTA_TYPE","ADD_BUCKET_QUOTA_SIZE","ADD_BUCKET_QUOTA_UNIT","ADD_BUCKET_RESET","ADD_BUCKET_RETENTION","ADD_BUCKET_RETENTION_MODE","ADD_BUCKET_RETENTION_UNIT","ADD_BUCKET_RETENTION_VALIDITY","unSelected","selected","ViewIcon","active","PencilIcon","ShareIcon","DescriptionIcon","CloudIcon","ConsoleIcon","FormatDriveIcon","defineIcon","DisableIcon","buttonDisabled","filter","onClick","valueToSend","idField","to","sendOnlyId","valueClick","buttonElement","IconButton","aria-label","size","stopPropagation","isString","HelpIcon","flexBasis","checked","Checkbox","inputProps","icon","InputLabel","htmlFor","Tooltip","title","placement","rowText","borderWidth","transitionDuration","paddingRight","generateColumnsMap","columns","containerWidth","actionsWidth","hasSelect","hasActions","selectedItems","columnsSelector","columnsShown","sortColumn","sortDirection","commonRestWidth","colsItems","column","includes","elementKey","initialValue","currValue","el","calculateColumnRest","map","index","disableSort","enableSort","dataKey","headerClassName","headerTextAlign","headerRenderer","contentTextAlign","cellRenderer","rowData","isSelected","itemElement","renderConst","renderFullObject","renderElement","renderFunction","subRenderFunction","defaultSortDirection","dialogContainer","noBackground","defaultPaperHeight","allTableSettings","minTableHeader","rowUnselected","rowSelected","paginatorContainer","checkBoxHeader","actionsContainer","paginatorComponent","checkBoxRow","loadingBox","overlayColumnSelection","popoverContainer","popoverContent","shownColumnsLabel","userSelect","fontStyle","itemActions","onSelect","records","isLoading","loadingMessage","entityName","radioSelection","customEmptyMessage","customPaperHeight","textSelectable","onColumnChange","infiniteScrollConfig","sortConfig","autoScrollToBottom","columnSelectorOpen","setColumnSelectorOpen","React","anchorEl","setAnchorEl","findView","find","openColumnsSelector","event","currentTarget","closeColumnSelector","style","aria-describedby","Popover","anchorOrigin","vertical","horizontal","transformOrigin","onClose","columnsSelection","isRowLoaded","loadMoreRows","loadMoreRecords","rowCount","recordsCount","onRowsRendered","registerChild","optionsWidth","totalOptions","sizeOptions","calculateOptionsSize","hasOptions","ref","disableHeader","headerHeight","noRowsRenderer","overscanRowCount","rowHeight","rowGetter","onRowClick","rowItem","clickAction","rowClassName","sort","triggerSort","undefined","sortBy","currentSort","currentDirection","scrollToIndex","actions","action","vlSend","disableButtonFunction","showLoaderFunction","elementActions","baseCloseLine","content","modalSnackMessage","system","modalSnackBar","closeContainer","closeButton","modalCloseIcon","closeIcon","titleClass","modalContent","customDialogSize","modalOpen","children","wideLimit","noContentPadding","openSnackbar","setOpenSnackbar","customSize","Dialog","aria-labelledby","Snackbar","ContentProps","autoHideDuration","disableRipple","DialogTitle","DialogContent","root","input","InputField","textBoxContainer","textBoxWithIcon","errorState","overlayAction","multiline","placeholder","overlayIcon","errorInField","helperText","inputRebase","disableFocusRipple","disableTouchRipple","SelectStyled","InputBase","options","FormControl","Select","option","MenuItem","radioStyles","RadioButton","Radio","radioBoxContainer","optionLabel","checkedOption","selectorOptions","currentSelection","disableOptions","displayInColumn","RadioGroup","row","selectorOption","FormControlLabel","control","clsx","StyledSwitch","switchBase","track","thumb","Switch","seeMore","addSideBar","tableToolbar","wrapCell","wordWrap","noFound","tableContainer","stickyHeader","actionsTitle","tableBlock","filterField","divContainer","wrapperContainer","indicatorLabel","fieldDescription","switchOnly","description","indicatorLabels","containerClass","switchComponent","addBucketModalOpen","buckets","bucketName","addBucketName","versioningEnabled","addBucketVersioningEnabled","lockingEnabled","addBucketLockingEnabled","quotaEnabled","addBucketQuotaEnabled","quotaType","addBucketQuotaType","quotaSize","addBucketQuotaSize","quotaUnit","addBucketQuotaUnit","retentionEnabled","addBucketRetentionEnabled","retentionMode","addBucketRetentionMode","retentionUnit","addBucketRetentionUnit","retentionValidity","addBucketRetentionValidity","addBucketVersioned","versioned","enableObjectLocking","locking","addBucketQuota","quota","addBucketRetention","retention","mode","validity","setModalError","buttonContainer","quotaSizeContainer","closeModalAndRefresh","addLoading","setAddLoading","sendEnabled","setSendEnabled","lockingFieldDisabled","setLockingFieldDisabled","useDebounce","resetForm","valid","trim","versioning","amount","enabled","quota_type","addRecord","valueAsNumber","mapDispatchToProps","closeDeleteModalAndRefresh","deleteOpen","selectedBucket","deleteLoading","setDeleteLoading","DialogContentText","DialogActions","autoFocus","headerContainer","labelStyle","multiLine","wizardStepContainer","wizardComponent","wizardModal","buttonsContainer","buttonInnerContainer","page","pageChange","loadingStep","forModal","componentRender","buttons","btn","toPage","buttonAction","wizardMain","wizFromContainer","wizFromModal","wizardSteps","listStyle","modalWizardSteps","buttonList","paddedContentGrid","stepsLabel","stepsMasterContainer","currentStep","setCurrentStep","toElement","lastPage","nextPage","prevPage","pg","stepsList","step","sm","md","lg","xl","remoteBucketList","gridTemplateColumns","errorIcon","successIcon","hide","bucketsToAlter","setBucketsToAlter","externalLoading","setExternalLoading","targetURL","setTargetURL","region","setRegion","useTLS","setUseTLS","relationBuckets","setRelationBuckets","remoteBucketsOpts","setRemoteBucketOpts","responseItem","setResponseItem","optionsForBucketsDrop","remoteBucketName","bucketsAlter","relationBucketsAlter","forEach","LogoToShow","errString","updateItem","indexItem","updatedList","removeSuccessItems","newBucketsToAlter","newRelationBuckets","successElement","errorString","indexToRemove","indexOf","originBucket","splice","join","wizardPageJump","remoteConnectInfo","dataReturn","arrayReplaceBuckets","errorItem","initialBucket","bucketResponse","stateOfItem","replicate","destinationBucket","endURL","remoteBucketsInfo","bucketsRelation","states","replicationState","itm","setTimeout","addBucketOpen","addBucketReset","setRecords","loading","setLoading","setDeleteOpen","setSelectedBucket","filterBuckets","setFilterBuckets","loadingPerms","setLoadingPerms","canCreateBucket","setCanCreateBucket","selectedBuckets","setSelectedBuckets","replicationModalOpen","setReplicationModalOpen","permissions","canCreate","can","tableActions","bucket","filteredRecords","b","refresh","BulkReplicationModal","unselectAll","val","disableUnderline","startAdornment","InputAdornment","startIcon","date","targetD","elements","actualPolicy","accessPolicy","setAccessPolicy","access","setRetentionMode","setRetentionUnit","setRetentionValidity","setValid","prefix","setPrefix","suffix","setSuffix","arn","setArn","selectedEvents","setSelectedEvents","arnList","setArnList","fetchArnList","useCallback","arns","handleClick","selectedIndex","newSelected","concat","arnValues","arnConstant","configuration","events","ignoreExisting","Table","TableHead","TableRow","TableCell","TableBody","bucketEvent","removeRecord","targetBucket","setTargetBucket","itemVal","encryptionCfg","encryptionEnabled","kmsKeyID","setKmsKeyID","encryptionType","setEncryptionType","algorithm","kmsMasterKeyID","encType","closeVersioningModalAndRefresh","versioningCurrentState","versioningLoading","setVersioningLoading","UsageIcon","y1","x2","y2","gradientUnits","offset","stopColor","stroke","strokeMiterlimit","strokeWidth","require","onBeforeChange","readOnly","lineNumbers","jsonPolicyEditor","policyEdit","policyName","setPolicyName","policyDefinition","setPolicyDefinition","JSON","stringify","parse","policy","validSave","editor","ruleToDelete","AddIcon","inputWithBorder","lineInputBoxes","queryDiv","keyPlaceholder","valuePlaceholder","withBorder","currentKeys","setCurrentKeys","currentValues","setCurrentValues","bottomList","createRef","elementsSplit","keys","values","splittedVals","refScroll","current","scrollIntoView","firstUpdate","useRef","useLayoutEffect","debouncedOnChange","onChangeKey","persist","updatedElement","onChangeValue","debounce","queryString","keyVal","insertString","inputs","keysList","valuesList","addEmptyLine","strongText","keyName","lifecycle","tags","setTags","setEnabled","tgs","stringLab","key","disable","Array","from","_","num","currentYear","numYear","DateSelector","forwardRef","addSwitch","onDateChange","useImperativeHandle","resetDate","dateEnabled","setDateEnabled","month","setMonth","day","setDay","year","setYear","valueSplit","currentDate","parsedMonth","parsedDay","monthForString","dayForString","parsedDate","toISOString","dateString","validDate","isValid","isDateDisabled","fieldContainerBorder","dateInput","displayEmpty","dayNumber","flex","loadingTiers","setLoadingTiers","tiersList","setTiersList","storageClass","setStorageClass","NCTransitionSC","setNCTransitionSC","expiredObjectDM","setExpiredObjectDM","NCExpirationDays","setNCExpirationDays","NCTransitionDays","setNCTransitionDays","ilmType","setIlmType","expiryType","setExpiryType","expiryDays","setExpiryDays","expiryDate","setExpiryDate","transitionDays","setTransitionDays","transitionDate","setTransitionDate","transitionType","setTransitionType","isFormValid","setIsFormValid","objList","tier","tierType","rules","expiry","expiry_date","expiry_days","noncurrentversion_expiration_days","transition","transition_date","transition_days","noncurrentversion_transition_days","noncurrentversion_transition_storage_class","storage_class","lifecycleInsert","expired_object_delete_marker","TabPanel","other","role","hidden","a11yProps","widgetType","session","console","noRecords","gridWrapper","gridContainer","gridGap","masterActions","paperContainer","capitalizeFirst","doubleElement","encCheckbox","tabPan","fixedHeight","elementTitle","consumptionValue","reportedUsage","match","info","setInfo","replicationRules","setReplicationRules","bucketPolicy","setBucketPolicy","loadingPolicy","setLoadingPolicy","bucketUsers","setBucketUsers","loadingUsers","setLoadingUsers","loadingBucket","setLoadingBucket","loadingEvents","setLoadingEvents","loadingVersioning","setLoadingVersioning","loadingObjectLocking","setLoadingLocking","loadingReplication","setLoadingReplication","loadingSize","setLoadingSize","loadingEncryption","setLoadingEncryption","accessPolicyScreenOpen","setAccessPolicyScreenOpen","curTab","setCurTab","addScreenOpen","setAddScreenOpen","policyScreenOpen","setPolicyScreenOpen","enableEncryptionScreenOpen","setEnableEncryptionScreenOpen","editLifecycleOpen","setEditLifecycleOpen","selectedEvent","setSelectedEvent","bucketSize","setBucketSize","openSetReplication","setOpenSetReplication","isVersioned","setIsVersioned","hasObjectLocking","setHasObjectLocking","setEncryptionEnabled","setEncryptionCfg","retentionConfigOpen","setRetentionConfigOpen","setPolicyEdit","enableVersioningOpen","setEnableVersioningOpen","canPutReplication","setCanPutReplication","canGetReplication","setCanGetReplication","deleteReplicationModal","setDeleteReplicationModal","selectedRRule","setSelectedRRule","loadingLifecycle","setLoadingLifecycle","lifecycleRecords","setLifecycleRecords","addLifecycleOpen","setAddLifecycleOpen","params","usersEnabled","pages","bucket_name","userCanPutReplication","is_versioned","object_locking_enabled","policies","bucketInfo","loadAllBucketData","fetchPolicies","setOpenReplicationOpen","evnt","PolicyActions","replicationTableActions","replication","lifecycleColumns","expiration","objectST","userTableActions","user","Tabs","newValue","indicatorColor","textColor","scrollButtons","Tab","toLowerCase","direction","sidebarOpen","withRouter","path","ViewBucket","ListBuckets","NotFoundPage","selectedPolicy","setSelectedPolicy","filterPolicies","setFilterPolicies","fetchRecords","pa","pb","elementItem","containerHeader","infoGrid","updateButton","noUnderLine","poolLabel","licenseContainer","licenseInfo","licenseInfoTitle","licenseInfoValue","verifiedIcon","breadcrumLink","selectedTab","setSelectedTab","setPolicy","userList","setUserList","result","log","PolicyDetails","ListPolicies","dLocalStorageV","defaultWidgetsLayout","w","i","minW","moved","static","colorsMain","niceDaysFromNS","roundNumber","panelsConfiguration","singleValue","layoutIdentifier","labelDisplayFunction","dataOuter","widgetConfiguration","outerChart","colorList","innerRadius","outerRadius","startAngle","endAngle","innerChart","pieChart","innerLabel","keyLabel","lineColor","fillColor","linearGraph","yAxisFormatter","xAxisFormatter","customStructure","originTag","displayTag","barChart","singleRep","disableYAxis","calculateMainValue","metricCalc","sumValues","accumulator","sortResult","value1","value2","getWidgetsWithValue","payload","panelItem","payloadData","panelT","typeOfPayload","valueDisplay","chartSeries","valuesArray","totalValues","elementValue","metricKeyItem","Object","metric","metricName","targets","series","plotValues","targetMaster","results","legendFormat","itemVals","labelName","metrics","keysToReplace","expToReplace","RegExp","matchItem","nwMatchItem","constructLabelNames","valInfo","itemIndex","itemToPush","seriesWithColors","series1","series2","serialC","sortedVals","chartBars","sortFunction","structureItem","metricTake","lastValue","a","valuesForBackground","eachVal","saveDashboardDistribution","linearConfiguration","pl","containerElements","chartCont","legendChart","hideYAxis","panelWidth","intervalCount","ResponsiveContainer","AreaChart","CartesianGrid","strokeDasharray","strokeOpacity","XAxis","tickFormatter","interval","tick","tickCount","YAxis","domain","dataMax","section","Area","fillOpacity","wrapperStyle","barChartConfiguration","CustomizedAxisTick","textAnchor","dy","BarChart","layout","barCategoryGap","tickLine","axisLine","bar","Bar","pieChartConfiguration","dataInner","middleLabel","innerColors","outerColors","PieChart","Pie","entry","Cell","dominantBaseline","dateSelectorOverride","parentDateOverride","utils","MomentUtils","DateTimePicker","ampm","format","SyncIcon","displayErrorMessage","widgetsContainer","syncButton","timeStart","setTimeStart","timeEnd","setTimeEnd","panelInformation","setPanelInformation","dashboardDistr","currentItems","storedConfiguration","getItem","parsedConfig","atob","getDashboardDistribution","panels","singlePanelWidth","xSpacing","componentToUse","fetchUsage","stepCalc","secondsInPeriod","unix","periods","widgets","widgetsWithValue","hpanel","totalWidth","cols","containerPadding","onLayoutChange","AllBucketsIcon","EgressIcon","notationContainer","dashboardBG","backgroundSize","dashboardContainer","smallUnit","usage","fixedHeightPaper","prettyNumber","niceBytesUsage","prettyUsage","objects","basicResult","setBasicResult","menuGroups","group","collapsible","LicenseIcon","LogoutIcon","HealIcon","operatorMode","logo","menuList","extraMargin","groupTitle","subTitleMenu","selectorArrow","borderStyle","selectorArrowOpen","menuItem","menuStateBuilder","menuOpen","menuItems","NavLink","IAMPoliciesIcon","allowedPages","documentation","forceDisplay","hasOwnProperty","allowedItems","src","operator_logo","alt","List","groupMember","filterByGroup","ListItem","menuClicked","newMenu","setMenuCollapse","Collapse","in","timeout","unmountOnExit","button","ListItemIcon","ListItemText","primary","Divider","deleteSession","infoDetails","containerScrollable","addSending","setAddSending","isRestrictedByPolicy","setIsRestrictedByPolicy","addServiceAccount","wrapText","selectedServiceAccount","warningBlock","credentialsPanel","newServiceAccount","closeModal","entity","consoleCreds","isArray","credentialsPair","consoleExtras","cCreds","itemMap","access_key","secret_key","filename","createElement","setAttribute","encodeURIComponent","appendChild","click","removeChild","download","usersSort","policySort","stringSort","currentPassword","setCurrentPassword","newPassword","setNewPassword","reNewPassword","setReNewPassword","current_secret_key","new_secret_key","changePassword","imageIcon","iconRoot","setFilter","setSelectedServiceAccount","showNewCredentials","setShowNewCredentials","setNewServiceAccount","changePasswordModalOpen","setChangePasswordModalOpen","serviceAccounts","nsa","closeAddModalAndRefresh","ChangePasswordModal","selectedGroups","setSelectedGroups","fetchGroups","groups","selGroups","selectedUser","currentGroups","setCurrentGroups","getUserInformation","memberOf","checkedUsers","saving","isSaving","accepted","setAccepted","users","selectedGroup","setActualPolicy","groupPolicy","userPolicy","userName","entityType","setSelectedUser","addGroupOpen","setAddGroupOpen","setCheckedUsers","policyOpen","setPolicyOpen","selectionElement","topValue","close","unCheckAll","closeAddGroupBulk","currentPolicies","pol","setCurrentPolicies","isEnabled","Bookmark","UserDetails","ListUsers","selectedUsers","setSelectedUsers","editMode","fetchUsers","selUsers","groupName","setGroupName","groupEnabled","setGroupEnabled","loadingGroup","isLoadingGroup","validGroup","setValidGroup","members","isDeleting","closeNoAction","setGroupOpen","setSelectedGroup","resGroups","notifyPostgres","notifyMysql","notifyKafka","notifyAmqp","notifyMqtt","notifyRedis","notifyNats","notifyElasticsearch","notifyWebhooks","notifyNsq","configurationElements","configuration_id","configuration_label","fieldsConfigurations","cache","compression","etcd","identity_openid","identity_ldap","logger_webhook","audit_webhook","commonFields","notificationEndpointsFields","removeEmptyFields","formFields","field","commonPlaceholder","currentElements","setCurrentElements","onChangeElement","elementsString","elementsUp","cpList","cssOutlinedInput","rootContainer","InputLabelProps","shrink","notchedOutline","valueDef","defaults","defValue","storedConfig","fields","defaultVals","valueHolder","setValueHolder","fieldsElements","defValList","stateInsert","setValueElement","valuesDup","fieldDefinition","selectedConfiguration","valuesObj","setValueObj","setSaving","loadingConfig","setLoadingConfig","configValues","setConfigValues","configId","keyVals","key_values","onValueChange","masterContainer","sliderContainer","slide","float","slideOptions","currentSlide","currentSliderPosition","containerSize","block","BackSettingsIcon","strokeLinecap","initialConfiguration","iconText","customConfigurationPage","setSelectedConfiguration","currentConfiguration","setCurrentConfiguration","servicesList","actionTrigger","targetTitle","useConnectionString","setUseConnectionString","connectionString","setConnectionString","host","setHostname","dbName","setDbName","port","setPort","setUser","password","setPassword","sslMode","setSslMode","table","setTable","setFormat","queueDir","setQueueDir","queueLimit","setQueueLimit","comment","setComment","configToString","strValue","cs","kv","valueIndexes","n1","n2","kvFields","Map","j","substr","set","parseConnectionString","useDsnString","setUseDsnString","dsnString","setDsnString","configToDsnString","regex","exec","lastIndex","parseDsnString","lambdaFormIndicator","service","saveAndRefresh","valuesArr","setValueArr","srvComponent","targetElement","nonLogos","elService","withLogos","setService","lambdaContainer","setIsLoading","currentPanel","setCurrentPanel","resNotEndList","notification_endpoints","service_name","account_id","backClick","red","serviceName","errorMessage","withBreak","errorText","valueString","fileReselect","fieldBottom","fileInputField","accept","showFileSelector","setShowSelector","fileName","evt","callback","file","files","reader","FileReader","readAsDataURL","onload","fileBase64","fileArray","fileProcess","setName","endpoint","setEndpoint","setBucket","creds","setCreds","encodedCreds","setEncodedCreds","accountName","setAccountName","accountKey","setAccountKey","titleSelection","setTitleSelection","s3","accesskey","secretkey","storageclass","gcs","azure","accountname","accountkey","encodedValue","tierData","savingTiers","setSavingTiers","updateCredentialsOpen","setUpdateCredentialsOpen","selectedTier","setSelectedTier","setType","items","getItemName","getItemType","typeSelect","typeItem","UpdateTierCredentiasModal","headerLabel","logger","modalTitle","apiURL","audit","addWebhookOpen","setAddWebhookOpen","panelToDisplay","panelData","toLocaleLowerCase","selectedTenant","retypeTenant","setRetypeTenant","namespace","getDefaultAffinity","tenantName","poolName","podAntiAffinity","requiredDuringSchedulingIgnoredDuringExecution","labelSelector","matchExpressions","operator","topologyKey","getNodeSelector","labels","withPodAntiAffinity","splittedLabels","splitKeyValue","nodeSelector","nodeAffinity","nodeSelectorTerms","def","ADD_TENANT_SET_CURRENT_PAGE","ADD_TENANT_SET_ADVANCED_MODE","ADD_TENANT_UPDATE_FIELD","ADD_TENANT_SET_PAGE_VALID","ADD_TENANT_RESET_FORM","ADD_TENANT_SET_STORAGE_CLASSES_LIST","ADD_TENANT_ADD_MINIO_KEYPAIR","ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR","ADD_TENANT_DELETE_MINIO_KEYPAIR","ADD_TENANT_ADD_CA_KEYPAIR","ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR","ADD_TENANT_DELETE_CA_KEYPAIR","ADD_TENANT_ADD_CONSOLE_CERT","ADD_TENANT_ENCRYPTION_SERVER_CERT","ADD_TENANT_ENCRYPTION_CLIENT_CERT","ADD_TENANT_ENCRYPTION_VAULT_CERT","ADD_TENANT_ENCRYPTION_VAULT_CA","ADD_TENANT_ENCRYPTION_GEMALTO_CA","updateAddField","pageName","fieldName","isPageValid","addConsoleCertificate","commonFormValidation","fieldsValidate","returnErrors","fieldKey","customValidation","customValidationMessage","pattern","customPatternMessage","rgx","clearValidationError","validationErrors","newValidationElement","getRandomString","retval","legalcharacters","random","advancedMode","tenants","createTenant","advancedModeOn","nameTenant","selectedStorageClass","storageClasses","setAdvancedMode","setStorageClassesList","setLimitSize","setValidationErrors","emptyNamespace","setEmptyNamespace","loadingNamespaceInfo","setLoadingNamespaceInfo","updateField","getNamespaceInformation","tenantsList","resourceQuotas","quotas","returnQuotas","rsQuota","stCName","hard","used","getLimitSizes","newStorage","debounceNamespace","useMemo","cancel","customNamespaceError","commonValidation","frmValidationCleanup","customImage","configure","imageName","consoleImage","customDockerhub","imageRegistry","imageRegistryUsername","imageRegistryPassword","exposeMinIO","exposeConsole","prometheusCustom","logSearchCustom","logSearchVolumeSize","logSearchSizeFactor","prometheusVolumeSize","prometheusSizeFactor","logSearchSelectedStorageClass","logSearchImage","kesImage","logSearchPostgresImage","prometheusSelectedStorageClass","prometheusImage","customAccountValidation","commonVal","cleanValidation","idpSelection","identityProvider","accessKeys","secretKeys","openIDURL","openIDClientID","openIDSecretID","ADURL","ADSkipTLS","ADServerInsecure","ADUserNameFilter","ADGroupBaseDN","ADGroupSearchFilter","ADNameAttribute","shortened","buttonTray","updateUserField","newUserField","updatePwordField","customIDPValidation","gutterBottom","enableTLS","security","enableAutoCert","enableCustomCerts","minioCertificates","certificates","caCertificates","consoleCertificate","addFileToCaCertificates","deleteCaCertificate","addCaCertificate","addKeyPair","addFileToKeyPair","deleteKeyPair","keyPair","cert","enableEncryption","encryption","gemaltoEndpoint","gemaltoToken","gemaltoDomain","gemaltoRetry","awsEndpoint","awsRegion","awsKMSKey","awsAccessKey","awsSecretKey","awsToken","vaultEndpoint","vaultEngine","vaultNamespace","vaultPrefix","vaultAppRoleEngine","vaultId","vaultSecret","vaultRetry","vaultPing","gcpProjectID","gcpEndpoint","gcpClientEmail","gcpClientID","gcpPrivateKeyID","gcpPrivateKey","enableCustomCertsForKES","serverCertificate","clientCertificate","vaultCertificate","vaultCA","gemaltoCA","addFileServerCert","addFileClientCert","addFileVaultCert","addFileVaultCa","addFileGemaltoCa","encryptionAvailable","encoded_key","encoded_cert","encryptionValidation","volumeSize","tenantSize","sizeFactor","memoryNode","ecParity","ecParityChoices","cleanECChoices","maxAllocableMemo","memorySize","distribution","ecParityCalc","usableInformation","storageFactors","erasureCode","validateMemorySize","memSize","maxMemSize","clusterSizeFactor","memoSize","capacitySize","maxMemorySize","requestedSizeBytes","memReqSize","limit","capSize","memLimitSize","setMemoryResource","ecCodeValidated","parityValidValues","totalDisks","totalNodes","defaultEC","erasureCodeSet","maxEC","rawCapacity","totalStorage","erasureStripeSet","currentParity","parityNumber","storageFactor","maxCapacity","maxTolerations","maxFailureTolerations","fourVar","erasureCodeCalc","validateClusterSize","getECValue","maxMemory","max_memory","getMaxAllocableMemory","distrCalculate","capacityToUse","calculateDistribution","ecList","ecListTransform","parsedSize","scope","podAffinity","affinity","nodeSelectorLabels","splitItem","validPages","closeAndRefresh","createdAccount","setCreatedAccount","affinityType","affinityObject","dataSend","access_keys","secret_keys","enable_tls","enable_console","enable_prometheus","image","console_image","expose_minio","expose_console","servers","volumes_per_server","volume_configuration","storage_class_name","resources","requests","memory","limits","erasureCodingParity","image_registry","registry","username","logSearchConfiguration","storageSize","postgres_image","prometheusConfiguration","tenantCerts","consoleCerts","caCerts","ca_certificates","minio","crt","tls","insertEncrypt","gemaltoCAIntroduce","ca","gemalto","keysecure","credentials","token","retry","aws","secretsmanager","kmskey","gcp","secretmanager","project_id","client_email","client_id","private_key_id","private_key","vaultKeyPair","vaultCAInsert","vaultTLS","vault","engine","approle","secret","ping","encryptionServerKeyPair","encryptionClientKeyPair","client","server","dataIDP","keyarray","oidc","secret_id","active_directory","skip_tls_verification","server_insecure","username_format","user_search_filter","group_search_base_dn","group_search_filter","group_name_attribute","idp","consoleSAList","newSrvAcc","consoleItem","consoleKey","cancelButton","advancedOnly","filteredWizardSteps","resetAddTenantForm","tenantsContainer","setSelectedTenant","filterTenants","setFilterTenants","tenant","resTenants","capacity","total_size","reloadData","bottomContainer","factorElements","sizeNumber","sizeDescription","onClosePoolAndReload","numberOfNodes","setNumberOfNodes","setVolumeSize","setVolumesPerSever","setSelectedStorageClass","setStorageClasses","instanceCapacity","totalCapacity","defaultAffinity","sourceBucket","setSourceBucket","clusterSelected","setClusterSelected","setDestinationBucket","address","setAddress","BorderLinearProgress","colorPrimary","padChart","allValue","currentUsage","centerItem","maxValue","porcentualValue","idTenant","isSending","setIsSending","minioImage","setMinioImage","setConsoleImage","setImageRegistry","imageRegistryEndpoint","setImageRegistryEndpoint","setImageRegistryUsername","setImageRegistryPassword","validMinioImage","setValidMinioImage","validConsoleImage","setValidConsoleImage","validateImage","fieldToCheck","test","tenantYaml","setTenantYaml","setErrorMessage","yaml","loadingActivateProduct","loadingLicenseInfo","activateProduct","subnet_license","organization","storage_capacity","expires_at","plan","email","licenseButton","setCapacity","poolCount","setPoolCount","setPools","pods","setPods","instances","setInstances","volumes","setVolumes","addPoolOpen","setAddPool","setAddBucketOpen","addReplicationOpen","setAddReplicationOpen","setTenant","loadingUsage","setLoadingUsage","usageError","setUsageError","setUsage","updateMinioVersion","setUpdateMinioVersion","yamlScreenOpen","setYamlScreenOpen","setLicenseInfo","setLoadingLicenseInfo","setLoadingActivateProduct","logEnabled","setLogEnabled","monitoringEnabled","setMonitoringEnabled","adEnabled","setAdEnabled","oicEnabled","setOicEnabled","tenantNamespace","loadInfo","resPools","totalInstances","totalVolumes","poolNamedIndex","pool","cap","idpAdEnabled","idpOicEnabled","loadUsage","currentTime","time","timeCreated","editYaml","reload","aria-controls","aria-haspopup","keepMounted","Boolean","colSpan","endpoints","rel","currentState","OBJECT_BROWSER_ADD_ROUTE","OBJECT_BROWSER_RESET_ROUTES_LIST","OBJECT_BROWSER_REMOVE_ROUTE_LEVEL","OBJECT_BROWSER_SET_ALL_ROUTES","OBJECT_BROWSER_CREATE_FOLDER","OBJECT_BROWSER_SET_LAST_AS_FILE","OBJECT_BROWSER_DOWNLOAD_FILE_LOADER","OBJECT_BROWSER_DOWNLOADED_FILE","addRoute","route","routeType","removeRouteLevel","toRoute","setAllRoutes","currentRoute","fileIsBeingPrepared","fileDownloadStarted","objectBrowser","objectsList","listBreadcrumbs","objectItem","resetRoutesList","reset","usedSpaceCol","subTitleLabel","iconBucket","browsePaper","pop","idElement","currentPath","newPath","globalClass","rowClass","watchList","inputField","lastElementWPadding","pathIn","selectedObject","recursive","endsWith","createFolder","newRoute","pathLabel","folderName","pathUrl","setPathUrl","folderTruncated","UploadFile","objectPath","versionID","callBack","includeVersionInCallback","anchor","xhr","XMLHttpRequest","allPathData","objectName","isNullOrUndefined","responseType","this","blob","Blob","blobUrl","URL","createObjectURL","revokeObjectURL","remove","commonIcon","defLoading","setLastAsFile","setLoadingProgress","progress","loadingProgress","routesList","downloadingFiles","fileNameText","iconFolder","iconFile","listButton","createFolderOpen","setCreateFolderOpen","setSelectedObject","filterObjects","setFilterObjects","loadingStartTime","setLoadingStartTime","setLoadingMessage","delay","savedCallback","setInterval","clearInterval","useInterval","timeDelta","now","updateMessage","internalPaths","extraPath","currentTimestamp","folders","record","recordsInElement","verifyIfIsFile","removeDownloadAnimation","uploadObject","splitPaths","uploadUrl","areMultipleFiles","okMessage","withCredentials","upload","addEventListener","loaded","onerror","onloadend","formData","FormData","blobFile","append","idElementClean","pathInArray","object","version_id","Input","multiple","elementString","last_modified","copyButtonContainer","dataObject","shareURL","setShareURL","isLoadingFile","setIsLoadingFile","selectedDate","setSelectedDate","dateValid","setDateValid","slDate","currDate","diffDate","getTime","dateContainer","newDate","DownloadIcon","objectInfo","statusEnabled","setStatusEnabled","setDate","isDateValid","setIsDateValid","setIsSaving","alreadyConfigured","setAlreadyConfigured","retention_mode","retention_until_date","valueDate","getDate","dateElement","showSwitcher","versionId","expireDate","expires","addRetention","disableRetention","currentTags","onCloseAndUpdate","newKey","setNewKey","newLabel","setNewLabel","newTag","newTagList","selectedTag","setDeleteSending","tagKey","tagLabel","cleanObject","actualInfo","legalHoldEnabled","setLegalHoldEnabled","emptyFile","is_latest","legal_hold_status","objectNameContainer","objectPathContainer","objectPathLink","propertiesContainer","propertiesItem","propertiesItemBold","propertiesValue","propertiesIcon","actionsIconContainer","actionsIcon","tagsContainer","tagText","tag","search","loadObjectData","setLoadObjectData","shareFileModalOpen","setShareFileModalOpen","retentionModalOpen","setRetentionModalOpen","tagModalOpen","setTagModalOpen","deleteTagModalOpen","setDeleteTagModalOpen","setSelectedTag","legalholdOpen","setLegalholdOpen","setActualInfo","versions","setVersions","filterVersion","setFilterVersion","pathInBucket","tagKeys","shareObject","downloadObject","includeVersion","version","updateInfo","redirectBack","reloadObjectData","Chip","deleteIcon","onDelete","deleteTag","clickable","currentItem","planDetails","price","capacityMin","capacityMax","planItems","community","communityDetail","standard","standardDetail","enterprise","enterpriseDetail","planButtons","text2","link","subnetLicenseKey","subnetLoginForm","licenseKeyField","pageTitle","buttonSignup","license","setLicense","subnetPassword","setSubnetPassword","subnetEmail","setSubnetEmail","rows","detailsContainer","detailsContainerBorder","detailsContainerBorderHighlighted","detailsTitle","activePlanHeader","planHeader","detailsPrice","detailsCapacityMax","detailsCapacityMin","itemContainer","itemContainerDetail","alignContent","itemFirst","itemHighlighted","checkIcon","buttonContainerBlank","buttonContainerHighlighted","openSourcePolicy","activateLink","clear","subnetRefreshLicenseLink","midWidth","smallWidth","licenseDescription","currentPlanBG","currentPlanButton","planItemsPadding","subnetSubTitle","fetchLicenseInfo","setCurrentPlanID","activateProductModal","setActivateProductModal","currentPlanID","loadingRefreshLicense","setLoadingRefreshLicense","details","currentPlan","TRACE_MESSAGE_RECEIVED","TRACE_RESET_MESSAGES","wsProtocol","protocol","messages","trace","traceMessageReceived","traceResetMessages","logList","sizeItem","timeItem","wsProt","c","W3CWebSocket","onopen","onmessage","ptime","moment","toDate","onclose","timeParse","fullElement","statusCode","statusMsg","LOG_MESSAGE_RECEIVED","LOG_RESET_MESSAGES","logs","logMessageReceived","logResetMessages","tab","logerror","logerror_tab","ansidefault","highlight","setHighlight","renderLog","logElement","logMessage","ConsoleMsg","highlightedLine","startsWith","errorElems","deploymentid","requestID","remotehost","userAgent","source","renderError","renderLines","buttonKit","toggleButton","inputBar","advancedLabel","advancedLabelContainer","getInformationContainer","orderButton","recordsLabel","blockCollapsed","filterOpen","endLineAction","filtersContainer","innerContainer","noticeLabel","tableFOpen","tableFClosed","setFilterOpen","apiName","setApiName","setUserAgent","setObject","setRequestID","responseStatus","setResponseStatus","sortOrder","setSortOrder","setColumnsShown","setNextPage","alreadyFetching","setAlreadyFetching","recordsResp","queryParams","fetchedResults","newResultSet","response_status_code","response_status","colName","newArray","sortData","newSortDirection","resolve","currentTab","setCurrentTab","showLogSearch","setShowLogSearch","graphContainer","scanInfo","scanData","inlineCheckboxes","start","setStart","setBucketName","bucketList","setBucketList","setRecursive","forceStart","setForceStart","forceStop","setForceStop","beforeHeal","afterHeal","objectsHealed","objectsScanned","healDuration","sizeScanned","hStatus","setHStatus","colorHealthArr","Green","Yellow","Red","Grey","cB","cA","entries","healthAfterCols","itemsScanned","healthBeforeCols","bytesScanned","datasets","bucketNames","legend","WATCH_MESSAGE_RECEIVED","WATCH_RESET_MESSAGES","watch","watchMessageReceived","watchResetMessages","searchPrefix","some","Time","HEALTH_INFO_MESSAGE_RECEIVED","HEALTH_INFO_RESET_MESSAGE","DiagStatError","DiagStatSuccess","DiagStatInProgress","healthInfo","serverDiagnosticStatus","healthInfoMessageReceived","healthInfoResetMessage","setServerDiagStat","gap","startDiagnostic","setStartDiagnostic","downloadDisabled","setDownloadDisabled","code","tableWrapper","DIRECT_CSI_SELECT_DRIVE","closeFormatModalAndRefresh","allDrives","drivesToFormat","formatAll","setFormatAll","force","setForce","drives","formatIssuesList","errorsList","onCloseFormatErrorsList","selectDrive","driveName","notAvailableNotice","linkItem","checkedDrives","setCheckedDrives","formatOpen","setFormatOpen","formatErrorsResult","setFormatErrorsResult","formatErrorsOpen","setFormatErrorsOpen","setDrivesToFormat","notAvailable","setNotAvailable","newItem","joinName","node","drive","d1","d2","driveID","routes","tabsContainer","StoragePVCs","DirectCSIDrives","render","isServerLoading","serverIsLoading","snackBarMessage","toolbar","default","toolbarIcon","mixins","appBar","drawer","transitions","create","easing","sharp","duration","leavingScreen","appBarShift","enteringScreen","menuButton","menuButtonHidden","drawerPaper","drawerPaperClose","breakpoints","up","warningBar","heigh","widht","allowedRoutes","Dashboard","Buckets","ObjectBrowser","ObjectRouting","Watch","Users","Groups","Policies","Heal","Trace","LogsMain","HealthInfo","ConfigurationMain","Account","WebhookPanel","TenantsMain","Storage","TenantDetails","License","Drawer","exact","routerProps","LoginCallback","errorDescription","setErrorDescription","sessionId","SESSION_RESPONSE","consoleOperatorMode","saveSessionResponse","Component","sessionLoading","setSessionLoading","pathname","hot","Login","Console","initialState","features","initialRoute","selectedDrive","globalReducer","combineReducers","newRouteList","indexOfTopPath","newRouteLevels","splitRoutes","routesArray","initRoute","newSetOfRoutes","newFoldersRoutes","lastRoute","splitElements","folderTrim","currentList","lastItem","newList","actualFiles","newState","has","originPageNameItems","joinValue","originValidPages","newSetOfPages","elm","changeCL","minioCerts","NCertList","minioCertsList","cleanMinioCertsList","CACerts","NACList","CACertsList","consoleCert","encServerCert","encClientCert","encVaultCert","encVaultCA","encGemaltoCA","directCSI","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","createMuiTheme","light","dark","contrastText","grey","100","200","300","400","500","600","700","800","900","typography","h1","h2","h3","h4","h5","h6","overrides","MuiButton","GlobalCss","ReactDOM","store","createStore","applyMiddleware","thunk","ThemeProvider","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"oOAEeA,gB,6ICgCFC,EAAc,cACdC,EAAgB,gBAChBC,EAAY,YACZC,EAAuB,uBACvBC,EAAoB,oBACpBC,EAAuB,uBACvBC,EAAwB,wBACxBC,EAAuB,uBACvBC,EAA0B,0BAC1BC,EAA0B,0BAC1BC,EAA0B,0BCdhC,SAASC,EAAaC,GAC3B,MAAO,CACLC,KAAMb,EACNc,OAAQF,GAWL,SAASG,EAAYC,GA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AEf,CACE/lB,KAAM,UACN2O,UAAU,EACVP,MAAO,UACPkC,QAAS,wCACThS,KAAM,UACNynB,YAAa,kBAGjBq9B,MAAO,CACL,CACEpjD,KAAM,SACN2O,UAAU,EACVP,MAAO,SACPkC,QACE,yEACFhS,KAAM,MACNynB,YAAa,qBAEf,CACE/lB,KAAM,SACN2O,UAAU,EACVP,MAAO,SACPkC,QAAS,0CACThS,KAAM,SACNynB,YAAa,wBAEf,CACE/lB,KAAM,QACN2O,UAAU,EACVP,MAAO,QACPkC,QAAS,kDACThS,KAAM,SACNynB,YAAa,cAEf,CACE/lB,KAAM,UACN2O,UAAU,EACVP,MAAO,UACPkC,QACE,0FACFhS,KAAM,MACNynB,YAAa,qCAEf,CACE/lB,KAAM,QACN2O,UAAU,EACVP,MAAO,QACPkC,QAAS,oDACThS,KAAM,SACNynB,YAAa,4BAEf,CACE/lB,KAAM,gBACN2O,UAAU,EACVP,MAAO,gBACPkC,QAAS,gBACThS,KAAM,SACNynB,YAAa,uBAEf,CACE/lB,KAAM,iBACN2O,UAAU,EACVP,MAAO,iBACPkC,QAAS,iBACThS,KAAM,SACNynB,YAAa,wBAEf,CACE/lB,KAAM,UACN2O,UAAU,EACVP,MAAO,UACPkC,QAAS,wCACThS,KAAM,UACNwnB,WAAW,EACXC,YAAa,kBAGjBs9B,YAAa,CACX,CACErjD,KAAM,aACN2O,UAAU,EACVP,MAAO,aACPkC,QACE,mFACFhS,KAAM,MACNynB,YAAa,qBACbiV,YAAY,GAEd,CACEh7B,KAAM,aACN2O,UAAU,EACVP,MAAO,aACPkC,QACE,gGACFhS,KAAM,MACNynB,YAAa,oBACbiV,YAAY,IAGhBsoB,KAAM,CACJ,CACEtjD,KAAM,YACN2O,UAAU,EACVP,MAAO,YACPkC,QACE,mFACFhS,KAAM,MACNynB,YAAa,kBAEf,CACE/lB,KAAM,cACN2O,UAAU,EACVP,MAAO,cACPkC,QAAS,wDACThS,KAAM,SACNynB,YAAa,qBAEf,CACE/lB,KAAM,eACN2O,UAAU,EACVP,MAAO,eACPkC,QAAS,kDACThS,KAAM,SACNynB,YAAa,sBAEf,CACE/lB,KAAM,cACN2O,UAAU,EACVP,MAAO,cACPkC,QAAS,sCACThS,KAAM,SACNynB,YAAa,qBAEf,CACE/lB,KAAM,kBACN2O,UAAU,EACVP,MAAO,kBACPkC,QAAS,0CACThS,KAAM,SACNynB,YAAa,yBAEf,CACE/lB,KAAM,UACN2O,UAAU,EACVP,MAAO,UACPkC,QAAS,wCACThS,KAAM,UACNwnB,WAAW,EACXC,YAAa,kBAGjBw9B,gBAAiB,CACf,CACEvjD,KAAM,aACN2O,UAAU,EACVP,MAAO,aACPkC,QAAS,yCACThS,KAAM,SACNynB,YAAa,oBAEf,CACE/lB,KAAM,YACN2O,UAAU,EACVP,MAAO,YACP9P,KAAM,SACNynB,YAAa,mBAEf,CACE/lB,KAAM,aACN2O,UAAU,EACVP,MAAO,aACPkC,QAAS,aACThS,KAAM,SACNynB,YAAa,oBAEf,CACE/lB,KAAM,eACN2O,UAAU,EACVP,MAAO,eACPkC,QAAS,eACThS,KAAM,SACNynB,YAAa,uBAGjBy9B,cAAe,CACb,CACExjD,KAAM,cACN2O,UAAU,EACVP,MAAO,cACPkC,QAAS,qDACThS,KAAM,SACNynB,YAAa,wBAEf,CACE/lB,KAAM,kBACN2O,UAAU,EACVP,MAAO,kBACPkC,QACE,mHACFhS,KAAM,MACNynB,YAAa,yBAEf,CACE/lB,KAAM,yBACN2O,UAAU,EACVP,MAAO,yBACPkC,QACE,mFACFhS,KAAM,SACNynB,YAAa,gCAEf,CACE/lB,KAAM,sBACN2O,UAAU,EACVP,MAAO,sBACPkC,QACE,8EACFhS,KAAM,SACNynB,YAAa,6BAEf,CACE/lB,KAAM,0BACN2O,UAAU,EACVP,MAAO,0BACPkC,QAAS,2DACThS,KAAM,MACNynB,YAAa,iCAEf,CACE/lB,KAAM,uBACN2O,UAAU,EACVP,MAAO,uBACPkC,QAAS,4CACThS,KAAM,SACNynB,YAAa,8BAEf,CACE/lB,KAAM,aACN2O,UAAU,EACVP,MAAO,aACPkC,QACE,sEACFhS,KAAM,SACNynB,YAAa,oBAEf,CACE/lB,KAAM,kBACN2O,UAAU,EACVP,MAAO,kBACPkC,QACE,oEACFhS,KAAM,UAER,CACE0B,KAAM,kBACN2O,UAAU,EACVP,MAAO,kBACPkC,QACE,mEACFhS,KAAM,UAER,CACE0B,KAAM,UACN2O,UAAU,EACVP,MAAO,UACPkC,QAAS,2CACThS,KAAM,UACNynB,YAAa,kBAGjB09B,eAAgB,CACd,CACEzjD,KAAM,WACN2O,UAAU,EACVP,MAAO,WACP9P,KAAM,SACNynB,YAAa,kBAEf,CACE/lB,KAAM,aACN2O,UAAU,EACVP,MAAO,aACP9P,KAAM,SACNynB,YAAa,qBAGjB29B,cAAe,CACb,CACE1jD,KAAM,WACN2O,UAAU,EACVP,MAAO,WACP9P,KAAM,SACNynB,YAAa,kBAEf,CACE/lB,KAAM,aACN2O,UAAU,EACVP,MAAO,aACP9P,KAAM,SACNynB,YAAa,sBAKb49B,GAAe,CACnB,CACE3jD,KAAM,YACNoO,MAAO,kBACPO,UAAU,EAEV2B,QAAS,2DACThS,KAAM,SACNynB,YAAa,yBAEf,CACE/lB,KAAM,cACNoO,MAAO,cACPO,UAAU,EAEV2B,QAAS,8DACThS,KAAM,SACNynB,YAAa,qBAEf,CACE/lB,KAAM,UACNoO,MAAO,UACPO,UAAU,EACVrQ,KAAM,UACNynB,YAAa,kBAIJ69B,IAAgC,sBAC1CpB,GAD0C,CAEzC,CACExiD,KAAM,UACNoO,MAAO,UACPO,UAAU,EAEV2B,QAAS,iDACThS,KAAM,SACNynB,YAAa,iBAEf,CACE/lB,KAAM,QACNoO,MAAO,QACPkC,QAAS,4CACThS,KAAM,SACNynB,YAAa,eAEf,CACE/lB,KAAM,gBACNoO,MAAO,gBACPkC,QAAS,uDACThS,KAAM,SACNynB,YAAa,uBAEf,CACE/lB,KAAM,gBACNoO,MAAO,gBACPkC,QAAS,uDACThS,KAAM,SACNynB,YAAa,uBAEf,CACE/lB,KAAM,iBACNoO,MAAO,iBACPkC,QAAS,iDACThS,KAAM,UAER,CACE0B,KAAM,kBACNoO,MAAO,kBACPkC,QACE,uEACFhS,KAAM,SACNynB,YAAa,yBAEf,CACE/lB,KAAM,OACNoO,MAAO,OACPkC,QAAS,4CACThS,KAAM,UAER,CACE0B,KAAM,MACNoO,MAAO,MACPkC,QAAS,4BACThS,KAAM,UAER,CACE0B,KAAM,kBACNoO,MAAO,kBACPkC,QACE,mEACFhS,KAAM,UAER,CACE0B,KAAM,kBACNoO,MAAO,kBACPkC,QAAS,2CACThS,KAAM,OACNynB,YAAa,yBAEf,CACE/lB,KAAM,iBACNoO,MAAO,iBACPkC,QAAS,mCACThS,KAAM,OACNynB,YAAa,wBAEf,CACE/lB,KAAM,UACNoO,MAAO,UACPkC,QAAS,uDACThS,KAAM,SACNynB,YAAa,wBApF0B,OAsFtC49B,KAtFsC,gBAwF1ClB,GAxF0C,CAyFzC,CACEziD,KAAM,MACN2O,UAAU,EACVP,MAAO,MACPkC,QACE,sEACFhS,KAAM,OAER,CACE0B,KAAM,WACNoO,MAAO,WACPkC,QAAS,4BACThS,KAAM,SACNynB,YAAa,kBAEf,CACE/lB,KAAM,gBACNoO,MAAO,gBACPkC,QAAS,qBACThS,KAAM,SACNynB,YAAa,uBAEf,CACE/lB,KAAM,cACNoO,MAAO,cACPkC,QAAS,6BACThS,KAAM,SACNynB,YAAa,qBAEf,CACE/lB,KAAM,YACNoO,MAAO,YACPkC,QACE,yEACFhS,KAAM,UAER,CACE0B,KAAM,UACNoO,MAAO,UACPkC,QACE,0EACFhS,KAAM,UAER,CACE0B,KAAM,UACNoO,MAAO,UACPkC,QACE,mEACFhS,KAAM,UAER,CACE0B,KAAM,WACNoO,MAAO,WACPkC,QACE,yGACFhS,KAAM,UAER,CACE0B,KAAM,eACNoO,MAAO,eACPkC,QACE,kEACFhS,KAAM,UAER,CACE0B,KAAM,gBAC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,SACNynB,YAAa,uBAEf,CACE/lB,KAAM,WACNoO,MAAO,WACPkC,QAAS,gBACThS,KAAM,SACNynB,YAAa,uBAEf,CACE/lB,KAAM,QACNoO,MAAO,QACPkC,QAAS,aACThS,KAAM,SACNynB,YAAa,oBAEf,CACE/lB,KAAM,MACNoO,MAAO,MACPkC,QAAS,4BACThS,KAAM,UAER,CACE0B,KAAM,kBACNoO,MAAO,kBACPkC,QACE,mEACFhS,KAAM,UAER,CACE0B,KAAM,gBACNoO,MAAO,gBACPkC,QAAS,gEACThS,KAAM,WACNynB,YAAa,uBAEf,CACE/lB,KAAM,YACNoO,MAAO,YACPkC,QAAS,4CACThS,KAAM,UAER,CACE0B,KAAM,kBACNoO,MAAO,kBACPkC,QAAS,8CACThS,KAAM,UAER,CACE0B,KAAM,mCACNoO,MAAO,uCACPkC,QAAS,yDACThS,KAAM,SACNynB,YAAa,mCAEf,CACE/lB,KAAM,uBACNoO,MAAO,uBACPkC,QAAS,uCACThS,KAAM,SACNynB,YAAa,8BAEf,CACE/lB,KAAM,iBACNoO,MAAO,iBACPkC,QAAS,sDACThS,KAAM,SACNynB,YAAa,wBAEf,CACE/lB,KAAM,cACNoO,MAAO,cACPkC,QAAS,iCACThS,KAAM,SACNynB,YAAa,qBAEf,CACE/lB,KAAM,aACNoO,MAAO,aACPkC,QAAS,qCACThS,KAAM,SACNynB,YAAa,qBAzV0B,OA2VtC49B,KA3VsC,gBA6V1Cd,GA7V0C,CA8VzC,CACE7iD,KAAM,MACN2O,UAAU,EACVP,MAAO,MACPkC,QACE,oEACFhS,KAAM,MACNynB,YAAa,aAEf,CACE/lB,KAAM,QACN2O,UAAU,EACVP,MAAO,QACPkC,QACE,oEACFhS,KAAM,SACNynB,YAAa,eAEf,CACE/lB,KAAM,SACN2O,UAAU,EACVP,MAAO,SACPkC,QACE,gIACFhS,KAAM,OACNynB,YAAa,iBAvX0B,OAyXtC49B,KAzXsC,gBA2X1Cb,GA3X0C,CA4XzC,CACE9iD,KA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WAAY,CACVvkF,WAAY,CAAC,OAAQ,cAAcwiB,KAAK,KACxCgiE,GAAI,CACFrqF,WAAY,OACZD,MAAO,WAETuqF,GAAI,CACFtqF,WAAY,OACZD,MAAO,WAETwqF,GAAI,CACFvqF,WAAY,OACZD,MAAO,WAETyqF,GAAI,CACFxqF,WAAY,OACZD,MAAO,WAET0qF,GAAI,CACFzqF,WAAY,OACZD,MAAO,WAET2qF,GAAI,CACF1qF,WAAY,OACZD,MAAO,YAGX4qF,UAAW,CACTC,UAAW,CACTrvE,KAAM,CACJ/c,aAAc,EACduB,MAAO,QACPlB,OAAQ,GACRe,QAAS,SACTK,SAAU,GACVD,WAAY,IACZL,UAAW,OACX,qBAAsB,CACpB8F,UAAW,IAEb,qCAAsC,CACpCnH,gBAAiB,UACjB0B,WAAY,IACZD,MAAO,WAET,8CAA+C,CAC7CE,SAAU,SCpDd4qF,GAAYxsF,YAAW,CAE3B,UAAW,CAET,uBAAwB,CACtB4B,SAAU,OACV8L,cAAe,aACfnM,QAAS,sBACTpB,aAAc,GAEhB,uBAAwB,CACtBoB,QAAS,WACTK,SAAU,aAEZ,qBAAsB,CACpBzB,aAAc,kBACdyB,SAAU,IAEZ,iBAAkB,CAChBzB,aAAc,GAEhB,mCAAoC,CAClC0N,YAAa,GAEf,kBAAmB,CACjB,mBAAoB,CAClB1N,aAAc,MA1BJH,EA8Bf,kBAAM,QAETysF,IAAStI,OACP,eAAC,IAAD,CAAUuI,MHVHC,aAAYpE,GAAeuC,GAAiB8B,aAAgBC,QGUnE,UACE,cAACL,GAAD,IACA,cAACM,GAAA,EAAD,CAAe3tF,MAAOA,GAAtB,SAEE,cAAC,GAAD,SAGJrH,SAASi1F,eAAe,SFmEpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAMnvF,MAAK,SAACovF,GAClCA,EAAaC,kB","file":"static/js/main.e94e6cae.chunk.js","sourcesContent":["import { createBrowserHistory } from \"history\";\n\nexport default createBrowserHistory();\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 .\nexport interface snackBarMessage {\n message: string;\n type: \"message\" | \"error\";\n}\n\nexport interface SystemState {\n loggedIn: boolean;\n operatorMode: boolean;\n sidebarOpen: boolean;\n session: string;\n userName: string;\n serverNeedsRestart: boolean;\n serverIsLoading: boolean;\n loadingProgress: number;\n snackBar: snackBarMessage;\n modalSnackBar: snackBarMessage;\n serverDiagnosticStatus: string;\n}\n\nexport const USER_LOGGED = \"USER_LOGGED\";\nexport const OPERATOR_MODE = \"OPERATOR_MODE\";\nexport const MENU_OPEN = \"MENU_OPEN\";\nexport const SERVER_NEEDS_RESTART = \"SERVER_NEEDS_RESTART\";\nexport const SERVER_IS_LOADING = \"SERVER_IS_LOADING\";\nexport const SET_LOADING_PROGRESS = \"SET_LOADING_PROGRESS\";\nexport const SET_SNACK_BAR_MESSAGE = \"SET_SNACK_BAR_MESSAGE\";\nexport const SET_SERVER_DIAG_STAT = \"SET_SERVER_DIAG_STAT\";\nexport const SET_ERROR_SNACK_MESSAGE = \"SET_ERROR_SNACK_MESSAGE\";\nexport const SET_SNACK_MODAL_MESSAGE = \"SET_SNACK_MODAL_MESSAGE\";\nexport const SET_MODAL_ERROR_MESSAGE = \"SET_MODAL_ERROR_MESSAGE\";\n\ninterface UserLoggedAction {\n type: typeof USER_LOGGED;\n logged: boolean;\n}\n\ninterface OperatorModeAction {\n type: typeof OPERATOR_MODE;\n operatorMode: boolean;\n}\n\ninterface SetMenuOpenAction {\n type: typeof MENU_OPEN;\n open: boolean;\n}\n\ninterface ServerNeedsRestartAction {\n type: typeof SERVER_NEEDS_RESTART;\n needsRestart: boolean;\n}\n\ninterface ServerIsLoading {\n type: typeof SERVER_IS_LOADING;\n isLoading: boolean;\n}\ninterface SetLoadingProgress {\n type: typeof SET_LOADING_PROGRESS;\n loadingProgress: number;\n}\n\ninterface SetServerDiagStat {\n type: typeof SET_SERVER_DIAG_STAT;\n serverDiagnosticStatus: string;\n}\n\ninterface SetSnackBarMessage {\n type: typeof SET_SNACK_BAR_MESSAGE;\n message: string;\n}\n\ninterface SetErrorSnackMessage {\n type: typeof SET_ERROR_SNACK_MESSAGE;\n message: string;\n}\n\ninterface SetModalSnackMessage {\n type: typeof SET_SNACK_MODAL_MESSAGE;\n message: string;\n}\n\ninterface SetModalErrorMessage {\n type: typeof SET_MODAL_ERROR_MESSAGE;\n message: string;\n}\n\nexport type SystemActionTypes =\n | UserLoggedAction\n | OperatorModeAction\n | SetMenuOpenAction\n | ServerNeedsRestartAction\n | ServerIsLoading\n | SetLoadingProgress\n | SetServerDiagStat\n | SetSnackBarMessage\n | SetErrorSnackMessage\n | SetModalSnackMessage\n | SetModalErrorMessage;\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 {\n MENU_OPEN,\n OPERATOR_MODE,\n SERVER_IS_LOADING,\n SERVER_NEEDS_RESTART,\n USER_LOGGED,\n SET_LOADING_PROGRESS,\n SET_SNACK_BAR_MESSAGE,\n SET_SERVER_DIAG_STAT,\n SET_ERROR_SNACK_MESSAGE,\n SET_SNACK_MODAL_MESSAGE,\n SET_MODAL_ERROR_MESSAGE,\n} from \"./types\";\n\nexport function userLoggedIn(loggedIn: boolean) {\n return {\n type: USER_LOGGED,\n logged: loggedIn,\n };\n}\n\nexport function consoleOperatorMode(operatorMode: boolean) {\n return {\n type: OPERATOR_MODE,\n operatorMode: operatorMode,\n };\n}\n\nexport function setMenuOpen(open: boolean) {\n return {\n type: MENU_OPEN,\n open: open,\n };\n}\n\nexport function serverNeedsRestart(needsRestart: boolean) {\n return {\n type: SERVER_NEEDS_RESTART,\n needsRestart: needsRestart,\n };\n}\n\nexport function serverIsLoading(isLoading: boolean) {\n return {\n type: SERVER_IS_LOADING,\n isLoading: isLoading,\n };\n}\n\nexport const setLoadingProgress = (progress: number) => {\n return {\n type: SET_LOADING_PROGRESS,\n loadingProgress: progress,\n };\n};\n\nexport const setServerDiagStat = (status: string) => {\n return {\n type: SET_SERVER_DIAG_STAT,\n serverDiagnosticStatus: status,\n };\n};\n\nexport const setSnackBarMessage = (message: string) => {\n return {\n type: SET_SNACK_BAR_MESSAGE,\n message,\n };\n};\n\nexport const setErrorSnackMessage = (message: string) => {\n return {\n type: SET_ERROR_SNACK_MESSAGE,\n message,\n };\n};\n\nexport const setModalSnackMessage = (message: string) => {\n return {\n type: SET_SNACK_MODAL_MESSAGE,\n message,\n };\n};\n\nexport const setModalErrorSnackMessage = (message: string) => {\n return {\n type: SET_MODAL_ERROR_MESSAGE,\n message,\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\nexport interface ILoginDetails {\n loginStrategy: loginStrategyType;\n redirect: string;\n}\n\nexport enum loginStrategyType {\n unknown = \"unknown\",\n form = \"form\",\n redirect = \"redirect\",\n serviceAccount = \"service-account\",\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 storage from \"local-storage-fallback\";\nimport { ICapacity, IErasureCodeCalc, IStorageFactors } from \"./types\";\nimport { IPool } from \"../screens/Console/Tenants/ListTenants/types\";\n\nconst minStReq = 1073741824; // Minimal Space required for MinIO\nconst minMemReq = 2147483648; // Minimal Memory required for MinIO in bytes\n\nexport const units = [\n \"B\",\n \"KiB\",\n \"MiB\",\n \"GiB\",\n \"TiB\",\n \"PiB\",\n \"EiB\",\n \"ZiB\",\n \"YiB\",\n];\nexport const k8sUnits = [\"Ki\", \"Mi\", \"Gi\", \"Ti\", \"Pi\", \"Ei\"];\nexport const k8sCalcUnits = [\"B\", ...k8sUnits];\n\nexport const niceBytes = (x: string, showK8sUnits: boolean = false) => {\n let l = 0,\n n = parseInt(x, 10) || 0;\n\n while (n >= 1024 && ++l) {\n n = n / 1024;\n }\n //include a decimal point and a tenths-place digit if presenting\n //less than ten of KB or greater units\n const k8sUnitsN = [\"B\", ...k8sUnits];\n return (\n n.toFixed(n < 10 && l > 0 ? 1 : 0) +\n \" \" +\n (showK8sUnits ? k8sUnitsN[l] : units[l])\n );\n};\n\nexport const setCookie = (name: string, val: string) => {\n const date = new Date();\n const value = val;\n\n // Set it expire in 45 minutes\n date.setTime(date.getTime() + 45 * 60 * 1000);\n\n // Set it\n document.cookie =\n name + \"=\" + value + \"; expires=\" + date.toUTCString() + \"; path=/\";\n};\n\nexport const deleteCookie = (name: string) => {\n document.cookie = name + \"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;\";\n};\n\nexport const clearSession = () => {\n storage.removeItem(\"token\");\n deleteCookie(\"token\");\n};\n\n// timeFromDate gets time string from date input\nexport const timeFromDate = (d: Date) => {\n let h = d.getHours() < 10 ? `0${d.getHours()}` : `${d.getHours()}`;\n let m = d.getMinutes() < 10 ? `0${d.getMinutes()}` : `${d.getMinutes()}`;\n let s = d.getSeconds() < 10 ? `0${d.getSeconds()}` : `${d.getSeconds()}`;\n\n return `${h}:${m}:${s}:${d.getMilliseconds()}`;\n};\n\n// units to be used in a dropdown\nexport const factorForDropdown = () => {\n return units.map((unit) => {\n return { label: unit, value: unit };\n });\n};\n\n// units to be used in a dropdown\nexport const k8sfactorForDropdown = () => {\n return k8sUnits.map((unit) => {\n return { label: unit, value: unit };\n });\n};\n\n//getBytes, converts from a value and a unit from units array to bytes\nexport const getBytes = (\n value: string,\n unit: string,\n fromk8s: boolean = false\n) => {\n const vl: number = parseFloat(value);\n\n const unitsTake = fromk8s ? k8sCalcUnits : units;\n\n const powFactor = unitsTake.findIndex((element) => element === unit);\n\n if (powFactor === -1) {\n return \"0\";\n }\n const factor = Math.pow(1024, powFactor);\n const total = vl * factor;\n\n return total.toString(10);\n};\n\n//getTotalSize gets the total size of a value & unit\nexport const getTotalSize = (value: string, unit: string) => {\n const bytes = getBytes(value, unit, true).toString();\n return niceBytes(bytes);\n};\n\nexport const setMemoryResource = (\n memorySize: number,\n capacitySize: string,\n maxMemorySize: number\n) => {\n // value always comes as Gi\n const requestedSizeBytes = getBytes(memorySize.toString(10), \"Gi\", true);\n const memReqSize = parseInt(requestedSizeBytes, 10);\n if (maxMemorySize === 0) {\n return {\n error: \"There is no memory available for the selected number of nodes\",\n request: 0,\n limit: 0,\n };\n }\n\n if (maxMemorySize < minMemReq) {\n return {\n error: \"There are not enough memory resources available\",\n request: 0,\n limit: 0,\n };\n }\n\n if (memReqSize < minMemReq) {\n return {\n error: \"The requested memory size must be greater than 2Gi\",\n request: 0,\n limit: 0,\n };\n }\n if (memReqSize > maxMemorySize) {\n return {\n error:\n \"The requested memory is greater than the max available memory for the selected number of nodes\",\n request: 0,\n limit: 0,\n };\n }\n\n const capSize = parseInt(capacitySize, 10);\n let memLimitSize = memReqSize;\n // set memory limit based on the capacitySize\n // if capacity size is lower than 1TiB we use the limit equal to request\n if (capSize >= parseInt(getBytes(\"1\", \"Pi\", true), 10)) {\n memLimitSize = Math.max(\n memReqSize,\n parseInt(getBytes(\"64\", \"Gi\", true), 10)\n );\n } else if (capSize >= parseInt(getBytes(\"100\", \"Ti\"), 10)) {\n memLimitSize = Math.max(\n memReqSize,\n parseInt(getBytes(\"32\", \"Gi\", true), 10)\n );\n } else if (capSize >= parseInt(getBytes(\"10\", \"Ti\"), 10)) {\n memLimitSize = Math.max(\n memReqSize,\n parseInt(getBytes(\"16\", \"Gi\", true), 10)\n );\n } else if (capSize >= parseInt(getBytes(\"1\", \"Ti\"), 10)) {\n memLimitSize = Math.max(\n memReqSize,\n parseInt(getBytes(\"8\", \"Gi\", true), 10)\n );\n }\n\n return {\n error: \"\",\n request: memReqSize,\n limit: memLimitSize,\n };\n};\n\nexport const calculateDistribution = (\n capacityToUse: ICapacity,\n forcedNodes: number = 0,\n limitSize: number = 0,\n drivesPerServer: number = 0\n) => {\n let numberOfNodes = {};\n const requestedSizeBytes = getBytes(\n capacityToUse.value,\n capacityToUse.unit,\n true\n );\n\n if (parseInt(requestedSizeBytes, 10) < minStReq) {\n return {\n error: \"The pool size must be greater than 1Gi\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n pvSize: 0,\n };\n }\n\n if (forcedNodes < 4) {\n return {\n error: \"Number of nodes cannot be less than 4\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n pvSize: 0,\n };\n }\n\n if (drivesPerServer <= 0) {\n return {\n error: \"Number of drives must be at least 1\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n pvSize: 0,\n };\n }\n\n numberOfNodes = calculateStorage(\n requestedSizeBytes,\n forcedNodes,\n limitSize,\n drivesPerServer\n );\n\n return numberOfNodes;\n};\n\nconst calculateStorage = (\n requestedBytes: string,\n forcedNodes: number,\n limitSize: number,\n drivesPerServer: number\n) => {\n // Size validation\n const intReqBytes = parseInt(requestedBytes, 10);\n const maxDiskSize = minStReq * 256; // 256 GiB\n\n // We get the distribution\n return structureCalc(\n forcedNodes,\n intReqBytes,\n maxDiskSize,\n limitSize,\n drivesPerServer\n );\n};\n\nconst structureCalc = (\n nodes: number,\n desiredCapacity: number,\n maxDiskSize: number,\n maxClusterSize: number,\n disksPerNode: number = 0\n) => {\n if (\n isNaN(nodes) ||\n isNaN(desiredCapacity) ||\n isNaN(maxDiskSize) ||\n isNaN(maxClusterSize)\n ) {\n return {\n error: \"Some provided data is invalid, please try again.\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n volumePerDisk: 0,\n }; // Invalid Data\n }\n\n let persistentVolumeSize = 0;\n let numberPersistentVolumes = 0;\n let volumesPerServer = 0;\n\n if (disksPerNode === 0) {\n persistentVolumeSize = Math.floor(\n Math.min(desiredCapacity / Math.max(4, nodes), maxDiskSize)\n ); // pVS = min((desiredCapacity / max(4 | nodes)) | maxDiskSize)\n\n numberPersistentVolumes = desiredCapacity / persistentVolumeSize; // nPV = dC / pVS\n volumesPerServer = numberPersistentVolumes / nodes; // vPS = nPV / n\n }\n\n if (disksPerNode) {\n volumesPerServer = disksPerNode;\n numberPersistentVolumes = volumesPerServer * nodes;\n persistentVolumeSize = Math.floor(\n desiredCapacity / numberPersistentVolumes\n );\n }\n\n // Volumes are not exact, we force the volumes number & minimize the volume size\n if (volumesPerServer % 1 > 0) {\n volumesPerServer = Math.ceil(volumesPerServer); // Increment of volumes per server\n numberPersistentVolumes = volumesPerServer * nodes; // nPV = vPS * n\n persistentVolumeSize = Math.floor(\n desiredCapacity / numberPersistentVolumes\n ); // pVS = dC / nPV\n\n const limitSize = persistentVolumeSize * volumesPerServer * nodes; // lS = pVS * vPS * n\n\n if (limitSize > maxClusterSize) {\n return {\n error: \"We were not able to allocate this server.\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n volumePerDisk: 0,\n }; // Cannot allocate this server\n }\n }\n\n if (persistentVolumeSize < minStReq) {\n return {\n error:\n \"Disk Size with this combination would be less than 1Gi, please try another combination\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n volumePerDisk: 0,\n }; // Cannot allocate this volume size\n }\n\n return {\n error: \"\",\n nodes,\n persistentVolumes: numberPersistentVolumes,\n disks: volumesPerServer,\n pvSize: persistentVolumeSize,\n };\n};\n\n// Erasure Code Parity Calc\nexport const erasureCodeCalc = (\n parityValidValues: string[],\n totalDisks: number,\n pvSize: number,\n totalNodes: number\n): IErasureCodeCalc => {\n // Parity Values is empty\n if (parityValidValues.length < 1) {\n return {\n error: 1,\n defaultEC: \"\",\n erasureCodeSet: 0,\n maxEC: \"\",\n rawCapacity: \"0\",\n storageFactors: [],\n };\n }\n\n const totalStorage = totalDisks * pvSize;\n const maxEC = parityValidValues[0];\n const maxParityNumber = parseInt(maxEC.split(\":\")[1], 10);\n\n const erasureStripeSet = maxParityNumber * 2; // ESS is calculated by multiplying maximum parity by two.\n\n const storageFactors: IStorageFactors[] = parityValidValues.map(\n (currentParity) => {\n const parityNumber = parseInt(currentParity.split(\":\")[1], 10);\n const storageFactor =\n erasureStripeSet / (erasureStripeSet - parityNumber);\n\n const maxCapacity = Math.floor(totalStorage / storageFactor);\n const maxTolerations =\n totalDisks - Math.floor(totalDisks / storageFactor);\n return {\n erasureCode: currentParity,\n storageFactor,\n maxCapacity: maxCapacity.toString(10),\n maxFailureTolerations: maxTolerations,\n };\n }\n );\n\n let defaultEC = maxEC;\n\n const fourVar = parityValidValues.find((element) => element === \"EC:4\");\n\n if (totalDisks >= 8 && totalNodes > 16 && fourVar) {\n defaultEC = \"EC:4\";\n }\n\n return {\n error: 0,\n storageFactors,\n maxEC,\n rawCapacity: totalStorage.toString(10),\n erasureCodeSet: erasureStripeSet,\n defaultEC,\n };\n};\n\n// Pool Name Generator\nexport const generatePoolName = (pools: IPool[]) => {\n const poolCounter = pools.length;\n\n return `pool-${poolCounter}`;\n};\n\n// seconds / minutes /hours / Days / Years calculator\nexport const niceDays = (secondsValue: string, timeVariant: string = \"s\") => {\n let seconds = parseFloat(secondsValue);\n\n switch (timeVariant) {\n case \"ns\":\n seconds = Math.floor(seconds * 0.000000001);\n break;\n case \"ms\":\n seconds = Math.floor(seconds * 0.001);\n break;\n default:\n }\n\n const days = Math.floor(seconds / (3600 * 24));\n\n seconds -= days * 3600 * 24;\n const hours = Math.floor(seconds / 3600);\n seconds -= hours * 3600;\n const minutes = Math.floor(seconds / 60);\n seconds -= minutes * 60;\n\n if (days > 365) {\n const years = days / 365;\n return `${years} year${Math.floor(years) === 1 ? \"\" : \"s\"}`;\n }\n\n if (days > 30) {\n const months = Math.floor(days / 30);\n const diffDays = days - months * 30;\n\n return `${months} month${Math.floor(months) === 1 ? \"\" : \"s\"} ${\n diffDays > 0 ? `${diffDays} day${diffDays > 1 ? \"s\" : \"\"}` : \"\"\n }`;\n }\n\n if (days >= 7 && days <= 30) {\n const weeks = Math.floor(days / 7);\n\n return `${Math.floor(weeks)} week${weeks === 1 ? \"\" : \"s\"}`;\n }\n\n if (days >= 1 && days <= 6) {\n return `${days} day${days > 1 ? \"s\" : \"\"}`;\n }\n\n return `${hours >= 1 ? `${hours} hour${hours > 1 ? \"s\" : \"\"}` : \"\"} ${\n minutes >= 1 && hours === 0\n ? `${minutes} minute${minutes > 1 ? \"s\" : \"\"}`\n : \"\"\n } ${\n seconds >= 1 && minutes === 0 && hours === 0\n ? `${seconds} second${seconds > 1 ? \"s\" : \"\"}`\n : \"\"\n }`;\n};\n\nexport const getTimeFromTimestamp = (\n timestamp: string,\n fullDate: boolean = false\n) => {\n const dateObject = new Date(parseInt(timestamp) * 1000);\n\n if (fullDate) {\n return `${dateObject.getFullYear()}-${String(\n dateObject.getMonth() + 1\n ).padStart(2, \"0\")}-${String(dateObject.getDay()).padStart(\n 2,\n \"0\"\n )} ${dateObject.getHours()}:${String(dateObject.getMinutes()).padStart(\n 2,\n \"0\"\n )}:${String(dateObject.getSeconds()).padStart(2, \"0\")}`;\n }\n return `${dateObject.getHours()}:${String(dateObject.getMinutes()).padStart(\n 2,\n \"0\"\n )}`;\n};\n\nexport const calculateBytes = (\n x: string,\n showDecimals = false,\n roundFloor = true\n) => {\n const bytes = parseInt(x, 10);\n\n if (bytes === 0) {\n return { total: 0, unit: k8sCalcUnits[0] };\n }\n\n // Gi : GiB\n const k = 1024;\n\n // Get unit for measure\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n const fractionDigits = showDecimals ? 0 : 1;\n\n const bytesUnit = bytes / Math.pow(k, i);\n\n const roundedUnit = roundFloor ? Math.floor(bytesUnit) : bytesUnit;\n\n // Get Unit parsed\n const unitParsed = parseFloat(roundedUnit.toFixed(fractionDigits));\n const finalUnit = k8sCalcUnits[i];\n\n return { total: unitParsed, unit: finalUnit };\n};\n\nexport const nsToSeconds = (nanoseconds: number) => {\n const conversion = nanoseconds * 0.000000001;\n const round = Math.round((conversion + Number.EPSILON) * 10000) / 10000;\n\n return `${round} s`;\n};\n\nexport const textToRGBColor = (text: string) => {\n const splitText = text.split(\"\");\n\n const hashVl = splitText.reduce((acc, currItem) => {\n return acc + currItem.charCodeAt(0) + ((acc << 5) - acc);\n }, 0);\n\n const hashColored = ((hashVl * 100) & 0x00ffffff).toString(16).toUpperCase();\n\n return `#${hashColored.padStart(6, \"0\")}`;\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 request from \"superagent\";\nimport get from \"lodash/get\";\nimport { clearSession } from \"../utils\";\n\nexport class API {\n invoke(method: string, url: string, data?: object) {\n return request(method, url)\n .send(data)\n .then((res) => res.body)\n .catch((err) => {\n // if we get unauthorized, kick out the user\n if (err.status === 401) {\n clearSession();\n // Refresh the whole page to ensure cache is clear\n // and we dont end on an infinite loop\n window.location.href = \"/login\";\n return;\n }\n return this.onError(err);\n });\n }\n\n onError(err: any) {\n if (err.status) {\n const errMessage = get(\n err.response,\n \"body.message\",\n err.status.toString()\n );\n\n const throwMessage =\n errMessage.charAt(0).toUpperCase() + errMessage.slice(1);\n\n return Promise.reject(throwMessage);\n } else {\n clearSession();\n window.location.href = \"/login\";\n }\n }\n}\n\nconst api = new API();\nexport default api;\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, { useEffect, useState } from \"react\";\nimport request from \"superagent\";\nimport { connect } from \"react-redux\";\nimport ErrorIcon from \"@material-ui/icons/Error\";\nimport Button from \"@material-ui/core/Button\";\nimport TextField from \"@material-ui/core/TextField\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {\n CircularProgress,\n LinearProgress,\n Paper,\n TextFieldProps,\n} from \"@material-ui/core\";\nimport {\n createStyles,\n makeStyles,\n Theme,\n withStyles,\n} from \"@material-ui/core/styles\";\nimport { SystemState } from \"../../types\";\nimport { userLoggedIn } from \"../../actions\";\nimport api from \"../../common/api\";\nimport { ILoginDetails, loginStrategyType } from \"./types\";\nimport history from \"../../history\";\nimport { OutlinedInputProps } from \"@material-ui/core/OutlinedInput\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n \"@global\": {\n body: {\n backgroundColor: \"#FAFAFA\",\n },\n },\n paper: {\n borderRadius: 8,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n width: 800,\n height: 424,\n margin: \"auto\",\n position: \"absolute\",\n top: \"50%\",\n left: \"50%\",\n marginLeft: -400,\n marginTop: -212,\n \"&.MuiPaper-root\": {\n borderRadius: 8,\n },\n },\n avatar: {\n margin: theme.spacing(1),\n backgroundColor: theme.palette.secondary.main,\n },\n form: {\n width: \"100%\", // Fix IE 11 issue.\n },\n submit: {\n margin: \"30px 0px 16px\",\n height: 40,\n boxShadow: \"none\",\n padding: \"16px 30px\",\n },\n errorBlock: {\n backgroundColor: \"#C72C48\",\n width: 800,\n height: 64,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n marginLeft: -400,\n marginTop: -290,\n color: \"#fff\",\n fontWeight: 700,\n fontSize: 14,\n borderRadius: 8,\n padding: 10,\n boxSizing: \"border-box\",\n },\n mainContainer: {\n position: \"relative\",\n height: 424,\n },\n theOcean: {\n borderTopLeftRadius: 8,\n borderBottomLeftRadius: 8,\n background:\n \"transparent linear-gradient(to bottom, #073052 0%,#05122b 100%); 0% 0% no-repeat padding-box;\",\n },\n oceanBg: {\n backgroundImage: \"url(/images/BG_Illustration.svg)\",\n backgroundRepeat: \"no-repeat\",\n backgroundPosition: \"bottom left\",\n height: \"100%\",\n width: 324,\n },\n theLogin: {\n padding: \"40px 45px 20px 45px\",\n },\n loadingLoginStrategy: {\n textAlign: \"center\",\n },\n headerTitle: {\n marginBottom: 10,\n },\n submitContainer: {\n textAlign: \"right\",\n },\n disclaimer: {\n fontSize: 12,\n marginTop: 30,\n },\n jwtInput: {\n marginTop: 45,\n },\n linearPredef: {\n height: 10,\n },\n errorIconStyle: {\n marginRight: 3,\n },\n });\n\nconst inputStyles = makeStyles((theme: Theme) =>\n createStyles({\n disabled: {\n \"&.MuiInput-underline::before\": {\n borderColor: \"#eaeaea\",\n borderBottomStyle: \"solid\",\n },\n },\n })\n);\n\nfunction LoginField(props: TextFieldProps) {\n const classes = inputStyles();\n\n return (\n }\n {...props}\n />\n );\n}\n\nconst mapState = (state: SystemState) => ({\n loggedIn: state.loggedIn,\n});\n\nconst connector = connect(mapState, { userLoggedIn });\n\n// The inferred type will look like:\n// {isOn: boolean, toggleOn: () => void}\n\ninterface ILoginProps {\n userLoggedIn: typeof userLoggedIn;\n classes: any;\n}\n\ninterface LoginStrategyRoutes {\n [key: string]: string;\n}\n\ninterface LoginStrategyPayload {\n [key: string]: any;\n}\n\nconst Login = ({ classes, userLoggedIn }: ILoginProps) => {\n const [accessKey, setAccessKey] = useState(\"\");\n const [jwt, setJwt] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n const [error, setError] = useState(\"\");\n const [loginStrategy, setLoginStrategy] = useState({\n loginStrategy: loginStrategyType.unknown,\n redirect: \"\",\n });\n const [loginSending, setLoginSending] = useState(false);\n\n const loginStrategyEndpoints: LoginStrategyRoutes = {\n form: \"/api/v1/login\",\n \"service-account\": \"/api/v1/login/operator\",\n };\n const loginStrategyPayload: LoginStrategyPayload = {\n form: { accessKey, secretKey },\n \"service-account\": { jwt },\n };\n\n const fetchConfiguration = () => {\n api\n .invoke(\"GET\", \"/api/v1/login\")\n .then((loginDetails: ILoginDetails) => {\n setLoginStrategy(loginDetails);\n setError(\"\");\n if (\n loginDetails.loginStrategy === \"redirect\" &&\n loginDetails.redirect !== \"\"\n ) {\n //location.href = loginDetails.redirect;\n }\n })\n .catch((err: any) => {\n setError(err);\n });\n };\n\n const formSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n setLoginSending(true);\n request\n .post(\n loginStrategyEndpoints[loginStrategy.loginStrategy] || \"/api/v1/login\"\n )\n .send(loginStrategyPayload[loginStrategy.loginStrategy])\n .then((res: any) => {\n const bodyResponse = res.body;\n if (bodyResponse.error) {\n setLoginSending(false);\n // throw will be moved to catch block once bad login returns 403\n throw bodyResponse.error;\n }\n })\n .then(() => {\n // We set the state in redux\n userLoggedIn(true);\n if (loginStrategy.loginStrategy === loginStrategyType.form) {\n localStorage.setItem(\"userLoggedIn\", btoa(accessKey));\n }\n\n history.push(\"/\");\n })\n .catch((err) => {\n setLoginSending(false);\n setError(err.message);\n });\n };\n\n useEffect(() => {\n fetchConfiguration();\n }, []);\n\n let loginComponent = null;\n\n switch (loginStrategy.loginStrategy) {\n case loginStrategyType.form: {\n loginComponent = (\n \n \n Console Login\n \n
\n \n \n ) =>\n setAccessKey(e.target.value)\n }\n label=\"Enter Access Key\"\n name=\"accessKey\"\n autoComplete=\"username\"\n disabled={loginSending}\n />\n \n \n ) =>\n setSecretKey(e.target.value)\n }\n name=\"secretKey\"\n label=\"Enter Secret Key\"\n type=\"password\"\n id=\"secretKey\"\n autoComplete=\"current-password\"\n disabled={loginSending}\n />\n \n \n \n \n Login\n \n \n \n {loginSending && }\n \n \n Don't have an access key?\n
\n
\n Contact your administrator to have one made\n
\n
\n
\n );\n break;\n }\n case loginStrategyType.redirect: {\n loginComponent = (\n \n \n Welcome\n \n \n Login with SSO\n \n \n );\n break;\n }\n case loginStrategyType.serviceAccount: {\n loginComponent = (\n \n \n Operator Login\n \n
\n \n \n ) =>\n setJwt(e.target.value)\n }\n label=\"JWT\"\n name=\"jwt\"\n autoComplete=\"off\"\n disabled={loginSending}\n />\n \n \n \n \n Login\n \n \n \n {loginSending && }\n \n \n Don't have an access key?\n
\n Contact your administrator to have one made\n
\n
\n
\n );\n break;\n }\n default:\n loginComponent = (\n \n );\n }\n\n return (\n \n {error !== \"\" && (\n
\n {\" \"}\n {error}\n
\n )}\n \n \n \n
\n \n \n {loginComponent}\n \n \n \n \n );\n};\n\nexport default connector(withStyles(styles)(Login));\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\n// This object contains variables that will be used across form components.\n\nexport const fieldBasic = {\n inputLabel: {\n fontWeight: 600,\n marginRight: 10,\n fontSize: 15,\n color: \"#000\",\n textAlign: \"left\" as const,\n overflow: \"hidden\",\n \"& span\": {\n display: \"flex\",\n alignItems: \"center\",\n },\n display: \"flex\",\n },\n fieldLabelError: {\n paddingBottom: 22,\n },\n fieldContainer: {\n marginBottom: 20,\n position: \"relative\" as const,\n maxWidth: 840,\n },\n tooltipContainer: {\n marginLeft: 5,\n display: \"flex\",\n alignItems: \"center\",\n },\n switchContainer: {\n display: \"flex\",\n maxWidth: 840,\n },\n};\n\nexport const modalBasic = {\n formScrollable: {\n maxHeight: \"calc(100vh - 300px)\" as const,\n overflowY: \"auto\" as const,\n marginBottom: 25,\n },\n formSlider: {\n marginLeft: 0,\n },\n clearButton: {\n fontFamily: \"Lato, sans-serif\",\n border: \"0\",\n backgroundColor: \"transparent\",\n color: \"#393939\",\n fontWeight: 600,\n fontSize: 14,\n marginRight: 10,\n outline: \"0\",\n padding: \"16px 25px 16px 25px\",\n cursor: \"pointer\",\n },\n floatingEnabled: {\n position: \"absolute\" as const,\n right: 58,\n zIndex: 1000,\n marginTop: -38,\n },\n configureString: {\n border: \"#EAEAEA 1px solid\",\n borderRadius: 4,\n padding: \"24px 50px\",\n overflowY: \"auto\" as const,\n height: 170,\n maxWidth: 840,\n },\n};\n\nexport const tooltipHelper = {\n tooltip: {\n fontSize: 16,\n },\n};\n\nconst checkBoxBasic = {\n width: 14,\n height: 14,\n borderRadius: 2,\n};\n\nexport const checkboxIcons = {\n unCheckedIcon: { ...checkBoxBasic, border: \"1px solid #c3c3c3\" },\n checkedIcon: {\n ...checkBoxBasic,\n border: \"1px solid #081C42\",\n backgroundColor: \"#081C42\",\n },\n};\n\nconst radioBasic = {\n width: 12,\n height: 12,\n borderRadius: \"100%\",\n \"input:disabled ~ &\": {\n border: \"1px solid #9C9C9C\",\n },\n};\n\nexport const radioIcons = {\n radioUnselectedIcon: { ...radioBasic, border: \"1px solid #000\" },\n radioSelectedIcon: {\n ...radioBasic,\n border: \"1px solid #000\",\n backgroundColor: \"#000\",\n },\n};\n\nexport const containerForHeader = (bottomSpacing: any) => ({\n container: {\n padding: \"110px 33px 0\",\n \"& h6\": {\n color: \"#777777\",\n fontSize: 14,\n },\n \"& p\": {\n \"& span:not(*[class*='smallUnit'])\": {\n fontSize: 16,\n },\n },\n },\n});\n\nexport const actionsTray = {\n label: {\n color: \"#393939\",\n fontWeight: 600,\n fontSize: 13,\n alignSelf: \"center\" as const,\n whiteSpace: \"nowrap\" as const,\n \"&:not(:first-of-type)\": {\n marginLeft: 10,\n },\n },\n timeContainers: {\n height: 40,\n },\n actionsTray: {\n display: \"flex\" as const,\n justifyContent: \"space-between\" as const,\n \"& button\": {\n flexGrow: 0,\n marginLeft: 15,\n },\n },\n};\n\nexport const searchField = {\n searchField: {\n flexGrow: 1,\n height: 40,\n background: \"#FFFFFF\",\n borderRadius: 5,\n border: \"#EAEDEE 1px solid\",\n display: \"flex\",\n justifyContent: \"center\",\n padding: \"0 16px\",\n \"& input\": {\n fontSize: 12,\n fontWeight: 700,\n color: \"#000\",\n \"&::placeholder\": {\n color: \"#393939\",\n opacity: 1,\n },\n },\n \"&:hover\": {\n borderColor: \"#000\",\n },\n },\n};\n\nexport const predefinedList = {\n prefinedContainer: {\n maxWidth: 840,\n width: \"100%\",\n },\n predefinedTitle: {\n fontSize: 16,\n fontWeight: 600,\n color: \"#000\",\n margin: \"10px 0\",\n },\n predefinedList: {\n backgroundColor: \"#eaeaea\",\n padding: \"12px 10px\",\n color: \"#393939\",\n fontSize: 12,\n fontWeight: 600,\n minHeight: 41,\n },\n innerContent: {\n width: \"100%\",\n overflowX: \"auto\" as const,\n whiteSpace: \"nowrap\" as const,\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n innerContentMultiline: {\n width: \"100%\",\n maxHeight: 100,\n overflowY: \"auto\" as const,\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n};\n\nexport const objectBrowserCommon = {\n obTitleSection: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"flex-start\",\n marginBottom: 20,\n },\n sectionTitle: {\n fontSize: 22,\n color: \"#000\",\n fontWeight: 600,\n height: 40,\n lineHeight: \"40px\",\n },\n breadcrumbs: {\n fontSize: 10,\n color: \"#000\",\n marginTop: 2,\n \"& a\": {\n textDecoration: \"none\",\n color: \"#000\",\n \"&:hover\": {\n textDecoration: \"underline\",\n },\n },\n },\n};\n\nexport const selectorsCommon = {\n multiSelectTable: {\n height: 200,\n },\n};\n\nexport const settingsCommon = {\n customTitle: {\n fontSize: 18,\n color: \"#000\",\n fontWeight: 600,\n padding: \"12px 0\",\n borderBottom: \"#eaedee 1px solid\",\n marginBottom: 10,\n margin: \"15px 38px 27px\",\n },\n settingsFormContainer: {\n height: \"calc(100vh - 421px)\",\n padding: \"15px 38px\",\n overflowY: \"auto\" as const,\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n settingsButtonContainer: {\n borderTop: \"1px solid #EAEAEA\",\n padding: \"15px 38px\",\n textAlign: \"right\" as const,\n },\n innerSettingsButtonContainer: {\n maxWidth: 840,\n textAlign: \"right\" as const,\n },\n settingsOptionsContainer: {\n height: \"calc(100vh - 244px)\",\n backgroundColor: \"#fff\",\n border: \"#EAEDEE 1px solid\",\n borderRadius: 3,\n marginTop: 15,\n },\n backButton: {\n cursor: \"pointer\",\n fontSize: 10,\n fontWeight: 600,\n color: \"#000\",\n backgroundColor: \"transparent\",\n border: 0,\n padding: 0,\n display: \"flex\",\n alignItems: \"center\",\n \"&:active, &:focus\": {\n outline: 0,\n },\n \"& svg\": {\n width: 10,\n marginRight: 4,\n },\n },\n backContainer: {\n margin: \"20px 38px 0\",\n },\n};\n\nexport const typesSelection = {\n iconContainer: {\n display: \"flex\" as const,\n flexDirection: \"row\" as const,\n maxWidth: 455,\n justifyContent: \"space-between\" as const,\n flexWrap: \"wrap\" as const,\n width: \"100%\",\n },\n nonIconContainer: {\n marginBottom: 16,\n width: 455,\n marginTop: 15,\n \"& button\": {\n marginRight: 16,\n },\n },\n pickTitle: {\n fontWeight: 600,\n color: \"#393939\",\n fontSize: 14,\n marginBottom: 16,\n },\n centerElements: {\n display: \"flex\" as const,\n flexDirection: \"column\" as const,\n alignItems: \"center\" as const,\n justifyContent: \"center\" as const,\n },\n logoButton: {\n height: \"80px\",\n },\n lambdaNotif: {\n backgroundColor: \"#fff\",\n border: \"#393939 1px solid\",\n borderRadius: 5,\n width: 101,\n height: 91,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n marginBottom: 16,\n cursor: \"pointer\",\n \"& img\": {\n maxWidth: 71,\n maxHeight: 71,\n },\n },\n};\n\nexport const logsCommon = {\n logsSubContainer: {\n height: \"calc(100vh - 230px)\",\n padding: \"15px 0\",\n },\n};\n\nexport const widgetCommon = {\n singleValueContainer: {\n position: \"relative\" as const,\n flexGrow: 1,\n width: \"100%\",\n height: \"100%\",\n border: \"#EAEAEA 1px solid\",\n borderRadius: 5,\n backgroundColor: \"#fff\",\n },\n titleContainer: {\n color: \"#393939\",\n fontWeight: 600,\n height: 15,\n textAlign: \"center\" as const,\n fontSize: 10,\n },\n contentContainer: {\n flexGrow: 2,\n justifyContent: \"center\" as const,\n alignItems: \"center\" as const,\n display: \"flex\" as const,\n position: \"absolute\" as const,\n width: \"100%\",\n height: \"calc(100% - 15px)\",\n },\n contentContainerWithLabel: {\n height: \"calc(100% - 25px)\",\n },\n legendBlock: {\n position: \"absolute\" as const,\n bottom: 5,\n display: \"flex\" as const,\n width: \"100%\",\n height: 15,\n flexWrap: \"wrap\" as const,\n overflowY: \"auto\" as const,\n },\n singleLegendContainer: {\n display: \"flex\",\n alignItems: \"center\",\n padding: \"0 10px\",\n maxWidth: \"100%\",\n },\n colorContainer: {\n width: 8,\n height: 8,\n minWidth: 8,\n borderRadius: \"100%\",\n marginRight: 5,\n },\n legendLabel: {\n fontSize: \"80%\",\n color: \"#393939\",\n whiteSpace: \"nowrap\" as const,\n overflow: \"hidden\" as const,\n textOverflow: \"ellipsis\" as const,\n },\n};\n\nexport const tooltipCommon = {\n customTooltip: {\n backgroundColor: \"rgba(255, 255, 255, 0.90)\",\n border: \"#eaeaea 1px solid\",\n borderRadius: 3,\n padding: \"5px 10px\",\n maxHeight: 300,\n overflowY: \"auto\" as const,\n },\n labelContainer: {\n display: \"flex\" as const,\n alignItems: \"center\" as const,\n },\n labelColor: {\n width: 6,\n height: 6,\n display: \"block\" as const,\n borderRadius: \"100%\",\n marginRight: 5,\n },\n itemValue: {\n fontSize: \"75%\",\n color: \"#393939\",\n },\n valueContainer: {\n fontWeight: 600,\n },\n timeStampTitle: {\n fontSize: \"80%\",\n color: \"#9c9c9c\",\n textAlign: \"center\" as const,\n marginBottom: 6,\n },\n};\n\nexport const snackBarCommon = {\n snackBar: {\n backgroundColor: \"#081F44\",\n fontWeight: 400,\n fontFamily: \"Lato, sans-serif\",\n fontSize: 14,\n padding: \"0px 20px 0px 20px;\",\n boxShadow: \"none\" as const,\n \"&.MuiPaper-root.MuiSnackbarContent-root\": {\n borderRadius: \"0px 0px 5px 5px\",\n },\n \"& div\": {\n textAlign: \"center\" as const,\n padding: \"6px 30px\",\n width: \"100%\",\n overflowX: \"hidden\",\n textOverflow: \"ellipsis\",\n },\n },\n errorSnackBar: {\n backgroundColor: \"#C72C48\",\n color: \"#fff\",\n },\n snackBarExternal: {\n top: \"-17px\",\n position: \"absolute\" as const,\n minWidth: \"348px\",\n whiteSpace: \"nowrap\" as const,\n height: \"33px\",\n },\n snackDiv: {\n top: \"17px\",\n left: \"50%\",\n position: \"absolute\" as const,\n },\n snackBarModal: {\n top: 0,\n position: \"absolute\" as const,\n minWidth: \"348px\",\n whiteSpace: \"nowrap\" as const,\n height: \"33px\",\n maxWidth: \"calc(100% - 140px)\",\n },\n};\n\nexport const wizardCommon = {\n multiContainer: {\n display: \"flex\" as const,\n alignItems: \"center\" as const,\n justifyContent: \"flex-start\" as const,\n },\n sizeFactorContainer: {\n marginLeft: 8,\n alignSelf: \"flex-start\" as const,\n },\n headerElement: {\n position: \"sticky\" as const,\n top: 0,\n paddingTop: 5,\n marginBottom: 10,\n zIndex: 500,\n backgroundColor: \"#fff\",\n },\n tableTitle: {\n fontWeight: 700,\n width: \"30%\",\n },\n poolError: {\n color: \"#dc1f2e\",\n fontSize: \"0.75rem\",\n paddingLeft: 120,\n },\n error: {\n color: \"#dc1f2e\",\n fontSize: \"0.75rem\",\n },\n h3Section: {\n marginTop: 0,\n },\n descriptionText: {\n fontSize: 13,\n color: \"#777777\",\n },\n container: {\n padding: \"77px 0 0 0\",\n \"& h6\": {\n color: \"#777777\",\n fontSize: 14,\n },\n \"& p\": {\n \"& span:not(*[class*='smallUnit'])\": {\n fontSize: 16,\n },\n },\n },\n};\n\nexport const buttonsStyles = {\n anchorButton: {\n textDecoration: \"underline\" as const,\n textTransform: \"unset\" as const,\n fontWeight: \"normal\" as const,\n padding: 0,\n lineHeight: \"unset\" as const,\n height: \"unset\" as const,\n width: \"unset\" as const,\n textAlign: \"left\" as const,\n border: 0,\n minWidth: \"unset\" as const,\n },\n};\n\nexport const hrClass = {\n hrClass: {\n borderTop: 0,\n borderLeft: 0,\n borderRight: 0,\n borderColor: \"#999999\",\n backgroundColor: \"transparent\" as const,\n },\n};\n","import React from \"react\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Link from \"@material-ui/core/Link\";\n\nexport default function Copyright() {\n return (\n \n {\"Copyright © \"}\n \n MinIO\n {\" \"}\n {new Date().getFullYear()}\n {\".\"}\n \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 from \"react\";\nimport CssBaseline from \"@material-ui/core/CssBaseline\";\nimport Box from \"@material-ui/core/Box\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Container from \"@material-ui/core/Container\";\nimport Copyright from \"../common/Copyright\";\n\nconst useStyles = makeStyles((theme) => ({\n \"@global\": {\n body: {\n backgroundColor: theme.palette.common.white,\n },\n },\n paper: {\n marginTop: theme.spacing(8),\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n },\n}));\nconst NotFound: React.FC = () => {\n const classes = useStyles();\n return (\n \n \n
\n \n 404 Not Found\n \n
\n \n \n \n
\n );\n};\n\nexport default NotFound;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst CopyIcon = () => {\n return (\n \n \n ic_h_copy-new_sl\n \n \n \n \n \n \n \n );\n};\n\nexport default CopyIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst CreateIcon = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default CreateIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst DeleteIcon = () => {\n return (\n \n \n \n \n \n );\n};\n\nexport default DeleteIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst DashboardIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default DashboardIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst BucketsIcon = () => {\n return (\n \n \n \n \n \n );\n};\n\nexport default BucketsIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst UsersIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default UsersIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst ServiceAccountsIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default ServiceAccountsIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst GroupsIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default GroupsIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst BucketsIcon = () => {\n return (\n \n \n \n \n \n );\n};\n\nexport default BucketsIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst TraceIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default TraceIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst ConfigurationsListIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default ConfigurationsListIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst ClustersIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default ClustersIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst WatchIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default WatchIcon;\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\nexport const ADD_BUCKET_OPEN = \"ADD_BUCKET_OPEN\";\nexport const ADD_BUCKET_NAME = \"ADD_BUCKET_NAME\";\nexport const ADD_BUCKET_VERSIONED = \"ADD_BUCKET_VERSIONED\";\nexport const ADD_BUCKET_LOCKING = \"ADD_BUCKET_LOCKING\";\nexport const ADD_BUCKET_QUOTA = \"ADD_BUCKET_QUOTA\";\nexport const ADD_BUCKET_QUOTA_TYPE = \"ADD_BUCKET_QUOTA_TYPE\";\nexport const ADD_BUCKET_QUOTA_SIZE = \"ADD_BUCKET_QUOTA_SIZE\";\nexport const ADD_BUCKET_QUOTA_UNIT = \"ADD_BUCKET_QUOTA_UNIT\";\nexport const ADD_BUCKET_RESET = \"ADD_BUCKET_RESET\";\nexport const ADD_BUCKET_RETENTION = \"ADD_BUCKET_RETENTION\";\nexport const ADD_BUCKET_RETENTION_MODE = \"ADD_BUCKET_RETENTION_MODE\";\nexport const ADD_BUCKET_RETENTION_UNIT = \"ADD_BUCKET_RETENTION_UNIT\";\nexport const ADD_BUCKET_RETENTION_VALIDITY = \"ADD_BUCKET_RETENTION_VALIDITY\";\n\ninterface AddBucketOpenAction {\n type: typeof ADD_BUCKET_OPEN;\n open: boolean;\n}\n\ninterface AddBucketNameAction {\n type: typeof ADD_BUCKET_NAME;\n name: string;\n}\n\ninterface AddBucketVersionedAction {\n type: typeof ADD_BUCKET_VERSIONED;\n versioned: boolean;\n}\n\ninterface AddBucketLockingAction {\n type: typeof ADD_BUCKET_LOCKING;\n locking: boolean;\n}\n\ninterface AddBucketQuotaAction {\n type: typeof ADD_BUCKET_QUOTA;\n quota: boolean;\n}\n\ninterface AddBucketQuotaTypeAction {\n type: typeof ADD_BUCKET_QUOTA_TYPE;\n quotaType: string;\n}\n\ninterface AddBucketQuotaSizeAction {\n type: typeof ADD_BUCKET_QUOTA_SIZE;\n quotaSize: string;\n}\n\ninterface AddBucketQuotaUnitAction {\n type: typeof ADD_BUCKET_QUOTA_UNIT;\n quotaUnit: string;\n}\ninterface AddBucketResetAction {\n type: typeof ADD_BUCKET_RESET;\n}\n\ninterface AddBucketRetentionAction {\n type: typeof ADD_BUCKET_RETENTION;\n retention: boolean;\n}\n\ninterface AddBucketRetentionModeAction {\n type: typeof ADD_BUCKET_RETENTION_MODE;\n retentionMode: string;\n}\n\ninterface AddBucketRetentionUnitAction {\n type: typeof ADD_BUCKET_RETENTION_UNIT;\n retentionUnit: string;\n}\ninterface AddBucketRetentionValidityAction {\n type: typeof ADD_BUCKET_RETENTION_VALIDITY;\n retentionValidity: number;\n}\n\nexport type BucketActionTypes =\n | AddBucketOpenAction\n | AddBucketNameAction\n | AddBucketVersionedAction\n | AddBucketLockingAction\n | AddBucketQuotaAction\n | AddBucketQuotaTypeAction\n | AddBucketQuotaSizeAction\n | AddBucketQuotaUnitAction\n | AddBucketResetAction\n | AddBucketRetentionAction\n | AddBucketRetentionModeAction\n | AddBucketRetentionUnitAction\n | AddBucketRetentionValidityAction;\n\nexport function addBucketOpen(open: boolean) {\n return {\n type: ADD_BUCKET_OPEN,\n open: open,\n };\n}\nexport function addBucketName(name: string) {\n return {\n type: ADD_BUCKET_NAME,\n name: name,\n };\n}\n\nexport function addBucketVersioning(versioned: boolean) {\n return {\n type: ADD_BUCKET_VERSIONED,\n versioned: versioned,\n };\n}\n\nexport function addBucketEnableObjectLocking(locking: boolean) {\n return {\n type: ADD_BUCKET_LOCKING,\n locking: locking,\n };\n}\n\nexport function addBucketQuota(quota: boolean) {\n return {\n type: ADD_BUCKET_QUOTA,\n quota: quota,\n };\n}\n\nexport function addBucketQuotaType(quotaType: string) {\n return {\n type: ADD_BUCKET_QUOTA_TYPE,\n quotaType: quotaType,\n };\n}\n\nexport function addBucketQuotaSize(quotaSize: string) {\n return {\n type: ADD_BUCKET_QUOTA_SIZE,\n quotaSize: quotaSize,\n };\n}\n\nexport function addBucketQuotaUnit(quotaUnit: string) {\n return {\n type: ADD_BUCKET_QUOTA_UNIT,\n quotaUnit: quotaUnit,\n };\n}\n\nexport function addBucketReset() {\n return {\n type: ADD_BUCKET_RESET,\n };\n}\n\nexport function addBucketRetention(retention: boolean) {\n return {\n type: ADD_BUCKET_RETENTION,\n retention: retention,\n };\n}\n\nexport function addBucketRetentionMode(mode: string) {\n return {\n type: ADD_BUCKET_RETENTION_MODE,\n retentionMode: mode,\n };\n}\n\nexport function addBucketRetentionUnit(unit: string) {\n return {\n type: ADD_BUCKET_RETENTION_UNIT,\n retentionUnit: unit,\n };\n}\n\nexport function addBucketRetentionValidity(validity: number) {\n return {\n type: ADD_BUCKET_RETENTION_VALIDITY,\n retentionValidity: validity,\n };\n}\n","export interface IIcon {\n active: boolean;\n}\n\nexport const unSelected = \"#081C42\";\nexport const selected = \"#081C42\";\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst ViewIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default ViewIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst PencilIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default PencilIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst ShareIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n \n );\n};\n\nexport default ShareIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst DeleteIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default DeleteIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst DescriptionIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default DescriptionIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst CloudIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default CloudIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst ConsoleIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default ConsoleIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst DeleteIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n \n );\n};\n\nexport default DeleteIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst DescriptionIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default DescriptionIcon;\n","import React from \"react\";\nimport { IIcon, selected, unSelected } from \"./common\";\n\nconst FormatDriveIcon = ({ active = false }: IIcon) => {\n return (\n \n \n \n );\n};\n\nexport default FormatDriveIcon;\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 isString from \"lodash/isString\";\nimport { Link } from \"react-router-dom\";\nimport { createStyles, withStyles } from \"@material-ui/core/styles\";\nimport { IconButton } from \"@material-ui/core\";\nimport ViewIcon from \"./TableActionIcons/ViewIcon\";\nimport PencilIcon from \"./TableActionIcons/PencilIcon\";\nimport ShareIcon from \"./TableActionIcons/ShareIcon\";\nimport DeleteIcon from \"./TableActionIcons/DeleteIcon\";\nimport DescriptionIcon from \"./TableActionIcons/DescriptionIcon\";\nimport CloudIcon from \"./TableActionIcons/CloudIcon\";\nimport ConsoleIcon from \"./TableActionIcons/ConsoleIcon\";\nimport DownloadIcon from \"./TableActionIcons/DownloadIcon\";\nimport DisableIcon from \"./TableActionIcons/DisableIcon\";\nimport FormatDriveIcon from \"./TableActionIcons/FormatDriveIcon\";\n\nconst styles = () =>\n createStyles({\n spacing: {\n margin: \"0 8px\",\n },\n buttonDisabled: {\n \"&.MuiButtonBase-root.Mui-disabled\": {\n cursor: \"not-allowed\",\n filter: \"grayscale(100%)\",\n opacity: \"30%\",\n },\n },\n });\n\ninterface IActionButton {\n type: string;\n onClick?: (id: string) => any;\n to?: string;\n valueToSend: any;\n selected: boolean;\n sendOnlyId?: boolean;\n idField: string;\n disabled: boolean;\n classes: any;\n}\n\nconst defineIcon = (type: string, selected: boolean) => {\n switch (type) {\n case \"view\":\n return ;\n case \"edit\":\n return ;\n case \"delete\":\n return ;\n case \"description\":\n return ;\n case \"share\":\n return ;\n case \"cloud\":\n return ;\n case \"console\":\n return ;\n case \"download\":\n return ;\n case \"disable\":\n return ;\n case \"format\":\n return ;\n }\n\n return null;\n};\n\nconst TableActionButton = ({\n type,\n onClick,\n valueToSend,\n idField,\n selected,\n to,\n sendOnlyId = false,\n disabled = false,\n classes,\n}: IActionButton) => {\n const valueClick = sendOnlyId ? valueToSend[idField] : valueToSend;\n\n const buttonElement = (\n {\n e.stopPropagation();\n if (!disabled) {\n onClick(valueClick);\n } else {\n e.preventDefault();\n }\n }\n : () => null\n }\n className={`${classes.spacing} ${disabled ? classes.buttonDisabled : \"\"}`}\n disabled={disabled}\n >\n {defineIcon(type, selected)}\n \n );\n\n if (onClick) {\n return buttonElement;\n }\n\n if (isString(to)) {\n if (!disabled) {\n return (\n {\n e.stopPropagation();\n }}\n >\n {buttonElement}\n \n );\n }\n\n return buttonElement;\n }\n\n return null;\n};\n\nexport default withStyles(styles)(TableActionButton);\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst HelpIcon = (props: any) => {\n return (\n \n \n \n \n );\n};\n\nexport default HelpIcon;\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 { Checkbox, Grid, InputLabel, Tooltip } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n checkboxIcons,\n fieldBasic,\n tooltipHelper,\n} from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\ninterface CheckBoxProps {\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 checked: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n ...checkboxIcons,\n fieldContainer: {\n ...fieldBasic.fieldContainer,\n display: \"flex\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n margin: \"15px 0\",\n marginBottom: 0,\n flexBasis: \"initial\",\n },\n });\n\nconst CheckboxWrapper = ({\n label,\n onChange,\n value,\n id,\n name,\n checked = false,\n disabled = false,\n tooltip = \"\",\n classes,\n}: CheckBoxProps) => {\n return (\n \n \n
\n }\n icon={}\n disabled={disabled}\n />\n
\n {label !== \"\" && (\n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n )}\n
\n
\n );\n};\n\nexport default withStyles(styles)(CheckboxWrapper);\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, { Fragment, useState } from \"react\";\nimport get from \"lodash/get\";\nimport isString from \"lodash/isString\";\nimport {\n Checkbox,\n Grid,\n IconButton,\n LinearProgress,\n Paper,\n Popover,\n Typography,\n} from \"@material-ui/core\";\nimport { AutoSizer, Column, InfiniteLoader, Table } from \"react-virtualized\";\nimport { createStyles, withStyles } from \"@material-ui/core/styles\";\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\nimport ViewColumnIcon from \"@material-ui/icons/ViewColumn\";\nimport ArrowDropDownIcon from \"@material-ui/icons/ArrowDropDown\";\nimport ArrowDropUpIcon from \"@material-ui/icons/ArrowDropUp\";\nimport TableActionButton from \"./TableActionButton\";\nimport history from \"../../../../history\";\nimport {\n checkboxIcons,\n radioIcons,\n} from \"../FormComponents/common/styleLibrary\";\nimport CheckboxWrapper from \"../FormComponents/CheckboxWrapper/CheckboxWrapper\";\n\n//Interfaces for table Items\n\ninterface ItemActions {\n type: string;\n to?: string;\n sendOnlyId?: boolean;\n disableButtonFunction?: (itemValue: any) => boolean;\n showLoaderFunction?: (itemValue: any) => boolean;\n\n onClick?(valueToSend: any): any;\n}\n\ninterface IColumns {\n label: string;\n elementKey: string;\n renderFunction?: (input: any) => any;\n renderFullObject?: boolean;\n globalClass?: any;\n rowClass?: any;\n width?: number;\n headerTextAlign?: string;\n contentTextAlign?: string;\n enableSort?: boolean;\n}\n\ninterface IInfiniteScrollConfig {\n loadMoreRecords: (indexElements: {\n startIndex: number;\n stopIndex: number;\n }) => Promise;\n recordsCount: number;\n}\n\ninterface ISortConfig {\n triggerSort: (val: any) => any;\n currentSort: string;\n currentDirection: \"ASC\" | \"DESC\" | undefined;\n}\n\ninterface TableWrapperProps {\n itemActions?: ItemActions[] | null;\n columns: IColumns[];\n onSelect?: (e: React.ChangeEvent) => any;\n idField: string;\n isLoading: boolean;\n loadingMessage?: React.ReactNode;\n records: any[];\n classes: any;\n entityName: string;\n selectedItems?: string[];\n radioSelection?: boolean;\n customEmptyMessage?: string;\n customPaperHeight?: string;\n noBackground?: boolean;\n columnsSelector?: boolean;\n textSelectable?: boolean;\n columnsShown?: string[];\n onColumnChange?: (column: string, state: boolean) => any;\n autoScrollToBottom?: boolean;\n infiniteScrollConfig?: IInfiniteScrollConfig;\n sortConfig?: ISortConfig;\n}\n\nconst borderColor = \"#9c9c9c80\";\n\nconst rowText = {\n fontWeight: 400,\n fontSize: 14,\n borderColor: borderColor,\n borderWidth: \"0.5px\",\n height: 40,\n transitionDuration: \"0.3s\",\n padding: \"initial\",\n paddingRight: 6,\n paddingLeft: 6,\n};\n\nconst styles = () =>\n createStyles({\n dialogContainer: {\n padding: \"12px 26px 22px\",\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n padding: \"19px 38px\",\n boxShadow: \"none\",\n border: \"#EAEDEE 1px solid\",\n borderRadius: 3,\n minHeight: 200,\n overflowY: \"scroll\",\n position: \"relative\",\n \"&::-webkit-scrollbar\": {\n width: 3,\n height: 3,\n },\n },\n noBackground: {\n backgroundColor: \"transparent\",\n border: 0,\n },\n defaultPaperHeight: {\n height: \"calc(100vh - 205px)\",\n },\n allTableSettings: {\n \"& .MuiTableCell-sizeSmall:last-child\": {\n paddingRight: \"initial\",\n },\n \"& .MuiTableCell-body.MuiTableCell-sizeSmall:last-child\": {\n paddingRight: 6,\n },\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: 700,\n fontSize: 14,\n borderColor: \"#39393980\",\n borderWidth: \"0.5px\",\n padding: \"6px 0 10px\",\n },\n },\n },\n rowUnselected: {\n ...rowText,\n color: \"#393939\",\n },\n rowSelected: {\n ...rowText,\n color: \"#081C42\",\n fontWeight: 600,\n },\n paginatorContainer: {\n display: \"flex\",\n justifyContent: \"flex-end\",\n padding: \"5px 38px\",\n },\n checkBoxHeader: {\n width: 50,\n textAlign: \"left\",\n paddingRight: 10,\n \"&.MuiTableCell-paddingCheckbox\": {\n paddingBottom: 4,\n paddingLeft: 0,\n },\n },\n actionsContainer: {\n width: 150,\n borderColor: borderColor,\n },\n paginatorComponent: {\n borderBottom: 0,\n },\n checkBoxRow: {\n borderColor: borderColor,\n padding: \"0 10px 0 0\",\n },\n loadingBox: {\n paddingTop: \"100px\",\n paddingBottom: \"100px\",\n },\n overlayColumnSelection: {\n position: \"absolute\",\n right: 0,\n top: 0,\n },\n popoverContainer: {\n position: \"relative\",\n },\n popoverContent: {\n maxHeight: 250,\n overflowY: \"auto\",\n padding: \"0 10px 10px\",\n },\n shownColumnsLabel: {\n color: \"#9c9c9c\",\n fontSize: 12,\n padding: 10,\n borderBottom: \"#eaeaea 1px solid\",\n width: \"100%\",\n },\n \"@global\": {\n \".rowLine\": {\n borderBottom: `1px solid ${borderColor}`,\n height: 40,\n color: \"#393939\",\n fontSize: 14,\n transitionDuration: 0.3,\n \"&:focus\": {\n outline: \"initial\",\n },\n \"&:hover:not(.ReactVirtualized__Table__headerRow)\": {\n userSelect: \"none\",\n backgroundColor: \"#ececec\",\n fontWeight: 600,\n \"&.canClick\": {\n cursor: \"pointer\",\n },\n \"&.canSelectText\": {\n userSelect: \"text\",\n },\n },\n \"& .selected\": {\n color: \"#081C42\",\n fontWeight: 600,\n },\n },\n \".headerItem\": {\n userSelect: \"none\",\n fontWeight: 700,\n fontSize: 14,\n fontStyle: \"initial\",\n display: \"flex\",\n alignItems: \"center\",\n outline: \"none\",\n },\n \".ReactVirtualized__Table__headerRow\": {\n fontWeight: 700,\n fontSize: 14,\n borderColor: \"#39393980\",\n textTransform: \"initial\",\n },\n \".optionsAlignment\": {\n textAlign: \"center\",\n },\n \".text-center\": {\n textAlign: \"center\",\n },\n \".text-right\": {\n textAlign: \"right\",\n },\n \".progress-enabled\": {\n paddingTop: 3,\n display: \"inline-block\",\n margin: \"0 10px\",\n position: \"relative\",\n width: 18,\n height: 18,\n },\n \".progress-enabled > .MuiCircularProgress-root\": {\n position: \"absolute\",\n left: 0,\n top: 3,\n },\n },\n ...checkboxIcons,\n ...radioIcons,\n });\n\nconst selectWidth = 45;\n\n// Function to render elements in table\nconst subRenderFunction = (\n rowData: any,\n column: IColumns,\n isSelected: boolean\n) => {\n const itemElement = isString(rowData)\n ? rowData\n : get(rowData, column.elementKey, null); // If the element is just a string, we render it as it is\n const renderConst = column.renderFullObject ? rowData : itemElement;\n\n const renderElement = column.renderFunction\n ? column.renderFunction(renderConst)\n : renderConst; // If render function is set, we send the value to the function.\n\n return (\n \n {renderElement}\n \n );\n};\n\n// Function to calculate common column width for elements with no with size\nconst calculateColumnRest = (\n columns: IColumns[],\n containerWidth: number,\n actionsWidth: number,\n hasSelect: boolean,\n hasActions: boolean,\n columnsSelector: boolean,\n columnsShown: string[]\n) => {\n let colsItems = [...columns];\n\n if (columnsSelector) {\n colsItems = columns.filter((column) =>\n columnsShown.includes(column.elementKey)\n );\n }\n\n let initialValue = containerWidth;\n\n if (hasSelect) {\n initialValue -= selectWidth;\n }\n\n if (hasActions) {\n initialValue -= actionsWidth;\n }\n\n let freeSpacing = colsItems.reduce((total, currValue) => {\n return currValue.width ? total - currValue.width : total;\n }, initialValue);\n\n return freeSpacing / colsItems.filter((el) => !el.width).length;\n};\n\n// Function that renders Columns in table\nconst generateColumnsMap = (\n columns: IColumns[],\n containerWidth: number,\n actionsWidth: number,\n hasSelect: boolean,\n hasActions: boolean,\n selectedItems: string[],\n idField: string,\n columnsSelector: boolean,\n columnsShown: string[],\n sortColumn: string,\n sortDirection: \"ASC\" | \"DESC\" | undefined\n) => {\n const commonRestWidth = calculateColumnRest(\n columns,\n containerWidth,\n actionsWidth,\n hasSelect,\n hasActions,\n columnsSelector,\n columnsShown\n );\n return columns.map((column: IColumns, index: number) => {\n if (columnsSelector && !columnsShown.includes(column.elementKey)) {\n return null;\n }\n\n const disableSort = column.enableSort ? !column.enableSort : true;\n\n return (\n (\n \n {sortColumn === column.elementKey && (\n \n {sortDirection === \"ASC\" ? (\n \n ) : (\n \n )}\n \n )}\n {column.label}\n \n )}\n className={\n column.contentTextAlign ? `text-${column.contentTextAlign}` : \"\"\n }\n cellRenderer={({ rowData }) => {\n const isSelected = selectedItems\n ? selectedItems.includes(\n isString(rowData) ? rowData : rowData[idField]\n )\n : false;\n return subRenderFunction(rowData, column, isSelected);\n }}\n width={column.width || commonRestWidth}\n disableSort={disableSort}\n defaultSortDirection={\"ASC\"}\n />\n );\n });\n};\n\n// Function to render the action buttons\nconst elementActions = (\n actions: ItemActions[],\n valueToSend: any,\n selected: boolean,\n idField: string\n) => {\n return actions.map((action: ItemActions, index: number) => {\n if (action.type === \"view\") {\n return null;\n }\n\n const vlSend =\n typeof valueToSend === \"string\" ? valueToSend : valueToSend[idField];\n\n let disabled = false;\n\n if (action.disableButtonFunction) {\n if (action.disableButtonFunction(vlSend)) {\n disabled = true;\n }\n }\n\n if (action.showLoaderFunction) {\n if (action.showLoaderFunction(vlSend)) {\n return (\n
\n \n
\n );\n }\n }\n\n return (\n \n );\n });\n};\n\n// Function to calculate the options column width according elements inside\nconst calculateOptionsSize = (containerWidth: number, totalOptions: number) => {\n const minContainerSize = 80;\n const sizeOptions = totalOptions * 45;\n\n if (sizeOptions < minContainerSize) {\n return minContainerSize;\n }\n\n if (sizeOptions > containerWidth) {\n return containerWidth;\n }\n\n return sizeOptions;\n};\n\n// Main function to render the Table Wrapper\nconst TableWrapper = ({\n itemActions,\n columns,\n onSelect,\n records,\n isLoading,\n loadingMessage = Loading...,\n entityName,\n selectedItems,\n idField,\n classes,\n radioSelection = false,\n customEmptyMessage = \"\",\n customPaperHeight = \"\",\n noBackground = false,\n columnsSelector = false,\n textSelectable = false,\n columnsShown = [],\n onColumnChange = (column: string, state: boolean) => {},\n infiniteScrollConfig,\n sortConfig,\n autoScrollToBottom = false,\n}: TableWrapperProps) => {\n const [columnSelectorOpen, setColumnSelectorOpen] = useState(false);\n const [anchorEl, setAnchorEl] = React.useState(null);\n\n const findView = itemActions\n ? itemActions.find((el) => el.type === \"view\")\n : null;\n\n const clickAction = (rowItem: any) => {\n if (findView) {\n const valueClick = findView.sendOnlyId ? rowItem[idField] : rowItem;\n if (findView.to) {\n history.push(`${findView.to}/${valueClick}`);\n return;\n }\n\n if (findView.onClick) {\n findView.onClick(valueClick);\n }\n }\n };\n\n const openColumnsSelector = (event: { currentTarget: any }) => {\n setColumnSelectorOpen(!columnSelectorOpen);\n setAnchorEl(event.currentTarget);\n };\n\n const closeColumnSelector = () => {\n setColumnSelectorOpen(false);\n setAnchorEl(null);\n };\n\n const columnsSelection = (columns: IColumns[]) => {\n return (\n \n \n \n \n \n
Shown Columns
\n
\n {columns.map((column: IColumns) => {\n return (\n {\n onColumnChange(column.elementKey, e.target.checked);\n }}\n id={`chbox-${column.label}`}\n name={`chbox-${column.label}`}\n value={column.label}\n />\n );\n })}\n
\n \n
\n );\n };\n\n return (\n \n \n {isLoading && (\n \n \n {loadingMessage}\n \n \n \n \n \n )}\n {columnsSelector && !isLoading && records.length > 0 && (\n
\n {columnsSelection(columns)}\n
\n )}\n {records && !isLoading && records.length > 0 ? (\n !!records[index]}\n loadMoreRows={\n infiniteScrollConfig\n ? infiniteScrollConfig.loadMoreRecords\n : () => new Promise(() => true)\n }\n rowCount={\n infiniteScrollConfig\n ? infiniteScrollConfig.recordsCount\n : records.length\n }\n >\n {({ onRowsRendered, registerChild }) => (\n \n {({ width, height }: any) => {\n const optionsWidth = calculateOptionsSize(\n width,\n itemActions\n ? itemActions.filter((el) => el.type !== \"view\").length\n : 0\n );\n const hasSelect: boolean = !!(onSelect && selectedItems);\n const hasOptions: boolean = !!(\n (itemActions && itemActions.length > 1) ||\n (itemActions &&\n itemActions.length === 1 &&\n itemActions[0].type !== \"view\")\n );\n return (\n (\n \n {customEmptyMessage !== \"\"\n ? customEmptyMessage\n : `There are no ${entityName} yet.`}\n \n )}\n overscanRowCount={10}\n rowHeight={40}\n width={width}\n rowCount={records.length}\n rowGetter={({ index }) => records[index]}\n onRowClick={({ rowData }) => {\n clickAction(rowData);\n }}\n rowClassName={`rowLine ${findView ? \"canClick\" : \"\"} ${\n !findView && textSelectable ? \"canSelectText\" : \"\"\n }`}\n onRowsRendered={onRowsRendered}\n sort={sortConfig ? sortConfig.triggerSort : undefined}\n sortBy={sortConfig ? sortConfig.currentSort : undefined}\n sortDirection={\n sortConfig ? sortConfig.currentDirection : undefined\n }\n scrollToIndex={\n autoScrollToBottom ? records.length - 1 : -1\n }\n >\n {hasSelect && (\n Select}\n dataKey={idField}\n width={selectWidth}\n cellRenderer={({ rowData }) => {\n const isSelected = selectedItems\n ? selectedItems.includes(\n isString(rowData) ? rowData : rowData[idField]\n )\n : false;\n\n return (\n {\n e.stopPropagation();\n }}\n checkedIcon={\n \n }\n icon={\n \n }\n />\n );\n }}\n />\n )}\n {generateColumnsMap(\n columns,\n width,\n optionsWidth,\n hasSelect,\n hasOptions,\n selectedItems || [],\n idField,\n columnsSelector,\n columnsShown,\n sortConfig ? sortConfig.currentSort : \"\",\n sortConfig ? sortConfig.currentDirection : undefined\n )}\n {hasOptions && (\n Options}\n dataKey={idField}\n width={optionsWidth}\n headerClassName=\"optionsAlignment\"\n className=\"optionsAlignment\"\n cellRenderer={({ rowData }) => {\n const isSelected = selectedItems\n ? selectedItems.includes(\n isString(rowData) ? rowData : rowData[idField]\n )\n : false;\n return elementActions(\n itemActions || [],\n rowData,\n isSelected,\n idField\n );\n }}\n />\n )}\n \n );\n }}\n \n )}\n \n ) : (\n \n {!isLoading && (\n
\n {customEmptyMessage !== \"\"\n ? customEmptyMessage\n : `There are no ${entityName} yet.`}\n
\n )}\n
\n )}\n \n
\n );\n};\n\nexport default withStyles(styles)(TableWrapper);\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Snackbar from \"@material-ui/core/Snackbar\";\nimport { Dialog, DialogContent, DialogTitle } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { snackBarCommon } from \"../FormComponents/common/styleLibrary\";\nimport { AppState } from \"../../../../store\";\nimport { snackBarMessage } from \"../../../../types\";\nimport { setModalSnackMessage } from \"../../../../actions\";\n\ninterface IModalProps {\n classes: any;\n onClose: () => void;\n modalOpen: boolean;\n title: string;\n children: any;\n wideLimit?: boolean;\n modalSnackMessage?: snackBarMessage;\n noContentPadding?: boolean;\n setModalSnackMessage: typeof setModalSnackMessage;\n}\n\nconst baseCloseLine = {\n content: '\" \"',\n borderLeft: \"2px solid #9C9C9C\",\n height: 33,\n width: 1,\n position: \"absolute\",\n};\n\nconst styles = (theme: Theme) =>\n createStyles({\n dialogContainer: {\n padding: \"8px 15px 22px\",\n },\n closeContainer: {\n textAlign: \"right\",\n },\n closeButton: {\n width: 45,\n height: 45,\n padding: 0,\n backgroundColor: \"initial\",\n \"&:hover\": {\n backgroundColor: \"initial\",\n },\n \"&:active\": {\n backgroundColor: \"initial\",\n },\n },\n modalCloseIcon: {\n fontSize: 35,\n color: \"#9C9C9C\",\n fontWeight: 300,\n \"&:hover\": {\n color: \"#9C9C9C\",\n },\n },\n closeIcon: {\n \"&::before\": {\n ...baseCloseLine,\n transform: \"rotate(45deg)\",\n },\n \"&::after\": {\n ...baseCloseLine,\n transform: \"rotate(-45deg)\",\n },\n \"&:hover::before, &:hover::after\": {\n borderColor: \"#9C9C9C\",\n },\n width: 24,\n height: 24,\n display: \"block\",\n position: \"relative\",\n },\n titleClass: {\n padding: \"0px 50px 12px\",\n \"& h2\": {\n fontWeight: 600,\n color: \"#000\",\n fontSize: 22,\n },\n },\n modalContent: {\n padding: \"0 50px\",\n },\n customDialogSize: {\n width: \"100%\",\n maxWidth: 765,\n },\n ...snackBarCommon,\n });\n\nconst ModalWrapper = ({\n onClose,\n modalOpen,\n title,\n children,\n classes,\n wideLimit = true,\n modalSnackMessage,\n noContentPadding,\n setModalSnackMessage,\n}: IModalProps) => {\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n useEffect(() => {\n if (modalSnackMessage) {\n if (modalSnackMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n setOpenSnackbar(true);\n }\n }, [modalSnackMessage]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n setModalSnackMessage(\"\");\n };\n\n const customSize = wideLimit\n ? {\n classes: {\n paper: classes.customDialogSize,\n },\n }\n : { maxWidth: \"md\" as const, fullWidth: true };\n\n return (\n \n
\n {\n closeSnackBar();\n }}\n message={modalSnackMessage ? modalSnackMessage.message : \"\"}\n ContentProps={{\n className: `${classes.snackBar} ${\n modalSnackMessage && modalSnackMessage.type === \"error\"\n ? classes.errorSnackBar\n : \"\"\n }`,\n }}\n autoHideDuration={\n modalSnackMessage && modalSnackMessage.type === \"error\"\n ? 10000\n : 5000\n }\n />\n
\n \n \n \n
\n \n {title}\n \n \n {children}\n \n
\n \n );\n};\n\nconst mapState = (state: AppState) => ({\n modalSnackMessage: state.system.modalSnackBar,\n});\n\nconst connector = connect(mapState, {\n setModalSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ModalWrapper));\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 {\n Grid,\n IconButton,\n InputLabel,\n TextField,\n TextFieldProps,\n Tooltip,\n} from \"@material-ui/core\";\nimport { OutlinedInputProps } from \"@material-ui/core/OutlinedInput\";\nimport {\n createStyles,\n makeStyles,\n Theme,\n withStyles,\n} from \"@material-ui/core/styles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\ninterface InputBoxProps {\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 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 overlayIcon?: any;\n overlayAction?: () => void;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n textBoxContainer: {\n flexGrow: 1,\n },\n textBoxWithIcon: {\n position: \"relative\",\n paddingRight: 25,\n },\n errorState: {\n color: \"#b53b4b\",\n fontSize: 14,\n position: \"absolute\",\n top: 7,\n right: 7,\n },\n overlayAction: {\n position: \"absolute\",\n right: 0,\n top: 15,\n \"& svg\": {\n maxWidth: 15,\n maxHeight: 15,\n },\n },\n });\n\nconst inputStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n borderRadius: 0,\n \"&::before\": {\n borderColor: \"#9c9c9c\",\n },\n },\n disabled: {\n \"&.MuiInput-underline::before\": {\n borderColor: \"#eaeaea\",\n borderBottomStyle: \"solid\",\n },\n },\n input: {\n padding: \"15px 30px 10px 5px\",\n color: \"#393939\",\n fontSize: 13,\n fontWeight: 600,\n \"&:placeholder\": {\n color: \"#393939\",\n opacity: 1,\n },\n },\n error: {\n color: \"#b53b4b\",\n },\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 overlayIcon = null,\n overlayAction,\n classes,\n}: InputBoxProps) => {\n let inputProps: any = { \"data-index\": index };\n\n if (type === \"number\" && min) {\n inputProps[\"min\"] = min;\n }\n\n if (type === \"number\" && max) {\n inputProps[\"max\"] = max;\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
\n {overlayIcon && (\n
\n {\n overlayAction();\n }\n : () => null\n }\n size={\"small\"}\n disableFocusRipple={false}\n disableRipple={false}\n disableTouchRipple={false}\n >\n {overlayIcon}\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 \"@material-ui/core/Grid\";\nimport {\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n InputBase,\n Tooltip,\n} from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\ninterface 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: (\n e: React.ChangeEvent<{ name?: string | undefined; value: unknown }>\n ) => void;\n disabled?: boolean;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n });\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n lineHeight: 1,\n \"label + &\": {\n marginTop: theme.spacing(3),\n },\n },\n input: {\n position: \"relative\",\n color: \"#393939\",\n fontSize: 13,\n fontWeight: 600,\n padding: \"15px 20px 10px 10px\",\n borderBottom: \"1px solid #9c9c9c\",\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","// 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 clsx from \"clsx\";\nimport Grid from \"@material-ui/core/Grid\";\nimport RadioGroup from \"@material-ui/core/RadioGroup\";\nimport FormControlLabel from \"@material-ui/core/FormControlLabel\";\nimport Radio, { RadioProps } from \"@material-ui/core/Radio\";\nimport { InputLabel, Tooltip } from \"@material-ui/core\";\nimport {\n createStyles,\n Theme,\n withStyles,\n makeStyles,\n} from \"@material-ui/core/styles\";\nimport { fieldBasic, radioIcons, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\nexport interface SelectorTypes {\n label: string;\n value: string;\n}\n\ninterface RadioGroupProps {\n selectorOptions: SelectorTypes[];\n currentSelection: string;\n label: string;\n id: string;\n name: string;\n tooltip?: string;\n disableOptions?: boolean;\n onChange: (e: React.ChangeEvent) => void;\n classes: any;\n displayInColumn?: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n radioBoxContainer: {},\n fieldContainer: {\n ...fieldBasic.fieldContainer,\n display: \"flex\",\n justifyContent: \"space-between\",\n borderBottom: \"#9c9c9c 1px solid\",\n paddingBottom: 10,\n marginTop: 11,\n },\n optionLabel: {\n \"&.Mui-disabled\": {\n \"& .MuiFormControlLabel-label\": {\n color: \"#9c9c9c\",\n },\n },\n \"&:last-child\": {\n marginRight: 0,\n },\n \"& .MuiFormControlLabel-label\": {\n fontSize: 12,\n color: \"#000\",\n },\n },\n checkedOption: {\n \"& .MuiFormControlLabel-label\": {\n fontSize: 12,\n color: \"#000\",\n fontWeight: 700,\n },\n },\n });\n\nconst radioStyles = makeStyles({\n root: {\n \"&:hover\": {\n backgroundColor: \"transparent\",\n },\n },\n ...radioIcons,\n});\n\nconst RadioButton = (props: RadioProps) => {\n const classes = radioStyles();\n\n return (\n }\n icon={}\n {...props}\n />\n );\n};\n\nexport const RadioGroupSelector = ({\n selectorOptions = [],\n currentSelection,\n label,\n id,\n name,\n onChange,\n tooltip = \"\",\n disableOptions = false,\n classes,\n displayInColumn = false,\n}: RadioGroupProps) => {\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n\n
\n \n {selectorOptions.map((selectorOption) => {\n return (\n }\n label={selectorOption.label}\n disabled={disableOptions}\n className={clsx(classes.optionLabel, {\n [classes.checkedOption]:\n selectorOption.value === currentSelection,\n })}\n />\n );\n })}\n \n
\n
\n
\n );\n};\n\nexport default withStyles(styles)(RadioGroupSelector);\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 from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { InputLabel, Switch, Tooltip, Typography } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { actionsTray, fieldBasic } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\n\ninterface IFormSwitch {\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 description?: string;\n index?: number;\n indicatorLabels?: string[];\n checked: boolean;\n switchOnly?: boolean;\n containerClass?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n paddingTop: 15,\n boxShadow: \"none\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n noFound: {\n textAlign: \"center\",\n padding: \"10px 0\",\n },\n tableContainer: {\n maxHeight: 200,\n },\n stickyHeader: {\n backgroundColor: \"#fff\",\n },\n actionsTitle: {\n fontWeight: 600,\n color: \"#081C42\",\n fontSize: 16,\n alignSelf: \"center\",\n },\n tableBlock: {\n marginTop: 15,\n },\n filterField: {\n width: 375,\n fontWeight: 600,\n \"& .input\": {\n \"&::placeholder\": {\n fontWeight: 600,\n color: \"#081C42\",\n },\n },\n },\n divContainer: {\n borderBottom: \"#9c9c9c 1px solid\",\n paddingBottom: 14,\n marginBottom: 20,\n maxWidth: 840,\n },\n wrapperContainer: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n maxWidth: 840,\n },\n indicatorLabel: {\n fontSize: 12,\n fontWeight: 600,\n color: \"#081C42\",\n margin: \"0 8px 0 10px\",\n },\n fieldDescription: {\n marginTop: 4,\n color: \"#999999\",\n },\n ...actionsTray,\n ...fieldBasic,\n });\n\nconst StyledSwitch = withStyles({\n root: {\n alignItems: \"flex-start\",\n height: 18,\n padding: \"0 12px\",\n display: \"flex\",\n position: \"relative\",\n },\n switchBase: {\n color: \"#fff\",\n padding: 0,\n top: \"initial\",\n \"&$checked\": {\n color: \"#fff\",\n },\n \"&$checked + $track\": {\n backgroundColor: \"#081C42\",\n opacity: 1,\n height: 15,\n },\n \"&:hover\": {\n backgroundColor: \"#fff\",\n },\n },\n checked: {},\n track: {\n height: 15,\n backgroundColor: \"#9C9C9C\",\n border: \"#081C42 1px solid\",\n opacity: 1,\n padding: 0,\n marginTop: 1.5,\n \"&$checked\": {\n backgroundColor: \"#081C42\",\n },\n },\n thumb: {\n backgroundColor: \"#fff\",\n border: \"#081C42 1px solid\",\n boxShadow: \"none\",\n width: 18,\n height: 18,\n padding: 0,\n marginLeft: 10,\n },\n})(Switch);\n\nconst FormSwitchWrapper = ({\n label = \"\",\n onChange,\n value,\n id,\n name,\n checked = false,\n disabled = false,\n switchOnly = false,\n tooltip = \"\",\n description = \"\",\n indicatorLabels = [],\n containerClass = \"\",\n classes,\n}: IFormSwitch) => {\n const switchComponent = (\n \n
\n \n {indicatorLabels.length === 2 && (\n \n {checked ? indicatorLabels[0] : indicatorLabels[1]}\n \n )}\n
\n
\n );\n\n if (switchOnly) {\n return switchComponent;\n }\n\n return (\n
\n \n {label !== \"\" && (\n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n )}\n {switchComponent}\n
\n {description !== \"\" && (\n \n \n {description}\n \n \n )}\n
\n );\n};\n\nexport default withStyles(styles)(FormSwitchWrapper);\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, { useEffect, useState } from \"react\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress, Typography } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../../common/api\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport RadioGroupSelector from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport { factorForDropdown, getBytes } from \"../../../../common/utils\";\nimport { AppState } from \"../../../../store\";\nimport { connect } from \"react-redux\";\nimport {\n addBucketEnableObjectLocking,\n addBucketName,\n addBucketQuota,\n addBucketQuotaSize,\n addBucketQuotaType,\n addBucketQuotaUnit,\n addBucketRetention,\n addBucketRetentionMode,\n addBucketRetentionUnit,\n addBucketRetentionValidity,\n addBucketVersioning,\n} from \"../actions\";\nimport { useDebounce } from \"use-debounce\";\nimport { MakeBucketRequest } from \"../types\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n multiContainer: {\n display: \"flex\",\n alignItems: \"center\" as const,\n justifyContent: \"flex-start\" as const,\n },\n quotaSizeContainer: {\n flexGrow: 1,\n },\n sizeFactorContainer: {\n flexGrow: 0,\n maxWidth: 80,\n marginLeft: 8,\n alignSelf: \"flex-start\" as const,\n },\n ...modalBasic,\n });\n\ninterface IAddBucketProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (refresh: boolean) => void;\n addBucketName: typeof addBucketName;\n addBucketVersioned: typeof addBucketVersioning;\n enableObjectLocking: typeof addBucketEnableObjectLocking;\n addBucketQuota: typeof addBucketQuota;\n addBucketQuotaType: typeof addBucketQuotaType;\n addBucketQuotaSize: typeof addBucketQuotaSize;\n addBucketQuotaUnit: typeof addBucketQuotaUnit;\n addBucketRetention: typeof addBucketRetention;\n addBucketRetentionMode: typeof addBucketRetentionMode;\n addBucketRetentionUnit: typeof addBucketRetentionUnit;\n addBucketRetentionValidity: typeof addBucketRetentionValidity;\n setModalError: typeof setModalErrorSnackMessage;\n bucketName: string;\n versioningEnabled: boolean;\n lockingEnabled: boolean;\n quotaEnabled: boolean;\n quotaType: string;\n quotaSize: string;\n quotaUnit: string;\n retentionEnabled: boolean;\n retentionMode: string;\n retentionUnit: string;\n retentionValidity: number;\n}\n\nconst AddBucket = ({\n classes,\n open,\n closeModalAndRefresh,\n addBucketName,\n addBucketVersioned,\n enableObjectLocking,\n addBucketQuota,\n addBucketQuotaType,\n addBucketQuotaSize,\n addBucketQuotaUnit,\n addBucketRetention,\n addBucketRetentionMode,\n addBucketRetentionUnit,\n addBucketRetentionValidity,\n setModalError,\n bucketName,\n versioningEnabled,\n lockingEnabled,\n quotaEnabled,\n quotaType,\n quotaSize,\n quotaUnit,\n retentionEnabled,\n retentionMode,\n retentionUnit,\n retentionValidity,\n}: IAddBucketProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [sendEnabled, setSendEnabled] = useState(false);\n const [lockingFieldDisabled, setLockingFieldDisabled] =\n useState(false);\n\n const addRecord = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n\n let request: MakeBucketRequest = {\n name: bucketName,\n versioning: versioningEnabled,\n locking: lockingEnabled,\n };\n\n if (quotaEnabled) {\n const amount = getBytes(quotaSize, quotaUnit, false);\n request.quota = {\n enabled: true,\n quota_type: quotaType,\n amount: parseInt(amount),\n };\n }\n\n if (retentionEnabled) {\n request.retention = {\n mode: retentionMode,\n unit: retentionUnit,\n validity: retentionValidity,\n };\n }\n\n api\n .invoke(\"POST\", \"/api/v1/buckets\", request)\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n setAddLoading(false);\n setModalError(err);\n });\n\n resetForm();\n };\n\n const [value] = useDebounce(bucketName, 1000);\n\n useEffect(() => {\n addBucketName(value);\n }, [value, addBucketName]);\n\n const resetForm = () => {\n addBucketName(\"\");\n addBucketVersioned(false);\n enableObjectLocking(false);\n addBucketQuota(false);\n addBucketQuotaType(\"hard\");\n addBucketQuotaSize(\"1\");\n addBucketQuotaUnit(\"TiB\");\n addBucketRetention(false);\n addBucketRetentionMode(\"compliance\");\n addBucketRetentionUnit(\"days\");\n addBucketRetentionValidity(1);\n };\n\n useEffect(() => {\n let valid = false;\n\n if (bucketName.trim() !== \"\") {\n valid = true;\n }\n\n if (quotaEnabled && valid) {\n if (quotaSize.trim() === \"\" || parseInt(quotaSize) === 0) {\n valid = false;\n }\n }\n\n if (!versioningEnabled || !retentionEnabled) {\n addBucketRetention(false);\n addBucketRetentionMode(\"compliance\");\n addBucketRetentionUnit(\"days\");\n addBucketRetentionValidity(1);\n }\n\n if (retentionEnabled) {\n // if retention is enabled, then objec locking should be enabled as well\n enableObjectLocking(true);\n setLockingFieldDisabled(true);\n } else {\n setLockingFieldDisabled(false);\n }\n\n if (\n retentionEnabled &&\n (Number.isNaN(retentionValidity) || retentionValidity < 1)\n ) {\n valid = false;\n }\n\n setSendEnabled(valid);\n }, [\n bucketName,\n retentionEnabled,\n lockingEnabled,\n quotaType,\n quotaSize,\n quotaUnit,\n quotaEnabled,\n addBucketRetention,\n addBucketRetentionMode,\n addBucketRetentionUnit,\n addBucketRetentionValidity,\n retentionValidity,\n versioningEnabled,\n enableObjectLocking,\n ]);\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n ) => {\n addRecord(e);\n }}\n >\n \n \n \n ) => {\n addBucketName(event.target.value);\n }}\n label=\"Bucket Name\"\n value={bucketName}\n />\n \n \n \n Features\n \n
\n
\n \n ) => {\n addBucketVersioned(event.target.checked);\n }}\n description={\n \"Allows to keep multiple versions of the same object under the same key.\"\n }\n label={\"Versioning\"}\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n \n ) => {\n enableObjectLocking(event.target.checked);\n }}\n label={\"Object Locking\"}\n description={\n \"Required to support retention and legal hold. Can only be enabled at bucket creation.\"\n }\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n \n ) => {\n addBucketQuota(event.target.checked);\n }}\n label={\"Quota\"}\n description={\"Limit the amount of data in the bucket.\"}\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n {quotaEnabled && (\n \n \n ) => {\n addBucketQuotaType(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"hard\", label: \"Hard\" },\n { value: \"fifo\", label: \"FIFO\" },\n ]}\n />\n \n \n
\n
\n ) => {\n addBucketQuotaSize(e.target.value);\n }}\n label=\"Quota\"\n value={quotaSize}\n required\n min=\"1\"\n />\n
\n
\n \n ) => {\n addBucketQuotaUnit(e.target.value as string);\n }}\n options={factorForDropdown()}\n />\n
\n
\n
\n
\n )}\n {versioningEnabled && (\n \n ) => {\n addBucketRetention(event.target.checked);\n }}\n label={\"Retention\"}\n description={\n \"Impose rules to prevent object deletion for a period of time.\"\n }\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n )}\n {retentionEnabled && (\n \n \n ) => {\n addBucketRetentionMode(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"compliance\", label: \"Compliance\" },\n { value: \"governance\", label: \"Governance\" },\n ]}\n />\n \n \n ) => {\n addBucketRetentionUnit(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"days\", label: \"Days\" },\n { value: \"years\", label: \"Years\" },\n ]}\n />\n \n \n ) => {\n addBucketRetentionValidity(e.target.valueAsNumber);\n }}\n label=\"Retention Validity\"\n value={String(retentionValidity)}\n required\n min=\"1\"\n />\n \n \n )}\n
\n \n \n Clear\n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n
\n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n addBucketModalOpen: state.buckets.open,\n bucketName: state.buckets.addBucketName,\n versioningEnabled: state.buckets.addBucketVersioningEnabled,\n lockingEnabled: state.buckets.addBucketLockingEnabled,\n quotaEnabled: state.buckets.addBucketQuotaEnabled,\n quotaType: state.buckets.addBucketQuotaType,\n quotaSize: state.buckets.addBucketQuotaSize,\n quotaUnit: state.buckets.addBucketQuotaUnit,\n retentionEnabled: state.buckets.addBucketRetentionEnabled,\n retentionMode: state.buckets.addBucketRetentionMode,\n retentionUnit: state.buckets.addBucketRetentionUnit,\n retentionValidity: state.buckets.addBucketRetentionValidity,\n});\n\nconst connector = connect(mapState, {\n addBucketName: addBucketName,\n addBucketVersioned: addBucketVersioning,\n enableObjectLocking: addBucketEnableObjectLocking,\n addBucketQuota: addBucketQuota,\n addBucketQuotaType: addBucketQuotaType,\n addBucketQuotaSize: addBucketQuotaSize,\n addBucketQuotaUnit: addBucketQuotaUnit,\n addBucketRetention: addBucketRetention,\n addBucketRetentionMode: addBucketRetentionMode,\n addBucketRetentionUnit: addBucketRetentionUnit,\n addBucketRetentionValidity: addBucketRetentionValidity,\n setModalError: setModalErrorSnackMessage,\n});\n\nexport default connector(withStyles(styles)(AddBucket));\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport { BucketList } from \"../types\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\n\ninterface IDeleteBucketProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedBucket: string;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteBucket = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedBucket,\n setErrorSnackMessage,\n}: IDeleteBucketProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n\n const removeRecord = () => {\n if (!deleteLoading) {\n setDeleteLoading(true);\n\n api\n .invoke(\"DELETE\", `/api/v1/buckets/${selectedBucket}`, {\n name: selectedBucket,\n })\n .then((res: BucketList) => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n }\n };\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete Bucket\n \n {deleteLoading && }\n \n Are you sure you want to delete bucket {selectedBucket}?
\n A bucket can only be deleted if it's empty.\n
\n
\n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n {\n removeRecord();\n }}\n color=\"secondary\"\n autoFocus\n >\n Delete\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(DeleteBucket);\n","import React from \"react\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Typography from \"@material-ui/core/Typography\";\n\ninterface IPageHeader {\n classes: any;\n label: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerContainer: {\n position: \"absolute\",\n width: \"100%\",\n height: 77,\n display: \"flex\",\n backgroundColor: \"#fff\",\n borderBottom: \"#E3E3E3 1px solid\",\n left: 0,\n },\n label: {\n display: \"flex\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n },\n labelStyle: {\n color: \"#000\",\n fontSize: 18,\n fontWeight: 700,\n marginLeft: 55,\n marginTop: 8,\n },\n });\n\nconst PageHeader = ({ classes, label }: IPageHeader) => {\n return (\n \n \n \n {label}\n \n \n \n );\n};\n\nexport default withStyles(styles)(PageHeader);\n","import React, { Fragment } from \"react\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { predefinedList } from \"../common/styleLibrary\";\n\ninterface IPredefinedList {\n classes: any;\n label?: string;\n content: any;\n multiLine?: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...predefinedList,\n });\n\nconst PredefinedList = ({\n classes,\n label = \"\",\n content,\n multiLine = false,\n}: IPredefinedList) => {\n return (\n \n \n {label !== \"\" && (\n \n {label}\n \n )}\n \n \n {content}\n \n \n \n \n );\n};\n\nexport default withStyles(styles)(PredefinedList);\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 from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { IWizardButton, IWizardPage } from \"./types\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n wizardStepContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n },\n wizardComponent: {\n overflowY: \"auto\",\n marginBottom: 10,\n height: \"calc(100vh - 435px)\",\n maxWidth: 840,\n width: \"100%\",\n },\n wizardModal: {\n overflowY: \"auto\",\n marginBottom: 10,\n height: \"calc(100vh - 515px)\",\n },\n buttonsContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"flex-start\" as const,\n padding: \"10px 0\",\n borderTop: \"#EAEAEA 1px solid\",\n \"& button\": {\n marginLeft: 10,\n },\n \"&.forModal\": {\n paddingBottom: 0,\n },\n },\n buttonInnerContainer: {\n maxWidth: 840,\n width: \"100%\",\n textAlign: \"right\" as const,\n },\n });\n\nconst WizardPage = ({\n classes,\n page,\n pageChange,\n loadingStep,\n forModal,\n}: IWizardPage) => {\n const buttonAction = (btn: IWizardButton) => {\n switch (btn.type) {\n case \"next\":\n pageChange(\"++\");\n break;\n case \"back\":\n pageChange(\"--\");\n break;\n case \"to\":\n pageChange(btn.toPage || 0);\n break;\n case \"custom\":\n default:\n }\n\n if (btn.action) {\n btn.action(pageChange);\n }\n };\n\n return (\n
\n
\n {page.componentRender}\n
\n {loadingStep && (\n
\n \n
\n )}\n \n
\n {page.buttons.map((btn) => {\n return (\n {\n buttonAction(btn);\n }}\n disabled={!btn.enabled}\n key={`button-${page.label}-${btn.label}`}\n >\n {btn.label}\n \n );\n })}\n
\n
\n
\n );\n};\n\nexport default withStyles(styles)(WizardPage);\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, { useState, Fragment } from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { IWizardMain } from \"./types\";\nimport WizardPage from \"./WizardPage\";\nimport { Grid } from \"@material-ui/core\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n wizardMain: {\n display: \"flex\",\n width: \"100%\",\n height: \"100%\",\n flexGrow: 1,\n },\n wizFromContainer: {\n height: \"calc(100vh - 365px)\",\n minHeight: 450,\n padding: \"0 30px\",\n },\n wizFromModal: {\n position: \"relative\",\n },\n wizardSteps: {\n minWidth: 180,\n marginRight: 10,\n borderRight: \"#eaeaea 1px solid\",\n display: \"flex\",\n flexGrow: 1,\n flexDirection: \"column\",\n height: \"100%\",\n \"& ul\": {\n padding: \"0 15px 0 40px\",\n marginTop: 0,\n\n \"& li\": {\n listStyle: \"lower-roman\",\n marginBottom: 12,\n },\n },\n },\n modalWizardSteps: {\n padding: 5,\n borderBottom: \"#eaeaea 1px solid\",\n \"& ul\": {\n padding: 0,\n marginTop: 0,\n display: \"flex\",\n justifyContent: \"space-evenly\",\n\n \"& li\": {\n listStyle: \"lower-roman\",\n \"&::marker\": {\n paddingLeft: 15,\n },\n },\n },\n },\n buttonList: {\n backgroundColor: \"transparent\",\n border: \"none\",\n cursor: \"pointer\",\n \"&:not(:disabled):hover\": {\n textDecoration: \"underline\",\n },\n \"&:selected, &:active, &:focus, &:focus:active\": {\n border: \"none\",\n outline: 0,\n boxShadow: \"none\",\n },\n },\n paddedContentGrid: {\n padding: \"0 10px\",\n },\n stepsLabel: {\n fontSize: 20,\n color: \"#393939\",\n fontWeight: 600,\n margin: \"15px 12px\",\n \"&.stepsModalTitle\": {\n textAlign: \"center\",\n width: \"100%\",\n marginTop: 0,\n marginBottom: 10,\n },\n },\n stepsMasterContainer: {\n position: \"sticky\",\n top: 0,\n backgroundColor: \"#FFFFFF\",\n width: \"100%\",\n maxHeight: 90,\n },\n });\n\nconst GenericWizard = ({\n classes,\n wizardSteps,\n loadingStep,\n forModal,\n}: IWizardMain) => {\n const [currentStep, setCurrentStep] = useState(0);\n\n const pageChange = (toElement: string | number) => {\n const lastPage = wizardSteps.length - 1;\n\n if (toElement === \"++\") {\n let nextPage = currentStep + 1;\n\n if (nextPage > lastPage) {\n nextPage = lastPage;\n }\n\n setCurrentStep(nextPage);\n }\n\n if (toElement === \"--\") {\n let prevPage = currentStep - 1;\n\n if (prevPage < 0) {\n prevPage = 0;\n }\n\n setCurrentStep(prevPage);\n }\n\n if (typeof toElement === \"number\") {\n let pg = toElement;\n if (toElement < 0) {\n pg = 0;\n }\n\n if (toElement > lastPage) {\n pg = lastPage;\n }\n\n setCurrentStep(pg);\n }\n };\n\n if (wizardSteps.length === 0) {\n return null;\n }\n\n const stepsList = () => {\n return (\n
    \n {wizardSteps.map((step, index) => {\n return (\n
  • \n pageChange(index)}\n disabled={index > currentStep}\n className={classes.buttonList}\n >\n {step.label}\n \n
  • \n );\n })}\n
\n );\n };\n\n return (\n \n {forModal ? (\n \n
\n
Steps
\n
{stepsList()}
\n
\n
\n ) : (\n \n \n
\n Steps\n {stepsList()}\n
\n
\n
\n )}\n\n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(GenericWizard);\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, { useState, useEffect, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Tooltip } from \"@material-ui/core\";\nimport get from \"lodash/get\";\nimport Grid from \"@material-ui/core/Grid\";\nimport ErrorOutlineIcon from \"@material-ui/icons/ErrorOutline\";\nimport CheckCircleOutlineIcon from \"@material-ui/icons/CheckCircleOutline\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport { BulkReplicationResponse, BulkReplicationItem } from \"../types\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport PredefinedList from \"../../Common/FormComponents/PredefinedList/PredefinedList\";\nimport api from \"../../../../common/api\";\nimport GenericWizard from \"../../Common/GenericWizard/GenericWizard\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { SelectorTypes } from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\n\ninterface IBulkReplicationModal {\n open: boolean;\n closeModalAndRefresh: (clearSelection: boolean) => any;\n classes: any;\n buckets: string[];\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n remoteBucketList: {\n display: \"grid\",\n gridTemplateColumns: \"auto auto 45px\",\n alignItems: \"center\",\n justifyContent: \"stretch\",\n },\n errorIcon: {\n color: \"#C72C48\",\n },\n successIcon: {\n color: \"#42C91A\",\n },\n hide: {\n opacity: 0,\n transitionDuration: \"0.3s\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst AddBulkReplicationModal = ({\n open,\n closeModalAndRefresh,\n classes,\n buckets,\n setModalErrorSnackMessage,\n}: IBulkReplicationModal) => {\n const [bucketsToAlter, setBucketsToAlter] = useState([]);\n const [addLoading, setAddLoading] = useState(false);\n const [externalLoading, setExternalLoading] = useState(false);\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n const [targetURL, setTargetURL] = useState(\"\");\n const [region, setRegion] = useState(\"\");\n const [useTLS, setUseTLS] = useState(true);\n const [relationBuckets, setRelationBuckets] = useState([]);\n const [remoteBucketsOpts, setRemoteBucketOpts] = useState([]);\n const [responseItem, setResponseItem] = useState([]);\n\n const optionsForBucketsDrop: SelectorTypes[] = remoteBucketsOpts.map(\n (remoteBucketName: string) => {\n return {\n label: remoteBucketName,\n value: remoteBucketName,\n };\n }\n );\n\n useEffect(() => {\n if (relationBuckets.length === 0) {\n const bucketsAlter: string[] = [];\n const relationBucketsAlter: string[] = [];\n\n buckets.forEach((item: string) => {\n bucketsAlter.push(item);\n relationBucketsAlter.push(\"\");\n });\n\n setRelationBuckets(relationBucketsAlter);\n setBucketsToAlter(bucketsAlter);\n }\n }, [buckets, relationBuckets.length]);\n\n const addRecord = () => {\n setAddLoading(true);\n const replicate = bucketsToAlter.map((bucketName, index) => {\n return {\n originBucket: bucketName,\n destinationBucket: relationBuckets[index],\n };\n });\n\n const endURL = `${useTLS ? \"https://\" : \"http://\"}${targetURL}`;\n const remoteBucketsInfo = {\n accessKey: accessKey,\n secretKey: secretKey,\n targetURL: endURL,\n region: region,\n bucketsRelation: replicate,\n };\n\n api\n .invoke(\"POST\", \"/api/v1/buckets-replication\", remoteBucketsInfo)\n .then((response: BulkReplicationResponse) => {\n setAddLoading(false);\n\n const states = response.replicationState;\n setResponseItem(states);\n\n const filterErrors = states.filter(\n (itm) => itm.errorString && itm.errorString !== \"\"\n );\n\n if (filterErrors.length === 0) {\n closeModalAndRefresh(true);\n } else {\n setTimeout(() => {\n removeSuccessItems(states);\n }, 500);\n }\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n const retrieveRemoteBuckets = (\n wizardPageJump: (page: number | string) => void\n ) => {\n const remoteConnectInfo = {\n accessKey: accessKey,\n secretKey: secretKey,\n targetURL: targetURL,\n useTLS,\n };\n setExternalLoading(true);\n\n api\n .invoke(\"POST\", \"api/v1/list-external-buckets\", remoteConnectInfo)\n .then((dataReturn) => {\n const buckets = get(dataReturn, \"buckets\", []);\n\n if (buckets && buckets.length > 0) {\n const arrayReplaceBuckets = buckets.map((element: any) => {\n return element.name;\n });\n\n setRemoteBucketOpts(arrayReplaceBuckets);\n }\n\n wizardPageJump(\"++\");\n setExternalLoading(false);\n })\n .catch((err) => {\n setExternalLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n const stateOfItem = (initialBucket: string) => {\n if (responseItem.length > 0) {\n const bucketResponse = responseItem.find(\n (item) => item.originBucket === initialBucket\n );\n\n if (bucketResponse) {\n const errString = get(bucketResponse, \"errorString\", \"\");\n\n if (errString) {\n return errString;\n }\n\n return \"\";\n }\n }\n return \"n/a\";\n };\n\n const LogoToShow = ({ errString }: { errString: string }) => {\n switch (errString) {\n case \"\":\n return (\n
\n \n
\n );\n case \"n/a\":\n return null;\n default:\n if (errString) {\n return (\n
\n \n \n \n
\n );\n }\n }\n return null;\n };\n\n const updateItem = (indexItem: number, value: string) => {\n const updatedList = [...relationBuckets];\n updatedList[indexItem] = value;\n setRelationBuckets(updatedList);\n };\n\n const itemDisplayBulk = (indexItem: number) => {\n if (remoteBucketsOpts.length > 0) {\n return (\n \n ) => {\n updateItem(indexItem, e.target.value as string);\n }}\n options={optionsForBucketsDrop}\n disabled={addLoading}\n />\n \n );\n }\n return (\n \n ) => {\n updateItem(indexItem, event.target.value);\n }}\n value={relationBuckets[indexItem]}\n disabled={addLoading}\n />\n \n );\n };\n\n const removeSuccessItems = (responseItem: BulkReplicationItem[]) => {\n let newBucketsToAlter = [...bucketsToAlter];\n let newRelationBuckets = [...relationBuckets];\n\n responseItem.forEach((successElement) => {\n const errorString = get(successElement, \"errorString\", \"\");\n\n if (!errorString || errorString === \"\") {\n const indexToRemove = newBucketsToAlter.indexOf(\n successElement.originBucket\n );\n\n newBucketsToAlter.splice(indexToRemove, 1);\n newRelationBuckets.splice(indexToRemove, 1);\n }\n });\n\n setBucketsToAlter(newBucketsToAlter);\n setRelationBuckets(newRelationBuckets);\n };\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n title=\"Set Multiple Bucket Replication\"\n >\n \n \n \n \n

Remote Endpoint Configuration

\n \n Please avoid the use of root credentials for this feature\n \n
\n
\n \n ) => {\n setAccessKey(e.target.value);\n }}\n label=\"Access Key\"\n value={accessKey}\n />\n \n \n ) => {\n setSecretKey(e.target.value);\n }}\n label=\"Secret Key\"\n value={secretKey}\n />\n \n \n ) => {\n setTargetURL(e.target.value);\n }}\n placeholder=\"play.min.io:9000\"\n label=\"Target URL\"\n value={targetURL}\n />\n \n \n {\n setUseTLS(e.target.checked);\n }}\n value=\"yes\"\n />\n \n \n ) => {\n setRegion(e.target.value);\n }}\n label=\"Region\"\n value={region}\n />\n \n \n ),\n buttons: [\n {\n type: \"custom\",\n label: \"Next\",\n enabled: !externalLoading,\n action: retrieveRemoteBuckets,\n },\n ],\n },\n {\n label: \"Buckets Assignation\",\n componentRender: (\n \n

Remote Buckets Assignation

\n \n Please select / type the desired remote bucket were you want\n the local data to be replicated.\n \n
\n {bucketsToAlter.map((bucketName: string, index: number) => {\n const errorItem = stateOfItem(bucketName);\n return (\n \n
\n {bucketName}\n
\n
\n {itemDisplayBulk(index)}\n
\n
\n {responseItem.length > 0 && (\n \n )}\n
\n \n );\n })}\n
\n
\n ),\n buttons: [\n {\n type: \"back\",\n label: \"Back\",\n enabled: true,\n },\n {\n type: \"next\",\n label: \"Create\",\n enabled: !addLoading,\n action: addRecord,\n },\n ],\n },\n ]}\n forModal\n />\n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(AddBulkReplicationModal));\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, { useEffect, useState, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport FileCopyIcon from \"@material-ui/icons/FileCopy\";\nimport Moment from \"react-moment\";\nimport { Bucket, BucketList, HasPermissionResponse } from \"../types\";\nimport { CreateIcon } from \"../../../../icons\";\nimport { niceBytes } from \"../../../../common/utils\";\nimport { AppState } from \"../../../../store\";\nimport { addBucketOpen, addBucketReset } from \"../actions\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../../common/api\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport AddBucket from \"./AddBucket\";\nimport DeleteBucket from \"./DeleteBucket\";\nimport PageHeader from \"../../Common/PageHeader/PageHeader\";\nimport BulkReplicationModal from \"./BulkReplicationModal\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IListBucketsProps {\n classes: any;\n addBucketOpen: typeof addBucketOpen;\n addBucketModalOpen: boolean;\n addBucketReset: typeof addBucketReset;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst ListBuckets = ({\n classes,\n addBucketOpen,\n addBucketModalOpen,\n addBucketReset,\n setErrorSnackMessage,\n}: IListBucketsProps) => {\n const [records, setRecords] = useState([]);\n const [loading, setLoading] = useState(true);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [selectedBucket, setSelectedBucket] = useState(\"\");\n const [filterBuckets, setFilterBuckets] = useState(\"\");\n const [loadingPerms, setLoadingPerms] = useState(true);\n const [canCreateBucket, setCanCreateBucket] = useState(false);\n const [selectedBuckets, setSelectedBuckets] = useState([]);\n const [replicationModalOpen, setReplicationModalOpen] = useState(\n false\n );\n\n // check the permissions for creating bucket\n useEffect(() => {\n if (loadingPerms) {\n api\n .invoke(\"POST\", `/api/v1/has-permission`, {\n actions: [\n {\n id: \"createBucket\",\n action: \"s3:CreateBucket\",\n },\n ],\n })\n .then((res: HasPermissionResponse) => {\n setLoadingPerms(false);\n if (!res.permissions) {\n return;\n }\n const actions = res.permissions ? res.permissions : [];\n\n let canCreate = actions.find((s) => s.id === \"createBucket\");\n if (canCreate && canCreate.can) {\n setCanCreateBucket(true);\n } else {\n setCanCreateBucket(false);\n }\n\n setLoadingPerms(false);\n })\n .catch((err: any) => {\n setLoadingPerms(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loadingPerms, setErrorSnackMessage]);\n\n useEffect(() => {\n if (loading) {\n const fetchRecords = () => {\n setLoading(true);\n api\n .invoke(\"GET\", `/api/v1/buckets`)\n .then((res: BucketList) => {\n setLoading(false);\n setRecords(res.buckets || []);\n })\n .catch((err: any) => {\n setLoading(false);\n setErrorSnackMessage(err);\n });\n };\n fetchRecords();\n }\n }, [loading, setErrorSnackMessage]);\n\n const closeAddModalAndRefresh = (refresh: boolean) => {\n addBucketOpen(false);\n addBucketReset();\n\n if (refresh) {\n setLoading(true);\n setSelectedBuckets([]);\n }\n };\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n if (refresh) {\n setLoading(true);\n setSelectedBuckets([]);\n }\n };\n\n const confirmDeleteBucket = (bucket: string) => {\n setDeleteOpen(true);\n setSelectedBucket(bucket);\n };\n\n const tableActions = [\n { type: \"view\", to: `/buckets`, sendOnlyId: true },\n { type: \"delete\", onClick: confirmDeleteBucket, sendOnlyId: true },\n ];\n\n const displayParsedDate = (date: string) => {\n return {date};\n };\n\n const filteredRecords = records.filter((b: Bucket) => {\n if (filterBuckets === \"\") {\n return true;\n } else {\n if (b.name.indexOf(filterBuckets) >= 0) {\n return true;\n } else {\n return false;\n }\n }\n });\n\n const selectListBuckets = (e: React.ChangeEvent) => {\n const targetD = e.target;\n const value = targetD.value;\n const checked = targetD.checked;\n\n let elements: string[] = [...selectedBuckets]; // We clone the selectedBuckets array\n\n if (checked) {\n // If the user has checked this field we need to push this to selectedBucketsList\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 setSelectedBuckets(elements);\n\n return elements;\n };\n\n const closeBulkReplicationModal = (unselectAll: boolean) => {\n setReplicationModalOpen(false);\n\n if (unselectAll) {\n setSelectedBuckets([]);\n }\n };\n\n return (\n \n {addBucketModalOpen && (\n \n )}\n {deleteOpen && (\n {\n closeDeleteModalAndRefresh(refresh);\n }}\n />\n )}\n {replicationModalOpen && (\n \n )}\n \n \n \n \n {\n setFilterBuckets(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n }\n onClick={() => {\n setReplicationModalOpen(true);\n }}\n disabled={selectedBuckets.length === 0}\n >\n Set Replication\n \n {canCreateBucket && (\n }\n onClick={() => {\n addBucketOpen(true);\n }}\n >\n Create Bucket\n \n )}\n \n \n
\n
\n \n \n \n
\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n addBucketModalOpen: state.buckets.open,\n});\n\nconst connector = connect(mapState, {\n addBucketOpen,\n addBucketReset,\n setErrorSnackMessage,\n});\n\nexport default connector(withStyles(styles)(ListBuckets));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n });\n\ninterface ISetAccessPolicyProps {\n classes: any;\n open: boolean;\n bucketName: string;\n actualPolicy: string;\n closeModalAndRefresh: () => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst SetAccessPolicy = ({\n classes,\n open,\n bucketName,\n actualPolicy,\n closeModalAndRefresh,\n setModalErrorSnackMessage,\n}: ISetAccessPolicyProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [accessPolicy, setAccessPolicy] = useState(\"\");\n const addRecord = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n api\n .invoke(\"PUT\", `/api/v1/buckets/${bucketName}/set-policy`, {\n access: accessPolicy,\n })\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n useEffect(() => {\n setAccessPolicy(actualPolicy);\n }, [setAccessPolicy, actualPolicy]);\n\n return (\n {\n closeModalAndRefresh();\n }}\n >\n ) => {\n addRecord(e);\n }}\n >\n \n \n \n ) => {\n setAccessPolicy(e.target.value as string);\n }}\n options={[\n { value: \"PRIVATE\", label: \"Private\" },\n { value: \"PUBLIC\", label: \"Public\" },\n ]}\n />\n \n \n \n \n Set\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(SetAccessPolicy));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport RadioGroupSelector from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n });\n\ninterface ISetRetentionConfigProps {\n classes: any;\n open: boolean;\n bucketName: string;\n closeModalAndRefresh: () => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst SetRetentionConfig = ({\n classes,\n open,\n bucketName,\n closeModalAndRefresh,\n setModalErrorSnackMessage,\n}: ISetRetentionConfigProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [retentionMode, setRetentionMode] = useState(\"compliance\");\n const [retentionUnit, setRetentionUnit] = useState(\"days\");\n const [retentionValidity, setRetentionValidity] = useState(1);\n const [valid, setValid] = useState(false);\n\n const setRetention = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n api\n .invoke(\"PUT\", `/api/v1/buckets/${bucketName}/retention`, {\n mode: retentionMode,\n unit: retentionUnit,\n validity: retentionValidity,\n })\n .then(() => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n useEffect(() => {\n if (Number.isNaN(retentionValidity) || retentionValidity < 1) {\n setValid(false);\n return;\n }\n setValid(true);\n }, [retentionValidity]);\n\n return (\n {\n closeModalAndRefresh();\n }}\n >\n ) => {\n setRetention(e);\n }}\n >\n \n \n \n ) => {\n setRetentionMode(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"compliance\", label: \"Compliance\" },\n { value: \"governance\", label: \"Governance\" },\n ]}\n />\n \n \n ) => {\n setRetentionUnit(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"days\", label: \"Days\" },\n { value: \"years\", label: \"Years\" },\n ]}\n />\n \n \n ) => {\n setRetentionValidity(e.target.valueAsNumber);\n }}\n label=\"Retention Validity\"\n value={String(retentionValidity)}\n required\n min=\"1\"\n />\n \n \n \n \n Set\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(SetRetentionConfig));\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, { ChangeEvent, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport api from \"../../../../common/api\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport Checkbox from \"@material-ui/core/Checkbox\";\nimport Table from \"@material-ui/core/Table\";\nimport { ArnList } from \"../types\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface IAddEventProps {\n classes: any;\n open: boolean;\n selectedBucket: string;\n closeModalAndRefresh: () => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst AddEvent = ({\n classes,\n open,\n selectedBucket,\n closeModalAndRefresh,\n setModalErrorSnackMessage,\n}: IAddEventProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [prefix, setPrefix] = useState(\"\");\n const [suffix, setSuffix] = useState(\"\");\n const [arn, setArn] = useState(\"\");\n const [selectedEvents, setSelectedEvents] = useState([]);\n const [arnList, setArnList] = useState([]);\n\n const addRecord = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n api\n .invoke(\"POST\", `/api/v1/buckets/${selectedBucket}/events`, {\n configuration: {\n arn: arn,\n events: selectedEvents,\n prefix: prefix,\n suffix: suffix,\n },\n ignoreExisting: true,\n })\n .then(() => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n const fetchArnList = useCallback(() => {\n setAddLoading(true);\n api\n .invoke(\"GET\", `/api/v1/admin/arns`)\n .then((res: ArnList) => {\n let arns: string[] = [];\n if (res.arns !== null) {\n arns = res.arns;\n }\n setAddLoading(false);\n setArnList(arns);\n })\n .catch((err: any) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n }, [setModalErrorSnackMessage]);\n\n useEffect(() => {\n fetchArnList();\n }, [fetchArnList]);\n\n const events = [\n { label: \"PUT - Object Uploaded\", value: \"put\" },\n { label: \"GET - Object accessed\", value: \"get\" },\n { label: \"DELETE - Object Deleted\", value: \"delete\" },\n ];\n\n const handleClick = (\n event: React.MouseEvent | ChangeEvent,\n name: string\n ) => {\n const selectedIndex = selectedEvents.indexOf(name);\n let newSelected: string[] = [];\n\n if (selectedIndex === -1) {\n newSelected = newSelected.concat(selectedEvents, name);\n } else if (selectedIndex === 0) {\n newSelected = newSelected.concat(selectedEvents.slice(1));\n } else if (selectedIndex === selectedEvents.length - 1) {\n newSelected = newSelected.concat(selectedEvents.slice(0, -1));\n } else if (selectedIndex > 0) {\n newSelected = newSelected.concat(\n selectedEvents.slice(0, selectedIndex),\n selectedEvents.slice(selectedIndex + 1)\n );\n }\n setSelectedEvents(newSelected);\n };\n\n const arnValues = arnList.map((arnConstant) => ({\n label: arnConstant,\n value: arnConstant,\n }));\n\n return (\n {\n closeModalAndRefresh();\n }}\n title=\"Subscribe To Event\"\n >\n ) => {\n addRecord(e);\n }}\n >\n \n \n \n ) => {\n setArn(e.target.value as string);\n }}\n id=\"select-access-policy\"\n name=\"select-access-policy\"\n label={\"ARN\"}\n value={arn}\n options={arnValues}\n />\n \n \n \n \n \n Select\n Event\n \n \n \n {events.map((row) => (\n handleClick(event, row.value)}\n >\n \n handleClick(event, row.value)}\n checked={selectedEvents.includes(row.value)}\n />\n \n \n {row.label}\n \n \n ))}\n \n
\n
\n \n
\n
\n \n ) => {\n setPrefix(e.target.value);\n }}\n />\n \n \n ) => {\n setSuffix(e.target.value);\n }}\n />\n \n \n
\n
\n
\n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n
\n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(AddEvent));\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, { useState } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport api from \"../../../../common/api\";\nimport { BucketEvent, BucketList } from \"../types\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\n\ninterface IDeleteEventProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedBucket: string;\n bucketEvent: BucketEvent | null;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteEvent = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedBucket,\n bucketEvent,\n setErrorSnackMessage,\n}: IDeleteEventProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n\n const removeRecord = () => {\n if (deleteLoading) {\n return;\n }\n if (bucketEvent == null) {\n return;\n }\n\n setDeleteLoading(true);\n\n const events = get(bucketEvent, \"events\", []);\n const prefix = get(bucketEvent, \"prefix\", \"\");\n const suffix = get(bucketEvent, \"suffix\", \"\");\n api\n .invoke(\n \"DELETE\",\n `/api/v1/buckets/${selectedBucket}/events/${bucketEvent.arn}`,\n {\n events,\n prefix,\n suffix,\n }\n )\n .then((res: BucketList) => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n };\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete Event\n \n {deleteLoading && }\n \n Are you sure you want to delete this event?\n \n \n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n {\n removeRecord();\n }}\n color=\"secondary\"\n autoFocus\n >\n Delete\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n});\n\nexport default connector(DeleteEvent);\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport get from \"lodash/get\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { BulkReplicationResponse } from \"../types\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport api from \"../../../../common/api\";\n\ninterface IReplicationModal {\n open: boolean;\n closeModalAndRefresh: () => any;\n classes: any;\n bucketName: string;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\nconst AddReplicationModal = ({\n open,\n closeModalAndRefresh,\n classes,\n bucketName,\n setModalErrorSnackMessage,\n}: IReplicationModal) => {\n const [addLoading, setAddLoading] = useState(false);\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n const [targetURL, setTargetURL] = useState(\"\");\n const [targetBucket, setTargetBucket] = useState(\"\");\n const [region, setRegion] = useState(\"\");\n\n const addRecord = () => {\n const replicate = [\n {\n originBucket: bucketName,\n destinationBucket: targetBucket,\n },\n ];\n\n const remoteBucketsInfo = {\n accessKey: accessKey,\n secretKey: secretKey,\n targetURL: targetURL,\n region: region,\n bucketsRelation: replicate,\n };\n\n api\n .invoke(\"POST\", \"/api/v1/buckets-replication\", remoteBucketsInfo)\n .then((response: BulkReplicationResponse) => {\n setAddLoading(false);\n\n const states = get(response, \"replicationState\", []);\n\n if (states.length > 0) {\n const itemVal = states[0];\n\n setAddLoading(false);\n\n if (itemVal.errorString && itemVal.errorString !== \"\") {\n setModalErrorSnackMessage(itemVal.errorString);\n return;\n }\n\n closeModalAndRefresh();\n\n return;\n }\n setModalErrorSnackMessage(\"No changes applied\");\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n return (\n {\n closeModalAndRefresh();\n }}\n title=\"Set Bucket Replication\"\n >\n ) => {\n e.preventDefault();\n setAddLoading(true);\n addRecord();\n }}\n >\n \n \n \n ) => {\n setAccessKey(e.target.value);\n }}\n label=\"Access Key\"\n value={accessKey}\n />\n \n \n ) => {\n setSecretKey(e.target.value);\n }}\n label=\"Secret Key\"\n value={secretKey}\n />\n \n \n ) => {\n setTargetURL(e.target.value);\n }}\n placeholder=\"https://play.min.io:9000\"\n label=\"Target URL\"\n value={targetURL}\n />\n \n \n ) => {\n setTargetBucket(e.target.value);\n }}\n label=\"Target Bucket\"\n value={targetBucket}\n />\n \n \n ) => {\n setRegion(e.target.value);\n }}\n label=\"Region\"\n value={region}\n />\n \n \n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(AddReplicationModal));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../../common/api\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { BucketEncryptionInfo } from \"../types\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface IEnableBucketEncryptionProps {\n classes: any;\n open: boolean;\n encryptionEnabled: boolean;\n encryptionCfg: BucketEncryptionInfo | null;\n selectedBucket: string;\n closeModalAndRefresh: () => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst EnableBucketEncryption = ({\n classes,\n open,\n encryptionEnabled,\n encryptionCfg,\n selectedBucket,\n closeModalAndRefresh,\n setModalErrorSnackMessage,\n}: IEnableBucketEncryptionProps) => {\n const [loading, setLoading] = useState(false);\n const [kmsKeyID, setKmsKeyID] = useState(\"\");\n const [encryptionType, setEncryptionType] = useState(\"disabled\");\n\n useEffect(() => {\n if (encryptionCfg) {\n if (encryptionCfg.algorithm === \"AES256\") {\n setEncryptionType(\"sse-s3\");\n } else {\n setEncryptionType(\"sse-kms\");\n setKmsKeyID(encryptionCfg.kmsMasterKeyID);\n }\n }\n }, [encryptionCfg]);\n\n const enableBucketEncryption = (event: React.FormEvent) => {\n event.preventDefault();\n if (loading) {\n return;\n }\n if (encryptionType === \"disabled\") {\n api\n .invoke(\"POST\", `/api/v1/buckets/${selectedBucket}/encryption/disable`)\n .then(() => {\n setLoading(false);\n closeModalAndRefresh();\n })\n .catch((err: any) => {\n setLoading(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n api\n .invoke(\"POST\", `/api/v1/buckets/${selectedBucket}/encryption/enable`, {\n encType: encryptionType,\n kmsKeyID: kmsKeyID,\n })\n .then(() => {\n setLoading(false);\n closeModalAndRefresh();\n })\n .catch((err: any) => {\n setLoading(false);\n setModalErrorSnackMessage(err);\n });\n }\n };\n\n return (\n {\n closeModalAndRefresh();\n }}\n title=\"Enable Bucket Encryption\"\n >\n ) => {\n enableBucketEncryption(e);\n }}\n >\n \n \n \n ) => {\n setEncryptionType(e.target.value as string);\n }}\n id=\"select-encryption-type\"\n name=\"select-encryption-type\"\n label={\"Encryption Type\"}\n value={encryptionType}\n options={[\n {\n label: \"Disabled\",\n value: \"disabled\",\n },\n {\n label: \"SSE-S3\",\n value: \"sse-s3\",\n },\n {\n label: \"SSE-KMS\",\n value: \"sse-kms\",\n },\n ]}\n />\n \n \n
\n
\n {encryptionType === \"sse-kms\" && (\n \n ) => {\n setKmsKeyID(e.target.value);\n }}\n />\n \n )}\n \n
\n
\n
\n \n \n Save\n \n \n {loading && (\n \n \n \n )}\n
\n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(EnableBucketEncryption));\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, { useState, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport api from \"../../../../common/api\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\n\ninterface IVersioningEventProps {\n closeVersioningModalAndRefresh: (refresh: boolean) => void;\n modalOpen: boolean;\n selectedBucket: string;\n versioningCurrentState: boolean;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst EnableVersioningModal = ({\n closeVersioningModalAndRefresh,\n modalOpen,\n selectedBucket,\n versioningCurrentState,\n setErrorSnackMessage,\n}: IVersioningEventProps) => {\n const [versioningLoading, setVersioningLoading] = useState(false);\n\n const enableVersioning = () => {\n if (versioningLoading) {\n return;\n }\n setVersioningLoading(true);\n\n api\n .invoke(\"PUT\", `/api/v1/buckets/${selectedBucket}/versioning`, {\n versioning: !versioningCurrentState,\n })\n .then(() => {\n setVersioningLoading(false);\n closeVersioningModalAndRefresh(true);\n })\n .catch((err) => {\n setVersioningLoading(false);\n setErrorSnackMessage(err);\n });\n };\n\n return (\n {\n closeVersioningModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Edit Versioning\n \n {versioningLoading && }\n \n Are you sure you want to{\" \"}\n {versioningCurrentState ? \"disable\" : \"enable\"}{\" \"}\n versioning for this bucket?\n {versioningCurrentState && (\n \n
\n
\n File versions won't be automatically deleted\n
\n )}\n
\n
\n \n {\n closeVersioningModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={versioningLoading}\n >\n Cancel\n \n {\n enableVersioning();\n }}\n color=\"secondary\"\n autoFocus\n >\n {versioningCurrentState ? \"Disable\" : \"Enable\"}\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n});\n\nexport default connector(EnableVersioningModal);\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst UsageIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default UsageIcon;\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 from \"react\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Controlled as CodeMirror } from \"react-codemirror2\";\nimport { InputLabel, Tooltip } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport { fieldBasic } from \"../common/styleLibrary\";\nimport \"./ConsoleCodeMirror.css\";\n\nrequire(\"codemirror/mode/javascript/javascript\");\n\ninterface ICodeWrapper {\n value: string;\n label?: string;\n mode?: string;\n tooltip?: string;\n classes: any;\n onChange?: (editor: any, data: any, value: string) => any;\n onBeforeChange: (editor: any, data: any, value: string) => any;\n readOnly?: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n });\n\nconst CodeMirrorWrapper = ({\n value,\n label = \"\",\n tooltip = \"\",\n mode = \"javascript\",\n classes,\n onChange = () => {},\n onBeforeChange,\n readOnly = false,\n}: ICodeWrapper) => {\n return (\n \n \n {label}\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)(CodeMirrorWrapper);\n","// This file is part of MinIO Kubernetes Cloud\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport api from \"../../../common/api\";\nimport { Policy } from \"./types\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport {\n fieldBasic,\n modalBasic,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport CodeMirrorWrapper from \"../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n jsonPolicyEditor: {\n minHeight: 400,\n width: \"100%\",\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...fieldBasic,\n });\n\ninterface IAddPolicyProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (refresh: boolean) => void;\n policyEdit: Policy;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst AddPolicy = ({\n classes,\n open,\n closeModalAndRefresh,\n policyEdit,\n setModalErrorSnackMessage,\n}: IAddPolicyProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [policyName, setPolicyName] = useState(\"\");\n const [policyDefinition, setPolicyDefinition] = useState(\"\");\n\n const addRecord = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n api\n .invoke(\"POST\", \"/api/v1/policies\", {\n name: policyName,\n policy: policyDefinition,\n })\n .then((res) => {\n setAddLoading(false);\n\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n useEffect(() => {\n if (policyEdit) {\n setPolicyName(policyEdit.name);\n setPolicyDefinition(\n policyEdit ? JSON.stringify(JSON.parse(policyEdit.policy), null, 4) : \"\"\n );\n }\n }, [policyEdit]);\n\n const resetForm = () => {\n setPolicyName(\"\");\n setPolicyDefinition(\"\");\n };\n\n const validSave = policyName.trim() !== \"\";\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n title={`${policyEdit ? \"Info\" : \"Create\"} Policy`}\n >\n ) => {\n addRecord(e);\n }}\n >\n \n \n \n ) => {\n setPolicyName(e.target.value);\n }}\n value={policyName}\n disabled={!!policyEdit}\n />\n \n \n
\n
\n {\n setPolicyDefinition(value);\n }}\n />\n
\n \n {!policyEdit && (\n {\n resetForm();\n }}\n >\n Clear\n \n )}\n\n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n
\n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddPolicy));\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\n\ninterface IDeleteReplicationProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedBucket: string;\n ruleToDelete: string;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteReplicationRule = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedBucket,\n ruleToDelete,\n setErrorSnackMessage,\n}: IDeleteReplicationProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n\n const removeRecord = () => {\n if (!deleteLoading) {\n setDeleteLoading(true);\n\n api\n .invoke(\n \"DELETE\",\n `/api/v1/buckets/${selectedBucket}/replication/${ruleToDelete}`\n )\n .then(() => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n }\n };\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete Replication Rule\n \n {deleteLoading && }\n \n Are you sure you want to delete replication rule {ruleToDelete}\n ?
\n Remember, at lease one rule must be present once replication has been\n enabled\n
\n
\n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n {\n removeRecord();\n }}\n color=\"secondary\"\n autoFocus\n >\n Delete\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(DeleteReplicationRule);\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst AddIcon = () => {\n return (\n \n \n \n );\n};\n\nexport default AddIcon;\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, {\n useState,\n useEffect,\n createRef,\n useLayoutEffect,\n ChangeEvent,\n useRef,\n} from \"react\";\nimport get from \"lodash/get\";\nimport debounce from \"lodash/debounce\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport HelpIcon from \"@material-ui/icons/Help\";\nimport { InputLabel, Tooltip } from \"@material-ui/core\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport InputBoxWrapper from \"../InputBoxWrapper/InputBoxWrapper\";\nimport AddIcon from \"../../../../../icons/AddIcon\";\n\ninterface IQueryMultiSelector {\n elements: string;\n name: string;\n label: string;\n tooltip?: string;\n keyPlaceholder?: string;\n valuePlaceholder?: string;\n classes: any;\n withBorder?: boolean;\n onChange: (elements: string) => void;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n inputWithBorder: {\n border: \"1px solid #EAEAEA\",\n padding: 15,\n height: 150,\n overflowY: \"auto\",\n position: \"relative\",\n marginTop: 15,\n },\n labelContainer: {\n display: \"flex\",\n },\n lineInputBoxes: {\n display: \"flex\",\n },\n queryDiv: {\n alignSelf: \"center\",\n margin: \"0 4px\",\n fontWeight: 600,\n },\n });\n\nconst QueryMultiSelector = ({\n elements,\n name,\n label,\n tooltip = \"\",\n keyPlaceholder = \"\",\n valuePlaceholder = \"\",\n onChange,\n withBorder = false,\n classes,\n}: IQueryMultiSelector) => {\n const [currentKeys, setCurrentKeys] = useState([\"\"]);\n const [currentValues, setCurrentValues] = useState([\"\"]);\n const bottomList = createRef();\n\n // Use effect to get the initial values from props\n useEffect(() => {\n if (\n currentKeys.length === 1 &&\n currentKeys[0] === \"\" &&\n currentValues.length === 1 &&\n currentValues[0] === \"\" &&\n elements &&\n elements !== \"\"\n ) {\n const elementsSplit = elements.split(\"&\");\n let keys = [];\n let values = [];\n\n elementsSplit.forEach((element: string) => {\n const splittedVals = element.split(\"=\");\n if (splittedVals.length === 2) {\n keys.push(splittedVals[0]);\n values.push(splittedVals[1]);\n }\n });\n\n keys.push(\"\");\n values.push(\"\");\n\n setCurrentKeys(keys);\n setCurrentValues(values);\n }\n }, [currentKeys, currentValues, elements]);\n\n // Use effect to send new values to onChange\n useEffect(() => {\n const refScroll = bottomList.current;\n if (refScroll) {\n refScroll.scrollIntoView(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentKeys]);\n\n // We avoid multiple re-renders / hang issue typing too fast\n const firstUpdate = useRef(true);\n useLayoutEffect(() => {\n if (firstUpdate.current) {\n firstUpdate.current = false;\n return;\n }\n debouncedOnChange();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentKeys, currentValues]);\n\n // If the last input is not empty, we add a new one\n const addEmptyLine = () => {\n if (\n currentKeys[currentKeys.length - 1].trim() !== \"\" &&\n currentValues[currentValues.length - 1].trim() !== \"\"\n ) {\n const keysList = [...currentKeys];\n const valuesList = [...currentValues];\n\n keysList.push(\"\");\n valuesList.push(\"\");\n\n setCurrentKeys(keysList);\n setCurrentValues(valuesList);\n }\n };\n\n // Onchange function for input box, we get the dataset-index & only update that value in the array\n const onChangeKey = (e: ChangeEvent) => {\n e.persist();\n\n let updatedElement = [...currentKeys];\n const index = get(e.target, \"dataset.index\", 0);\n updatedElement[index] = e.target.value;\n\n setCurrentKeys(updatedElement);\n };\n\n const onChangeValue = (e: ChangeEvent) => {\n e.persist();\n\n let updatedElement = [...currentValues];\n const index = get(e.target, \"dataset.index\", 0);\n updatedElement[index] = e.target.value;\n\n setCurrentValues(updatedElement);\n };\n\n // Debounce for On Change\n const debouncedOnChange = debounce(() => {\n let queryString = \"\";\n\n currentKeys.forEach((keyVal, index) => {\n if (currentKeys[index] && currentValues[index]) {\n let insertString = `${keyVal}=${currentValues[index]}`;\n if (index !== 0) {\n insertString = `&${insertString}`;\n }\n queryString = `${queryString}${insertString}`;\n }\n });\n\n onChange(queryString);\n }, 500);\n\n const inputs = currentValues.map((element, index) => {\n return (\n \n \n :\n : null}\n overlayAction={() => {\n addEmptyLine();\n }}\n />\n \n );\n });\n\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n
\n \n \n \n
\n )}\n
\n \n {inputs}\n
\n \n \n \n );\n};\nexport default withStyles(styles)(QueryMultiSelector);\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport QueryMultiSelector from \"../../Common/FormComponents/QueryMultiSelector/QueryMultiSelector\";\nimport { LifeCycleItem } from \"../types\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface IAddUserContentProps {\n classes: any;\n closeModalAndRefresh: (reload: boolean) => void;\n selectedBucket: string;\n lifecycle: LifeCycleItem;\n open: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst EditLifecycleConfiguration = ({\n classes,\n closeModalAndRefresh,\n selectedBucket,\n lifecycle,\n open,\n setModalErrorSnackMessage,\n}: IAddUserContentProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [tags, setTags] = useState(\"\");\n const [enabled, setEnabled] = useState(false);\n\n useEffect(() => {\n if (lifecycle.status === \"Enabled\") {\n setEnabled(true);\n }\n\n if (lifecycle.tags) {\n const tgs = lifecycle.tags.reduce(\n (stringLab: string, currItem: any, index: number) => {\n return `${stringLab}${index !== 0 ? \"&\" : \"\"}${currItem.key}=${\n currItem.value\n }`;\n },\n \"\"\n );\n\n setTags(tgs);\n }\n }, [lifecycle]);\n\n const saveRecord = (event: React.FormEvent) => {\n event.preventDefault();\n\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n if (selectedBucket !== null && lifecycle !== null) {\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${selectedBucket}/lifecycle/${lifecycle.id}`,\n {\n disable: !enabled,\n tags: tags,\n }\n )\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n }\n };\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n modalOpen={open}\n title={\"Edit Lifecycle Configuration\"}\n >\n
\n {\n setEnabled(e.target.checked);\n }}\n switchOnly\n />\n
\n\n \n ) => {\n saveRecord(e);\n }}\n >\n \n \n \n {}}\n disabled\n />\n \n \n {\n setTags(vl);\n }}\n keyPlaceholder=\"Tag Key\"\n valuePlaceholder=\"Tag Value\"\n withBorder\n />\n \n \n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(EditLifecycleConfiguration));\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\nexport const months = [\n { value: \"01\", label: \"January\" },\n { value: \"02\", label: \"February\" },\n { value: \"03\", label: \"March\" },\n { value: \"04\", label: \"April\" },\n { value: \"05\", label: \"May\" },\n { value: \"06\", label: \"June\" },\n { value: \"07\", label: \"July\" },\n { value: \"08\", label: \"August\" },\n { value: \"09\", label: \"September\" },\n { value: \"10\", label: \"October\" },\n { value: \"11\", label: \"November\" },\n { value: \"12\", label: \"December\" },\n];\n\nexport const days = Array.from(Array(31), (_, num) => num + 1);\n\nconst currentYear = new Date().getFullYear();\n\nexport const years = Array.from(\n Array(25),\n (_, numYear) => numYear + currentYear\n);\n\nexport const validDate = (year: string, month: string, day: string): any[] => {\n const currentDate = Date.parse(`${year}-${month}-${day}`);\n\n if (isNaN(currentDate)) {\n return [false, \"\"];\n }\n\n const parsedMonth = parseInt(month);\n const parsedDay = parseInt(day);\n\n const monthForString = parsedMonth < 10 ? `0${parsedMonth}` : parsedMonth;\n const dayForString = parsedDay < 10 ? `0${parsedDay}` : parsedDay;\n\n const parsedDate = new Date(currentDate).toISOString().split(\"T\")[0];\n const dateString = `${year}-${monthForString}-${dayForString}`;\n\n return [parsedDate === dateString, dateString];\n};\n\n// twoDigitDate gets a two digit string number used for months or days\n// returns \"NaN\" if number is NaN\nexport const twoDigitDate = (num: number): string => {\n return num < 10 ? `0${num}` : `${num}`;\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, {\n useState,\n forwardRef,\n useImperativeHandle,\n useEffect,\n} from \"react\";\nimport clsx from \"clsx\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport InputLabel from \"@material-ui/core/InputLabel\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport FormControl from \"@material-ui/core/FormControl\";\nimport Select from \"@material-ui/core/Select\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport InputBase from \"@material-ui/core/InputBase\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport FormSwitchWrapper from \"../FormSwitchWrapper/FormSwitchWrapper\";\nimport { days, months, validDate, years } from \"./utils\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n dateInput: {\n \"&:not(:last-child)\": {\n marginRight: 22,\n },\n },\n ...fieldBasic,\n ...tooltipHelper,\n labelContainer: {\n flex: 1,\n },\n fieldContainer: {\n ...fieldBasic.fieldContainer,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n paddingBottom: 10,\n marginTop: 11,\n marginBottom: 6,\n },\n fieldContainerBorder: {\n borderBottom: \"#9c9c9c 1px solid\",\n marginBottom: 20,\n },\n });\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n \"& .MuiSelect-icon\": {\n color: \"#000\",\n \"&.Mui-disabled\": {\n color: \"#9c9c9c\",\n },\n },\n },\n input: {\n borderBottom: 0,\n fontSize: 12,\n },\n })\n)(InputBase);\n\ninterface IDateSelectorProps {\n classes: any;\n id: string;\n label: string;\n disableOptions?: boolean;\n addSwitch?: boolean;\n tooltip?: string;\n borderBottom?: boolean;\n value?: string;\n onDateChange: (date: string, isValid: boolean) => any;\n}\n\nconst DateSelector = forwardRef(\n (\n {\n classes,\n id,\n label,\n disableOptions = false,\n addSwitch = false,\n tooltip = \"\",\n borderBottom = false,\n onDateChange,\n value = \"\",\n }: IDateSelectorProps,\n ref: any\n ) => {\n useImperativeHandle(ref, () => ({ resetDate }));\n\n const [dateEnabled, setDateEnabled] = useState(false);\n const [month, setMonth] = useState(\"\");\n const [day, setDay] = useState(\"\");\n const [year, setYear] = useState(\"\");\n\n useEffect(() => {\n // verify if there is a current value\n // assume is in the format \"2021-12-30\"\n if (value !== \"\") {\n const valueSplit = value.split(\"-\");\n setYear(valueSplit[0]);\n setMonth(valueSplit[1]);\n // Turn to single digit to be displayed on dropdown buttons\n setDay(`${parseInt(valueSplit[2])}`);\n }\n }, [value]);\n\n useEffect(() => {\n const [isValid, dateString] = validDate(year, month, day);\n onDateChange(dateString, isValid);\n }, [month, day, year, onDateChange]);\n\n const resetDate = () => {\n setMonth(\"\");\n setDay(\"\");\n setYear(\"\");\n };\n\n const isDateDisabled = () => {\n if (disableOptions) {\n return disableOptions;\n } else if (addSwitch) {\n return !dateEnabled;\n } else {\n return false;\n }\n };\n\n const onMonthChange = (\n e: React.ChangeEvent<{ name?: string | undefined; value: unknown }>\n ) => {\n setMonth(e.target.value as string);\n };\n\n const onDayChange = (\n e: React.ChangeEvent<{ name?: string | undefined; value: unknown }>\n ) => {\n setDay(e.target.value as string);\n };\n\n const onYearChange = (\n e: React.ChangeEvent<{ name?: string | undefined; value: unknown }>\n ) => {\n setYear(e.target.value as string);\n };\n\n return (\n \n
\n \n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n {addSwitch && (\n {\n setDateEnabled(e.target.checked);\n if (!e.target.checked) {\n onDateChange(\"\", true);\n }\n }}\n switchOnly\n />\n )}\n
\n
\n
\n \n }\n >\n \n {\"\"}\n \n {months.map((option) => (\n \n {option.label}\n \n ))}\n \n \n \n }\n >\n \n {\"\"}\n \n {days.map((dayNumber) => (\n \n {dayNumber}\n \n ))}\n \n \n \n }\n >\n \n {\"\"}\n \n {years.map((year) => (\n \n {year}\n \n ))}\n \n \n
\n \n );\n }\n);\n\nexport default withStyles(styles)(DateSelector);\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, { useState, useEffect, Fragment } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport {\n ITierResponse,\n ITierElement,\n} from \"../../Configurations/TiersConfiguration/types\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport api from \"../../../../common/api\";\nimport DateSelector from \"../../Common/FormComponents/DateSelector/DateSelector\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport QueryMultiSelector from \"../../Common/FormComponents/QueryMultiSelector/QueryMultiSelector\";\nimport RadioGroupSelector from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\n\ninterface IReplicationModal {\n open: boolean;\n closeModalAndRefresh: (refresh: boolean) => any;\n classes: any;\n bucketName: string;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\ninterface ITiersDropDown {\n label: string;\n value: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\nconst AddLifecycleModal = ({\n open,\n closeModalAndRefresh,\n classes,\n bucketName,\n setModalErrorSnackMessage,\n}: IReplicationModal) => {\n const [loadingTiers, setLoadingTiers] = useState(true);\n const [tiersList, setTiersList] = useState([]);\n const [addLoading, setAddLoading] = useState(false);\n const [prefix, setPrefix] = useState(\"\");\n const [tags, setTags] = useState(\"\");\n const [storageClass, setStorageClass] = useState(\"\");\n const [NCTransitionSC, setNCTransitionSC] = useState(\"\");\n const [expiredObjectDM, setExpiredObjectDM] = useState(false);\n const [NCExpirationDays, setNCExpirationDays] = useState(\"0\");\n const [NCTransitionDays, setNCTransitionDays] = useState(\"0\");\n const [ilmType, setIlmType] = useState(\"expiry\");\n const [expiryType, setExpiryType] = useState(\"date\");\n const [expiryDays, setExpiryDays] = useState(\"0\");\n const [expiryDate, setExpiryDate] = useState(\"\");\n const [transitionDays, setTransitionDays] = useState(\"0\");\n const [transitionDate, setTransitionDate] = useState(\"\");\n const [transitionType, setTransitionType] = useState(\"date\");\n const [isFormValid, setIsFormValid] = useState(false);\n\n useEffect(() => {\n if (loadingTiers) {\n api\n .invoke(\"GET\", `/api/v1/admin/tiers`)\n .then((res: ITierResponse) => {\n const tiersList: ITierElement[] | null = get(res, \"items\", []);\n\n if (tiersList !== null && tiersList.length >= 1) {\n const objList = tiersList.map((tier: ITierElement) => {\n const tierType = tier.type;\n const value = get(tier, `${tierType}.name`, \"\");\n\n return { label: value, value: value };\n });\n\n setTiersList(objList);\n if (objList.length > 0) {\n setStorageClass(objList[0].value);\n }\n }\n setLoadingTiers(false);\n })\n .catch((err) => {\n setLoadingTiers(false);\n });\n }\n }, [loadingTiers]);\n\n useEffect(() => {\n let valid = true;\n\n if (ilmType === \"expiry\") {\n if (expiryType === \"date\" && expiryDate === \"\") {\n valid = false;\n }\n if (expiryType === \"days\" && parseInt(expiryDays) < 1) {\n valid = false;\n }\n } else {\n if (transitionType === \"date\" && transitionDate === \"\") {\n valid = false;\n }\n if (transitionType === \"days\" && parseInt(transitionDays) < 1) {\n valid = false;\n }\n\n if (storageClass === \"\") {\n valid = false;\n }\n }\n setIsFormValid(valid);\n }, [\n ilmType,\n expiryType,\n expiryDate,\n expiryDays,\n transitionType,\n transitionDate,\n transitionDays,\n storageClass,\n ]);\n\n const addRecord = () => {\n let rules = {};\n\n if (ilmType === \"expiry\") {\n let expiry = {};\n\n if (expiryType === \"date\") {\n expiry = {\n expiry_date: `${expiryDate}T23:59:59Z`,\n };\n } else {\n expiry = {\n expiry_days: parseInt(expiryDays),\n };\n }\n\n rules = {\n ...expiry,\n noncurrentversion_expiration_days: parseInt(NCExpirationDays),\n };\n } else {\n let transition = {};\n\n if (transitionType === \"date\") {\n transition = {\n transition_date: `${transitionDate}T23:59:59Z`,\n };\n } else {\n transition = {\n transition_days: parseInt(transitionDays),\n };\n }\n\n rules = {\n ...transition,\n noncurrentversion_transition_days: parseInt(NCTransitionDays),\n noncurrentversion_transition_storage_class: NCTransitionSC,\n storage_class: storageClass,\n };\n }\n\n const lifecycleInsert = {\n prefix,\n tags,\n expired_object_delete_marker: expiredObjectDM,\n ...rules,\n };\n\n api\n .invoke(\n \"POST\",\n `/api/v1/buckets/${bucketName}/lifecycle`,\n lifecycleInsert\n )\n .then(() => {\n setAddLoading(false);\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n title=\"Add Lifecycle Rule\"\n >\n {loadingTiers && (\n \n \n \n \n \n )}\n\n {!loadingTiers && (\n ) => {\n e.preventDefault();\n setAddLoading(true);\n addRecord();\n }}\n >\n \n \n

Lifecycle Configuration

\n \n ) => {\n setIlmType(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"expiry\", label: \"Expiry\" },\n { value: \"transition\", label: \"Transition\" },\n ]}\n />\n \n {ilmType === \"expiry\" ? (\n \n \n ) => {\n setExpiryType(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"date\", label: \"Date\" },\n { value: \"days\", label: \"Days\" },\n ]}\n />\n \n \n {expiryType === \"date\" ? (\n {\n if (isValid) {\n setExpiryDate(date);\n }\n }}\n />\n ) : (\n ) => {\n setExpiryDays(e.target.value);\n }}\n label=\"Expiry Days\"\n value={expiryDays}\n min=\"0\"\n />\n )}\n \n \n ) => {\n setNCExpirationDays(e.target.value);\n }}\n label=\"Non-current Expiration Days\"\n value={NCExpirationDays}\n min=\"0\"\n />\n \n \n ) : (\n \n \n ) => {\n setTransitionType(e.target.value as string);\n }}\n selectorOptions={[\n { value: \"date\", label: \"Date\" },\n { value: \"days\", label: \"Days\" },\n ]}\n />\n \n \n {transitionType === \"date\" ? (\n {\n if (isValid) {\n setTransitionDate(date);\n }\n }}\n />\n ) : (\n ) => {\n setTransitionDays(e.target.value);\n }}\n label=\"Transition Days\"\n value={transitionDays}\n min=\"0\"\n />\n )}\n \n \n ) => {\n setNCTransitionDays(e.target.value);\n }}\n label=\"Non-current Transition Days\"\n value={NCTransitionDays}\n min=\"0\"\n />\n \n \n ) => {\n setNCTransitionSC(e.target.value);\n }}\n placeholder=\"Set Non-current Version Transition Storage Class\"\n label=\"Non-current Version Transition Storage Class\"\n value={NCTransitionSC}\n />\n \n \n ) => {\n setStorageClass(e.target.value as string);\n }}\n options={tiersList}\n />\n \n \n )}\n

File Configuration

\n \n ) => {\n setPrefix(e.target.value);\n }}\n label=\"Prefix\"\n value={prefix}\n />\n \n \n {\n setTags(vl);\n }}\n keyPlaceholder=\"Tag Key\"\n valuePlaceholder=\"Tag Value\"\n withBorder\n />\n \n \n ) => {\n setExpiredObjectDM(event.target.checked);\n }}\n label={\"Expired Object Delete Marker\"}\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n
\n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n
\n \n )}\n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(AddLifecycleModal));\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, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, TextField } from \"@material-ui/core\";\nimport * as reactMoment from \"react-moment\";\nimport get from \"lodash/get\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport Tab from \"@material-ui/core/Tab\";\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\nimport Typography from \"@material-ui/core/Typography\";\nimport api from \"../../../../common/api\";\nimport {\n BucketEncryptionInfo,\n BucketEvent,\n BucketEventList,\n BucketInfo,\n BucketList,\n BucketObjectLocking,\n BucketReplication,\n BucketReplicationDestination,\n BucketReplicationRule,\n BucketReplicationRuleDeleteMarker,\n BucketVersioning,\n HasPermissionResponse,\n LifeCycleItem,\n} from \"../types\";\nimport { CreateIcon } from \"../../../../icons\";\nimport { niceBytes } from \"../../../../common/utils\";\nimport {\n actionsTray,\n buttonsStyles,\n containerForHeader,\n hrClass,\n searchField,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport { Policy } from \"../../Policies/types\";\nimport { User } from \"../../Users/types\";\nimport { AppState } from \"../../../../store\";\nimport { ISessionResponse } from \"../../types\";\nimport SetAccessPolicy from \"./SetAccessPolicy\";\nimport SetRetentionConfig from \"./SetRetentionConfig\";\nimport AddEvent from \"./AddEvent\";\nimport DeleteEvent from \"./DeleteEvent\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport AddReplicationModal from \"./AddReplicationModal\";\nimport PageHeader from \"../../Common/PageHeader/PageHeader\";\nimport EnableBucketEncryption from \"./EnableBucketEncryption\";\nimport EnableVersioningModal from \"./EnableVersioningModal\";\nimport UsageIcon from \"../../../../icons/UsageIcon\";\nimport AddPolicy from \"../../Policies/AddPolicy\";\nimport DeleteReplicationRule from \"../ViewBucket/DeleteReplicationRule\";\nimport EditLifecycleConfiguration from \"./EditLifecycleConfiguration\";\nimport AddLifecycleModal from \"./AddLifecycleModal\";\nimport history from \"../../../../history\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n noRecords: {\n lineHeight: \"24px\",\n textAlign: \"center\",\n padding: \"20px\",\n },\n gridWrapper: {\n width: 320,\n },\n gridContainer: {\n display: \"grid\",\n gridTemplateColumns: \"auto auto\",\n gridGap: 8,\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n \"& div:not(.MuiCircularProgress-root)\": {\n display: \"flex\",\n alignItems: \"center\",\n },\n \"& div:nth-child(odd)\": {\n justifyContent: \"flex-end\",\n fontWeight: 700,\n },\n \"& div:nth-child(2n)\": {\n minWidth: 150,\n },\n },\n masterActions: {\n width: \"25%\",\n minWidth: \"120px\",\n \"& div\": {\n margin: \"5px 0px\",\n },\n },\n paperContainer: {\n padding: 15,\n paddingLeft: 50,\n display: \"flex\",\n },\n headerContainer: {\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n capitalizeFirst: {\n textTransform: \"capitalize\",\n },\n doubleElement: {\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n encCheckbox: {\n margin: 0,\n padding: 0,\n },\n tabPan: {\n marginTop: \"5px\",\n },\n fixedHeight: {\n height: 165,\n minWidth: 247,\n padding: \"25px 28px\",\n \"& svg\": {\n maxHeight: 18,\n },\n },\n elementTitle: {\n fontWeight: 500,\n color: \"#777777\",\n fontSize: 14,\n marginTop: -9,\n },\n consumptionValue: {\n color: \"#000000\",\n fontSize: \"48px\",\n fontWeight: \"bold\",\n },\n reportedUsage: {\n padding: \"15px\",\n },\n ...searchField,\n ...actionsTray,\n actionsTray: {\n ...actionsTray.actionsTray,\n padding: \"15px 0 0\",\n },\n ...hrClass,\n ...buttonsStyles,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IViewBucketProps {\n classes: any;\n match: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n session: ISessionResponse;\n}\n\ninterface TabPanelProps {\n children?: React.ReactNode;\n index: any;\n value: any;\n}\n\nfunction TabPanel(props: TabPanelProps) {\n const { children, value, index, ...other } = props;\n\n return (\n
\n );\n}\n\nfunction a11yProps(index: any) {\n return {\n id: `simple-tab-${index}`,\n \"aria-controls\": `simple-tabpanel-${index}`,\n };\n}\n\nconst ViewBucket = ({\n classes,\n match,\n setErrorSnackMessage,\n session,\n}: IViewBucketProps) => {\n const [info, setInfo] = useState(null);\n const [records, setRecords] = useState([]);\n const [replicationRules, setReplicationRules] = useState<\n BucketReplicationRule[]\n >([]);\n const [bucketPolicy, setBucketPolicy] = useState([]);\n const [loadingPolicy, setLoadingPolicy] = useState(true);\n const [bucketUsers, setBucketUsers] = useState([]);\n const [loadingUsers, setLoadingUsers] = useState(true);\n const [loadingBucket, setLoadingBucket] = useState(true);\n const [loadingEvents, setLoadingEvents] = useState(true);\n const [loadingVersioning, setLoadingVersioning] = useState(true);\n const [loadingObjectLocking, setLoadingLocking] = useState(true);\n const [loadingReplication, setLoadingReplication] = useState(true);\n const [loadingSize, setLoadingSize] = useState(true);\n const [loadingEncryption, setLoadingEncryption] = useState(true);\n const [accessPolicyScreenOpen, setAccessPolicyScreenOpen] = useState(\n false\n );\n const [curTab, setCurTab] = useState(0);\n const [addScreenOpen, setAddScreenOpen] = useState(false);\n const [policyScreenOpen, setPolicyScreenOpen] = useState(false);\n const [\n enableEncryptionScreenOpen,\n setEnableEncryptionScreenOpen,\n ] = useState(false);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [editLifecycleOpen, setEditLifecycleOpen] = useState(false);\n const [selectedEvent, setSelectedEvent] = useState(null);\n const [bucketSize, setBucketSize] = useState(\"0\");\n const [openSetReplication, setOpenSetReplication] = useState(false);\n const [isVersioned, setIsVersioned] = useState(false);\n const [hasObjectLocking, setHasObjectLocking] = useState(false);\n const [encryptionEnabled, setEncryptionEnabled] = useState(false);\n const [\n encryptionCfg,\n setEncryptionCfg,\n ] = useState(null);\n const [retentionConfigOpen, setRetentionConfigOpen] = useState(\n false\n );\n const [policyEdit, setPolicyEdit] = useState(null);\n const [enableVersioningOpen, setEnableVersioningOpen] = useState(\n false\n );\n const [loadingPerms, setLoadingPerms] = useState(true);\n const [canPutReplication, setCanPutReplication] = useState(false);\n const [canGetReplication, setCanGetReplication] = useState(false);\n const [deleteReplicationModal, setDeleteReplicationModal] = useState(\n false\n );\n const [selectedRRule, setSelectedRRule] = useState(\"\");\n const [loadingLifecycle, setLoadingLifecycle] = useState(true);\n const [lifecycleRecords, setLifecycleRecords] = useState([]);\n const [addLifecycleOpen, setAddLifecycleOpen] = useState(false);\n\n const bucketName = match.params[\"bucketName\"];\n const usersEnabled = session.pages?.indexOf(\"/users\") > -1;\n\n // check the permissions for creating bucket\n useEffect(() => {\n if (loadingPerms) {\n api\n .invoke(\"POST\", `/api/v1/has-permission`, {\n actions: [\n {\n id: \"PutReplicationConfiguration\",\n action: \"s3:PutReplicationConfiguration\",\n bucket_name: bucketName,\n },\n {\n id: \"GetReplicationConfiguration\",\n action: \"s3:GetReplicationConfiguration\",\n bucket_name: bucketName,\n },\n ],\n })\n .then((res: HasPermissionResponse) => {\n setLoadingPerms(false);\n if (!res.permissions) {\n return;\n }\n const actions = res.permissions ? res.permissions : [];\n\n let userCanPutReplication = actions.find(\n (s) => s.id === \"PutReplicationConfiguration\"\n );\n\n if (userCanPutReplication && userCanPutReplication.can) {\n setCanPutReplication(true);\n } else {\n setCanPutReplication(false);\n }\n let canGetReplication = actions.find(\n (s) => s.id === \"GetReplicationConfiguration\"\n );\n\n if (canGetReplication && canGetReplication.can) {\n setCanGetReplication(true);\n } else {\n setCanGetReplication(false);\n }\n\n setLoadingPerms(false);\n })\n .catch((err: any) => {\n setLoadingPerms(false);\n setErrorSnackMessage(err);\n });\n }\n }, [bucketName, loadingPerms, setErrorSnackMessage]);\n\n useEffect(() => {\n if (loadingEvents) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/events`)\n .then((res: BucketEventList) => {\n const events = get(res, \"events\", []);\n setLoadingEvents(false);\n setRecords(events || []);\n })\n .catch((err: any) => {\n setLoadingEvents(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loadingEvents, setErrorSnackMessage, bucketName]);\n\n useEffect(() => {\n if (loadingVersioning) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/versioning`)\n .then((res: BucketVersioning) => {\n setIsVersioned(res.is_versioned);\n setLoadingVersioning(false);\n })\n .catch((err: any) => {\n setErrorSnackMessage(err);\n setLoadingVersioning(false);\n });\n }\n }, [loadingVersioning, setErrorSnackMessage, bucketName]);\n\n useEffect(() => {\n if (loadingVersioning) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/object-locking`)\n .then((res: BucketObjectLocking) => {\n setHasObjectLocking(res.object_locking_enabled);\n setLoadingLocking(false);\n })\n .catch((err: any) => {\n setErrorSnackMessage(err);\n setLoadingLocking(false);\n });\n }\n }, [\n loadingObjectLocking,\n setErrorSnackMessage,\n bucketName,\n loadingVersioning,\n ]);\n\n useEffect(() => {\n if (loadingReplication) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/replication`)\n .then((res: BucketReplication) => {\n const r = res.rules ? res.rules : [];\n setReplicationRules(r);\n setLoadingReplication(false);\n })\n .catch((err: any) => {\n setErrorSnackMessage(err);\n setLoadingReplication(false);\n });\n }\n }, [loadingReplication, setErrorSnackMessage, bucketName]);\n\n useEffect(() => {\n if (loadingPolicy) {\n api\n .invoke(\"GET\", `/api/v1/bucket-policy/${bucketName}`)\n .then((res: any) => {\n setBucketPolicy(res.policies);\n setLoadingPolicy(false);\n })\n .catch((err: any) => {\n setErrorSnackMessage(err);\n setLoadingPolicy(false);\n });\n }\n }, [loadingPolicy, setErrorSnackMessage, bucketName]);\n\n useEffect(() => {\n if (loadingUsers && usersEnabled) {\n api\n .invoke(\"GET\", `/api/v1/bucket-users/${bucketName}`)\n .then((res: any) => {\n setBucketUsers(res);\n setLoadingUsers(false);\n })\n .catch((err: any) => {\n setErrorSnackMessage(err);\n setLoadingUsers(false);\n });\n }\n }, [loadingUsers, setErrorSnackMessage, bucketName, usersEnabled]);\n\n useEffect(() => {\n if (loadingSize) {\n api\n .invoke(\"GET\", `/api/v1/buckets`)\n .then((res: BucketList) => {\n const resBuckets = get(res, \"buckets\", []);\n\n const bucketInfo = resBuckets.find(\n (bucket) => bucket.name === bucketName\n );\n const size = get(bucketInfo, \"size\", \"0\");\n\n setLoadingSize(false);\n setBucketSize(size);\n })\n .catch((err: any) => {\n setLoadingSize(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loadingSize, setErrorSnackMessage, bucketName]);\n\n useEffect(() => {\n if (loadingBucket) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}`)\n .then((res: BucketInfo) => {\n setLoadingBucket(false);\n setInfo(res);\n })\n .catch((err) => {\n setLoadingBucket(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loadingBucket, setErrorSnackMessage, bucketName]);\n\n useEffect(() => {\n if (loadingEncryption) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/encryption/info`)\n .then((res: BucketEncryptionInfo) => {\n if (res.algorithm) {\n setEncryptionEnabled(true);\n setEncryptionCfg(res);\n }\n setLoadingEncryption(false);\n })\n .catch((err) => {\n if (\n err === \"The server side encryption configuration was not found\"\n ) {\n setEncryptionEnabled(false);\n setEncryptionCfg(null);\n }\n setLoadingEncryption(false);\n });\n }\n }, [loadingEncryption, bucketName]);\n\n const setBucketVersioning = () => {\n setEnableVersioningOpen(true);\n };\n useEffect(() => {\n if (loadingLifecycle) {\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/lifecycle`)\n .then((res: any) => {\n const records = get(res, \"lifecycle\", []);\n\n setLifecycleRecords(records || []);\n setLoadingLifecycle(false);\n })\n .catch((err) => {\n console.error(err);\n setLoadingLifecycle(false);\n });\n }\n }, [loadingLifecycle, setLoadingLifecycle, bucketName]);\n\n const loadAllBucketData = () => {\n setLoadingBucket(true);\n setLoadingSize(true);\n setLoadingReplication(true);\n setLoadingVersioning(true);\n setLoadingEvents(true);\n setLoadingEncryption(true);\n };\n\n const closeAddModalAndRefresh = (refresh: boolean) => {\n setPolicyScreenOpen(false);\n\n if (refresh) {\n fetchPolicies();\n }\n };\n\n const fetchPolicies = () => {\n setLoadingPolicy(true);\n };\n\n const closeAddEventAndRefresh = () => {\n setAddScreenOpen(false);\n loadAllBucketData();\n };\n\n const closeEnableBucketEncryption = () => {\n setEnableEncryptionScreenOpen(false);\n loadAllBucketData();\n };\n\n const closeSetAccessPolicy = () => {\n setAccessPolicyScreenOpen(false);\n loadAllBucketData();\n };\n\n const closeRetentionConfig = () => {\n setRetentionConfigOpen(false);\n loadAllBucketData();\n };\n\n const closeAddReplication = () => {\n setOpenReplicationOpen(false);\n loadAllBucketData();\n };\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n if (refresh) {\n loadAllBucketData();\n }\n };\n\n const closeEditLCAndRefresh = (refresh: boolean) => {\n setEditLifecycleOpen(false);\n if (refresh) {\n setLoadingLifecycle(true);\n }\n };\n\n const confirmDeleteEvent = (evnt: BucketEvent) => {\n setDeleteOpen(true);\n setSelectedEvent(evnt);\n };\n\n const confirmDeleteReplication = (replication: BucketReplicationRule) => {\n setSelectedRRule(replication.id);\n setDeleteReplicationModal(true);\n };\n\n const closeEnableVersioning = (refresh: boolean) => {\n setEnableVersioningOpen(false);\n if (refresh) {\n loadAllBucketData();\n }\n };\n\n let accessPolicy = \"n/a\";\n\n if (info !== null) {\n accessPolicy = info.access;\n }\n\n const eventsDisplay = (events: string[]) => {\n return {events.join(\", \")};\n };\n\n const ruleDestDisplay = (events: BucketReplicationDestination) => {\n return {events.bucket.replace(\"arn:aws:s3:::\", \"\")};\n };\n\n const ruleDelDisplay = (events: BucketReplicationRuleDeleteMarker) => {\n return null;\n };\n\n const setOpenReplicationOpen = (open = false) => {\n setOpenSetReplication(open);\n };\n\n const closeReplicationModalDelete = (refresh: boolean) => {\n setDeleteReplicationModal(false);\n\n if (refresh) {\n setLoadingReplication(true);\n }\n };\n\n const closeAddLCAndRefresh = (refresh: boolean) => {\n setAddLifecycleOpen(false);\n if (refresh) {\n setLoadingLifecycle(true);\n }\n };\n\n const tableActions = [{ type: \"delete\", onClick: confirmDeleteEvent }];\n const viewAction = (row: any) => {\n setPolicyScreenOpen(true);\n setPolicyEdit(row);\n };\n\n const PolicyActions = [{ type: \"view\", onClick: viewAction }];\n const replicationTableActions = [\n {\n type: \"delete\",\n onClick: confirmDeleteReplication,\n disableButtonFunction: () => replicationRules.length <= 1,\n },\n ];\n\n const expirationRender = (expiration: any) => {\n if (expiration.days) {\n return `${expiration.days} day${expiration.days > 1 ? \"s\" : \"\"}`;\n }\n\n if (expiration.date === \"0001-01-01T00:00:00Z\") {\n return \"\";\n }\n\n return {expiration.date};\n };\n\n const transitionRender = (transition: any) => {\n if (transition.days) {\n return `${transition.days} day${transition.days > 1 ? \"s\" : \"\"}`;\n }\n\n if (transition.date === \"0001-01-01T00:00:00Z\") {\n return \"\";\n }\n\n return {transition.date};\n };\n\n const renderStorageClass = (objectST: any) => {\n const stClass = get(objectST, \"transition.storage_class\", \"\");\n\n return stClass;\n };\n\n const lifecycleColumns = [\n { label: \"ID\", elementKey: \"id\" },\n {\n label: \"Prefix\",\n elementKey: \"prefix\",\n },\n {\n label: \"Status\",\n elementKey: \"status\",\n },\n {\n label: \"Expiration\",\n elementKey: \"expiration\",\n renderFunction: expirationRender,\n },\n {\n label: \"Transition\",\n elementKey: \"transition\",\n renderFunction: transitionRender,\n },\n {\n label: \"Storage Class\",\n elementKey: \"storage_class\",\n renderFunction: renderStorageClass,\n renderFullObject: true,\n },\n ];\n\n const userViewAction = (user: any) => {\n history.push(`/users/${user}`);\n };\n\n const userTableActions = [{ type: \"view\", onClick: userViewAction }];\n\n return (\n \n {addScreenOpen && (\n \n )}\n {enableEncryptionScreenOpen && (\n \n )}\n {accessPolicyScreenOpen && (\n \n )}\n {policyScreenOpen && (\n \n )}\n {retentionConfigOpen && (\n \n )}\n {openSetReplication && (\n \n )}\n {deleteOpen && (\n \n )}\n {enableVersioningOpen && (\n \n )}\n {deleteReplicationModal && (\n \n )}\n {editLifecycleOpen && (\n \n )}\n {addLifecycleOpen && (\n \n )}\n\n ${match.params[\"bucketName\"]}`} />\n \n \n , newValue: number) => {\n setCurTab(newValue);\n }}\n indicatorColor=\"primary\"\n textColor=\"primary\"\n aria-label=\"cluster-tabs\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n \n \n {canGetReplication && }\n \n \n {usersEnabled && }\n \n \n \n \n
\n \n \n \n

Details

\n
\n \n \n \n \n \n \n \n \n \n \n {!hasObjectLocking ? (\n \n \n \n \n ) : (\n \n \n \n \n )}\n \n
Access Policy:\n {\n setAccessPolicyScreenOpen(true);\n }}\n >\n {loadingBucket ? (\n \n ) : (\n accessPolicy.toLowerCase()\n )}\n \n Encryption:\n {loadingEncryption ? (\n \n ) : (\n {\n setEnableEncryptionScreenOpen(true);\n }}\n >\n {encryptionEnabled ? \"Enabled\" : \"Disabled\"}\n \n )}\n
Replication:\n \n {replicationRules.length ? \"Enabled\" : \"Disabled\"}\n \n Object Locking:Disabled
\n
\n \n \n \n \n \n \n \n Reported Usage\n \n \n \n \n {niceBytes(bucketSize)}\n \n \n
\n
\n
\n
\n \n \n \n

Versioning

\n
\n \n \n \n \n \n
Versioning:\n {loadingVersioning ? (\n \n ) : (\n \n \n {isVersioned ? \"Enabled\" : \"Disabled\"}\n \n \n )}\n
\n
\n
\n
\n
\n
\n {hasObjectLocking && (\n \n \n \n

Object Locking

\n
\n \n \n \n \n \n \n
\n Retention:\n {loadingVersioning ? (\n \n ) : (\n \n {\n setRetentionConfigOpen(true);\n }}\n >\n Configure\n \n \n )}\n
\n
\n
\n
\n )}\n
\n \n \n \n {\n // setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n }\n size=\"medium\"\n onClick={() => {\n setAddScreenOpen(true);\n }}\n >\n Subscribe to Event\n \n \n \n
\n
\n \n \n \n
\n
\n {canGetReplication && (\n \n \n \n {\n // setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n {canPutReplication && (\n }\n size=\"medium\"\n onClick={() => {\n setOpenReplicationOpen(true);\n }}\n >\n Add Replication Rule\n \n )}\n \n \n
\n
\n \n \n \n
\n
\n )}\n \n \n \n {\n // setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n }\n size=\"medium\"\n onClick={() => {\n setAddLifecycleOpen(true);\n }}\n >\n Add Lifecycle Rule\n \n \n \n
\n
\n \n \n \n
\n
\n \n
\n \n
\n {usersEnabled && (\n \n
\n \n
\n )}\n
\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n session: state.console.session,\n});\n\nconst connector = connect(mapState, {\n setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ViewBucket));\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 {\n IBarChartConfiguration,\n IBarChartRelation,\n IDataSRep,\n ILinearGraphConfiguration,\n IPieChartConfiguration,\n} from \"./Widgets/types\";\n\nexport enum widgetType {\n singleValue = \"singleValue\",\n linearGraph = \"linearGraph\",\n barChart = \"barChart\",\n pieChart = \"pieChart\",\n singleRep = \"singleRep\",\n}\n\nexport interface IDashboardPanel {\n title: string;\n data: string | object[] | IDataSRep[];\n dataOuter?: string | object[];\n type: widgetType;\n layoutIdentifier: string;\n widgetConfiguration?:\n | ILinearGraphConfiguration[]\n | IBarChartConfiguration[]\n | IPieChartConfiguration;\n color?: string;\n fillColor?: string;\n innerLabel?: string;\n labelDisplayFunction?: (value: string) => any;\n disableYAxis?: boolean;\n xAxisFormatter?: (item: string) => string;\n yAxisFormatter?: (item: string) => string;\n customStructure?: IBarChartRelation[];\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 from \"react\";\nimport history from \"../../../history\";\nimport { Route, Router, Switch, withRouter } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../../store\";\nimport { setMenuOpen } from \"../../../actions\";\nimport NotFoundPage from \"../../NotFoundPage\";\nimport ListBuckets from \"./ListBuckets/ListBuckets\";\nimport ViewBucket from \"./ViewBucket/ViewBucket\";\n\nconst mapState = (state: AppState) => ({\n open: state.system.sidebarOpen,\n});\n\nconst connector = connect(mapState, { setMenuOpen });\n\nconst Buckets = () => {\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default withRouter(connector(Buckets));\n","// This file is part of MinIO Kubernetes Cloud\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport api from \"../../../common/api\";\nimport { PolicyList } from \"./types\";\nimport { setErrorSnackMessage } from \"../../../actions\";\n\ninterface IDeletePolicyProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedPolicy: string;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeletePolicy = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedPolicy,\n setErrorSnackMessage,\n}: IDeletePolicyProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n const removeRecord = () => {\n if (deleteLoading) {\n return;\n }\n setDeleteLoading(true);\n api\n .invoke(\"DELETE\", `/api/v1/policy?name=${selectedPolicy}`)\n .then((res: PolicyList) => {\n setDeleteLoading(false);\n\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n };\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete Policy\n \n {deleteLoading && }\n \n Are you sure you want to delete policy {selectedPolicy}?.\n \n \n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n {\n removeRecord();\n }}\n color=\"secondary\"\n autoFocus\n >\n Delete\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(DeletePolicy);\n","// This file is part of MinIO Kubernetes Cloud\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, { useState, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport { Policy, PolicyList } from \"./types\";\nimport { CreateIcon } from \"../../../icons\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport AddPolicy from \"./AddPolicy\";\nimport DeletePolicy from \"./DeletePolicy\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport api from \"../../../common/api\";\nimport history from \"../../../history\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IPoliciesProps {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst ListPolicies = ({ classes, setErrorSnackMessage }: IPoliciesProps) => {\n const [records, setRecords] = useState([]);\n const [loading, setLoading] = useState(false);\n const [addScreenOpen, setAddScreenOpen] = useState(false);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [selectedPolicy, setSelectedPolicy] = useState(\"\");\n const [filterPolicies, setFilterPolicies] = useState(\"\");\n const [policyEdit, setPolicyEdit] = useState(null);\n\n useEffect(() => {\n fetchRecords();\n }, []);\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\"GET\", `/api/v1/policies`)\n .then((res: PolicyList) => {\n const policies = get(res, \"policies\", []);\n\n policies.sort((pa, pb) => {\n if (pa.name > pb.name) {\n return 1;\n }\n\n if (pa.name < pb.name) {\n return -1;\n }\n\n return 0;\n });\n\n setLoading(false);\n setRecords(policies);\n })\n .catch((err) => {\n setLoading(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loading, setLoading, setRecords, setErrorSnackMessage]);\n\n const fetchRecords = () => {\n setLoading(true);\n };\n\n const closeAddModalAndRefresh = (refresh: boolean) => {\n setAddScreenOpen(false);\n\n if (refresh) {\n fetchRecords();\n }\n };\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n\n if (refresh) {\n fetchRecords();\n }\n };\n\n const confirmDeletePolicy = (policy: string) => {\n setDeleteOpen(true);\n setSelectedPolicy(policy);\n };\n\n const viewAction = (policy: any) => {\n history.push(`/policies/${policy.name}`);\n };\n\n const tableActions = [\n { type: \"view\", onClick: viewAction },\n { type: \"delete\", onClick: confirmDeletePolicy, sendOnlyId: true },\n ];\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.name.includes(filterPolicies)\n );\n\n return (\n \n {addScreenOpen && (\n \n )}\n {deleteOpen && (\n \n )}\n \n \n \n \n {\n setFilterPolicies(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n }\n onClick={() => {\n setAddScreenOpen(true);\n setPolicyEdit(null);\n }}\n >\n Create Policy\n \n \n \n
\n
\n \n \n \n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(ListPolicies));\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, useEffect, useState } from \"react\";\nimport { Policy } from \"./types\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n containerForHeader,\n modalBasic,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport Tab from \"@material-ui/core/Tab\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport { User } from \"../Users/types\";\nimport api from \"../../../common/api\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { Link } from \"react-router-dom\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport CodeMirrorWrapper from \"../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper\";\nimport history from \"../../../history\";\n\ninterface IPolicyDetailsProps {\n classes: any;\n match: any;\n closeModalAndRefresh: (refresh: boolean) => void;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n multiContainer: {\n display: \"flex\",\n alignItems: \"center\" as const,\n justifyContent: \"flex-start\" as const,\n },\n sizeFactorContainer: {\n marginLeft: 8,\n },\n containerHeader: {\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n paperContainer: {\n padding: \"15px 15px 15px 50px\",\n },\n infoGrid: {\n display: \"grid\",\n gridTemplateColumns: \"auto auto auto auto\",\n gridGap: 8,\n \"& div\": {\n display: \"flex\",\n alignItems: \"center\",\n },\n \"& div:nth-child(odd)\": {\n justifyContent: \"flex-end\",\n fontWeight: 700,\n },\n \"& div:nth-child(2n)\": {\n paddingRight: 35,\n },\n },\n masterActions: {\n width: \"25%\",\n minWidth: \"120px\",\n \"& div\": {\n margin: \"5px 0px\",\n },\n },\n actionsTray: {\n textAlign: \"right\",\n },\n updateButton: {\n backgroundColor: \"transparent\",\n border: 0,\n padding: \"0 6px\",\n cursor: \"pointer\",\n \"&:focus, &:active\": {\n outline: \"none\",\n },\n \"& svg\": {\n height: 12,\n },\n },\n noUnderLine: {\n textDecoration: \"none\",\n },\n poolLabel: {\n color: \"#666666\",\n },\n licenseContainer: {\n position: \"relative\",\n padding: \"20px 52px 0px 28px\",\n background: \"#032F51\",\n boxShadow: \"0px 3px 7px #00000014\",\n \"& h2\": {\n color: \"#FFF\",\n marginBottom: 67,\n },\n \"& a\": {\n textDecoration: \"none\",\n },\n \"& h3\": {\n color: \"#FFFFFF\",\n marginBottom: \"30px\",\n fontWeight: \"bold\",\n },\n \"& h6\": {\n color: \"#FFFFFF !important\",\n },\n },\n licenseInfo: { color: \"#FFFFFF\", position: \"relative\" },\n licenseInfoTitle: {\n textTransform: \"none\",\n color: \"#BFBFBF\",\n fontSize: 11,\n },\n licenseInfoValue: {\n textTransform: \"none\",\n fontSize: 14,\n fontWeight: \"bold\",\n },\n verifiedIcon: {\n width: 96,\n position: \"absolute\",\n right: 0,\n bottom: 29,\n },\n breadcrumLink: {\n textDecoration: \"none\",\n color: \"black\",\n },\n ...modalBasic,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst PolicyDetails = ({\n classes,\n match,\n closeModalAndRefresh,\n setErrorSnackMessage,\n}: IPolicyDetailsProps) => {\n const [selectedTab, setSelectedTab] = useState(0);\n const [policy, setPolicy] = useState(null);\n const [userList, setUserList] = useState([]);\n const [addLoading, setAddLoading] = useState(false);\n const [policyName, setPolicyName] = useState(\n match.params[\"policyName\"]\n );\n const [policyDefinition, setPolicyDefinition] = useState(\"\");\n const [loadingPolicy, setLoadingPolicy] = useState(true);\n\n const saveRecord = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n api\n .invoke(\"POST\", \"/api/v1/policies\", {\n name: policyName,\n policy: policyDefinition,\n })\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n setAddLoading(false);\n setErrorSnackMessage(err);\n });\n };\n\n useEffect(() => {\n const loadUsersForPolicy = () => {\n api\n .invoke(\"GET\", `/api/v1/policies/${policyName}/users`)\n .then((result: any) => {\n setUserList(result);\n })\n .catch((err) => {\n console.log(\"Error in loading users\");\n });\n };\n const loadPolicyDetails = () => {\n if (loadingPolicy) {\n api\n .invoke(\"GET\", `/api/v1/policy?name=${policyName}`)\n .then((result: any) => {\n if (result) {\n setPolicy(result);\n setPolicyDefinition(\n result ? JSON.stringify(JSON.parse(result.policy), null, 4) : \"\"\n );\n }\n setLoadingPolicy(false);\n })\n .catch((err) => {\n console.log(\"Error in loading policy\");\n });\n }\n };\n\n if (loadingPolicy) {\n loadPolicyDetails();\n loadUsersForPolicy();\n }\n }, [policyName, loadingPolicy]);\n\n const resetForm = () => {\n setPolicyName(\"\");\n setPolicyDefinition(\"\");\n };\n\n const validSave = policyName.trim() !== \"\";\n\n const userViewAction = (user: any) => {\n history.push(`/users/${user}`);\n };\n const userTableActions = [{ type: \"view\", onClick: userViewAction }];\n\n return (\n \n \n \n Policy\n \n {` > ${match.params[\"policyName\"]}`}\n \n }\n />\n \n \n \n {\n setSelectedTab(newValue);\n }}\n aria-label=\"policy-tabs\"\n >\n \n \n \n \n \n {selectedTab === 0 && (\n \n ) => {\n saveRecord(e);\n }}\n >\n \n \n {\n setPolicyDefinition(value);\n }}\n />\n \n \n {!policy && (\n {\n resetForm();\n }}\n >\n Clear\n \n )}\n\n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n )}\n {selectedTab === 1 && (\n \n )}\n \n \n \n \n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(PolicyDetails));\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 history from \"../../../history\";\nimport { Route, Router, Switch, withRouter } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../../store\";\nimport { setMenuOpen } from \"../../../actions\";\nimport NotFoundPage from \"../../NotFoundPage\";\n\nimport ListPolicies from \"./ListPolicies\";\nimport PolicyDetails from \"./PolicyDetails\";\n\nconst mapState = (state: AppState) => ({\n open: state.system.sidebarOpen,\n});\n\nconst connector = connect(mapState, { setMenuOpen });\n\nconst Users = () => {\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default withRouter(connector(Users));\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 get from \"lodash/get\";\nimport { Layout } from \"react-grid-layout\";\nimport { IDashboardPanel, widgetType } from \"./types\";\nimport {\n getTimeFromTimestamp,\n niceBytes,\n niceDays,\n textToRGBColor,\n} from \"../../../../common/utils\";\n\nconst dLocalStorageV = \"dashboardConfig\";\n\nexport const defaultWidgetsLayout: Layout[] = [\n {\n w: 1,\n h: 2,\n x: 0,\n y: 0,\n i: \"panel-0\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 1,\n y: 2,\n i: \"panel-1\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 1,\n y: 3,\n i: \"panel-2\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 2,\n x: 2,\n y: 0,\n i: \"panel-3\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 2,\n h: 2,\n x: 3,\n y: 0,\n i: \"panel-4\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 2,\n h: 2,\n x: 5,\n y: 0,\n i: \"panel-5\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 0,\n y: 2,\n i: \"panel-6\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 0,\n y: 3,\n i: \"panel-7\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 2,\n y: 2,\n i: \"panel-8\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 2,\n y: 3,\n i: \"panel-9\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 2,\n h: 2,\n x: 3,\n y: 2,\n i: \"panel-10\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 7,\n y: 0,\n i: \"panel-11\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 7,\n y: 1,\n i: \"panel-12\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 0,\n y: 10,\n i: \"panel-13\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 0,\n y: 4,\n i: \"panel-14\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 2,\n h: 2,\n x: 5,\n y: 2,\n i: \"panel-15\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 8,\n h: 3,\n x: 0,\n y: 7,\n i: \"panel-16\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 8,\n h: 3,\n x: 0,\n y: 19,\n i: \"panel-19\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 7,\n y: 2,\n i: \"panel-20\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 7,\n y: 3,\n i: \"panel-21\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 4,\n y: 4,\n i: \"panel-22\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 4,\n y: 10,\n i: \"panel-23\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 0,\n y: 13,\n i: \"panel-24\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 4,\n y: 13,\n i: \"panel-25\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 0,\n y: 16,\n i: \"panel-26\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 4,\n h: 3,\n x: 4,\n y: 16,\n i: \"panel-27\",\n minW: 2,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 1,\n y: 0,\n i: \"panel-28\",\n minW: 1,\n moved: false,\n static: false,\n },\n {\n w: 1,\n h: 1,\n x: 1,\n y: 1,\n i: \"panel-29\",\n minW: 1,\n moved: false,\n static: false,\n },\n];\n\nconst colorsMain = [\n \"#6992B7\",\n \"#E2AD17\",\n \"#22B573\",\n \"#F7655E\",\n \"#0071BC\",\n \"#F9E6C5\",\n \"#A6E8C4\",\n \"#F4CECE\",\n \"#ADD5E0\",\n];\n\nconst niceDaysFromNS = (seconds: string) => {\n return niceDays(seconds, \"ns\");\n};\n\nconst roundNumber = (value: string) => {\n return parseInt(value).toString(10);\n};\n\nexport const panelsConfiguration: IDashboardPanel[] = [\n {\n title: \"Uptime\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-0\",\n labelDisplayFunction: niceDays,\n },\n {\n title: \"Total Online Disks\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-1\",\n },\n {\n title: \"Total Offline Disks\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-2\",\n },\n {\n title: \"Current Usable Capacity\",\n data: [],\n dataOuter: [{ name: \"outer\", value: 100 }],\n widgetConfiguration: {\n outerChart: {\n colorList: [\"#9c9c9c\"],\n innerRadius: 51,\n outerRadius: 54,\n startAngle: -15,\n endAngle: 195,\n },\n innerChart: {\n colorList: colorsMain,\n innerRadius: 35,\n outerRadius: 50,\n startAngle: -15,\n endAngle: 195,\n },\n },\n type: widgetType.pieChart,\n layoutIdentifier: \"panel-3\",\n innerLabel: \"N/A\",\n labelDisplayFunction: niceBytes,\n },\n {\n title: \"Data Usage Growth\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-4\",\n yAxisFormatter: niceBytes,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Object size distribution\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"a\",\n color: colorsMain[0],\n background: {\n fill: \"rgba(0,0,0,0.1)\",\n },\n },\n ],\n customStructure: [\n { originTag: \"LESS_THAN_1024_B\", displayTag: \"Less than 1024B\" },\n {\n originTag: \"BETWEEN_1024_B_AND_1_MB\",\n displayTag: \"Between 1024B and 1MB\",\n },\n {\n originTag: \"BETWEEN_1_MB_AND_10_MB\",\n displayTag: \"Between 1MB and 10MB\",\n },\n {\n originTag: \"BETWEEN_10_MB_AND_64_MB\",\n displayTag: \"Between 10MB and 64MB\",\n },\n {\n originTag: \"BETWEEN_64_MB_AND_128_MB\",\n displayTag: \"Between 64MB and 128MB\",\n },\n {\n originTag: \"BETWEEN_128_MB_AND_512_MB\",\n displayTag: \"Between 128MB and 512MB\",\n },\n {\n originTag: \"GREATER_THAN_512_MB\",\n displayTag: \"Greater than 512MB\",\n },\n ],\n type: widgetType.barChart,\n layoutIdentifier: \"panel-5\",\n },\n {\n title: \"Total Online Servers\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-6\",\n },\n {\n title: \"Total Offline Servers\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-7\",\n },\n {\n title: \"Number of Buckets\",\n data: [],\n innerLabel: \"N/A\",\n type: widgetType.singleRep,\n color: \"#0071BC\",\n fillColor: \"#ADD5E0\",\n layoutIdentifier: \"panel-8\",\n },\n {\n title: \"Number of Objects\",\n data: [],\n innerLabel: \"N/A\",\n type: widgetType.singleRep,\n color: \"#0071BC\",\n fillColor: \"#ADD5E0\",\n layoutIdentifier: \"panel-9\",\n },\n {\n title: \"S3 API Data Received Rate\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-10\",\n xAxisFormatter: getTimeFromTimestamp,\n yAxisFormatter: niceBytes,\n },\n {\n title: \"Total Open FDs\",\n data: [],\n innerLabel: \"N/A\",\n type: widgetType.singleRep,\n layoutIdentifier: \"panel-11\",\n color: \"#22B573\",\n fillColor: \"#A6E8C4\",\n },\n {\n title: \"Total Goroutines\",\n data: [],\n innerLabel: \"N/A\",\n type: widgetType.singleRep,\n layoutIdentifier: \"panel-12\",\n color: \"#F7655E\",\n fillColor: \"#F4CECE\",\n },\n {\n title: \"Node CPU Usage\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-13\",\n yAxisFormatter: roundNumber,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"S3 API Request Rate\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-14\",\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"S3 API Data Sent Rate\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-15\",\n xAxisFormatter: getTimeFromTimestamp,\n yAxisFormatter: niceBytes,\n },\n {\n title: \"Internode Data Transfer\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-16\",\n yAxisFormatter: niceBytes,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Node IO\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-19\",\n yAxisFormatter: niceBytes,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Time Since Last Heal Activity\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-20\",\n labelDisplayFunction: niceDaysFromNS,\n },\n {\n title: \"Time Since Last Scan Activity\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-21\",\n labelDisplayFunction: niceDaysFromNS,\n },\n {\n title: \"S3 API Request Error Rate\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-22\",\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Node Memory Usage\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-23\",\n xAxisFormatter: getTimeFromTimestamp,\n yAxisFormatter: niceBytes,\n },\n {\n title: \"Drive Used Capacity\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-24\",\n xAxisFormatter: getTimeFromTimestamp,\n yAxisFormatter: niceBytes,\n },\n {\n title: \"Drives Free Inodes\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-25\",\n disableYAxis: true,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Node Syscalls\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-26\",\n yAxisFormatter: roundNumber,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Node File Descriptors\",\n data: [],\n widgetConfiguration: [\n {\n dataKey: \"\",\n keyLabel: \"\",\n lineColor: \"#000\",\n fillColor: \"#000\",\n },\n ],\n type: widgetType.linearGraph,\n layoutIdentifier: \"panel-27\",\n yAxisFormatter: roundNumber,\n xAxisFormatter: getTimeFromTimestamp,\n },\n {\n title: \"Total S3 Traffic Inbound\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-28\",\n labelDisplayFunction: niceBytes,\n },\n {\n title: \"Total S3 Traffic Outbound\",\n data: \"N/A\",\n type: widgetType.singleValue,\n layoutIdentifier: \"panel-29\",\n labelDisplayFunction: niceBytes,\n },\n];\n\nconst calculateMainValue = (elements: any[], metricCalc: string) => {\n if (elements.length === 0) {\n return [\"\", \"0\"];\n }\n\n switch (metricCalc) {\n case \"mean\":\n const sumValues = elements.reduce((accumulator, currValue) => {\n return accumulator + parseFloat(currValue[1]);\n }, 0);\n\n const mean = Math.floor(sumValues / elements.length);\n\n return [\"\", mean.toString()];\n default:\n const sortResult = elements.sort(\n (value1: any[], value2: any[]) => value1[0] - value2[0]\n );\n\n return sortResult[sortResult.length - 1];\n }\n};\n\nconst constructLabelNames = (metrics: any, legendFormat: string) => {\n const keysToReplace = Object.keys(metrics);\n const expToReplace = new RegExp(`{{(${keysToReplace.join(\"|\")})}}`, \"g\");\n\n const replacedLegend = legendFormat.replace(expToReplace, (matchItem) => {\n const nwMatchItem = matchItem.replace(/({{|}})/g, \"\");\n return metrics[nwMatchItem];\n });\n\n // In case not all the legends were replaced, we remove the placeholders.\n return replacedLegend.replace(/{{(.*?)}}/g, \"\");\n};\n\nexport const getWidgetsWithValue = (payload: any[]) => {\n return panelsConfiguration.map((panelItem) => {\n const payloadData = payload.find(\n (panelT) =>\n panelT.title.toLowerCase().trim() ===\n panelItem.title.toLowerCase().trim()\n );\n\n if (!payloadData) {\n return panelItem;\n }\n\n const typeOfPayload = payloadData.type;\n\n switch (panelItem.type) {\n case widgetType.singleValue:\n if (typeOfPayload === \"stat\" || typeOfPayload === \"singlestat\") {\n // We sort values & get the last value\n let elements = get(payloadData, \"targets[0].result[0].values\", []);\n\n if (elements === null) {\n elements = [];\n }\n\n const metricCalc = get(\n payloadData,\n \"options.reduceOptions.calcs[0]\",\n \"lastNotNull\"\n );\n\n const valueDisplay = calculateMainValue(elements, metricCalc);\n\n const data = panelItem.labelDisplayFunction\n ? panelItem.labelDisplayFunction(valueDisplay[1])\n : valueDisplay[1];\n\n return {\n ...panelItem,\n data,\n };\n }\n break;\n case widgetType.pieChart:\n if (typeOfPayload === \"gauge\") {\n let chartSeries = get(payloadData, \"targets[0].result\", []);\n\n if (chartSeries === null) {\n chartSeries = [];\n }\n\n const metricCalc = get(\n payloadData,\n \"options.reduceOptions.calcs[0]\",\n \"lastNotNull\"\n );\n\n const valuesArray =\n chartSeries.length > 0 ? chartSeries[0].values : [];\n\n const totalValues = calculateMainValue(valuesArray, metricCalc);\n\n const values = chartSeries.map((elementValue: any) => {\n const values = get(elementValue, \"values\", []);\n const metricKeyItem = Object.keys(elementValue.metric);\n\n const sortResult = values.sort(\n (value1: any[], value2: any[]) => value1[0] - value2[0]\n );\n\n const metricName = elementValue.metric[metricKeyItem[0]];\n const value = sortResult[sortResult.length - 1];\n return { name: metricName, value: parseInt(value) };\n });\n\n const innerLabel = panelItem.labelDisplayFunction\n ? panelItem.labelDisplayFunction(totalValues[1])\n : totalValues[1];\n\n return {\n ...panelItem,\n data: values,\n innerLabel,\n };\n }\n break;\n case widgetType.linearGraph:\n if (typeOfPayload === \"graph\") {\n let targets = get(payloadData, \"targets\", []);\n if (targets === null) {\n targets = [];\n }\n\n const series: any[] = [];\n const plotValues: any[] = [];\n\n targets.forEach(\n (\n targetMaster: { legendFormat: string; result: any[] },\n index: number\n ) => {\n // Add a new serie to plot variables in case it is not from multiple values\n let results = get(targetMaster, \"result\", []);\n const legendFormat = targetMaster.legendFormat;\n if (results === null) {\n results = [];\n }\n\n results.forEach((itemVals: { metric: object; values: any[] }) => {\n // Label Creation\n const labelName = constructLabelNames(\n itemVals.metric,\n legendFormat\n );\n const keyName = `key_${index}${labelName}`;\n\n // series creation with recently created label\n series.push({\n dataKey: keyName,\n keyLabel: labelName,\n lineColor: \"\",\n fillColor: \"\",\n });\n\n // we iterate over values and create elements\n let values = get(itemVals, \"values\", []);\n if (values === null) {\n values = [];\n }\n\n values.forEach((valInfo: any[]) => {\n const itemIndex = plotValues.findIndex(\n (element) => element.name === valInfo[0]\n );\n\n // Element not exists yet\n if (itemIndex === -1) {\n let itemToPush: any = { name: valInfo[0] };\n itemToPush[keyName] = valInfo[1];\n\n plotValues.push(itemToPush);\n } else {\n plotValues[itemIndex][keyName] = valInfo[1];\n }\n });\n });\n }\n );\n\n const sortedSeries = series.sort((series1: any, series2: any) => {\n if (series1.keyLabel < series2.keyLabel) {\n return -1;\n }\n if (series1.keyLabel > series2.keyLabel) {\n return 1;\n }\n return 0;\n });\n\n const seriesWithColors = sortedSeries.map(\n (serialC: any, index: number) => {\n return {\n ...serialC,\n lineColor:\n colorsMain[index] || textToRGBColor(serialC.keyLabel),\n fillColor:\n colorsMain[index] || textToRGBColor(serialC.keyLabel),\n };\n }\n );\n\n const sortedVals = plotValues.sort(\n (value1: any, value2: any) => value1.name - value2.name\n );\n\n return {\n ...panelItem,\n widgetConfiguration: seriesWithColors,\n data: sortedVals,\n };\n }\n break;\n case widgetType.barChart:\n if (typeOfPayload === \"bargauge\") {\n let chartBars = get(payloadData, \"targets[0].result\", []);\n\n if (chartBars === null) {\n chartBars = [];\n }\n\n const sortFunction = (value1: any[], value2: any[]) =>\n value1[0] - value2[0];\n\n let values = [];\n if (panelItem.customStructure) {\n values = panelItem.customStructure.map((structureItem) => {\n const metricTake = chartBars.find((element: any) => {\n const metricKeyItem = Object.keys(element.metric);\n\n const metricName = element.metric[metricKeyItem[0]];\n\n return metricName === structureItem.originTag;\n });\n\n const elements = get(metricTake, \"values\", []);\n\n const sortResult = elements.sort(sortFunction);\n const lastValue = sortResult[sortResult.length - 1] || [\"\", \"0\"];\n\n return {\n name: structureItem.displayTag,\n a: parseInt(lastValue[1]),\n };\n });\n } else {\n // If no configuration is set, we construct the series for bar chart and return the element\n values = chartBars.map((elementValue: any) => {\n const metricKeyItem = Object.keys(elementValue.metric);\n\n const metricName = elementValue.metric[metricKeyItem[0]];\n\n const elements = get(elementValue, \"values\", []);\n\n const sortResult = elements.sort(sortFunction);\n const lastValue = sortResult[sortResult.length - 1] || [\"\", \"0\"];\n return { name: metricName, a: parseInt(lastValue[1]) };\n });\n }\n\n return {\n ...panelItem,\n data: values,\n };\n }\n break;\n case widgetType.singleRep:\n if (typeOfPayload === \"stat\") {\n // We sort values & get the last value\n let elements = get(payloadData, \"targets[0].result[0].values\", []);\n if (elements === null) {\n elements = [];\n }\n const metricCalc = get(\n payloadData,\n \"options.reduceOptions.calcs[0]\",\n \"lastNotNull\"\n );\n\n const valueDisplay = calculateMainValue(elements, metricCalc);\n\n const sortResult = elements.sort(\n (value1: any[], value2: any[]) => value1[0] - value2[0]\n );\n\n let valuesForBackground = [];\n\n if (sortResult.length === 1) {\n valuesForBackground.push({ value: 0 });\n }\n\n sortResult.forEach((eachVal: any) => {\n valuesForBackground.push({ value: parseInt(eachVal[1]) });\n });\n\n const innerLabel = panelItem.labelDisplayFunction\n ? panelItem.labelDisplayFunction(valueDisplay[1])\n : valueDisplay[1];\n\n return {\n ...panelItem,\n data: valuesForBackground,\n innerLabel,\n };\n }\n break;\n }\n\n return panelItem;\n });\n};\n\nexport const saveDashboardDistribution = (configuration: Layout[]) => {\n localStorage.setItem(dLocalStorageV, btoa(JSON.stringify(configuration)));\n};\n\nexport const getDashboardDistribution = (currentItems: number) => {\n const storedConfiguration = localStorage.getItem(dLocalStorageV);\n\n if (!storedConfiguration) {\n return defaultWidgetsLayout;\n }\n\n const parsedConfig = JSON.parse(atob(storedConfiguration));\n\n if (\n parsedConfig.length === 0 ||\n (parsedConfig.length > 0 && !parsedConfig[0].minW)\n ) {\n return defaultWidgetsLayout;\n }\n\n // Stored Widgets length is not the same as the currentItems, then we return the new configuration\n if (currentItems !== 0 && parsedConfig.length !== currentItems) {\n return defaultWidgetsLayout;\n }\n\n return parsedConfig;\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 from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\n\ninterface ISingleValueWidget {\n title: string;\n data: string;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n contentContainer: {\n ...widgetCommon.contentContainer,\n fontWeight: 700,\n color: \"#072045\",\n fontSize: 18,\n textAlign: \"center\" as const,\n },\n });\n\nconst SingleValueWidget = ({ title, data, classes }: ISingleValueWidget) => {\n return (\n
\n
{title}
\n
{data}
\n
\n );\n};\n\nexport default withStyles(styles)(SingleValueWidget);\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 from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { getTimeFromTimestamp } from \"../../../../../../common/utils\";\nimport { tooltipCommon } from \"../../../../Common/FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...tooltipCommon,\n });\n\nconst LineChartTooltip = ({\n active,\n payload,\n label,\n linearConfiguration,\n yAxisFormatter,\n classes,\n}: any) => {\n if (active) {\n return (\n
\n
\n {getTimeFromTimestamp(label, true)}\n
\n {payload &&\n payload.map((pl: any, index: number) => {\n return (\n \n \n
\n \n {linearConfiguration[index].keyLabel}:{\" \"}\n {yAxisFormatter(pl.value)}\n \n
\n
\n );\n })}\n \n );\n }\n\n return null;\n};\n\nexport default withStyles(styles)(LineChartTooltip);\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 from \"react\";\nimport {\n Area,\n AreaChart,\n CartesianGrid,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from \"recharts\";\nimport { ILinearGraphConfiguration } from \"./types\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\nimport LineChartTooltip from \"./tooltips/LineChartTooltip\";\n\ninterface ILinearGraphWidget {\n classes: any;\n title: string;\n linearConfiguration: ILinearGraphConfiguration[];\n data: object[];\n hideYAxis?: boolean;\n yAxisFormatter?: (item: string) => string;\n xAxisFormatter?: (item: string) => string;\n panelWidth?: number;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n containerElements: {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"calc(100% - 18px)\",\n },\n chartCont: {\n position: \"relative\",\n flexGrow: 1,\n minHeight: \"65%\",\n height: 1,\n },\n legendChart: {\n display: \"flex\",\n flexWrap: \"wrap\",\n flex: \"0 1 auto\",\n maxHeight: \"35%\",\n margin: 0,\n overflowY: \"auto\",\n position: \"relative\",\n textAlign: \"center\",\n },\n });\n\nconst LinearGraphWidget = ({\n classes,\n title,\n linearConfiguration,\n data,\n hideYAxis = false,\n yAxisFormatter = (item: string) => item,\n xAxisFormatter = (item: string) => item,\n panelWidth = 0,\n}: ILinearGraphWidget) => {\n let intervalCount = 5;\n\n if (panelWidth !== 0) {\n if (panelWidth > 400) {\n intervalCount = 5;\n } else if (panelWidth > 350) {\n intervalCount = 10;\n } else if (panelWidth > 300) {\n intervalCount = 15;\n } else if (panelWidth > 250) {\n intervalCount = 20;\n } else {\n intervalCount = 30;\n }\n }\n return (\n
\n
{title}
\n
\n
\n \n \n \n xAxisFormatter(value)}\n interval={intervalCount}\n tick={{ fontSize: \"70%\" }}\n tickCount={10}\n />\n dataMax * 4]}\n hide={hideYAxis}\n tickFormatter={(value: any) => yAxisFormatter(value)}\n tick={{ fontSize: \"70%\" }}\n />\n {linearConfiguration.map((section, index) => {\n return (\n \n );\n })}\n \n }\n wrapperStyle={{\n zIndex: 5000,\n }}\n />\n \n \n
\n
\n {linearConfiguration.map((section, index) => {\n return (\n \n \n
{section.keyLabel}
\n
\n );\n })}\n
\n
\n \n );\n};\n\nexport default withStyles(styles)(LinearGraphWidget);\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 from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { tooltipCommon } from \"../../../../Common/FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...tooltipCommon,\n });\n\nconst BarChartTooltip = ({\n active,\n payload,\n label,\n barChartConfiguration,\n classes,\n}: any) => {\n if (active) {\n return (\n
\n
{label}
\n {payload &&\n payload.map((pl: any, index: number) => {\n return (\n \n \n
\n {pl.value}\n
\n
\n );\n })}\n \n );\n }\n\n return null;\n};\n\nexport default withStyles(styles)(BarChartTooltip);\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 from \"react\";\nimport {\n Bar,\n BarChart,\n ResponsiveContainer,\n XAxis,\n YAxis,\n Tooltip,\n} from \"recharts\";\nimport { IBarChartConfiguration } from \"./types\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\nimport BarChartTooltip from \"./tooltips/BarChartTooltip\";\n\ninterface IBarChartWidget {\n classes: any;\n title: string;\n barChartConfiguration: IBarChartConfiguration[];\n data: object[];\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n });\n\nconst CustomizedAxisTick = ({ x, y, payload }: any) => {\n return (\n \n {payload.value}\n \n );\n};\n\nconst BarChartWidget = ({\n classes,\n title,\n barChartConfiguration,\n data,\n}: IBarChartWidget) => {\n return (\n
\n
{title}
\n
\n \n \n \n }\n tickLine={false}\n axisLine={false}\n width={150}\n />\n {barChartConfiguration.map((bar) => (\n \n ))}\n \n }\n />\n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(BarChartWidget);\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 from \"react\";\nimport get from \"lodash/get\";\nimport { Cell, Pie, PieChart, ResponsiveContainer } from \"recharts\";\nimport { IPieChartConfiguration } from \"./types\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\n\ninterface IPieChartWidget {\n classes: any;\n title: string;\n pieChartConfiguration: IPieChartConfiguration;\n dataInner: object[];\n dataOuter?: object[];\n middleLabel?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n });\n\nconst PieChartWidget = ({\n classes,\n title,\n pieChartConfiguration,\n dataInner,\n dataOuter,\n middleLabel = \"\",\n}: IPieChartWidget) => {\n const innerColors = get(pieChartConfiguration, \"innerChart.colorList\", []);\n const outerColors = get(pieChartConfiguration, \"outerChart.colorList\", []);\n\n return (\n
\n
{title}
\n
\n \n \n {dataOuter && (\n \n {dataOuter.map((entry, index) => (\n \n ))}\n \n )}\n {dataInner && (\n \n {dataInner.map((entry, index) => {\n return (\n \n );\n })}\n \n )}\n {middleLabel && (\n \n {middleLabel}\n \n )}\n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(PieChartWidget);\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 from \"react\";\nimport { Area, AreaChart, ResponsiveContainer, YAxis } from \"recharts\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { widgetCommon } from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { IDataSRep } from \"./types\";\n\ninterface ISingleRepWidget {\n classes: any;\n title: string;\n data: IDataSRep[];\n color: string;\n fillColor: string;\n label: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...widgetCommon,\n });\n\nconst SingleRepWidget = ({\n classes,\n title,\n data,\n color,\n fillColor,\n label,\n}: ISingleRepWidget) => {\n return (\n
\n
{title}
\n
\n \n \n dataMax * 2]} hide={true} />\n \n \n {label}\n \n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(SingleRepWidget);\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 from \"react\";\nimport MomentUtils from \"@date-io/moment\";\nimport { DateTimePicker, MuiPickersUtilsProvider } from \"@material-ui/pickers\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport ScheduleIcon from \"@material-ui/icons/Schedule\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\n\ninterface IDateTimePicker {\n value: any;\n onChange: (value: any) => any;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n dateSelectorOverride: {\n height: 40,\n border: \"#EAEDEE 1px solid\",\n marginLeft: 15,\n backgroundColor: \"#fff\",\n padding: \"0 16px\",\n borderRadius: 5,\n \"&.MuiInput-underline:hover:not(.Mui-disabled):before\": {\n borderBottom: 0,\n },\n \"&:hover\": {\n borderColor: \"#000\",\n \"&:before, &:after\": {\n borderColor: \"transparent\",\n borderBottom: 0,\n },\n },\n \"&:before, &:after\": {\n borderColor: \"transparent\",\n borderBottom: 0,\n },\n \"& input\": {\n fontSize: 12,\n fontWeight: 600,\n color: \"#393939\",\n },\n },\n parentDateOverride: {\n flexGrow: 1,\n },\n });\n\nconst DateTimePickerWrapper = ({\n value,\n onChange,\n classes,\n}: IDateTimePicker) => {\n return (\n \n \n \n \n ),\n className: classes.dateSelectorOverride,\n }}\n label=\"\"\n ampm={false}\n variant={\"inline\"}\n className={classes.parentDateOverride}\n format=\"MMMM Do YYYY, h:mm a\"\n />\n \n );\n};\n\nexport default withStyles(styles)(DateTimePickerWrapper);\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst SyncIcon = () => {\n return (\n \n \n \n \n \n );\n};\n\nexport default SyncIcon;\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, { useEffect, useState, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport ReactGridLayout from \"react-grid-layout\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button } from \"@material-ui/core\";\nimport {\n actionsTray,\n containerForHeader,\n} from \"../../Common/FormComponents/common/styleLibrary\";\n\nimport { AutoSizer } from \"react-virtualized\";\nimport {\n IBarChartConfiguration,\n IDataSRep,\n ILinearGraphConfiguration,\n IPieChartConfiguration,\n} from \"./Widgets/types\";\nimport { IDashboardPanel, widgetType } from \"./types\";\nimport {\n getDashboardDistribution,\n getWidgetsWithValue,\n panelsConfiguration,\n saveDashboardDistribution,\n} from \"./utils\";\n\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport SingleValueWidget from \"./Widgets/SingleValueWidget\";\nimport LinearGraphWidget from \"./Widgets/LinearGraphWidget\";\nimport BarChartWidget from \"./Widgets/BarChartWidget\";\nimport PieChartWidget from \"./Widgets/PieChartWidget\";\nimport SingleRepWidget from \"./Widgets/SingleRepWidget\";\nimport DateTimePickerWrapper from \"../../Common/FormComponents/DateTimePickerWrapper/DateTimePickerWrapper\";\nimport api from \"../../../../common/api\";\nimport SyncIcon from \"../../../../icons/SyncIcon\";\n\ninterface IPrDashboard {\n classes: any;\n displayErrorMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...actionsTray,\n ...containerForHeader(theme.spacing(4)),\n widgetsContainer: {\n height: \"calc(100vh - 250px)\",\n paddingBottom: 235,\n },\n syncButton: {\n \"&.MuiButton-root .MuiButton-iconSizeMedium > *:first-child\": {\n fontSize: 18,\n },\n },\n actionsTray: {\n ...actionsTray.actionsTray,\n padding: \"0 10px\",\n },\n });\n\nconst PrDashboard = ({ classes, displayErrorMessage }: IPrDashboard) => {\n const [timeStart, setTimeStart] = useState(null);\n const [timeEnd, setTimeEnd] = useState(null);\n const [loading, setLoading] = useState(true);\n const [panelInformation, setPanelInformation] = useState(\n panelsConfiguration\n );\n\n const minHeight = 600;\n const colsInGrid = 8;\n const xSpacing = 10;\n const ySpacing = 10;\n\n const dashboardDistr = getDashboardDistribution(panelInformation.length);\n\n const autoSizerStyleProp = {\n width: \"100%\",\n height: \"auto\",\n paddingBottom: 45,\n };\n\n const panels = useCallback(\n (width: number) => {\n const singlePanelWidth = width / colsInGrid + xSpacing / 2;\n\n const componentToUse = (value: IDashboardPanel, index: number) => {\n switch (value.type) {\n case widgetType.singleValue:\n return (\n \n );\n case widgetType.pieChart:\n return (\n \n );\n case widgetType.linearGraph:\n return (\n \n );\n case widgetType.barChart:\n return (\n \n );\n case widgetType.singleRep:\n const fillColor = value.fillColor ? value.fillColor : value.color;\n return (\n \n );\n default:\n return null;\n }\n };\n\n return panelInformation.map((val, index) => {\n return (\n
{componentToUse(val, index)}
\n );\n });\n },\n [panelInformation, dashboardDistr]\n );\n\n const fetchUsage = useCallback(() => {\n let stepCalc = 0;\n\n if (timeStart !== null && timeEnd !== null) {\n const secondsInPeriod = timeEnd.unix() - timeStart.unix();\n const periods = Math.floor(secondsInPeriod / 60);\n\n stepCalc = periods < 1 ? 15 : periods;\n }\n\n api\n .invoke(\n \"GET\",\n `/api/v1/admin/info?step=${stepCalc}&${\n timeStart !== null ? `&start=${timeStart.unix()}` : \"\"\n }${timeStart !== null && timeEnd !== null ? \"&\" : \"\"}${\n timeEnd !== null ? `end=${timeEnd.unix()}` : \"\"\n }`\n )\n .then((res: any) => {\n if (res.widgets) {\n const widgetsWithValue = getWidgetsWithValue(res.widgets);\n setPanelInformation(widgetsWithValue);\n } else {\n displayErrorMessage(\n \"Widget information could not be retrieved at this time. Please try again\"\n );\n }\n\n setLoading(false);\n })\n .catch((err) => {\n displayErrorMessage(err);\n setLoading(false);\n });\n }, [timeStart, timeEnd, displayErrorMessage]);\n\n const triggerLoad = () => {\n setLoading(true);\n };\n\n useEffect(() => {\n if (loading) {\n fetchUsage();\n }\n }, [loading, fetchUsage]);\n\n return (\n \n \n Start Time\n \n End Time\n \n }\n className={classes.syncButton}\n >\n Sync\n \n \n \n \n {({ width, height }: any) => {\n let hpanel = height < minHeight ? minHeight : height;\n if (hpanel > 380) {\n hpanel = 480;\n }\n const totalWidth = width > 1920 ? 1920 : width;\n return (\n \n {panels(width)}\n \n );\n }}\n \n \n
\n );\n};\n\nconst connector = connect(null, {\n displayErrorMessage: setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(PrDashboard));\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst AllBucketsIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default AllBucketsIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst EgressIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default EgressIcon;\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\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport clsx from \"clsx\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { Usage } from \"../types\";\nimport { niceBytes } from \"../../../../common/utils\";\nimport { containerForHeader } from \"../../Common/FormComponents/common/styleLibrary\";\nimport AllBucketsIcon from \"../../../../icons/AllBucketsIcon\";\nimport UsageIcon from \"../../../../icons/UsageIcon\";\nimport EgressIcon from \"../../../../icons/EgressIcon\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...containerForHeader(theme.spacing(4)),\n paper: {\n padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n border: \"#eaedee 1px solid\",\n borderRadius: 5,\n boxShadow: \"none\",\n },\n fixedHeight: {\n height: 165,\n minWidth: 247,\n marginRight: 20,\n padding: \"25px 28px\",\n \"& svg\": {\n maxHeight: 18,\n },\n },\n consumptionValue: {\n color: \"#000000\",\n fontSize: \"60px\",\n fontWeight: \"bold\",\n },\n icon: {\n marginRight: 10,\n color: \"#777777\",\n },\n notationContainer: {\n display: \"flex\",\n },\n dashboardBG: {\n width: 390,\n height: 255,\n zIndex: 500,\n position: \"absolute\",\n backgroundSize: \"fill\",\n backgroundImage: \"url(/images/BG_IllustrationDarker.svg)\",\n backgroundPosition: \"right bottom\",\n right: 0,\n bottom: 0,\n backgroundRepeat: \"no-repeat\",\n },\n dashboardContainer: {\n zIndex: 600,\n position: \"absolute\",\n },\n elementTitle: {\n fontWeight: 500,\n color: \"#777777\",\n fontSize: 14,\n marginTop: -9,\n },\n smallUnit: {\n fontSize: 20,\n },\n });\n\ninterface IDashboardProps {\n classes: any;\n usage: Usage | null;\n}\n\nconst BasicDashboard = ({ classes, usage }: IDashboardProps) => {\n const fixedHeightPaper = clsx(classes.paper, classes.fixedHeight);\n\n const prettyUsage = (usage: string | undefined) => {\n if (usage === undefined) {\n return \"0\";\n }\n\n const niceBytesUsage = niceBytes(usage).split(\" \");\n\n if (niceBytesUsage.length !== 2) {\n return niceBytesUsage.join(\" \");\n }\n\n return (\n \n {niceBytesUsage[0]}\n {niceBytesUsage[1]}\n \n );\n };\n\n const prettyNumber = (usage: number | undefined) => {\n if (usage === undefined) {\n return 0;\n }\n\n return usage.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n };\n\n return (\n \n
\n \n \n \n \n \n \n \n \n \n \n All buckets\n \n \n \n \n {usage ? prettyNumber(usage.buckets) : 0}\n \n \n \n \n \n \n \n \n \n Usage\n \n \n \n \n {usage ? prettyUsage(usage.usage + \"\") : 0}\n \n \n \n \n \n \n \n \n \n {\" \"}\n Total Objects\n \n \n \n \n {usage ? prettyNumber(usage.objects) : 0}\n \n \n \n \n \n \n );\n};\n\nexport default withStyles(styles)(BasicDashboard);\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, { useEffect, useState, Fragment, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport PrDashboard from \"./Prometheus/PrDashboard\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport BasicDashboard from \"./BasicDashboard/BasicDashboard\";\nimport { LinearProgress } from \"@material-ui/core\";\nimport api from \"../../../common/api\";\nimport { Usage } from \"./types\";\nimport { setErrorSnackMessage } from \"../../../actions\";\n\ninterface IDashboardSimple {\n classes: any;\n displayErrorMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst Dashboard = ({ classes, displayErrorMessage }: IDashboardSimple) => {\n const [loading, setLoading] = useState(true);\n const [basicResult, setBasicResult] = useState(null);\n\n const fetchUsage = useCallback(() => {\n api\n .invoke(\"GET\", `/api/v1/admin/info`)\n .then((res: Usage) => {\n setBasicResult(res);\n setLoading(false);\n })\n .catch((err) => {\n displayErrorMessage(err);\n setLoading(false);\n });\n }, [setBasicResult, setLoading, displayErrorMessage]);\n\n useEffect(() => {\n if (loading) {\n fetchUsage();\n }\n }, [loading, fetchUsage]);\n\n const widgets = get(basicResult, \"widgets\", null);\n\n return (\n \n \n \n {loading ? (\n \n \n \n ) : (\n \n {widgets !== null ? (\n \n ) : (\n \n )}\n \n )}\n \n \n );\n};\n\nconst connector = connect(null, {\n displayErrorMessage: setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(Dashboard));\n","export default __webpack_public_path__ + \"static/media/minio_console_logo.0837460e.svg\";","export default __webpack_public_path__ + \"static/media/minio_operator_logo.1312b7c9.svg\";","// 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\nexport const menuGroups = [\n { label: \"\", group: \"common\", collapsible: false },\n { label: \"User\", group: \"User\", collapsible: true },\n { label: \"Admin\", group: \"Admin\", collapsible: true },\n { label: \"Tools\", group: \"Tools\", collapsible: true },\n { label: \"Operator\", group: \"Operator\", collapsible: false },\n { label: \"\", group: \"License\", collapsible: false },\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst LicenseIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default LicenseIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst LogoutIcon = () => {\n return (\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default LogoutIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst ConsoleIcon = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default ConsoleIcon;\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\nconst HealIcon = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default HealIcon;\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { NavLink } from \"react-router-dom\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport ListItemIcon from \"@material-ui/core/ListItemIcon\";\nimport DescriptionIcon from \"@material-ui/icons/Description\";\nimport Collapse from \"@material-ui/core/Collapse\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport List from \"@material-ui/core/List\";\nimport { Divider, withStyles } from \"@material-ui/core\";\nimport { createStyles, Theme } from \"@material-ui/core/styles\";\nimport history from \"../../../history\";\nimport logo from \"../../../icons/minio_console_logo.svg\";\nimport operator_logo from \"../../../icons/minio_operator_logo.svg\";\nimport { AppState } from \"../../../store\";\nimport { userLoggedIn } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport { menuGroups } from \"./utils\";\nimport { IMenuProps, IMenuItem } from \"./types\";\nimport {\n BucketsIcon,\n ClustersIcon,\n ConfigurationsListIcon,\n DashboardIcon,\n GroupsIcon,\n IAMPoliciesIcon,\n ServiceAccountsIcon,\n TraceIcon,\n UsersIcon,\n} from \"../../../icons\";\nimport LibraryBooksIcon from \"@material-ui/icons/LibraryBooks\";\nimport { clearSession } from \"../../../common/utils\";\nimport LicenseIcon from \"../../../icons/LicenseIcon\";\nimport LogoutIcon from \"../../../icons/LogoutIcon\";\nimport ConsoleIcon from \"../../../icons/ConsoleIcon\";\nimport HealIcon from \"../../../icons/HealIcon\";\nimport WatchIcon from \"../../../icons/WatchIcon\";\nimport TrackChangesSharpIcon from \"@material-ui/icons/TrackChangesSharp\";\nimport StorageIcon from \"@material-ui/icons/Storage\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n logo: {\n paddingTop: 25,\n marginBottom: 30,\n paddingLeft: 45,\n \"& img\": {\n width: 120,\n },\n },\n menuList: {\n \"& .active\": {\n borderTopLeftRadius: 2,\n borderBottomLeftRadius: 2,\n color: \"#fff\",\n backgroundColor: \"rgba(255, 255, 255, .18)\",\n \"& .MuiSvgIcon-root\": {\n color: \"white\",\n },\n \"& .MuiTypography-root\": {\n color: \"#fff\",\n fontWeight: 700,\n },\n },\n \"& .MuiSvgIcon-root\": {\n fontSize: 16,\n color: \"rgba(255, 255, 255, 0.8)\",\n maxWidth: 14,\n },\n \"& .MuiListItemIcon-root\": {\n minWidth: 25,\n },\n \"& .MuiTypography-root\": {\n fontSize: 12,\n color: \"rgba(255, 255, 255, 0.8)\",\n },\n \"& .MuiListItem-gutters\": {\n paddingRight: 0,\n fontWeight: 300,\n },\n \"& .MuiListItem-root\": {\n padding: \"2px 0 2px 16px\",\n marginBottom: 8,\n marginLeft: 30,\n width: \"calc(100% - 30px)\",\n },\n \"& .MuiCollapse-container .MuiCollapse-wrapper .MuiCollapse-wrapperInner .MuiDivider-root\": {\n backgroundColor: \"rgba(112,112,112,0.5)\",\n marginBottom: 12,\n height: 1,\n },\n },\n extraMargin: {\n \"&.MuiListItem-gutters\": {\n marginLeft: 5,\n },\n },\n groupTitle: {\n color: \"#fff\",\n fontSize: 10,\n textTransform: \"uppercase\",\n fontWeight: 700,\n marginBottom: 3,\n cursor: \"pointer\",\n userSelect: \"none\",\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n subTitleMenu: {\n fontWeight: 700,\n marginLeft: 10,\n \"&.MuiTypography-root\": {\n fontSize: 13,\n color: \"#fff\",\n },\n },\n selectorArrow: {\n marginRight: 20,\n marginTop: 1,\n display: \"inline-block\",\n width: 0,\n height: 0,\n borderStyle: \"solid\",\n borderWidth: \"4px 4px 0 4px\",\n borderColor:\n \"rgba(255, 255, 255, .29) transparent transparent transparent\",\n transform: \"rotateZ(0deg)\",\n transitionDuration: \"0.2s\",\n },\n selectorArrowOpen: {\n transform: \"rotateZ(180deg)\",\n },\n });\n\nconst mapState = (state: AppState) => ({\n open: state.system.loggedIn,\n operatorMode: state.system.operatorMode,\n});\n\nconst connector = connect(mapState, { userLoggedIn });\n\n// Menu State builder for groups\nconst menuStateBuilder = () => {\n let elements: any = [];\n menuGroups.forEach((menuItem) => {\n if (menuItem.collapsible) {\n elements[menuItem.group] = true;\n }\n });\n\n return elements;\n};\n\nconst Menu = ({ userLoggedIn, classes, pages, operatorMode }: IMenuProps) => {\n const [menuOpen, setMenuOpen] = useState(menuStateBuilder());\n\n const logout = () => {\n const deleteSession = () => {\n clearSession();\n userLoggedIn(false);\n localStorage.setItem(\"userLoggedIn\", \"\");\n\n history.push(\"/login\");\n };\n api\n .invoke(\"POST\", `/api/v1/logout`)\n .then(() => {\n deleteSession();\n })\n .catch((err: any) => {\n console.log(err);\n deleteSession();\n });\n };\n\n let menuItems: IMenuItem[] = [\n {\n group: \"common\",\n type: \"item\",\n component: NavLink,\n to: \"/dashboard\",\n name: \"Dashboard\",\n icon: ,\n },\n {\n group: \"User\",\n type: \"item\",\n component: NavLink,\n to: \"/object-browser\",\n name: \"Object Browser\",\n icon: ,\n },\n {\n group: \"User\",\n type: \"item\",\n component: NavLink,\n to: \"/account\",\n name: \"Account\",\n icon: ,\n },\n {\n group: \"Admin\",\n type: \"item\",\n component: NavLink,\n to: \"/buckets\",\n name: \"Buckets\",\n icon: ,\n },\n {\n group: \"Admin\",\n type: \"item\",\n component: NavLink,\n to: \"/users\",\n name: \"Users\",\n icon: ,\n },\n {\n group: \"Admin\",\n type: \"item\",\n component: NavLink,\n to: \"/groups\",\n name: \"Groups\",\n icon: ,\n },\n {\n group: \"Admin\",\n type: \"item\",\n component: NavLink,\n to: \"/policies\",\n name: \"IAM Policies\",\n icon: ,\n },\n {\n group: \"Tools\",\n type: \"item\",\n component: NavLink,\n to: \"/logs\",\n name: \"Logs\",\n icon: ,\n },\n {\n group: \"Tools\",\n type: \"item\",\n component: NavLink,\n to: \"/watch\",\n name: \"Watch\",\n icon: ,\n },\n {\n group: \"Tools\",\n type: \"item\",\n component: NavLink,\n to: \"/trace\",\n name: \"Trace\",\n icon: ,\n },\n {\n group: \"Tools\",\n type: \"item\",\n component: NavLink,\n to: \"/heal\",\n name: \"Heal\",\n icon: ,\n },\n {\n group: \"Tools\",\n type: \"item\",\n component: NavLink,\n to: \"/health-info\",\n name: \"Diagnostic\",\n icon: ,\n },\n {\n group: \"Admin\",\n type: \"item\",\n component: NavLink,\n to: \"/settings\",\n name: \"Settings\",\n icon: ,\n },\n {\n group: \"Operator\",\n type: \"item\",\n component: NavLink,\n to: \"/tenants\",\n name: \"Tenants\",\n icon: ,\n },\n {\n group: \"Operator\",\n type: \"item\",\n component: NavLink,\n to: \"/storage\",\n name: \"Storage\",\n icon: ,\n },\n ];\n\n const allowedPages = pages.reduce((result: any, item: any) => {\n result[item] = true;\n return result;\n }, {});\n\n const documentation: IMenuItem = {\n group: \"License\",\n type: \"item\",\n component: NavLink,\n to: \"/documentation\",\n name: \"Documentation\",\n icon: ,\n forceDisplay: true,\n };\n\n // Append the license page according to the allowedPages\n if (allowedPages.hasOwnProperty(\"/tenants\")) {\n menuItems.push(\n {\n group: \"Operator\",\n type: \"item\",\n component: NavLink,\n to: \"/license\",\n name: \"License\",\n icon: ,\n },\n {\n ...documentation,\n group: \"Operator\",\n onClick: (\n e:\n | React.MouseEvent\n | React.MouseEvent\n | React.MouseEvent\n ) => {\n e.preventDefault();\n window.open(\n `https://docs.min.io/?ref=${operatorMode ? \"op\" : \"con\"}`,\n \"_blank\"\n );\n },\n }\n );\n } else {\n menuItems.push(\n {\n group: \"License\",\n type: \"item\",\n component: NavLink,\n to: \"/license\",\n name: \"License\",\n icon: ,\n },\n {\n ...documentation,\n group: \"License\",\n onClick: (\n e:\n | React.MouseEvent\n | React.MouseEvent\n | React.MouseEvent\n ) => {\n e.preventDefault();\n window.open(\n `https://docs.min.io/?ref=${operatorMode ? \"op\" : \"con\"}`,\n \"_blank\"\n );\n },\n }\n );\n }\n\n const allowedItems = menuItems.filter(\n (item: any) =>\n allowedPages[item.to] || item.forceDisplay || item.type !== \"item\"\n );\n\n const setMenuCollapse = (menuClicked: string) => {\n let newMenu: any = { ...menuOpen };\n\n newMenu[menuClicked] = !newMenu[menuClicked];\n\n setMenuOpen(newMenu);\n };\n\n return (\n \n
\n \"logo\"\n
\n \n {menuGroups.map((groupMember, index) => {\n const filterByGroup = (allowedItems || []).filter(\n (item: any) => item.group === groupMember.group\n );\n\n const countableElements = filterByGroup.filter(\n (menuItem: any) => menuItem.type !== \"title\"\n );\n\n if (countableElements.length === 0) {\n return null;\n }\n\n return (\n \n {groupMember.label !== \"\" && (\n {\n if (groupMember.collapsible) {\n setMenuCollapse(groupMember.group);\n }\n }}\n >\n {groupMember.label}\n {groupMember.collapsible && (\n \n )}\n \n )}\n \n {filterByGroup.map((page: IMenuItem) => {\n switch (page.type) {\n case \"item\": {\n return (\n \n {page.icon && (\n {page.icon}\n )}\n {page.name && }\n \n );\n }\n case \"title\": {\n return (\n \n {page.name}\n \n );\n }\n default:\n return null;\n }\n })}\n \n \n \n );\n })}\n\n \n \n \n \n \n \n \n
\n );\n};\n\nexport default connector(withStyles(styles)(Menu));\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, { useEffect, useState } from \"react\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport api from \"../../../common/api\";\nimport { NewServiceAccount } from \"../Common/CredentialsPrompt/types\";\nimport CodeMirrorWrapper from \"../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport { connect } from \"react-redux\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n jsonPolicyEditor: {\n minHeight: 400,\n width: \"100%\",\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n infoDetails: {\n color: \"#393939\",\n fontSize: 12,\n fontStyle: \"italic\",\n marginBottom: \"8px\",\n },\n containerScrollable: {\n maxHeight: \"calc(100vh - 300px)\" as const,\n overflowY: \"auto\" as const,\n },\n ...modalBasic,\n });\n\ninterface IAddServiceAccountProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (res: NewServiceAccount | null) => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst AddServiceAccount = ({\n classes,\n open,\n closeModalAndRefresh,\n setModalErrorSnackMessage,\n}: IAddServiceAccountProps) => {\n const [addSending, setAddSending] = useState(false);\n const [policyDefinition, setPolicyDefinition] = useState(\"\");\n const [isRestrictedByPolicy, setIsRestrictedByPolicy] =\n useState(false);\n\n useEffect(() => {\n if (addSending) {\n api\n .invoke(\"POST\", \"/api/v1/service-accounts\", {\n policy: policyDefinition,\n })\n .then((res) => {\n setAddSending(false);\n closeModalAndRefresh(res);\n })\n .catch((err) => {\n setAddSending(false);\n setModalErrorSnackMessage(err);\n });\n }\n }, [\n addSending,\n setAddSending,\n setModalErrorSnackMessage,\n policyDefinition,\n closeModalAndRefresh,\n ]);\n\n const addServiceAccount = (e: React.FormEvent) => {\n e.preventDefault();\n setAddSending(true);\n };\n\n const resetForm = () => {\n setPolicyDefinition(\"\");\n };\n\n return (\n {\n closeModalAndRefresh(null);\n }}\n title={`Create Service Account`}\n >\n ) => {\n addServiceAccount(e);\n }}\n >\n \n \n
\n Service Accounts inherit the policy explicitly attached to the\n parent user and the policy attached to each group in which the\n parent user has membership. You can specify an optional\n JSON-formatted policy below to restrict the Service Account access\n to a subset of actions and resources explicitly allowed for the\n parent user. You cannot modify the Service Account optional policy\n after saving.\n
\n
\n \n ) => {\n setIsRestrictedByPolicy(event.target.checked);\n }}\n label={\"Restrict with policy\"}\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n {isRestrictedByPolicy && (\n \n {\n setPolicyDefinition(value);\n }}\n />\n \n )}\n
\n \n \n \n Clear\n \n \n Create\n \n \n {addSending && (\n \n \n \n )}\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddServiceAccount));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n wrapText: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n });\n\ninterface IDeleteServiceAccountProps {\n classes: any;\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedServiceAccount: string | null;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteServiceAccount = ({\n classes,\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedServiceAccount,\n setErrorSnackMessage,\n}: IDeleteServiceAccountProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n\n useEffect(() => {\n if (deleteLoading) {\n api\n .invoke(\"DELETE\", `/api/v1/service-accounts/${selectedServiceAccount}`)\n .then(() => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n }\n }, [\n deleteLoading,\n closeDeleteModalAndRefresh,\n selectedServiceAccount,\n setErrorSnackMessage,\n ]);\n\n const removeRecord = () => {\n if (selectedServiceAccount == null) {\n return;\n }\n\n setDeleteLoading(true);\n };\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete ServiceAccount\n \n {deleteLoading && }\n \n Are you sure you want to delete service account{\" \"}\n {selectedServiceAccount}?\n \n \n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(DeleteServiceAccount));\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 from \"react\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { NewServiceAccount } from \"./types\";\nimport { Button } from \"@material-ui/core\";\nimport Typography from \"@material-ui/core/Typography\";\nimport ModalWrapper from \"../ModalWrapper/ModalWrapper\";\nimport Grid from \"@material-ui/core/Grid\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n warningBlock: {\n color: \"red\",\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n credentialsPanel: {\n overflowY: \"auto\",\n maxHeight: 350,\n },\n });\n\ninterface ICredentialsPromptProps {\n classes: any;\n newServiceAccount: NewServiceAccount | null;\n open: boolean;\n entity: string;\n closeModal: () => void;\n}\n\nconst download = (filename: string, text: string) => {\n let element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:text/plain;charset=utf-8,\" + encodeURIComponent(text)\n );\n element.setAttribute(\"download\", filename);\n\n element.style.display = \"none\";\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n};\n\nconst CredentialsPrompt = ({\n classes,\n newServiceAccount,\n open,\n closeModal,\n entity,\n}: ICredentialsPromptProps) => {\n if (!newServiceAccount) {\n return null;\n }\n\n const consoleCreds = get(newServiceAccount, \"console\", null);\n\n return (\n {\n closeModal();\n }}\n title={`New ${entity} Created`}\n >\n \n \n \n A new {entity} has been created with the following details:\n {consoleCreds && (\n \n \n Console Credentials\n {Array.isArray(consoleCreds) &&\n consoleCreds.map((credentialsPair, index) => {\n return (\n
    \n
  • \n Access Key: {credentialsPair.accessKey}\n
  • \n
  • \n Secret Key: {credentialsPair.secretKey}\n
  • \n
\n );\n })}\n {!Array.isArray(consoleCreds) && (\n
    \n
  • \n Access Key: {consoleCreds.accessKey}\n
  • \n
  • \n Secret Key: {consoleCreds.secretKey}\n
  • \n
\n )}\n
\n
\n )}\n \n Write these down, as this is the only time the secret will be\n displayed.\n \n
\n \n {\n let consoleExtras = {};\n\n if (consoleCreds) {\n if (!Array.isArray(consoleCreds)) {\n consoleExtras = {\n console: [\n {\n access_key: consoleCreds.accessKey,\n secret_key: consoleCreds.secretKey,\n },\n ],\n };\n } else {\n const cCreds = consoleCreds.map((itemMap) => {\n return {\n access_key: itemMap.accessKey,\n secret_key: itemMap.secretKey,\n };\n });\n\n consoleExtras = {\n console: [...cCreds],\n };\n }\n }\n\n download(\n \"credentials.json\",\n JSON.stringify({\n ...consoleExtras,\n })\n );\n }}\n color=\"primary\"\n >\n Download\n \n {\n closeModal();\n }}\n color=\"secondary\"\n autoFocus\n >\n Done\n \n \n
\n
\n \n );\n};\n\nexport default withStyles(styles)(CredentialsPrompt);\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\ninterface userInterface {\n accessKey: string;\n}\n\ninterface policyInterface {\n name: string;\n}\n\nexport const usersSort = (a: userInterface, b: userInterface) => {\n if (a.accessKey > b.accessKey) {\n return 1;\n }\n if (a.accessKey < b.accessKey) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policySort = (a: policyInterface, b: policyInterface) => {\n if (a.name > b.name) {\n return 1;\n }\n if (a.name < b.name) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const stringSort = (a: string, b: string) => {\n if (a > b) {\n return 1;\n }\n if (a < b) {\n return -1;\n }\n // a must be equal to b\n return 0;\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport {\n actionsTray,\n containerForHeader,\n modalBasic,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { ChangePasswordRequest } from \"../Buckets/types\";\nimport api from \"../../../common/api\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...actionsTray,\n ...modalBasic,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IChangePasswordProps {\n classes: any;\n open: boolean;\n closeModal: () => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst ChangePassword = ({\n classes,\n open,\n closeModal,\n setModalErrorSnackMessage,\n}: IChangePasswordProps) => {\n const [currentPassword, setCurrentPassword] = useState(\"\");\n const [newPassword, setNewPassword] = useState(\"\");\n const [reNewPassword, setReNewPassword] = useState(\"\");\n const [loading, setLoading] = useState(false);\n\n const changePassword = (event: React.FormEvent) => {\n event.preventDefault();\n\n if (newPassword !== reNewPassword) {\n setModalErrorSnackMessage(\"New passwords don't match\");\n return;\n }\n\n if (loading) {\n return;\n }\n setLoading(true);\n\n let request: ChangePasswordRequest = {\n current_secret_key: currentPassword,\n new_secret_key: newPassword,\n };\n\n api\n .invoke(\"POST\", \"/api/v1/account/change-password\", request)\n .then((res) => {\n setLoading(false);\n setNewPassword(\"\");\n setReNewPassword(\"\");\n setCurrentPassword(\"\");\n closeModal();\n })\n .catch((err) => {\n setLoading(false);\n setNewPassword(\"\");\n setReNewPassword(\"\");\n setCurrentPassword(\"\");\n setModalErrorSnackMessage(err);\n });\n };\n\n return open ? (\n {\n setNewPassword(\"\");\n setReNewPassword(\"\");\n setCurrentPassword(\"\");\n closeModal();\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n ) => {\n changePassword(e);\n }}\n >\n \n \n \n ) => {\n setCurrentPassword(event.target.value);\n }}\n label=\"Current Password\"\n type=\"password\"\n value={currentPassword}\n />\n \n \n ) => {\n setNewPassword(event.target.value);\n }}\n label=\"New Password\"\n type=\"password\"\n value={newPassword}\n />\n \n \n ) => {\n setReNewPassword(event.target.value);\n }}\n label=\"Type New Password Again\"\n type=\"password\"\n value={reNewPassword}\n />\n \n \n \n 0 &&\n newPassword.length > 0 &&\n reNewPassword.length > 0\n )\n }\n >\n Save\n \n \n {loading && (\n \n \n \n )}\n \n \n \n ) : null;\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ChangePassword));\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, { useState, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport api from \"../../../common/api\";\nimport { Button } from \"@material-ui/core\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { NewServiceAccount } from \"../Common/CredentialsPrompt/types\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport AddServiceAccount from \"./AddServiceAccount\";\nimport DeleteServiceAccount from \"./DeleteServiceAccount\";\nimport CredentialsPrompt from \"../Common/CredentialsPrompt/CredentialsPrompt\";\nimport { CreateIcon } from \"../../../icons\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport { stringSort } from \"../../../utils/sortFunctions\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport Divider from \"@material-ui/core/Divider\";\nimport LockIcon from \"@material-ui/icons/Lock\";\nimport ChangePasswordModal from \"./ChangePasswordModal\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n addSideBar: {\n width: \"480px\",\n minWidth: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n imageIcon: {\n height: \"100%\",\n },\n iconRoot: {\n textAlign: \"center\",\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IServiceAccountsProps {\n classes: any;\n displayErrorMessage: typeof setErrorSnackMessage;\n changePassword: boolean;\n}\n\nconst Account = ({\n classes,\n displayErrorMessage,\n changePassword,\n}: IServiceAccountsProps) => {\n const [records, setRecords] = useState([]);\n const [loading, setLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n const [addScreenOpen, setAddScreenOpen] = useState(false);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [selectedServiceAccount, setSelectedServiceAccount] =\n useState(null);\n const [showNewCredentials, setShowNewCredentials] = useState(false);\n const [newServiceAccount, setNewServiceAccount] =\n useState(null);\n const [changePasswordModalOpen, setChangePasswordModalOpen] =\n useState(false);\n\n useEffect(() => {\n fetchRecords();\n }, []);\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\"GET\", `/api/v1/service-accounts`)\n .then((res: string[]) => {\n const serviceAccounts = res.sort(stringSort);\n\n setLoading(false);\n setRecords(serviceAccounts);\n })\n .catch((err) => {\n displayErrorMessage(err);\n setLoading(false);\n });\n }\n }, [loading, setLoading, setRecords, displayErrorMessage]);\n\n const fetchRecords = () => {\n setLoading(true);\n };\n\n const closeAddModalAndRefresh = (res: NewServiceAccount | null) => {\n setAddScreenOpen(false);\n fetchRecords();\n\n if (res !== null) {\n const nsa: NewServiceAccount = {\n console: {\n accessKey: `${res.accessKey}`,\n secretKey: `${res.secretKey}`,\n },\n };\n setNewServiceAccount(nsa);\n setShowNewCredentials(true);\n }\n };\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n\n if (refresh) {\n fetchRecords();\n }\n };\n\n const closeCredentialsModal = () => {\n setShowNewCredentials(false);\n setNewServiceAccount(null);\n };\n\n const confirmDeleteServiceAccount = (selectedServiceAccount: string) => {\n setSelectedServiceAccount(selectedServiceAccount);\n setDeleteOpen(true);\n };\n\n const tableActions = [\n { type: \"delete\", onClick: confirmDeleteServiceAccount },\n ];\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.toLowerCase().includes(filter.toLowerCase())\n );\n\n return (\n \n {addScreenOpen && (\n {\n closeAddModalAndRefresh(res);\n }}\n />\n )}\n {deleteOpen && (\n {\n closeDeleteModalAndRefresh(refresh);\n }}\n />\n )}\n {showNewCredentials && (\n {\n closeCredentialsModal();\n }}\n entity=\"Service Account\"\n />\n )}\n \n \n \n {changePassword && (\n \n \n \n Settings\n \n \n \n
\n
\n \n setChangePasswordModalOpen(false)}\n />\n }\n onClick={() => setChangePasswordModalOpen(true)}\n >\n Change Password\n \n \n \n
\n \n
\n
\n
\n )}\n \n \n Service Accounts\n \n \n \n
\n
\n \n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n }\n onClick={() => {\n setAddScreenOpen(true);\n setSelectedServiceAccount(null);\n }}\n >\n Create service account\n \n \n \n
\n
\n \n \n \n
\n
\n
\n );\n};\n\nconst connector = connect(null, {\n displayErrorMessage: setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(Account));\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\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { LinearProgress } from \"@material-ui/core\";\nimport get from \"lodash/get\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport TextField from \"@material-ui/core/TextField\";\n\nimport { stringSort } from \"../../../utils/sortFunctions\";\nimport { GroupsList } from \"../Groups/types\";\nimport {\n actionsTray,\n selectorsCommon,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\n\ninterface IGroupsProps {\n classes: any;\n selectedGroups: string[];\n setSelectedGroups: any;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n paddingTop: 15,\n boxShadow: \"none\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n noFound: {\n textAlign: \"center\",\n padding: \"10px 0\",\n },\n tableContainer: {\n maxHeight: 200,\n },\n stickyHeader: {\n backgroundColor: \"#fff\",\n },\n actionsTitle: {\n fontWeight: 600,\n color: \"#000\",\n fontSize: 16,\n alignSelf: \"center\",\n },\n tableBlock: {\n marginTop: 15,\n },\n filterField: {\n width: 375,\n fontWeight: 600,\n \"& .input\": {\n \"&::placeholder\": {\n fontWeight: 600,\n color: \"#000\",\n },\n },\n },\n ...actionsTray,\n ...selectorsCommon,\n });\n\nconst GroupsSelectors = ({\n classes,\n selectedGroups,\n setSelectedGroups,\n setModalErrorSnackMessage,\n}: IGroupsProps) => {\n // Local State\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const fetchGroups = useCallback(() => {\n api\n .invoke(\"GET\", `/api/v1/groups`)\n .then((res: GroupsList) => {\n let groups = get(res, \"groups\", []);\n\n if (!groups) {\n groups = [];\n }\n setRecords(groups.sort(stringSort));\n isLoading(false);\n })\n .catch((err) => {\n setModalErrorSnackMessage(err);\n isLoading(false);\n });\n }, [setModalErrorSnackMessage]);\n\n //Effects\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n fetchGroups();\n }\n }, [loading, fetchGroups]);\n\n const selGroups = !selectedGroups ? [] : selectedGroups;\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[] = [...selGroups]; // We clone the selectedGroups array\n\n if (checked) {\n // If the user has checked this field we need to push this to selectedGroupsList\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 setSelectedGroups(elements);\n\n return elements;\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.includes(filter)\n );\n\n return (\n \n \n \n {loading && }\n {records != null && records.length > 0 ? (\n \n \n Assign Groups\n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n \n \n \n \n \n ) : (\n
No Groups Available
\n )}\n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(GroupsSelectors));\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\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport { User } from \"./types\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport GroupsSelectors from \"./GroupsSelectors\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport PredefinedList from \"../Common/FormComponents/PredefinedList/PredefinedList\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface IAddUserContentProps {\n classes: any;\n closeModalAndRefresh: () => void;\n selectedUser: User | null;\n open: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst AddUser = ({\n classes,\n closeModalAndRefresh,\n selectedUser,\n open,\n setModalErrorSnackMessage,\n}: IAddUserContentProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n const [enabled, setEnabled] = useState(false);\n const [selectedGroups, setSelectedGroups] = useState([]);\n const [currentGroups, setCurrentGroups] = useState([]);\n\n const getUserInformation = useCallback(() => {\n if (!selectedUser) {\n return null;\n }\n\n api\n .invoke(\"GET\", `/api/v1/users/${selectedUser.accessKey}`)\n .then((res) => {\n setAddLoading(false);\n setAccessKey(res.accessKey);\n setSelectedGroups(res.memberOf || []);\n setCurrentGroups(res.memberOf || []);\n setEnabled(res.status === \"enabled\");\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n }, [selectedUser, setModalErrorSnackMessage]);\n\n useEffect(() => {\n if (selectedUser == null) {\n setAccessKey(\"\");\n setSecretKey(\"\");\n setSelectedGroups([]);\n } else {\n getUserInformation();\n }\n }, [selectedUser, getUserInformation]);\n\n const saveRecord = (event: React.FormEvent) => {\n event.preventDefault();\n\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n if (selectedUser !== null) {\n api\n .invoke(\"PUT\", `/api/v1/users/${selectedUser.accessKey}`, {\n status: enabled ? \"enabled\" : \"disabled\",\n groups: selectedGroups,\n })\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n api\n .invoke(\"POST\", \"/api/v1/users\", {\n accessKey,\n secretKey,\n groups: selectedGroups,\n })\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n }\n };\n\n const resetForm = () => {\n if (selectedUser !== null) {\n setSelectedGroups([]);\n return;\n }\n setAccessKey(\"\");\n setSecretKey(\"\");\n setSelectedGroups([]);\n };\n\n const sendEnabled =\n accessKey.trim() !== \"\" &&\n ((secretKey.trim() !== \"\" && selectedUser === null) ||\n selectedUser !== null);\n return (\n {\n closeModalAndRefresh();\n }}\n modalOpen={open}\n title={selectedUser !== null ? \"Edit User\" : \"Create User\"}\n >\n {selectedUser !== null && (\n
\n {\n setEnabled(e.target.checked);\n }}\n switchOnly\n />\n
\n )}\n\n \n ) => {\n saveRecord(e);\n }}\n >\n \n \n ) => {\n setAccessKey(e.target.value);\n }}\n disabled={selectedUser !== null}\n />\n\n {selectedUser !== null ? (\n \n ) : (\n ) => {\n setSecretKey(e.target.value);\n }}\n autoComplete=\"current-password\"\n />\n )}\n \n {\n setSelectedGroups(elements);\n }}\n />\n \n \n \n {\n resetForm();\n }}\n >\n Clear\n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddUser));\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport api from \"../../../common/api\";\nimport { User, UsersList } from \"./types\";\nimport { setErrorSnackMessage } from \"../../../actions\";\n\ninterface IDeleteUserProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedUser: User | null;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteUser = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedUser,\n setErrorSnackMessage,\n}: IDeleteUserProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n\n const removeRecord = () => {\n if (deleteLoading) {\n return;\n }\n if (selectedUser == null) {\n return;\n }\n setDeleteLoading(true);\n api\n .invoke(\"DELETE\", `/api/v1/users/${selectedUser.accessKey}`, {\n id: selectedUser.id,\n })\n .then((res: UsersList) => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n };\n\n if (selectedUser === null) {\n return
;\n }\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete User\n \n {deleteLoading && }\n \n Are you sure you want to delete user {selectedUser.accessKey}?\n \n \n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n {\n removeRecord();\n }}\n color=\"secondary\"\n autoFocus\n >\n Delete\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(DeleteUser);\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport GroupsSelectors from \"./GroupsSelectors\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport PredefinedList from \"../Common/FormComponents/PredefinedList/PredefinedList\";\n\ninterface IAddToGroup {\n open: boolean;\n checkedUsers: any;\n closeModalAndRefresh: any;\n classes: any;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\nconst BulkAddToGroup = ({\n open,\n checkedUsers,\n closeModalAndRefresh,\n classes,\n setModalErrorSnackMessage,\n}: IAddToGroup) => {\n //Local States\n const [saving, isSaving] = useState(false);\n const [accepted, setAccepted] = useState(false);\n const [selectedGroups, setSelectedGroups] = useState([]);\n\n //Effects\n useEffect(() => {\n if (saving) {\n if (selectedGroups.length > 0) {\n api\n .invoke(\"PUT\", \"/api/v1/users-groups-bulk\", {\n groups: selectedGroups,\n users: checkedUsers,\n })\n .then(() => {\n isSaving(false);\n setAccepted(true);\n })\n .catch((err) => {\n isSaving(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n isSaving(false);\n setModalErrorSnackMessage(\n \"You need to select at least one group to assign\"\n );\n }\n }\n }, [\n saving,\n isSaving,\n closeModalAndRefresh,\n selectedGroups,\n checkedUsers,\n setModalErrorSnackMessage,\n ]);\n\n //Fetch Actions\n const setSaving = (event: React.FormEvent) => {\n event.preventDefault();\n\n isSaving(true);\n };\n\n const resetForm = () => {\n setSelectedGroups([]);\n };\n\n return (\n {\n closeModalAndRefresh(accepted);\n }}\n title={\n accepted\n ? \"The selected users were added to the following groups.\"\n : \"Add Users to Group\"\n }\n >\n {accepted ? (\n \n \n \n \n \n
\n
\n
\n
\n ) : (\n
\n \n \n \n \n
\n
\n \n \n \n
\n \n \n Clear\n \n \n Save\n \n \n {saving && (\n \n \n \n )}\n
\n
\n )}\n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(BulkAddToGroup));\n","// This file is part of MinIO Kubernetes Cloud\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\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { LinearProgress } from \"@material-ui/core\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport TextField from \"@material-ui/core/TextField\";\nimport { policySort } from \"../../../utils/sortFunctions\";\nimport {\n actionsTray,\n selectorsCommon,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { PolicyList } from \"./types\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\n\ninterface ISelectPolicyProps {\n classes: any;\n selectedPolicy?: string[];\n setSelectedPolicy: any;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n paddingTop: 15,\n boxShadow: \"none\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n noFound: {\n textAlign: \"center\",\n padding: \"10px 0\",\n },\n tableContainer: {\n maxHeight: 200,\n },\n stickyHeader: {\n backgroundColor: \"#fff\",\n },\n actionsTitle: {\n fontWeight: 600,\n color: \"#000\",\n fontSize: 16,\n alignSelf: \"center\",\n },\n tableBlock: {\n marginTop: 15,\n },\n filterField: {\n width: 375,\n fontWeight: 600,\n \"& .input\": {\n \"&::placeholder\": {\n fontWeight: 600,\n color: \"#000\",\n },\n },\n },\n ...actionsTray,\n ...selectorsCommon,\n });\n\nconst PolicySelectors = ({\n classes,\n selectedPolicy = [],\n setSelectedPolicy,\n setModalErrorSnackMessage,\n}: ISelectPolicyProps) => {\n // Local State\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const fetchPolicies = useCallback(() => {\n isLoading(true);\n\n api\n .invoke(\"GET\", `/api/v1/policies?limit=1000`)\n .then((res: PolicyList) => {\n const policies = res.policies === null ? [] : res.policies;\n isLoading(false);\n setRecords(policies.sort(policySort));\n })\n .catch((err) => {\n isLoading(false);\n setModalErrorSnackMessage(err);\n });\n }, [setModalErrorSnackMessage]);\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[] = [...selectedPolicy]; // 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 setSelectedPolicy(elements);\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.name.includes(filter)\n );\n\n return (\n \n \n \n {loading && }\n {records.length > 0 ? (\n \n \n Assign Policies\n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n \n \n \n \n \n ) : (\n
No Policies Available
\n )}\n
\n
\n
\n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport { User } from \"../Users/types\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport api from \"../../../common/api\";\nimport PolicySelectors from \"./PolicySelectors\";\nimport PredefinedList from \"../Common/FormComponents/PredefinedList/PredefinedList\";\n\ninterface ISetPolicyProps {\n classes: any;\n closeModalAndRefresh: () => void;\n selectedUser: User | null;\n selectedGroup: string | null;\n open: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n buttonContainer: {\n textAlign: \"right\",\n },\n });\n\nconst SetPolicy = ({\n classes,\n closeModalAndRefresh,\n selectedUser,\n selectedGroup,\n setModalErrorSnackMessage,\n open,\n}: ISetPolicyProps) => {\n //Local States\n const [loading, setLoading] = useState(false);\n const [actualPolicy, setActualPolicy] = useState([]);\n const [selectedPolicy, setSelectedPolicy] = useState([]);\n\n const setPolicyAction = () => {\n let entity = \"user\";\n let value = null;\n if (selectedGroup !== null) {\n entity = \"group\";\n value = selectedGroup;\n } else {\n if (selectedUser !== null) {\n value = selectedUser.accessKey;\n }\n }\n\n setLoading(true);\n\n api\n .invoke(\"PUT\", `/api/v1/set-policy/${selectedPolicy}`, {\n entityName: value,\n entityType: entity,\n })\n .then(() => {\n setLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n const fetchGroupInformation = () => {\n if (selectedGroup) {\n api\n .invoke(\"GET\", `/api/v1/groups/${selectedGroup}`)\n .then((res: any) => {\n const groupPolicy: String = get(res, \"policy\", \"\");\n setActualPolicy(groupPolicy.split(\",\"));\n setSelectedPolicy(groupPolicy.split(\",\"));\n })\n .catch((err) => {\n setModalErrorSnackMessage(err);\n setLoading(false);\n });\n }\n };\n\n const resetSelection = () => {\n setSelectedPolicy(actualPolicy);\n };\n\n useEffect(() => {\n if (open) {\n if (selectedGroup !== null) {\n fetchGroupInformation();\n return;\n }\n\n const userPolicy: string[] = get(selectedUser, \"policy\", []);\n setActualPolicy(userPolicy);\n setSelectedPolicy(userPolicy);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, selectedGroup, selectedUser]);\n\n const userName = get(selectedUser, \"accessKey\", \"\");\n\n return (\n {\n closeModalAndRefresh();\n }}\n modalOpen={open}\n title=\"Set Policies\"\n >\n \n \n \n \n \n \n \n \n
\n
\n \n \n Clear\n \n \n Save\n \n \n {loading && (\n \n \n \n )}\n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(SetPolicy));\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\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport api from \"../../../common/api\";\nimport { Button, Grid, InputAdornment, TextField } from \"@material-ui/core\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport GroupIcon from \"@material-ui/icons/Group\";\nimport { User, UsersList } from \"./types\";\nimport { usersSort } from \"../../../utils/sortFunctions\";\nimport { CreateIcon } from \"../../../icons\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport AddUser from \"./AddUser\";\nimport DeleteUser from \"./DeleteUser\";\nimport AddToGroup from \"./BulkAddToGroup\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport SetPolicy from \"../Policies/SetPolicy\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport history from \"../../../history\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n // padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IUsersProps {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst ListUsers = ({ classes, setErrorSnackMessage }: IUsersProps) => {\n const [records, setRecords] = useState([]);\n const [loading, setLoading] = useState(false);\n const [addScreenOpen, setAddScreenOpen] = useState(false);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [selectedUser, setSelectedUser] = useState(null);\n const [addGroupOpen, setAddGroupOpen] = useState(false);\n const [filter, setFilter] = useState(\"\");\n const [checkedUsers, setCheckedUsers] = useState([]);\n const [policyOpen, setPolicyOpen] = useState(false);\n\n const fetchRecords = useCallback(() => {\n setLoading(true);\n api\n .invoke(\"GET\", `/api/v1/users`)\n .then((res: UsersList) => {\n const users = res.users === null ? [] : res.users;\n\n setLoading(false);\n setRecords(users.sort(usersSort));\n })\n .catch((err) => {\n setLoading(false);\n setErrorSnackMessage(err);\n });\n }, [setLoading, setRecords, setErrorSnackMessage]);\n\n const closeAddModalAndRefresh = () => {\n setAddScreenOpen(false);\n fetchRecords();\n };\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n if (refresh) {\n fetchRecords();\n }\n };\n\n const closeAddGroupBulk = (unCheckAll: boolean = false) => {\n setAddGroupOpen(false);\n if (unCheckAll) {\n setCheckedUsers([]);\n }\n };\n\n useEffect(() => {\n fetchRecords();\n }, [fetchRecords]);\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.accessKey.includes(filter)\n );\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[] = [...checkedUsers]; // 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\n setCheckedUsers(elements);\n\n return elements;\n };\n\n const viewAction = (selectionElement: any): void => {\n history.push(`/users/${selectionElement.accessKey}`);\n };\n\n const deleteAction = (selectionElement: any): void => {\n setDeleteOpen(true);\n setSelectedUser(selectionElement);\n };\n\n const userLoggedIn = atob(localStorage.getItem(\"userLoggedIn\") || \"\");\n\n const tableActions = [\n { type: \"view\", onClick: viewAction },\n {\n type: \"delete\",\n onClick: deleteAction,\n disableButtonFunction: (topValue: any) => topValue === userLoggedIn,\n },\n ];\n\n return (\n \n {addScreenOpen && (\n {\n closeAddModalAndRefresh();\n }}\n />\n )}\n {policyOpen && (\n {\n setPolicyOpen(false);\n fetchRecords();\n }}\n />\n )}\n {deleteOpen && (\n {\n closeDeleteModalAndRefresh(refresh);\n }}\n />\n )}\n {addGroupOpen && (\n {\n closeAddGroupBulk(close);\n }}\n />\n )}\n \n \n \n \n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n }\n disabled={checkedUsers.length <= 0}\n onClick={() => {\n if (checkedUsers.length > 0) {\n setAddGroupOpen(true);\n }\n }}\n >\n Add to Group\n \n }\n onClick={() => {\n setAddScreenOpen(true);\n setSelectedUser(null);\n }}\n >\n Create User\n \n \n\n \n
\n
\n \n \n \n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(ListUsers));\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 );\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\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport GroupsSelectors from \"./GroupsSelectors\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface IChangeUserGroupsContentProps {\n classes: any;\n closeModalAndRefresh: () => void;\n selectedUser: string;\n open: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst ChangeUserGroups = ({\n classes,\n closeModalAndRefresh,\n selectedUser,\n open,\n setModalErrorSnackMessage,\n}: IChangeUserGroupsContentProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n const [enabled, setEnabled] = useState(false);\n const [selectedGroups, setSelectedGroups] = useState([]);\n\n const getUserInformation = useCallback(() => {\n if (!selectedUser) {\n return null;\n }\n\n api\n .invoke(\"GET\", `/api/v1/users/${selectedUser}`)\n .then((res) => {\n setAddLoading(false);\n setAccessKey(res.accessKey);\n setSelectedGroups(res.memberOf || []);\n setEnabled(res.status === \"enabled\");\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n }, [selectedUser, setModalErrorSnackMessage]);\n\n useEffect(() => {\n if (selectedUser == null) {\n setAccessKey(\"\");\n setSecretKey(\"\");\n setSelectedGroups([]);\n } else {\n getUserInformation();\n }\n }, [selectedUser, getUserInformation]);\n\n const saveRecord = (event: React.FormEvent) => {\n event.preventDefault();\n\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n if (selectedUser !== null) {\n api\n .invoke(\"PUT\", `/api/v1/users/${selectedUser}`, {\n status: enabled ? \"enabled\" : \"disabled\",\n groups: selectedGroups,\n })\n .then((_) => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n api\n .invoke(\"POST\", \"/api/v1/users\", {\n accessKey,\n secretKey,\n groups: selectedGroups,\n })\n .then((_) => {\n setAddLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n }\n };\n\n const resetForm = () => {\n if (selectedUser !== null) {\n setSelectedGroups([]);\n return;\n }\n setAccessKey(\"\");\n setSecretKey(\"\");\n setSelectedGroups([]);\n };\n\n const sendEnabled =\n accessKey.trim() !== \"\" &&\n ((secretKey.trim() !== \"\" && selectedUser === null) ||\n selectedUser !== null);\n return (\n {\n closeModalAndRefresh();\n }}\n modalOpen={open}\n title={\"Set Groups\"}\n >\n \n ) => {\n saveRecord(e);\n }}\n >\n \n \n \n {\n setSelectedGroups(elements);\n }}\n />\n \n \n \n {\n resetForm();\n }}\n >\n Clear\n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(ChangeUserGroups));\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// 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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport { IPolicyItem } from \"../Users/types\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport api from \"../../../common/api\";\nimport PolicySelectors from \"../Policies/PolicySelectors\";\n\ninterface ISetUserPoliciesProps {\n classes: any;\n closeModalAndRefresh: () => void;\n selectedUser: string;\n currentPolicies: IPolicyItem[];\n open: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n buttonContainer: {\n textAlign: \"right\",\n },\n });\n\nconst SetUserPolicies = ({\n classes,\n closeModalAndRefresh,\n selectedUser,\n currentPolicies,\n setModalErrorSnackMessage,\n open,\n}: ISetUserPoliciesProps) => {\n //Local States\n const [loading, setLoading] = useState(false);\n const [actualPolicy, setActualPolicy] = useState([]);\n const [selectedPolicy, setSelectedPolicy] = useState([]);\n\n const SetUserPoliciesAction = () => {\n let entity = \"user\";\n let value = selectedUser;\n\n setLoading(true);\n\n api\n .invoke(\"PUT\", `/api/v1/set-policy/${selectedPolicy}`, {\n entityName: value,\n entityType: entity,\n })\n .then(() => {\n setLoading(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n setLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n const resetSelection = () => {\n setSelectedPolicy(actualPolicy);\n };\n\n useEffect(() => {\n if (open) {\n const userPolicy: string[] = [];\n for (let pol of currentPolicies) {\n userPolicy.push(pol.policy);\n }\n setActualPolicy(userPolicy);\n setSelectedPolicy(userPolicy);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, selectedUser]);\n\n return (\n {\n closeModalAndRefresh();\n }}\n modalOpen={open}\n title=\"Set Policies\"\n >\n \n \n
\n
\n \n \n Clear\n \n \n Save\n \n \n {loading && (\n \n \n \n )}\n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(SetUserPolicies));\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, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, Grid } from \"@material-ui/core\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { CreateIcon } from \"../../../icons\";\nimport {\n setErrorSnackMessage,\n setModalErrorSnackMessage,\n} from \"../../../actions\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { IPolicyItem } from \"./types\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport Tab from \"@material-ui/core/Tab\";\nimport { TabPanel } from \"../../shared/tabs\";\nimport Paper from \"@material-ui/core/Paper\";\nimport api from \"../../../common/api\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport ChangeUserGroups from \"./ChangeUserGroups\";\nimport SetUserPolicies from \"./SetUserPolicies\";\nimport { Bookmark } from \"@material-ui/icons\";\nimport history from \"../../../history\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n // padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n fixedHeight: {\n height: 165,\n minWidth: 247,\n padding: \"25px 28px\",\n \"& svg\": {\n maxHeight: 18,\n },\n },\n paperContainer: {\n padding: 15,\n paddingLeft: 50,\n display: \"flex\",\n },\n gridContainer: {\n display: \"grid\",\n gridTemplateColumns: \"auto auto\",\n gridGap: 8,\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n \"& div:not(.MuiCircularProgress-root)\": {\n display: \"flex\",\n alignItems: \"center\",\n },\n \"& div:nth-child(odd)\": {\n justifyContent: \"flex-end\",\n fontWeight: 700,\n },\n \"& div:nth-child(2n)\": {\n minWidth: 150,\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IUserDetailsProps {\n classes: any;\n match: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nfunction a11yProps(index: any) {\n return {\n id: `simple-tab-${index}`,\n \"aria-controls\": `simple-tabpanel-${index}`,\n };\n}\n\ninterface IGroupItem {\n group: string;\n}\n\nconst UserDetails = ({ classes, match }: IUserDetailsProps) => {\n const [curTab, setCurTab] = useState(0);\n const [loading, setLoading] = useState(false);\n const [addGroupOpen, setAddGroupOpen] = useState(false);\n const [policyOpen, setPolicyOpen] = useState(false);\n const [addLoading, setAddLoading] = useState(false);\n\n const [enabled, setEnabled] = useState(false);\n const [selectedGroups, setSelectedGroups] = useState([]);\n const [currentGroups, setCurrentGroups] = useState([]);\n const [currentPolicies, setCurrentPolicies] = useState([]);\n\n const userName = match.params[\"userName\"];\n\n const getUserInformation = useCallback(() => {\n if (userName === \"\") {\n return null;\n }\n setLoading(true);\n api\n .invoke(\"GET\", `/api/v1/users/${userName}`)\n .then((res) => {\n setAddLoading(false);\n const memberOf = res.memberOf || [];\n setSelectedGroups(memberOf);\n let currentGroups: IGroupItem[] = [];\n for (let group of memberOf) {\n currentGroups.push({\n group: group,\n });\n }\n setCurrentGroups(currentGroups);\n let currentPolicies: IPolicyItem[] = [];\n for (let policy of res.policy) {\n currentPolicies.push({\n policy: policy,\n });\n }\n setCurrentPolicies(currentPolicies);\n setEnabled(res.status === \"enabled\");\n setLoading(false);\n })\n .catch((err) => {\n setAddLoading(false);\n setLoading(false);\n setModalErrorSnackMessage(err);\n });\n }, [userName]);\n\n const saveRecord = (isEnabled: boolean) => {\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n api\n .invoke(\"PUT\", `/api/v1/users/${userName}`, {\n status: isEnabled ? \"enabled\" : \"disabled\",\n groups: selectedGroups,\n })\n .then((_) => {\n setAddLoading(false);\n })\n .catch((err) => {\n setAddLoading(false);\n setModalErrorSnackMessage(err);\n });\n };\n\n useEffect(() => {\n getUserInformation();\n }, [getUserInformation]);\n\n const userLoggedIn = atob(localStorage.getItem(\"userLoggedIn\") || \"\");\n\n return (\n \n \n {addGroupOpen && (\n {\n setAddGroupOpen(false);\n getUserInformation();\n }}\n />\n )}\n {policyOpen && (\n {\n setPolicyOpen(false);\n getUserInformation();\n }}\n />\n )}\n \n \n \n \n \n \n
\n
Enabled:
\n
\n {\n setEnabled(e.target.checked);\n saveRecord(e.target.checked);\n }}\n switchOnly\n />\n
\n
\n
\n
\n
\n
\n \n
\n
\n \n \n , newValue: number) => {\n setCurTab(newValue);\n }}\n indicatorColor=\"primary\"\n textColor=\"primary\"\n aria-label=\"cluster-tabs\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n \n \n \n \n \n {curTab === 0 && (\n }\n size=\"medium\"\n onClick={() => {\n setAddGroupOpen(true);\n }}\n >\n Add to Groups\n \n )}\n {curTab === 1 && (\n \n }\n size=\"medium\"\n onClick={() => {\n setPolicyOpen(true);\n }}\n >\n Assign Policies\n \n \n )}\n \n \n \n \n \n \n\n \n {\n history.push(`/policies/${policy.policy}`);\n },\n },\n ]}\n columns={[{ label: \"Name\", elementKey: \"policy\" }]}\n isLoading={loading}\n records={currentPolicies}\n entityName=\"Policies\"\n idField=\"policy\"\n />\n \n \n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(UserDetails));\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 from \"react\";\nimport history from \"../../../history\";\nimport { Route, Router, Switch, withRouter } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../../store\";\nimport { setMenuOpen } from \"../../../actions\";\nimport NotFoundPage from \"../../NotFoundPage\";\n\nimport ListUsers from \"./ListUsers\";\nimport UserDetails from \"./UserDetails\";\n\nconst mapState = (state: AppState) => ({\n open: state.system.sidebarOpen,\n});\n\nconst connector = connect(mapState, { setMenuOpen });\n\nconst Users = () => {\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default withRouter(connector(Users));\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, { useState, useEffect, useCallback } from \"react\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { LinearProgress } from \"@material-ui/core\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { UsersList } from \"../Users/types\";\nimport { usersSort } from \"../../../utils/sortFunctions\";\nimport api from \"../../../common/api\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport {\n actionsTray,\n selectorsCommon,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport { connect } from \"react-redux\";\n\ninterface IGroupsProps {\n classes: any;\n selectedUsers: string[];\n setSelectedUsers: any;\n editMode?: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n paddingTop: 15,\n boxShadow: \"none\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n noFound: {\n textAlign: \"center\",\n padding: \"10px 0\",\n },\n tableContainer: {\n maxHeight: 200,\n },\n stickyHeader: {\n backgroundColor: \"#fff\",\n },\n actionsTitle: {\n fontWeight: 600,\n color: \"#000\",\n fontSize: 16,\n alignSelf: \"center\",\n },\n tableBlock: {\n marginTop: 15,\n },\n filterField: {\n width: 375,\n fontWeight: 600,\n \"& .input\": {\n \"&::placeholder\": {\n fontWeight: 600,\n color: \"#000\",\n },\n },\n },\n ...actionsTray,\n ...selectorsCommon,\n });\n\nconst UsersSelectors = ({\n classes,\n selectedUsers,\n setSelectedUsers,\n editMode = false,\n setModalErrorSnackMessage,\n}: IGroupsProps) => {\n //Local States\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const fetchUsers = useCallback(() => {\n api\n .invoke(\"GET\", `/api/v1/users`)\n .then((res: UsersList) => {\n let users = get(res, \"users\", []);\n\n if (!users) {\n users = [];\n }\n\n setRecords(users.sort(usersSort));\n isLoading(false);\n })\n .catch((err) => {\n setModalErrorSnackMessage(err);\n isLoading(false);\n });\n }, [setModalErrorSnackMessage]);\n\n //Effects\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n fetchUsers();\n }\n }, [loading, fetchUsers]);\n\n const selUsers = !selectedUsers ? [] : selectedUsers;\n\n //Fetch Actions\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[] = [...selUsers]; // We clone the selectedGroups array\n\n if (checked) {\n // If the user has checked this field we need to push this to selectedGroupsList\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 setSelectedUsers(elements);\n\n return elements;\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.accessKey.includes(filter)\n );\n\n return (\n \n \n \n {loading && }\n {records != null && records.length > 0 ? (\n \n \n \n {editMode ? \"Edit Members\" : \"Assign Users\"}\n \n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n \n \n \n \n \n ) : (\n
No Users Available
\n )}\n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(UsersSelectors));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport UsersSelectors from \"./UsersSelectors\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport PredefinedList from \"../Common/FormComponents/PredefinedList/PredefinedList\";\n\ninterface IGroupProps {\n open: boolean;\n selectedGroup: any;\n closeModalAndRefresh: any;\n classes: any;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\ninterface MainGroupProps {\n members: string[];\n name: string;\n status: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\nconst AddGroup = ({\n open,\n selectedGroup,\n closeModalAndRefresh,\n classes,\n setModalErrorSnackMessage,\n}: IGroupProps) => {\n //Local States\n const [groupName, setGroupName] = useState(\"\");\n const [groupEnabled, setGroupEnabled] = useState(false);\n const [saving, isSaving] = useState(false);\n const [selectedUsers, setSelectedUsers] = useState([]);\n const [loadingGroup, isLoadingGroup] = useState(false);\n const [validGroup, setValidGroup] = useState(false);\n\n //Effects\n useEffect(() => {\n if (selectedGroup !== null) {\n isLoadingGroup(true);\n } else {\n setGroupName(\"\");\n setSelectedUsers([]);\n }\n }, [selectedGroup]);\n\n useEffect(() => {\n setValidGroup(groupName.trim() !== \"\");\n }, [groupName, selectedUsers]);\n\n useEffect(() => {\n if (saving) {\n const saveRecord = () => {\n if (selectedGroup !== null) {\n api\n .invoke(\"PUT\", `/api/v1/groups/${groupName}`, {\n group: groupName,\n members: selectedUsers,\n status: groupEnabled ? \"enabled\" : \"disabled\",\n })\n .then((res) => {\n isSaving(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n isSaving(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n api\n .invoke(\"POST\", \"/api/v1/groups\", {\n group: groupName,\n members: selectedUsers,\n })\n .then((res) => {\n isSaving(false);\n closeModalAndRefresh();\n })\n .catch((err) => {\n isSaving(false);\n setModalErrorSnackMessage(err);\n });\n }\n };\n saveRecord();\n }\n }, [\n saving,\n groupName,\n selectedUsers,\n groupEnabled,\n selectedGroup,\n closeModalAndRefresh,\n setModalErrorSnackMessage,\n ]);\n\n useEffect(() => {\n if (selectedGroup && loadingGroup) {\n const fetchGroupInfo = () => {\n api\n .invoke(\"GET\", `/api/v1/groups/${selectedGroup}`)\n .then((res: MainGroupProps) => {\n setGroupEnabled(res.status === \"enabled\");\n setGroupName(res.name);\n setSelectedUsers(res.members);\n })\n .catch((err) => {\n setModalErrorSnackMessage(err);\n isLoadingGroup(false);\n });\n };\n fetchGroupInfo();\n }\n }, [loadingGroup, selectedGroup, setModalErrorSnackMessage]);\n\n //Fetch Actions\n const setSaving = (event: React.FormEvent) => {\n event.preventDefault();\n\n isSaving(true);\n };\n\n const resetForm = () => {\n if (selectedGroup === null) {\n setGroupName(\"\");\n }\n\n setSelectedUsers([]);\n };\n\n return (\n \n {selectedGroup !== null && (\n
\n {\n setGroupEnabled(e.target.checked);\n }}\n switchOnly\n />\n
\n )}\n
\n \n \n {selectedGroup === null ? (\n \n \n ) => {\n setGroupName(e.target.value);\n }}\n />\n \n \n ) : (\n \n \n \n )}\n \n \n \n \n \n \n Clear\n \n \n Save\n \n \n {saving && (\n \n \n \n )}\n \n
\n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddGroup));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport api from \"../../../common/api\";\nimport { setErrorSnackMessage } from \"../../../actions\";\n\ninterface IDeleteGroup {\n selectedGroup: string;\n deleteOpen: boolean;\n closeDeleteModalAndRefresh: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteGroup = ({\n selectedGroup,\n deleteOpen,\n closeDeleteModalAndRefresh,\n setErrorSnackMessage,\n}: IDeleteGroup) => {\n const [isDeleting, setDeleteLoading] = useState(false);\n\n useEffect(() => {\n if (isDeleting) {\n const removeRecord = () => {\n if (!selectedGroup) {\n return;\n }\n\n api\n .invoke(\"DELETE\", `/api/v1/groups/${selectedGroup}`)\n .then(() => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n };\n removeRecord();\n }\n }, [\n isDeleting,\n selectedGroup,\n closeDeleteModalAndRefresh,\n setErrorSnackMessage,\n ]);\n\n const closeNoAction = () => {\n closeDeleteModalAndRefresh(false);\n };\n\n return (\n \n \n Delete User\n \n {isDeleting && }\n \n Are you sure you want to delete group {selectedGroup}?\n \n \n \n \n {\n setDeleteLoading(true);\n }}\n color=\"secondary\"\n autoFocus\n >\n Delete\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(DeleteGroup);\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport { Button } from \"@material-ui/core\";\nimport { CreateIcon } from \"../../../icons\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport { GroupsList } from \"./types\";\nimport { stringSort } from \"../../../utils/sortFunctions\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../common/api\";\nimport AddGroup from \"../Groups/AddGroup\";\nimport DeleteGroup from \"./DeleteGroup\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport SetPolicy from \"../Policies/SetPolicy\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\n\ninterface IGroupsProps {\n classes: any;\n openGroupModal: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n // padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n wrapCell: {\n maxWidth: \"200px\",\n whiteSpace: \"normal\",\n wordWrap: \"break-word\",\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst Groups = ({ classes, setErrorSnackMessage }: IGroupsProps) => {\n const [addGroupOpen, setGroupOpen] = useState(false);\n const [selectedGroup, setSelectedGroup] = useState(null);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [loading, isLoading] = useState(false);\n const [records, setRecords] = useState([]);\n const [filter, setFilter] = useState(\"\");\n const [policyOpen, setPolicyOpen] = useState(false);\n\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n const fetchRecords = () => {\n api\n .invoke(\"GET\", `/api/v1/groups`)\n .then((res: GroupsList) => {\n let resGroups: string[] = [];\n if (res.groups !== null) {\n resGroups = res.groups.sort(stringSort);\n }\n setRecords(resGroups);\n isLoading(false);\n })\n .catch((err) => {\n setErrorSnackMessage(err);\n isLoading(false);\n });\n };\n fetchRecords();\n }\n }, [loading, setErrorSnackMessage]);\n\n const closeAddModalAndRefresh = () => {\n setGroupOpen(false);\n isLoading(true);\n };\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n\n if (refresh) {\n isLoading(true);\n }\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.includes(filter)\n );\n\n const viewAction = (group: any) => {\n setGroupOpen(true);\n setSelectedGroup(group);\n };\n\n const deleteAction = (group: any) => {\n setDeleteOpen(true);\n setSelectedGroup(group);\n };\n\n const setPolicyAction = (selectionElement: any): void => {\n setPolicyOpen(true);\n setSelectedGroup(selectionElement);\n };\n\n const tableActions = [\n { type: \"view\", onClick: viewAction },\n { type: \"description\", onClick: setPolicyAction },\n { type: \"delete\", onClick: deleteAction },\n ];\n\n return (\n \n {addGroupOpen && (\n \n )}\n {deleteOpen && (\n \n )}\n {setPolicyOpen && (\n {\n setPolicyOpen(false);\n }}\n />\n )}\n \n \n \n \n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n }\n onClick={() => {\n setSelectedGroup(null);\n setGroupOpen(true);\n }}\n >\n Create Group\n \n \n\n \n
\n
\n \n \n \n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(Groups));\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 { IConfigurationElement, IElementValue } from \"./types\";\n\nexport const notifyPostgres = \"notify_postgres\";\nexport const notifyMysql = \"notify_mysql\";\nexport const notifyKafka = \"notify_kafka\";\nexport const notifyAmqp = \"notify_amqp\";\nexport const notifyMqtt = \"notify_mqtt\";\nexport const notifyRedis = \"notify_redis\";\nexport const notifyNats = \"notify_nats\";\nexport const notifyElasticsearch = \"notify_elasticsearch\";\nexport const notifyWebhooks = \"notify_webhooks\";\nexport const notifyNsq = \"notify_nsq\";\n\nexport const configurationElements: IConfigurationElement[] = [\n {\n configuration_id: \"region\",\n configuration_label: \"Edit Region Configuration\",\n },\n {\n configuration_id: \"cache\",\n configuration_label: \"Edit Cache Configuration\",\n },\n {\n configuration_id: \"compression\",\n configuration_label: \"Edit Compression Configuration\",\n },\n { configuration_id: \"etcd\", configuration_label: \"Edit Etcd Configuration\" },\n {\n configuration_id: \"identity_openid\",\n configuration_label: \"Edit Identity Openid Configuration\",\n },\n {\n configuration_id: \"identity_ldap\",\n configuration_label: \"Edit Identity LDAP Configuration\",\n },\n {\n configuration_id: \"logger_webhook\",\n configuration_label: \"Edit Logger Webhook Configuration\",\n },\n {\n configuration_id: \"audit_webhook\",\n configuration_label: \"Edit Audit Webhook Configuration\",\n },\n];\n\nexport const fieldsConfigurations: any = {\n region: [\n {\n name: \"name\",\n required: true,\n label: \"Server Location\",\n tooltip: 'Name of the location of the server e.g. \"us-west-rack2\"',\n type: \"string\",\n placeholder: \"e.g. us-west-rack-2\",\n },\n {\n name: \"comment\",\n required: false,\n label: \"Comment\",\n tooltip: \"You can add a comment to this setting\",\n type: \"comment\",\n placeholder: \"Enter Comment\",\n },\n ],\n cache: [\n {\n name: \"drives\",\n required: true,\n label: \"Drives\",\n tooltip:\n 'Mountpoints e.g. \"/optane1\" or \"/optane2\", you can write one per field',\n type: \"csv\",\n placeholder: \"Enter Mount Point\",\n },\n {\n name: \"expiry\",\n required: false,\n label: \"Expiry\",\n tooltip: 'Cache expiry duration in days e.g. \"90\"',\n type: \"number\",\n placeholder: \"Enter Number of Days\",\n },\n {\n name: \"quota\",\n required: false,\n label: \"Quota\",\n tooltip: 'Limit cache drive usage in percentage e.g. \"90\"',\n type: \"number\",\n placeholder: \"Enter in %\",\n },\n {\n name: \"exclude\",\n required: false,\n label: \"Exclude\",\n tooltip:\n 'Wildcard exclusion patterns e.g. \"bucket/*.tmp\" or \"*.exe\", you can write one per field',\n type: \"csv\",\n placeholder: \"Enter Wildcard Exclusion Patterns\",\n },\n {\n name: \"after\",\n required: false,\n label: \"After\",\n tooltip: \"Minimum number of access before caching an object\",\n type: \"number\",\n placeholder: \"Enter Number of Attempts\",\n },\n {\n name: \"watermark_low\",\n required: false,\n label: \"Watermark Low\",\n tooltip: \"Watermark Low\",\n type: \"number\",\n placeholder: \"Enter Watermark Low\",\n },\n {\n name: \"watermark_high\",\n required: false,\n label: \"Watermark High\",\n tooltip: \"Watermark High\",\n type: \"number\",\n placeholder: \"Enter Watermark High\",\n },\n {\n name: \"comment\",\n required: false,\n label: \"Comment\",\n tooltip: \"You can add a comment to this setting\",\n type: \"comment\",\n multiline: true,\n placeholder: \"Enter Comment\",\n },\n ],\n compression: [\n {\n name: \"extensions\",\n required: false,\n label: \"Extensions\",\n tooltip:\n 'Extensions to compress e.g. \".txt\",\".log\" or \".csv\", you can write one per field',\n type: \"csv\",\n placeholder: \"Enter an Extension\",\n withBorder: true,\n },\n {\n name: \"mime_types\",\n required: false,\n label: \"Mime Types\",\n tooltip:\n 'Mime types e.g. \"text/*\",\"application/json\" or \"application/xml\", you can write one per field',\n type: \"csv\",\n placeholder: \"Enter a Mime Type\",\n withBorder: true,\n },\n ],\n etcd: [\n {\n name: \"endpoints\",\n required: true,\n label: \"Endpoints\",\n tooltip:\n 'List of etcd endpoints e.g. \"http://localhost:2379\", you can write one per field',\n type: \"csv\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"path_prefix\",\n required: false,\n label: \"Path Prefix\",\n tooltip: 'namespace prefix to isolate tenants e.g. \"customer1/\"',\n type: \"string\",\n placeholder: \"Enter Path Prefix\",\n },\n {\n name: \"coredns_path\",\n required: false,\n label: \"Coredns Path\",\n tooltip: 'Shared bucket DNS records, default is \"/skydns\"',\n type: \"string\",\n placeholder: \"Enter Coredns Path\",\n },\n {\n name: \"client_cert\",\n required: false,\n label: \"Client Cert\",\n tooltip: \"Client cert for mTLS authentication\",\n type: \"string\",\n placeholder: \"Enter Client Cert\",\n },\n {\n name: \"client_cert_key\",\n required: false,\n label: \"Client Cert Key\",\n tooltip: \"Client cert key for mTLS authentication\",\n type: \"string\",\n placeholder: \"Enter Client Cert Key\",\n },\n {\n name: \"comment\",\n required: false,\n label: \"Comment\",\n tooltip: \"You can add a comment to this setting\",\n type: \"comment\",\n multiline: true,\n placeholder: \"Enter Comment\",\n },\n ],\n identity_openid: [\n {\n name: \"config_url\",\n required: false,\n label: \"Config URL\",\n tooltip: \"Config URL for Client ID configuration\",\n type: \"string\",\n placeholder: \"Enter Config URL\",\n },\n {\n name: \"client_id\",\n required: false,\n label: \"Client ID\",\n type: \"string\",\n placeholder: \"Enter Client ID\",\n },\n {\n name: \"claim_name\",\n required: false,\n label: \"Claim Name\",\n tooltip: \"Claim Name\",\n type: \"string\",\n placeholder: \"Enter Claim Name\",\n },\n {\n name: \"claim_prefix\",\n required: false,\n label: \"Claim Prefix\",\n tooltip: \"Claim Prefix\",\n type: \"string\",\n placeholder: \"Enter Claim Prefix\",\n },\n ],\n identity_ldap: [\n {\n name: \"server_addr\",\n required: true,\n label: \"Server Addr\",\n tooltip: 'AD/LDAP server address e.g. \"myldapserver.com:636\"',\n type: \"string\",\n placeholder: \"Enter Server Address\",\n },\n {\n name: \"username_format\",\n required: true,\n label: \"Username Format\",\n tooltip:\n 'List of username bind DNs e.g. \"uid=%s\",\"cn=accounts\",\"dc=myldapserver\" or \"dc=com\", you can write one per field',\n type: \"csv\",\n placeholder: \"Enter Username Format\",\n },\n {\n name: \"username_search_filter\",\n required: true,\n label: \"Username Search Filter\",\n tooltip:\n 'User search filter, for example \"(cn=%s)\" or \"(sAMAccountName=%s)\" or \"(uid=%s)\"',\n type: \"string\",\n placeholder: \"Enter Username Search Filter\",\n },\n {\n name: \"group_search_filter\",\n required: true,\n label: \"Group Search Filter\",\n tooltip:\n 'Search filter for groups e.g. \"(&(objectclass=groupOfNames)(memberUid=%s))\"',\n type: \"string\",\n placeholder: \"Enter Group Search Filter\",\n },\n {\n name: \"username_search_base_dn\",\n required: false,\n label: \"Username Search Base DN\",\n tooltip: \"List of username search DNs, you can write one per field\",\n type: \"csv\",\n placeholder: \"Enter Username Search Base DN\",\n },\n {\n name: \"group_name_attribute\",\n required: false,\n label: \"Group Name Attribute\",\n tooltip: 'Search attribute for group name e.g. \"cn\"',\n type: \"string\",\n placeholder: \"Enter Group Name Attribute\",\n },\n {\n name: \"sts_expiry\",\n required: false,\n label: \"STS Expiry\",\n tooltip:\n 'temporary credentials validity duration in s,m,h,d. Default is \"1h\"',\n type: \"string\",\n placeholder: \"Enter STS Expiry\",\n },\n {\n name: \"tls_skip_verify\",\n required: false,\n label: \"TLS Skip Verify\",\n tooltip:\n 'Trust server TLS without verification, defaults to \"off\" (verify)',\n type: \"on|off\",\n },\n {\n name: \"server_insecure\",\n required: false,\n label: \"Server Insecure\",\n tooltip:\n 'Allow plain text connection to AD/LDAP server, defaults to \"off\"',\n type: \"on|off\",\n },\n {\n name: \"comment\",\n required: false,\n label: \"Comment\",\n tooltip: \"Optionally add a comment to this setting\",\n type: \"comment\",\n placeholder: \"Enter Comment\",\n },\n ],\n logger_webhook: [\n {\n name: \"endpoint\",\n required: true,\n label: \"Endpoint\",\n type: \"string\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"auth_token\",\n required: true,\n label: \"Auth Token\",\n type: \"string\",\n placeholder: \"Enter Auth Token\",\n },\n ],\n audit_webhook: [\n {\n name: \"endpoint\",\n required: true,\n label: \"Endpoint\",\n type: \"string\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"auth_token\",\n required: true,\n label: \"Auth Token\",\n type: \"string\",\n placeholder: \"Enter Auth Token\",\n },\n ],\n};\n\nconst commonFields = [\n {\n name: \"queue-dir\",\n label: \"Queue Directory\",\n required: true,\n\n tooltip: \"staging dir for undelivered messages e.g. '/home/events'\",\n type: \"string\",\n placeholder: \"Enter Queue Directory\",\n },\n {\n name: \"queue-limit\",\n label: \"Queue Limit\",\n required: false,\n\n tooltip: \"maximum limit for undelivered messages, defaults to '10000'\",\n type: \"number\",\n placeholder: \"Enter Queue Limit\",\n },\n {\n name: \"comment\",\n label: \"Comment\",\n required: false,\n type: \"comment\",\n placeholder: \"Enter Comment\",\n },\n];\n\nexport const notificationEndpointsFields: any = {\n [notifyKafka]: [\n {\n name: \"brokers\",\n label: \"Brokers\",\n required: true,\n\n tooltip: \"Comma separated list of Kafka broker addresses\",\n type: \"string\",\n placeholder: \"Enter Brokers\",\n },\n {\n name: \"topic\",\n label: \"Topic\",\n tooltip: \"Kafka topic used for bucket notifications\",\n type: \"string\",\n placeholder: \"Enter Topic\",\n },\n {\n name: \"sasl_username\",\n label: \"SASL Username\",\n tooltip: \"Username for SASL/PLAIN or SASL/SCRAM authentication\",\n type: \"string\",\n placeholder: \"Enter SASL Username\",\n },\n {\n name: \"sasl_password\",\n label: \"SASL Password\",\n tooltip: \"Password for SASL/PLAIN or SASL/SCRAM authentication\",\n type: \"string\",\n placeholder: \"Enter SASL Password\",\n },\n {\n name: \"sasl_mechanism\",\n label: \"SASL Mechanism\",\n tooltip: \"SASL authentication mechanism, default 'PLAIN'\",\n type: \"string\",\n },\n {\n name: \"tls_client_auth\",\n label: \"TLS Client Auth\",\n tooltip:\n \"Client Auth determines the Kafka server's policy for TLS client auth\",\n type: \"string\",\n placeholder: \"Enter TLS Client Auth\",\n },\n {\n name: \"sasl\",\n label: \"SASL\",\n tooltip: \"Set to 'on' to enable SASL authentication\",\n type: \"on|off\",\n },\n {\n name: \"tls\",\n label: \"TLS\",\n tooltip: \"Set to 'on' to enable TLS\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n label: \"TLS skip verify\",\n tooltip:\n 'Trust server TLS without verification, defaults to \"on\" (verify)',\n type: \"on|off\",\n },\n {\n name: \"client_tls_cert\",\n label: \"client TLS cert\",\n tooltip: \"Path to client certificate for mTLS auth\",\n type: \"path\",\n placeholder: \"Enter TLS Client Cert\",\n },\n {\n name: \"client_tls_key\",\n label: \"client TLS key\",\n tooltip: \"Path to client key for mTLS auth\",\n type: \"path\",\n placeholder: \"Enter TLS Client Key\",\n },\n {\n name: \"version\",\n label: \"Version\",\n tooltip: \"Specify the version of the Kafka cluster e.g '2.2.0'\",\n type: \"string\",\n placeholder: \"Enter Kafka Version\",\n },\n ...commonFields,\n ],\n [notifyAmqp]: [\n {\n name: \"url\",\n required: true,\n label: \"URL\",\n tooltip:\n \"AMQP server endpoint e.g. `amqp://myuser:mypassword@localhost:5672`\",\n type: \"url\",\n },\n {\n name: \"exchange\",\n label: \"Exchange\",\n tooltip: \"Name of the AMQP exchange\",\n type: \"string\",\n placeholder: \"Enter Exchange\",\n },\n {\n name: \"exchange_type\",\n label: \"Exchange Type\",\n tooltip: \"AMQP exchange type\",\n type: \"string\",\n placeholder: \"Enter Exchange Type\",\n },\n {\n name: \"routing_key\",\n label: \"Routing Key\",\n tooltip: \"Routing key for publishing\",\n type: \"string\",\n placeholder: \"Enter Routing Key\",\n },\n {\n name: \"mandatory\",\n label: \"Mandatory\",\n tooltip:\n \"Quietly ignore undelivered messages when set to 'off', default is 'on'\",\n type: \"on|off\",\n },\n {\n name: \"durable\",\n label: \"Durable\",\n tooltip:\n \"Persist queue across broker restarts when set to 'on', default is 'off'\",\n type: \"on|off\",\n },\n {\n name: \"no_wait\",\n label: \"No Wait\",\n tooltip:\n \"Non-blocking message delivery when set to 'on', default is 'off'\",\n type: \"on|off\",\n },\n {\n name: \"internal\",\n label: \"Internal\",\n tooltip:\n \"Set to 'on' for exchange to be not used directly by publishers, but only when bound to other exchanges\",\n type: \"on|off\",\n },\n {\n name: \"auto_deleted\",\n label: \"Auto Deleted\",\n tooltip:\n \"Auto delete queue when set to 'on', when there are no consumers\",\n type: \"on|off\",\n },\n {\n name: \"delivery_mode\",\n label: \"Delivery Mode\",\n tooltip: \"Set to '1' for non-persistent or '2' for persistent queue\",\n type: \"number\",\n placeholder: \"Enter Delivery Mode\",\n },\n ...commonFields,\n ],\n [notifyRedis]: [\n {\n name: \"address\",\n required: true,\n label: \"Address\",\n tooltip: \"Redis server's address. For example: `localhost:6379`\",\n type: \"address\",\n placeholder: \"Enter Address\",\n },\n {\n name: \"key\",\n required: true,\n label: \"Key\",\n tooltip: \"Redis key to store/update events, key is auto-created\",\n type: \"string\",\n placeholder: \"Enter Key\",\n },\n {\n name: \"password\",\n label: \"Password\",\n tooltip: \"Redis server password\",\n type: \"string\",\n placeholder: \"Enter Password\",\n },\n ...commonFields,\n ],\n [notifyMqtt]: [\n {\n name: \"broker\",\n required: true,\n label: \"Broker\",\n tooltip: \"MQTT server endpoint e.g. `tcp://localhost:1883`\",\n type: \"uri\",\n placeholder: \"Enter Brokers\",\n },\n {\n name: \"topic\",\n required: true,\n label: \"Topic\",\n tooltip: \"name of the MQTT topic to publish\",\n type: \"string\",\n placeholder: \"Enter Topic\",\n },\n {\n name: \"username\",\n label: \"Username\",\n tooltip: \"MQTT username\",\n type: \"string\",\n placeholder: \"Enter Username\",\n },\n {\n name: \"password\",\n label: \"Password\",\n tooltip: \"MQTT password\",\n type: \"string\",\n placeholder: \"Enter Password\",\n },\n {\n name: \"qos\",\n label: \"QOS\",\n tooltip: \"Set the quality of service priority, defaults to '0'\",\n type: \"number\",\n placeholder: \"Enter QOS\",\n },\n {\n name: \"keep_alive_interval\",\n label: \"Keep Alive Interval\",\n tooltip: \"Keep-alive interval for MQTT connections in s,m,h,d\",\n type: \"duration\",\n placeholder: \"Enter Keep Alive Internal\",\n },\n {\n name: \"reconnect_interval\",\n label: \"Reconnect Interval\",\n tooltip: \"Reconnect interval for MQTT connections in s,m,h,d\",\n type: \"duration\",\n placeholder: \"Enter Reconnect Interval\",\n },\n ...commonFields,\n ],\n [notifyNats]: [\n {\n name: \"address\",\n required: true,\n label: \"Address\",\n tooltip: \"NATS server address e.g. '0.0.0.0:4222'\",\n type: \"address\",\n placeholder: \"Enter Address\",\n },\n {\n name: \"subject\",\n required: true,\n label: \"Subject\",\n tooltip: \"NATS subscription subject\",\n type: \"string\",\n placeholder: \"Enter NATS Subject\",\n },\n {\n name: \"username\",\n label: \"Username\",\n tooltip: \"NATS username\",\n type: \"string\",\n placeholder: \"Enter NATS Username\",\n },\n {\n name: \"password\",\n label: \"Password\",\n tooltip: \"NATS password\",\n type: \"string\",\n placeholder: \"Enter NATS password\",\n },\n {\n name: \"token\",\n label: \"Token\",\n tooltip: \"NATS token\",\n type: \"string\",\n placeholder: \"Enter NATS token\",\n },\n {\n name: \"tls\",\n label: \"TLS\",\n tooltip: \"Set to 'on' to enable TLS\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n label: \"TLS Skip Verify\",\n tooltip:\n 'Trust server TLS without verification, defaults to \"on\" (verify)',\n type: \"on|off\",\n },\n {\n name: \"ping_interval\",\n label: \"Ping Interval\",\n tooltip: \"Client ping commands interval in s,m,h,d. Disabled by default\",\n type: \"duration\",\n placeholder: \"Enter Ping Interval\",\n },\n {\n name: \"streaming\",\n label: \"Streaming\",\n tooltip: \"Set to 'on', to use streaming NATS server\",\n type: \"on|off\",\n },\n {\n name: \"streaming_async\",\n label: \"Streaming async\",\n tooltip: \"Set to 'on', to enable asynchronous publish\",\n type: \"on|off\",\n },\n {\n name: \"streaming_max_pub_acks_in_flight\",\n label: \"Streaming max publish ACKS in flight\",\n tooltip: \"Number of messages to publish without waiting for ACKs\",\n type: \"number\",\n placeholder: \"Enter Streaming in flight value\",\n },\n {\n name: \"streaming_cluster_id\",\n label: \"Streaming Cluster ID\",\n tooltip: \"Unique ID for NATS streaming cluster\",\n type: \"string\",\n placeholder: \"Enter Streaming Cluster ID\",\n },\n {\n name: \"cert_authority\",\n label: \"Cert Authority\",\n tooltip: \"Path to certificate chain of the target NATS server\",\n type: \"string\",\n placeholder: \"Enter Cert Authority\",\n },\n {\n name: \"client_cert\",\n label: \"Client Cert\",\n tooltip: \"Client cert for NATS mTLS auth\",\n type: \"string\",\n placeholder: \"Enter Client Cert\",\n },\n {\n name: \"client_key\",\n label: \"Client Key\",\n tooltip: \"Client cert key for NATS mTLS auth\",\n type: \"string\",\n placeholder: \"Enter Client Key\",\n },\n ...commonFields,\n ],\n [notifyElasticsearch]: [\n {\n name: \"url\",\n required: true,\n label: \"URL\",\n tooltip:\n \"Elasticsearch server's address, with optional authentication info\",\n type: \"url\",\n placeholder: \"Enter URL\",\n },\n {\n name: \"index\",\n required: true,\n label: \"Index\",\n tooltip:\n \"Elasticsearch index to store/update events, index is auto-created\",\n type: \"string\",\n placeholder: \"Enter Index\",\n },\n {\n name: \"format\",\n required: true,\n label: \"Format\",\n tooltip:\n \"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'\",\n type: \"enum\",\n placeholder: \"Enter Format\",\n },\n ...commonFields,\n ],\n [notifyWebhooks]: [\n {\n name: \"endpoint\",\n required: true,\n label: \"Endpoint\",\n tooltip:\n \"webhook server endpoint e.g. http://localhost:8080/minio/events\",\n type: \"url\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"auth_token\",\n label: \"Auth Token\",\n tooltip: \"opaque string or JWT authorization token\",\n type: \"string\",\n placeholder: \"Enter auth_token\",\n },\n ...commonFields,\n ],\n [notifyNsq]: [\n {\n name: \"nsqd_address\",\n required: true,\n label: \"NSQD Address\",\n tooltip: \"NSQ server address e.g. '127.0.0.1:4150'\",\n type: \"address\",\n placeholder: \"Enter nsqd_address\",\n },\n {\n name: \"topic\",\n required: true,\n label: \"Topic\",\n tooltip: \"NSQ topic\",\n type: \"string\",\n placeholder: \"Enter Topic\",\n },\n {\n name: \"tls\",\n label: \"TLS\",\n tooltip: \"set to 'on' to enable TLS\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n label: \"TLS Skip Verify\",\n tooltip:\n 'trust server TLS without verification, defaults to \"on\" (verify)',\n type: \"on|off\",\n },\n ...commonFields,\n ],\n};\n\nexport const removeEmptyFields = (formFields: IElementValue[]) => {\n const nonEmptyFields = formFields.filter((field) => field.value !== \"\");\n\n return nonEmptyFields;\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 .\nimport React, {\n useState,\n useEffect,\n createRef,\n useLayoutEffect,\n ChangeEvent,\n useRef,\n} from \"react\";\nimport get from \"lodash/get\";\nimport debounce from \"lodash/debounce\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { InputLabel, Tooltip } from \"@material-ui/core\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport InputBoxWrapper from \"../InputBoxWrapper/InputBoxWrapper\";\nimport AddIcon from \"../../../../../icons/AddIcon\";\n\ninterface ICSVMultiSelector {\n elements: string;\n name: string;\n label: string;\n tooltip?: string;\n commonPlaceholder?: string;\n classes: any;\n withBorder?: boolean;\n onChange: (elements: string) => void;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n inputWithBorder: {\n border: \"1px solid #EAEAEA\",\n padding: 15,\n height: 150,\n overflowY: \"auto\",\n position: \"relative\",\n marginTop: 15,\n },\n labelContainer: {\n display: \"flex\",\n },\n });\n\nconst CSVMultiSelector = ({\n elements,\n name,\n label,\n tooltip = \"\",\n commonPlaceholder = \"\",\n onChange,\n withBorder = false,\n classes,\n}: ICSVMultiSelector) => {\n const [currentElements, setCurrentElements] = useState([\"\"]);\n const bottomList = createRef();\n\n // Use effect to get the initial values from props\n useEffect(() => {\n if (\n currentElements.length === 1 &&\n currentElements[0] === \"\" &&\n elements &&\n elements !== \"\"\n ) {\n const elementsSplit = elements.split(\",\");\n elementsSplit.push(\"\");\n\n setCurrentElements(elementsSplit);\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [elements, currentElements]);\n\n // Use effect to send new values to onChange\n useEffect(() => {\n if (currentElements.length > 1) {\n const refScroll = bottomList.current;\n if (refScroll) {\n refScroll.scrollIntoView(false);\n }\n }\n }, [currentElements, bottomList]);\n\n // We avoid multiple re-renders / hang issue typing too fast\n const firstUpdate = useRef(true);\n useLayoutEffect(() => {\n if (firstUpdate.current) {\n firstUpdate.current = false;\n return;\n }\n debouncedOnChange();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentElements]);\n\n // If the last input is not empty, we add a new one\n const addEmptyLine = (elementsUp: string[]) => {\n if (elementsUp[elementsUp.length - 1].trim() !== \"\") {\n const cpList = [...elementsUp];\n cpList.push(\"\");\n setCurrentElements(cpList);\n }\n };\n\n // Onchange function for input box, we get the dataset-index & only update that value in the array\n const onChangeElement = (e: ChangeEvent) => {\n e.persist();\n\n let updatedElement = [...currentElements];\n const index = get(e.target, \"dataset.index\", 0);\n updatedElement[index] = e.target.value;\n\n setCurrentElements(updatedElement);\n };\n\n // Debounce for On Change\n const debouncedOnChange = debounce(() => {\n const elementsString = currentElements\n .filter((element) => element.trim() !== \"\")\n .join(\",\");\n\n onChange(elementsString);\n }, 500);\n\n const inputs = currentElements.map((element, index) => {\n return (\n : null}\n overlayAction={() => {\n addEmptyLine(currentElements);\n }}\n />\n );\n });\n\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n
\n \n
\n \n
\n
\n
\n )}\n
\n \n {inputs}\n
\n \n \n \n );\n};\nexport default withStyles(styles)(CSVMultiSelector);\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, InputLabel, TextField, Tooltip } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\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 marginBottom: 16,\n fontSize: 14,\n },\n textBoxContainer: {\n flexGrow: 1,\n position: \"relative\",\n },\n errorState: {\n color: \"#b53b4b\",\n fontSize: 14,\n position: \"absolute\",\n top: 7,\n right: 7,\n },\n cssOutlinedInput: {\n borderColor: \"#9C9C9C\",\n padding: 16,\n },\n rootContainer: {\n \"& .MuiOutlinedInput-inputMultiline\": {\n ...fieldBasic.inputLabel,\n fontSize: 13,\n minHeight: 150,\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 .\n\nimport React, { useEffect, useState, Fragment } from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { IElementValue, KVField } from \"./types\";\nimport { modalBasic } from \"../Common/FormComponents/common/styleLibrary\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport CSVMultiSelector from \"../Common/FormComponents/CSVMultiSelector/CSVMultiSelector\";\nimport CommentBoxWrapper from \"../Common/FormComponents/CommentBoxWrapper/CommentBoxWrapper\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\n\ninterface IConfGenericProps {\n onChange: (newValue: IElementValue[]) => void;\n fields: KVField[];\n defaultVals?: IElementValue[];\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n });\n\n// Function to get defined values,\n//we make this because the backed sometimes don't return all the keys when there is an initial configuration\nexport const valueDef = (\n key: string,\n type: string,\n defaults: IElementValue[]\n) => {\n let defValue = type === \"on|off\" ? \"false\" : \"\";\n\n if (defaults.length > 0) {\n const storedConfig = defaults.find((element) => element.key === key);\n\n if (storedConfig) {\n defValue = storedConfig.value;\n }\n }\n\n return defValue;\n};\n\nconst ConfTargetGeneric = ({\n onChange,\n fields,\n defaultVals,\n classes,\n}: IConfGenericProps) => {\n const [valueHolder, setValueHolder] = useState([]);\n const fieldsElements = !fields ? [] : fields;\n const defValList = !defaultVals ? [] : defaultVals;\n\n // Effect to create all the values to hold\n useEffect(() => {\n const values: IElementValue[] = [];\n fields.forEach((field) => {\n const stateInsert: IElementValue = {\n key: field.name,\n value: valueDef(field.name, field.type, defValList),\n };\n values.push(stateInsert);\n });\n\n setValueHolder(values);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fields, defaultVals]);\n\n useEffect(() => {\n onChange(valueHolder);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [valueHolder]);\n\n const setValueElement = (key: string, value: string, index: number) => {\n const valuesDup = [...valueHolder];\n valuesDup[index] = { key, value };\n\n setValueHolder(valuesDup);\n };\n\n const fieldDefinition = (field: KVField, item: number) => {\n switch (field.type) {\n case \"on|off\":\n const value = valueHolder[item] ? valueHolder[item].value : \"false\";\n\n return (\n ) => {\n const value = e.target.checked ? \"true\" : \"false\";\n setValueElement(field.name, value, item);\n }}\n id={field.name}\n name={field.name}\n label={field.label}\n value={\"switch_on\"}\n tooltip={field.tooltip}\n checked={value === \"true\"}\n />\n );\n case \"csv\":\n return (\n \n setValueElement(field.name, value, item)\n }\n tooltip={field.tooltip}\n commonPlaceholder={field.placeholder}\n withBorder={!!field.withBorder}\n />\n );\n case \"comment\":\n return (\n ) =>\n setValueElement(field.name, e.target.value, item)\n }\n placeholder={field.placeholder}\n />\n );\n default:\n return (\n ) =>\n setValueElement(field.name, e.target.value, item)\n }\n multiline={!!field.multiline}\n placeholder={field.placeholder}\n />\n );\n }\n };\n\n return (\n \n \n {fieldsElements.map((field, item) => (\n \n \n {fieldDefinition(field, item)}\n \n \n ))}\n \n \n );\n};\n\nexport default withStyles(styles)(ConfTargetGeneric);\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, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport api from \"../../../../common/api\";\nimport ConfTargetGeneric from \"../ConfTargetGeneric\";\nimport { serverNeedsRestart, setErrorSnackMessage } from \"../../../../actions\";\nimport {\n fieldBasic,\n settingsCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { fieldsConfigurations, removeEmptyFields } from \"../utils\";\nimport { IConfigurationElement, IElementValue } from \"../types\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...settingsCommon,\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n logoButton: {\n height: \"80px\",\n },\n\n customTitle: {\n ...settingsCommon.customTitle,\n marginTop: 0,\n },\n });\n\ninterface IAddNotificationEndpointProps {\n closeModalAndRefresh: any;\n serverNeedsRestart: typeof serverNeedsRestart;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n selectedConfiguration: IConfigurationElement;\n classes: any;\n}\n\nconst EditConfiguration = ({\n closeModalAndRefresh,\n serverNeedsRestart,\n selectedConfiguration,\n setErrorSnackMessage,\n classes,\n}: IAddNotificationEndpointProps) => {\n //Local States\n const [valuesObj, setValueObj] = useState([]);\n const [saving, setSaving] = useState(false);\n const [loadingConfig, setLoadingConfig] = useState(true);\n const [configValues, setConfigValues] = useState([]);\n //Effects\n useEffect(() => {\n const configId = get(selectedConfiguration, \"configuration_id\", false);\n\n if (configId) {\n api\n .invoke(\"GET\", `/api/v1/configs/${configId}`)\n .then((res) => {\n const keyVals = get(res, \"key_values\", []);\n setConfigValues(keyVals);\n })\n .catch((err) => {\n setLoadingConfig(false);\n setErrorSnackMessage(err);\n });\n }\n setLoadingConfig(false);\n }, [selectedConfiguration, setErrorSnackMessage]);\n\n useEffect(() => {\n if (saving) {\n const payload = {\n key_values: removeEmptyFields(valuesObj),\n };\n api\n .invoke(\n \"PUT\",\n `/api/v1/configs/${selectedConfiguration.configuration_id}`,\n payload\n )\n .then(() => {\n setSaving(false);\n serverNeedsRestart(true);\n\n closeModalAndRefresh();\n })\n .catch((err) => {\n setSaving(false);\n setErrorSnackMessage(err);\n });\n }\n }, [\n saving,\n serverNeedsRestart,\n selectedConfiguration,\n valuesObj,\n closeModalAndRefresh,\n setErrorSnackMessage,\n ]);\n\n //Fetch Actions\n const submitForm = (event: React.FormEvent) => {\n event.preventDefault();\n setSaving(true);\n };\n\n const onValueChange = useCallback(\n (newValue) => {\n setValueObj(newValue);\n },\n [setValueObj]\n );\n\n return (\n \n \n {selectedConfiguration.configuration_label}\n \n \n
\n \n {loadingConfig && (\n \n \n \n )}\n \n \n \n \n \n Save\n \n \n \n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n serverNeedsRestart,\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(EditConfiguration));\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\";\nimport { AutoSizer } from \"react-virtualized\";\nimport { createStyles, withStyles } from \"@material-ui/core/styles\";\n\ninterface ISlideOptions {\n classes: any;\n slideOptions: any;\n currentSlide: number;\n}\n\nconst styles = () =>\n createStyles({\n masterContainer: {\n overflowX: \"hidden\",\n overflowY: \"auto\",\n },\n sliderContainer: {\n width: \"auto\",\n transitionDuration: \"0.3s\",\n position: \"relative\",\n },\n slide: {\n float: \"left\",\n },\n });\n\nconst SlideOptions = ({\n classes,\n slideOptions,\n currentSlide,\n}: ISlideOptions) => {\n return (\n \n {({ width, height }: any) => {\n const currentSliderPosition = currentSlide * width;\n const containerSize = width * slideOptions.length;\n return (\n \n
\n \n {slideOptions.map((block: any, index: number) => {\n return (\n \n {block}\n
\n );\n })}\n
\n
\n
\n );\n }}\n \n );\n};\n\nexport default withStyles(styles)(SlideOptions);\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst BackSettingsIcon = () => (\n \n \n \n \n \n \n \n);\n\nexport default BackSettingsIcon;\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, { useState, Fragment } from \"react\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport history from \"../../../../history\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport { configurationElements } from \"../utils\";\nimport { IConfigurationElement } from \"../types\";\nimport EditConfiguration from \"../CustomForms/EditConfiguration\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n settingsCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport SlideOptions from \"../../Common/SlideOptions/SlideOptions\";\nimport BackSettingsIcon from \"../../../../icons/BackSettingsIcon\";\n\ninterface IListConfiguration {\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n iconText: {\n lineHeight: \"24px\",\n },\n customConfigurationPage: {\n height: \"calc(100vh - 324px)\",\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n ...searchField,\n ...actionsTray,\n ...settingsCommon,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst initialConfiguration = {\n configuration_id: \"\",\n configuration_label: \"\",\n};\n\nconst ConfigurationsList = ({ classes }: IListConfiguration) => {\n const [selectedConfiguration, setSelectedConfiguration] = useState(\n initialConfiguration\n );\n const [currentConfiguration, setCurrentConfiguration] = useState(0);\n\n const tableActions = [\n {\n type: \"edit\",\n onClick: (element: IConfigurationElement) => {\n const url = get(element, \"url\", \"\");\n if (url !== \"\") {\n // We redirect Browser\n history.push(url);\n } else {\n setCurrentConfiguration(1);\n setSelectedConfiguration(element);\n }\n },\n },\n ];\n\n const backToInitialConfig = () => {\n setCurrentConfiguration(0);\n setSelectedConfiguration(initialConfiguration);\n };\n\n return (\n \n \n \n \n
\n \n \n ,\n \n \n \n \n Back To Configurations\n \n \n \n {currentConfiguration === 1 ? (\n {\n setCurrentConfiguration(0);\n }}\n selectedConfiguration={selectedConfiguration}\n />\n ) : null}\n \n ,\n ]}\n currentSlide={currentConfiguration}\n />\n
\n
\n
\n
\n
\n );\n};\n\nexport default withStyles(styles)(ConfigurationsList);\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 { NotificationEndpointItem } from \"./types\";\nimport {\n notifyAmqp,\n notifyElasticsearch,\n notifyKafka,\n notifyMqtt,\n notifyMysql,\n notifyNats,\n notifyNsq,\n notifyPostgres,\n notifyRedis,\n notifyWebhooks,\n} from \"../utils\";\n\nexport const notificationTransform = (\n notificationElements: NotificationEndpointItem[]\n) => {\n return notificationElements.map((element) => {\n return {\n service_name: `${element.service}:${element.account_id}`,\n status: element.status,\n };\n });\n};\n\nexport const servicesList = [\n {\n actionTrigger: notifyPostgres,\n targetTitle: \"Postgres SQL\",\n logo: \"/postgres.png\",\n },\n {\n actionTrigger: notifyKafka,\n targetTitle: \"Kafka\",\n logo: \"/kafka.png\",\n },\n {\n actionTrigger: notifyAmqp,\n targetTitle: \"AMQP\",\n logo: \"/amqp.png\",\n },\n {\n actionTrigger: notifyMqtt,\n targetTitle: \"MQTT\",\n logo: \"/mqtt.png\",\n },\n {\n actionTrigger: notifyRedis,\n targetTitle: \"Redis\",\n logo: \"/redis.png\",\n },\n {\n actionTrigger: notifyNats,\n targetTitle: \"NATS\",\n logo: \"/nats.png\",\n },\n {\n actionTrigger: notifyMysql,\n targetTitle: \"Mysql\",\n logo: \"/mysql.png\",\n },\n {\n actionTrigger: notifyElasticsearch,\n targetTitle: \"Elastic Search\",\n logo: \"/elasticsearch.png\",\n },\n {\n actionTrigger: notifyWebhooks,\n targetTitle: \"Webhook\",\n logo: \"\",\n },\n {\n actionTrigger: notifyNsq,\n targetTitle: \"NSQ\",\n logo: \"\",\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\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport RadioGroupSelector from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { IElementValue } from \"../types\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport CommentBoxWrapper from \"../../Common/FormComponents/CommentBoxWrapper/CommentBoxWrapper\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport PredefinedList from \"../../Common/FormComponents/PredefinedList/PredefinedList\";\n\ninterface IConfPostgresProps {\n onChange: (newValue: IElementValue[]) => void;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n });\n\nconst ConfPostgres = ({ onChange, classes }: IConfPostgresProps) => {\n //Local States\n const [useConnectionString, setUseConnectionString] =\n useState(false);\n const [connectionString, setConnectionString] = useState(\"\");\n const [host, setHostname] = useState(\"\");\n const [dbName, setDbName] = useState(\"\");\n const [port, setPort] = useState(\"\");\n const [user, setUser] = useState(\"\");\n const [password, setPassword] = useState(\"\");\n const [sslMode, setSslMode] = useState(\" \");\n\n const [table, setTable] = useState(\"\");\n const [format, setFormat] = useState(\"namespace\");\n const [queueDir, setQueueDir] = useState(\"\");\n const [queueLimit, setQueueLimit] = useState(\"\");\n const [comment, setComment] = useState(\"\");\n\n // connection_string* (string) Postgres server connection-string e.g. \"host=localhost port=5432 dbname=minio_events user=postgres password=password sslmode=disable\"\n\n // \"host=localhost\n // port=5432\n //dbname=minio_events\n //user=postgres\n //password=password\n //sslmode=disable\"\n\n // table* (string) DB table name to store/update events, table is auto-created\n // format* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'\n // queue_dir (path) staging dir for undelivered messages e.g. '/home/events'\n // queue_limit (number) maximum limit for undelivered messages, defaults to '10000'\n // comment (sentence) optionally add a comment to this setting\n\n const KvSeparator = \"=\";\n const parseConnectionString = (\n input: string,\n keys: string[]\n ): Map => {\n let valueIndexes: number[] = [];\n\n for (const key of keys) {\n const i = input.indexOf(key + KvSeparator);\n if (i === -1) {\n continue;\n }\n valueIndexes.push(i);\n }\n valueIndexes.sort((n1, n2) => n1 - n2);\n\n let kvFields = new Map();\n let fields: string[] = new Array(valueIndexes.length);\n for (let i = 0; i < valueIndexes.length; i++) {\n const j = i + 1;\n if (j < valueIndexes.length) {\n fields[i] = input.substr(\n valueIndexes[i],\n valueIndexes[j] - valueIndexes[i]\n );\n } else {\n fields[i] = input.substr(valueIndexes[i]);\n }\n }\n\n for (let field of fields) {\n if (field === undefined) {\n continue;\n }\n const key = field.substr(0, field.indexOf(\"=\"));\n const value = field.substr(field.indexOf(\"=\") + 1).trim();\n kvFields.set(key, value);\n }\n return kvFields;\n };\n\n const configToString = useCallback((): string => {\n let strValue = \"\";\n if (host !== \"\") {\n strValue = `${strValue} host=${host}`;\n }\n if (dbName !== \"\") {\n strValue = `${strValue} dbname=${dbName}`;\n }\n if (user !== \"\") {\n strValue = `${strValue} user=${user}`;\n }\n if (password !== \"\") {\n strValue = `${strValue} password=${password}`;\n }\n if (port !== \"\") {\n strValue = `${strValue} port=${port}`;\n }\n if (sslMode !== \" \") {\n strValue = `${strValue} sslmode=${sslMode}`;\n }\n\n strValue = `${strValue} `;\n\n return strValue.trim();\n }, [host, dbName, user, password, port, sslMode]);\n\n useEffect(() => {\n if (connectionString !== \"\") {\n const formValues = [\n { key: \"connection_string\", value: connectionString },\n { key: \"table\", value: table },\n { key: \"format\", value: format },\n { key: \"queue_dir\", value: queueDir },\n { key: \"queue_limit\", value: queueLimit },\n { key: \"comment\", value: comment },\n ];\n\n onChange(formValues);\n }\n }, [\n connectionString,\n table,\n format,\n queueDir,\n queueLimit,\n comment,\n onChange,\n ]);\n\n useEffect(() => {\n const cs = configToString();\n setConnectionString(cs);\n }, [\n user,\n dbName,\n password,\n port,\n sslMode,\n host,\n setConnectionString,\n configToString,\n ]);\n\n useEffect(() => {\n if (useConnectionString) {\n // build connection_string\n const cs = configToString();\n setConnectionString(cs);\n\n return;\n }\n // parse connection_string\n const kv = parseConnectionString(connectionString, [\n \"host\",\n \"port\",\n \"dbname\",\n \"user\",\n \"password\",\n \"sslmode\",\n ]);\n setHostname(kv.get(\"host\") ? kv.get(\"host\") + \"\" : \"\");\n setPort(kv.get(\"port\") ? kv.get(\"port\") + \"\" : \"\");\n setDbName(kv.get(\"dbname\") ? kv.get(\"dbname\") + \"\" : \"\");\n setUser(kv.get(\"user\") ? kv.get(\"user\") + \"\" : \"\");\n setPassword(kv.get(\"password\") ? kv.get(\"password\") + \"\" : \"\");\n setSslMode(kv.get(\"sslmode\") ? kv.get(\"sslmode\") + \"\" : \" \");\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [useConnectionString]);\n\n return (\n \n \n {\n setUseConnectionString(e.target.checked);\n }}\n value={\"manualString\"}\n indicatorLabels={[\"On\", \"Off\"]}\n />\n \n {useConnectionString ? (\n \n \n ) => {\n setConnectionString(e.target.value);\n }}\n />\n \n \n ) : (\n \n \n \n \n ) => {\n setHostname(e.target.value);\n }}\n />\n \n \n ) => {\n setDbName(e.target.value);\n }}\n />\n \n \n ) => {\n setPort(e.target.value);\n }}\n />\n \n \n {\n if (e.target.value !== undefined) {\n setSslMode(e.target.value + \"\");\n }\n }}\n options={[\n { label: \"Enter SSL Mode\", value: \" \" },\n { label: \"Require\", value: \"require\" },\n { label: \"Disable\", value: \"disable\" },\n { label: \"Verify CA\", value: \"verify-ca\" },\n { label: \"Verify Full\", value: \"verify-full\" },\n ]}\n />\n \n \n ) => {\n setUser(e.target.value);\n }}\n />\n \n \n ) => {\n setPassword(e.target.value);\n }}\n />\n \n \n \n \n \n
\n
\n
\n )}\n \n ) => {\n setTable(e.target.value);\n }}\n />\n \n \n {\n setFormat(e.target.value);\n }}\n tooltip=\"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'\"\n selectorOptions={[\n { label: \"Namespace\", value: \"namespace\" },\n { label: \"Access\", value: \"access\" },\n ]}\n />\n \n \n ) => {\n setQueueDir(e.target.value);\n }}\n />\n \n \n ) => {\n setQueueLimit(e.target.value);\n }}\n />\n \n \n ) => {\n setComment(e.target.value);\n }}\n />\n \n
\n );\n};\n\nexport default withStyles(styles)(ConfPostgres);\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\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport RadioGroupSelector from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport { IElementValue } from \"../types\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport CommentBoxWrapper from \"../../Common/FormComponents/CommentBoxWrapper/CommentBoxWrapper\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport PredefinedList from \"../../Common/FormComponents/PredefinedList/PredefinedList\";\n\ninterface IConfMySqlProps {\n onChange: (newValue: IElementValue[]) => void;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n });\n\nconst ConfMySql = ({ onChange, classes }: IConfMySqlProps) => {\n //Local States\n const [useDsnString, setUseDsnString] = useState(false);\n const [dsnString, setDsnString] = useState(\"\");\n const [host, setHostname] = useState(\"\");\n const [dbName, setDbName] = useState(\"\");\n const [port, setPort] = useState(\"\");\n const [user, setUser] = useState(\"\");\n const [password, setPassword] = useState(\"\");\n\n const [table, setTable] = useState(\"\");\n const [format, setFormat] = useState(\"namespace\");\n const [queueDir, setQueueDir] = useState(\"\");\n const [queueLimit, setQueueLimit] = useState(\"\");\n const [comment, setComment] = useState(\"\");\n\n // dsn_string* (string) MySQL data-source-name connection string e.g. \":@tcp(:)/\"\n // table* (string) DB table name to store/update events, table is auto-created\n // format* (namespace*|access) 'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'\n // queue_dir (path) staging dir for undelivered messages e.g. '/home/events'\n // queue_limit (number) maximum limit for undelivered messages, defaults to '100000'\n // comment (sentence) optionally add a comment to this setting\n\n const parseDsnString = (\n input: string,\n keys: string[]\n ): Map => {\n let kvFields: Map = new Map();\n const regex = /(.*?):(.*?)@tcp\\((.*?):(.*?)\\)\\/(.*?)$/gm;\n let m;\n\n while ((m = regex.exec(input)) !== null) {\n // This is necessary to avoid infinite loops with zero-width matches\n if (m.index === regex.lastIndex) {\n regex.lastIndex++;\n }\n\n kvFields.set(\"user\", m[1]);\n kvFields.set(\"password\", m[2]);\n kvFields.set(\"host\", m[3]);\n kvFields.set(\"port\", m[4]);\n kvFields.set(\"dbname\", m[5]);\n }\n\n return kvFields;\n };\n\n const configToDsnString = useCallback((): string => {\n return `${user}:${password}@tcp(${host}:${port})/${dbName}`;\n }, [user, password, host, port, dbName]);\n\n useEffect(() => {\n if (dsnString !== \"\") {\n const formValues = [\n { key: \"dsn_string\", value: dsnString },\n { key: \"table\", value: table },\n { key: \"format\", value: format },\n { key: \"queue_dir\", value: queueDir },\n { key: \"queue_limit\", value: queueLimit },\n { key: \"comment\", value: comment },\n ];\n\n onChange(formValues);\n }\n }, [dsnString, table, format, queueDir, queueLimit, comment, onChange]);\n\n useEffect(() => {\n const cs = configToDsnString();\n setDsnString(cs);\n }, [user, dbName, password, port, host, setDsnString, configToDsnString]);\n\n const switcherChangeEvt = (event: React.ChangeEvent) => {\n if (event.target.checked) {\n // build dsn_string\n const cs = configToDsnString();\n setDsnString(cs);\n } else {\n // parse dsn_string\n const kv = parseDsnString(dsnString, [\n \"host\",\n \"port\",\n \"dbname\",\n \"user\",\n \"password\",\n ]);\n setHostname(kv.get(\"host\") ? kv.get(\"host\") + \"\" : \"\");\n setPort(kv.get(\"port\") ? kv.get(\"port\") + \"\" : \"\");\n setDbName(kv.get(\"dbname\") ? kv.get(\"dbname\") + \"\" : \"\");\n setUser(kv.get(\"user\") ? kv.get(\"user\") + \"\" : \"\");\n setPassword(kv.get(\"password\") ? kv.get(\"password\") + \"\" : \"\");\n }\n\n setUseDsnString(event.target.checked);\n };\n\n return (\n \n \n \n \n {useDsnString ? (\n \n \n ) => {\n setDsnString(e.target.value);\n }}\n />\n \n \n ) : (\n \n \n \n \n ) => {\n setHostname(e.target.value);\n }}\n />\n \n \n ) => {\n setDbName(e.target.value);\n }}\n />\n \n \n ) => {\n setPort(e.target.value);\n }}\n />\n \n\n \n ) => {\n setUser(e.target.value);\n }}\n />\n \n \n ) => {\n setPassword(e.target.value);\n }}\n />\n \n \n \n \n \n
\n
\n
\n )}\n \n ) => {\n setTable(e.target.value);\n }}\n />\n \n \n {\n setFormat(e.target.value);\n }}\n tooltip=\"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'\"\n selectorOptions={[\n { label: \"Namespace\", value: \"namespace\" },\n { label: \"Access\", value: \"access\" },\n ]}\n />\n \n \n ) => {\n setQueueDir(e.target.value);\n }}\n />\n \n \n ) => {\n setQueueLimit(e.target.value);\n }}\n />\n \n \n ) => {\n setComment(e.target.value);\n }}\n />\n \n
\n );\n};\n\nexport default withStyles(styles)(ConfMySql);\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, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button } from \"@material-ui/core\";\nimport ConfPostgres from \"../CustomForms/ConfPostgres\";\nimport api from \"../../../../common/api\";\nimport { serverNeedsRestart, setErrorSnackMessage } from \"../../../../actions\";\nimport {\n notificationEndpointsFields,\n notifyMysql,\n notifyPostgres,\n removeEmptyFields,\n} from \"../utils\";\nimport { IElementValue } from \"../types\";\nimport {\n modalBasic,\n settingsCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { servicesList } from \"./utils\";\nimport ConfMySql from \"../CustomForms/ConfMySql\";\nimport ConfTargetGeneric from \"../ConfTargetGeneric\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n ...settingsCommon,\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n lambdaFormIndicator: {\n display: \"flex\",\n marginBottom: 40,\n },\n customTitle: {\n ...settingsCommon.customTitle,\n marginTop: 0,\n },\n settingsFormContainer: {\n ...settingsCommon.settingsFormContainer,\n height: \"calc(100vh - 422px)\",\n },\n });\n\ninterface IAddNotificationEndpointProps {\n service: string;\n saveAndRefresh: any;\n serverNeedsRestart: typeof serverNeedsRestart;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n classes: any;\n}\n\nconst AddNotificationEndpoint = ({\n service,\n saveAndRefresh,\n serverNeedsRestart,\n classes,\n setErrorSnackMessage,\n}: IAddNotificationEndpointProps) => {\n //Local States\n const [valuesArr, setValueArr] = useState([]);\n const [saving, setSaving] = useState(false);\n\n //Effects\n\n useEffect(() => {\n if (saving) {\n const payload = {\n key_values: removeEmptyFields(valuesArr),\n };\n api\n .invoke(\"PUT\", `/api/v1/configs/${service}`, payload)\n .then(() => {\n setSaving(false);\n serverNeedsRestart(true);\n saveAndRefresh();\n })\n .catch((err) => {\n setSaving(false);\n setErrorSnackMessage(err);\n });\n }\n }, [\n saving,\n serverNeedsRestart,\n service,\n valuesArr,\n saveAndRefresh,\n setErrorSnackMessage,\n ]);\n\n //Fetch Actions\n const submitForm = (event: React.FormEvent) => {\n event.preventDefault();\n setSaving(true);\n };\n\n const onValueChange = useCallback(\n (newValue) => {\n setValueArr(newValue);\n },\n [setValueArr]\n );\n\n let srvComponent;\n switch (service) {\n case notifyPostgres: {\n srvComponent = ;\n break;\n }\n case notifyMysql: {\n srvComponent = ;\n break;\n }\n default: {\n const fields = get(notificationEndpointsFields, service, []);\n\n srvComponent = (\n \n );\n }\n }\n\n const targetElement = servicesList.find(\n (element) => element.actionTrigger === service\n );\n\n return (\n \n {service !== \"\" && (\n \n
\n \n {targetElement ? targetElement.targetTitle : \"\"} - Add Lambda\n Notification Target\n \n \n {srvComponent}\n \n \n \n \n Save\n \n \n \n \n \n
\n )}\n
\n );\n};\n\nconst mapDispatchToProps = {\n serverNeedsRestart,\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(AddNotificationEndpoint));\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\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { servicesList } from \"./utils\";\nimport {\n settingsCommon,\n typesSelection,\n} from \"../../Common/FormComponents/common/styleLibrary\";\n\ninterface INotificationTypeSelector {\n classes: any;\n setService: (trigger: string) => any;\n}\n\nconst nonLogos = servicesList.filter((elService) => elService.logo === \"\");\nconst withLogos = servicesList.filter((elService) => elService.logo !== \"\");\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...settingsCommon,\n customTitle: {\n ...settingsCommon.customTitle,\n marginTop: 0,\n },\n ...typesSelection,\n });\n\nconst NotificationTypeSelector = ({\n classes,\n setService,\n}: INotificationTypeSelector) => {\n return (\n \n \n \n \n Pick a supported service\n \n \n
\n {nonLogos.map((item) => {\n return (\n {\n setService(item.actionTrigger);\n }}\n >\n {item.targetTitle.toUpperCase()}\n \n );\n })}\n
\n
\n {withLogos.map((item) => {\n return (\n {\n setService(item.actionTrigger);\n }}\n >\n \n \n );\n })}\n
\n
\n
\n
\n
\n );\n};\n\nexport default withStyles(styles)(NotificationTypeSelector);\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, { useEffect, useState, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { IconButton, TextField } from \"@material-ui/core\";\nimport { red } from \"@material-ui/core/colors\";\nimport Grid from \"@material-ui/core/Grid\";\nimport FiberManualRecordIcon from \"@material-ui/icons/FiberManualRecord\";\nimport Button from \"@material-ui/core/Button\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport {\n NotificationEndpointItem,\n NotificationEndpointsList,\n TransformedEndpointItem,\n} from \"./types\";\nimport { notificationTransform } from \"./utils\";\nimport { CreateIcon } from \"../../../../icons\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport AddNotificationEndpoint from \"./AddNotificationEndpoint\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n settingsCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../../common/api\";\nimport SlideOptions from \"../../Common/SlideOptions/SlideOptions\";\nimport BackSettingsIcon from \"../../../../icons/BackSettingsIcon\";\nimport NotificationTypeSelector from \"./NotificationTypeSelector\";\nimport RefreshIcon from \"@material-ui/icons/Refresh\";\n\ninterface IListNotificationEndpoints {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...actionsTray,\n ...searchField,\n ...settingsCommon,\n ...containerForHeader(theme.spacing(4)),\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n iconText: {\n lineHeight: \"24px\",\n },\n customConfigurationPage: {\n height: \"calc(100vh - 410px)\",\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n lambdaContainer: {\n padding: \"15px 0\",\n },\n actionsTray: {\n ...actionsTray.actionsTray,\n padding: \"0 38px\",\n },\n });\n\nconst ListNotificationEndpoints = ({\n classes,\n setErrorSnackMessage,\n}: IListNotificationEndpoints) => {\n //Local States\n const [records, setRecords] = useState([]);\n const [filter, setFilter] = useState(\"\");\n const [isLoading, setIsLoading] = useState(false);\n const [currentPanel, setCurrentPanel] = useState(0);\n const [service, setService] = useState(\"\");\n\n //Effects\n // load records on mount\n useEffect(() => {\n if (isLoading) {\n const fetchRecords = () => {\n api\n .invoke(\"GET\", `/api/v1/admin/notification_endpoints`)\n .then((res: NotificationEndpointsList) => {\n let resNotEndList: NotificationEndpointItem[] = [];\n if (res.notification_endpoints !== null) {\n resNotEndList = res.notification_endpoints;\n }\n setRecords(notificationTransform(resNotEndList));\n setIsLoading(false);\n })\n .catch((err) => {\n setErrorSnackMessage(err);\n setIsLoading(false);\n });\n };\n fetchRecords();\n }\n }, [isLoading, setErrorSnackMessage]);\n\n useEffect(() => {\n setIsLoading(true);\n }, []);\n\n const filteredRecords = records.filter((b: TransformedEndpointItem) => {\n if (filter === \"\") {\n return true;\n }\n return b.service_name.indexOf(filter) >= 0;\n });\n\n const statusDisplay = (status: string) => {\n return (\n \n \n {status}\n \n );\n };\n\n const openNewLambdaSelector = () => {\n setCurrentPanel(1);\n };\n\n const backClick = () => {\n setService(\"\");\n setCurrentPanel(currentPanel - 1);\n };\n\n const saveAndRefresh = () => {\n setIsLoading(true);\n setCurrentPanel(0);\n setService(\"\");\n };\n\n return (\n \n \n \n \n
\n \n \n \n {\n setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n {\n setIsLoading(true);\n }}\n >\n \n \n }\n onClick={openNewLambdaSelector}\n >\n Add Notification Target\n \n \n \n
\n
\n \n \n \n
\n ,\n \n \n \n \n Back To Lambda Notifications\n \n \n \n {\n setService(serviceName);\n setCurrentPanel(2);\n }}\n />\n \n ,\n \n \n \n \n Back To Supported Services\n \n \n \n \n \n ,\n ]}\n currentSlide={currentPanel}\n />\n
\n
\n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(ListNotificationEndpoints));\n","import React from \"react\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n errorBlock: {\n color: theme.palette.error.main,\n },\n });\n\ninterface IErrorBlockProps {\n classes: any;\n errorMessage: string;\n withBreak?: boolean;\n}\n\nconst ErrorBlock = ({\n classes,\n errorMessage,\n withBreak = true,\n}: IErrorBlockProps) => {\n return (\n \n {withBreak &&
}\n \n {errorMessage}\n \n
\n );\n};\n\nexport default withStyles(styles)(ErrorBlock);\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, { useState } from \"react\";\nimport get from \"lodash/get\";\nimport { Grid, InputLabel, Tooltip } from \"@material-ui/core\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport AttachFileIcon from \"@material-ui/icons/AttachFile\";\nimport CancelIcon from \"@material-ui/icons/Cancel\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport { fileProcess } from \"./utils\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport ErrorBlock from \"../../../../shared/ErrorBlock\";\n\ninterface InputBoxProps {\n label: string;\n classes: any;\n onChange: (e: string, i: string) => void;\n id: string;\n name: string;\n disabled?: boolean;\n tooltip?: string;\n required?: boolean;\n error?: string;\n accept?: string;\n value?: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...fieldBasic,\n ...tooltipHelper,\n textBoxContainer: {\n flexGrow: 1,\n position: \"relative\",\n flexDirection: \"column\",\n },\n errorState: {\n color: \"#b53b4b\",\n fontSize: 14,\n position: \"absolute\",\n top: 7,\n right: 7,\n },\n errorText: {\n margin: \"0\",\n fontSize: \"0.75rem\",\n marginTop: 3,\n textAlign: \"left\",\n fontFamily: \"Lato,sans-serif\",\n fontWeight: 400,\n lineHeight: \"1.66\",\n color: \"#dc1f2e\",\n },\n valueString: {\n maxWidth: 350,\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n marginTop: 2,\n },\n fileReselect: {\n display: \"flex\",\n alignItems: \"center\",\n },\n fieldBottom: {\n borderBottom: \"#9c9c9c 1px solid\",\n },\n fileInputField: {\n margin: \"13px 0\",\n },\n });\n\nconst FileSelector = ({\n label,\n classes,\n onChange,\n id,\n name,\n disabled = false,\n tooltip = \"\",\n required,\n error = \"\",\n accept = \"\",\n value = \"\",\n}: InputBoxProps) => {\n const [showFileSelector, setShowSelector] = useState(false);\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 {showFileSelector || value === \"\" ? (\n
\n {\n const fileName = get(e, \"target.files[0].name\", \"\");\n fileProcess(e, (data: any) => {\n onChange(data, fileName);\n });\n }}\n accept={accept}\n required={required}\n disabled={disabled}\n className={classes.fileInputField}\n />\n\n {value !== \"\" && (\n {\n setShowSelector(false);\n }}\n disableRipple={false}\n disableFocusRipple={false}\n >\n \n \n )}\n\n {error !== \"\" && }\n
\n ) : (\n
\n
{value}
\n {\n setShowSelector(true);\n }}\n disableRipple={false}\n disableFocusRipple={false}\n >\n \n \n
\n )}\n \n
\n );\n};\n\nexport default withStyles(styles)(FileSelector);\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\nexport const fileProcess = (evt: any, callback: any) => {\n const file = evt.target.files[0];\n const reader = new FileReader();\n reader.readAsDataURL(file);\n\n reader.onload = () => {\n // reader.readAsDataURL(file) output will be something like: data:application/x-x509-ca-cert;base64,LS0tLS1CRUdJTiBDRVJUSU\n // we care only about the actual base64 part (everything after \"data:application/x-x509-ca-cert;base64,\")\n const fileBase64 = reader.result;\n if (fileBase64) {\n const fileArray = fileBase64.toString().split(\"base64,\");\n\n if (fileArray.length === 2) {\n callback(fileArray[1]);\n }\n }\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, { Fragment, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button } from \"@material-ui/core\";\nimport api from \"../../../../common/api\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport {\n modalBasic,\n settingsCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FileSelector from \"../../Common/FormComponents/FileSelector/FileSelector\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...modalBasic,\n ...settingsCommon,\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n customTitle: {\n ...settingsCommon.customTitle,\n marginTop: 0,\n },\n settingsFormContainer: {\n ...settingsCommon.settingsFormContainer,\n height: \"calc(100vh - 422px)\",\n },\n });\n\ninterface IAddNotificationEndpointProps {\n saveAndRefresh: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n classes: any;\n type: string;\n}\n\nconst AddTierConfiguration = ({\n saveAndRefresh,\n classes,\n setErrorSnackMessage,\n type,\n}: IAddNotificationEndpointProps) => {\n //Local States\n const [saving, setSaving] = useState(false);\n\n // Form Items\n const [name, setName] = useState(\"\");\n const [endpoint, setEndpoint] = useState(\"\");\n const [bucket, setBucket] = useState(\"\");\n const [prefix, setPrefix] = useState(\"\");\n const [region, setRegion] = useState(\"\");\n const [storageClass, setStorageClass] = useState(\"\");\n\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n\n const [creds, setCreds] = useState(\"\");\n const [encodedCreds, setEncodedCreds] = useState(\"\");\n\n const [accountName, setAccountName] = useState(\"\");\n const [accountKey, setAccountKey] = useState(\"\");\n\n const [titleSelection, setTitleSelection] = useState(\"\");\n\n // Validations\n const [isFormValid, setIsFormValid] = useState(true);\n\n //Effects\n\n useEffect(() => {\n if (saving) {\n let request = {};\n let fields = {\n name,\n endpoint,\n bucket,\n prefix,\n region,\n };\n\n let tierType = type;\n\n if (type === \"minio\") {\n tierType = \"s3\";\n }\n\n switch (type) {\n case \"minio\":\n case \"s3\":\n request = {\n s3: {\n ...fields,\n accesskey: accessKey,\n secretkey: secretKey,\n storageclass: storageClass,\n },\n };\n break;\n case \"gcs\":\n request = {\n gcs: {\n ...fields,\n creds: encodedCreds,\n },\n };\n break;\n case \"azure\":\n request = {\n azure: {\n ...fields,\n accountname: accountName,\n accountkey: accountKey,\n },\n };\n }\n\n let payload = {\n type: tierType,\n ...request,\n };\n\n api\n .invoke(\"POST\", `/api/v1/admin/tiers`, payload)\n .then(() => {\n setSaving(false);\n saveAndRefresh();\n })\n .catch((err) => {\n setSaving(false);\n setErrorSnackMessage(err);\n });\n }\n }, [\n accessKey,\n accountKey,\n accountName,\n bucket,\n encodedCreds,\n endpoint,\n name,\n prefix,\n region,\n saveAndRefresh,\n saving,\n secretKey,\n setErrorSnackMessage,\n storageClass,\n type,\n ]);\n\n useEffect(() => {\n let valid = true;\n if (type === \"\") {\n valid = false;\n }\n\n if (type === \"\") {\n valid = false;\n }\n if (name === \"\") {\n valid = false;\n }\n if (endpoint === \"\") {\n valid = false;\n }\n if (bucket === \"\") {\n valid = false;\n }\n if (prefix === \"\") {\n valid = false;\n }\n if (region === \"\") {\n valid = false;\n }\n\n if (type === \"s3\" || type === \"minio\") {\n if (accessKey === \"\") {\n valid = false;\n }\n if (secretKey === \"\") {\n valid = false;\n }\n }\n\n if (type === \"gcs\") {\n if (encodedCreds === \"\") {\n valid = false;\n }\n }\n\n if (type === \"azure\") {\n if (accountName === \"\") {\n valid = false;\n }\n if (accountKey === \"\") {\n valid = false;\n }\n }\n\n setIsFormValid(valid);\n }, [\n accessKey,\n accountKey,\n accountName,\n bucket,\n encodedCreds,\n endpoint,\n isFormValid,\n name,\n prefix,\n region,\n secretKey,\n storageClass,\n type,\n ]);\n\n useEffect(() => {\n switch (type) {\n case \"gcs\":\n setEndpoint(\"https://storage.googleapis.com/\");\n setTitleSelection(\"Google Cloud\");\n break;\n case \"s3\":\n setEndpoint(\"https://s3.amazonaws.com\");\n setTitleSelection(\"Amazon S3\");\n break;\n case \"azure\":\n setEndpoint(\"http://blob.core.windows.net\");\n setTitleSelection(\"Azure\");\n break;\n case \"minio\":\n setEndpoint(\"\");\n setTitleSelection(\"MinIO\");\n }\n }, [type]);\n\n //Fetch Actions\n const submitForm = (event: React.FormEvent) => {\n event.preventDefault();\n setSaving(true);\n };\n\n return (\n \n
\n \n {titleSelection} - Add Tier Configuration\n \n \n \n {type !== \"\" && (\n \n ) => {\n setName(e.target.value);\n }}\n />\n ) => {\n setEndpoint(e.target.value);\n }}\n />\n {type === \"s3\" ||\n (type === \"minio\" && (\n \n ) => {\n setAccessKey(e.target.value);\n }}\n />\n ) => {\n setSecretKey(e.target.value);\n }}\n />\n \n ))}\n {type === \"gcs\" && (\n \n {\n setEncodedCreds(encodedValue);\n setCreds(fileName);\n }}\n value={creds}\n />\n \n )}\n {type === \"azure\" && (\n \n ) => {\n setAccountName(e.target.value);\n }}\n />\n ) => {\n setAccountKey(e.target.value);\n }}\n />\n \n )}\n ) => {\n setBucket(e.target.value);\n }}\n />\n ) => {\n setPrefix(e.target.value);\n }}\n />\n ) => {\n setRegion(e.target.value);\n }}\n />\n {type === \"s3\" ||\n (type === \"minio\" && (\n ) => {\n setStorageClass(e.target.value);\n }}\n />\n ))}\n \n )}\n \n \n \n \n \n Save\n \n \n \n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddTierConfiguration));\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, { useState, useEffect, Fragment } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FileSelector from \"../../Common/FormComponents/FileSelector/FileSelector\";\nimport api from \"../../../../common/api\";\nimport { ITierElement } from \"./types\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\n\ninterface ITierCredentialsModal {\n open: boolean;\n closeModalAndRefresh: (refresh: boolean) => any;\n classes: any;\n tierData: ITierElement;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\nconst UpdateTierCredentialsModal = ({\n open,\n closeModalAndRefresh,\n classes,\n tierData,\n setModalErrorSnackMessage,\n}: ITierCredentialsModal) => {\n const [savingTiers, setSavingTiers] = useState(false);\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n\n const [creds, setCreds] = useState(\"\");\n const [encodedCreds, setEncodedCreds] = useState(\"\");\n\n const [accountName, setAccountName] = useState(\"\");\n const [accountKey, setAccountKey] = useState(\"\");\n\n // Validations\n const [isFormValid, setIsFormValid] = useState(true);\n\n const type = get(tierData, \"type\", \"\");\n const name = get(tierData, `${type}.name`, \"\");\n\n useEffect(() => {\n let valid = true;\n\n if (type === \"s3\" || type === \"azure\") {\n if (accountName === \"\" || accountKey === \"\") {\n valid = false;\n }\n } else if (type === \"gcs\") {\n if (encodedCreds === \"\") {\n valid = false;\n }\n }\n setIsFormValid(valid);\n }, [accountKey, accountName, encodedCreds, type]);\n\n const addRecord = () => {\n let rules = {};\n\n if (type === \"s3\" || type === \"azure\") {\n rules = {\n access_key: accountName,\n secret_key: accountKey,\n };\n } else if (type === \"gcs\") {\n rules = {\n creds: encodedCreds,\n };\n }\n if (name !== \"\") {\n api\n .invoke(\"PUT\", `/api/v1/admin/tiers/${type}/${name}/credentials`, rules)\n .then(() => {\n setSavingTiers(false);\n closeModalAndRefresh(true);\n })\n .catch((err) => {\n setSavingTiers(false);\n setModalErrorSnackMessage(err);\n });\n } else {\n setModalErrorSnackMessage(\n \"There was an error retrieving tier information\"\n );\n }\n };\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n title={`Update Credentials - ${type} / ${name}`}\n >\n ) => {\n e.preventDefault();\n setSavingTiers(true);\n addRecord();\n }}\n >\n \n \n {type === \"s3\" && (\n \n ) => {\n setAccessKey(e.target.value);\n }}\n />\n ) => {\n setSecretKey(e.target.value);\n }}\n />\n \n )}\n {type === \"gcs\" && (\n \n {\n setEncodedCreds(encodedValue);\n setCreds(fileName);\n }}\n value={creds}\n />\n \n )}\n {type === \"azure\" && (\n \n ) => {\n setAccountName(e.target.value);\n }}\n />\n ) => {\n setAccountKey(e.target.value);\n }}\n />\n \n )}\n \n \n \n Save\n \n \n {savingTiers && (\n \n \n \n )}\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(UpdateTierCredentialsModal));\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, { useEffect, useState, Fragment } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { IconButton, TextField } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Button from \"@material-ui/core/Button\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n settingsCommon,\n typesSelection,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { CreateIcon } from \"../../../../icons\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport { ITierElement, ITierResponse } from \"./types\";\nimport api from \"../../../../common/api\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport SlideOptions from \"../../Common/SlideOptions/SlideOptions\";\nimport BackSettingsIcon from \"../../../../icons/BackSettingsIcon\";\nimport AddTierConfiguration from \"./AddTierConfiguration\";\nimport UpdateTierCredentiasModal from \"./UpdateTierCredentiasModal\";\nimport RefreshIcon from \"@material-ui/icons/Refresh\";\n\ninterface IListTiersConfig {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...actionsTray,\n ...searchField,\n ...settingsCommon,\n ...typesSelection,\n ...containerForHeader(theme.spacing(4)),\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n iconText: {\n lineHeight: \"24px\",\n },\n customConfigurationPage: {\n height: \"calc(100vh - 410px)\",\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n lambdaContainer: {\n padding: \"15px 0\",\n },\n actionsTray: {\n ...actionsTray.actionsTray,\n padding: \"0 38px\",\n },\n customTitle: {\n ...settingsCommon.customTitle,\n marginTop: 0,\n },\n });\n\nconst ListTiersConfiguration = ({\n classes,\n setErrorSnackMessage,\n}: IListTiersConfig) => {\n const [records, setRecords] = useState([]);\n const [filter, setFilter] = useState(\"\");\n const [isLoading, setIsLoading] = useState(true);\n const [currentPanel, setCurrentPanel] = useState(0);\n const [updateCredentialsOpen, setUpdateCredentialsOpen] = useState(\n false\n );\n const [selectedTier, setSelectedTier] = useState({\n type: \"unsupported\",\n });\n const [type, setType] = useState(\"\");\n\n useEffect(() => {\n if (isLoading) {\n const fetchRecords = () => {\n api\n .invoke(\"GET\", `/api/v1/admin/tiers`)\n .then((res: ITierResponse) => {\n setRecords(res.items || []);\n setIsLoading(false);\n })\n .catch((err) => {\n setErrorSnackMessage(err);\n setIsLoading(false);\n });\n };\n fetchRecords();\n }\n }, [isLoading, setErrorSnackMessage]);\n\n const filteredRecords = records.filter((b: ITierElement) => {\n if (filter === \"\") {\n return true;\n }\n const getItemName = get(b, `${b.type}.name`, \"\");\n const getItemType = get(b, `type`, \"\");\n\n return getItemName.indexOf(filter) >= 0 || getItemType.indexOf(filter) >= 0;\n });\n\n const backClick = () => {\n setCurrentPanel(currentPanel - 1);\n };\n\n const addTier = () => {\n setCurrentPanel(1);\n };\n\n const tierAdded = () => {\n setCurrentPanel(0);\n setIsLoading(true);\n };\n\n const renderTierName = (item: ITierElement) => {\n const name = get(item, `${item.type}.name`, \"\");\n\n if (name !== null) {\n return name;\n }\n\n return \"\";\n };\n\n const renderTierPrefix = (item: ITierElement) => {\n const prefix = get(item, `${item.type}.prefix`, \"\");\n\n if (prefix !== null) {\n return prefix;\n }\n\n return \"\";\n };\n\n const renderTierEndpoint = (item: ITierElement) => {\n const endpoint = get(item, `${item.type}.endpoint`, \"\");\n\n if (endpoint !== null) {\n return endpoint;\n }\n\n return \"\";\n };\n\n const renderTierBucket = (item: ITierElement) => {\n const bucket = get(item, `${item.type}.bucket`, \"\");\n\n if (bucket !== null) {\n return bucket;\n }\n\n return \"\";\n };\n\n const renderTierRegion = (item: ITierElement) => {\n const region = get(item, `${item.type}.region`, \"\");\n\n if (region !== null) {\n return region;\n }\n\n return \"\";\n };\n\n const closeTierCredentials = () => {\n setUpdateCredentialsOpen(false);\n };\n\n const typeSelect = (typeItem: string) => {\n setType(typeItem);\n setCurrentPanel(2);\n };\n\n return (\n \n {updateCredentialsOpen && (\n \n )}\n \n \n \n
\n \n \n \n {\n setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n {\n setIsLoading(true);\n }}\n >\n \n \n }\n onClick={addTier}\n >\n Add Tier\n \n \n \n
\n
\n \n {\n setSelectedTier(tierData);\n setUpdateCredentialsOpen(true);\n },\n },\n ]}\n columns={[\n {\n label: \"Tier Name\",\n elementKey: \"type\",\n renderFunction: renderTierName,\n renderFullObject: true,\n },\n {\n label: \"Type\",\n elementKey: \"type\",\n width: 150,\n },\n {\n label: \"Endpoint\",\n elementKey: \"type\",\n renderFunction: renderTierEndpoint,\n renderFullObject: true,\n },\n {\n label: \"Bucket\",\n elementKey: \"type\",\n renderFunction: renderTierBucket,\n renderFullObject: true,\n },\n {\n label: \"Prefix\",\n elementKey: \"type\",\n renderFunction: renderTierPrefix,\n renderFullObject: true,\n },\n {\n label: \"Region\",\n elementKey: \"type\",\n renderFunction: renderTierRegion,\n renderFullObject: true,\n },\n ]}\n isLoading={isLoading}\n records={filteredRecords}\n entityName=\"Tiers\"\n idField=\"service_name\"\n customPaperHeight={classes.customConfigurationPage}\n noBackground\n />\n \n
\n ,\n \n \n \n \n Back To Tiers\n \n \n \n \n Add Tier Configuration\n \n \n \n \n
\n {\n typeSelect(\"minio\");\n }}\n >\n \n \n {\n typeSelect(\"gcs\");\n }}\n >\n \n \n {\n typeSelect(\"s3\");\n }}\n >\n \n \n {\n typeSelect(\"azure\");\n }}\n >\n \n \n
\n
\n
\n
\n \n
,\n \n \n \n \n Back To Tier Type Selection\n \n \n \n {currentPanel === 2 && (\n \n )}\n \n ,\n ]}\n currentSlide={currentPanel}\n />\n
\n
\n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(ListTiersConfiguration));\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, useState } from \"react\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { Grid } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport Tab from \"@material-ui/core/Tab\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport ConfigurationsList from \"./ConfigurationPanels/ConfigurationsList\";\nimport ListNotificationEndpoints from \"./NotificationEndpoints/ListNotificationEndpoints\";\nimport ListTiersConfiguration from \"./TiersConfiguration/ListTiersConfiguration\";\nimport { AppState } from \"../../../store\";\nimport { connect } from \"react-redux\";\nimport { ISessionResponse } from \"../types\";\n\ninterface IConfigurationMain {\n classes: any;\n session: ISessionResponse;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerLabel: {\n fontSize: 22,\n fontWeight: 600,\n color: \"#000\",\n marginTop: 4,\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst ConfigurationMain = ({ classes, session }: IConfigurationMain) => {\n const [selectedTab, setSelectedTab] = useState(0);\n\n return (\n \n \n \n \n {\n setSelectedTab(newValue);\n }}\n aria-label=\"tenant-tabs\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n \n \n \n \n \n {selectedTab === 0 && (\n \n \n \n )}\n {selectedTab === 1 && (\n \n \n \n )}\n {selectedTab === 2 && (\n \n \n \n )}\n \n \n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n session: state.console.session,\n});\n\nconst connector = connect(mapState, {});\n\nexport default withStyles(styles)(connector(ConfigurationMain));\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, { useState } from \"react\";\nimport get from \"lodash/get\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { Button, TextField } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport AddIcon from \"@material-ui/icons/Add\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport EditConfiguration from \"../CustomForms/EditConfiguration\";\n\ninterface IMatchParams {\n isExact: boolean;\n params: any;\n path: string;\n}\n\ninterface IWebhookPanel {\n match: IMatchParams;\n classes: any;\n}\n\ninterface IWebhook {\n name: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n strongText: {\n fontWeight: 700,\n },\n keyName: {\n marginLeft: 5,\n },\n actionsTray: {\n textAlign: \"right\",\n \"& button\": {\n marginLeft: 10,\n },\n },\n searchField: {\n background: \"#FFFFFF\",\n padding: 12,\n borderRadius: 5,\n boxShadow: \"0px 3px 6px #00000012\",\n },\n iconText: {\n lineHeight: \"24px\",\n },\n });\n\nconst panels = {\n logger: {\n main: \"logger\",\n title: \"Logger Webhook Configuration\",\n modalTitle: \"Logger Webhook\",\n apiURL: \"\",\n configuration: {\n configuration_id: \"logger_webhook\",\n configuration_label: \"Logger Webhook\",\n },\n },\n audit: {\n main: \"audit\",\n title: \"Audit Webhook Configuration\",\n modalTitle: \"Audit Webhook\",\n apiURL: \"\",\n configuration: {\n configuration_id: \"audit_webhook\",\n configuration_label: \"Audit Webhook\",\n },\n },\n};\n\nconst WebhookPanel = ({ match, classes }: IWebhookPanel) => {\n const [addWebhookOpen, setAddWebhookOpen] = useState(false);\n const [filter, setFilter] = useState(\"\");\n const [isLoading, setIsLoading] = useState(false);\n // const [webhooks, setWebhooks] = useState([]);\n\n const pathIn = get(match, \"path\", \"\");\n const panelToDisplay = pathIn.split(\"/\");\n const panelData = get(panels, panelToDisplay[2], false);\n\n if (!panelData) {\n return null;\n }\n\n const webhooks: IWebhook[] = [];\n\n const filteredRecords: IWebhook[] = webhooks.filter((elementItem) =>\n elementItem.name.toLocaleLowerCase().includes(filter.toLocaleLowerCase())\n );\n\n const tableActions = [\n {\n type: \"edit\",\n onClick: () => {},\n },\n ];\n\n return (\n \n {addWebhookOpen && (\n {\n setIsLoading(true);\n setAddWebhookOpen(false);\n }}\n selectedConfiguration={panelData.configuration}\n />\n )}\n \n \n {panelData.title}\n \n \n
\n
\n \n {\n setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n }\n onClick={() => {\n setAddWebhookOpen(true);\n }}\n >\n Add Webhook Configuration\n \n \n \n
\n
\n \n \n \n
\n
\n );\n};\n\nexport default withStyles(styles)(WebhookPanel);\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, { useEffect, useState } from \"react\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport api from \"../../../../common/api\";\nimport { ITenant } from \"./types\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { connect } from \"react-redux\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\n\ninterface IDeleteTenant {\n deleteOpen: boolean;\n selectedTenant: ITenant;\n closeDeleteModalAndRefresh: (refreshList: boolean) => any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteTenant = ({\n deleteOpen,\n selectedTenant,\n closeDeleteModalAndRefresh,\n setErrorSnackMessage,\n}: IDeleteTenant) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n const [retypeTenant, setRetypeTenant] = useState(\"\");\n\n useEffect(() => {\n if (deleteLoading) {\n api\n .invoke(\n \"DELETE\",\n `/api/v1/namespaces/${selectedTenant.namespace}/tenants/${selectedTenant.name}`\n )\n .then(() => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [deleteLoading]);\n\n const removeRecord = () => {\n if (retypeTenant !== selectedTenant.name) {\n setErrorSnackMessage(\"Tenant name is not correct\");\n return;\n }\n setDeleteLoading(true);\n };\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete Tenant\n \n {deleteLoading && }\n \n To continue please type {selectedTenant.name} in the box.\n \n ) => {\n setRetypeTenant(event.target.value);\n }}\n label=\"\"\n value={retypeTenant}\n />\n \n \n \n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n \n Delete\n \n \n \n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n});\n\nexport default connector(DeleteTenant);\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 { IAffinityModel } from \"../../../../common/types\";\n\nexport const getDefaultAffinity = (tenantName: string, poolName: string) => {\n const defaultAffinity: IAffinityModel = {\n podAntiAffinity: {\n requiredDuringSchedulingIgnoredDuringExecution: [\n {\n labelSelector: {\n matchExpressions: [\n {\n key: \"v1.min.io/tenant\",\n operator: \"In\",\n values: [tenantName],\n },\n {\n key: \"v1.min.io/pool\",\n operator: \"In\",\n values: [poolName],\n },\n ],\n },\n topologyKey: \"kubernetes.io/hostname\",\n },\n ],\n },\n };\n return defaultAffinity;\n};\n\nexport const getNodeSelector = (\n labels: string,\n withPodAntiAffinity: boolean,\n tenantName: string,\n poolName: string\n) => {\n // Labels in the form of key1=value1&key2=value2&key3=value3...\n const splittedLabels = labels.split(\"&\");\n let matchExpressions: any = [];\n\n splittedLabels.forEach((label: string) => {\n const splitKeyValue = label.split(\"=\");\n if (splitKeyValue.length === 2) {\n matchExpressions.push({\n key: splitKeyValue[0],\n operator: \"In\",\n values: [splitKeyValue[1]],\n });\n }\n });\n\n const nodeSelector: IAffinityModel = {\n nodeAffinity: {\n requiredDuringSchedulingIgnoredDuringExecution: {\n nodeSelectorTerms: [\n {\n matchExpressions: matchExpressions,\n },\n ],\n },\n },\n };\n if (withPodAntiAffinity) {\n const def = getDefaultAffinity(tenantName, poolName);\n nodeSelector.podAntiAffinity = def.podAntiAffinity;\n }\n console.log(nodeSelector);\n return nodeSelector;\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 { IErasureCodeCalc } from \"../../../common/types\";\nimport { IMemorySize } from \"./ListTenants/types\";\nimport { KeyPair, Opts } from \"./ListTenants/utils\";\n\nexport const ADD_TENANT_SET_CURRENT_PAGE = \"ADD_TENANT/SET_CURRENT_PAGE\";\nexport const ADD_TENANT_SET_ADVANCED_MODE = \"ADD_TENANT/SET_ADVANCED_MODE\";\nexport const ADD_TENANT_UPDATE_FIELD = \"ADD_TENANT/UPDATE_FIELD\";\nexport const ADD_TENANT_SET_PAGE_VALID = \"ADD_TENANT/SET_PAGE_VALID\";\nexport const ADD_TENANT_RESET_FORM = \"ADD_TENANT/RESET_FORM\";\n\n// Name Tenant\nexport const ADD_TENANT_SET_STORAGE_CLASSES_LIST =\n \"ADD_TENANT/SET_STORAGE_CLASSES_LIST\";\nexport const ADD_TENANT_SET_LIMIT_SIZE = \"ADD_TENANT/SET_LIMIT_SIZE\";\n\n// Security\nexport const ADD_TENANT_ADD_MINIO_KEYPAIR = \"ADD_TENANT/ADD_MINIO_KEYPAIR\";\nexport const ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR =\n \"ADD_TENANT/ADD_FILE_MINIO_KEYPAIR\";\nexport const ADD_TENANT_DELETE_MINIO_KEYPAIR =\n \"ADD_TENANT/DELETE_MINIO_KEYPAIR\";\nexport const ADD_TENANT_ADD_CA_KEYPAIR = \"ADD_TENANT/ADD_CA_KEYPAIR\";\nexport const ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR =\n \"ADD_TENANT/ADD_FILE_TO_CA_KEYPAIR\";\nexport const ADD_TENANT_DELETE_CA_KEYPAIR = \"ADD_TENANT/DELETE_CA_KEYPAIR\";\nexport const ADD_TENANT_ADD_CONSOLE_CERT = \"ADD_TENANT/ADD_CONSOLE_CERT\";\n\n// Encryption\nexport const ADD_TENANT_ENCRYPTION_SERVER_CERT =\n \"ADD_TENANT/ENCRYPTION_SERVER_CERT\";\nexport const ADD_TENANT_ENCRYPTION_CLIENT_CERT =\n \"ADD_TENANT/ENCRYPTION_CLIENT_CERT\";\nexport const ADD_TENANT_ENCRYPTION_VAULT_CERT =\n \"ADD_TENANT/ENCRYPTION_VAULT_CERT\";\nexport const ADD_TENANT_ENCRYPTION_VAULT_CA = \"ADD_TENANT/ENCRYPTION_VAULT_CA\";\nexport const ADD_TENANT_ENCRYPTION_GEMALTO_CA =\n \"ADD_TENANT/ENCRYPTION_GEMALTO_CA\";\n\nexport interface ICreateTenant {\n page: number;\n validPages: string[];\n advancedModeOn: boolean;\n storageClasses: Opts[];\n limitSize: any;\n fields: IFieldStore;\n certificates: ICertificatesItems;\n}\n\nexport interface ICertificatesItems {\n minioCertificates: KeyPair[];\n caCertificates: KeyPair[];\n consoleCertificate: KeyPair;\n serverCertificate: KeyPair;\n clientCertificate: KeyPair;\n vaultCertificate: KeyPair;\n vaultCA: KeyPair;\n gemaltoCA: KeyPair;\n}\n\nexport interface IFieldStore {\n nameTenant: INameTenantFields;\n configure: IConfigureFields;\n identityProvider: IIdentityProviderFields;\n security: ISecurityFields;\n encryption: IEncryptionFields;\n tenantSize: ITenantSizeFields;\n affinity: ITenantAffinity;\n}\n\nexport interface INameTenantFields {\n tenantName: string;\n namespace: string;\n selectedStorageClass: string;\n}\n\nexport interface IConfigureFields {\n customImage: boolean;\n imageName: string;\n consoleImage: string;\n customDockerhub: boolean;\n imageRegistry: string;\n imageRegistryUsername: string;\n imageRegistryPassword: string;\n exposeMinIO: boolean;\n exposeConsole: boolean;\n prometheusCustom: boolean;\n logSearchCustom: boolean;\n logSearchVolumeSize: string;\n logSearchSizeFactor: string;\n logSearchSelectedStorageClass: string;\n logSearchImage: string;\n kesImage: string;\n logSearchPostgresImage: string;\n prometheusVolumeSize: string;\n prometheusSizeFactor: string;\n prometheusSelectedStorageClass: string;\n prometheusImage: string;\n}\n\nexport interface IIdentityProviderFields {\n idpSelection: string;\n accessKeys: string[];\n secretKeys: string[];\n openIDURL: string;\n openIDClientID: string;\n openIDSecretID: string;\n ADURL: string;\n ADSkipTLS: boolean;\n ADServerInsecure: boolean;\n ADUserNameFilter: string;\n ADGroupBaseDN: string;\n ADGroupSearchFilter: string;\n ADNameAttribute: string;\n}\n\nexport interface ISecurityFields {\n enableTLS: boolean;\n enableAutoCert: boolean;\n enableCustomCerts: boolean;\n}\n\nexport interface IEncryptionFields {\n enableEncryption: boolean;\n encryptionType: string;\n gemaltoEndpoint: string;\n gemaltoToken: string;\n gemaltoDomain: string;\n gemaltoRetry: string;\n awsEndpoint: string;\n awsRegion: string;\n awsKMSKey: string;\n awsAccessKey: string;\n awsSecretKey: string;\n awsToken: string;\n vaultEndpoint: string;\n vaultEngine: string;\n vaultNamespace: string;\n vaultPrefix: string;\n vaultAppRoleEngine: string;\n vaultId: string;\n vaultSecret: string;\n vaultRetry: string;\n vaultPing: string;\n gcpProjectID: string;\n gcpEndpoint: string;\n gcpClientEmail: string;\n gcpClientID: string;\n gcpPrivateKeyID: string;\n gcpPrivateKey: string;\n enableCustomCertsForKES: boolean;\n}\n\nexport interface ITenantSizeFields {\n volumeSize: string;\n sizeFactor: string;\n drivesPerServer: string;\n nodes: string;\n memoryNode: string;\n ecParity: string;\n ecParityChoices: Opts[];\n cleanECChoices: string[];\n maxAllocableMemo: number;\n memorySize: IMemorySize;\n distribution: any;\n ecParityCalc: IErasureCodeCalc;\n limitSize: any;\n}\n\nexport interface ITenantAffinity {\n podAffinity: \"default\" | \"nodeSelector\" | \"none\";\n nodeSelectorLabels: string;\n withPodAntiAffinity: boolean;\n}\n\nexport interface ITenantState {\n createTenant: ICreateTenant;\n}\n\nexport interface ILabelKeyPair {\n labelKey: string;\n labelValue: string;\n}\n\ninterface SetTenantWizardPage {\n type: typeof ADD_TENANT_SET_CURRENT_PAGE;\n page: number;\n}\n\ninterface SetAdvancedMode {\n type: typeof ADD_TENANT_SET_ADVANCED_MODE;\n state: boolean;\n}\n\ninterface UpdateATField {\n type: typeof ADD_TENANT_UPDATE_FIELD;\n pageName: keyof IFieldStore;\n field: keyof FieldsToHandle;\n value: any;\n}\n\ninterface SetPageValid {\n type: typeof ADD_TENANT_SET_PAGE_VALID;\n pageName: keyof IFieldStore;\n valid: boolean;\n}\n\ninterface SetStorageClassesList {\n type: typeof ADD_TENANT_SET_STORAGE_CLASSES_LIST;\n storageClasses: Opts[];\n}\n\ninterface SetLimitSize {\n type: typeof ADD_TENANT_SET_LIMIT_SIZE;\n limitSize: any;\n}\n\ninterface AddMinioKeyPair {\n type: typeof ADD_TENANT_ADD_MINIO_KEYPAIR;\n}\n\ninterface AddFileToMinioKeyPair {\n type: typeof ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR;\n id: string;\n key: string;\n fileName: string;\n value: string;\n}\n\ninterface DeleteMinioKeyPair {\n type: typeof ADD_TENANT_DELETE_MINIO_KEYPAIR;\n id: string;\n}\ninterface AddCAKeyPair {\n type: typeof ADD_TENANT_ADD_CA_KEYPAIR;\n}\n\ninterface AddFileToCAKeyPair {\n type: typeof ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR;\n id: string;\n key: string;\n fileName: string;\n value: string;\n}\n\ninterface DeleteCAKeyPair {\n type: typeof ADD_TENANT_DELETE_CA_KEYPAIR;\n id: string;\n}\n\ninterface AddFileConsoleCert {\n type: typeof ADD_TENANT_ADD_CONSOLE_CERT;\n key: string;\n fileName: string;\n value: string;\n}\n\n// Encryption Certs\ninterface AddFileServerCert {\n type: typeof ADD_TENANT_ENCRYPTION_SERVER_CERT;\n key: string;\n fileName: string;\n value: string;\n}\n\ninterface AddFileClientCert {\n type: typeof ADD_TENANT_ENCRYPTION_CLIENT_CERT;\n key: string;\n fileName: string;\n value: string;\n}\n\ninterface AddFileVaultCert {\n type: typeof ADD_TENANT_ENCRYPTION_VAULT_CERT;\n key: string;\n fileName: string;\n value: string;\n}\n\ninterface AddFileVaultCa {\n type: typeof ADD_TENANT_ENCRYPTION_VAULT_CA;\n fileName: string;\n value: string;\n}\n\ninterface AddFileGemaltoCa {\n type: typeof ADD_TENANT_ENCRYPTION_GEMALTO_CA;\n fileName: string;\n value: string;\n}\n\ninterface ResetForm {\n type: typeof ADD_TENANT_RESET_FORM;\n}\n\nexport type FieldsToHandle = INameTenantFields;\n\nexport type TenantsManagementTypes =\n | SetTenantWizardPage\n | SetAdvancedMode\n | UpdateATField\n | SetPageValid\n | SetStorageClassesList\n | SetLimitSize\n | AddMinioKeyPair\n | DeleteMinioKeyPair\n | AddCAKeyPair\n | DeleteCAKeyPair\n | AddFileConsoleCert\n | AddFileToMinioKeyPair\n | AddFileToCAKeyPair\n | AddFileServerCert\n | AddFileClientCert\n | AddFileVaultCert\n | AddFileVaultCa\n | AddFileGemaltoCa\n | ResetForm;\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 { Opts } from \"./ListTenants/utils\";\nimport {\n ADD_TENANT_SET_ADVANCED_MODE,\n ADD_TENANT_SET_CURRENT_PAGE,\n ADD_TENANT_UPDATE_FIELD,\n ADD_TENANT_SET_PAGE_VALID,\n ADD_TENANT_SET_STORAGE_CLASSES_LIST,\n ADD_TENANT_SET_LIMIT_SIZE,\n ADD_TENANT_ADD_CA_KEYPAIR,\n ADD_TENANT_DELETE_CA_KEYPAIR,\n ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR,\n ADD_TENANT_ADD_MINIO_KEYPAIR,\n ADD_TENANT_DELETE_MINIO_KEYPAIR,\n ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR,\n ADD_TENANT_ADD_CONSOLE_CERT,\n ADD_TENANT_ENCRYPTION_SERVER_CERT,\n ADD_TENANT_ENCRYPTION_CLIENT_CERT,\n ADD_TENANT_ENCRYPTION_VAULT_CERT,\n ADD_TENANT_ENCRYPTION_VAULT_CA,\n ADD_TENANT_ENCRYPTION_GEMALTO_CA,\n ADD_TENANT_RESET_FORM,\n} from \"./types\";\n\n// Basic actions\nexport const setWizardPage = (page: number) => {\n return {\n type: ADD_TENANT_SET_CURRENT_PAGE,\n page,\n };\n};\n\nexport const setAdvancedMode = (state: boolean) => {\n return {\n type: ADD_TENANT_SET_ADVANCED_MODE,\n state,\n };\n};\n\nexport const updateAddField = (\n pageName: string,\n fieldName: string,\n value: any\n) => {\n return {\n type: ADD_TENANT_UPDATE_FIELD,\n pageName,\n field: fieldName,\n value,\n };\n};\n\nexport const isPageValid = (pageName: string, valid: boolean) => {\n return {\n type: ADD_TENANT_SET_PAGE_VALID,\n pageName,\n valid,\n };\n};\n\n// Name Tenant actions\n\nexport const setStorageClassesList = (storageClasses: Opts[]) => {\n return {\n type: ADD_TENANT_SET_STORAGE_CLASSES_LIST,\n storageClasses,\n };\n};\n\nexport const setLimitSize = (limitSize: any) => {\n return {\n type: ADD_TENANT_SET_LIMIT_SIZE,\n limitSize,\n };\n};\n\n// Security actions\n\nexport const addCaCertificate = () => {\n return {\n type: ADD_TENANT_ADD_CA_KEYPAIR,\n };\n};\n\nexport const deleteCaCertificate = (id: string) => {\n return {\n type: ADD_TENANT_DELETE_CA_KEYPAIR,\n id,\n };\n};\n\nexport const addFileToCaCertificates = (\n id: string,\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR,\n id,\n key,\n fileName,\n value,\n };\n};\n\nexport const addKeyPair = () => {\n return {\n type: ADD_TENANT_ADD_MINIO_KEYPAIR,\n };\n};\n\nexport const deleteKeyPair = (id: string) => {\n return {\n type: ADD_TENANT_DELETE_MINIO_KEYPAIR,\n id,\n };\n};\n\nexport const addFileToKeyPair = (\n id: string,\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR,\n id,\n key,\n fileName,\n value,\n };\n};\n\nexport const addConsoleCertificate = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ADD_CONSOLE_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileServerCert = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ENCRYPTION_SERVER_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileClientCert = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ENCRYPTION_CLIENT_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileVaultCert = (\n key: string,\n fileName: string,\n value: string\n) => {\n return {\n type: ADD_TENANT_ENCRYPTION_VAULT_CERT,\n key,\n fileName,\n value,\n };\n};\n\nexport const addFileVaultCa = (fileName: string, value: string) => {\n return {\n type: ADD_TENANT_ENCRYPTION_VAULT_CA,\n fileName,\n value,\n };\n};\n\nexport const addFileGemaltoCa = (fileName: string, value: string) => {\n return {\n type: ADD_TENANT_ENCRYPTION_GEMALTO_CA,\n fileName,\n value,\n };\n};\n\nexport const resetAddTenantForm = () => {\n return {\n type: ADD_TENANT_RESET_FORM,\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\nexport interface IValidation {\n fieldKey: string;\n required: boolean;\n pattern?: RegExp;\n customPatternMessage?: string;\n customValidation?: boolean; // The validation to trigger the error\n customValidationMessage?: string;\n value: string;\n}\n\nexport const commonFormValidation = (fieldsValidate: IValidation[]) => {\n let returnErrors: any = {};\n\n fieldsValidate.forEach((field) => {\n if (field.required && field.value.trim() === \"\") {\n returnErrors[field.fieldKey] = \"Field cannot be empty\";\n return;\n }\n // if it's not required and the value is empty, we are done here\n if (!field.required && field.value.trim() === \"\") {\n return;\n }\n\n if (field.customValidation && field.customValidationMessage) {\n returnErrors[field.fieldKey] = field.customValidationMessage;\n return;\n }\n\n if (field.pattern && field.customPatternMessage) {\n const rgx = new RegExp(field.pattern, \"g\");\n\n if (!field.value.match(rgx)) {\n returnErrors[field.fieldKey] = field.customPatternMessage;\n }\n return;\n }\n });\n\n return returnErrors;\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\nexport const clearValidationError = (\n validationErrors: any,\n fieldKey: string\n) => {\n const newValidationElement = { ...validationErrors };\n delete newValidationElement[fieldKey];\n\n return newValidationElement;\n};\n\n// Generates a valid access/secret key string\nexport const getRandomString = function (length = 16): string {\n let retval = \"\";\n let legalcharacters =\n \"1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n for (let i = 0; i < length; i++) {\n retval +=\n legalcharacters[Math.floor(Math.random() * legalcharacters.length)];\n }\n return retval;\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, { useEffect, useState, useMemo, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport get from \"lodash/get\";\nimport debounce from \"lodash/debounce\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../../actions\";\nimport {\n setAdvancedMode,\n updateAddField,\n isPageValid,\n setStorageClassesList,\n setLimitSize,\n} from \"../../actions\";\nimport {\n IQuotaElement,\n IQuotas,\n Opts,\n getLimitSizes,\n} from \"../../ListTenants/utils\";\nimport { AppState } from \"../../../../../store\";\nimport { commonFormValidation } from \"../../../../../utils/validationFunctions\";\nimport { clearValidationError } from \"../../utils\";\nimport api from \"../../../../../common/api\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\ninterface INameTenantScreen {\n classes: any;\n storageClasses: Opts[];\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n setAdvancedMode: typeof setAdvancedMode;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n setStorageClassesList: typeof setStorageClassesList;\n setLimitSize: typeof setLimitSize;\n tenantName: string;\n namespace: string;\n selectedStorageClass: string;\n advancedMode: boolean;\n}\n\nconst NameTenant = ({\n classes,\n storageClasses,\n advancedMode,\n tenantName,\n namespace,\n selectedStorageClass,\n setAdvancedMode,\n updateAddField,\n setStorageClassesList,\n setLimitSize,\n isPageValid,\n setModalErrorSnackMessage,\n}: INameTenantScreen) => {\n const [validationErrors, setValidationErrors] = useState({});\n const [emptyNamespace, setEmptyNamespace] = useState(true);\n const [loadingNamespaceInfo, setLoadingNamespaceInfo] =\n useState(false);\n\n // Common\n const updateField = useCallback(\n (field: string, value: string) => {\n updateAddField(\"nameTenant\", field, value);\n },\n [updateAddField]\n );\n\n // Storage classes retrieval\n const getNamespaceInformation = useCallback(() => {\n updateField(\"selectedStorageClass\", \"\");\n\n setStorageClassesList([]);\n\n // Empty tenantValidation\n api\n .invoke(\"GET\", `/api/v1/namespaces/${namespace}/tenants`)\n .then((res: any[]) => {\n const tenantsList = get(res, \"tenants\", []);\n\n if (tenantsList && tenantsList.length > 0) {\n setEmptyNamespace(false);\n setLoadingNamespaceInfo(false);\n return;\n }\n setEmptyNamespace(true);\n\n // Storagequotas retrieval\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${namespace}/resourcequotas/${namespace}-storagequota`\n )\n .then((res: IQuotas) => {\n const elements: IQuotaElement[] = get(res, \"elements\", []);\n setLimitSize(getLimitSizes(res));\n\n const newStorage = elements.map((storageClass: any) => {\n const name = get(storageClass, \"name\", \"\").split(\n \".storageclass.storage.k8s.io/requests.storage\"\n )[0];\n\n return { label: name, value: name };\n });\n\n setStorageClassesList(newStorage);\n if (newStorage.length > 0) {\n updateField(\"selectedStorageClass\", newStorage[0].value);\n }\n setLoadingNamespaceInfo(false);\n })\n .catch((err: any) => {\n setLoadingNamespaceInfo(false);\n console.error(\"Namespace error: \", err);\n });\n })\n .catch((err: any) => {\n console.error(err);\n setModalErrorSnackMessage(\n \"Error validating if namespace already has tenants\"\n );\n });\n }, [\n namespace,\n setLimitSize,\n setModalErrorSnackMessage,\n setStorageClassesList,\n updateField,\n ]);\n\n const debounceNamespace = useMemo(\n () => debounce(getNamespaceInformation, 500),\n [getNamespaceInformation]\n );\n\n useEffect(() => {\n if (namespace !== \"\") {\n debounceNamespace();\n setLoadingNamespaceInfo(true);\n\n // Cancel previous debounce calls during useEffect cleanup.\n return debounceNamespace.cancel;\n }\n }, [debounceNamespace, namespace]);\n\n // Validation\n useEffect(() => {\n let customNamespaceError = false;\n let errorMessage = \"\";\n\n if (!emptyNamespace && !loadingNamespaceInfo) {\n customNamespaceError = true;\n errorMessage = \"You can only create one tenant per namespace\";\n } else if (\n storageClasses.length < 1 &&\n emptyNamespace &&\n !loadingNamespaceInfo\n ) {\n customNamespaceError = true;\n errorMessage = \"Please enter a valid namespace\";\n }\n\n const commonValidation = commonFormValidation([\n {\n fieldKey: \"tenant-name\",\n required: true,\n pattern: /^[a-z0-9-]{3,63}$/,\n customPatternMessage:\n \"Name only can contain lowercase letters, numbers and '-'. Min. Length: 3\",\n value: tenantName,\n },\n {\n fieldKey: \"namespace\",\n required: true,\n value: namespace,\n customValidation: customNamespaceError,\n customValidationMessage: errorMessage,\n },\n ]);\n\n const isValid =\n !(\"tenant-name\" in commonValidation) &&\n !(\"namespace\" in commonValidation) &&\n storageClasses.length > 0;\n\n isPageValid(\"nameTenant\", isValid);\n\n setValidationErrors(commonValidation);\n }, [\n storageClasses,\n namespace,\n tenantName,\n isPageValid,\n emptyNamespace,\n loadingNamespaceInfo,\n ]);\n\n const frmValidationCleanup = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n return (\n \n
\n

Name Tenant

\n \n How would you like to name this new tenant?\n \n
\n \n ) => {\n updateField(\"tenantName\", e.target.value);\n frmValidationCleanup(\"tenant-name\");\n }}\n label=\"Name\"\n value={tenantName}\n required\n error={validationErrors[\"tenant-name\"] || \"\"}\n />\n \n \n ) => {\n updateField(\"namespace\", e.target.value);\n frmValidationCleanup(\"namespace\");\n }}\n label=\"Namespace\"\n value={namespace}\n error={validationErrors[\"namespace\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"selectedStorageClass\", e.target.value as string);\n }}\n label=\"Storage Class\"\n value={selectedStorageClass}\n options={storageClasses}\n disabled={storageClasses.length < 1}\n />\n \n \n
\n \n Check 'Advanced Mode' for additional configuration options, such as\n configuring an Identity Provider, Encryption at rest, and customized\n TLS/SSL Certificates.\n
\n Leave 'Advanced Mode' unchecked to use the secure default settings for\n the tenant.\n
\n
\n
\n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n setAdvancedMode(checked);\n }}\n label={\"Advanced Mode\"}\n />\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n advancedMode: state.tenants.createTenant.advancedModeOn,\n tenantName: state.tenants.createTenant.fields.nameTenant.tenantName,\n namespace: state.tenants.createTenant.fields.nameTenant.namespace,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n storageClasses: state.tenants.createTenant.storageClasses,\n});\n\nconst connector = connect(mapState, {\n setModalErrorSnackMessage,\n setAdvancedMode,\n updateAddField,\n setStorageClassesList,\n setLimitSize,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(NameTenant));\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 get from \"lodash/get\";\n\nexport interface Opts {\n label: string;\n value: string;\n}\n\nexport interface IQuotaElement {\n hard: number;\n name: string;\n}\n\nexport interface IQuotas {\n elements?: IQuotaElement[];\n name: string;\n}\n\nexport const minMemReq = 2147483648;\n\nexport interface KeyPair {\n id: string;\n encoded_cert: string;\n encoded_key: string;\n cert: string;\n key: string;\n}\n\nexport const ecListTransform = (ecList: string[]): Opts[] => {\n return ecList.map((value) => {\n return { label: value, value };\n });\n};\n\nexport const getLimitSizes = (resourceQuotas: IQuotas) => {\n const quotas: IQuotaElement[] = get(resourceQuotas, \"elements\", []);\n\n const returnQuotas: any = {};\n\n quotas.forEach((rsQuota) => {\n const stCName = rsQuota.name.split(\n \".storageclass.storage.k8s.io/requests.storage\"\n )[0];\n const hard = get(rsQuota, \"hard\", 0);\n const used = get(rsQuota, \"used\", 0);\n\n returnQuotas[stCName] = hard - used;\n });\n\n return returnQuotas;\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, { Fragment, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Grid } from \"@material-ui/core\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { isPageValid, updateAddField } from \"../../actions\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError } from \"../../utils\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\n\ninterface IConfigureProps {\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n storageClasses: any;\n classes: any;\n customImage: boolean;\n imageName: string;\n consoleImage: string;\n customDockerhub: boolean;\n imageRegistry: string;\n imageRegistryUsername: string;\n imageRegistryPassword: string;\n exposeMinIO: boolean;\n exposeConsole: boolean;\n prometheusCustom: boolean;\n logSearchCustom: boolean;\n logSearchVolumeSize: string;\n logSearchSizeFactor: string;\n prometheusVolumeSize: string;\n prometheusSizeFactor: string;\n logSearchSelectedStorageClass: string;\n logSearchImage: string;\n kesImage: string;\n logSearchPostgresImage: string;\n prometheusSelectedStorageClass: string;\n prometheusImage: string;\n selectedStorageClass: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Configure = ({\n classes,\n storageClasses,\n customImage,\n imageName,\n consoleImage,\n customDockerhub,\n imageRegistry,\n imageRegistryUsername,\n imageRegistryPassword,\n exposeMinIO,\n exposeConsole,\n prometheusCustom,\n logSearchCustom,\n logSearchVolumeSize,\n logSearchSizeFactor,\n logSearchImage,\n kesImage,\n logSearchPostgresImage,\n prometheusVolumeSize,\n prometheusSizeFactor,\n logSearchSelectedStorageClass,\n prometheusSelectedStorageClass,\n prometheusImage,\n updateAddField,\n isPageValid,\n selectedStorageClass,\n}: IConfigureProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"configure\", field, value);\n },\n [updateAddField]\n );\n\n // Validation\n useEffect(() => {\n let customAccountValidation: IValidation[] = [];\n\n if (prometheusCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"prometheus_storage_class\",\n required: true,\n value: prometheusSelectedStorageClass,\n customValidation: prometheusSelectedStorageClass === \"\",\n customValidationMessage: \"Field cannot be empty\",\n },\n {\n fieldKey: \"prometheus_volume_size\",\n required: true,\n value: prometheusVolumeSize,\n customValidation:\n prometheusVolumeSize === \"\" || parseInt(prometheusVolumeSize) <= 0,\n customValidationMessage: `Volume size must be present and be greatter than 0`,\n },\n ];\n }\n if (logSearchCustom) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"log_search_storage_class\",\n required: true,\n value: logSearchSelectedStorageClass,\n customValidation: logSearchSelectedStorageClass === \"\",\n customValidationMessage: \"Field cannot be empty\",\n },\n {\n fieldKey: \"log_search_volume_size\",\n required: true,\n value: logSearchVolumeSize,\n customValidation:\n logSearchVolumeSize === \"\" || parseInt(logSearchVolumeSize) <= 0,\n customValidationMessage: `Volume size must be present and be greatter than 0`,\n },\n ];\n }\n\n if (customImage) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"image\",\n required: false,\n value: imageName,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage: \"Format must be of form: 'minio/minio:VERSION'\",\n },\n {\n fieldKey: \"consoleImage\",\n required: false,\n value: consoleImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/console:VERSION'\",\n },\n {\n fieldKey: \"logSearchImage\",\n required: false,\n value: logSearchImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/logsearchapi:VERSION'\",\n },\n {\n fieldKey: \"kesImage\",\n required: false,\n value: kesImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage: \"Format must be of form: 'minio/kes:VERSION'\",\n },\n {\n fieldKey: \"logSearchPostgresImage\",\n required: false,\n value: logSearchPostgresImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'library/postgres:VERSION'\",\n },\n {\n fieldKey: \"prometheusImage\",\n required: false,\n value: prometheusImage,\n pattern: /^((.*?)\\/(.*?):(.+))$/,\n customPatternMessage:\n \"Format must be of form: 'minio/prometheus:VERSION'\",\n },\n ];\n if (customDockerhub) {\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"registry\",\n required: true,\n value: imageRegistry,\n },\n {\n fieldKey: \"registryUsername\",\n required: true,\n value: imageRegistryUsername,\n },\n {\n fieldKey: \"registryPassword\",\n required: true,\n value: imageRegistryPassword,\n },\n ];\n }\n }\n\n const commonVal = commonFormValidation(customAccountValidation);\n\n isPageValid(\"configure\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n customImage,\n imageName,\n consoleImage,\n logSearchImage,\n kesImage,\n logSearchPostgresImage,\n prometheusImage,\n customDockerhub,\n imageRegistry,\n imageRegistryUsername,\n imageRegistryPassword,\n isPageValid,\n prometheusCustom,\n logSearchCustom,\n prometheusSelectedStorageClass,\n prometheusVolumeSize,\n logSearchSelectedStorageClass,\n logSearchVolumeSize,\n ]);\n\n useEffect(() => {\n // New default values is current selection is invalid\n if (storageClasses.length > 0) {\n const filterPrometheus = storageClasses.filter(\n (item: any) => item.value === prometheusSelectedStorageClass\n );\n if (filterPrometheus.length === 0) {\n updateField(\"prometheusSelectedStorageClass\", selectedStorageClass);\n }\n\n const filterLogSearch = storageClasses.filter(\n (item: any) => item.value === logSearchSelectedStorageClass\n );\n if (filterLogSearch.length === 0) {\n updateField(\"logSearchSelectedStorageClass\", selectedStorageClass);\n }\n }\n }, [\n logSearchSelectedStorageClass,\n prometheusSelectedStorageClass,\n selectedStorageClass,\n storageClasses,\n updateField,\n ]);\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n return (\n \n
\n

Configure

\n \n Basic configurations for tenant management\n \n
\n\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n updateField(\"customImage\", checked);\n }}\n label={\"Use custom image\"}\n />\n \n {customImage && (\n \n Please enter the MinIO docker image to use\n \n ) => {\n updateField(\"imageName\", e.target.value);\n cleanValidation(\"image\");\n }}\n label=\"MinIO's Image\"\n value={imageName}\n error={validationErrors[\"image\"] || \"\"}\n placeholder=\"E.g. minio/minio:RELEASE.2021-04-22T15-44-28Z\"\n />\n \n \n ) => {\n updateField(\"consoleImage\", e.target.value);\n cleanValidation(\"consoleImage\");\n }}\n label=\"Console's Image\"\n value={consoleImage}\n error={validationErrors[\"consoleImage\"] || \"\"}\n placeholder=\"E.g. minio/console:v0.7.2\"\n />\n \n \n ) => {\n updateField(\"logSearchImage\", e.target.value);\n cleanValidation(\"logSearchImage\");\n }}\n label=\"Log Search API's Image\"\n value={logSearchImage}\n error={validationErrors[\"logSearchImage\"] || \"\"}\n placeholder=\"E.g. minio/logsearchapi:v4.0.9\"\n />\n \n \n ) => {\n updateField(\"kesImage\", e.target.value);\n cleanValidation(\"kesImage\");\n }}\n label=\"KES Image\"\n value={kesImage}\n error={validationErrors[\"kesImage\"] || \"\"}\n placeholder=\"E.g. minio/kes:v0.14.0\"\n />\n \n \n ) => {\n updateField(\"logSearchPostgresImage\", e.target.value);\n cleanValidation(\"logSearchPostgresImage\");\n }}\n label=\"Log Search Postgres's Image\"\n value={logSearchPostgresImage}\n error={validationErrors[\"logSearchPostgresImage\"] || \"\"}\n placeholder=\"E.g. library/postgres:13\"\n />\n \n \n ) => {\n updateField(\"prometheusImage\", e.target.value);\n cleanValidation(\"prometheusImage\");\n }}\n label=\"Prometheus Image\"\n value={prometheusImage}\n error={validationErrors[\"prometheusImage\"] || \"\"}\n placeholder=\"E.g. quay.io/prometheus/prometheus:latest\"\n />\n \n \n )}\n {customImage && (\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"customDockerhub\", checked);\n }}\n label={\"Set/Update Image Registry\"}\n />\n \n \n )}\n {customDockerhub && (\n \n \n ) => {\n updateField(\"imageRegistry\", e.target.value);\n }}\n label=\"Endpoint\"\n value={imageRegistry}\n error={validationErrors[\"registry\"] || \"\"}\n placeholder=\"E.g. https://index.docker.io/v1/\"\n required\n />\n \n \n ) => {\n updateField(\"imageRegistryUsername\", e.target.value);\n }}\n label=\"Username\"\n value={imageRegistryUsername}\n error={validationErrors[\"registryUsername\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"imageRegistryPassword\", e.target.value);\n }}\n label=\"Password\"\n value={imageRegistryPassword}\n error={validationErrors[\"registryPassword\"] || \"\"}\n required\n />\n \n \n )}\n
\n

Expose Services

\n \n Whether the tenant's services should request an external IP.\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"exposeMinIO\", checked);\n }}\n label={\"Expose MiniO Service\"}\n />\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"exposeConsole\", checked);\n }}\n label={\"Expose Console Service\"}\n />\n \n\n
\n

Additional Configurations

\n \n Configure Storage Classes & Storage size for Log Search and Prometheus\n add-ons\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"logSearchCustom\", checked);\n }}\n label={\"Override Log Search defaults\"}\n />\n \n {logSearchCustom && (\n \n \n ) => {\n updateField(\n \"logSearchSelectedStorageClass\",\n e.target.value as string\n );\n }}\n label=\"Log Search Storage Class\"\n value={logSearchSelectedStorageClass}\n options={storageClasses}\n disabled={storageClasses.length < 1}\n />\n \n \n
\n
\n ) => {\n updateField(\"logSearchVolumeSize\", e.target.value);\n cleanValidation(\"log_search_volume_size\");\n }}\n label=\"Storage Size [Gi]\"\n value={logSearchVolumeSize}\n required\n error={validationErrors[\"log_search_volume_size\"] || \"\"}\n min=\"0\"\n />\n
\n
\n
\n
\n
\n )}\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"prometheusCustom\", checked);\n }}\n label={\"Override Prometheus defaults\"}\n />\n \n {prometheusCustom && (\n \n \n ) => {\n updateField(\n \"prometheusSelectedStorageClass\",\n e.target.value as string\n );\n }}\n label=\"Prometheus Storage Class\"\n value={prometheusSelectedStorageClass}\n options={storageClasses}\n disabled={storageClasses.length < 1}\n />\n \n \n
\n
\n ) => {\n updateField(\"prometheusVolumeSize\", e.target.value);\n cleanValidation(\"prometheus_volume_size\");\n }}\n label=\"Storage Size [Gi]\"\n value={prometheusVolumeSize}\n required\n error={validationErrors[\"prometheus_volume_size\"] || \"\"}\n min=\"0\"\n />\n
\n
\n
\n
\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n storageClasses: state.tenants.createTenant.storageClasses,\n customImage: state.tenants.createTenant.fields.configure.customImage,\n imageName: state.tenants.createTenant.fields.configure.imageName,\n consoleImage: state.tenants.createTenant.fields.configure.consoleImage,\n customDockerhub: state.tenants.createTenant.fields.configure.customDockerhub,\n imageRegistry: state.tenants.createTenant.fields.configure.imageRegistry,\n imageRegistryUsername:\n state.tenants.createTenant.fields.configure.imageRegistryUsername,\n imageRegistryPassword:\n state.tenants.createTenant.fields.configure.imageRegistryPassword,\n exposeMinIO: state.tenants.createTenant.fields.configure.exposeMinIO,\n exposeConsole: state.tenants.createTenant.fields.configure.exposeConsole,\n prometheusCustom:\n state.tenants.createTenant.fields.configure.prometheusCustom,\n logSearchCustom: state.tenants.createTenant.fields.configure.logSearchCustom,\n logSearchVolumeSize:\n state.tenants.createTenant.fields.configure.logSearchVolumeSize,\n logSearchSizeFactor:\n state.tenants.createTenant.fields.configure.logSearchSizeFactor,\n prometheusVolumeSize:\n state.tenants.createTenant.fields.configure.prometheusVolumeSize,\n prometheusSizeFactor:\n state.tenants.createTenant.fields.configure.prometheusSizeFactor,\n logSearchSelectedStorageClass:\n state.tenants.createTenant.fields.configure.logSearchSelectedStorageClass,\n logSearchImage: state.tenants.createTenant.fields.configure.logSearchImage,\n kesImage: state.tenants.createTenant.fields.configure.kesImage,\n logSearchPostgresImage:\n state.tenants.createTenant.fields.configure.logSearchPostgresImage,\n prometheusSelectedStorageClass:\n state.tenants.createTenant.fields.configure.prometheusSelectedStorageClass,\n prometheusImage: state.tenants.createTenant.fields.configure.prometheusImage,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(Configure));\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, useCallback, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Grid, IconButton, Tooltip, Typography } from \"@material-ui/core\";\nimport CasinoIcon from \"@material-ui/icons/Casino\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { isPageValid, updateAddField } from \"../../actions\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError, getRandomString } from \"../../utils\";\nimport RadioGroupSelector from \"../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport AddIcon from \"@material-ui/icons/Add\";\n\ninterface IIdentityProviderProps {\n classes: any;\n idpSelection: string;\n accessKeys: string[];\n secretKeys: string[];\n openIDURL: string;\n openIDClientID: string;\n openIDSecretID: string;\n ADURL: string;\n ADSkipTLS: boolean;\n ADServerInsecure: boolean;\n ADUserNameFilter: string;\n ADGroupBaseDN: string;\n ADGroupSearchFilter: string;\n ADNameAttribute: string;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n shortened: {\n gridTemplateColumns: \"auto auto 50px 50px\",\n display: \"grid\",\n gridGap: 20,\n },\n buttonTray: {\n gridTemplateColumns: \"auto auto 10px 10px\",\n display: \"grid\",\n gridGap: 0,\n height: 16,\n marginTop: 12,\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst IdentityProvider = ({\n classes,\n idpSelection,\n accessKeys,\n secretKeys,\n openIDURL,\n openIDClientID,\n openIDSecretID,\n ADURL,\n ADSkipTLS,\n ADServerInsecure,\n ADUserNameFilter,\n ADGroupBaseDN,\n ADGroupSearchFilter,\n ADNameAttribute,\n updateAddField,\n isPageValid,\n}: IIdentityProviderProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"identityProvider\", field, value);\n },\n [updateAddField]\n );\n const updateUserField = (index: number, value: string) => {\n const newUserField = [...accessKeys];\n newUserField[index] = value;\n updateField(\"accessKeys\", newUserField);\n };\n const updatePwordField = (index: number, value: string) => {\n const newUserField = [...secretKeys];\n newUserField[index] = value;\n updateField(\"secretKeys\", newUserField);\n };\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n // Validation\n\n useEffect(() => {\n let customIDPValidation: IValidation[] = [];\n\n if (idpSelection === \"Built-in\") {\n customIDPValidation = [...customIDPValidation];\n for (var i = 0; i < accessKeys.length; i++) {\n customIDPValidation.push({\n fieldKey: `accesskey-${i.toString()}`,\n required: true,\n value: accessKeys[i],\n pattern: /^[a-zA-Z0-9-]{8,63}$/,\n customPatternMessage: \"Keys must be at least length 8\",\n });\n customIDPValidation.push({\n fieldKey: `secretkey-${i.toString()}`,\n required: true,\n value: secretKeys[i],\n pattern: /^[a-zA-Z0-9-]{8,63}$/,\n customPatternMessage: \"Keys must be at least length 8\",\n });\n }\n }\n\n if (idpSelection === \"OpenID\") {\n customIDPValidation = [\n ...customIDPValidation,\n {\n fieldKey: \"openID_URL\",\n required: true,\n value: openIDURL,\n },\n {\n fieldKey: \"openID_clientID\",\n required: true,\n value: openIDClientID,\n },\n {\n fieldKey: \"openID_secretID\",\n required: true,\n value: openIDSecretID,\n },\n ];\n }\n\n if (idpSelection === \"AD\") {\n customIDPValidation = [\n ...customIDPValidation,\n {\n fieldKey: \"AD_URL\",\n required: true,\n value: ADURL,\n },\n {\n fieldKey: \"ad_userNameFilter\",\n required: true,\n value: ADUserNameFilter,\n },\n {\n fieldKey: \"ad_groupBaseDN\",\n required: true,\n value: ADGroupBaseDN,\n },\n {\n fieldKey: \"ad_groupSearchFilter\",\n required: true,\n value: ADGroupSearchFilter,\n },\n {\n fieldKey: \"ad_nameAttribute\",\n required: true,\n value: ADNameAttribute,\n },\n ];\n }\n\n const commonVal = commonFormValidation(customIDPValidation);\n\n isPageValid(\"identityProvider\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n idpSelection,\n accessKeys,\n secretKeys,\n openIDURL,\n openIDClientID,\n openIDSecretID,\n ADURL,\n ADUserNameFilter,\n ADGroupBaseDN,\n ADGroupSearchFilter,\n ADNameAttribute,\n isPageValid,\n ]);\n let inputs = null;\n if (idpSelection === \"Built-in\") {\n inputs = accessKeys.map((_, index) => {\n return (\n \n
\n ) => {\n updateUserField(index, e.target.value);\n cleanValidation(`accesskey-${index.toString()}`);\n }}\n index={index}\n key={`csv-accesskey-${index.toString()}`}\n error={validationErrors[`accesskey-${index.toString()}`] || \"\"}\n />\n ) => {\n updatePwordField(index, e.target.value);\n cleanValidation(`secretkey-${index.toString()}`);\n }}\n index={index}\n key={`csv-secretkey-${index.toString()}`}\n error={validationErrors[`secretkey-${index.toString()}`] || \"\"}\n />\n
\n \n {\n accessKeys.push(\"\");\n secretKeys.push(\"\");\n updateUserField(accessKeys.length - 1, \"\");\n updatePwordField(secretKeys.length - 1, \"\");\n }}\n >\n \n \n \n \n {\n updateUserField(index, getRandomString(16));\n updatePwordField(index, getRandomString(32));\n }}\n size={\"small\"}\n >\n \n \n \n \n {\n if (accessKeys.length > 1) {\n accessKeys.splice(index, 1);\n secretKeys.splice(index, 1);\n updateUserField(\n accessKeys.length - 1,\n accessKeys[accessKeys.length - 1]\n );\n }\n }}\n >\n \n \n \n
\n
\n
\n );\n });\n }\n return (\n \n
\n

Identity Provider

\n \n Access to the tenant can be controlled via an external Identity\n Manager.\n \n
\n \n {\n updateField(\"idpSelection\", e.target.value);\n }}\n selectorOptions={[\n { label: \"Built-in\", value: \"Built-in\" },\n { label: \"OpenID\", value: \"OpenID\" },\n { label: \"Active Directory\", value: \"AD\" },\n ]}\n />\n Add additional users\n {\" \"}\n {idpSelection === \"Built-in\" && {inputs}}\n {idpSelection === \"OpenID\" && (\n \n \n ) => {\n updateField(\"openIDURL\", e.target.value);\n cleanValidation(\"openID_URL\");\n }}\n label=\"URL\"\n value={openIDURL}\n error={validationErrors[\"openID_URL\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"openIDClientID\", e.target.value);\n cleanValidation(\"openID_clientID\");\n }}\n label=\"Client ID\"\n value={openIDClientID}\n error={validationErrors[\"openID_clientID\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"openIDSecretID\", e.target.value);\n cleanValidation(\"openID_secretID\");\n }}\n label=\"Secret ID\"\n value={openIDSecretID}\n error={validationErrors[\"openID_secretID\"] || \"\"}\n required\n />\n \n \n )}\n {idpSelection === \"AD\" && (\n \n \n ) => {\n updateField(\"ADURL\", e.target.value);\n cleanValidation(\"AD_URL\");\n }}\n label=\"URL\"\n value={ADURL}\n error={validationErrors[\"AD_URL\"] || \"\"}\n required\n />\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"ADSkipTLS\", checked);\n }}\n label={\"Skip TLS Verification\"}\n />\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"ADServerInsecure\", checked);\n }}\n label={\"Server Insecure\"}\n />\n \n {ADServerInsecure ? (\n \n \n Warning: All traffic with Active Directory will be unencrypted\n \n
\n
\n ) : null}\n \n ) => {\n updateField(\"ADUserNameFilter\", e.target.value);\n cleanValidation(\"ad_userNameFilter\");\n }}\n label=\"User Search Filter\"\n value={ADUserNameFilter}\n error={validationErrors[\"ad_userNameFilter\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"ADGroupBaseDN\", e.target.value);\n cleanValidation(\"ad_groupBaseDN\");\n }}\n label=\"Group Search Base DN\"\n value={ADGroupBaseDN}\n error={validationErrors[\"ad_groupBaseDN\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"ADGroupSearchFilter\", e.target.value);\n cleanValidation(\"ad_groupSearchFilter\");\n }}\n label=\"Group Search Filter\"\n value={ADGroupSearchFilter}\n error={validationErrors[\"ad_groupSearchFilter\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"ADNameAttribute\", e.target.value);\n cleanValidation(\"ad_nameAttribute\");\n }}\n label=\"Group Name Attribute\"\n value={ADNameAttribute}\n error={validationErrors[\"ad_nameAttribute\"] || \"\"}\n required\n />\n \n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n idpSelection: state.tenants.createTenant.fields.identityProvider.idpSelection,\n accessKeys: state.tenants.createTenant.fields.identityProvider.accessKeys,\n secretKeys: state.tenants.createTenant.fields.identityProvider.secretKeys,\n openIDURL: state.tenants.createTenant.fields.identityProvider.openIDURL,\n openIDClientID:\n state.tenants.createTenant.fields.identityProvider.openIDClientID,\n openIDSecretID:\n state.tenants.createTenant.fields.identityProvider.openIDSecretID,\n ADURL: state.tenants.createTenant.fields.identityProvider.ADURL,\n ADSkipTLS: state.tenants.createTenant.fields.identityProvider.ADSkipTLS,\n ADServerInsecure:\n state.tenants.createTenant.fields.identityProvider.ADServerInsecure,\n ADUserNameFilter:\n state.tenants.createTenant.fields.identityProvider.ADUserNameFilter,\n ADGroupBaseDN:\n state.tenants.createTenant.fields.identityProvider.ADGroupBaseDN,\n ADGroupSearchFilter:\n state.tenants.createTenant.fields.identityProvider.ADGroupSearchFilter,\n ADNameAttribute:\n state.tenants.createTenant.fields.identityProvider.ADNameAttribute,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(IdentityProvider));\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, { useEffect, useCallback, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, Divider, Grid, Typography } from \"@material-ui/core\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport {\n updateAddField,\n isPageValid,\n addFileToCaCertificates,\n deleteCaCertificate,\n addCaCertificate,\n addKeyPair,\n addFileToKeyPair,\n deleteKeyPair,\n addConsoleCertificate,\n} from \"../../actions\";\nimport { AppState } from \"../../../../../store\";\nimport { KeyPair } from \"../../ListTenants/utils\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport FileSelector from \"../../../Common/FormComponents/FileSelector/FileSelector\";\n\ninterface ISecurityProps {\n classes: any;\n enableTLS: boolean;\n enableAutoCert: boolean;\n enableCustomCerts: boolean;\n minioCertificates: KeyPair[];\n caCertificates: KeyPair[];\n consoleCertificate: KeyPair;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n addFileToCaCertificates: typeof addFileToCaCertificates;\n deleteCaCertificate: typeof deleteCaCertificate;\n addCaCertificate: typeof addCaCertificate;\n addKeyPair: typeof addKeyPair;\n addFileToKeyPair: typeof addFileToKeyPair;\n deleteKeyPair: typeof deleteKeyPair;\n addConsoleCertificate: typeof addConsoleCertificate;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Security = ({\n classes,\n enableTLS,\n enableAutoCert,\n enableCustomCerts,\n minioCertificates,\n caCertificates,\n consoleCertificate,\n updateAddField,\n isPageValid,\n addFileToCaCertificates,\n deleteCaCertificate,\n addCaCertificate,\n addKeyPair,\n addFileToKeyPair,\n deleteKeyPair,\n}: ISecurityProps) => {\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"security\", field, value);\n },\n [updateAddField]\n );\n\n // Validation\n\n useEffect(() => {\n if (!enableTLS) {\n isPageValid(\"security\", true);\n return;\n }\n if (enableAutoCert) {\n isPageValid(\"security\", true);\n return;\n }\n if (enableCustomCerts) {\n isPageValid(\"security\", true);\n return;\n }\n isPageValid(\"security\", false);\n }, [enableTLS, enableAutoCert, enableCustomCerts, isPageValid]);\n\n return (\n \n
\n

Security

\n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableTLS\", checked);\n }}\n label={\"Enable TLS\"}\n />\n Enable TLS for the tenant, this is required for Encryption Configuration\n {enableTLS && (\n \n
\n
\n \n AutoCert: MinIO Operator will generate all TLS certificates\n automatically\n \n \n Custom certificates: Allow user to provide your own certificates\n \n
\n
\n )}\n
\n {enableTLS && (\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableAutoCert\", checked);\n }}\n label={\"Enable AutoCert\"}\n />\n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableCustomCerts\", checked);\n }}\n label={\"Custom Certificates\"}\n />\n \n {enableCustomCerts && (\n \n \n \n \n MinIO Certificates\n \n \n {minioCertificates.map((keyPair: KeyPair) => (\n \n \n {\n addFileToKeyPair(\n keyPair.id,\n \"key\",\n fileName,\n encodedValue\n );\n }}\n accept=\".key,.pem\"\n id=\"tlsKey\"\n name=\"tlsKey\"\n label=\"Key\"\n value={keyPair.key}\n />\n \n \n {\n addFileToKeyPair(\n keyPair.id,\n \"cert\",\n fileName,\n encodedValue\n );\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"tlsCert\"\n name=\"tlsCert\"\n label=\"Cert\"\n value={keyPair.cert}\n />\n \n \n {\n deleteKeyPair(keyPair.id);\n }}\n color=\"secondary\"\n >\n Remove\n \n \n \n ))}\n \n \n \n \n \n \n
\n \n
\n
\n
\n \n \n \n CA Certificates\n \n \n {caCertificates.map((keyPair: KeyPair) => (\n \n \n {\n addFileToCaCertificates(\n keyPair.id,\n \"cert\",\n fileName,\n encodedValue\n );\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"tlsCert\"\n name=\"tlsCert\"\n label=\"Cert\"\n value={keyPair.cert}\n />\n \n \n {\n deleteCaCertificate(keyPair.id);\n }}\n color=\"secondary\"\n >\n Remove\n \n \n \n ))}\n \n \n \n \n \n \n
\n \n
\n
\n
\n \n \n \n Console Certificates\n \n \n \n {\n addConsoleCertificate(\"key\", fileName, encodedValue);\n }}\n accept=\".key,.pem\"\n id=\"consoleKey\"\n name=\"consoleKey\"\n label=\"Key\"\n value={consoleCertificate.key}\n />\n \n \n {\n addConsoleCertificate(\"cert\", fileName, encodedValue);\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"consoleCert\"\n name=\"consoleCert\"\n label=\"Cert\"\n value={consoleCertificate.cert}\n />\n \n \n
\n )}\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n enableTLS: state.tenants.createTenant.fields.security.enableTLS,\n enableAutoCert: state.tenants.createTenant.fields.security.enableAutoCert,\n enableCustomCerts:\n state.tenants.createTenant.fields.security.enableCustomCerts,\n minioCertificates: state.tenants.createTenant.certificates.minioCertificates,\n caCertificates: state.tenants.createTenant.certificates.caCertificates,\n consoleCertificate:\n state.tenants.createTenant.certificates.consoleCertificate,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n addFileToCaCertificates,\n deleteCaCertificate,\n addCaCertificate,\n addKeyPair,\n addFileToKeyPair,\n deleteKeyPair,\n addConsoleCertificate,\n});\n\nexport default withStyles(styles)(connector(Security));\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, useState, useEffect, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Typography } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {\n updateAddField,\n isPageValid,\n addFileServerCert,\n addFileClientCert,\n addFileVaultCert,\n addFileVaultCa,\n addFileGemaltoCa,\n} from \"../../actions\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { AppState } from \"../../../../../store\";\nimport { clearValidationError } from \"../../utils\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport FileSelector from \"../../../Common/FormComponents/FileSelector/FileSelector\";\nimport RadioGroupSelector from \"../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport { KeyPair } from \"../../ListTenants/utils\";\n\ninterface IEncryptionProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n addFileServerCert: typeof addFileServerCert;\n addFileClientCert: typeof addFileClientCert;\n addFileVaultCert: typeof addFileVaultCert;\n addFileVaultCa: typeof addFileVaultCa;\n addFileGemaltoCa: typeof addFileGemaltoCa;\n enableEncryption: boolean;\n encryptionType: string;\n gemaltoEndpoint: string;\n gemaltoToken: string;\n gemaltoDomain: string;\n gemaltoRetry: string;\n awsEndpoint: string;\n awsRegion: string;\n awsKMSKey: string;\n awsAccessKey: string;\n awsSecretKey: string;\n awsToken: string;\n vaultEndpoint: string;\n vaultEngine: string;\n vaultNamespace: string;\n vaultPrefix: string;\n vaultAppRoleEngine: string;\n vaultId: string;\n vaultSecret: string;\n vaultRetry: string;\n vaultPing: string;\n gcpProjectID: string;\n gcpEndpoint: string;\n gcpClientEmail: string;\n gcpClientID: string;\n gcpPrivateKeyID: string;\n gcpPrivateKey: string;\n enableCustomCertsForKES: boolean;\n enableAutoCert: boolean;\n enableTLS: boolean;\n enableCustomCerts: boolean;\n minioCertificates: KeyPair[];\n serverCertificate: KeyPair;\n clientCertificate: KeyPair;\n vaultCertificate: KeyPair;\n vaultCA: KeyPair;\n gemaltoCA: KeyPair;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Encryption = ({\n classes,\n updateAddField,\n isPageValid,\n addFileServerCert,\n addFileClientCert,\n addFileVaultCert,\n addFileVaultCa,\n addFileGemaltoCa,\n enableEncryption,\n enableCustomCerts,\n encryptionType,\n gemaltoEndpoint,\n gemaltoToken,\n gemaltoDomain,\n gemaltoRetry,\n awsEndpoint,\n awsRegion,\n awsKMSKey,\n awsAccessKey,\n awsSecretKey,\n awsToken,\n vaultEndpoint,\n vaultEngine,\n vaultNamespace,\n vaultPrefix,\n vaultAppRoleEngine,\n vaultId,\n vaultSecret,\n vaultRetry,\n vaultPing,\n gcpProjectID,\n gcpEndpoint,\n gcpClientEmail,\n gcpClientID,\n gcpPrivateKeyID,\n gcpPrivateKey,\n enableCustomCertsForKES,\n enableAutoCert,\n enableTLS,\n minioCertificates,\n serverCertificate,\n clientCertificate,\n vaultCertificate,\n vaultCA,\n gemaltoCA,\n}: IEncryptionProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n let encryptionAvailable = false;\n if (\n enableTLS &&\n (enableAutoCert ||\n (minioCertificates &&\n minioCertificates.filter(\n (item) => item.encoded_key && item.encoded_cert\n ).length > 0))\n ) {\n encryptionAvailable = true;\n }\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"encryption\", field, value);\n },\n [updateAddField]\n );\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n // Validation\n useEffect(() => {\n let encryptionValidation: IValidation[] = [];\n\n if (enableEncryption) {\n if (enableCustomCerts) {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"serverKey\",\n required: !enableAutoCert,\n value: serverCertificate.encoded_key,\n },\n {\n fieldKey: \"serverCert\",\n required: !enableAutoCert,\n value: serverCertificate.encoded_cert,\n },\n {\n fieldKey: \"clientKey\",\n required: !enableAutoCert,\n value: clientCertificate.encoded_key,\n },\n {\n fieldKey: \"clientCert\",\n required: !enableAutoCert,\n value: clientCertificate.encoded_cert,\n },\n ];\n }\n\n if (encryptionType === \"vault\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"vault_endpoint\",\n required: true,\n value: vaultEndpoint,\n },\n {\n fieldKey: \"vault_id\",\n required: true,\n value: vaultId,\n },\n {\n fieldKey: \"vault_secret\",\n required: true,\n value: vaultSecret,\n },\n {\n fieldKey: \"vault_ping\",\n required: false,\n value: vaultPing,\n customValidation: parseInt(vaultPing) < 0,\n customValidationMessage: \"Value needs to be 0 or greater\",\n },\n {\n fieldKey: \"vault_retry\",\n required: false,\n value: vaultRetry,\n customValidation: parseInt(vaultRetry) < 0,\n customValidationMessage: \"Value needs to be 0 or greater\",\n },\n ];\n }\n\n if (encryptionType === \"aws\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"aws_endpoint\",\n required: true,\n value: awsEndpoint,\n },\n {\n fieldKey: \"aws_region\",\n required: true,\n value: awsRegion,\n },\n {\n fieldKey: \"aws_accessKey\",\n required: true,\n value: awsAccessKey,\n },\n {\n fieldKey: \"aws_secretKey\",\n required: true,\n value: awsSecretKey,\n },\n ];\n }\n\n if (encryptionType === \"gemalto\") {\n encryptionValidation = [\n ...encryptionValidation,\n {\n fieldKey: \"gemalto_endpoint\",\n required: true,\n value: gemaltoEndpoint,\n },\n {\n fieldKey: \"gemalto_token\",\n required: true,\n value: gemaltoToken,\n },\n {\n fieldKey: \"gemalto_domain\",\n required: true,\n value: gemaltoDomain,\n },\n {\n fieldKey: \"gemalto_retry\",\n required: false,\n value: gemaltoRetry,\n customValidation: parseInt(gemaltoRetry) < 0,\n customValidationMessage: \"Value needs to be 0 or greater\",\n },\n ];\n }\n }\n\n const commonVal = commonFormValidation(encryptionValidation);\n\n isPageValid(\"encryption\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [\n enableEncryption,\n encryptionType,\n vaultEndpoint,\n vaultEngine,\n vaultId,\n vaultSecret,\n vaultPing,\n vaultRetry,\n awsEndpoint,\n awsRegion,\n awsSecretKey,\n awsAccessKey,\n gemaltoEndpoint,\n gemaltoToken,\n gemaltoDomain,\n gemaltoRetry,\n gcpProjectID,\n isPageValid,\n enableAutoCert,\n enableCustomCerts,\n serverCertificate.encoded_key,\n serverCertificate.encoded_cert,\n clientCertificate.encoded_key,\n clientCertificate.encoded_cert,\n ]);\n\n return (\n \n
\n

Encryption

\n \n How would you like to encrypt the information at rest.\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableEncryption\", checked);\n }}\n label={\"Enable Server Side Encryption\"}\n disabled={!encryptionAvailable}\n />\n \n {enableEncryption && (\n \n \n {\n updateField(\"encryptionType\", e.target.value);\n }}\n selectorOptions={[\n { label: \"Vault\", value: \"vault\" },\n { label: \"AWS\", value: \"aws\" },\n { label: \"Gemalto\", value: \"gemalto\" },\n { label: \"GCP\", value: \"gcp\" },\n ]}\n />\n \n {encryptionType === \"vault\" && (\n \n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"enableCustomCertsForKES\", checked);\n }}\n label={\"Custom Certificates\"}\n disabled={!enableAutoCert}\n />\n \n {(enableCustomCertsForKES || !enableAutoCert) && (\n \n \n \n Encryption Service Certificates\n \n \n \n \n {\n addFileServerCert(\"key\", fileName, encodedValue);\n cleanValidation(\"serverKey\");\n }}\n accept=\".key,.pem\"\n id=\"serverKey\"\n name=\"serverKey\"\n label=\"Key\"\n error={validationErrors[\"serverKey\"] || \"\"}\n value={serverCertificate.key}\n required={!enableAutoCert}\n />\n \n \n {\n addFileServerCert(\"cert\", fileName, encodedValue);\n cleanValidation(\"serverCert\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"serverCert\"\n name=\"serverCert\"\n label=\"Cert\"\n error={validationErrors[\"serverCert\"] || \"\"}\n value={serverCertificate.cert}\n required={!enableAutoCert}\n />\n \n \n\n \n \n Mutual TLS authentication\n \n \n \n \n {\n addFileClientCert(\"key\", fileName, encodedValue);\n cleanValidation(\"clientKey\");\n }}\n accept=\".key,.pem\"\n id=\"clientKey\"\n name=\"clientKey\"\n label=\"Key\"\n error={validationErrors[\"clientKey\"] || \"\"}\n value={clientCertificate.key}\n required={!enableAutoCert}\n />\n \n \n {\n addFileClientCert(\"cert\", fileName, encodedValue);\n cleanValidation(\"clientCert\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"clientCert\"\n name=\"clientCert\"\n label=\"Cert\"\n error={validationErrors[\"clientCert\"] || \"\"}\n value={clientCertificate.cert}\n required={!enableAutoCert}\n />\n \n \n \n )}\n \n ) => {\n updateField(\"vaultEndpoint\", e.target.value);\n cleanValidation(\"vault_endpoint\");\n }}\n label=\"Endpoint\"\n value={vaultEndpoint}\n error={validationErrors[\"vault_endpoint\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"vaultEngine\", e.target.value);\n cleanValidation(\"vault_engine\");\n }}\n label=\"Engine\"\n value={vaultEngine}\n />\n \n \n ) => {\n updateField(\"vaultNamespace\", e.target.value);\n }}\n label=\"Namespace\"\n value={vaultNamespace}\n />\n \n \n ) => {\n updateField(\"vaultPrefix\", e.target.value);\n }}\n label=\"Prefix\"\n value={vaultPrefix}\n />\n \n
App Role
\n \n ) => {\n updateField(\"vaultAppRoleEngine\", e.target.value);\n }}\n label=\"Engine\"\n value={vaultAppRoleEngine}\n />\n \n \n ) => {\n updateField(\"vaultId\", e.target.value);\n cleanValidation(\"vault_id\");\n }}\n label=\"AppRole ID\"\n value={vaultId}\n error={validationErrors[\"vault_id\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"vaultSecret\", e.target.value);\n cleanValidation(\"vault_secret\");\n }}\n label=\"AppRole Secret\"\n value={vaultSecret}\n error={validationErrors[\"vault_secret\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"vaultRetry\", e.target.value);\n cleanValidation(\"vault_retry\");\n }}\n label=\"Retry (Seconds)\"\n value={vaultRetry}\n error={validationErrors[\"vault_retry\"] || \"\"}\n />\n \n
Mutual TLS authentication (optional)
\n \n \n {\n addFileVaultCert(\"key\", fileName, encodedValue);\n cleanValidation(\"vault_key\");\n }}\n accept=\".key,.pem\"\n id=\"vault_key\"\n name=\"vault_key\"\n label=\"Key\"\n value={vaultCertificate.key}\n />\n \n \n {\n addFileVaultCert(\"cert\", fileName, encodedValue);\n cleanValidation(\"vault_cert\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"vault_cert\"\n name=\"vault_cert\"\n label=\"Cert\"\n value={vaultCertificate.cert}\n />\n \n \n \n {\n addFileVaultCa(fileName, encodedValue);\n cleanValidation(\"vault_ca\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"vault_ca\"\n name=\"vault_ca\"\n label=\"CA\"\n value={vaultCA.cert}\n />\n \n
Status
\n \n ) => {\n updateField(\"vaultPing\", e.target.value);\n cleanValidation(\"vault_ping\");\n }}\n label=\"Ping (Seconds)\"\n value={vaultPing}\n error={validationErrors[\"vault_ping\"] || \"\"}\n />\n \n
\n )}\n {encryptionType === \"gcp\" && (\n \n \n ) => {\n updateField(\"gcpProjectID\", e.target.value);\n }}\n label=\"Project ID\"\n value={gcpProjectID}\n />\n \n \n ) => {\n updateField(\"gcpEndpoint\", e.target.value);\n }}\n label=\"Endpoint\"\n value={gcpEndpoint}\n />\n \n
Credentials
\n \n ) => {\n updateField(\"gcpClientEmail\", e.target.value);\n }}\n label=\"Client Email\"\n value={gcpClientEmail}\n />\n \n \n ) => {\n updateField(\"gcpClientID\", e.target.value);\n }}\n label=\"Client ID\"\n value={gcpClientID}\n />\n \n \n ) => {\n updateField(\"gcpPrivateKeyID\", e.target.value);\n }}\n label=\"Private Key ID\"\n value={gcpPrivateKeyID}\n />\n \n \n ) => {\n updateField(\"gcpPrivateKey\", e.target.value);\n }}\n label=\"Private Key\"\n value={gcpPrivateKey}\n />\n \n
\n )}\n {encryptionType === \"aws\" && (\n \n \n ) => {\n updateField(\"awsEndpoint\", e.target.value);\n cleanValidation(\"aws_endpoint\");\n }}\n label=\"Endpoint\"\n value={awsEndpoint}\n error={validationErrors[\"aws_endpoint\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsRegion\", e.target.value);\n cleanValidation(\"aws_region\");\n }}\n label=\"Region\"\n value={awsRegion}\n error={validationErrors[\"aws_region\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsKMSKey\", e.target.value);\n }}\n label=\"KMS Key\"\n value={awsKMSKey}\n />\n \n
Credentials
\n \n ) => {\n updateField(\"awsAccessKey\", e.target.value);\n cleanValidation(\"aws_accessKey\");\n }}\n label=\"Access Key\"\n value={awsAccessKey}\n error={validationErrors[\"aws_accessKey\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsSecretKey\", e.target.value);\n cleanValidation(\"aws_secretKey\");\n }}\n label=\"Secret Key\"\n value={awsSecretKey}\n error={validationErrors[\"aws_secretKey\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"awsToken\", e.target.value);\n }}\n label=\"Token\"\n value={awsToken}\n />\n \n
\n )}\n {encryptionType === \"gemalto\" && (\n \n \n ) => {\n updateField(\"gemaltoEndpoint\", e.target.value);\n cleanValidation(\"gemalto_endpoint\");\n }}\n label=\"Endpoint\"\n value={gemaltoEndpoint}\n error={validationErrors[\"gemalto_endpoint\"] || \"\"}\n required\n />\n \n
Credentials
\n \n ) => {\n updateField(\"gemaltoToken\", e.target.value);\n cleanValidation(\"gemalto_token\");\n }}\n label=\"Token\"\n value={gemaltoToken}\n error={validationErrors[\"gemalto_token\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"gemaltoDomain\", e.target.value);\n cleanValidation(\"gemalto_domain\");\n }}\n label=\"Domain\"\n value={gemaltoDomain}\n error={validationErrors[\"gemalto_domain\"] || \"\"}\n required\n />\n \n \n ) => {\n updateField(\"gemaltoRetry\", e.target.value);\n cleanValidation(\"gemalto_retry\");\n }}\n label=\"Retry (seconds)\"\n value={gemaltoRetry}\n error={validationErrors[\"gemalto_retry\"] || \"\"}\n />\n \n
Custom CA Root certificate verification
\n \n {\n addFileGemaltoCa(fileName, encodedValue);\n cleanValidation(\"gemalto_ca\");\n }}\n accept=\".cer,.crt,.cert,.pem\"\n id=\"gemalto_ca\"\n name=\"gemalto_ca\"\n label=\"CA\"\n value={gemaltoCA.cert}\n />\n \n
\n )}\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n enableEncryption:\n state.tenants.createTenant.fields.encryption.enableEncryption,\n encryptionType: state.tenants.createTenant.fields.encryption.encryptionType,\n gemaltoEndpoint: state.tenants.createTenant.fields.encryption.gemaltoEndpoint,\n gemaltoToken: state.tenants.createTenant.fields.encryption.gemaltoToken,\n gemaltoDomain: state.tenants.createTenant.fields.encryption.gemaltoDomain,\n gemaltoRetry: state.tenants.createTenant.fields.encryption.gemaltoRetry,\n awsEndpoint: state.tenants.createTenant.fields.encryption.awsEndpoint,\n awsRegion: state.tenants.createTenant.fields.encryption.awsRegion,\n awsKMSKey: state.tenants.createTenant.fields.encryption.awsKMSKey,\n awsAccessKey: state.tenants.createTenant.fields.encryption.awsAccessKey,\n awsSecretKey: state.tenants.createTenant.fields.encryption.awsSecretKey,\n awsToken: state.tenants.createTenant.fields.encryption.awsToken,\n vaultEndpoint: state.tenants.createTenant.fields.encryption.vaultEndpoint,\n vaultEngine: state.tenants.createTenant.fields.encryption.vaultEngine,\n vaultNamespace: state.tenants.createTenant.fields.encryption.vaultNamespace,\n vaultPrefix: state.tenants.createTenant.fields.encryption.vaultPrefix,\n vaultAppRoleEngine:\n state.tenants.createTenant.fields.encryption.vaultAppRoleEngine,\n vaultId: state.tenants.createTenant.fields.encryption.vaultId,\n vaultSecret: state.tenants.createTenant.fields.encryption.vaultSecret,\n vaultRetry: state.tenants.createTenant.fields.encryption.vaultRetry,\n vaultPing: state.tenants.createTenant.fields.encryption.vaultPing,\n gcpProjectID: state.tenants.createTenant.fields.encryption.gcpProjectID,\n gcpEndpoint: state.tenants.createTenant.fields.encryption.gcpEndpoint,\n gcpClientEmail: state.tenants.createTenant.fields.encryption.gcpClientEmail,\n gcpClientID: state.tenants.createTenant.fields.encryption.gcpClientID,\n gcpPrivateKeyID: state.tenants.createTenant.fields.encryption.gcpPrivateKeyID,\n gcpPrivateKey: state.tenants.createTenant.fields.encryption.gcpPrivateKey,\n enableCustomCertsForKES:\n state.tenants.createTenant.fields.encryption.enableCustomCertsForKES,\n enableAutoCert: state.tenants.createTenant.fields.security.enableAutoCert,\n enableTLS: state.tenants.createTenant.fields.security.enableTLS,\n minioCertificates: state.tenants.createTenant.certificates.minioCertificates,\n serverCertificate: state.tenants.createTenant.certificates.serverCertificate,\n clientCertificate: state.tenants.createTenant.certificates.clientCertificate,\n vaultCertificate: state.tenants.createTenant.certificates.vaultCertificate,\n vaultCA: state.tenants.createTenant.certificates.vaultCA,\n gemaltoCA: state.tenants.createTenant.certificates.gemaltoCA,\n enableCustomCerts:\n state.tenants.createTenant.fields.security.enableCustomCerts,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n addFileServerCert,\n addFileClientCert,\n addFileVaultCert,\n addFileVaultCa,\n addFileGemaltoCa,\n});\n\nexport default withStyles(styles)(connector(Encryption));\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, useState, useEffect, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { AppState } from \"../../../../../store\";\nimport { updateAddField, isPageValid } from \"../../actions\";\nimport {\n wizardCommon,\n modalBasic,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport {\n getBytes,\n k8sfactorForDropdown,\n niceBytes,\n calculateDistribution,\n erasureCodeCalc,\n setMemoryResource,\n} from \"../../../../../common/utils\";\nimport { clearValidationError } from \"../../utils\";\nimport { ecListTransform, Opts } from \"../../ListTenants/utils\";\nimport { IMemorySize } from \"../../ListTenants/types\";\nimport { ICapacity, IErasureCodeCalc } from \"../../../../../common/types\";\nimport api from \"../../../../../common/api\";\nimport InputBoxWrapper from \"../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { commonFormValidation } from \"../../../../../utils/validationFunctions\";\n\ninterface ITenantSizeProps {\n classes: any;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n advancedMode: boolean;\n volumeSize: string;\n sizeFactor: string;\n drivesPerServer: string;\n nodes: string;\n memoryNode: string;\n ecParity: string;\n ecParityChoices: Opts[];\n cleanECChoices: string[];\n maxAllocableMemo: number;\n memorySize: IMemorySize;\n distribution: any;\n ecParityCalc: IErasureCodeCalc;\n limitSize: any;\n selectedStorageClass: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst TenantSize = ({\n classes,\n updateAddField,\n isPageValid,\n advancedMode,\n volumeSize,\n sizeFactor,\n drivesPerServer,\n nodes,\n memoryNode,\n ecParity,\n ecParityChoices,\n cleanECChoices,\n maxAllocableMemo,\n memorySize,\n distribution,\n ecParityCalc,\n limitSize,\n selectedStorageClass,\n}: ITenantSizeProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n const usableInformation = ecParityCalc.storageFactors.find(\n (element) => element.erasureCode === ecParity\n );\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"tenantSize\", field, value);\n },\n [updateAddField]\n );\n\n const cleanValidation = (fieldName: string) => {\n setValidationErrors(clearValidationError(validationErrors, fieldName));\n };\n\n /*Debounce functions*/\n\n // Storage Quotas\n\n const validateMemorySize = useCallback(() => {\n const memSize = parseInt(memoryNode) || 0;\n const clusterSize = volumeSize || 0;\n const maxMemSize = maxAllocableMemo || 0;\n const clusterSizeFactor = sizeFactor;\n\n const clusterSizeBytes = getBytes(\n clusterSize.toString(10),\n clusterSizeFactor\n );\n const memoSize = setMemoryResource(memSize, clusterSizeBytes, maxMemSize);\n\n updateField(\"memorySize\", memoSize);\n }, [maxAllocableMemo, memoryNode, sizeFactor, updateField, volumeSize]);\n\n const getMaxAllocableMemory = (nodes: string) => {\n if (nodes !== \"\" && !isNaN(parseInt(nodes))) {\n api\n .invoke(\n \"GET\",\n `/api/v1/cluster/max-allocatable-memory?num_nodes=${nodes}`\n )\n .then((res: { max_memory: number }) => {\n const maxMemory = res.max_memory ? res.max_memory : 0;\n updateField(\"maxAllocableMemo\", maxMemory);\n })\n .catch((err: any) => {\n updateField(\"maxAllocableMemo\", 0);\n console.error(err);\n });\n }\n };\n\n useEffect(() => {\n validateMemorySize();\n }, [memoryNode, validateMemorySize]);\n\n useEffect(() => {\n validateMemorySize();\n }, [maxAllocableMemo, validateMemorySize]);\n\n useEffect(() => {\n if (ecParityChoices.length > 0 && distribution.error === \"\") {\n const ecCodeValidated = erasureCodeCalc(\n cleanECChoices,\n distribution.persistentVolumes,\n distribution.pvSize,\n distribution.nodes\n );\n\n updateField(\"ecParityCalc\", ecCodeValidated);\n updateField(\"ecParity\", ecCodeValidated.defaultEC);\n }\n }, [ecParityChoices.length, distribution, cleanECChoices, updateField]);\n /*End debounce functions*/\n\n /*Calculate Allocation*/\n useEffect(() => {\n validateClusterSize();\n getECValue();\n getMaxAllocableMemory(nodes);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [nodes, volumeSize, sizeFactor, drivesPerServer]);\n\n const validateClusterSize = () => {\n const size = volumeSize;\n const factor = sizeFactor;\n const limitSize = getBytes(\"12\", \"Ti\", true);\n\n const clusterCapacity: ICapacity = {\n unit: factor,\n value: size.toString(),\n };\n\n const distrCalculate = calculateDistribution(\n clusterCapacity,\n parseInt(nodes),\n parseInt(limitSize),\n parseInt(drivesPerServer)\n );\n\n updateField(\"distribution\", distrCalculate);\n };\n\n const getECValue = () => {\n updateField(\"ecParity\", \"\");\n\n if (nodes.trim() !== \"\" && drivesPerServer.trim() !== \"\") {\n api\n .invoke(\"GET\", `/api/v1/get-parity/${nodes}/${drivesPerServer}`)\n .then((ecList: string[]) => {\n updateField(\"ecParityChoices\", ecListTransform(ecList));\n updateField(\"cleanECChoices\", ecList);\n })\n .catch((err: any) => {\n updateField(\"ecparityChoices\", []);\n isPageValid(\"tenantSize\", false);\n updateField(\"ecParity\", \"\");\n });\n }\n };\n /*Calculate Allocation End*/\n\n /* Validations of pages */\n\n useEffect(() => {\n const parsedSize = getBytes(volumeSize, sizeFactor, true);\n\n const commonValidation = commonFormValidation([\n {\n fieldKey: \"nodes\",\n required: true,\n value: nodes,\n customValidation: parseInt(nodes) < 4,\n customValidationMessage: \"Number of nodes cannot be less than 4\",\n },\n {\n fieldKey: \"volume_size\",\n required: true,\n value: volumeSize,\n customValidation:\n parseInt(parsedSize) < 1073741824 ||\n parseInt(parsedSize) > limitSize[selectedStorageClass],\n customValidationMessage: `Volume size must be greater than 1Gi and less than ${niceBytes(\n limitSize[selectedStorageClass],\n true\n )}`,\n },\n {\n fieldKey: \"memory_per_node\",\n required: true,\n value: memoryNode,\n customValidation: parseInt(memoryNode) < 2,\n customValidationMessage: \"Memory size must be greater than 2Gi\",\n },\n {\n fieldKey: \"drivesps\",\n required: true,\n value: drivesPerServer,\n customValidation: parseInt(drivesPerServer) < 1,\n customValidationMessage: \"There must be at least one drive\",\n },\n ]);\n\n isPageValid(\n \"tenantSize\",\n !(\"nodes\" in commonValidation) &&\n !(\"volume_size\" in commonValidation) &&\n !(\"memory_per_node\" in commonValidation) &&\n !(\"drivesps\" in commonValidation) &&\n distribution.error === \"\" &&\n ecParityCalc.error === 0 &&\n memorySize.error === \"\"\n );\n\n setValidationErrors(commonValidation);\n }, [\n nodes,\n volumeSize,\n sizeFactor,\n memoryNode,\n distribution,\n drivesPerServer,\n ecParityCalc,\n memorySize,\n limitSize,\n selectedStorageClass,\n isPageValid,\n ]);\n\n /* End Validation of pages */\n\n return (\n \n
\n

Tenant Size

\n \n Please select the desired capacity\n \n
\n {distribution.error}\n {memorySize.error}\n \n ) => {\n updateField(\"nodes\", e.target.value);\n cleanValidation(\"nodes\");\n }}\n label=\"Number of Servers\"\n value={nodes}\n min=\"4\"\n required\n error={validationErrors[\"nodes\"] || \"\"}\n />\n \n \n ) => {\n updateField(\"drivesPerServer\", e.target.value);\n cleanValidation(\"drivesps\");\n }}\n label=\"Number of Drives per Server\"\n value={drivesPerServer}\n min=\"1\"\n required\n error={validationErrors[\"drivesps\"] || \"\"}\n />\n \n \n
\n
\n ) => {\n updateField(\"volumeSize\", e.target.value);\n cleanValidation(\"volume_size\");\n }}\n label=\"Total Size\"\n value={volumeSize}\n required\n error={validationErrors[\"volume_size\"] || \"\"}\n min=\"0\"\n />\n
\n
\n ) => {\n updateField(\"sizeFactor\", e.target.value as string);\n }}\n options={k8sfactorForDropdown()}\n />\n
\n
\n
\n {advancedMode && (\n \n \n ) => {\n updateField(\"memoryNode\", e.target.value);\n cleanValidation(\"memory_per_node\");\n }}\n label=\"Memory per Node [Gi]\"\n value={memoryNode}\n required\n error={validationErrors[\"memory_per_node\"] || \"\"}\n min=\"2\"\n />\n \n \n ) => {\n updateField(\"ecParity\", e.target.value as string);\n }}\n label=\"Erasure Code Parity\"\n value={ecParity}\n options={ecParityChoices}\n />\n \n Please select the desired parity. This setting will change the max\n usable capacity in the cluster\n \n \n \n )}\n

Resource Allocation

\n \n \n \n \n Number of Servers\n \n \n {parseInt(nodes) > 0 ? nodes : \"-\"}\n \n \n \n \n Drives per Server\n \n \n {distribution ? distribution.disks : \"-\"}\n \n \n \n \n Drive Capacity\n \n \n {distribution ? niceBytes(distribution.pvSize) : \"-\"}\n \n \n \n \n Total Number of Volumes\n \n \n {distribution ? distribution.persistentVolumes : \"-\"}\n \n \n {!advancedMode && (\n \n \n Memory per Node\n \n {memoryNode} Gi\n \n )}\n \n
\n {ecParityCalc.error === 0 && usableInformation && (\n \n

Erasure Code Configuration

\n \n \n \n \n EC Parity\n \n \n {ecParity !== \"\" ? ecParity : \"-\"}\n \n \n \n \n Raw Capacity\n \n \n {niceBytes(ecParityCalc.rawCapacity)}\n \n \n \n \n Usable Capacity\n \n \n {niceBytes(usableInformation.maxCapacity)}\n \n \n \n \n Number of server failures to tolerate\n \n \n {distribution\n ? Math.floor(\n usableInformation.maxFailureTolerations /\n distribution.disks\n )\n : \"-\"}\n \n \n \n
\n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n advancedMode: state.tenants.createTenant.advancedModeOn,\n volumeSize: state.tenants.createTenant.fields.tenantSize.volumeSize,\n sizeFactor: state.tenants.createTenant.fields.tenantSize.sizeFactor,\n drivesPerServer: state.tenants.createTenant.fields.tenantSize.drivesPerServer,\n nodes: state.tenants.createTenant.fields.tenantSize.nodes,\n memoryNode: state.tenants.createTenant.fields.tenantSize.memoryNode,\n ecParity: state.tenants.createTenant.fields.tenantSize.ecParity,\n ecParityChoices: state.tenants.createTenant.fields.tenantSize.ecParityChoices,\n cleanECChoices: state.tenants.createTenant.fields.tenantSize.cleanECChoices,\n maxAllocableMemo:\n state.tenants.createTenant.fields.tenantSize.maxAllocableMemo,\n memorySize: state.tenants.createTenant.fields.tenantSize.memorySize,\n distribution: state.tenants.createTenant.fields.tenantSize.distribution,\n ecParityCalc: state.tenants.createTenant.fields.tenantSize.ecParityCalc,\n limitSize: state.tenants.createTenant.fields.tenantSize.limitSize,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n});\n\nconst connector = connect(mapState, {\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(TenantSize));\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\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport { AppState } from \"../../../../../store\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\n\ninterface IPreviewProps {\n classes: any;\n tenantName: string;\n customImage: boolean;\n imageName: string;\n consoleImage: string;\n namespace: string;\n selectedStorageClass: string;\n volumeSize: string;\n sizeFactor: string;\n advancedMode: boolean;\n enableTLS: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Preview = ({\n classes,\n tenantName,\n customImage,\n imageName,\n consoleImage,\n namespace,\n selectedStorageClass,\n volumeSize,\n sizeFactor,\n advancedMode,\n enableTLS,\n}: IPreviewProps) => {\n return (\n \n
\n

Review

\n \n Review the details of the new tenant\n \n
\n \n \n \n \n Tenant Name\n \n {tenantName}\n \n\n {customImage && (\n \n \n \n MinIO Image\n \n {imageName}\n \n \n \n Console Image\n \n {consoleImage}\n \n \n )}\n\n {namespace !== \"\" && (\n \n \n Namespace\n \n {namespace}\n \n )}\n\n \n \n Storage Class\n \n {selectedStorageClass}\n \n\n \n \n Total Size\n \n \n {volumeSize} {sizeFactor}\n \n \n {advancedMode && (\n \n \n \n Enable TLS\n \n {enableTLS ? \"Enabled\" : \"Disabled\"}\n \n \n )}\n \n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n advancedMode: state.tenants.createTenant.advancedModeOn,\n enableTLS: state.tenants.createTenant.fields.security.enableTLS,\n tenantName: state.tenants.createTenant.fields.nameTenant.tenantName,\n selectedStorageClass:\n state.tenants.createTenant.fields.nameTenant.selectedStorageClass,\n customImage: state.tenants.createTenant.fields.configure.customImage,\n imageName: state.tenants.createTenant.fields.configure.imageName,\n consoleImage: state.tenants.createTenant.fields.configure.consoleImage,\n namespace: state.tenants.createTenant.fields.nameTenant.namespace,\n volumeSize: state.tenants.createTenant.fields.tenantSize.volumeSize,\n sizeFactor: state.tenants.createTenant.fields.tenantSize.sizeFactor,\n});\n\nconst connector = connect(mapState, {});\n\nexport default withStyles(styles)(connector(Preview));\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, { useEffect, useState, useCallback, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { AppState } from \"../../../../../store\";\nimport { updateAddField, isPageValid } from \"../../actions\";\nimport { setModalErrorSnackMessage } from \"../../../../../actions\";\nimport {\n modalBasic,\n wizardCommon,\n} from \"../../../Common/FormComponents/common/styleLibrary\";\nimport { Grid } from \"@material-ui/core\";\nimport {\n commonFormValidation,\n IValidation,\n} from \"../../../../../utils/validationFunctions\";\nimport RadioGroupSelector from \"../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport QueryMultiSelector from \"../../../Common/FormComponents/QueryMultiSelector/QueryMultiSelector\";\nimport FormSwitchWrapper from \"../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\n\ninterface IAffinityProps {\n classes: any;\n podAffinity: string;\n nodeSelectorLabels: string;\n withPodAntiAffinity: boolean;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n updateAddField: typeof updateAddField;\n isPageValid: typeof isPageValid;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n });\n\nconst Affinity = ({\n classes,\n podAffinity,\n nodeSelectorLabels,\n withPodAntiAffinity,\n setModalErrorSnackMessage,\n updateAddField,\n isPageValid,\n}: IAffinityProps) => {\n const [validationErrors, setValidationErrors] = useState({});\n\n // Common\n const updateField = useCallback(\n (field: string, value: any) => {\n updateAddField(\"affinity\", field, value);\n },\n [updateAddField]\n );\n\n // Validation\n useEffect(() => {\n let customAccountValidation: IValidation[] = [];\n\n if (podAffinity === \"nodeSelector\") {\n let valid = true;\n\n const splittedLabels = nodeSelectorLabels.split(\"&\");\n\n if (splittedLabels.length === 1 && splittedLabels[0] === \"\") {\n valid = false;\n }\n\n splittedLabels.forEach((item: string, index: number) => {\n const splitItem = item.split(\"=\");\n\n if (splitItem.length !== 2) {\n valid = false;\n }\n\n if (index + 1 !== splittedLabels.length) {\n if (splitItem[0] === \"\" || splitItem[1] === \"\") {\n valid = false;\n }\n }\n });\n\n customAccountValidation = [\n ...customAccountValidation,\n {\n fieldKey: \"labels\",\n required: true,\n value: nodeSelectorLabels,\n customValidation: !valid,\n customValidationMessage:\n \"You need to add at least one label key-pair\",\n },\n ];\n }\n\n const commonVal = commonFormValidation(customAccountValidation);\n\n isPageValid(\"affinity\", Object.keys(commonVal).length === 0);\n\n setValidationErrors(commonVal);\n }, [isPageValid, podAffinity, nodeSelectorLabels]);\n\n return (\n \n
\n

Pod Affinity

\n \n Configure how pods will be assigned to nodes\n \n
\n \n {\n updateField(\"podAffinity\", e.target.value);\n }}\n selectorOptions={[\n { label: \"None\", value: \"none\" },\n { label: \"Default (Pod Anti-afinnity)\", value: \"default\" },\n { label: \"Node Selector\", value: \"nodeSelector\" },\n ]}\n />\n MinIO supports multiple configurations for Pod Afinnity\n \n {podAffinity === \"nodeSelector\" && (\n \n
\n \n {\n const targetD = e.target;\n const checked = targetD.checked;\n\n updateField(\"withPodAntiAffinity\", checked);\n }}\n label={\"With Pod Anti-Affinity\"}\n />\n \n \n {\n updateField(\"nodeSelectorLabels\", vl);\n }}\n keyPlaceholder=\"Label Key\"\n valuePlaceholder=\"Label Value\"\n tooltip=\"Labels to be used in nodeSelector assignation. Invalid key-pairs will be ignored\"\n withBorder\n />\n {validationErrors[\"labels\"]}\n \n
\n )}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n podAffinity: state.tenants.createTenant.fields.affinity.podAffinity,\n nodeSelectorLabels:\n state.tenants.createTenant.fields.affinity.nodeSelectorLabels,\n withPodAntiAffinity:\n state.tenants.createTenant.fields.affinity.withPodAntiAffinity,\n});\n\nconst connector = connect(mapState, {\n setModalErrorSnackMessage,\n updateAddField,\n isPageValid,\n});\n\nexport default withStyles(styles)(connector(Affinity));\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, useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { LinearProgress } from \"@material-ui/core\";\n\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n modalBasic,\n settingsCommon,\n wizardCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport api from \"../../../../common/api\";\nimport { generatePoolName } from \"../../../../common/utils\";\nimport GenericWizard from \"../../Common/GenericWizard/GenericWizard\";\nimport { IWizardElement } from \"../../Common/GenericWizard/types\";\nimport { NewServiceAccount } from \"../../Common/CredentialsPrompt/types\";\nimport { ITenantCreator } from \"../../../../common/types\";\nimport { KeyPair } from \"../ListTenants/utils\";\n\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport { getDefaultAffinity, getNodeSelector } from \"../TenantDetails/utils\";\nimport CredentialsPrompt from \"../../Common/CredentialsPrompt/CredentialsPrompt\";\nimport NameTenant from \"./Steps/NameTenant\";\nimport { AppState } from \"../../../../store\";\nimport { ICertificatesItems, IFieldStore } from \"../types\";\nimport { updateAddField } from \"../actions\";\nimport Configure from \"./Steps/Configure\";\nimport IdentityProvider from \"./Steps/IdentityProvider\";\nimport Security from \"./Steps/Security\";\nimport Encryption from \"./Steps/Encryption\";\nimport TenantSize from \"./Steps/TenantSize\";\nimport Preview from \"./Steps/Preview\";\nimport Affinity from \"./Steps/Affinity\";\n\ninterface IAddTenantProps {\n closeAndRefresh: (reloadData: boolean) => any;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n updateAddField: typeof updateAddField;\n fields: IFieldStore;\n certificates: ICertificatesItems;\n namespace: string;\n validPages: string[];\n advancedMode: boolean;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n ...wizardCommon,\n ...settingsCommon,\n });\n\nconst AddTenant = ({\n classes,\n advancedMode,\n fields,\n certificates,\n namespace,\n validPages,\n setModalErrorSnackMessage,\n closeAndRefresh,\n}: IAddTenantProps) => {\n // Modals\n const [showNewCredentials, setShowNewCredentials] = useState(false);\n const [\n createdAccount,\n setCreatedAccount,\n ] = useState(null);\n\n // Fields\n const [addSending, setAddSending] = useState(false);\n\n /* Send Information to backend */\n useEffect(() => {\n const tenantName = fields.nameTenant.tenantName;\n const selectedStorageClass = fields.nameTenant.selectedStorageClass;\n const imageName = fields.configure.imageName;\n const consoleImage = fields.configure.consoleImage;\n const customDockerhub = fields.configure.customDockerhub;\n const imageRegistry = fields.configure.imageRegistry;\n const imageRegistryUsername = fields.configure.imageRegistryUsername;\n const imageRegistryPassword = fields.configure.imageRegistryPassword;\n const exposeMinIO = fields.configure.exposeMinIO;\n const exposeConsole = fields.configure.exposeConsole;\n const idpSelection = fields.identityProvider.idpSelection;\n const openIDURL = fields.identityProvider.openIDURL;\n const openIDClientID = fields.identityProvider.openIDClientID;\n const openIDSecretID = fields.identityProvider.openIDSecretID;\n const ADURL = fields.identityProvider.ADURL;\n const ADSkipTLS = fields.identityProvider.ADSkipTLS;\n const ADServerInsecure = fields.identityProvider.ADServerInsecure;\n const ADUserNameFilter = fields.identityProvider.ADUserNameFilter;\n const ADGroupBaseDN = fields.identityProvider.ADGroupBaseDN;\n const ADGroupSearchFilter = fields.identityProvider.ADGroupSearchFilter;\n const ADNameAttribute = fields.identityProvider.ADNameAttribute;\n const accessKeys = fields.identityProvider.accessKeys;\n const secretKeys = fields.identityProvider.secretKeys;\n const minioCertificates = certificates.minioCertificates;\n const caCertificates = certificates.caCertificates;\n const consoleCertificate = certificates.consoleCertificate;\n const serverCertificate = certificates.serverCertificate;\n const clientCertificate = certificates.clientCertificate;\n const vaultCertificate = certificates.vaultCertificate;\n const vaultCA = certificates.vaultCA;\n const gemaltoCA = certificates.gemaltoCA;\n const enableEncryption = fields.encryption.enableEncryption;\n const encryptionType = fields.encryption.encryptionType;\n const gemaltoEndpoint = fields.encryption.gemaltoEndpoint;\n const gemaltoToken = fields.encryption.gemaltoToken;\n const gemaltoDomain = fields.encryption.gemaltoDomain;\n const gemaltoRetry = fields.encryption.gemaltoRetry;\n const awsEndpoint = fields.encryption.awsEndpoint;\n const awsRegion = fields.encryption.awsRegion;\n const awsKMSKey = fields.encryption.awsKMSKey;\n const awsAccessKey = fields.encryption.awsAccessKey;\n const awsSecretKey = fields.encryption.awsSecretKey;\n const awsToken = fields.encryption.awsToken;\n const vaultEndpoint = fields.encryption.vaultEndpoint;\n const vaultEngine = fields.encryption.vaultEngine;\n const vaultNamespace = fields.encryption.vaultNamespace;\n const vaultPrefix = fields.encryption.vaultPrefix;\n const vaultAppRoleEngine = fields.encryption.vaultAppRoleEngine;\n const vaultId = fields.encryption.vaultId;\n const vaultSecret = fields.encryption.vaultSecret;\n const vaultRetry = fields.encryption.vaultRetry;\n const vaultPing = fields.encryption.vaultPing;\n const gcpProjectID = fields.encryption.gcpProjectID;\n const gcpEndpoint = fields.encryption.gcpEndpoint;\n const gcpClientEmail = fields.encryption.gcpClientEmail;\n const gcpClientID = fields.encryption.gcpClientID;\n const gcpPrivateKeyID = fields.encryption.gcpPrivateKeyID;\n const gcpPrivateKey = fields.encryption.gcpPrivateKey;\n const enableAutoCert = fields.security.enableAutoCert;\n const enableTLS = fields.security.enableTLS;\n const ecParity = fields.tenantSize.ecParity;\n const distribution = fields.tenantSize.distribution;\n const memorySize = fields.tenantSize.memorySize;\n const logSearchCustom = fields.configure.logSearchCustom;\n const prometheusCustom = fields.configure.prometheusCustom;\n const logSearchVolumeSize = fields.configure.logSearchVolumeSize;\n const logSearchSelectedStorageClass =\n fields.configure.logSearchSelectedStorageClass;\n const logSearchImage = fields.configure.logSearchImage;\n const kesImage = fields.configure.kesImage;\n const logSearchPostgresImage = fields.configure.logSearchPostgresImage;\n const prometheusImage = fields.configure.prometheusImage;\n const prometheusSelectedStorageClass =\n fields.configure.prometheusSelectedStorageClass;\n const prometheusVolumeSize = fields.configure.prometheusVolumeSize;\n const affinityType = fields.affinity.podAffinity;\n const nodeSelectorLabels = fields.affinity.nodeSelectorLabels;\n const withPodAntiAffinity = fields.affinity.withPodAntiAffinity;\n\n if (addSending) {\n const poolName = generatePoolName([]);\n\n let affinityObject = {};\n\n switch (affinityType) {\n case \"default\":\n affinityObject = {\n affinity: getDefaultAffinity(tenantName, poolName),\n };\n break;\n case \"nodeSelector\":\n affinityObject = {\n affinity: getNodeSelector(\n nodeSelectorLabels,\n withPodAntiAffinity,\n tenantName,\n poolName\n ),\n };\n break;\n }\n\n const erasureCode = ecParity.split(\":\")[1];\n\n let dataSend: ITenantCreator = {\n name: tenantName,\n namespace: namespace,\n access_key: \"\",\n secret_key: \"\",\n access_keys: [],\n secret_keys: [],\n enable_tls: enableTLS && enableAutoCert,\n enable_console: true,\n enable_prometheus: true,\n service_name: \"\",\n image: imageName,\n console_image: consoleImage,\n expose_minio: exposeMinIO,\n expose_console: exposeConsole,\n pools: [\n {\n name: poolName,\n servers: distribution.nodes,\n volumes_per_server: distribution.disks,\n volume_configuration: {\n size: distribution.pvSize,\n storage_class_name: selectedStorageClass,\n },\n resources: {\n requests: {\n memory: memorySize.request,\n },\n limits: {\n memory: memorySize.limit,\n },\n },\n ...affinityObject,\n },\n ],\n erasureCodingParity: parseInt(erasureCode, 10),\n };\n\n if (customDockerhub) {\n dataSend = {\n ...dataSend,\n image_registry: {\n registry: imageRegistry,\n username: imageRegistryUsername,\n password: imageRegistryPassword,\n },\n };\n }\n\n if (logSearchCustom) {\n dataSend = {\n ...dataSend,\n logSearchConfiguration: {\n storageClass: logSearchSelectedStorageClass,\n storageSize: parseInt(logSearchVolumeSize),\n image: logSearchImage,\n postgres_image: logSearchPostgresImage,\n },\n };\n } else {\n dataSend = {\n ...dataSend,\n logSearchConfiguration: {\n image: logSearchImage,\n postgres_image: logSearchPostgresImage,\n },\n };\n }\n\n if (prometheusCustom) {\n dataSend = {\n ...dataSend,\n prometheusConfiguration: {\n storageClass: prometheusSelectedStorageClass,\n storageSize: parseInt(prometheusVolumeSize),\n image: prometheusImage,\n },\n };\n } else {\n dataSend = {\n ...dataSend,\n prometheusConfiguration: {\n image: prometheusImage,\n },\n };\n }\n\n let tenantCerts: any = null;\n let consoleCerts: any = null;\n let caCerts: any = null;\n\n if (caCertificates.length > 0) {\n caCerts = {\n ca_certificates: caCertificates\n .map((keyPair: KeyPair) => keyPair.encoded_cert)\n .filter((keyPair) => keyPair),\n };\n }\n\n if (enableTLS && minioCertificates.length > 0) {\n tenantCerts = {\n minio: minioCertificates\n .map((keyPair: KeyPair) => ({\n crt: keyPair.encoded_cert,\n key: keyPair.encoded_key,\n }))\n .filter((keyPair) => keyPair.crt && keyPair.key),\n };\n }\n\n if (\n enableTLS &&\n consoleCertificate.encoded_cert !== \"\" &&\n consoleCertificate.encoded_key !== \"\"\n ) {\n consoleCerts = {\n console: {\n crt: consoleCertificate.encoded_cert,\n key: consoleCertificate.encoded_key,\n },\n };\n }\n\n if (tenantCerts || consoleCerts || caCerts) {\n dataSend = {\n ...dataSend,\n tls: {\n ...tenantCerts,\n ...consoleCerts,\n ...caCerts,\n },\n };\n }\n\n if (enableEncryption) {\n let insertEncrypt = {};\n\n switch (encryptionType) {\n case \"gemalto\":\n let gemaltoCAIntroduce = {};\n\n if (gemaltoCA.encoded_cert !== \"\") {\n gemaltoCAIntroduce = {\n ca: gemaltoCA.encoded_cert,\n };\n }\n insertEncrypt = {\n gemalto: {\n keysecure: {\n endpoint: gemaltoEndpoint,\n credentials: {\n token: gemaltoToken,\n domain: gemaltoDomain,\n retry: parseInt(gemaltoRetry),\n },\n tls: {\n ...gemaltoCAIntroduce,\n },\n },\n },\n };\n break;\n case \"aws\":\n insertEncrypt = {\n aws: {\n secretsmanager: {\n endpoint: awsEndpoint,\n region: awsRegion,\n kmskey: awsKMSKey,\n credentials: {\n accesskey: awsAccessKey,\n secretkey: awsSecretKey,\n token: awsToken,\n },\n },\n },\n };\n break;\n case \"gcp\":\n insertEncrypt = {\n gcp: {\n secretmanager: {\n project_id: gcpProjectID,\n endpoint: gcpEndpoint,\n credentials: {\n client_email: gcpClientEmail,\n client_id: gcpClientID,\n private_key_id: gcpPrivateKeyID,\n private_key: gcpPrivateKey,\n },\n },\n },\n };\n break;\n case \"vault\":\n let vaultKeyPair = null;\n let vaultCAInsert = null;\n if (\n vaultCertificate.encoded_key !== \"\" &&\n vaultCertificate.encoded_cert !== \"\"\n ) {\n vaultKeyPair = {\n key: vaultCertificate.encoded_key,\n crt: vaultCertificate.encoded_cert,\n };\n }\n if (vaultCA.encoded_cert !== \"\") {\n vaultCAInsert = {\n ca: vaultCA.encoded_cert,\n };\n }\n let vaultTLS = null;\n if (vaultKeyPair || vaultCA) {\n vaultTLS = {\n tls: {\n ...vaultKeyPair,\n ...vaultCAInsert,\n },\n };\n }\n insertEncrypt = {\n vault: {\n endpoint: vaultEndpoint,\n engine: vaultEngine,\n namespace: vaultNamespace,\n prefix: vaultPrefix,\n approle: {\n engine: vaultAppRoleEngine,\n id: vaultId,\n secret: vaultSecret,\n retry: parseInt(vaultRetry),\n },\n ...vaultTLS,\n status: {\n ping: parseInt(vaultPing),\n },\n },\n };\n break;\n }\n\n let encryptionServerKeyPair: any = {};\n let encryptionClientKeyPair: any = {};\n\n if (\n clientCertificate.encoded_key !== \"\" &&\n clientCertificate.encoded_cert !== \"\"\n ) {\n encryptionClientKeyPair = {\n client: {\n key: clientCertificate.encoded_key,\n crt: clientCertificate.encoded_cert,\n },\n };\n }\n\n if (\n serverCertificate.encoded_key !== \"\" &&\n serverCertificate.encoded_cert !== \"\"\n ) {\n encryptionServerKeyPair = {\n server: {\n key: serverCertificate.encoded_key,\n crt: serverCertificate.encoded_cert,\n },\n };\n }\n\n dataSend = {\n ...dataSend,\n encryption: {\n image: kesImage,\n ...encryptionClientKeyPair,\n ...encryptionServerKeyPair,\n ...insertEncrypt,\n },\n };\n }\n\n let dataIDP: any = {};\n switch (idpSelection) {\n case \"Built-in\":\n let keyarray = [];\n for (let i = 0; i < accessKeys.length; i++) {\n keyarray.push({\n access_key: accessKeys[i],\n secret_key: secretKeys[i],\n });\n }\n dataIDP = {\n keys: keyarray,\n };\n break;\n case \"OpenID\":\n dataIDP = {\n oidc: {\n url: openIDURL,\n client_id: openIDClientID,\n secret_id: openIDSecretID,\n },\n };\n break;\n case \"AD\":\n dataIDP = {\n active_directory: {\n url: ADURL,\n skip_tls_verification: ADSkipTLS,\n server_insecure: ADServerInsecure,\n username_format: \"\",\n user_search_filter: ADUserNameFilter,\n group_search_base_dn: ADGroupBaseDN,\n group_search_filter: ADGroupSearchFilter,\n group_name_attribute: ADNameAttribute,\n },\n };\n break;\n }\n\n dataSend = {\n ...dataSend,\n idp: { ...dataIDP },\n };\n\n api\n .invoke(\"POST\", `/api/v1/tenants`, dataSend)\n .then((res) => {\n const consoleSAList = get(res, \"console\", []);\n\n let newSrvAcc: NewServiceAccount = {\n console: [],\n };\n\n if (consoleSAList && Array.isArray(consoleSAList)) {\n const consoleItem = consoleSAList.map((consoleKey) => {\n return {\n accessKey: consoleKey.access_key,\n secretKey: consoleKey.secret_key,\n };\n });\n\n newSrvAcc.console = consoleItem;\n } else {\n newSrvAcc = {\n console: {\n accessKey: res.console.access_key,\n secretKey: res.console.secret_key,\n },\n };\n }\n\n setAddSending(false);\n\n setShowNewCredentials(true);\n setCreatedAccount(newSrvAcc);\n })\n .catch((err) => {\n setAddSending(false);\n setModalErrorSnackMessage(err);\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [addSending]);\n\n const cancelButton = {\n label: \"Cancel\",\n type: \"other\",\n enabled: true,\n action: () => {\n closeAndRefresh(false);\n },\n };\n\n const wizardSteps: IWizardElement[] = [\n {\n label: \"Name Tenant\",\n componentRender: ,\n buttons: [\n cancelButton,\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"nameTenant\"),\n },\n ],\n },\n {\n label: \"Configure\",\n advancedOnly: true,\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"configure\"),\n },\n ],\n },\n {\n label: \"Pod Affinity\",\n advancedOnly: true,\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"affinity\"),\n },\n ],\n },\n {\n label: \"Identity Provider\",\n advancedOnly: true,\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"identityProvider\"),\n },\n ],\n },\n {\n label: \"Security\",\n advancedOnly: true,\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"security\"),\n },\n ],\n },\n {\n label: \"Encryption\",\n advancedOnly: true,\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"encryption\"),\n },\n ],\n },\n {\n label: \"Tenant Size\",\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Next\",\n type: \"next\",\n enabled: validPages.includes(\"tenantSize\"),\n },\n ],\n },\n {\n label: \"Preview Configuration\",\n componentRender: ,\n buttons: [\n cancelButton,\n { label: \"Back\", type: \"back\", enabled: true },\n {\n label: \"Create\",\n type: \"submit\",\n enabled: !addSending,\n action: () => {\n setAddSending(true);\n },\n },\n ],\n },\n ];\n\n let filteredWizardSteps = wizardSteps;\n\n if (!advancedMode) {\n filteredWizardSteps = wizardSteps.filter((step) => !step.advancedOnly);\n }\n\n const closeCredentialsModal = () => {\n closeAndRefresh(true);\n };\n\n return (\n \n \n Create New Tenant\n \n {addSending && (\n \n \n \n )}\n {showNewCredentials && (\n {\n closeCredentialsModal();\n }}\n entity=\"Tenant\"\n />\n )}\n \n \n \n \n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n advancedMode: state.tenants.createTenant.advancedModeOn,\n namespace: state.tenants.createTenant.fields.nameTenant.namespace,\n validPages: state.tenants.createTenant.validPages,\n fields: state.tenants.createTenant.fields,\n certificates: state.tenants.createTenant.certificates,\n});\n\nconst connector = connect(mapState, {\n setModalErrorSnackMessage,\n updateAddField,\n});\n\nexport default withStyles(styles)(connector(AddTenant));\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, { useEffect, useState, Fragment } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport { Button, IconButton } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { ITenant, ITenantsResponse } from \"./types\";\nimport { niceBytes } from \"../../../../common/utils\";\nimport { NewServiceAccount } from \"../../Common/CredentialsPrompt/types\";\nimport {\n actionsTray,\n searchField,\n settingsCommon,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport { CreateIcon } from \"../../../../icons\";\nimport api from \"../../../../common/api\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport DeleteTenant from \"./DeleteTenant\";\nimport AddTenant from \"../AddTenant/AddTenant\";\nimport CredentialsPrompt from \"../../Common/CredentialsPrompt/CredentialsPrompt\";\nimport history from \"../../../../history\";\nimport RefreshIcon from \"@material-ui/icons/Refresh\";\nimport SlideOptions from \"../../Common/SlideOptions/SlideOptions\";\nimport BackSettingsIcon from \"../../../../icons/BackSettingsIcon\";\nimport { resetAddTenantForm } from \"../actions\";\n\ninterface ITenantsList {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n resetAddTenantForm: typeof resetAddTenantForm;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...actionsTray,\n ...searchField,\n ...settingsCommon,\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n actionsTray: {\n ...actionsTray.actionsTray,\n padding: \"0 38px\",\n },\n tenantsContainer: {\n padding: \"15px 0\",\n },\n customConfigurationPage: {\n height: \"calc(100vh - 440px)\",\n scrollbarWidth: \"none\" as const,\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n },\n });\n\nconst ListTenants = ({\n classes,\n setErrorSnackMessage,\n resetAddTenantForm,\n}: ITenantsList) => {\n const [currentPanel, setCurrentPanel] = useState(0);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [selectedTenant, setSelectedTenant] = useState(null);\n const [isLoading, setIsLoading] = useState(false);\n const [filterTenants, setFilterTenants] = useState(\"\");\n const [records, setRecords] = useState([]);\n const [showNewCredentials, setShowNewCredentials] = useState(false);\n const [createdAccount, setCreatedAccount] =\n useState(null);\n\n const closeAddModalAndRefresh = (reloadData: boolean) => {\n setCurrentPanel(0);\n resetAddTenantForm();\n\n if (reloadData) {\n setIsLoading(true);\n }\n };\n\n const closeDeleteModalAndRefresh = (reloadData: boolean) => {\n setDeleteOpen(false);\n\n if (reloadData) {\n setIsLoading(true);\n }\n };\n\n const confirmDeleteTenant = (tenant: ITenant) => {\n setSelectedTenant(tenant);\n setDeleteOpen(true);\n };\n\n const redirectToTenantDetails = (tenant: ITenant) => {\n history.push(`/namespaces/${tenant.namespace}/tenants/${tenant.name}`);\n return;\n };\n\n const closeCredentialsModal = () => {\n setShowNewCredentials(false);\n setCreatedAccount(null);\n };\n\n const backClick = () => {\n setCurrentPanel(currentPanel - 1);\n resetAddTenantForm();\n };\n\n const tableActions = [\n { type: \"view\", onClick: redirectToTenantDetails },\n { type: \"delete\", onClick: confirmDeleteTenant },\n ];\n\n const filteredRecords = records.filter((b: any) => {\n if (filterTenants === \"\") {\n return true;\n } else {\n if (b.name.indexOf(filterTenants) >= 0) {\n return true;\n } else {\n return false;\n }\n }\n });\n\n useEffect(() => {\n if (isLoading) {\n const fetchRecords = () => {\n api\n .invoke(\"GET\", `/api/v1/tenants`)\n .then((res: ITenantsResponse) => {\n if (res === null) {\n setIsLoading(false);\n return;\n }\n let resTenants: ITenant[] = [];\n if (res.tenants !== null) {\n resTenants = res.tenants;\n }\n\n for (let i = 0; i < resTenants.length; i++) {\n resTenants[i].capacity = niceBytes(resTenants[i].total_size + \"\");\n }\n\n setRecords(resTenants);\n setIsLoading(false);\n })\n .catch((err) => {\n setErrorSnackMessage(err);\n setIsLoading(false);\n });\n };\n fetchRecords();\n }\n }, [isLoading, setErrorSnackMessage]);\n\n useEffect(() => {\n setIsLoading(true);\n }, []);\n\n const createTenant = () => {\n setCurrentPanel(1);\n };\n\n return (\n \n {deleteOpen && (\n \n )}\n {showNewCredentials && (\n {\n closeCredentialsModal();\n }}\n entity=\"Tenant\"\n />\n )}\n \n \n \n
\n \n \n \n {\n setFilterTenants(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n {\n setIsLoading(true);\n }}\n >\n \n \n }\n onClick={createTenant}\n >\n Create Tenant\n \n \n \n \n \n \n ,\n \n \n \n \n Back To Tenants List\n \n \n \n {currentPanel === 1 && (\n \n )}\n \n ,\n ]}\n currentSlide={currentPanel}\n />\n
\n
\n
\n
\n
\n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n resetAddTenantForm,\n});\n\nexport default withStyles(styles)(connector(ListTenants));\n","import React, { Fragment } from \"react\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { Grid } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport ListTenants from \"./ListTenants/ListTenants\";\n\ninterface IConfigurationMain {\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerLabel: {\n fontSize: 22,\n fontWeight: 600,\n color: \"#000\",\n marginTop: 4,\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst TenantsMain = ({ classes }: IConfigurationMain) => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default withStyles(styles)(TenantsMain);\n","import React, { useState, useEffect } from \"react\";\nimport get from \"lodash/get\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { generatePoolName, niceBytes } from \"../../../../common/utils\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport api from \"../../../../common/api\";\nimport { IAddPoolRequest, ITenant } from \"../ListTenants/types\";\nimport { IAffinityModel } from \"../../../../common/types\";\nimport { getDefaultAffinity } from \"./utils\";\n\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { IQuotaElement, IQuotas, Opts } from \"../ListTenants/utils\";\n\ninterface IAddPoolProps {\n tenant: ITenant;\n classes: any;\n open: boolean;\n onClosePoolAndReload: (shouldReload: boolean) => void;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n multiContainer: {\n display: \"flex\",\n alignItems: \"center\" as const,\n justifyContent: \"flex-start\" as const,\n },\n sizeFactorContainer: {\n marginLeft: 8,\n },\n bottomContainer: {\n display: \"flex\",\n flexGrow: 1,\n alignItems: \"center\",\n \"& div\": {\n flexGrow: 1,\n width: \"100%\",\n },\n },\n factorElements: {\n display: \"flex\",\n justifyContent: \"flex-start\",\n },\n sizeNumber: {\n fontSize: 35,\n fontWeight: 700,\n textAlign: \"center\",\n },\n sizeDescription: {\n fontSize: 14,\n color: \"#777\",\n textAlign: \"center\",\n },\n ...modalBasic,\n });\n\nconst AddPoolModal = ({\n tenant,\n classes,\n open,\n onClosePoolAndReload,\n}: IAddPoolProps) => {\n const [addSending, setAddSending] = useState(false);\n const [numberOfNodes, setNumberOfNodes] = useState(0);\n const [volumeSize, setVolumeSize] = useState(0);\n const [volumesPerServer, setVolumesPerSever] = useState(0);\n const [selectedStorageClass, setSelectedStorageClass] = useState(\"\");\n const [storageClasses, setStorageClasses] = useState([]);\n\n const instanceCapacity: number = volumeSize * 1073741824 * volumesPerServer;\n const totalCapacity: number = instanceCapacity * numberOfNodes;\n\n useEffect(() => {\n setSelectedStorageClass(\"\");\n\n setStorageClasses([]);\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${tenant.namespace}/resourcequotas/${tenant.namespace}-storagequota`\n )\n .then((res: IQuotas) => {\n const elements: IQuotaElement[] = get(res, \"elements\", []);\n\n const newStorage = elements.map((storageClass: any) => {\n const name = get(storageClass, \"name\", \"\").split(\n \".storageclass.storage.k8s.io/requests.storage\"\n )[0];\n\n return { label: name, value: name };\n });\n\n setStorageClasses(newStorage);\n if (newStorage.length > 0) {\n setSelectedStorageClass(newStorage[0].value);\n }\n })\n .catch((err: any) => {\n console.error(err);\n });\n }, [tenant]);\n\n return (\n onClosePoolAndReload(false)}\n modalOpen={open}\n title=\"Add Pool\"\n >\n ) => {\n e.preventDefault();\n setAddSending(true);\n\n const poolName = generatePoolName(tenant.pools);\n\n const defaultAffinity: IAffinityModel = getDefaultAffinity(\n tenant.name,\n poolName\n );\n\n const data: IAddPoolRequest = {\n name: poolName,\n servers: numberOfNodes,\n volumes_per_server: volumesPerServer,\n volume_configuration: {\n size: volumeSize * 1073741824,\n storage_class_name: selectedStorageClass,\n labels: null,\n },\n affinity: defaultAffinity,\n };\n\n api\n .invoke(\n \"POST\",\n `/api/v1/namespaces/${tenant.namespace}/tenants/${tenant.name}/pools`,\n data\n )\n .then(() => {\n setAddSending(false);\n onClosePoolAndReload(true);\n })\n .catch((err) => {\n setAddSending(false);\n // setDeleteError(err);\n });\n }}\n >\n \n ) => {\n setNumberOfNodes(parseInt(e.target.value));\n }}\n label=\"Number o Nodes\"\n value={numberOfNodes.toString(10)}\n />\n \n \n ) => {\n setVolumeSize(parseInt(e.target.value));\n }}\n label=\"Volume Size (Gi)\"\n value={volumeSize.toString(10)}\n />\n \n \n ) => {\n setVolumesPerSever(parseInt(e.target.value));\n }}\n label=\"Volumes per Server\"\n value={volumesPerServer.toString(10)}\n />\n \n \n ) => {\n setSelectedStorageClass(e.target.value as string);\n }}\n label=\"Storage Class\"\n value={selectedStorageClass}\n options={storageClasses}\n disabled={storageClasses.length < 1}\n />\n \n \n \n
\n
\n
\n {niceBytes(instanceCapacity.toString(10))}\n
\n
Instance Capacity
\n
\n
\n
\n {niceBytes(totalCapacity.toString(10))}\n
\n
Total Capacity
\n
\n
\n
\n \n Save\n \n
\n
\n {addSending && (\n \n \n \n )}\n
\n \n \n );\n};\n\nexport default withStyles(styles)(AddPoolModal);\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, { useState } from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport Grid from \"@material-ui/core/Grid\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport Tab from \"@material-ui/core/Tab\";\nimport Tabs from \"@material-ui/core/Tabs\";\n\ninterface IReplicationProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (refreshList: boolean) => void;\n}\n\ninterface IDropDownElements {\n label: string;\n value: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n multiContainer: {\n display: \"flex\",\n alignItems: \"center\" as const,\n justifyContent: \"flex-start\" as const,\n },\n sizeFactorContainer: {\n marginLeft: 8,\n },\n ...modalBasic,\n });\n\nconst ReplicationSetup = ({\n classes,\n open,\n closeModalAndRefresh,\n}: IReplicationProps) => {\n const [addSending, setAddSending] = useState(false);\n const [selectedTab, setSelectedTab] = useState(0);\n const [sourceBucket, setSourceBucket] = useState(\"\");\n const [clusterSelected, setClusterSelected] = useState(\"\");\n const [destinationBucket, setDestinationBucket] = useState(\"\");\n const [address, setAddress] = useState(\"\");\n const [bucket, setBucket] = useState(\"\");\n const [accessKey, setAccessKey] = useState(\"\");\n const [secretKey, setSecretKey] = useState(\"\");\n\n const clustersList: IDropDownElements[] = [];\n const sourceBuckets: IDropDownElements[] = [];\n const destinationBuckets: IDropDownElements[] = [];\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n >\n ) => {\n e.preventDefault();\n setAddSending(true);\n }}\n >\n \n ) => {\n setSourceBucket(e.target.value as string);\n }}\n value={sourceBucket}\n name=\"source_bucket\"\n id=\"source_bucket\"\n />\n \n \n {\n setSelectedTab(newValue);\n }}\n aria-label=\"cluster-tabs\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n \n \n \n \n \n
\n
\n {selectedTab === 0 && (\n \n \n ) => {\n setClusterSelected(e.target.value as string);\n }}\n value={clusterSelected}\n name=\"cluster\"\n id=\"cluster\"\n />\n \n \n ) => {\n setDestinationBucket(e.target.value as string);\n }}\n value={destinationBucket}\n name=\"destination_bucket\"\n id=\"destination_bucket\"\n />\n \n \n )}\n\n {selectedTab === 1 && (\n \n \n ) => {\n setAddress(e.target.value);\n }}\n label=\"Address\"\n value={address}\n />\n \n \n ) => {\n setBucket(e.target.value);\n }}\n label=\"Bucket\"\n value={bucket}\n />\n \n \n ) => {\n setAccessKey(e.target.value);\n }}\n label=\"Access Key\"\n value={accessKey}\n />\n \n \n ) => {\n setSecretKey(e.target.value);\n }}\n label=\"Secret Key\"\n value={secretKey}\n />\n \n \n )}\n \n \n Save\n \n \n {addSending && (\n \n \n \n )}\n \n \n );\n};\n\nexport default withStyles(styles)(ReplicationSetup);\n","import React from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { LinearProgress } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\nimport ErrorBlock from \"../../../shared/ErrorBlock\";\n\ninterface IProgressBar {\n maxValue: number;\n currValue: number;\n label: string;\n renderFunction?: (element: string) => any;\n error: string;\n loading: boolean;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n paperContainer: {\n padding: 15,\n },\n allValue: {\n fontSize: 16,\n fontWeight: 700,\n marginBottom: 8,\n },\n currentUsage: {\n fontSize: 12,\n marginTop: 8,\n },\n centerItem: {\n textAlign: \"center\",\n },\n });\n\nconst BorderLinearProgress = withStyles((theme) => ({\n root: {\n height: 10,\n borderRadius: 5,\n },\n colorPrimary: {\n backgroundColor: \"#F4F4F4\",\n },\n bar: {\n borderRadius: 5,\n backgroundColor: \"#081C42\",\n },\n padChart: {\n padding: \"5px\",\n },\n}))(LinearProgress);\n\nconst UsageBarWrapper = ({\n classes,\n maxValue,\n currValue,\n label,\n renderFunction,\n loading,\n error,\n}: IProgressBar) => {\n const porcentualValue = (currValue * 100) / maxValue;\n\n const renderComponent = () => {\n if (!loading) {\n return error !== \"\" ? (\n \n ) : (\n \n \n {label}{\" \"}\n {renderFunction ? renderFunction(maxValue.toString()) : maxValue}\n \n \n \n Used:{\" \"}\n {renderFunction ? renderFunction(currValue.toString()) : currValue}\n \n \n );\n }\n\n return null;\n };\n\n return (\n \n {loading && (\n
\n \n \n \n
\n )}\n {renderComponent()}\n
\n );\n};\n\nexport default withStyles(styles)(UsageBarWrapper);\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, { useState, Fragment, useEffect, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, Grid } from \"@material-ui/core\";\nimport { modalBasic } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport api from \"../../../../common/api\";\n\ninterface IUpdateTenantModal {\n open: boolean;\n closeModalAndRefresh: (update: boolean) => any;\n namespace: string;\n idTenant: string;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\nconst UpdateTenantModal = ({\n open,\n closeModalAndRefresh,\n namespace,\n idTenant,\n setModalErrorSnackMessage,\n classes,\n}: IUpdateTenantModal) => {\n const [isSending, setIsSending] = useState(false);\n const [minioImage, setMinioImage] = useState(\"\");\n const [consoleImage, setConsoleImage] = useState(\"\");\n const [imageRegistry, setImageRegistry] = useState(false);\n const [imageRegistryEndpoint, setImageRegistryEndpoint] =\n useState(\"\");\n const [imageRegistryUsername, setImageRegistryUsername] =\n useState(\"\");\n const [imageRegistryPassword, setImageRegistryPassword] =\n useState(\"\");\n const [validMinioImage, setValidMinioImage] = useState(true);\n const [validConsoleImage, setValidConsoleImage] = useState(true);\n\n const validateImage = useCallback(\n (fieldToCheck: string) => {\n const pattern = new RegExp(\"^$|^((.*?)/(.*?):(.+))$\");\n\n switch (fieldToCheck) {\n case \"consoleImage\":\n setValidConsoleImage(pattern.test(consoleImage));\n break;\n case \"minioImage\":\n setValidMinioImage(pattern.test(minioImage));\n break;\n }\n },\n [consoleImage, minioImage]\n );\n\n useEffect(() => {\n validateImage(\"minioImage\");\n }, [minioImage, validateImage]);\n\n useEffect(() => {\n validateImage(\"consoleImage\");\n }, [consoleImage, validateImage]);\n\n const closeAction = () => {\n closeModalAndRefresh(false);\n };\n\n const resetForm = () => {\n setMinioImage(\"\");\n setConsoleImage(\"\");\n setImageRegistry(false);\n setImageRegistryEndpoint(\"\");\n setImageRegistryUsername(\"\");\n setImageRegistryPassword(\"\");\n };\n\n const updateMinIOImage = () => {\n setIsSending(true);\n\n let payload = {\n image: minioImage,\n console_image: consoleImage,\n enable_prometheus: true,\n };\n\n if (imageRegistry) {\n const registry: any = {\n image_registry: {\n registry: imageRegistryEndpoint,\n username: imageRegistryUsername,\n password: imageRegistryPassword,\n },\n };\n payload = {\n ...payload,\n ...registry,\n };\n }\n\n api\n .invoke(\n \"PUT\",\n `/api/v1/namespaces/${namespace}/tenants/${idTenant}`,\n payload\n )\n .then(() => {\n setIsSending(false);\n closeModalAndRefresh(true);\n })\n .catch((error) => {\n setModalErrorSnackMessage(error);\n setIsSending(false);\n });\n };\n\n return (\n \n \n \n \n Please enter the MinIO image from dockerhub to use. If blank, then\n latest build will be used.\n \n
\n
\n \n {\n setMinioImage(e.target.value);\n }}\n />\n \n \n {\n setConsoleImage(e.target.value);\n }}\n />\n \n \n ) => {\n setImageRegistry(!imageRegistry);\n }}\n label={\"Set Custom Image Registry\"}\n indicatorLabels={[\"Yes\", \"No\"]}\n />\n \n {imageRegistry && (\n \n \n {\n setImageRegistryEndpoint(e.target.value);\n }}\n />\n \n \n {\n setImageRegistryUsername(e.target.value);\n }}\n />\n \n \n {\n setImageRegistryPassword(e.target.value);\n }}\n />\n \n \n )}\n
\n \n \n Clear\n \n \n Save\n \n \n
\n \n );\n};\n\nconst connector = connect(null, {\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(UpdateTenantModal));\n","// This file is part of MinIO Kubernetes Cloud\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport api from \"../../../../common/api\";\nimport { setModalErrorSnackMessage } from \"../../../../actions\";\nimport {\n fieldBasic,\n modalBasic,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport CodeMirrorWrapper from \"../../Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n jsonPolicyEditor: {\n minHeight: 400,\n width: \"100%\",\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n errorState: {\n color: \"#b53b4b\",\n fontSize: 14,\n fontWeight: \"bold\",\n },\n ...modalBasic,\n ...fieldBasic,\n });\n\ninterface ITenantYAML {\n yaml: string;\n}\n\ninterface ITenantYAMLProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (refresh: boolean) => void;\n tenant: string;\n namespace: string;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst TenantYAML = ({\n classes,\n open,\n closeModalAndRefresh,\n tenant,\n namespace,\n setModalErrorSnackMessage,\n}: ITenantYAMLProps) => {\n const [addLoading, setAddLoading] = useState(false);\n const [loading, setLoading] = useState(false);\n const [tenantYaml, setTenantYaml] = useState(\"\");\n const [errorMessage, setErrorMessage] = useState(\"\");\n\n const updateTenant = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n setErrorMessage(\"\");\n api\n .invoke(\"PUT\", `/api/v1/namespaces/${namespace}/tenants/${tenant}/yaml`, {\n yaml: tenantYaml,\n })\n .then((res) => {\n setAddLoading(false);\n closeModalAndRefresh(true);\n setErrorMessage(\"\");\n })\n .catch((err) => {\n setAddLoading(false);\n console.log(err);\n setErrorMessage(err);\n });\n };\n\n // check the permissions for creating bucket\n useEffect(() => {\n api\n .invoke(\"GET\", `/api/v1/namespaces/${namespace}/tenants/${tenant}/yaml`)\n .then((res: ITenantYAML) => {\n setLoading(false);\n setTenantYaml(res.yaml);\n })\n .catch((err: any) => {\n setLoading(false);\n setModalErrorSnackMessage(err);\n });\n }, [tenant, namespace, setModalErrorSnackMessage]);\n\n useEffect(() => {}, []);\n\n const validSave = tenantYaml.trim() !== \"\";\n\n return (\n {\n closeModalAndRefresh(false);\n }}\n title={`YAML`}\n >\n {loading && }\n {errorMessage !== \"\" && (\n
{errorMessage}
\n )}\n {!loading && (\n ) => {\n updateTenant(e);\n }}\n >\n \n \n \n
\n
\n {\n setTenantYaml(value);\n }}\n />\n
\n \n \n Save\n \n \n {addLoading && (\n \n \n \n )}\n
\n \n )}\n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(TenantYAML));\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 from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { containerForHeader } from \"../../Common/FormComponents/common/styleLibrary\";\nimport { Button, Typography } from \"@material-ui/core\";\nimport { niceBytes } from \"../../../../common/utils\";\nimport Moment from \"react-moment\";\nimport { Link } from \"react-router-dom\";\nimport Paper from \"@material-ui/core/Paper\";\nimport { ITenant } from \"../ListTenants/types\";\nimport { LicenseInfo } from \"../../License/types\";\n\ninterface ISubnetLicenseTenant {\n classes: any;\n tenant: ITenant | null;\n loadingActivateProduct: any;\n loadingLicenseInfo: boolean;\n licenseInfo: LicenseInfo | undefined;\n activateProduct: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n paperContainer: {\n padding: \"15px 15px 15px 50px\",\n },\n licenseInfoValue: {\n textTransform: \"none\",\n fontSize: 14,\n fontWeight: \"bold\",\n },\n licenseContainer: {\n position: \"relative\",\n padding: \"20px 52px 0px 28px\",\n background: \"#032F51\",\n boxShadow: \"0px 3px 7px #00000014\",\n \"& h2\": {\n color: \"#FFF\",\n marginBottom: 67,\n },\n \"& a\": {\n textDecoration: \"none\",\n },\n \"& h3\": {\n color: \"#FFFFFF\",\n marginBottom: \"30px\",\n fontWeight: \"bold\",\n },\n \"& h6\": {\n color: \"#FFFFFF !important\",\n },\n },\n licenseInfo: { color: \"#FFFFFF\", position: \"relative\" },\n licenseInfoTitle: {\n textTransform: \"none\",\n color: \"#BFBFBF\",\n fontSize: 11,\n },\n verifiedIcon: {\n width: 96,\n position: \"absolute\",\n right: 0,\n bottom: 29,\n },\n noUnderLine: {\n textDecoration: \"none\",\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst SubnetLicenseTenant = ({\n classes,\n tenant,\n loadingActivateProduct,\n loadingLicenseInfo,\n licenseInfo,\n activateProduct,\n}: ISubnetLicenseTenant) => {\n return (\n \n {tenant && tenant.subnet_license ? (\n \n \n \n \n License\n \n \n Commercial License\n \n \n Organization\n \n \n {tenant.subnet_license.organization}\n \n \n Registered Capacity\n \n \n {niceBytes(\n (tenant.subnet_license.storage_capacity * 1099511627776) // 1 Terabyte = 1099511627776 Bytes\n .toString(10)\n )}\n \n \n Expiry Date\n \n \n \n {tenant.subnet_license.expires_at}\n \n \n \n \n \n Subscription Plan\n \n \n {tenant.subnet_license.plan}\n \n \n Requester\n \n \n {tenant.subnet_license.email}\n \n \n \n \n \n ) : (\n !loadingLicenseInfo && (\n \n {!licenseInfo && (\n {\n e.stopPropagation();\n }}\n className={classes.noUnderLine}\n >\n \n Activate Product\n \n \n )}\n {licenseInfo && tenant && (\n activateProduct(tenant.namespace, tenant.name)}\n >\n Attach License\n \n )}\n \n )\n )}\n
\n );\n};\n\nexport default withStyles(styles)(SubnetLicenseTenant);\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, useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n actionsTray,\n buttonsStyles,\n containerForHeader,\n hrClass,\n modalBasic,\n searchField,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {\n Button,\n IconButton,\n Menu,\n MenuItem,\n TextField,\n} from \"@material-ui/core\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport Tab from \"@material-ui/core/Tab\";\nimport { CreateIcon } from \"../../../../icons\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport Paper from \"@material-ui/core/Paper\";\nimport { niceBytes, niceDays } from \"../../../../common/utils\";\nimport AddPoolModal from \"./AddPoolModal\";\nimport AddBucket from \"../../Buckets/ListBuckets/AddBucket\";\nimport ReplicationSetup from \"./ReplicationSetup\";\nimport api from \"../../../../common/api\";\nimport { IPodListElement, IPool, ITenant } from \"../ListTenants/types\";\nimport PageHeader from \"../../Common/PageHeader/PageHeader\";\nimport UsageBarWrapper from \"../../Common/UsageBarWrapper/UsageBarWrapper\";\nimport UpdateTenantModal from \"./UpdateTenantModal\";\nimport { LicenseInfo } from \"../../License/types\";\nimport { Link } from \"react-router-dom\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport MoreVertIcon from \"@material-ui/icons/MoreVert\";\nimport TenantYAML from \"./TenantYAML\";\nimport SubnetLicenseTenant from \"./SubnetLicenseTenant\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\n\ninterface ITenantDetailsProps {\n classes: any;\n match: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\ninterface ITenantUsage {\n used: string;\n disk_used: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n multiContainer: {\n display: \"flex\",\n alignItems: \"center\" as const,\n justifyContent: \"flex-start\" as const,\n },\n sizeFactorContainer: {\n marginLeft: 8,\n },\n containerHeader: {\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n paperContainer: {\n padding: \"15px 15px 15px 50px\",\n },\n infoGrid: {\n display: \"grid\",\n gridTemplateColumns: \"auto auto auto auto\",\n gridGap: 8,\n \"& div\": {\n display: \"flex\",\n alignItems: \"center\",\n },\n \"& div:nth-child(odd)\": {\n justifyContent: \"flex-end\",\n fontWeight: 700,\n },\n \"& div:nth-child(2n)\": {\n paddingRight: 35,\n },\n },\n masterActions: {\n width: \"25%\",\n minWidth: \"120px\",\n \"& div\": {\n margin: \"5px 0px\",\n },\n },\n updateButton: {\n backgroundColor: \"transparent\",\n border: 0,\n padding: \"0 6px\",\n cursor: \"pointer\",\n \"&:focus, &:active\": {\n outline: \"none\",\n },\n \"& svg\": {\n height: 12,\n },\n },\n poolLabel: {\n color: \"#666666\",\n },\n breadcrumLink: {\n textDecoration: \"none\",\n color: \"black\",\n },\n ...modalBasic,\n ...actionsTray,\n ...buttonsStyles,\n ...searchField,\n ...hrClass,\n actionsTray: {\n ...actionsTray.actionsTray,\n padding: \"15px 0 0\",\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst TenantDetails = ({\n classes,\n match,\n setErrorSnackMessage,\n}: ITenantDetailsProps) => {\n const [selectedTab, setSelectedTab] = useState(0);\n const [capacity, setCapacity] = useState(0);\n const [poolCount, setPoolCount] = useState(0);\n const [pools, setPools] = useState([]);\n const [pods, setPods] = useState([]);\n const [instances, setInstances] = useState(0);\n const [volumes, setVolumes] = useState(0);\n const [addPoolOpen, setAddPool] = useState(false);\n const [addBucketOpen, setAddBucketOpen] = useState(false);\n const [addReplicationOpen, setAddReplicationOpen] = useState(false);\n const [tenant, setTenant] = useState(null);\n const [loadingUsage, setLoadingUsage] = useState(true);\n const [usageError, setUsageError] = useState(\"\");\n const [usage, setUsage] = useState(0);\n const [updateMinioVersion, setUpdateMinioVersion] = useState(false);\n const [yamlScreenOpen, setYamlScreenOpen] = useState(false);\n const [licenseInfo, setLicenseInfo] = useState();\n const [loadingLicenseInfo, setLoadingLicenseInfo] = useState(true);\n const [loadingActivateProduct, setLoadingActivateProduct] = useState(\n false\n );\n const [logEnabled, setLogEnabled] = useState(false);\n const [monitoringEnabled, setMonitoringEnabled] = useState(false);\n const [encryptionEnabled, setEncryptionEnabled] = useState(false);\n const [adEnabled, setAdEnabled] = useState(false);\n const [oicEnabled, setOicEnabled] = useState(false);\n\n const tenantName = match.params[\"tenantName\"];\n const tenantNamespace = match.params[\"tenantNamespace\"];\n\n const onClosePoolAndRefresh = (reload: boolean) => {\n setAddPool(false);\n\n if (reload) {\n loadInfo();\n loadUsage();\n }\n };\n\n const closeBucketsAndRefresh = () => {\n setAddBucketOpen(false);\n };\n\n const closeReplicationAndRefresh = (reload: boolean) => {\n setAddReplicationOpen(false);\n\n if (reload) {\n loadInfo();\n loadUsage();\n }\n };\n\n const activateProduct = (namespace: string, tenant: string) => {\n if (loadingActivateProduct) {\n return;\n }\n setLoadingActivateProduct(true);\n api\n .invoke(\n \"POST\",\n `/api/v1/subscription/namespaces/${namespace}/tenants/${tenant}/activate`,\n {}\n )\n .then(() => {\n setLoadingActivateProduct(false);\n loadInfo();\n })\n .catch((err) => {\n setLoadingActivateProduct(false);\n setErrorSnackMessage(err);\n });\n };\n\n const loadInfo = () => {\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${tenantNamespace}/tenants/${tenantName}`\n )\n .then((res: ITenant) => {\n const resPools = !res.pools ? [] : res.pools;\n\n let totalInstances = 0;\n let totalVolumes = 0;\n let poolNamedIndex = 0;\n for (let pool of resPools) {\n const cap =\n pool.volumes_per_server *\n pool.servers *\n pool.volume_configuration.size;\n pool.label = `pool-${poolNamedIndex}`;\n if (pool.name === undefined || pool.name === \"\") {\n pool.name = pool.label;\n }\n pool.capacity = niceBytes(cap + \"\");\n pool.volumes = pool.servers * pool.volumes_per_server;\n totalInstances += pool.servers;\n totalVolumes += pool.volumes;\n poolNamedIndex += 1;\n }\n setCapacity(res.total_size || 0);\n setPoolCount(resPools.length);\n setVolumes(totalVolumes);\n setInstances(totalInstances);\n\n setPools(resPools);\n\n setLogEnabled(res.logEnabled);\n setMonitoringEnabled(res.monitoringEnabled);\n setEncryptionEnabled(res.encryptionEnabled);\n setAdEnabled(res.idpAdEnabled);\n setOicEnabled(res.idpOicEnabled);\n\n setTenant(res);\n })\n .catch((err) => {\n setErrorSnackMessage(err);\n });\n };\n\n const loadUsage = () => {\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${tenantNamespace}/tenants/${tenantName}/usage`\n )\n .then((result: ITenantUsage) => {\n const usage = get(result, \"disk_used\", \"0\");\n setUsage(parseInt(usage));\n setUsageError(\"\");\n setLoadingUsage(false);\n })\n .catch((err) => {\n setUsageError(err);\n setUsage(0);\n setLoadingUsage(false);\n });\n };\n\n const loadPods = () => {\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${tenantNamespace}/tenants/${tenantName}/pods`\n )\n .then((result: IPodListElement[]) => {\n for (let i = 0; i < result.length; i++) {\n let currentTime = new Date().getSeconds();\n result[i].time = niceDays(\n (currentTime - parseInt(result[i].timeCreated)).toString()\n );\n }\n setPods(result);\n })\n .catch((err) => {\n setErrorSnackMessage(\"Error loading pods\");\n });\n };\n\n const fetchLicenseInfo = () => {\n setLoadingLicenseInfo(true);\n api\n .invoke(\"GET\", `/api/v1/subscription/info`)\n .then((res: LicenseInfo) => {\n setLicenseInfo(res);\n setLoadingLicenseInfo(false);\n })\n .catch((err: any) => {\n setLoadingLicenseInfo(false);\n });\n };\n\n useEffect(() => {\n loadInfo();\n loadUsage();\n fetchLicenseInfo();\n loadPods();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const [anchorEl, setAnchorEl] = React.useState(null);\n\n const handleTenantMenu = (event: any) => {\n setAnchorEl(event.currentTarget);\n };\n\n const editYaml = () => {\n setAnchorEl(null);\n setYamlScreenOpen(true);\n };\n\n const closeYAMLModalAndRefresh = () => {\n setYamlScreenOpen(false);\n loadInfo();\n };\n\n return (\n \n {addPoolOpen && tenant !== null && (\n \n )}\n {addBucketOpen && (\n \n )}\n {addReplicationOpen && (\n \n )}\n {updateMinioVersion && (\n {\n setUpdateMinioVersion(false);\n }}\n idTenant={tenantName}\n namespace={tenantNamespace}\n />\n )}\n {yamlScreenOpen && (\n \n )}\n \n \n Tenant\n \n {` > ${match.params[\"tenantName\"]}`}\n \n \n \n \n \n Edit YAML\n \n \n \n }\n />\n \n \n \n {\n setSelectedTab(newValue);\n }}\n aria-label=\"tenant-tabs\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n \n \n \n \n \n \n \n {selectedTab === 0 && (\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {tenant?.endpoints && (\n \n \n \n \n \n \n )}\n \n \n \n \n
\n

Details

\n
\n
Capacity:{niceBytes(capacity.toString(10))}MinIO:\n {\n setUpdateMinioVersion(true);\n }}\n >\n {tenant ? tenant.image : \"\"}\n \n
Clusters:{poolCount}Console:\n {\n setUpdateMinioVersion(true);\n }}\n >\n {tenant ? tenant.console_image : \"\"}\n \n
Instances:{instances}Volumes:{volumes}
Endpoint:\n \n {tenant?.endpoints.minio}\n \n Console:\n \n {tenant?.endpoints.console}\n \n
State:{tenant?.currentState}
\n
\n \n \n \n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {adEnabled ||\n (!adEnabled && !oicEnabled && (\n \n \n \n \n ))}\n {oicEnabled ||\n (!oicEnabled && !adEnabled && (\n \n \n \n \n ))}\n \n
\n

Features

\n
\n
Logs:\n \n {logEnabled ? \"Enabled\" : \"Disabled\"}\n \n Monitoring:\n \n {monitoringEnabled ? \"Enabled\" : \"Disabled\"}\n \n
Encryption:\n \n {encryptionEnabled ? \"Enabled\" : \"Disabled\"}\n \n
Active Directory:\n \n {adEnabled ? \"Enabled\" : \"Disabled\"}\n \n OpenID:\n \n {oicEnabled ? \"Enabled\" : \"Disabled\"}\n \n
\n
\n
\n
\n
\n )}\n {selectedTab === 1 && (\n \n \n {\n // setFilter(event.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n }\n onClick={() => {\n setAddPool(true);\n }}\n >\n Expand Tenant\n \n \n \n
\n
\n\n \n {\n console.log(element);\n },\n sendOnlyId: true,\n },\n ]}\n columns={[\n { label: \"Name\", elementKey: \"name\" },\n { label: \"Capacity\", elementKey: \"capacity\" },\n { label: \"# of Instances\", elementKey: \"servers\" },\n { label: \"# of Drives\", elementKey: \"volumes\" },\n ]}\n isLoading={false}\n records={pools}\n entityName=\"Servers\"\n idField=\"name\"\n />\n \n
\n )}\n {selectedTab === 2 && (\n \n
\n {\n return input != null ? input : 0;\n },\n },\n { label: \"Node\", elementKey: \"node\" },\n ]}\n isLoading={false}\n records={pods}\n entityName=\"Servers\"\n idField=\"name\"\n />\n
\n )}\n {selectedTab === 3 && (\n \n
\n \n \n \n \n \n
\n )}\n
\n
\n
\n );\n};\n\nconst connector = connect(null, {\n setErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(TenantDetails));\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\nexport const OBJECT_BROWSER_ADD_ROUTE = \"OBJECT_BROWSER/ADD_ROUTE\";\nexport const OBJECT_BROWSER_RESET_ROUTES_LIST =\n \"OBJECT_BROWSER/RESET_ROUTES_LIST\";\nexport const OBJECT_BROWSER_REMOVE_ROUTE_LEVEL =\n \"OBJECT_BROWSER/REMOVE_ROUTE_LEVEL\";\nexport const OBJECT_BROWSER_SET_ALL_ROUTES = \"OBJECT_BROWSER/SET_ALL_ROUTES\";\nexport const OBJECT_BROWSER_CREATE_FOLDER = \"OBJECT_BROWSER/CREATE_FOLDER\";\nexport const OBJECT_BROWSER_SET_LAST_AS_FILE =\n \"OBJECT_BROWSER/SET_LAST_AS_FILE\";\nexport const OBJECT_BROWSER_DOWNLOAD_FILE_LOADER =\n \"OBJECT_BROWSER/DOWNLOAD_FILE_LOADER\";\nexport const OBJECT_BROWSER_DOWNLOADED_FILE = \"OBJECT_BROWSER/DOWNLOADED_FILE\";\n\ninterface AddRouteAction {\n type: typeof OBJECT_BROWSER_ADD_ROUTE;\n route: string;\n label: string;\n routeType: string;\n}\n\ninterface ResetRoutesList {\n type: typeof OBJECT_BROWSER_RESET_ROUTES_LIST;\n reset: boolean;\n}\n\ninterface RemoveRouteLevel {\n type: typeof OBJECT_BROWSER_REMOVE_ROUTE_LEVEL;\n toRoute: string;\n}\n\ninterface SetAllRoutes {\n type: typeof OBJECT_BROWSER_SET_ALL_ROUTES;\n currentRoute: string;\n}\n\ninterface CreateFolder {\n type: typeof OBJECT_BROWSER_CREATE_FOLDER;\n newRoute: string;\n}\n\ninterface SetLastAsFile {\n type: typeof OBJECT_BROWSER_SET_LAST_AS_FILE;\n}\n\ninterface SetFileDownload {\n type: typeof OBJECT_BROWSER_DOWNLOAD_FILE_LOADER;\n path: string;\n}\n\ninterface FileDownloaded {\n type: typeof OBJECT_BROWSER_DOWNLOADED_FILE;\n path: string;\n}\n\nexport type ObjectBrowserActionTypes =\n | AddRouteAction\n | ResetRoutesList\n | RemoveRouteLevel\n | SetAllRoutes\n | CreateFolder\n | SetLastAsFile\n | SetFileDownload\n | FileDownloaded;\n\nexport const addRoute = (route: string, label: string, routeType: string) => {\n return {\n type: OBJECT_BROWSER_ADD_ROUTE,\n route,\n label,\n routeType,\n };\n};\n\nexport const resetRoutesList = (reset: boolean) => {\n return {\n type: OBJECT_BROWSER_RESET_ROUTES_LIST,\n reset,\n };\n};\n\nexport const removeRouteLevel = (toRoute: string) => {\n return {\n type: OBJECT_BROWSER_REMOVE_ROUTE_LEVEL,\n toRoute,\n };\n};\n\nexport const setAllRoutes = (currentRoute: string) => {\n return {\n type: OBJECT_BROWSER_SET_ALL_ROUTES,\n currentRoute,\n };\n};\n\nexport const createFolder = (newRoute: string) => {\n return {\n type: OBJECT_BROWSER_CREATE_FOLDER,\n newRoute,\n };\n};\n\nexport const setLastAsFile = () => {\n return {\n type: OBJECT_BROWSER_SET_LAST_AS_FILE,\n };\n};\n\nexport const fileIsBeingPrepared = (path: string) => {\n return {\n type: OBJECT_BROWSER_DOWNLOAD_FILE_LOADER,\n path,\n };\n};\n\nexport const fileDownloadStarted = (path: string) => {\n return {\n type: OBJECT_BROWSER_DOWNLOADED_FILE,\n path,\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 from \"react\";\nimport get from \"lodash/get\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { connect } from \"react-redux\";\nimport { withStyles } from \"@material-ui/core\";\nimport { createStyles, Theme } from \"@material-ui/core/styles\";\nimport { removeRouteLevel } from \"./actions\";\nimport { ObjectBrowserState, Route } from \"./reducers\";\nimport { objectBrowserCommon } from \"../Common/FormComponents/common/styleLibrary\";\nimport { Link } from \"react-router-dom\";\n\ninterface ObjectBrowserReducer {\n objectBrowser: ObjectBrowserState;\n}\n\ninterface IObjectBrowser {\n classes: any;\n objectsList: Route[];\n removeRouteLevel: (path: string) => any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...objectBrowserCommon,\n });\n\nconst BrowserBreadcrumbs = ({\n classes,\n objectsList,\n removeRouteLevel,\n}: IObjectBrowser) => {\n const listBreadcrumbs = objectsList.map((objectItem, index) => {\n return (\n \n {\n removeRouteLevel(objectItem.route);\n }}\n >\n {objectItem.label}\n \n {index < objectsList.length - 1 && / }\n \n );\n });\n\n return (\n \n \n
\n {objectsList && objectsList.length > 0\n ? objectsList.slice(-1)[0].label\n : \"\"}\n
\n
\n \n {listBreadcrumbs}\n \n
\n );\n};\n\nconst mapStateToProps = ({ objectBrowser }: ObjectBrowserReducer) => ({\n objectsList: get(objectBrowser, \"routesList\", []),\n});\n\nconst mapDispatchToProps = {\n removeRouteLevel,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(BrowserBreadcrumbs));\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, { useState, useEffect, Fragment } from \"react\";\nimport { withRouter } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport { Button, IconButton } from \"@material-ui/core\";\nimport { CreateIcon } from \"../../../icons\";\nimport { niceBytes } from \"../../../common/utils\";\nimport { Bucket, BucketList, HasPermissionResponse } from \"../Buckets/types\";\nimport {\n actionsTray,\n objectBrowserCommon,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { addRoute, resetRoutesList } from \"./actions\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport BrowserBreadcrumbs from \"./BrowserBreadcrumbs\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport AddBucket from \"../Buckets/ListBuckets/AddBucket\";\nimport api from \"../../../common/api\";\nimport RefreshIcon from \"@material-ui/icons/Refresh\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n usedSpaceCol: {\n width: 150,\n textAlign: \"right\",\n },\n subTitleLabel: {\n alignItems: \"center\",\n display: \"flex\",\n },\n bucketName: {\n display: \"flex\",\n alignItems: \"center\",\n },\n iconBucket: {\n backgroundImage: \"url(/images/ob_bucket_clear.svg)\",\n backgroundRepeat: \"no-repeat\",\n backgroundPosition: \"center center\",\n width: 16,\n height: 40,\n marginRight: 10,\n },\n \"@global\": {\n \".rowLine:hover .iconBucketElm\": {\n backgroundImage: \"url(/images/ob_bucket_filled.svg)\",\n },\n },\n browsePaper: {\n height: \"calc(100vh - 280px)\",\n },\n ...actionsTray,\n ...searchField,\n ...objectBrowserCommon,\n });\n\ninterface IBrowseBucketsProps {\n classes: any;\n addRoute: (path: string, label: string, type: string) => any;\n resetRoutesList: (doVar: boolean) => any;\n displayErrorMessage: typeof setErrorSnackMessage;\n match: any;\n}\n\nconst BrowseBuckets = ({\n classes,\n match,\n addRoute,\n resetRoutesList,\n displayErrorMessage,\n}: IBrowseBucketsProps) => {\n const [loading, setLoading] = useState(true);\n const [records, setRecords] = useState([]);\n const [addScreenOpen, setAddScreenOpen] = useState(false);\n const [filterBuckets, setFilterBuckets] = useState(\"\");\n const [loadingPerms, setLoadingPerms] = useState(true);\n const [canCreateBucket, setCanCreateBucket] = useState(false);\n\n // check the permissions for creating bucket\n useEffect(() => {\n if (loadingPerms) {\n api\n .invoke(\"POST\", `/api/v1/has-permission`, {\n actions: [\n {\n id: \"createBucket\",\n action: \"s3:CreateBucket\",\n },\n ],\n })\n .then((res: HasPermissionResponse) => {\n const canCreate = res.permissions\n .filter((s) => s.id === \"createBucket\")\n .pop();\n if (canCreate && canCreate.can) {\n setCanCreateBucket(true);\n } else {\n setCanCreateBucket(false);\n }\n\n setLoadingPerms(false);\n // setRecords(res.buckets || []);\n })\n .catch((err: any) => {\n setLoadingPerms(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loadingPerms]);\n\n useEffect(() => {\n resetRoutesList(true);\n }, [match, resetRoutesList]);\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\"GET\", `/api/v1/buckets`)\n .then((res: BucketList) => {\n setLoading(false);\n setRecords(res.buckets || []);\n })\n .catch((err: any) => {\n setLoading(false);\n displayErrorMessage(err);\n });\n }\n }, [loading, displayErrorMessage]);\n\n const closeAddModalAndRefresh = (refresh: boolean) => {\n setAddScreenOpen(false);\n\n if (refresh) {\n setLoading(true);\n }\n };\n\n const filteredRecords = records.filter((b: Bucket) => {\n if (filterBuckets === \"\") {\n return true;\n }\n return b.name.indexOf(filterBuckets) >= 0;\n });\n\n const handleViewChange = (idElement: string) => {\n const currentPath = get(match, \"url\", \"/object-browser\");\n const newPath = `${currentPath}/${idElement}`;\n\n addRoute(newPath, idElement, \"path\");\n };\n\n const renderBucket = (bucketName: string) => {\n return (\n
\n
\n {bucketName}\n
\n );\n };\n\n return (\n \n {addScreenOpen && (\n \n )}\n \n \n
\n \n
\n
\n \n {\n setFilterBuckets(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n {\n setLoading(true);\n }}\n >\n \n \n {canCreateBucket && (\n
\n }\n onClick={() => {\n setAddScreenOpen(true);\n }}\n >\n Create Bucket\n \n
\n )}\n
\n \n
\n
\n \n \n \n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n addRoute,\n resetRoutesList,\n displayErrorMessage: setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withRouter(connector(withStyles(styles)(BrowseBuckets)));\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 from \"react\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Grid } from \"@material-ui/core\";\nimport BrowseBuckets from \"./BrowseBuckets\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\n\ninterface IObjectBrowserProps {\n match: any;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n watchList: {\n background: \"white\",\n maxHeight: \"400\",\n overflow: \"auto\",\n \"& ul\": {\n margin: \"4\",\n padding: \"0\",\n },\n \"& ul li\": {\n listStyle: \"none\",\n margin: \"0\",\n padding: \"0\",\n borderBottom: \"1px solid #dedede\",\n },\n },\n actionsTray: {\n textAlign: \"right\",\n \"& button\": {\n marginLeft: 10,\n },\n },\n inputField: {\n background: \"#FFFFFF\",\n padding: 12,\n borderRadius: 5,\n marginLeft: 10,\n boxShadow: \"0px 3px 6px #00000012\",\n },\n fieldContainer: {\n background: \"#FFFFFF\",\n padding: 0,\n borderRadius: 5,\n marginLeft: 10,\n textAlign: \"left\",\n minWidth: \"206\",\n boxShadow: \"0px 3px 6px #00000012\",\n },\n lastElementWPadding: {\n paddingRight: \"78\",\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst ObjectBrowser = ({ match, classes }: IObjectBrowserProps) => {\n const pathIn = get(match, \"url\", \"\");\n\n return (\n \n \n \n \n {pathIn === \"/object-browser\" && }\n \n \n \n );\n};\n\nexport default withStyles(styles)(ObjectBrowser);\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport { setErrorSnackMessage } from \"../../../../../../actions\";\nimport api from \"../../../../../../common/api\";\n\ninterface IDeleteObjectProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedObject: string;\n selectedBucket: string;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst DeleteObject = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedBucket,\n selectedObject,\n setErrorSnackMessage,\n}: IDeleteObjectProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n\n const removeRecord = () => {\n if (deleteLoading) {\n return;\n }\n let recursive = false;\n if (selectedObject.endsWith(\"/\")) {\n recursive = true;\n }\n setDeleteLoading(true);\n api\n .invoke(\n \"DELETE\",\n `/api/v1/buckets/${selectedBucket}/objects?path=${selectedObject}&recursive=${recursive}`\n )\n .then(() => {\n setDeleteLoading(false);\n closeDeleteModalAndRefresh(true);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n };\n\n return (\n {\n closeDeleteModalAndRefresh(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete\n \n {deleteLoading && }\n \n Are you sure you want to delete: {selectedObject}?{\" \"}\n \n \n \n {\n closeDeleteModalAndRefresh(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n {\n removeRecord();\n }}\n color=\"secondary\"\n disabled={deleteLoading}\n >\n Delete\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(DeleteObject);\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, { useState } from \"react\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport { Button, Grid } from \"@material-ui/core\";\nimport InputBoxWrapper from \"../../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { connect } from \"react-redux\";\nimport { createFolder } from \"../../../../ObjectBrowser/actions\";\n\ninterface ICreateFolder {\n classes: any;\n modalOpen: boolean;\n folderName: string;\n createFolder: (newFolder: string) => any;\n onClose: () => any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n pathLabel: {\n marginTop: 0,\n marginBottom: 32,\n },\n ...modalBasic,\n });\n\nconst CreateFolderModal = ({\n modalOpen,\n folderName,\n onClose,\n createFolder,\n classes,\n}: ICreateFolder) => {\n const [pathUrl, setPathUrl] = useState(\"\");\n\n const resetForm = () => {\n setPathUrl(\"\");\n };\n\n const createProcess = () => {\n createFolder(pathUrl);\n onClose();\n };\n\n const folderTruncated = folderName.split(\"/\").slice(2).join(\"/\");\n\n return (\n \n \n \n

\n Current Path: {folderTruncated}/\n

\n \n {\n setPathUrl(e.target.value);\n }}\n />\n \n \n \n Clear\n \n \n Save\n \n \n
\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n createFolder,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(CreateFolderModal));\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 from \"react\";\nimport { SvgIcon } from \"@material-ui/core\";\n\nconst UploadFile = () => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default UploadFile;\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 { isNullOrUndefined } from \"util\";\n\nexport const download = (\n bucketName: string,\n objectPath: string,\n versionID: any,\n callBack?: (objIdentifier: string) => void,\n includeVersionInCallback?: boolean\n) => {\n const anchor = document.createElement(\"a\");\n document.body.appendChild(anchor);\n const xhr = new XMLHttpRequest();\n const allPathData = objectPath.split(\"/\");\n const objectName = allPathData[allPathData.length - 1];\n\n let path = `/api/v1/buckets/${bucketName}/objects/download?prefix=${objectPath}`;\n if (!isNullOrUndefined(versionID) && versionID !== \"null\") {\n path = path.concat(`&version_id=${versionID}`);\n }\n\n xhr.open(\"GET\", path, true);\n xhr.responseType = \"blob\";\n\n xhr.onload = function (e) {\n if (this.status === 200) {\n const blob = new Blob([this.response], {\n type: \"octet/stream\",\n });\n const blobUrl = window.URL.createObjectURL(blob);\n\n anchor.href = blobUrl;\n anchor.download = objectName;\n\n anchor.click();\n window.URL.revokeObjectURL(blobUrl);\n anchor.remove();\n\n if (callBack) {\n callBack(\n `${bucketName}/${objectPath}${\n includeVersionInCallback ? `-${versionID}` : \"\"\n }`\n );\n }\n }\n };\n xhr.send();\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, { useEffect, useRef, useState } from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport { BucketObject, BucketObjectsList } from \"./types\";\nimport api from \"../../../../../../common/api\";\nimport TableWrapper from \"../../../../Common/TableWrapper/TableWrapper\";\nimport { niceBytes } from \"../../../../../../common/utils\";\nimport DeleteObject from \"./DeleteObject\";\n\nimport {\n actionsTray,\n containerForHeader,\n objectBrowserCommon,\n searchField,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport PageHeader from \"../../../../Common/PageHeader/PageHeader\";\nimport { Button, IconButton, Input, Typography } from \"@material-ui/core\";\nimport * as reactMoment from \"react-moment\";\nimport { CreateIcon } from \"../../../../../../icons\";\nimport BrowserBreadcrumbs from \"../../../../ObjectBrowser/BrowserBreadcrumbs\";\nimport get from \"lodash/get\";\nimport { withRouter } from \"react-router-dom\";\nimport {\n addRoute,\n setAllRoutes,\n setLastAsFile,\n fileIsBeingPrepared,\n fileDownloadStarted,\n} from \"../../../../ObjectBrowser/actions\";\nimport { connect } from \"react-redux\";\nimport {\n ObjectBrowserReducer,\n Route,\n} from \"../../../../ObjectBrowser/reducers\";\nimport CreateFolderModal from \"./CreateFolderModal\";\nimport UploadFile from \"../../../../../../icons/UploadFile\";\nimport { download } from \"../utils\";\nimport {\n setLoadingProgress,\n setSnackBarMessage,\n setErrorSnackMessage,\n} from \"../../../../../../actions\";\nimport RefreshIcon from \"@material-ui/icons/Refresh\";\n\nconst commonIcon = {\n backgroundRepeat: \"no-repeat\",\n backgroundPosition: \"center center\",\n width: 16,\n minWidth: 16,\n height: 40,\n marginRight: 10,\n};\n\nconst styles = (theme: Theme) =>\n createStyles({\n seeMore: {\n marginTop: theme.spacing(3),\n },\n paper: {\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n\n addSideBar: {\n width: \"320px\",\n padding: \"20px\",\n },\n tableToolbar: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(0),\n },\n minTableHeader: {\n color: \"#393939\",\n \"& tr\": {\n \"& th\": {\n fontWeight: \"bold\",\n },\n },\n },\n fileName: {\n display: \"flex\",\n alignItems: \"center\",\n },\n fileNameText: {\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n },\n iconFolder: {\n backgroundImage: \"url(/images/ob_folder_clear.svg)\",\n ...commonIcon,\n },\n iconFile: {\n backgroundImage: \"url(/images/ob_file_clear.svg)\",\n ...commonIcon,\n },\n buttonsContainer: {\n \"& .MuiButtonBase-root\": {\n marginLeft: 10,\n },\n },\n browsePaper: {\n height: \"calc(100vh - 280px)\",\n },\n \"@global\": {\n \".rowLine:hover .iconFileElm\": {\n backgroundImage: \"url(/images/ob_file_filled.svg)\",\n },\n \".rowLine:hover .iconFolderElm\": {\n backgroundImage: \"url(/images/ob_folder_filled.svg)\",\n },\n },\n listButton: {\n marginLeft: \"10px\",\n },\n ...actionsTray,\n ...searchField,\n ...objectBrowserCommon,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IListObjectsProps {\n classes: any;\n match: any;\n addRoute: (param1: string, param2: string, param3: string) => any;\n setAllRoutes: (path: string) => any;\n routesList: Route[];\n downloadingFiles: string[];\n setLastAsFile: () => any;\n setLoadingProgress: typeof setLoadingProgress;\n setSnackBarMessage: typeof setSnackBarMessage;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n fileIsBeingPrepared: typeof fileIsBeingPrepared;\n fileDownloadStarted: typeof fileDownloadStarted;\n}\n\nfunction useInterval(callback: any, delay: number) {\n const savedCallback = useRef(null);\n\n // Remember the latest callback.\n useEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n\n // Set up the interval.\n useEffect(() => {\n function tick() {\n if (savedCallback !== undefined && savedCallback.current) {\n savedCallback.current();\n }\n }\n if (delay !== null) {\n let id = setInterval(tick, delay);\n return () => clearInterval(id);\n }\n }, [delay]);\n}\n\nconst defLoading = Loading...;\n\nconst ListObjects = ({\n classes,\n match,\n addRoute,\n setAllRoutes,\n routesList,\n downloadingFiles,\n setLastAsFile,\n setLoadingProgress,\n setSnackBarMessage,\n setErrorSnackMessage,\n fileIsBeingPrepared,\n fileDownloadStarted,\n}: IListObjectsProps) => {\n const [records, setRecords] = useState([]);\n const [loading, setLoading] = useState(true);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [createFolderOpen, setCreateFolderOpen] = useState(false);\n const [selectedObject, setSelectedObject] = useState(\"\");\n const [selectedBucket, setSelectedBucket] = useState(\"\");\n const [filterObjects, setFilterObjects] = useState(\"\");\n const [loadingStartTime, setLoadingStartTime] = useState(0);\n const [loadingMessage, setLoadingMessage] = useState(\n defLoading\n );\n\n const updateMessage = () => {\n let timeDelta = Date.now() - loadingStartTime;\n\n if (timeDelta / 1000 >= 6) {\n setLoadingMessage(\n \n \n This operation is taking longer than expected... (\n {Math.ceil(timeDelta / 1000)}s)\n \n \n );\n } else if (timeDelta / 1000 >= 3) {\n setLoadingMessage(\n \n This operation is taking longer than expected...\n \n );\n }\n };\n\n useInterval(() => {\n // Your custom logic here\n if (loading) {\n updateMessage();\n }\n }, 1000);\n\n useEffect(() => {\n const bucketName = match.params[\"bucket\"];\n const internalPaths = match.params[0];\n\n const verifyIfIsFile = () => {\n const bucketName = match.params[\"bucket\"];\n const internalPaths = match.params[0];\n\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects?prefix=${internalPaths}`\n )\n .then((res: BucketObjectsList) => {\n //It is a file since it has elements in the object, setting file flag and waiting for component mount\n if (res.objects !== null) {\n setLastAsFile();\n } else {\n // It is a folder, we remove loader\n setLoading(false);\n }\n })\n .catch((err: any) => {\n setLoading(false);\n setErrorSnackMessage(err);\n });\n };\n\n if (loading) {\n let extraPath = \"\";\n if (internalPaths) {\n extraPath = `?prefix=${internalPaths}/`;\n }\n\n let currentTimestamp = Date.now() + 0;\n setLoadingStartTime(currentTimestamp);\n setLoadingMessage(defLoading);\n\n api\n .invoke(\"GET\", `/api/v1/buckets/${bucketName}/objects${extraPath}`)\n .then((res: BucketObjectsList) => {\n setSelectedBucket(bucketName);\n\n const records: BucketObject[] = res.objects || [];\n const folders: BucketObject[] = [];\n const files: BucketObject[] = [];\n\n records.forEach((record) => {\n // this is a folder\n if (record.name.endsWith(\"/\")) {\n folders.push(record);\n } else {\n // this is a file\n files.push(record);\n }\n });\n\n const recordsInElement = [...folders, ...files];\n\n setRecords(recordsInElement);\n // In case no objects were retrieved, We check if item is a file\n if (!res.objects && extraPath !== \"\") {\n verifyIfIsFile();\n return;\n }\n setLoading(false);\n })\n .catch((err: any) => {\n setLoading(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loading, match, setLastAsFile, setErrorSnackMessage]);\n\n useEffect(() => {\n const url = get(match, \"url\", \"/object-browser\");\n if (url !== routesList[routesList.length - 1].route) {\n setAllRoutes(url);\n }\n }, [match, routesList, setAllRoutes]);\n\n useEffect(() => {\n setLoading(true);\n }, [routesList, setLoading]);\n\n const closeDeleteModalAndRefresh = (refresh: boolean) => {\n setDeleteOpen(false);\n\n if (refresh) {\n setSnackBarMessage(`Object '${selectedObject}' deleted successfully.`);\n setLoading(true);\n }\n };\n\n const closeAddFolderModal = () => {\n setCreateFolderOpen(false);\n };\n\n const upload = (e: any, bucketName: string, path: string) => {\n if (\n e === null ||\n e === undefined ||\n e.target === null ||\n e.target === undefined\n ) {\n return;\n }\n e.preventDefault();\n let files = e.target.files;\n let uploadUrl = `/api/v1/buckets/${bucketName}/objects/upload`;\n if (path !== \"\") {\n uploadUrl = `${uploadUrl}?prefix=${path}`;\n }\n let xhr = new XMLHttpRequest();\n const areMultipleFiles = files.length > 1 ? true : false;\n const errorMessage = `An error occurred while uploading the file${\n areMultipleFiles ? \"s\" : \"\"\n }.`;\n const okMessage = `Object${\n areMultipleFiles ? \"s\" : ``\n } uploaded successfully.`;\n\n xhr.open(\"POST\", uploadUrl, true);\n\n xhr.withCredentials = false;\n xhr.onload = function (event) {\n if (\n xhr.status === 401 ||\n xhr.status === 403 ||\n xhr.status === 400 ||\n xhr.status === 500\n ) {\n setSnackBarMessage(errorMessage);\n }\n if (xhr.status === 200) {\n setSnackBarMessage(okMessage);\n }\n };\n\n xhr.upload.addEventListener(\"error\", (event) => {\n setSnackBarMessage(errorMessage);\n });\n\n xhr.upload.addEventListener(\"progress\", (event) => {\n setLoadingProgress(Math.floor((event.loaded * 100) / event.total));\n });\n\n xhr.onerror = () => {\n setSnackBarMessage(errorMessage);\n };\n xhr.onloadend = () => {\n setLoading(true);\n setLoadingProgress(100);\n };\n\n const formData = new FormData();\n\n for (let file of files) {\n const fileName = file.name;\n const blobFile = new Blob([file]);\n formData.append(fileName, blobFile);\n }\n\n xhr.send(formData);\n e.target.value = null;\n };\n\n const displayParsedDate = (object: BucketObject) => {\n if (object.name.endsWith(\"/\")) {\n return \"\";\n }\n return {object.last_modified};\n };\n\n const displayNiceBytes = (object: BucketObject) => {\n if (object.name.endsWith(\"/\")) {\n return \"\";\n }\n return niceBytes(String(object.size));\n };\n\n const confirmDeleteObject = (object: string) => {\n setDeleteOpen(true);\n setSelectedObject(object);\n };\n\n const removeDownloadAnimation = (path: string) => {\n fileDownloadStarted(path);\n };\n\n const downloadObject = (object: BucketObject) => {\n fileIsBeingPrepared(`${selectedBucket}/${object.name}`);\n if (object.size > 104857600) {\n // If file is bigger than 100MB we show a notification\n setSnackBarMessage(\n \"Download process started, it may take a few moments to complete\"\n );\n }\n\n download(\n selectedBucket,\n object.name,\n object.version_id,\n removeDownloadAnimation\n );\n };\n\n const openPath = (idElement: string) => {\n const currentPath = get(match, \"url\", \"/object-browser\");\n\n // Element is a folder, we redirect to it\n if (idElement.endsWith(\"/\")) {\n const idElementClean = idElement\n .substr(0, idElement.length - 1)\n .split(\"/\");\n const lastIndex = idElementClean.length - 1;\n const newPath = `${currentPath}/${idElementClean[lastIndex]}`;\n\n addRoute(newPath, idElementClean[lastIndex], \"path\");\n return;\n }\n // Element is a file. we open details here\n const pathInArray = idElement.split(\"/\");\n const fileName = pathInArray[pathInArray.length - 1];\n const newPath = `${currentPath}/${fileName}`;\n\n addRoute(newPath, fileName, \"file\");\n return;\n };\n\n const uploadObject = (e: any): void => {\n // Handle of deeper routes.\n const currentPath = routesList[routesList.length - 1].route;\n const splitPaths = currentPath\n .split(\"/\")\n .filter((item) => item.trim() !== \"\");\n\n let path = \"\";\n\n if (splitPaths.length > 2) {\n path = `${splitPaths.slice(2).join(\"/\")}/`;\n }\n\n upload(e, selectedBucket, path);\n };\n\n const tableActions = [\n { type: \"view\", onClick: openPath, sendOnlyId: true },\n {\n type: \"download\",\n onClick: downloadObject,\n showLoaderFunction: (item: string) =>\n downloadingFiles.includes(`${match.params[\"bucket\"]}/${item}`),\n },\n { type: \"delete\", onClick: confirmDeleteObject, sendOnlyId: true },\n ];\n\n const displayName = (element: string) => {\n let elementString = element;\n let icon = `${classes.iconFile} iconFileElm`;\n // Element is a folder\n if (element.endsWith(\"/\")) {\n icon = `${classes.iconFolder} iconFolderElm`;\n elementString = element.substr(0, element.length - 1);\n }\n\n const splitItem = elementString.split(\"/\");\n\n return (\n
\n
\n \n {splitItem[splitItem.length - 1]}\n \n
\n );\n };\n\n const filteredRecords = records.filter((b: BucketObject) => {\n if (filterObjects === \"\") {\n return true;\n } else {\n if (b.name.indexOf(filterObjects) >= 0) {\n return true;\n } else {\n return false;\n }\n }\n });\n\n return (\n \n {deleteOpen && (\n \n )}\n {createFolderOpen && (\n \n )}\n \n \n \n \n
\n \n
\n
\n \n {\n setFilterObjects(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n {\n setLoading(true);\n }}\n >\n \n \n }\n component=\"label\"\n onClick={() => {\n setCreateFolderOpen(true);\n }}\n className={classes.listButton}\n >\n Create Folder\n \n }\n component=\"label\"\n className={classes.listButton}\n >\n File\n uploadObject(e)}\n id=\"file-input\"\n style={{ display: \"none\" }}\n />\n \n \n \n
\n
\n \n \n \n
\n
\n
\n );\n};\n\nconst mapStateToProps = ({ objectBrowser }: ObjectBrowserReducer) => ({\n routesList: get(objectBrowser, \"routesList\", []),\n downloadingFiles: get(objectBrowser, \"downloadingFiles\", []),\n});\n\nconst mapDispatchToProps = {\n addRoute,\n setAllRoutes,\n setLastAsFile,\n setLoadingProgress,\n setSnackBarMessage,\n setErrorSnackMessage,\n fileIsBeingPrepared,\n fileDownloadStarted,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default withRouter(connector(withStyles(styles)(ListObjects)));\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, { useEffect, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Button from \"@material-ui/core/Button\";\nimport { modalBasic } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { CopyIcon } from \"../../../../../../icons\";\nimport { IFileInfo } from \"./types\";\nimport {\n setModalErrorSnackMessage,\n setModalSnackMessage,\n} from \"../../../../../../actions\";\nimport api from \"../../../../../../common/api\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport DateSelector from \"../../../../Common/FormComponents/DateSelector/DateSelector\";\nimport PredefinedList from \"../../../../Common/FormComponents/PredefinedList/PredefinedList\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n copyButtonContainer: {\n paddingLeft: 16,\n },\n modalContent: {\n paddingBottom: 53,\n },\n ...modalBasic,\n });\n\ninterface IShareFileProps {\n classes: any;\n open: boolean;\n bucketName: string;\n dataObject: IFileInfo;\n closeModalAndRefresh: () => void;\n setModalSnackMessage: typeof setModalSnackMessage;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst ShareFile = ({\n classes,\n open,\n closeModalAndRefresh,\n bucketName,\n dataObject,\n setModalSnackMessage,\n setModalErrorSnackMessage,\n}: IShareFileProps) => {\n const [shareURL, setShareURL] = useState(\"\");\n const [isLoadingFile, setIsLoadingFile] = useState(false);\n const [selectedDate, setSelectedDate] = useState(\"\");\n const [dateValid, setDateValid] = useState(true);\n\n const dateChanged = (newDate: string, isValid: boolean) => {\n setDateValid(isValid);\n if (isValid) {\n setSelectedDate(newDate);\n return;\n }\n setSelectedDate(\"\");\n };\n\n useEffect(() => {\n if (dateValid) {\n setIsLoadingFile(true);\n setShareURL(\"\");\n\n const slDate = new Date(`${selectedDate}T23:59:59`);\n const currDate = new Date();\n\n const diffDate = slDate.getTime() - currDate.getTime();\n\n if (diffDate < 0) {\n setModalErrorSnackMessage(\n \"Selected date must be greater than current time.\"\n );\n setShareURL(\"\");\n setIsLoadingFile(false);\n\n return;\n }\n\n if (diffDate > 604800000) {\n setModalErrorSnackMessage(\n \"You can share a file only for less than 7 days.\"\n );\n setShareURL(\"\");\n setIsLoadingFile(false);\n\n return;\n }\n\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects/share?prefix=${\n dataObject.name\n }&version_id=${dataObject.version_id}${\n selectedDate !== \"\" ? `&expires=${diffDate}ms` : \"\"\n }`\n )\n .then((res: string) => {\n setShareURL(res);\n setIsLoadingFile(false);\n })\n .catch((error) => {\n setModalErrorSnackMessage(error);\n setShareURL(\"\");\n setIsLoadingFile(false);\n });\n return;\n }\n }, [\n dataObject,\n selectedDate,\n bucketName,\n dateValid,\n setShareURL,\n setModalErrorSnackMessage,\n ]);\n\n return (\n \n {\n closeModalAndRefresh();\n }}\n >\n \n \n \n \n \n \n \n \n \n \n }\n onClick={() => {\n setModalSnackMessage(\"Share URL Copied to clipboard\");\n }}\n disabled={shareURL === \"\" || isLoadingFile}\n >\n Copy\n \n \n \n \n \n \n \n );\n};\n\nconst connector = connect(null, {\n setModalSnackMessage,\n setModalErrorSnackMessage,\n});\n\nexport default withStyles(styles)(connector(ShareFile));\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 from \"react\";\nimport SvgIcon from \"@material-ui/core/SvgIcon\";\n\nconst ShareIcon = () => {\n return (\n \n \n \n \n \n \n );\n};\n\nexport default ShareIcon;\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 from \"react\";\nimport SvgIcon from \"@material-ui/core/SvgIcon\";\n\nconst DownloadIcon = () => {\n return (\n \n \n \n \n \n \n );\n};\n\nexport default DownloadIcon;\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, { useEffect, useRef, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Button from \"@material-ui/core/Button\";\nimport { modalBasic } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { IFileInfo } from \"./types\";\nimport { setModalErrorSnackMessage } from \"../../../../../../actions\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport RadioGroupSelector from \"../../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport DateSelector from \"../../../../Common/FormComponents/DateSelector/DateSelector\";\nimport api from \"../../../../../../common/api\";\nimport { twoDigitDate } from \"../../../../Common/FormComponents/DateSelector/utils\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n objectName: {\n fontSize: 18,\n fontWeight: 700,\n marginBottom: 40,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface ISetRetentionProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (updateInfo: boolean) => void;\n objectName: string;\n bucketName: string;\n objectInfo: IFileInfo;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\ninterface IRefObject {\n resetDate: () => void;\n}\n\nconst SetRetention = ({\n classes,\n open,\n closeModalAndRefresh,\n objectName,\n objectInfo,\n bucketName,\n setModalErrorSnackMessage,\n}: ISetRetentionProps) => {\n const [statusEnabled, setStatusEnabled] = useState(true);\n const [type, setType] = useState(\"\");\n const [date, setDate] = useState(\"\");\n const [isDateValid, setIsDateValid] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const [alreadyConfigured, setAlreadyConfigured] = useState(false);\n\n useEffect(() => {\n if (objectInfo.retention_mode) {\n setType(objectInfo.retention_mode.toLowerCase());\n setAlreadyConfigured(true);\n }\n // get retention_until_date if defined\n if (objectInfo.retention_until_date) {\n const valueDate = new Date(objectInfo.retention_until_date);\n if (valueDate.toString() !== \"Invalid Date\") {\n const year = valueDate.getFullYear();\n const month = twoDigitDate(valueDate.getMonth() + 1);\n const day = valueDate.getDate();\n if (!isNaN(day) && month !== \"NaN\" && !isNaN(year)) {\n setDate(`${year}-${month}-${day}`);\n }\n }\n setAlreadyConfigured(true);\n }\n }, [objectInfo]);\n\n const dateElement = useRef(null);\n\n const dateFieldDisabled = () => {\n return !(statusEnabled && (type === \"governance\" || type === \"compliance\"));\n };\n\n const onSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n };\n\n const resetForm = () => {\n setStatusEnabled(false);\n setType(\"\");\n if (dateElement.current) {\n dateElement.current.resetDate();\n }\n };\n\n const addRetention = (\n selectedObject: string,\n versionId: string | null,\n expireDate: string\n ) => {\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${bucketName}/objects/retention?prefix=${selectedObject}&version_id=${versionId}`,\n {\n expires: expireDate,\n mode: type,\n }\n )\n .then((res: any) => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((error) => {\n setModalErrorSnackMessage(error);\n setIsSaving(false);\n });\n };\n\n const disableRetention = (\n selectedObject: string,\n versionId: string | null\n ) => {\n api\n .invoke(\n \"DELETE\",\n `/api/v1/buckets/${bucketName}/objects/retention?prefix=${selectedObject}&version_id=${versionId}`\n )\n .then(() => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((error) => {\n setModalErrorSnackMessage(error);\n setIsSaving(false);\n });\n };\n\n const saveNewRetentionPolicy = () => {\n setIsSaving(true);\n const selectedObject = objectInfo.name;\n const versionId = objectInfo.version_id;\n\n const expireDate =\n !statusEnabled && type === \"governance\" ? \"\" : `${date}T23:59:59Z`;\n\n if (!statusEnabled && type === \"governance\") {\n disableRetention(selectedObject, versionId);\n\n return;\n }\n\n addRetention(selectedObject, versionId, expireDate);\n };\n\n const showSwitcher =\n alreadyConfigured && (type === \"governance\" || type === \"\");\n\n return (\n {\n resetForm();\n closeModalAndRefresh(false);\n }}\n >\n \n {objectName}\n \n ) => {\n onSubmit(e);\n }}\n >\n {showSwitcher && (\n \n ) => {\n setStatusEnabled(!statusEnabled);\n }}\n label={\"Status\"}\n indicatorLabels={[\"Enabled\", \"Disabled\"]}\n />\n \n )}\n \n {\n setType(e.target.value);\n }}\n selectorOptions={[\n { label: \"Governance\", value: \"governance\" },\n { label: \"Compliance\", value: \"compliance\" },\n ]}\n />\n \n \n {\n setIsDateValid(isValid);\n if (isValid) {\n setDate(date);\n }\n }}\n />\n \n \n \n Reset\n \n \n Save\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(SetRetention));\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { Button, Grid } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../../../actions\";\nimport InputBoxWrapper from \"../../../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport api from \"../../../../../../common/api\";\n\ninterface ITagModal {\n modalOpen: boolean;\n currentTags: any;\n bucketName: string;\n versionId: string | null;\n onCloseAndUpdate: (refresh: boolean) => void;\n selectedObject: string;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n pathLabel: {\n marginTop: 0,\n marginBottom: 32,\n },\n ...modalBasic,\n });\n\nconst AddTagModal = ({\n modalOpen,\n currentTags,\n selectedObject,\n onCloseAndUpdate,\n bucketName,\n versionId,\n setModalErrorSnackMessage,\n classes,\n}: ITagModal) => {\n const [newKey, setNewKey] = useState(\"\");\n const [newLabel, setNewLabel] = useState(\"\");\n const [isSending, setIsSending] = useState(false);\n\n const resetForm = () => {\n setNewLabel(\"\");\n setNewKey(\"\");\n };\n\n const addTagProcess = () => {\n setIsSending(true);\n const newTag: any = {};\n\n newTag[newKey] = newLabel;\n const newTagList = { ...currentTags, ...newTag };\n\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${bucketName}/objects/tags?prefix=${selectedObject}&version_id=${versionId}`,\n { tags: newTagList }\n )\n .then((res: any) => {\n setIsSending(false);\n onCloseAndUpdate(true);\n })\n .catch((error) => {\n setModalErrorSnackMessage(error);\n setIsSending(false);\n });\n };\n\n return (\n \n {\n onCloseAndUpdate(false);\n }}\n >\n \n

\n Selected Object: {selectedObject}\n

\n \n {\n setNewKey(e.target.value);\n }}\n />\n \n \n {\n setNewLabel(e.target.value);\n }}\n />\n \n \n \n Clear\n \n \n Save\n \n \n
\n \n
\n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(AddTagModal));\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n LinearProgress,\n} from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { modalBasic } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { setErrorSnackMessage } from \"../../../../../../actions\";\nimport api from \"../../../../../../common/api\";\n\ninterface IDeleteTagModal {\n deleteOpen: boolean;\n currentTags: any;\n bucketName: string;\n versionId: string | null;\n selectedTag: string[];\n onCloseAndUpdate: (refresh: boolean) => void;\n selectedObject: string;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n buttonContainer: {\n textAlign: \"right\",\n },\n pathLabel: {\n marginTop: 0,\n marginBottom: 32,\n },\n ...modalBasic,\n });\n\nconst DeleteTagModal = ({\n deleteOpen,\n currentTags,\n selectedObject,\n selectedTag,\n onCloseAndUpdate,\n bucketName,\n versionId,\n setErrorSnackMessage,\n classes,\n}: IDeleteTagModal) => {\n const [deleteLoading, setDeleteSending] = useState(false);\n const [tagKey, tagLabel] = selectedTag;\n\n const removeTagProcess = () => {\n setDeleteSending(true);\n const cleanObject = { ...currentTags };\n delete cleanObject[tagKey];\n\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${bucketName}/objects/tags?prefix=${selectedObject}&version_id=${versionId}`,\n { tags: cleanObject }\n )\n .then((res: any) => {\n setDeleteSending(false);\n onCloseAndUpdate(true);\n })\n .catch((error) => {\n setErrorSnackMessage(error);\n setDeleteSending(false);\n });\n };\n\n return (\n {\n onCloseAndUpdate(false);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n Delete Tag\n \n {deleteLoading && }\n \n Are you sure you want to delete the tag{\" \"}\n \n {tagKey} : {tagLabel}\n {\" \"}\n from {selectedObject}?\n \n \n \n {\n onCloseAndUpdate(false);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(DeleteTagModal));\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, { useState, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport get from \"lodash/get\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Button from \"@material-ui/core/Button\";\nimport { modalBasic } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../../../../actions\";\nimport { IFileInfo } from \"./types\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport api from \"../../../../../../common/api\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n objectName: {\n fontSize: 18,\n fontWeight: 700,\n marginBottom: 40,\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n ...modalBasic,\n });\n\ninterface ISetRetentionProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (reload: boolean) => void;\n objectName: string;\n bucketName: string;\n actualInfo: IFileInfo;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst SetLegalHoldModal = ({\n classes,\n open,\n closeModalAndRefresh,\n objectName,\n bucketName,\n actualInfo,\n setModalErrorSnackMessage,\n}: ISetRetentionProps) => {\n const [legalHoldEnabled, setLegalHoldEnabled] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const versionId = actualInfo.version_id;\n\n useEffect(() => {\n const status = get(actualInfo, \"legal_hold_status\", \"OFF\");\n setLegalHoldEnabled(status === \"ON\");\n }, [actualInfo]);\n\n const onSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n setIsSaving(true);\n\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${bucketName}/objects/legalhold?prefix=${objectName}&version_id=${versionId}`,\n { status: legalHoldEnabled ? \"enabled\" : \"disabled\" }\n )\n .then(() => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((error) => {\n setModalErrorSnackMessage(error);\n setIsSaving(false);\n });\n };\n\n const resetForm = () => {\n setLegalHoldEnabled(false);\n };\n\n return (\n {\n resetForm();\n closeModalAndRefresh(false);\n }}\n >\n \n {objectName}\n \n ) => {\n onSubmit(e);\n }}\n >\n \n ) => {\n setLegalHoldEnabled(!legalHoldEnabled);\n }}\n label={\"Legal Hold Status\"}\n indicatorLabels={[\"Enabled\", \"Disabled\"]}\n tooltip={\n \"To enable this feature you need to enable versioning on the bucket before creation\"\n }\n />\n \n \n \n Reset\n \n \n Save\n \n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(SetLegalHoldModal));\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, { useState, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport * as reactMoment from \"react-moment\";\nimport clsx from \"clsx\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Chip from \"@material-ui/core/Chip\";\nimport TextField from \"@material-ui/core/TextField\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport AddIcon from \"@material-ui/icons/Add\";\nimport CloseIcon from \"@material-ui/icons/Close\";\nimport ShareFile from \"./ShareFile\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { IFileInfo } from \"./types\";\nimport {\n removeRouteLevel,\n fileIsBeingPrepared,\n fileDownloadStarted,\n} from \"../../../../ObjectBrowser/actions\";\nimport {\n ObjectBrowserReducer,\n Route,\n} from \"../../../../ObjectBrowser/reducers\";\nimport { download } from \"../utils\";\nimport history from \"../../../../../../history\";\nimport api from \"../../../../../../common/api\";\nimport PageHeader from \"../../../../Common/PageHeader/PageHeader\";\nimport ShareIcon from \"../../../../../../icons/ShareIcon\";\nimport DownloadIcon from \"../../../../../../icons/DownloadIcon\";\nimport DeleteIcon from \"../../../../../../icons/DeleteIcon\";\nimport TableWrapper from \"../../../../Common/TableWrapper/TableWrapper\";\nimport PencilIcon from \"../../../../Common/TableWrapper/TableActionIcons/PencilIcon\";\nimport SetRetention from \"./SetRetention\";\nimport BrowserBreadcrumbs from \"../../../../ObjectBrowser/BrowserBreadcrumbs\";\nimport DeleteObject from \"../ListObjects/DeleteObject\";\nimport AddTagModal from \"./AddTagModal\";\nimport DeleteTagModal from \"./DeleteTagModal\";\nimport SetLegalHoldModal from \"./SetLegalHoldModal\";\nimport {\n setSnackBarMessage,\n setErrorSnackMessage,\n} from \"../../../../../../actions\";\nimport { CircularProgress } from \"@material-ui/core\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n objectNameContainer: {\n marginBottom: 8,\n },\n objectPathContainer: {\n marginBottom: 26,\n fontSize: 10,\n },\n objectPathLink: {\n \"&:visited\": {\n color: \"#000\",\n },\n },\n objectName: {\n fontSize: 24,\n },\n propertiesContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n marginBottom: 15,\n },\n propertiesItem: {\n display: \"flex\",\n flexDirection: \"row\",\n marginRight: 21,\n },\n propertiesItemBold: {\n fontWeight: 700,\n },\n propertiesValue: {\n marginLeft: 8,\n textTransform: \"capitalize\",\n },\n propertiesIcon: {\n marginLeft: 5,\n },\n actionsIconContainer: {\n marginLeft: 12,\n },\n actionsIcon: {\n height: 16,\n width: 16,\n \"& .MuiSvgIcon-root\": {\n height: 16,\n },\n },\n tagsContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n marginBottom: 15,\n },\n tagText: {\n marginRight: 13,\n },\n tag: {\n marginRight: 6,\n fontSize: 10,\n fontWeight: 700,\n \"&.MuiChip-sizeSmall\": {\n height: 18,\n },\n \"& .MuiSvgIcon-root\": {\n height: 10,\n width: 10,\n },\n },\n search: {\n marginBottom: 8,\n \"&.MuiFormControl-root\": {\n marginRight: 0,\n },\n },\n \"@global\": {\n \".progressDetails\": {\n paddingTop: 3,\n display: \"inline-block\",\n position: \"relative\",\n width: 18,\n height: 18,\n },\n \".progressDetails > .MuiCircularProgress-root\": {\n position: \"absolute\",\n left: 0,\n top: 3,\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IObjectDetailsProps {\n classes: any;\n routesList: Route[];\n downloadingFiles: string[];\n removeRouteLevel: (newRoute: string) => any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n setSnackBarMessage: typeof setSnackBarMessage;\n fileIsBeingPrepared: typeof fileIsBeingPrepared;\n fileDownloadStarted: typeof fileDownloadStarted;\n}\n\nconst emptyFile: IFileInfo = {\n is_latest: true,\n last_modified: \"\",\n legal_hold_status: \"\",\n name: \"\",\n retention_mode: \"\",\n retention_until_date: \"\",\n size: \"0\",\n tags: {},\n version_id: null,\n};\n\nconst ObjectDetails = ({\n classes,\n routesList,\n downloadingFiles,\n removeRouteLevel,\n setErrorSnackMessage,\n setSnackBarMessage,\n fileIsBeingPrepared,\n fileDownloadStarted,\n}: IObjectDetailsProps) => {\n const [loadObjectData, setLoadObjectData] = useState(true);\n const [shareFileModalOpen, setShareFileModalOpen] = useState(false);\n const [retentionModalOpen, setRetentionModalOpen] = useState(false);\n const [tagModalOpen, setTagModalOpen] = useState(false);\n const [deleteTagModalOpen, setDeleteTagModalOpen] = useState(false);\n const [selectedTag, setSelectedTag] = useState([\"\", \"\"]);\n const [legalholdOpen, setLegalholdOpen] = useState(false);\n const [actualInfo, setActualInfo] = useState(emptyFile);\n const [versions, setVersions] = useState([]);\n const [filterVersion, setFilterVersion] = useState(\"\");\n const [deleteOpen, setDeleteOpen] = useState(false);\n\n const currentItem = routesList[routesList.length - 1];\n const allPathData = currentItem.route.split(\"/\");\n const objectName = allPathData[allPathData.length - 1];\n const bucketName = allPathData[2];\n const pathInBucket = allPathData.slice(3).join(\"/\");\n\n useEffect(() => {\n if (loadObjectData) {\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects?prefix=${pathInBucket}&with_versions=true`\n )\n .then((res: IFileInfo[]) => {\n const result = get(res, \"objects\", []);\n setActualInfo(\n result.find((el: IFileInfo) => el.is_latest) || emptyFile\n );\n setVersions(result.filter((el: IFileInfo) => !el.is_latest));\n setLoadObjectData(false);\n })\n .catch((error) => {\n setErrorSnackMessage(error);\n setLoadObjectData(false);\n });\n }\n }, [loadObjectData, bucketName, pathInBucket, setErrorSnackMessage]);\n\n let tagKeys: string[] = [];\n\n if (actualInfo.tags) {\n tagKeys = Object.keys(actualInfo.tags);\n }\n\n const openRetentionModal = () => {\n setRetentionModalOpen(true);\n };\n\n const closeRetentionModal = (updateInfo: boolean) => {\n setRetentionModalOpen(false);\n if (updateInfo) {\n setLoadObjectData(true);\n }\n };\n\n const shareObject = () => {\n setShareFileModalOpen(true);\n };\n\n const closeShareModal = () => {\n setShareFileModalOpen(false);\n };\n\n const deleteTag = (tagKey: string, tagLabel: string) => {\n setSelectedTag([tagKey, tagLabel]);\n setDeleteTagModalOpen(true);\n };\n\n const removeDownloadAnimation = (path: string) => {\n fileDownloadStarted(path);\n };\n\n const downloadObject = (object: IFileInfo, includeVersion?: boolean) => {\n fileIsBeingPrepared(\n `${bucketName}/${object.name}${\n includeVersion ? `-${object.version_id}` : \"\"\n }`\n );\n if (object.size && parseInt(object.size) > 104857600) {\n // If file is bigger than 100MB we show a notification\n setSnackBarMessage(\n \"Download process started, it may take a few moments to complete\"\n );\n }\n download(\n bucketName,\n pathInBucket,\n object.version_id,\n removeDownloadAnimation,\n includeVersion\n );\n };\n\n const tableActions = [\n { type: \"share\", onClick: shareObject, sendOnlyId: true },\n {\n type: \"download\",\n onClick: (item: IFileInfo) => {\n downloadObject(item, true);\n },\n showLoaderFunction: (version: string) => {\n return downloadingFiles.includes(\n `${bucketName}/${objectName}-${version}`\n );\n },\n },\n ];\n\n const filteredRecords = versions.filter((version) => {\n if (version.version_id) {\n return version.version_id.includes(filterVersion);\n }\n return false;\n });\n\n const displayParsedDate = (date: string) => {\n return {date};\n };\n\n const closeDeleteModal = (redirectBack: boolean) => {\n setDeleteOpen(false);\n\n if (redirectBack) {\n const newPath = allPathData.slice(0, -1).join(\"/\");\n\n removeRouteLevel(newPath);\n history.push(newPath);\n }\n };\n\n const closeAddTagModal = (reloadObjectData: boolean) => {\n setTagModalOpen(false);\n\n if (reloadObjectData) {\n setLoadObjectData(true);\n }\n };\n\n const closeLegalholdModal = (reload: boolean) => {\n setLegalholdOpen(false);\n\n if (reload) {\n setLoadObjectData(true);\n }\n };\n\n const closeDeleteTagModal = (reloadObjectData: boolean) => {\n setDeleteTagModalOpen(false);\n\n if (reloadObjectData) {\n setLoadObjectData(true);\n }\n };\n\n return (\n \n \n {shareFileModalOpen && (\n \n )}\n {retentionModalOpen && (\n \n )}\n {deleteOpen && (\n \n )}\n {tagModalOpen && (\n \n )}\n {deleteTagModalOpen && (\n \n )}\n {legalholdOpen && (\n \n )}\n \n \n \n
\n \n
\n
\n
\n \n {actualInfo.version_id && actualInfo.version_id !== \"null\" && (\n \n
\n
\n \n Legal Hold:\n \n \n {actualInfo.legal_hold_status\n ? actualInfo.legal_hold_status.toLowerCase()\n : \"Off\"}\n \n
\n
\n {\n setLegalholdOpen(true);\n }}\n >\n \n \n
\n
\n
\n
\n \n Retention:\n \n \n {actualInfo.retention_mode\n ? actualInfo.retention_mode.toLowerCase()\n : \"Undefined\"}\n \n
\n
\n {\n openRetentionModal();\n }}\n >\n \n \n
\n
\n
\n )}\n
\n
File Actions:
\n
\n {\n shareObject();\n }}\n >\n \n \n
\n
\n {downloadingFiles.includes(\n `${bucketName}/${actualInfo.name}`\n ) ? (\n
\n \n
\n ) : (\n {\n downloadObject(actualInfo);\n }}\n >\n \n \n )}\n
\n
\n {\n setDeleteOpen(true);\n }}\n >\n \n \n
\n
\n
\n \n
Tags:
\n {tagKeys &&\n tagKeys.map((tagKey, index) => {\n const tag = get(actualInfo, `tags.${tagKey}`, \"\");\n if (tag !== \"\") {\n return (\n }\n onDelete={() => {\n deleteTag(tagKey, tag);\n }}\n />\n );\n }\n return null;\n })}\n }\n clickable\n size=\"small\"\n label=\"Add tag\"\n color=\"primary\"\n variant=\"outlined\"\n onClick={() => {\n setTagModalOpen(true);\n }}\n />\n
\n\n \n {actualInfo.version_id && actualInfo.version_id !== \"null\" && (\n {\n setFilterVersion(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n )}\n \n \n {actualInfo.version_id && actualInfo.version_id !== \"null\" && (\n \n )}\n \n
\n
\n
\n );\n};\n\nconst mapStateToProps = ({ objectBrowser }: ObjectBrowserReducer) => ({\n downloadingFiles: get(objectBrowser, \"downloadingFiles\", []),\n});\n\nconst mapDispatchToProps = {\n removeRouteLevel,\n setErrorSnackMessage,\n fileIsBeingPrepared,\n fileDownloadStarted,\n setSnackBarMessage,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default connector(withStyles(styles)(ObjectDetails));\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, { useEffect } from \"react\";\nimport ListObjects from \"./ListObjects\";\nimport ObjectDetails from \"../ObjectDetails/ObjectDetails\";\nimport get from \"lodash/get\";\nimport { setAllRoutes } from \"../../../../ObjectBrowser/actions\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport { ObjectBrowserState, Route } from \"../../../../ObjectBrowser/reducers\";\n\ninterface ObjectBrowserReducer {\n objectBrowser: ObjectBrowserState;\n}\n\ninterface ObjectRoutingProps {\n routesList: Route[];\n setAllRoutes: (path: string) => any;\n match: any;\n}\n\nconst ObjectRouting = ({\n routesList,\n match,\n setAllRoutes,\n}: ObjectRoutingProps) => {\n const currentItem = routesList[routesList.length - 1];\n\n useEffect(() => {\n const url = get(match, \"url\", \"/object-browser\");\n\n if (url !== routesList[routesList.length - 1].route) {\n setAllRoutes(url);\n }\n }, [match, routesList, setAllRoutes]);\n\n return currentItem.type === \"path\" ? (\n \n ) : (\n \n );\n};\n\nconst mapStateToProps = ({ objectBrowser }: ObjectBrowserReducer) => ({\n routesList: get(objectBrowser, \"routesList\", []),\n});\n\nconst mapDispatchToProps = {\n setAllRoutes,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default withRouter(connector(ObjectRouting));\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\nexport const planDetails = [\n {\n id: 0,\n title: \"Community\",\n price: \"Open Source\",\n capacityMin: \"\",\n },\n {\n id: 1,\n title: \"Standard\",\n price: \"$10/TB/month\",\n capacityMax: \"Up to 10PB. No additional charges for capacity over 10PB\",\n capacityMin: \"\",\n },\n {\n id: 2,\n title: \"Enterprise\",\n price: \"$20/TB/month\",\n capacityMax: \"Up to 5PB. No additional charges for capacity over 5PB\",\n capacityMin: \"\",\n },\n];\n\nexport const planItems = [\n {\n id: 0,\n field: \"License\",\n community: \"GNU AGPL v3\",\n communityDetail: \"\",\n standard: \"Commercial License\",\n standardDetail: \"\",\n enterprise: \"Commercial License\",\n enterpriseDetail: \"\",\n },\n {\n id: 1,\n field: \"Software Release\",\n community: \"Update to latest\",\n standard: \"1 Year Long Term Support\",\n enterprise: \"5 Years Long Term Support\",\n },\n {\n id: 2,\n field: \"SLA\",\n community: \"No SLA\",\n standard: \"<24 hours\",\n enterprise: \"<1 hour\",\n },\n {\n id: 3,\n field: \"Support\",\n community: \"Community:\",\n communityDetail: \"Public Slack Channel + Github Issues\",\n standard: \"24x7 L4 direct engineering\",\n standardDetail: \"Support via SUBNET\",\n enterprise: \"24x7 L4 direct engineering\",\n enterpriseDetail: \"Support via SUBNET\",\n },\n {\n id: 4,\n field: \"Security Updates & Critical Bugs\",\n community: \"Self Update\",\n standard: \"Guided Update\",\n enterprise: \"Guided Update\",\n },\n {\n id: 5,\n field: \"Panic Button\",\n community: \"N/A\",\n standard: \"1 per year\",\n enterprise: \"Unlimited\",\n },\n {\n id: 6,\n field: \"Annual Architecture Review\",\n community: \"N/A\",\n standard: \"Yes\",\n enterprise: \"Yes\",\n },\n {\n id: 7,\n field: \"Annual Performance Review\",\n community: \"N/A\",\n standard: \"Yes\",\n enterprise: \"Yes\",\n },\n {\n id: 8,\n field: \"Indemnification\",\n community: \"N/A\",\n standard: \"N/A\",\n enterprise: \"Yes\",\n },\n {\n id: 9,\n field: \"Security + Policy Review\",\n community: \"N/A\",\n standard: \"N/A\",\n enterprise: \"Yes\",\n },\n];\n\nexport const planButtons = [\n {\n id: 0,\n text: \"Join Slack\",\n text2: \"\",\n link: \"https://slack.min.io\",\n plan: \"community\",\n },\n {\n id: 1,\n text: \"Subscribe\",\n text2: \"Upgrade\",\n link: \"https://subnet.min.io/subscription\",\n plan: \"standard\",\n },\n {\n id: 2,\n text: \"Subscribe\",\n text2: \"Upgrade\",\n link: \"https://subnet.min.io/subscription\",\n plan: \"enterprise\",\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, { useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { LinearProgress, TextField } from \"@material-ui/core\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport { SubscriptionActivateRequest } from \"../Buckets/types\";\nimport { setModalErrorSnackMessage } from \"../../../actions\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport api from \"../../../common/api\";\nimport PersonOutlineOutlinedIcon from \"@material-ui/icons/PersonOutlineOutlined\";\nimport LockOutlinedIcon from \"@material-ui/icons/LockOutlined\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n errorBlock: {\n color: \"red\",\n },\n subnetLicenseKey: {\n padding: \"10px 10px 10px 0px\",\n borderRight: \"1px solid rgba(0, 0, 0, 0.12)\",\n opacity: 0.5,\n \"&:hover\": { opacity: 1 },\n },\n subnetLoginForm: {\n padding: \"10px 0px 10px 10px\",\n opacity: 0.5,\n \"&:hover\": { opacity: 1 },\n },\n licenseKeyField: {},\n pageTitle: {\n marginBottom: 20,\n },\n button: {\n textTransform: \"none\",\n fontSize: 15,\n fontWeight: 700,\n background:\n \"transparent linear-gradient(90deg, #073052 0%, #081c42 100%) 0% 0% no-repeat padding-box\",\n color: \"#fff\",\n },\n buttonSignup: {\n textTransform: \"none\",\n fontSize: 15,\n fontWeight: 700,\n marginLeft: 15,\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IActivationModal {\n classes: any;\n open: boolean;\n closeModal: () => void;\n setModalErrorSnackMessage: typeof setModalErrorSnackMessage;\n}\n\nconst ActivationModal = ({\n classes,\n open,\n closeModal,\n setModalErrorSnackMessage,\n}: IActivationModal) => {\n const [license, setLicense] = useState(\"\");\n const [subnetPassword, setSubnetPassword] = useState(\"\");\n const [subnetEmail, setSubnetEmail] = useState(\"\");\n const [loading, setLoading] = useState(false);\n\n const activateProduct = () => {\n if (loading) {\n return;\n }\n setLoading(true);\n let request: SubscriptionActivateRequest = {\n license: license,\n email: subnetEmail,\n password: subnetPassword,\n };\n api\n .invoke(\"POST\", \"/api/v1/subscription/validate\", request)\n .then(() => {\n setLoading(false);\n setLicense(\"\");\n setSubnetPassword(\"\");\n setSubnetEmail(\"\");\n closeModal();\n })\n .catch((err) => {\n setLoading(false);\n setLicense(\"\");\n setSubnetPassword(\"\");\n setSubnetEmail(\"\");\n setModalErrorSnackMessage(err);\n });\n };\n\n return open ? (\n {\n setLicense(\"\");\n setSubnetPassword(\"\");\n setSubnetEmail(\"\");\n closeModal();\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n \n \n \n Activate SUBNET License\n \n \n \n \n \n Enter your license key here\n \n \n ) =>\n setLicense(event.target.value)\n }\n fullWidth\n className={classes.licenseKeyField}\n variant=\"outlined\"\n />\n
\n
\n activateProduct()}\n disabled={loading || license.trim().length === 0}\n >\n Activate\n \n
\n \n \n \n }\n id=\"subnet-email\"\n name=\"subnet-email\"\n onChange={(event: React.ChangeEvent) => {\n setSubnetEmail(event.target.value);\n }}\n placeholder=\"email\"\n label=\"\"\n type=\"text\"\n value={subnetEmail}\n />\n \n \n }\n id=\"subnet-password\"\n name=\"subnet-password\"\n onChange={(event: React.ChangeEvent) => {\n setSubnetPassword(event.target.value);\n }}\n placeholder=\"password\"\n label=\"\"\n type=\"password\"\n value={subnetPassword}\n />\n \n \n activateProduct()}\n disabled={\n loading ||\n subnetEmail.trim().length === 0 ||\n subnetPassword.trim().length === 0\n }\n variant=\"contained\"\n >\n Activate\n \n {\n e.preventDefault();\n window.open(\"https://min.io/pricing\", \"_blank\");\n }}\n variant=\"outlined\"\n >\n Sign Up\n \n \n \n \n
\n {loading && (\n \n \n \n )}\n \n ) : null;\n};\n\nconst mapDispatchToProps = {\n setModalErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(ActivationModal));\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, { useEffect, useState } from \"react\";\nimport clsx from \"clsx\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Button from \"@material-ui/core/Button\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Typography from \"@material-ui/core/Typography\";\nimport CheckCircleIcon from \"@material-ui/icons/CheckCircle\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport { planDetails, planItems, planButtons } from \"./utils\";\nimport ActivationModal from \"./ActivationModal\";\nimport api from \"../../../common/api\";\nimport { LicenseInfo } from \"./types\";\nimport { CircularProgress, LinearProgress } from \"@material-ui/core\";\nimport { AppState } from \"../../../store\";\nimport { connect } from \"react-redux\";\nimport { niceBytes } from \"../../../common/utils\";\nimport Moment from \"react-moment\";\n\nconst mapState = (state: AppState) => ({\n operatorMode: state.system.operatorMode,\n});\n\nconst connector = connect(mapState, null);\n\nconst styles = (theme: Theme) =>\n createStyles({\n pageTitle: {\n fontSize: 18,\n marginBottom: 20,\n },\n paper: {\n padding: \"20px 52px 20px 28px\",\n },\n licenseContainer: {\n position: \"relative\",\n padding: \"20px 52px 0px 28px\",\n background: \"#032F51\",\n boxShadow: \"0px 3px 7px #00000014\",\n \"& h2\": {\n color: \"#FFF\",\n marginBottom: 67,\n },\n \"& a\": {\n textDecoration: \"none\",\n },\n \"& h3\": {\n color: \"#FFFFFF\",\n marginBottom: \"30px\",\n fontWeight: \"bold\",\n },\n \"& h6\": {\n color: \"#FFFFFF !important\",\n },\n },\n tableContainer: {\n marginLeft: 28,\n },\n detailsContainer: {\n textAlign: \"center\",\n paddingBottom: 12,\n borderRadius: \"3px 3px 0 0\",\n marginLeft: 8,\n maxWidth: \"calc(25% - 8px)\",\n },\n detailsContainerBorder: {\n border: \"1px solid #e2e2e2\",\n borderBottom: 0,\n borderRadius: \"4px 4px 0px 0px\",\n },\n detailsContainerBorderHighlighted: {\n border: \"1px solid #B5B5B5\",\n borderBottom: 0,\n },\n detailsTitle: {\n fontSize: 19,\n fontWeight: 700,\n marginBottom: 26,\n paddingTop: 18,\n },\n activePlanHeader: {\n fontWeight: 700,\n background: \"#D5DDE5\",\n borderRadius: \"3px 3px 0px 0px\",\n color: \"#121212\",\n padding: 8,\n borderTop: \"1px solid #D5DDE5\",\n marginTop: -2,\n },\n planHeader: {\n background: \"#FFFFFF\",\n borderRadius: \"3px 3px 0px 0px\",\n padding: 8,\n borderTop: \"1px solid #D5DDE5\",\n },\n detailsPrice: {\n fontSize: 13,\n fontWeight: 700,\n marginBottom: 8,\n },\n detailsCapacityMax: {\n minHeight: 28,\n fontSize: 10,\n fontWeight: 700,\n marginBottom: 12,\n padding: \"0% 15%\",\n },\n detailsCapacityMin: {\n fontSize: 10,\n },\n itemContainer: {\n height: 36,\n },\n itemContainerDetail: {\n height: 48,\n },\n item: {\n height: \"100%\",\n borderLeft: \"1px solid #e2e2e2\",\n borderRight: \"1px solid #e2e2e2\",\n textAlign: \"center\",\n fontSize: 10,\n fontWeight: 700,\n display: \"flex\",\n alignItems: \"center\",\n alignContent: \"center\",\n marginLeft: 8,\n maxWidth: \"calc(25% - 8px)\",\n borderTop: \"1px solid #e5e5e5\",\n },\n itemFirst: {\n borderLeft: 0,\n borderRight: 0,\n },\n itemHighlighted: {\n borderLeft: \"1px solid #B5B5B5\",\n borderRight: \"1px solid #B5B5B5\",\n },\n field: {\n textAlign: \"left\",\n fontWeight: 400,\n fontSize: 12,\n },\n checkIcon: {\n height: 12,\n color:\n \"transparent linear-gradient(90deg, #073052 0%, #081c42 100%) 0% 0% no-repeat padding-box\",\n },\n buttonContainer: {\n paddingTop: 8,\n paddingBottom: 24,\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n borderRadius: \"0 0 3px 3px\",\n border: \"1px solid #e2e2e2\",\n borderTop: 0,\n marginLeft: 8,\n maxWidth: \"calc(25% - 8px)\",\n },\n buttonContainerBlank: {\n border: 0,\n },\n buttonContainerHighlighted: {\n border: \"1px solid #B5B5B5\",\n borderTop: 0,\n },\n button: {\n textTransform: \"none\",\n fontSize: 15,\n fontWeight: 700,\n },\n licenseButton: {\n float: \"right\",\n marginTop: 25,\n marginRight: 25,\n },\n openSourcePolicy: {\n color: \"#1C5A8D\",\n fontWeight: \"bold\",\n },\n activateLink: {\n color: \"#1C5A8D\",\n fontWeight: \"bold\",\n clear: \"both\",\n background: \"none\",\n border: \"none\",\n textDecoration: \"underline\",\n cursor: \"pointer\",\n },\n subnetRefreshLicenseLink: {\n color: \"#1C5A8D\",\n fontWeight: \"bold\",\n clear: \"both\",\n background: \"none\",\n border: \"none\",\n textDecoration: \"underline\",\n cursor: \"pointer\",\n fontSize: 13,\n },\n fullWidth: {\n width: \"100%\",\n height: \"100%\",\n },\n midWidth: {\n width: \"70%\",\n float: \"left\",\n height: \"100%\",\n },\n smallWidth: {\n width: \"30%\",\n float: \"right\",\n height: \"100%\",\n borderRadius: \"0px 3px 0px 0px !important\",\n },\n licenseInfo: { color: \"#FFFFFF\", position: \"relative\" },\n licenseInfoTitle: {\n textTransform: \"none\",\n color: \"#BFBFBF\",\n fontSize: 11,\n },\n licenseInfoValue: {\n textTransform: \"none\",\n fontSize: 14,\n fontWeight: \"bold\",\n },\n licenseDescription: {\n background: \"#032F51\",\n padding: \"30px 30px\",\n borderTop: \"1px solid #e2e5e4\",\n borderLeft: \"1px solid #e2e5e4\",\n borderRight: \"1px solid #e2e5e4\",\n bottom: 0,\n left: \"5%\",\n right: \"5%\",\n position: \"absolute\",\n },\n currentPlanBG: {\n background: \"#022A4A 0% 0% no-repeat padding-box\",\n color: \"#FFFFFF\",\n borderTop: \"1px solid #52687d\",\n },\n currentPlanButton: {\n background: \"#FFFFFF\",\n color: \"#022A4A\",\n \"&:hover\": {\n background: \"#FFFFFF\",\n },\n },\n planItemsPadding: {\n padding: \"23px 33px\",\n },\n subnetSubTitle: {\n fontSize: 12,\n },\n verifiedIcon: {\n width: 96,\n position: \"absolute\",\n right: 0,\n bottom: 29,\n },\n loadingLoginStrategy: {\n textAlign: \"center\",\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface ILicenseProps {\n classes: any;\n operatorMode: boolean;\n}\n\nconst License = ({ classes, operatorMode }: ILicenseProps) => {\n const closeModalAndFetchLicenseInfo = () => {\n setActivateProductModal(false);\n fetchLicenseInfo();\n };\n const fetchLicenseInfo = () => {\n setLoadingLicenseInfo(true);\n api\n .invoke(\"GET\", `/api/v1/subscription/info`)\n .then((res: LicenseInfo) => {\n if (res) {\n if (res.plan === \"STANDARD\") {\n setCurrentPlanID(1);\n } else if (res.plan === \"ENTERPRISE\") {\n setCurrentPlanID(2);\n } else {\n setCurrentPlanID(1);\n }\n setLicenseInfo(res);\n }\n setLoadingLicenseInfo(false);\n })\n .catch((err: any) => {\n setLoadingLicenseInfo(false);\n });\n };\n const refreshLicense = () => {\n setLoadingRefreshLicense(true);\n api\n .invoke(\"POST\", `/api/v1/subscription/refresh`, {})\n .then((res: LicenseInfo) => {\n if (res) {\n if (res.plan === \"STANDARD\") {\n setCurrentPlanID(1);\n } else if (res.plan === \"ENTERPRISE\") {\n setCurrentPlanID(2);\n } else {\n setCurrentPlanID(1);\n }\n setLicenseInfo(res);\n }\n setLoadingRefreshLicense(false);\n })\n .catch((err: any) => {\n setLoadingRefreshLicense(false);\n });\n };\n\n const [activateProductModal, setActivateProductModal] =\n useState(false);\n\n const [licenseInfo, setLicenseInfo] = useState();\n const [currentPlanID, setCurrentPlanID] = useState(0);\n const [loadingLicenseInfo, setLoadingLicenseInfo] = useState(true);\n const [loadingRefreshLicense, setLoadingRefreshLicense] =\n useState(false);\n\n useEffect(() => {\n fetchLicenseInfo();\n }, []);\n\n if (loadingLicenseInfo) {\n return (\n \n \n \n );\n }\n return (\n \n \n \n \n \n \n {licenseInfo ? (\n \n \n \n \n License\n \n \n Commercial License\n \n \n Organization\n \n \n {licenseInfo.organization}\n \n \n Registered Capacity\n \n \n {niceBytes(\n (licenseInfo.storage_capacity * 1099511627776) // 1 Terabyte = 1099511627776 Bytes\n .toString(10)\n )}\n \n \n Expiry Date\n \n \n \n {licenseInfo.expires_at}\n \n \n \n \n \n Subscription Plan\n \n \n {licenseInfo.plan}\n \n \n Requester\n \n \n {licenseInfo.email}\n \n \n \n \n \n ) : (\n \n \"agpl\"\n \n GNU Affero General Public License\n \n \n
\n Version 3\n \n The GNU Affero General Public License is a free,\n copyleft license for software and other kinds of works,\n specifically designed to ensure cooperation with the\n Community in the case of network server software.\n \n
\n \n
\n )}\n \n \n {licenseInfo ? (\n \n {\" \"}\n \n Login to MinIO SUBNET !\n \n \n It combines a commercial license with a support experience\n unlike any other.\n \n
\n \n Login to SUBNET\n \n {operatorMode && (\n \n {\" \"}\n
\n
\n {\n e.preventDefault();\n refreshLicense();\n }}\n >\n Refresh Licence\n \n {loadingRefreshLicense && (\n \n )}\n
\n )}\n
\n ) : (\n \n \n Choosing between GNU AGPL v3 and Commercial License\n \n \n If you are building proprietary applications, you may want\n to choose the commercial license included as part of the\n Standard and Enterprise subscription plans. Applications\n must otherwise comply with all the GNU AGPLv3 License &\n Trademark obligations. Follow the links below to learn more\n about the compliance policy.\n \n
\n \n Open Source Policy Compliance\n \n
\n
\n \n Trademark Policy\n \n
\n )}\n
\n
\n \n \n \n {operatorMode ? (\n closeModalAndFetchLicenseInfo()}\n />\n ) : null}\n \n \n \n {planDetails.map((details: any) => {\n let currentPlan =\n (!licenseInfo && details.title === \"Community\") ||\n (licenseInfo &&\n licenseInfo.plan.toLowerCase() ===\n details.title.toLowerCase());\n return (\n \n \n {currentPlan ? \"Current Plan\" : \"\\u00A0\"}\n \n \n {details.title}\n \n \n {details.price}\n \n \n {details.capacityMax || \"\"}\n \n \n );\n })}\n \n {planItems.map((item: any) => {\n return (\n \n \n {item.field}\n \n \n \n {item.community === \"N/A\" ? (\n \"\"\n ) : item.community === \"Yes\" ? (\n \n ) : (\n item.community\n )}\n \n {item.communityDetail !== undefined && (\n \n {item.communityDetail}\n \n )}\n
\n \n \n {item.standard === \"N/A\" ? (\n \"\"\n ) : item.standard === \"Yes\" ? (\n \n ) : (\n item.standard\n )}\n \n \n \n \n {item.enterprise === \"N/A\" ? (\n \"\"\n ) : item.enterprise === \"Yes\" ? (\n \n ) : (\n item.enterprise\n )}\n \n \n \n );\n })}\n \n \n {planButtons.map((button: any, index: any) => {\n return (\n \n \n {\n e.preventDefault();\n window.open(\n `${button.link}/?ref=${\n operatorMode ? \"op\" : \"con\"\n }`,\n \"_blank\"\n );\n }}\n >\n {currentPlanID !== index && index > 0\n ? button.text2\n : button.text}\n \n \n {operatorMode &&\n button.text === \"Subscribe\" &&\n !(\n licenseInfo &&\n licenseInfo.plan.toLowerCase() ===\n button.plan.toLowerCase()\n ) && (\n \n {\n e.preventDefault();\n setActivateProductModal(true);\n }}\n >\n Activate\n \n \n )}\n \n );\n })}\n \n \n \n \n \n \n
\n
\n );\n};\n\nexport default connector(withStyles(styles)(License));\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 { TraceMessage } from \"./types\";\n\nexport const TRACE_MESSAGE_RECEIVED = \"TRACE_MESSAGE_RECEIVED\";\nexport const TRACE_RESET_MESSAGES = \"TRACE_RESET_MESSAGES\";\n\ninterface TraceMessageReceivedAction {\n type: typeof TRACE_MESSAGE_RECEIVED;\n message: TraceMessage;\n}\n\ninterface TraceResetMessagesAction {\n type: typeof TRACE_RESET_MESSAGES;\n}\n\nexport type TraceActionTypes =\n | TraceMessageReceivedAction\n | TraceResetMessagesAction;\n\nexport function traceMessageReceived(message: TraceMessage) {\n return {\n type: TRACE_MESSAGE_RECEIVED,\n message: message,\n };\n}\n\nexport function traceResetMessages() {\n return {\n type: TRACE_RESET_MESSAGES,\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\n// Close codes for websockets defined in RFC 6455\nexport const WSCloseNormalClosure = 1000;\nexport const WSCloseCloseGoingAway = 1001;\nexport const WSCloseAbnormalClosure = 1006;\nexport const WSClosePolicyViolation = 1008;\nexport const WSCloseInternalServerErr = 1011;\n\nexport const wsProtocol = (protocol: string): string => {\n let wsProtocol = \"ws\";\n if (protocol === \"https:\") {\n wsProtocol = \"wss\";\n }\n return wsProtocol;\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, { useEffect } from \"react\";\nimport { IMessageEvent, w3cwebsocket as W3CWebSocket } from \"websocket\";\nimport { AppState } from \"../../../store\";\nimport { connect } from \"react-redux\";\nimport { traceMessageReceived, traceResetMessages } from \"./actions\";\nimport { TraceMessage } from \"./types\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { niceBytes, timeFromDate } from \"../../../common/utils\";\nimport { wsProtocol } from \"../../../utils/wsUtils\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport { Grid } from \"@material-ui/core\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport moment from \"moment/moment\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n logList: {\n background: \"white\",\n height: \"400px\",\n overflow: \"auto\",\n \"& ul\": {\n margin: \"4px\",\n padding: \"0px\",\n },\n \"& ul li\": {\n listStyle: \"none\",\n margin: \"0px\",\n padding: \"0px\",\n borderBottom: \"1px solid #dedede\",\n },\n },\n sizeItem: {\n width: 150,\n },\n timeItem: {\n width: 100,\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface ITrace {\n classes: any;\n traceMessageReceived: typeof traceMessageReceived;\n traceResetMessages: typeof traceResetMessages;\n messages: TraceMessage[];\n namespace: string;\n tenant: string;\n}\n\nconst Trace = ({\n classes,\n traceMessageReceived,\n traceResetMessages,\n messages,\n}: ITrace) => {\n useEffect(() => {\n traceResetMessages();\n const url = new URL(window.location.toString());\n const isDev = process.env.NODE_ENV === \"development\";\n const port = isDev ? \"9090\" : url.port;\n\n const wsProt = wsProtocol(url.protocol);\n const c = new W3CWebSocket(`${wsProt}://${url.hostname}:${port}/ws/trace`);\n\n let interval: any | null = null;\n if (c !== null) {\n c.onopen = () => {\n console.log(\"WebSocket Client Connected\");\n c.send(\"ok\");\n interval = setInterval(() => {\n c.send(\"ok\");\n }, 10 * 1000);\n };\n c.onmessage = (message: IMessageEvent) => {\n let m: TraceMessage = JSON.parse(message.data.toString());\n m.ptime = moment(m.time, \"YYYY-MM-DD HH:mm:s.SSSS +0000 UTC\").toDate();\n m.key = Math.random();\n traceMessageReceived(m);\n };\n c.onclose = () => {\n clearInterval(interval);\n console.log(\"connection closed by server\");\n };\n return () => {\n c.close(1000);\n clearInterval(interval);\n console.log(\"closing websockets\");\n };\n }\n }, [traceMessageReceived, traceResetMessages]);\n\n return (\n \n \n \n \n {\n const timeParse = new Date(time);\n return timeFromDate(timeParse);\n },\n globalClass: classes.timeItem,\n },\n { label: \"Name\", elementKey: \"api\" },\n {\n label: \"Status\",\n elementKey: \"\",\n renderFunction: (fullElement: TraceMessage) =>\n `${fullElement.statusCode} ${fullElement.statusMsg}`,\n renderFullObject: true,\n },\n {\n label: \"Location\",\n elementKey: \"configuration_id\",\n renderFunction: (fullElement: TraceMessage) =>\n `${fullElement.host} ${fullElement.client}`,\n renderFullObject: true,\n },\n {\n label: \"Load Time\",\n elementKey: \"callStats.duration\",\n globalClass: classes.timeItem,\n },\n {\n label: \"Upload\",\n elementKey: \"callStats.rx\",\n renderFunction: niceBytes,\n globalClass: classes.sizeItem,\n },\n {\n label: \"Download\",\n elementKey: \"callStats.tx\",\n renderFunction: niceBytes,\n globalClass: classes.sizeItem,\n },\n ]}\n isLoading={false}\n records={messages}\n entityName=\"Traces\"\n idField=\"api\"\n customEmptyMessage=\"There are no traced Elements yet\"\n autoScrollToBottom\n />\n \n \n \n );\n};\n\nconst mapState = (state: AppState) => ({\n messages: state.trace.messages,\n});\n\nconst connector = connect(mapState, {\n traceMessageReceived: traceMessageReceived,\n traceResetMessages: traceResetMessages,\n});\n\nexport default connector(withStyles(styles)(Trace));\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 { LogMessage } from \"./types\";\n\nexport const LOG_MESSAGE_RECEIVED = \"LOG_MESSAGE_RECEIVED\";\nexport const LOG_RESET_MESSAGES = \"LOG_RESET_MESSAGES\";\n\ninterface LogMessageReceivedAction {\n type: typeof LOG_MESSAGE_RECEIVED;\n message: LogMessage;\n}\n\ninterface LogResetMessagesAction {\n type: typeof LOG_RESET_MESSAGES;\n}\n\nexport type LogActionTypes = LogMessageReceivedAction | LogResetMessagesAction;\n\nexport function logMessageReceived(message: LogMessage) {\n return {\n type: LOG_MESSAGE_RECEIVED,\n message: message,\n };\n}\n\nexport function logResetMessages() {\n return {\n type: LOG_RESET_MESSAGES,\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 .\nimport React, { Fragment, useState, useEffect } from \"react\";\nimport { IMessageEvent, w3cwebsocket as W3CWebSocket } from \"websocket\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { connect } from \"react-redux\";\nimport { Grid } from \"@material-ui/core\";\nimport TextField from \"@material-ui/core/TextField\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport moment from \"moment/moment\";\nimport { AppState } from \"../../../../store\";\nimport { logMessageReceived, logResetMessages } from \"../actions\";\nimport { LogMessage } from \"../types\";\nimport { timeFromDate } from \"../../../../common/utils\";\nimport { wsProtocol } from \"../../../../utils/wsUtils\";\nimport {\n actionsTray,\n logsCommon,\n searchField,\n} from \"../../Common/FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n logList: {\n background: \"#fff\",\n minHeight: 400,\n height: \"calc(100vh - 304px)\",\n overflow: \"auto\",\n fontSize: 13,\n padding: \"25px 45px 0\",\n border: \"1px solid #EAEDEE\",\n borderRadius: 4,\n },\n tab: {\n paddingLeft: 25,\n },\n logerror: {\n color: \"#A52A2A\",\n },\n logerror_tab: {\n color: \"#A52A2A\",\n paddingLeft: 25,\n },\n ansidefault: {\n color: \"#000\",\n },\n highlight: {\n \"& span\": {\n backgroundColor: \"#082F5238\",\n },\n },\n ...actionsTray,\n ...searchField,\n ...logsCommon,\n });\n\ninterface ILogs {\n classes: any;\n logMessageReceived: typeof logMessageReceived;\n logResetMessages: typeof logResetMessages;\n messages: LogMessage[];\n}\n\nconst ErrorLogs = ({\n classes,\n logMessageReceived,\n logResetMessages,\n messages,\n}: ILogs) => {\n const [highlight, setHighlight] = useState(\"\");\n\n useEffect(() => {\n logResetMessages();\n const url = new URL(window.location.toString());\n const isDev = process.env.NODE_ENV === \"development\";\n const port = isDev ? \"9090\" : url.port;\n\n const wsProt = wsProtocol(url.protocol);\n\n const c = new W3CWebSocket(\n `${wsProt}://${url.hostname}:${port}/ws/console`\n );\n\n let interval: any | null = null;\n if (c !== null) {\n c.onopen = () => {\n console.log(\"WebSocket Client Connected\");\n c.send(\"ok\");\n interval = setInterval(() => {\n c.send(\"ok\");\n }, 10 * 1000);\n };\n c.onmessage = (message: IMessageEvent) => {\n // console.log(message.data.toString())\n // FORMAT: 00:35:17 UTC 01/01/2021\n let m: LogMessage = JSON.parse(message.data.toString());\n m.time = moment(m.time, \"HH:mm:s UTC MM/DD/YYYY\").toDate();\n m.key = Math.random();\n logMessageReceived(m);\n };\n c.onclose = () => {\n clearInterval(interval);\n console.log(\"connection closed by server\");\n };\n return () => {\n c.close(1000);\n clearInterval(interval);\n console.log(\"closing websockets\");\n };\n }\n }, [logMessageReceived, logResetMessages]);\n\n const renderError = (logElement: LogMessage) => {\n let errorElems = [];\n if (logElement.error !== null && logElement.error !== undefined) {\n if (logElement.api && logElement.api.name) {\n const errorText = `API: ${logElement.api.name}`;\n\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n\n errorElems.push(\n \n
\n {errorText}\n
\n );\n }\n if (logElement.time) {\n const errorText = `Time: ${timeFromDate(logElement.time)}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n
\n );\n }\n if (logElement.deploymentid) {\n const errorText = `DeploymentID: ${logElement.deploymentid}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n if (logElement.requestID) {\n const errorText = `RequestID: ${logElement.requestID}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n if (logElement.remotehost) {\n const errorText = `RemoteHost: ${logElement.remotehost}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n if (logElement.host) {\n const errorText = `Host: ${logElement.host}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n if (logElement.userAgent) {\n const errorText = `UserAgent: ${logElement.userAgent}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n if (logElement.error.message) {\n const errorText = `Error: ${logElement.error.message}`;\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n if (logElement.error.source) {\n // for all sources add padding\n for (let s in logElement.error.source) {\n const errorText = logElement.error.source[s];\n const highlightedLine =\n highlight !== \"\"\n ? errorText.toLowerCase().includes(highlight.toLowerCase())\n : false;\n errorElems.push(\n \n {errorText}\n \n );\n }\n }\n }\n return errorElems;\n };\n\n const renderLog = (logElement: LogMessage) => {\n let logMessage = logElement.ConsoleMsg;\n // remove any non ascii characters, exclude any control codes\n logMessage = logMessage.replace(/([^\\x20-\\x7F])/g, \"\");\n\n // regex for terminal colors like e.g. `[31;4m `\n const tColorRegex = /((\\[[0-9;]+m))/g;\n\n // get substring if there was a match for to split what\n // is going to be colored and what not, here we add color\n // only to the first match.\n let substr = logMessage.replace(tColorRegex, \"\");\n\n // in case highlight is set, we select the line that contains the requested string\n let highlightedLine =\n highlight !== \"\"\n ? logMessage.toLowerCase().includes(highlight.toLowerCase())\n : false;\n\n // if starts with multiple spaces add padding\n if (substr.startsWith(\" \")) {\n return (\n \n {substr}\n \n );\n } else if (logElement.error !== null && logElement.error !== undefined) {\n // list error message and all sources and error elems\n return renderError(logElement);\n } else {\n // for all remaining set default class\n return (\n \n {substr}\n \n );\n }\n };\n\n const renderLines = messages.map((m) => {\n return renderLog(m);\n });\n\n return (\n \n \n \n {\n setHighlight(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n startAdornment: (\n \n \n \n ),\n }}\n />\n \n \n
\n
\n \n
{renderLines}
\n
\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n messages: state.logs.messages,\n});\n\nconst connector = connect(mapState, {\n logMessageReceived: logMessageReceived,\n logResetMessages: logResetMessages,\n});\n\nexport default withStyles(styles)(connector(ErrorLogs));\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\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport TextField from \"@material-ui/core/TextField\";\nimport { searchField } from \"../common/styleLibrary\";\n\ninterface IFilterInputWrapper {\n classes: any;\n value: string;\n onChange: (txtVar: string) => any;\n label: string;\n placeholder?: string;\n id: string;\n name: string;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n searchField: {\n ...searchField.searchField,\n height: 30,\n padding: 0,\n \"& input\": {\n padding: \"0 12px\",\n height: 28,\n fontSize: 12,\n fontWeight: 600,\n color: \"#393939\",\n },\n \"&.isDisabled\": {\n \"&:hover\": {\n borderColor: \"#EAEDEE\",\n },\n },\n \"& input.Mui-disabled\": {\n backgroundColor: \"#EAEAEA\",\n },\n },\n labelStyle: {\n color: \"#393939\",\n fontSize: 12,\n marginBottom: 4,\n },\n buttonKit: {\n display: \"flex\",\n alignItems: \"center\",\n },\n toggleButton: {\n marginRight: 10,\n },\n fieldContainer: {\n flexGrow: 1,\n margin: \"0 15px\",\n },\n });\n\nconst FilterInputWrapper = ({\n classes,\n label,\n onChange,\n value,\n placeholder = \"\",\n id,\n name,\n}: IFilterInputWrapper) => {\n return (\n \n
\n
{label}
\n
\n {\n onChange(val.target.value);\n }}\n InputProps={{\n disableUnderline: true,\n }}\n className={classes.searchField}\n value={value}\n />\n
\n
\n
\n );\n};\n\nexport default withStyles(styles)(FilterInputWrapper);\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, useState, useEffect, useCallback } from \"react\";\nimport { connect } from \"react-redux\";\nimport get from \"lodash/get\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, Grid } from \"@material-ui/core\";\nimport { ArrowDropUp } from \"@material-ui/icons\";\nimport ArrowDropDownIcon from \"@material-ui/icons/ArrowDropDown\";\nimport {\n actionsTray,\n containerForHeader,\n logsCommon,\n searchField,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport { IReqInfoSearchResults, ISearchResponse } from \"./types\";\nimport { niceBytes, nsToSeconds } from \"../../../../common/utils\";\nimport { setErrorSnackMessage } from \"../../../../actions\";\nimport api from \"../../../../common/api\";\nimport TableWrapper from \"../../Common/TableWrapper/TableWrapper\";\nimport FilterInputWrapper from \"../../Common/FormComponents/FilterInputWrapper/FilterInputWrapper\";\nimport DateTimePickerWrapper from \"../../Common/FormComponents/DateTimePickerWrapper/DateTimePickerWrapper\";\n\ninterface ILogSearchProps {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n inputBar: {\n flexGrow: 1,\n marginLeft: 15,\n },\n advancedLabel: {\n display: \"flex\",\n alignItems: \"center\",\n color: \"#091C42\",\n border: 0,\n backgroundColor: \"transparent\",\n cursor: \"pointer\",\n \"&:focus, &:active\": {\n outline: \"none\",\n },\n },\n advancedLabelContainer: {\n marginTop: 10,\n },\n getInformationContainer: {\n textAlign: \"right\",\n },\n orderButton: {\n width: 93,\n },\n recordsLabel: {\n alignSelf: \"center\",\n marginLeft: 15,\n },\n blockCollapsed: {\n height: 0,\n overflowY: \"hidden\",\n transitionDuration: \"0.3s\",\n },\n filterOpen: {\n height: 200,\n marginBottom: 12,\n },\n endLineAction: {\n marginBottom: 15,\n },\n filtersContainer: {\n display: \"flex\",\n justifyContent: \"space-between\",\n marginBottom: 12,\n },\n innerContainer: {\n backgroundColor: \"#fff\",\n border: \"#EAEDEE 1px solid\",\n borderRadius: 3,\n padding: 10,\n marginBottom: 15,\n },\n noticeLabel: {\n marginLeft: 15,\n marginBottom: 15,\n fontSize: 12,\n color: \"#9C9C9C\",\n },\n\n tableFOpen: {\n height: \"calc(100vh - 561px)\",\n },\n tableFClosed: {\n height: \"calc(100vh - 349px)\",\n },\n \"@global\": {\n \".overrideMargin\": {\n marginLeft: 0,\n },\n },\n ...searchField,\n ...actionsTray,\n ...logsCommon,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst LogsSearchMain = ({ classes, setErrorSnackMessage }: ILogSearchProps) => {\n const [loading, setLoading] = useState(true);\n const [timeStart, setTimeStart] = useState(null);\n const [timeEnd, setTimeEnd] = useState(null);\n const [filterOpen, setFilterOpen] = useState(false);\n const [records, setRecords] = useState([]);\n const [bucket, setBucket] = useState(\"\");\n const [apiName, setApiName] = useState(\"\");\n const [userAgent, setUserAgent] = useState(\"\");\n const [object, setObject] = useState(\"\");\n const [requestID, setRequestID] = useState(\"\");\n const [responseStatus, setResponseStatus] = useState(\"\");\n const [sortOrder, setSortOrder] =\n useState<\"ASC\" | \"DESC\" | undefined>(\"DESC\");\n const [columnsShown, setColumnsShown] = useState([\n \"time\",\n \"api_name\",\n \"bucket\",\n \"object\",\n \"remote_host\",\n \"request_id\",\n \"user_agent\",\n \"response_status\",\n ]);\n const [nextPage, setNextPage] = useState(0);\n const [alreadyFetching, setAlreadyFetching] = useState(false);\n\n let recordsResp: any = null;\n\n const fetchRecords = useCallback(() => {\n if (!alreadyFetching) {\n setAlreadyFetching(true);\n let queryParams = `${bucket !== \"\" ? `&fp=bucket:${bucket}` : \"\"}${\n object !== \"\" ? `&fp=object:${object}` : \"\"\n }${apiName !== \"\" ? `&fp=api_name:${apiName}` : \"\"}${\n requestID !== \"\" ? `&fp=request_id:${requestID}` : \"\"\n }${userAgent !== \"\" ? `&fp=user_agent:${userAgent}` : \"\"}${\n responseStatus !== \"\" ? `&fp=response_status:${responseStatus}` : \"\"\n }`;\n\n queryParams = queryParams.trim();\n\n if (queryParams.endsWith(\",\")) {\n queryParams = queryParams.slice(0, -1);\n }\n\n api\n .invoke(\n \"GET\",\n `/api/v1/logs/search?q=reqinfo${\n queryParams !== \"\" ? `${queryParams}` : \"\"\n }&pageSize=100&pageNo=${nextPage}&order=${\n sortOrder === \"DESC\" ? \"timeDesc\" : \"timeAsc\"\n }${\n timeStart !== null ? `&timeStart=${timeStart.toISOString()}` : \"\"\n }${timeEnd !== null ? `&timeEnd=${timeEnd.toISOString()}` : \"\"}`\n )\n .then((res: ISearchResponse) => {\n const fetchedResults = res.results || [];\n const newResultSet = [...records, ...fetchedResults];\n\n setLoading(false);\n setAlreadyFetching(false);\n setRecords(newResultSet);\n setNextPage(nextPage + 1);\n\n if (recordsResp !== null) {\n recordsResp();\n }\n })\n .catch((err: any) => {\n setLoading(false);\n setAlreadyFetching(false);\n setErrorSnackMessage(err);\n });\n }\n }, [\n bucket,\n object,\n apiName,\n requestID,\n userAgent,\n responseStatus,\n nextPage,\n sortOrder,\n timeStart,\n timeEnd,\n alreadyFetching,\n records,\n recordsResp,\n setErrorSnackMessage,\n ]);\n\n useEffect(() => {\n if (loading) {\n setRecords([]);\n fetchRecords();\n }\n }, [loading, sortOrder, fetchRecords]);\n\n const triggerLoad = () => {\n setNextPage(0);\n setLoading(true);\n };\n\n const selectColumn = (colName: string, active: boolean) => {\n let newArray = [...columnsShown];\n\n if (!active) {\n newArray = columnsShown.filter((element) => element !== colName);\n } else {\n if (!newArray.includes(colName)) {\n newArray.push(colName);\n }\n }\n setColumnsShown(newArray);\n };\n\n const sortChange = (sortData: any) => {\n const newSortDirection = get(sortData, \"sortDirection\", \"DESC\");\n setSortOrder(newSortDirection);\n setNextPage(0);\n setLoading(true);\n };\n\n const loadMoreRecords = (_: { startIndex: number; stopIndex: number }) => {\n fetchRecords();\n return new Promise((resolve) => {\n recordsResp = resolve;\n });\n };\n\n return (\n \n \n \n Start Time\n \n End Time\n \n \n \n \n
\n
\n Enable your preferred options to get filtered records.\n
\n You can use '*' to match any character, '.' to signify a single\n character or '\\' to scape an special character (E.g. mybucket-*)\n
\n
\n \n \n \n
\n
\n \n \n \n
\n
\n \n
\n \n
\n {\n setFilterOpen(!filterOpen);\n }}\n >\n Advanced Filters{\" \"}\n {filterOpen ? : }\n \n
\n \n Get Information\n \n \n \n (\n \n \n {element.response_status_code} ({element.response_status})\n \n \n ),\n renderFullObject: true,\n },\n {\n label: \"Request Content Length\",\n elementKey: \"request_content_length\",\n renderFunction: niceBytes,\n },\n {\n label: \"Response Content Length\",\n elementKey: \"response_content_length\",\n renderFunction: niceBytes,\n },\n {\n label: \"Time to Response NS\",\n elementKey: \"time_to_response_ns\",\n renderFunction: nsToSeconds,\n contentTextAlign: \"right\",\n },\n ]}\n isLoading={loading}\n records={records}\n entityName=\"Logs\"\n customEmptyMessage={\"There is no information with this criteria\"}\n idField=\"request_id\"\n columnsSelector\n columnsShown={columnsShown}\n onColumnChange={selectColumn}\n customPaperHeight={\n filterOpen ? classes.tableFOpen : classes.tableFClosed\n }\n sortConfig={{\n currentSort: \"time\",\n currentDirection: sortOrder,\n triggerSort: sortChange,\n }}\n infiniteScrollConfig={{\n recordsCount: 1000000,\n loadMoreRecords: loadMoreRecords,\n }}\n textSelectable\n />\n \n \n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(LogsSearchMain));\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, useState, useEffect } from \"react\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { Grid, LinearProgress } from \"@material-ui/core\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport Tab from \"@material-ui/core/Tab\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport { containerForHeader } from \"../Common/FormComponents/common/styleLibrary\";\nimport ErrorLogs from \"./ErrorLogs/ErrorLogs\";\nimport LogsSearchMain from \"./LogSearch/LogsSearchMain\";\nimport api from \"../../../common/api\";\n\ninterface ILogsMainProps {\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerLabel: {\n fontSize: 22,\n fontWeight: 600,\n color: \"#000\",\n marginTop: 4,\n },\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst LogsMain = ({ classes }: ILogsMainProps) => {\n const [currentTab, setCurrentTab] = useState(0);\n const [loading, setLoading] = useState(true);\n const [showLogSearch, setShowLogSearch] = useState(false);\n\n useEffect(() => {\n api\n .invoke(\"GET\", `/api/v1/logs/search?q=reqinfo&pageSize=10&pageNo=0`)\n .then(() => {\n setShowLogSearch(true);\n setLoading(false);\n })\n .catch((err: any) => {\n setLoading(false);\n console.info(\"Log Search API not available.\");\n });\n }, [loading]);\n\n return (\n \n \n \n \n {!loading ? (\n \n \n All Logs\n \n , newValue: number) => {\n setCurrentTab(newValue);\n }}\n indicatorColor=\"primary\"\n textColor=\"primary\"\n aria-label=\"cluster-tabs\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n >\n \n {showLogSearch && }\n \n \n {currentTab === 0 && (\n \n \n \n )}\n {currentTab === 1 && showLogSearch && (\n \n \n \n )}\n \n \n ) : (\n \n )}\n \n \n \n );\n};\n\nexport default withStyles(styles)(LogsMain);\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 { HorizontalBar } from \"react-chartjs-2\";\nimport React, { useEffect, useState } from \"react\";\nimport { Button, Grid, TextField, InputBase } from \"@material-ui/core\";\nimport { IMessageEvent, w3cwebsocket as W3CWebSocket } from \"websocket\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { wsProtocol } from \"../../../utils/wsUtils\";\nimport api from \"../../../common/api\";\nimport { FormControl, MenuItem, Select } from \"@material-ui/core\";\nimport { BucketList, Bucket } from \"../Watch/types\";\nimport { HealStatus, colorH } from \"./types\";\nimport { niceBytes } from \"../../../common/utils\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport CheckboxWrapper from \"../Common/FormComponents/CheckboxWrapper/CheckboxWrapper\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n watchList: {\n background: \"white\",\n maxHeight: \"400\",\n overflow: \"auto\",\n \"& ul\": {\n margin: \"4\",\n padding: \"0\",\n },\n \"& ul li\": {\n listStyle: \"none\",\n margin: \"0\",\n padding: \"0\",\n borderBottom: \"1px solid #dedede\",\n },\n },\n graphContainer: {\n backgroundColor: \"#fff\",\n border: \"#EAEDEE 1px solid\",\n borderRadius: 3,\n padding: \"19px 38px\",\n },\n scanInfo: {\n marginTop: 20,\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n },\n scanData: {\n fontSize: 13,\n },\n inlineCheckboxes: {\n display: \"flex\",\n justifyContent: \"flex-start\",\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\ninterface IHeal {\n classes: any;\n}\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n width: 450,\n lineHeight: \"50px\",\n marginRight: 15,\n \"label + &\": {\n marginTop: theme.spacing(3),\n },\n \"& .MuiSelect-select:focus\": {\n backgroundColor: \"transparent\",\n },\n },\n input: {\n height: 50,\n fontSize: 13,\n lineHeight: \"50px\",\n width: 450,\n },\n })\n)(InputBase);\n\nconst Heal = ({ classes }: IHeal) => {\n const [start, setStart] = useState(false);\n const [bucketName, setBucketName] = useState(\"\");\n const [bucketList, setBucketList] = useState([]);\n const [prefix, setPrefix] = useState(\"\");\n const [recursive, setRecursive] = useState(false);\n const [forceStart, setForceStart] = useState(false);\n const [forceStop, setForceStop] = useState(false);\n // healStatus states\n const [hStatus, setHStatus] = useState({\n beforeHeal: [0, 0, 0, 0],\n afterHeal: [0, 0, 0, 0],\n objectsHealed: 0,\n objectsScanned: 0,\n healDuration: 0,\n sizeScanned: \"\",\n });\n\n const fetchBucketList = () => {\n api\n .invoke(\"GET\", `/api/v1/buckets`)\n .then((res: BucketList) => {\n let buckets: Bucket[] = [];\n if (res.buckets !== null) {\n buckets = res.buckets;\n }\n setBucketList(buckets);\n })\n .catch((err: any) => {\n console.log(err);\n });\n };\n\n useEffect(() => {\n fetchBucketList();\n }, []);\n\n // forceStart and forceStop need to be mutually exclusive\n useEffect(() => {\n if (forceStart === true) {\n setForceStop(false);\n }\n }, [forceStart]);\n\n useEffect(() => {\n if (forceStop === true) {\n setForceStart(false);\n }\n }, [forceStop]);\n\n const colorHealthArr = (color: colorH) => {\n return [color.Green, color.Yellow, color.Red, color.Grey];\n };\n\n useEffect(() => {\n // begin watch if bucketName in bucketList and start pressed\n if (start) {\n // values stored here to update chart\n const cB: colorH = { Green: 0, Yellow: 0, Red: 0, Grey: 0 };\n const cA: colorH = { Green: 0, Yellow: 0, Red: 0, Grey: 0 };\n\n const url = new URL(window.location.toString());\n const isDev = process.env.NODE_ENV === \"development\";\n const port = isDev ? \"9090\" : url.port;\n\n const wsProt = wsProtocol(url.protocol);\n const c = new W3CWebSocket(\n `${wsProt}://${url.hostname}:${port}/ws/heal/${bucketName}?prefix=${prefix}&recursive=${recursive}&force-start=${forceStart}&force-stop=${forceStop}`\n );\n\n if (c !== null) {\n c.onopen = () => {\n console.log(\"WebSocket Client Connected\");\n c.send(\"ok\");\n };\n c.onmessage = (message: IMessageEvent) => {\n let m: HealStatus = JSON.parse(message.data.toString());\n // Store percentage per health color\n for (const [key, value] of Object.entries(m.healthAfterCols)) {\n cA[key] = (value * 100) / m.itemsScanned;\n }\n for (const [key, value] of Object.entries(m.healthBeforeCols)) {\n cB[key] = (value * 100) / m.itemsScanned;\n }\n setHStatus({\n beforeHeal: colorHealthArr(cB),\n afterHeal: colorHealthArr(cA),\n objectsHealed: m.objectsHealed,\n objectsScanned: m.objectsScanned,\n healDuration: m.healDuration,\n sizeScanned: niceBytes(m.bytesScanned.toString()),\n });\n };\n c.onclose = () => {\n setStart(false);\n console.log(\"connection closed by server\");\n };\n return () => {\n // close websocket on useEffect cleanup\n c.close(1000);\n console.log(\"closing websockets\");\n };\n }\n }\n }, [start, bucketName, forceStart, forceStop, prefix, recursive]);\n\n let data = {\n labels: [\"Green\", \"Yellow\", \"Red\", \"Grey\"],\n datasets: [\n {\n label: \"After Healing\",\n data: hStatus.afterHeal,\n backgroundColor: \"rgba(0, 0, 255, 0.2)\",\n borderColor: \"rgba(54, 162, 235, 1)\",\n borderWidth: 1,\n },\n {\n label: \"Before Healing\",\n data: hStatus.beforeHeal,\n backgroundColor: \"rgba(153, 102, 255, 0.2)\",\n borderColor: \"rgba(153, 102, 255, 1)\",\n borderWidth: 1,\n },\n ],\n };\n const bucketNames = bucketList.map((bucketName) => ({\n label: bucketName.name,\n value: bucketName.name,\n }));\n return (\n \n \n \n \n \n \n {\n setBucketName(e.target.value as string);\n }}\n className={classes.searchField}\n input={}\n displayEmpty\n >\n \n Select Bucket\n \n {bucketNames.map((option) => (\n \n {option.label}\n \n ))}\n \n \n {\n setPrefix(e.target.value);\n }}\n />\n setStart(true)}\n >\n Start\n \n \n \n {\n setRecursive(e.target.checked);\n }}\n disabled={false}\n label=\"Recursive\"\n />\n {\n setForceStart(e.target.checked);\n }}\n disabled={false}\n label=\"Force Start\"\n />\n {\n setForceStop(e.target.checked);\n }}\n disabled={false}\n label=\"Force Stop\"\n />\n \n \n
\n
\n \n \n \n
\n Size scanned: {hStatus.sizeScanned}\n
\n
\n Objects healed: {hStatus.objectsHealed} /{\" \"}\n {hStatus.objectsScanned}\n
\n
\n Healing time: {hStatus.healDuration}s\n
\n
\n
\n
\n
\n
\n );\n};\n\nexport default withStyles(styles)(Heal);\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 { EventInfo } from \"./types\";\n\nexport const WATCH_MESSAGE_RECEIVED = \"WATCH_MESSAGE_RECEIVED\";\nexport const WATCH_RESET_MESSAGES = \"WATCH_RESET_MESSAGES\";\n\ninterface WatchMessageReceivedAction {\n type: typeof WATCH_MESSAGE_RECEIVED;\n message: EventInfo;\n}\n\ninterface WatchResetMessagesAction {\n type: typeof WATCH_RESET_MESSAGES;\n}\n\nexport type WatchActionTypes =\n | WatchMessageReceivedAction\n | WatchResetMessagesAction;\n\nexport function watchMessageReceived(message: EventInfo) {\n return {\n type: WATCH_MESSAGE_RECEIVED,\n message: message,\n };\n}\n\nexport function watchResetMessages() {\n return {\n type: WATCH_RESET_MESSAGES,\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 .\nimport React, { useEffect, useState } from \"react\";\nimport { Button, Grid, TextField, InputBase } from \"@material-ui/core\";\nimport { IMessageEvent, w3cwebsocket as W3CWebSocket } from \"websocket\";\nimport { AppState } from \"../../../store\";\nimport { connect } from \"react-redux\";\nimport { watchMessageReceived, watchResetMessages } from \"./actions\";\nimport { EventInfo, BucketList, Bucket } from \"./types\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { niceBytes, timeFromDate } from \"../../../common/utils\";\nimport { wsProtocol } from \"../../../utils/wsUtils\";\nimport api from \"../../../common/api\";\nimport { FormControl, MenuItem, Select } from \"@material-ui/core\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n watchList: {\n background: \"white\",\n height: \"400px\",\n overflow: \"auto\",\n \"& ul\": {\n margin: \"4px\",\n padding: \"0px\",\n },\n \"& ul li\": {\n listStyle: \"none\",\n margin: \"0px\",\n padding: \"0px\",\n borderBottom: \"1px solid #dedede\",\n },\n },\n searchPrefix: {\n flexGrow: 1,\n marginLeft: 15,\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n width: 450,\n lineHeight: \"50px\",\n \"label + &\": {\n marginTop: theme.spacing(3),\n },\n \"& .MuiSelect-select:focus\": {\n backgroundColor: \"transparent\",\n },\n },\n input: {\n height: 50,\n fontSize: 13,\n lineHeight: \"50px\",\n width: 450,\n },\n })\n)(InputBase);\n\ninterface IWatch {\n classes: any;\n watchMessageReceived: typeof watchMessageReceived;\n watchResetMessages: typeof watchResetMessages;\n messages: EventInfo[];\n}\n\nconst Watch = ({\n classes,\n watchMessageReceived,\n watchResetMessages,\n messages,\n}: IWatch) => {\n const [start, setStart] = useState(false);\n const [bucketName, setBucketName] = useState(\"Select Bucket\");\n const [prefix, setPrefix] = useState(\"\");\n const [suffix, setSuffix] = useState(\"\");\n const [bucketList, setBucketList] = useState([]);\n\n const fetchBucketList = () => {\n api\n .invoke(\"GET\", `/api/v1/buckets`)\n .then((res: BucketList) => {\n let buckets: Bucket[] = [];\n if (res.buckets !== null) {\n buckets = res.buckets;\n }\n setBucketList(buckets);\n })\n .catch((err: any) => {\n console.log(err);\n });\n };\n useEffect(() => {\n fetchBucketList();\n }, []);\n\n useEffect(() => {\n watchResetMessages();\n // begin watch if bucketName in bucketList and start pressed\n if (start && bucketList.some((bucket) => bucket.name === bucketName)) {\n const url = new URL(window.location.toString());\n const isDev = process.env.NODE_ENV === \"development\";\n const port = isDev ? \"9090\" : url.port;\n\n const wsProt = wsProtocol(url.protocol);\n const c = new W3CWebSocket(\n `${wsProt}://${url.hostname}:${port}/ws/watch/${bucketName}?prefix=${prefix}&suffix=${suffix}`\n );\n\n let interval: any | null = null;\n if (c !== null) {\n c.onopen = () => {\n console.log(\"WebSocket Client Connected\");\n c.send(\"ok\");\n interval = setInterval(() => {\n c.send(\"ok\");\n }, 10 * 1000);\n };\n c.onmessage = (message: IMessageEvent) => {\n let m: EventInfo = JSON.parse(message.data.toString());\n m.Time = new Date(m.Time.toString());\n m.key = Math.random();\n watchMessageReceived(m);\n };\n c.onclose = () => {\n clearInterval(interval);\n console.log(\"connection closed by server\");\n // reset start status\n setStart(false);\n };\n return () => {\n // close websocket on useEffect cleanup\n c.close(1000);\n clearInterval(interval);\n console.log(\"closing websockets\");\n };\n }\n } else {\n // reset start status\n setStart(false);\n }\n }, [\n watchMessageReceived,\n start,\n bucketList,\n bucketName,\n prefix,\n suffix,\n watchResetMessages,\n ]);\n\n const bucketNames = bucketList.map((bucketName) => ({\n label: bucketName.name,\n value: bucketName.name,\n }));\n\n return (\n \n \n \n \n \n \n {\n setBucketName(e.target.value as string);\n }}\n className={classes.searchField}\n disabled={start}\n input={}\n >\n \n Select Bucket\n \n {bucketNames.map((option) => (\n \n {option.label}\n \n ))}\n \n \n {\n setPrefix(e.target.value);\n }}\n />\n {\n setSuffix(e.target.value);\n }}\n />\n setStart(true)}\n >\n Start\n \n \n \n
\n
\n \n
\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n messages: state.watch.messages,\n});\n\nconst connector = connect(mapState, {\n watchMessageReceived: watchMessageReceived,\n watchResetMessages: watchResetMessages,\n});\n\nexport default connector(withStyles(styles)(Watch));\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 { HealthInfoMessage } from \"./types\";\n\nexport const HEALTH_INFO_MESSAGE_RECEIVED = \"HEALTH_INFO_MESSAGE_RECEIVED\";\nexport const HEALTH_INFO_RESET_MESSAGE = \"HEALTH_INFO_RESET_MESSAGE\";\n\ninterface HealthInfoMessageReceivedAction {\n type: typeof HEALTH_INFO_MESSAGE_RECEIVED;\n message: HealthInfoMessage;\n}\n\ninterface HealthInfoResetMessagesAction {\n type: typeof HEALTH_INFO_RESET_MESSAGE;\n}\n\nexport type HealthInfoActionTypes =\n | HealthInfoMessageReceivedAction\n | HealthInfoResetMessagesAction;\n\nexport function healthInfoMessageReceived(message: HealthInfoMessage) {\n return {\n type: HEALTH_INFO_MESSAGE_RECEIVED,\n message: message,\n };\n}\n\nexport function healthInfoResetMessage() {\n return {\n type: HEALTH_INFO_RESET_MESSAGE,\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\nexport const DiagStatError = \"error\";\nexport const DiagStatSuccess = \"success\";\nexport const DiagStatInProgress = \"inProgress\";\nexport interface HealthInfoMessage {\n timestamp: Date;\n error: string;\n perf: perfInfo;\n minio: minioHealthInfo;\n sys: sysHealthInfo;\n}\n\nexport interface perfInfo {\n drives: serverDrivesInfo[];\n net: serverNetHealthInfo[];\n net_parallel: serverNetHealthInfo;\n error: string;\n}\n\nexport interface serverDrivesInfo {\n addr: string;\n serial: drivePerfInfo[];\n parallel: drivePerfInfo[];\n error: string;\n}\n\nexport interface drivePerfInfo {\n endpoint: string;\n latency: diskLatency;\n throughput: diskThroughput;\n error: string;\n}\nexport interface diskLatency {\n avg_secs: number;\n percentile50_secs: number;\n percentile90_secs: number;\n percentile99_secs: number;\n min_secs: number;\n max_secs: number;\n}\n\nexport interface diskThroughput {\n avg_bytes_per_sec: number;\n percentile50_bytes_per_sec: number;\n percentile90_bytes_per_sec: number;\n percentile99_bytes_per_sec: number;\n min_bytes_per_sec: number;\n max_bytes_per_sec: number;\n}\n\nexport interface serverNetHealthInfo {\n addr: string;\n net: netPerfInfo[];\n error: string;\n}\n\nexport interface netPerfInfo {\n remote: string;\n latency: netLatency;\n throughput: netThroughput;\n error: string;\n}\n\nexport interface netLatency {\n avg_secs: number;\n percentile50_secs: number;\n percentile90_secs: number;\n percentile99_secs: number;\n min_secs: number;\n max_secs: number;\n}\nexport interface netThroughput {\n avg_bytes_per_sec: number;\n percentile50_bytes_per_sec: number;\n percentile90_bytes_per_sec: number;\n percentile99_bytes_per_sec: number;\n min_bytes_per_sec: number;\n max_bytes_per_sec: number;\n}\n\nexport interface minioHealthInfo {\n info: infoMessage;\n config: any;\n error: string;\n}\n\nexport interface infoMessage {\n mode: string;\n domain: string[];\n region: string;\n sqsARN: string[];\n deploymentID: string;\n buckets: buckets;\n objects: objects;\n usage: usage;\n services: services;\n backend: any;\n servers: serverProperties[];\n}\n\nexport interface buckets {\n count: number;\n}\n\nexport interface objects {\n count: number;\n}\n\nexport interface usage {\n size: number;\n}\n\nexport interface services {\n vault: vault;\n ldap: ldap;\n logger: Map[];\n audit: Map[];\n notifications: Map[]>;\n}\n\nexport interface vault {\n status: string;\n encrypt: string;\n decrypt: string;\n}\n\nexport interface ldap {\n status: string;\n}\n\nexport interface status {\n status: string;\n}\n\nexport interface serverProperties {\n state: string;\n endpoint: string;\n uptime: number;\n version: string;\n commitID: string;\n network: Map;\n drives: disk[];\n}\n\nexport interface disk {\n endpoint: string;\n rootDisk: boolean;\n path: string;\n healing: boolean;\n state: string;\n uuid: string;\n model: string;\n totalspace: number;\n usedspace: number;\n availspace: number;\n readthroughput: number;\n writethroughput: number;\n readlatency: number;\n writelatency: number;\n utilization: number;\n}\n\nexport interface sysHealthInfo {\n cpus: serverCpuInfo[];\n drives: serverDiskHwInfo[];\n osinfos: serverOsInfo[];\n meminfos: serverMemInfo[];\n procinfos: serverProcInfo[];\n error: string;\n}\n\nexport interface serverCpuInfo {\n addr: string;\n cpu: cpuInfoStat[];\n time: cpuTimeStat[];\n error: string;\n}\n\nexport interface cpuInfoStat {\n cpu: number;\n vendorId: string;\n family: string;\n model: string;\n stepping: number;\n physicalId: string;\n coreId: string;\n cores: number;\n modelName: string;\n mhz: number;\n cacheSize: number;\n flags: string[];\n microcode: string;\n}\n\nexport interface cpuTimeStat {\n cpu: string;\n user: number;\n system: number;\n idle: number;\n nice: number;\n iowait: number;\n irq: number;\n softirq: number;\n steal: number;\n guest: number;\n guestNice: number;\n}\n\nexport interface serverDiskHwInfo {\n addr: string;\n usages: diskUsageStat[];\n partitions: partitionStat[];\n counters: Map;\n error: string;\n}\n\nexport interface diskUsageStat {\n path: string;\n fstype: string;\n total: number;\n free: number;\n used: number;\n usedPercent: number;\n inodesTotal: number;\n inodesUsed: number;\n inodesFree: number;\n inodesUsedPercent: number;\n}\n\nexport interface partitionStat {\n device: string;\n mountpoint: string;\n fstype: string;\n opts: string;\n smartInfo: smartInfo;\n}\n\nexport interface smartInfo {\n device: string;\n scsi: scsiInfo;\n nvme: nvmeInfo;\n ata: ataInfo;\n error: string;\n}\n\nexport interface scsiInfo {\n scsiCapacityBytes: number;\n scsiModeSenseBuf: string;\n scsirespLen: number;\n scsiBdLen: number;\n scsiOffset: number;\n sciRpm: number;\n}\n\nexport interface nvmeInfo {\n serialNum: string;\n vendorId: string;\n firmwareVersion: string;\n modelNum: string;\n spareAvailable: string;\n spareThreshold: string;\n temperature: string;\n criticalWarning: string;\n maxDataTransferPages: number;\n controllerBusyTime: number;\n powerOnHours: number;\n powerCycles: number;\n unsafeShutdowns: number;\n mediaAndDataIntgerityErrors: number;\n dataUnitsReadBytes: number;\n dataUnitsWrittenBytes: number;\n hostReadCommands: number;\n hostWriteCommands: number;\n}\n\nexport interface ataInfo {\n scsiLuWWNDeviceID: string;\n serialNum: string;\n modelNum: string;\n firmwareRevision: string;\n RotationRate: string;\n MajorVersion: string;\n MinorVersion: string;\n smartSupportAvailable: boolean;\n smartSupportEnabled: boolean;\n smartErrorLog: string;\n transport: string;\n}\n\nexport interface diskIOCountersStat {\n readCount: number;\n mergedReadCount: number;\n DriteCount: number;\n mergedWriteCount: number;\n readBytes: number;\n writeBytes: number;\n readTime: number;\n writeTime: number;\n iopsInProgress: number;\n ioTime: number;\n weightedIO: number;\n name: string;\n serialNumber: string;\n label: string;\n}\n\nexport interface serverOsInfo {\n addr: string;\n info: infoStat;\n sensors: temperatureStat[];\n users: userStat[];\n error: string;\n}\n\nexport interface infoStat {\n hostname: string;\n uptime: number;\n bootTime: number;\n procs: number;\n os: string;\n platform: string;\n platformFamily: string;\n platformVersion: string;\n kernelVersion: string;\n kernelArch: string;\n virtualizationSystem: string;\n virtualizationRole: string;\n hostid: string;\n}\n\nexport interface temperatureStat {\n sensorKey: string;\n sensorTemperature: number;\n}\n\nexport interface userStat {\n user: string;\n terminal: string;\n host: string;\n started: number;\n}\n\nexport interface serverMemInfo {\n addr: string;\n swap: swapMemoryStat;\n virtualmem: virtualMemoryStat;\n error: string;\n}\n\nexport interface swapMemoryStat {\n total: number;\n used: number;\n free: number;\n usedPercent: number;\n sin: number;\n sout: number;\n pgin: number;\n pgout: number;\n pgfault: number;\n pgmajfault: number;\n}\n\nexport interface virtualMemoryStat {\n total: number;\n available: number;\n used: number;\n usedPercent: number;\n free: number;\n active: number;\n inactive: number;\n wired: number;\n laundry: number;\n buffers: number;\n cached: number;\n writeback: number;\n dirty: number;\n writebacktmp: number;\n shared: number;\n slab: number;\n sreclaimable: number;\n sunreclaim: number;\n pagetables: number;\n swapcached: number;\n commitlimit: number;\n committedas: number;\n hightotal: number;\n highfree: number;\n lowtotal: number;\n lowfree: number;\n swaptotal: number;\n swapfree: number;\n mapped: number;\n vmalloctotal: number;\n vmallocused: number;\n vmallocchunk: number;\n hugepagestotal: number;\n hugepagesfree: number;\n hugepagesize: number;\n}\n\nexport interface serverProcInfo {\n addr: string;\n processes: sysProcess[];\n error: string;\n}\n\nexport interface sysProcess {\n pid: number;\n background: boolean;\n cpupercent: number;\n children: number[];\n cmd: string;\n connections: nethwConnectionStat[];\n createtime: number;\n cwd: string;\n exe: string;\n gids: number[];\n iocounters: processIOCountersStat;\n isrunning: boolean;\n meminfo: memoryInfoStat;\n memmaps: any[];\n mempercent: number;\n name: string;\n netiocounters: nethwIOCounterStat[];\n nice: number;\n numctxswitches: processNmCtxSwitchesStat;\n numfds: number;\n numthreads: number;\n pagefaults: processPageFaultsStat;\n parent: number;\n ppid: number;\n rlimit: processRLimitStat[];\n status: string;\n tgid: number;\n cputimes: cpuTimeStat;\n uids: number[];\n username: string;\n}\n\nexport interface nethwConnectionStat {\n fd: number;\n family: number;\n type: number;\n localaddr: netAddr;\n remoteaddr: netAddr;\n status: string;\n uids: number[];\n pid: number;\n}\n\nexport interface netAddr {\n ip: string;\n port: number;\n}\n\nexport interface processIOCountersStat {\n readCount: number;\n writeCount: number;\n readBytes: number;\n writeBytes: number;\n}\n\nexport interface memoryInfoStat {\n rss: number;\n vms: number;\n hwm: number;\n data: number;\n stack: number;\n locked: number;\n swap: number;\n}\n\nexport interface nethwIOCounterStat {\n name: string;\n bytesSent: number;\n bytesRecv: number;\n packetsSent: number;\n packetsRecv: number;\n errin: number;\n errout: number;\n dropin: number;\n dropout: number;\n fifoin: number;\n fifoout: number;\n}\n\nexport interface processNmCtxSwitchesStat {\n voluntary: number;\n involuntary: number;\n}\n\nexport interface processPageFaultsStat {\n minorFaults: number;\n majorFaults: number;\n childMinorFaults: number;\n childMajorFaults: number;\n}\n\nexport interface processRLimitStat {\n resource: number;\n soft: number;\n hard: number;\n used: number;\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 .\nimport React, { useState, useEffect } from \"react\";\nimport {\n IMessageEvent,\n w3cwebsocket as W3CWebSocket,\n ICloseEvent,\n} from \"websocket\";\nimport { AppState } from \"../../../store\";\nimport { connect } from \"react-redux\";\nimport { healthInfoMessageReceived, healthInfoResetMessage } from \"./actions\";\nimport {\n HealthInfoMessage,\n DiagStatInProgress,\n DiagStatSuccess,\n DiagStatError,\n} from \"./types\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n wsProtocol,\n WSCloseInternalServerErr,\n WSClosePolicyViolation,\n WSCloseAbnormalClosure,\n} from \"../../../utils/wsUtils\";\nimport {\n actionsTray,\n containerForHeader,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { Grid, Button } from \"@material-ui/core\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport { setSnackBarMessage, setServerDiagStat } from \"../../../actions\";\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n logList: {\n background: \"#fff\",\n minHeight: 400,\n height: \"calc(100vh - 270px)\",\n overflow: \"auto\",\n fontSize: 13,\n padding: \"25px 45px\",\n border: \"1px solid #EAEDEE\",\n borderRadius: 4,\n },\n loading: {\n paddingTop: 8,\n paddingLeft: 40,\n },\n buttons: {\n justifyContent: \"flex-start\",\n gap: 20,\n },\n ...actionsTray,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst download = (filename: string, text: string) => {\n let element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:text/plain;charset=utf-8,\" + encodeURIComponent(text)\n );\n element.setAttribute(\"download\", filename);\n\n element.style.display = \"none\";\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n};\n\ninterface IHealthInfo {\n classes: any;\n healthInfoMessageReceived: typeof healthInfoMessageReceived;\n healthInfoResetMessage: typeof healthInfoResetMessage;\n message: HealthInfoMessage;\n namespace: string;\n tenant: string;\n setSnackBarMessage: typeof setSnackBarMessage;\n setServerDiagStat: typeof setServerDiagStat;\n serverDiagnosticStatus: string;\n}\n\nconst HealthInfo = ({\n classes,\n healthInfoMessageReceived,\n healthInfoResetMessage,\n message,\n setSnackBarMessage,\n setServerDiagStat,\n serverDiagnosticStatus,\n}: IHealthInfo) => {\n const [startDiagnostic, setStartDiagnostic] = useState(false);\n const [downloadDisabled, setDownloadDisabled] = useState(true);\n\n useEffect(() => {\n if (\n serverDiagnosticStatus === DiagStatSuccess &&\n message !== ({} as HealthInfoMessage)\n ) {\n // Allow download of diagnostics file only when\n // it succeded fetching all the results and info is not empty.\n setDownloadDisabled(false);\n }\n if (serverDiagnosticStatus === DiagStatInProgress) {\n // Disable Start Diagnotic and Disable Download buttons\n // if a Diagnosis is in progress.\n setDownloadDisabled(true);\n }\n setStartDiagnostic(false);\n }, [serverDiagnosticStatus, message]);\n\n useEffect(() => {\n if (startDiagnostic) {\n healthInfoResetMessage();\n const url = new URL(window.location.toString());\n const isDev = process.env.NODE_ENV === \"development\";\n const port = isDev ? \"9090\" : url.port;\n\n const wsProt = wsProtocol(url.protocol);\n\n const c = new W3CWebSocket(\n `${wsProt}://${url.hostname}:${port}/ws/health-info?deadline=1h`\n );\n\n let interval: any | null = null;\n if (c !== null) {\n c.onopen = () => {\n console.log(\"WebSocket Client Connected\");\n c.send(\"ok\");\n interval = setInterval(() => {\n c.send(\"ok\");\n }, 10 * 1000);\n setSnackBarMessage(\n \"Diagnostic started. Please do not refresh page during diagnosis.\"\n );\n setServerDiagStat(DiagStatInProgress);\n };\n c.onmessage = (message: IMessageEvent) => {\n let m: HealthInfoMessage = JSON.parse(message.data.toString());\n m.timestamp = new Date(m.timestamp.toString());\n healthInfoMessageReceived(m);\n };\n c.onerror = (error: Error) => {\n console.log(\"error closing websocket:\", error.message);\n c.close(1000);\n clearInterval(interval);\n setServerDiagStat(DiagStatError);\n };\n c.onclose = (event: ICloseEvent) => {\n clearInterval(interval);\n if (\n event.code === WSCloseInternalServerErr ||\n event.code === WSClosePolicyViolation ||\n event.code === WSCloseAbnormalClosure\n ) {\n // handle close with error\n console.log(\"connection closed by server with code:\", event.code);\n setSnackBarMessage(\n \"An error occurred while getting Diagnostic file.\"\n );\n setServerDiagStat(DiagStatError);\n } else {\n console.log(\"connection closed by server\");\n setSnackBarMessage(\"Diagnostic file is ready to be downloaded.\");\n setServerDiagStat(DiagStatSuccess);\n }\n };\n }\n } else {\n // reset start status\n setStartDiagnostic(false);\n }\n }, [\n healthInfoMessageReceived,\n healthInfoResetMessage,\n startDiagnostic,\n setSnackBarMessage,\n setServerDiagStat,\n ]);\n\n return (\n \n \n\n \n \n \n \n setStartDiagnostic(true)}\n >\n Start Diagnostic\n \n \n \n {serverDiagnosticStatus === DiagStatInProgress ? (\n
\n \n
\n ) : (\n {\n download(\n \"diagnostic.json\",\n JSON.stringify(message, null, 2)\n );\n }}\n disabled={downloadDisabled}\n >\n Download\n \n )}\n
\n
\n
\n
\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n message: state.healthInfo.message,\n serverDiagnosticStatus: state.system.serverDiagnosticStatus,\n});\n\nconst connector = connect(mapState, {\n healthInfoMessageReceived: healthInfoMessageReceived,\n healthInfoResetMessage: healthInfoResetMessage,\n setSnackBarMessage,\n setServerDiagStat,\n});\n\nexport default connector(withStyles(styles)(HealthInfo));\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, useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Grid, InputAdornment, TextField } from \"@material-ui/core\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { IPVCsResponse, IStoragePVCs } from \"./types\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\n\ninterface IStorageVolumesProps {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerLabel: {\n fontSize: 22,\n fontWeight: 600,\n color: \"#000\",\n marginTop: 4,\n },\n breadcrumLink: {\n textDecoration: \"none\",\n color: \"black\",\n },\n tableWrapper: {\n height: \"calc(100vh - 267px)\",\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst StorageVolumes = ({\n classes,\n setErrorSnackMessage,\n}: IStorageVolumesProps) => {\n const [records, setRecords] = useState([]);\n const [filter, setFilter] = useState(\"\");\n const [loading, setLoading] = useState(true);\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\"GET\", `/api/v1/list-pvcs`)\n .then((res: IPVCsResponse) => {\n let volumes = get(res, \"pvcs\", []);\n setRecords(volumes);\n setLoading(false);\n })\n .catch((err) => {\n setLoading(false);\n setErrorSnackMessage(err);\n });\n }\n }, [loading, setErrorSnackMessage]);\n\n const filteredRecords: IStoragePVCs[] = records.filter((elementItem) =>\n elementItem.name.includes(filter)\n );\n\n return (\n \n \n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n />\n \n \n
\n
\n \n \n \n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(StorageVolumes));\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\nexport const DIRECT_CSI_SELECT_DRIVE = \"DIRECT_CSI/SELECT_DRIVE\";\n\nexport interface IDirectCSIDrives {\n joinName: string;\n drive: string;\n capacity: string;\n allocated: string;\n volumes: number;\n node: string;\n status: \"Available\" | \"Unavailable\" | \"InUse\" | \"Ready\" | \"Terminating\";\n}\n\nexport interface IDirectCSIVolumes {\n volume: string;\n capacity: string;\n node: string;\n drive: string;\n}\n\nexport interface IDrivesResponse {\n drives: IDirectCSIDrives[];\n}\n\nexport interface IVolumesResponse {\n volumes: IDirectCSIVolumes[];\n}\n\nexport interface IDirectCSIFormatResult {\n formatIssuesList: IDirectCSIFormatResItem[];\n}\n\nexport interface IDirectCSIFormatResItem {\n node: string;\n drive: string;\n error: string;\n}\n\ninterface SelectDrive {\n type: typeof DIRECT_CSI_SELECT_DRIVE;\n driveName: string;\n}\n\nexport interface IDirectCSIState {\n selectedDrive: string;\n}\n\nexport type DirectCSITypes = SelectDrive;\n","// This file is part of MinIO Kubernetes Cloud\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, useState } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n Grid,\n LinearProgress,\n} from \"@material-ui/core\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport api from \"../../../common/api\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport PredefinedList from \"../Common/FormComponents/PredefinedList/PredefinedList\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport { IDirectCSIFormatResItem, IDirectCSIFormatResult } from \"./types\";\n\ninterface IFormatAllDrivesProps {\n closeFormatModalAndRefresh: (\n refresh: boolean,\n formatIssuesList: IDirectCSIFormatResItem[]\n ) => void;\n deleteOpen: boolean;\n allDrives: boolean;\n drivesToFormat: string[];\n setErrorSnackMessage: typeof setErrorSnackMessage;\n}\n\nconst FormatDrives = ({\n closeFormatModalAndRefresh,\n deleteOpen,\n allDrives,\n drivesToFormat,\n setErrorSnackMessage,\n}: IFormatAllDrivesProps) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n const [formatAll, setFormatAll] = useState(\"\");\n const [force, setForce] = useState(false);\n\n const removeRecord = () => {\n if (deleteLoading) {\n return;\n }\n setDeleteLoading(true);\n api\n .invoke(\"POST\", `/api/v1/direct-csi/drives/format`, {\n drives: drivesToFormat,\n force,\n })\n .then((res: IDirectCSIFormatResult) => {\n setDeleteLoading(false);\n closeFormatModalAndRefresh(true, res.formatIssuesList);\n })\n .catch((err) => {\n setDeleteLoading(false);\n setErrorSnackMessage(err);\n });\n };\n return (\n {\n closeFormatModalAndRefresh(false, []);\n }}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n \n Format {allDrives ? \"All \" : \"\"}Drives\n \n \n \n {!allDrives && (\n \n 1 ? \"s\" : \"\"}`}\n content={drivesToFormat.join(\", \")}\n />\n
\n
\n )}\n \n ) => {\n setForce(event.target.checked);\n }}\n label={\"Force Format\"}\n indicatorLabels={[\"Yes\", \"No\"]}\n />\n \n Are you sure you want to format{\" \"}\n {allDrives ? All : \"the selected\"} drive\n {drivesToFormat.length > 1 || allDrives ? \"s\" : \"\"}?.\n
\n
\n \n All information contained will be erased and cannot be recovered\n \n
\n
\n To continue please type YES, PROCEED in the box.\n \n ) => {\n setFormatAll(event.target.value);\n }}\n label=\"\"\n value={formatAll}\n />\n \n
\n
\n {deleteLoading && }\n \n {\n closeFormatModalAndRefresh(false, []);\n }}\n color=\"primary\"\n disabled={deleteLoading}\n >\n Cancel\n \n \n Format Drive{drivesToFormat.length > 1 || allDrives ? \"s\" : \"\"}\n \n \n \n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default connector(FormatDrives);\n","// This file is part of MinIO Kubernetes Cloud\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 {\n Button,\n createStyles,\n Grid,\n Theme,\n withStyles,\n} from \"@material-ui/core\";\nimport React from \"react\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport { IDirectCSIFormatResItem } from \"./types\";\n\ninterface IFormatErrorsProps {\n open: boolean;\n onCloseFormatErrorsList: () => void;\n errorsList: IDirectCSIFormatResItem[];\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n warningBlock: {\n color: \"red\",\n },\n buttonContainer: {\n textAlign: \"right\",\n },\n errorsList: {\n height: \"calc(100vh - 280px)\",\n },\n });\n\nconst download = (filename: string, text: string) => {\n let element = document.createElement(\"a\");\n element.setAttribute(\n \"href\",\n \"data:application/json;charset=utf-8,\" + encodeURIComponent(text)\n );\n console.log(filename);\n element.setAttribute(\"download\", filename);\n\n element.style.display = \"none\";\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n};\n\nconst FormatErrorsResult = ({\n open,\n onCloseFormatErrorsList,\n errorsList,\n classes,\n}: IFormatErrorsProps) => {\n return (\n \n \n \n There were some issues trying to format the selected CSI Drives,\n please fix the issues and try again.\n
\n \n
\n \n {\n download(\"csiFormatErrors.json\", JSON.stringify([...errorsList]));\n }}\n color=\"primary\"\n >\n Download\n \n \n \n
\n \n );\n};\n\nexport default withStyles(styles)(FormatErrorsResult);\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, useState, useEffect } from \"react\";\nimport { connect } from \"react-redux\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport {\n Button,\n Grid,\n InputAdornment,\n TextField,\n IconButton,\n} from \"@material-ui/core\";\nimport get from \"lodash/get\";\nimport SearchIcon from \"@material-ui/icons/Search\";\nimport GroupIcon from \"@material-ui/icons/Group\";\nimport RefreshIcon from \"@material-ui/icons/Refresh\";\nimport { CreateIcon } from \"../../../icons\";\nimport { setErrorSnackMessage } from \"../../../actions\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport {\n IDirectCSIDrives,\n IDirectCSIFormatResItem,\n IDrivesResponse,\n} from \"./types\";\nimport { niceBytes } from \"../../../common/utils\";\nimport { selectDrive } from \"./actions\";\nimport api from \"../../../common/api\";\nimport TableWrapper from \"../Common/TableWrapper/TableWrapper\";\nimport FormatDrives from \"./FormatDrives\";\nimport FormatErrorsResult from \"./FormatErrorsResult\";\n\ninterface IDirectCSIMain {\n classes: any;\n setErrorSnackMessage: typeof setErrorSnackMessage;\n selectDrive: typeof selectDrive;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerLabel: {\n fontSize: 22,\n fontWeight: 600,\n color: \"#000\",\n marginTop: 4,\n },\n tableWrapper: {\n height: \"calc(100vh - 275px)\",\n },\n notAvailableNotice: {\n border: \"#EAEDEE 1px solid\",\n backgroundColor: \"#FFF\",\n display: \"flex\",\n padding: \"19px 38px\",\n overflow: \"auto\",\n position: \"relative\",\n boxShadow: \"none\",\n minHeight: 200,\n overflowY: \"scroll\",\n borderRadius: 3,\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: \"calc(100vh - 275px)\",\n fontSize: 18,\n fontWeight: 600,\n textAlign: \"center\",\n },\n linkItem: {\n display: \"default\",\n color: \"#072F51\",\n textDecoration: \"none\",\n \"&:hover\": {\n textDecoration: \"underline\",\n color: \"#000\",\n },\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst DirectCSIMain = ({\n classes,\n selectDrive,\n setErrorSnackMessage,\n}: IDirectCSIMain) => {\n const [records, setRecords] = useState([]);\n const [filter, setFilter] = useState(\"\");\n const [checkedDrives, setCheckedDrives] = useState([]);\n const [loading, setLoading] = useState(true);\n const [formatOpen, setFormatOpen] = useState(false);\n const [formatAll, setFormatAll] = useState(false);\n const [formatErrorsResult, setFormatErrorsResult] = useState<\n IDirectCSIFormatResItem[]\n >([]);\n const [formatErrorsOpen, setFormatErrorsOpen] = useState(false);\n const [drivesToFormat, setDrivesToFormat] = useState([]);\n const [notAvailable, setNotAvailable] = useState(true);\n\n useEffect(() => {\n if (loading && !notAvailable) {\n api\n .invoke(\"GET\", \"/api/v1/direct-csi/drives\")\n .then((res: IDrivesResponse) => {\n let drives: IDirectCSIDrives[] = get(res, \"drives\", []);\n\n if (!drives) {\n drives = [];\n }\n\n drives = drives.map((item) => {\n const newItem = { ...item };\n newItem.joinName = `${newItem.node}:${newItem.drive}`;\n\n return newItem;\n });\n\n drives.sort((d1, d2) => {\n if (d1.drive > d2.drive) {\n return 1;\n }\n\n if (d1.drive < d2.drive) {\n return -1;\n }\n\n return 0;\n });\n\n setRecords(drives);\n setLoading(false);\n setNotAvailable(false);\n })\n .catch((err) => {\n setLoading(false);\n setNotAvailable(true);\n });\n }\n }, [loading, setErrorSnackMessage, notAvailable]);\n\n const formatAllDrives = () => {\n const allDrives = records.map((item) => {\n return `${item.node}:${item.drive}`;\n });\n setFormatAll(true);\n setDrivesToFormat(allDrives);\n setFormatOpen(true);\n };\n\n const formatSingleUnit = (driveID: string) => {\n const selectedUnit = [driveID];\n setDrivesToFormat(selectedUnit);\n setFormatAll(false);\n setFormatOpen(true);\n };\n\n const formatSelectedDrives = () => {\n if (checkedDrives.length > 0) {\n setDrivesToFormat(checkedDrives);\n setFormatAll(false);\n setFormatOpen(true);\n }\n };\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[] = [...checkedDrives]; // We clone the checkedDrives array\n\n if (checked) {\n // If the user has checked this field we need to push this to checkedDrivesList\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\n setCheckedDrives(elements);\n\n return elements;\n };\n\n const closeFormatModal = (\n refresh: boolean,\n errorsList: IDirectCSIFormatResItem[]\n ) => {\n setFormatOpen(false);\n if (refresh) {\n // Errors are present, we trigger the modal box to show these changes.\n if (errorsList && errorsList.length > 0) {\n setFormatErrorsResult(errorsList);\n setFormatErrorsOpen(true);\n }\n setLoading(true);\n setCheckedDrives([]);\n }\n };\n\n const tableActions = [\n {\n type: \"format\",\n onClick: formatSingleUnit,\n sendOnlyId: true,\n },\n ];\n\n const filteredRecords: IDirectCSIDrives[] = records.filter((elementItem) =>\n elementItem.drive.includes(filter)\n );\n\n return (\n \n {formatOpen && (\n \n )}\n\n {formatErrorsOpen && (\n {\n setFormatErrorsOpen(false);\n }}\n />\n )}\n\n \n \n \n \n ),\n }}\n onChange={(e) => {\n setFilter(e.target.value);\n }}\n disabled={notAvailable}\n />\n {\n setLoading(true);\n }}\n disabled={notAvailable}\n >\n \n \n }\n disabled={checkedDrives.length <= 0 || notAvailable}\n onClick={formatSelectedDrives}\n >\n Format Selected Drives\n \n }\n onClick={formatAllDrives}\n disabled={notAvailable}\n >\n Format All Drives\n \n \n\n \n
\n
\n \n {notAvailable ? (\n
\n To manage locally attached drives you need to install direct-csi,\n for more information\n
\n please follow this\n \n Link\n \n
\n ) : (\n \n )}\n
\n
\n );\n};\n\nconst mapDispatchToProps = {\n setErrorSnackMessage,\n selectDrive,\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport default withStyles(styles)(connector(DirectCSIMain));\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 { DIRECT_CSI_SELECT_DRIVE } from \"./types\";\n\nexport const selectDrive = (driveName: string) => {\n return {\n type: DIRECT_CSI_SELECT_DRIVE,\n driveName,\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, { Fragment, useState, useEffect } from \"react\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Grid, Tab, Tabs } from \"@material-ui/core\";\nimport { Route, Router, Switch, Redirect } from \"react-router-dom\";\nimport {\n actionsTray,\n containerForHeader,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport history from \"../../../history\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport StoragePVCs from \"./StoragePVCs\";\nimport DirectCSIDrives from \"../DirectCSI/DirectCSIDrives\";\n\ninterface IStorageProps {\n classes: any;\n match: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n headerLabel: {\n fontSize: 22,\n fontWeight: 600,\n color: \"#000\",\n marginTop: 4,\n },\n tabsContainer: {\n marginBottom: 15,\n },\n ...actionsTray,\n ...searchField,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst routes = [\"/storage/volumes\", \"/storage/drives\"];\n\nconst Storage = ({ classes, match }: IStorageProps) => {\n const [selectedTab, setSelectedTab] = useState(0);\n\n useEffect(() => {\n const index = routes.findIndex((route) => route === match.path);\n setSelectedTab(index);\n }, [match]);\n\n const routeChange = (e: React.ChangeEvent<{}>, newValue: number) => {\n history.push(routes[newValue]);\n };\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n } />\n \n \n \n \n \n );\n};\n\nexport default withStyles(styles)(Storage);\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, useState, useEffect } from \"react\";\nimport clsx from \"clsx\";\nimport { createStyles, Theme, withStyles } from \"@material-ui/core/styles\";\nimport { Button, LinearProgress } from \"@material-ui/core\";\nimport CssBaseline from \"@material-ui/core/CssBaseline\";\nimport Drawer from \"@material-ui/core/Drawer\";\nimport Container from \"@material-ui/core/Container\";\nimport Snackbar from \"@material-ui/core/Snackbar\";\nimport history from \"../../history\";\nimport { Redirect, Route, Router, Switch } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../store\";\nimport {\n serverIsLoading,\n serverNeedsRestart,\n setMenuOpen,\n setSnackBarMessage,\n} from \"../../actions\";\nimport { ISessionResponse } from \"./types\";\nimport { snackBarMessage } from \"../../types\";\nimport { snackBarCommon } from \"./Common/FormComponents/common/styleLibrary\";\nimport Buckets from \"./Buckets/Buckets\";\nimport Policies from \"./Policies/Policies\";\nimport Dashboard from \"./Dashboard/Dashboard\";\nimport Menu from \"./Menu/Menu\";\nimport api from \"../../common/api\";\nimport Account from \"./Account/Account\";\nimport Users from \"./Users/Users\";\nimport Groups from \"./Groups/Groups\";\nimport ConfigurationMain from \"./Configurations/ConfigurationMain\";\nimport WebhookPanel from \"./Configurations/ConfigurationPanels/WebhookPanel\";\nimport TenantsMain from \"./Tenants/TenantsMain\";\nimport TenantDetails from \"./Tenants/TenantDetails/TenantDetails\";\nimport ObjectBrowser from \"./ObjectBrowser/ObjectBrowser\";\nimport ObjectRouting from \"./Buckets/ListBuckets/Objects/ListObjects/ObjectRouting\";\nimport License from \"./License/License\";\nimport Trace from \"./Trace/Trace\";\nimport LogsMain from \"./Logs/LogsMain\";\nimport Heal from \"./Heal/Heal\";\nimport Watch from \"./Watch/Watch\";\nimport HealthInfo from \"./HealthInfo/HealthInfo\";\nimport Storage from \"./Storage/Storage\";\n\nconst drawerWidth = 245;\n\nconst styles = (theme: Theme) =>\n createStyles({\n root: {\n display: \"flex\",\n \"& .MuiPaper-root.MuiSnackbarContent-root\": {\n borderRadius: \"0px 0px 5px 5px\",\n boxShadow: \"none\",\n },\n },\n toolbar: {\n background: theme.palette.background.default,\n color: \"black\",\n paddingRight: 24, // keep right padding when drawer closed\n },\n toolbarIcon: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n padding: \"0 8px\",\n ...theme.mixins.toolbar,\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n },\n appBarShift: {\n marginLeft: drawerWidth,\n width: `calc(100% - ${drawerWidth}px)`,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n menuButton: {\n marginRight: 36,\n },\n menuButtonHidden: {\n display: \"none\",\n },\n title: {\n flexGrow: 1,\n },\n drawerPaper: {\n position: \"relative\",\n whiteSpace: \"nowrap\",\n width: drawerWidth,\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n overflowX: \"hidden\",\n background:\n \"transparent linear-gradient(90deg, #073052 0%, #081C42 100%) 0% 0% no-repeat padding-box\",\n boxShadow: \"0px 3px 7px #00000014\",\n },\n drawerPaperClose: {\n overflowX: \"hidden\",\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n width: theme.spacing(7),\n [theme.breakpoints.up(\"sm\")]: {\n width: theme.spacing(9),\n },\n },\n content: {\n flexGrow: 1,\n height: \"100vh\",\n overflow: \"auto\",\n position: \"relative\",\n },\n container: {\n paddingBottom: theme.spacing(4),\n margin: 0,\n width: \"100%\",\n maxWidth: \"initial\",\n },\n paper: {\n padding: theme.spacing(2),\n display: \"flex\",\n overflow: \"auto\",\n flexDirection: \"column\",\n },\n fixedHeight: {\n minHeight: 240,\n },\n warningBar: {\n background: theme.palette.primary.main,\n color: \"white\",\n heigh: \"60px\",\n widht: \"100%\",\n lineHeight: \"60px\",\n textAlign: \"center\",\n },\n progress: {\n height: \"3px\",\n backgroundColor: \"#eaeaea\",\n },\n ...snackBarCommon,\n });\n\ninterface IConsoleProps {\n open: boolean;\n needsRestart: boolean;\n isServerLoading: boolean;\n title: string;\n classes: any;\n setMenuOpen: typeof setMenuOpen;\n serverNeedsRestart: typeof serverNeedsRestart;\n serverIsLoading: typeof serverIsLoading;\n session: ISessionResponse;\n loadingProgress: number;\n snackBarMessage: snackBarMessage;\n setSnackBarMessage: typeof setSnackBarMessage;\n}\n\nconst Console = ({\n classes,\n open,\n needsRestart,\n isServerLoading,\n serverNeedsRestart,\n serverIsLoading,\n session,\n loadingProgress,\n snackBarMessage,\n setSnackBarMessage,\n}: IConsoleProps) => {\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n const restartServer = () => {\n serverIsLoading(true);\n api\n .invoke(\"POST\", \"/api/v1/service/restart\", {})\n .then((res) => {\n console.log(\"success restarting service\");\n console.log(res);\n serverIsLoading(false);\n serverNeedsRestart(false);\n })\n .catch((err) => {\n serverIsLoading(false);\n console.log(\"failure restarting service\");\n console.log(err);\n });\n };\n\n const allowedPages = session.pages.reduce(\n (result: any, item: any, index: any) => {\n result[item] = true;\n return result;\n },\n {}\n );\n const routes = [\n {\n component: Dashboard,\n path: \"/dashboard\",\n },\n {\n component: Buckets,\n path: \"/buckets\",\n },\n {\n component: Buckets,\n path: \"/buckets/:bucketName\",\n },\n {\n component: ObjectBrowser,\n path: \"/object-browser\",\n },\n {\n component: ObjectRouting,\n path: \"/object-browser/:bucket\",\n },\n {\n component: ObjectRouting,\n path: \"/object-browser/:bucket/*\",\n },\n {\n component: Watch,\n path: \"/watch\",\n },\n {\n component: Users,\n path: \"/users/:userName\",\n },\n {\n component: Users,\n path: \"/users\",\n },\n {\n component: Groups,\n path: \"/groups\",\n },\n {\n component: Policies,\n path: \"/policies/:policyName\",\n },\n {\n component: Policies,\n path: \"/policies\",\n },\n {\n component: Heal,\n path: \"/heal\",\n },\n {\n component: Trace,\n path: \"/trace\",\n },\n {\n component: LogsMain,\n path: \"/logs\",\n },\n {\n component: HealthInfo,\n path: \"/health-info\",\n },\n {\n component: ConfigurationMain,\n path: \"/settings\",\n },\n {\n component: Account,\n path: \"/account\",\n props: {\n changePassword: session.pages.includes(\"/account/change-password\"),\n },\n },\n {\n component: WebhookPanel,\n path: \"/webhook/logger\",\n },\n {\n component: WebhookPanel,\n path: \"/webhook/audit\",\n },\n {\n component: TenantsMain,\n path: \"/tenants\",\n },\n {\n component: Storage,\n path: \"/storage\",\n },\n {\n component: Storage,\n path: \"/storage/volumes\",\n },\n {\n component: Storage,\n path: \"/storage/drives\",\n },\n {\n component: TenantDetails,\n path: \"/namespaces/:tenantNamespace/tenants/:tenantName\",\n },\n {\n component: License,\n path: \"/license\",\n },\n ];\n const allowedRoutes = routes.filter((route: any) => allowedPages[route.path]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n setSnackBarMessage(\"\");\n };\n\n useEffect(() => {\n if (snackBarMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n setOpenSnackbar(true);\n }, [snackBarMessage]);\n\n return (\n \n {session.status === \"ok\" ? (\n
\n \n \n \n \n\n
\n {needsRestart && (\n
\n {isServerLoading ? (\n \n The server is restarting.\n \n \n ) : (\n \n The instance needs to be restarted for configuration changes\n to take effect.{\" \"}\n {\n restartServer();\n }}\n >\n Restart\n \n \n )}\n
\n )}\n {loadingProgress < 100 && (\n \n )}\n
\n {\n closeSnackBar();\n }}\n autoHideDuration={\n snackBarMessage.type === \"error\" ? 10000 : 5000\n }\n message={snackBarMessage.message}\n className={classes.snackBarExternal}\n ContentProps={{\n className: `${classes.snackBar} ${\n snackBarMessage.type === \"error\"\n ? classes.errorSnackBar\n : \"\"\n }`,\n }}\n />\n
\n \n \n \n {allowedRoutes.map((route: any) => (\n (\n \n )}\n />\n ))}\n {allowedRoutes.length > 0 ? (\n \n ) : null}\n \n \n \n
\n
\n ) : null}\n
\n );\n};\n\nconst mapState = (state: AppState) => ({\n open: state.system.sidebarOpen,\n needsRestart: state.system.serverNeedsRestart,\n isServerLoading: state.system.serverIsLoading,\n session: state.console.session,\n loadingProgress: state.system.loadingProgress,\n snackBarMessage: state.system.snackBar,\n});\n\nconst connector = connect(mapState, {\n setMenuOpen,\n serverNeedsRestart,\n serverIsLoading,\n setSnackBarMessage,\n});\n\nexport default withStyles(styles)(connector(Console));\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, { FC, useEffect, useState } from \"react\"; // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { RouteComponentProps } from \"react-router\";\nimport storage from \"local-storage-fallback\";\nimport api from \"../../common/api\";\n\nconst LoginCallback: FC = ({ location }) => {\n const [error, setError] = useState(\"\");\n const [errorDescription, setErrorDescription] = useState(\"\");\n useEffect(() => {\n const code = (location.search.match(/code=([^&]+)/) || [])[1];\n const state = (location.search.match(/state=([^&]+)/) || [])[1];\n const error = (location.search.match(/error=([^&]+)/) || [])[1];\n const errorDescription = (location.search.match(\n /error_description=([^&]+)/\n ) || [])[1];\n if (error !== undefined || errorDescription !== undefined) {\n setError(error);\n setErrorDescription(errorDescription);\n } else {\n api\n .invoke(\"POST\", \"/api/v1/login/oauth2/auth\", { code, state })\n .then((res: any) => {\n if (res && res.sessionId) {\n // store the jwt token\n storage.setItem(\"token\", res.sessionId);\n // We push to history the new URL.\n window.location.href = \"/\";\n }\n })\n .catch((res: any) => {\n window.location.href = \"/login\";\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }\n }, [location.search]);\n return error !== \"\" || errorDescription !== \"\" ? (\n
\n

IDP Error:

\n

{error}

\n

{errorDescription}

\n
\n ) : null;\n};\n\nexport default LoginCallback;\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 { ISessionResponse } from \"./types\";\n\nexport const SESSION_RESPONSE = \"SESSION_RESPONSE\";\n\ninterface SessionAction {\n type: typeof SESSION_RESPONSE;\n message: ISessionResponse;\n}\nexport type SessionActionTypes = SessionAction;\n\nexport function saveSessionResponse(message: ISessionResponse) {\n return {\n type: SESSION_RESPONSE,\n message: message,\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, { useEffect, useState } from \"react\";\nimport { Redirect } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"./store\";\nimport { consoleOperatorMode, userLoggedIn } from \"./actions\";\nimport api from \"./common/api\";\nimport { saveSessionResponse } from \"./screens/Console/actions\";\nimport { ISessionResponse } from \"./screens/Console/types\";\n\nconst mapState = (state: AppState) => ({\n loggedIn: state.system.loggedIn,\n});\n\nconst connector = connect(mapState, {\n userLoggedIn,\n consoleOperatorMode,\n saveSessionResponse,\n});\n\ninterface ProtectedRouteProps {\n loggedIn: boolean;\n Component: any;\n userLoggedIn: typeof userLoggedIn;\n consoleOperatorMode: typeof consoleOperatorMode;\n saveSessionResponse: typeof saveSessionResponse;\n}\n\nconst ProtectedRoute = ({\n Component,\n loggedIn,\n userLoggedIn,\n consoleOperatorMode,\n saveSessionResponse,\n}: ProtectedRouteProps) => {\n const [sessionLoading, setSessionLoading] = useState(true);\n useEffect(() => {\n api\n .invoke(\"GET\", `/api/v1/session`)\n .then((res: ISessionResponse) => {\n saveSessionResponse(res);\n userLoggedIn(true);\n setSessionLoading(false);\n // check for tenants presence, that indicates we are in operator mode\n if (res.operator) {\n consoleOperatorMode(true);\n document.title = \"MinIO Operator\";\n }\n })\n .catch(() => setSessionLoading(false));\n }, [saveSessionResponse, consoleOperatorMode, userLoggedIn]);\n\n // if we still trying to retrieve user session render nothing\n if (sessionLoading) {\n return null;\n }\n // redirect user to the right page based on session status\n return loggedIn ? : ;\n};\n\nexport default connector(ProtectedRoute);\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 from \"react\";\nimport { Route, Router, Switch } from \"react-router-dom\";\nimport history from \"./history\";\nimport Login from \"./screens/LoginPage/LoginPage\";\nimport Console from \"./screens/Console/Console\";\nimport LoginCallback from \"./screens/LoginPage/LoginCallback\";\nimport { hot } from \"react-hot-loader/root\";\nimport ProtectedRoute from \"./ProtectedRoutes\";\n\nconst Routes = () => {\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default hot(Routes);\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 {\n MENU_OPEN,\n OPERATOR_MODE,\n SERVER_IS_LOADING,\n SERVER_NEEDS_RESTART,\n SystemActionTypes,\n SystemState,\n USER_LOGGED,\n SET_LOADING_PROGRESS,\n SET_SNACK_BAR_MESSAGE,\n SET_ERROR_SNACK_MESSAGE,\n SET_SERVER_DIAG_STAT,\n SET_SNACK_MODAL_MESSAGE,\n SET_MODAL_ERROR_MESSAGE,\n} from \"./types\";\n\nconst initialState: SystemState = {\n loggedIn: false,\n operatorMode: false,\n session: \"\",\n userName: \"\",\n sidebarOpen: true,\n serverNeedsRestart: false,\n serverIsLoading: false,\n loadingProgress: 100,\n snackBar: {\n message: \"\",\n type: \"message\",\n },\n modalSnackBar: {\n message: \"\",\n type: \"message\",\n },\n serverDiagnosticStatus: \"\",\n};\n\nexport function systemReducer(\n state = initialState,\n action: SystemActionTypes\n): SystemState {\n switch (action.type) {\n case USER_LOGGED:\n return {\n ...state,\n loggedIn: action.logged,\n };\n case OPERATOR_MODE:\n return {\n ...state,\n operatorMode: action.operatorMode,\n };\n case MENU_OPEN:\n return {\n ...state,\n sidebarOpen: action.open,\n };\n case SERVER_NEEDS_RESTART:\n return {\n ...state,\n serverNeedsRestart: action.needsRestart,\n };\n\n case SERVER_IS_LOADING:\n return {\n ...state,\n serverIsLoading: action.isLoading,\n };\n case SET_LOADING_PROGRESS:\n return {\n ...state,\n loadingProgress: action.loadingProgress,\n };\n case SET_SNACK_BAR_MESSAGE:\n return {\n ...state,\n snackBar: { message: action.message, type: \"message\" },\n };\n case SET_ERROR_SNACK_MESSAGE:\n return {\n ...state,\n snackBar: { message: action.message, type: \"error\" },\n };\n case SET_SNACK_MODAL_MESSAGE:\n return {\n ...state,\n modalSnackBar: { message: action.message, type: \"message\" },\n };\n case SET_MODAL_ERROR_MESSAGE:\n return {\n ...state,\n modalSnackBar: { message: action.message, type: \"error\" },\n };\n case SET_SERVER_DIAG_STAT:\n return {\n ...state,\n serverDiagnosticStatus: action.serverDiagnosticStatus,\n };\n default:\n return state;\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 {\n TRACE_MESSAGE_RECEIVED,\n TRACE_RESET_MESSAGES,\n TraceActionTypes,\n} from \"./actions\";\nimport { TraceMessage } from \"./types\";\n\nexport interface TraceState {\n messages: TraceMessage[];\n}\n\nconst initialState: TraceState = {\n messages: [],\n};\n\nexport function traceReducer(\n state = initialState,\n action: TraceActionTypes\n): TraceState {\n switch (action.type) {\n case TRACE_MESSAGE_RECEIVED:\n return {\n ...state,\n messages: [...state.messages, action.message],\n };\n case TRACE_RESET_MESSAGES:\n return {\n ...state,\n messages: [],\n };\n default:\n return state;\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 {\n LOG_MESSAGE_RECEIVED,\n LOG_RESET_MESSAGES,\n LogActionTypes,\n} from \"./actions\";\nimport { LogMessage } from \"./types\";\n\nexport interface LogState {\n messages: LogMessage[];\n}\n\nconst initialState: LogState = {\n messages: [],\n};\n\nexport function logReducer(\n state = initialState,\n action: LogActionTypes\n): LogState {\n switch (action.type) {\n case LOG_MESSAGE_RECEIVED:\n return {\n ...state,\n messages: [...state.messages, action.message],\n };\n case LOG_RESET_MESSAGES:\n return {\n ...state,\n messages: [],\n };\n default:\n return state;\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 {\n HEALTH_INFO_MESSAGE_RECEIVED,\n HEALTH_INFO_RESET_MESSAGE,\n HealthInfoActionTypes,\n} from \"./actions\";\nimport { HealthInfoMessage } from \"./types\";\n\nexport interface HealthInfoState {\n message: HealthInfoMessage;\n}\n\nconst initialState: HealthInfoState = {\n message: {} as HealthInfoMessage,\n};\n\nexport function healthInfoReducer(\n state = initialState,\n action: HealthInfoActionTypes\n): HealthInfoState {\n switch (action.type) {\n case HEALTH_INFO_MESSAGE_RECEIVED:\n return {\n ...state,\n message: action.message,\n };\n case HEALTH_INFO_RESET_MESSAGE:\n return {\n ...state,\n message: {} as HealthInfoMessage,\n };\n default:\n return state;\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 {\n WATCH_MESSAGE_RECEIVED,\n WATCH_RESET_MESSAGES,\n WatchActionTypes,\n} from \"./actions\";\nimport { EventInfo } from \"./types\";\n\nexport interface WatchState {\n messages: EventInfo[];\n}\n\nconst initialState: WatchState = {\n messages: [],\n};\n\nexport function watchReducer(\n state = initialState,\n action: WatchActionTypes\n): WatchState {\n switch (action.type) {\n case WATCH_MESSAGE_RECEIVED:\n return {\n ...state,\n messages: [...state.messages, action.message],\n };\n case WATCH_RESET_MESSAGES:\n return {\n ...state,\n messages: [],\n };\n default:\n return state;\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 { ISessionResponse } from \"./types\";\nimport { SessionActionTypes, SESSION_RESPONSE } from \"./actions\";\n\nexport interface ConsoleState {\n session: ISessionResponse;\n}\n\nconst initialState: ConsoleState = {\n session: {\n operator: false,\n status: \"\",\n pages: [],\n features: [],\n },\n};\n\nexport function consoleReducer(\n state = initialState,\n action: SessionActionTypes\n): ConsoleState {\n switch (action.type) {\n case SESSION_RESPONSE:\n return {\n ...state,\n session: action.message,\n };\n default:\n return state;\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 {\n ADD_BUCKET_NAME,\n ADD_BUCKET_OPEN,\n ADD_BUCKET_QUOTA,\n ADD_BUCKET_QUOTA_SIZE,\n ADD_BUCKET_QUOTA_TYPE,\n ADD_BUCKET_QUOTA_UNIT,\n ADD_BUCKET_RESET,\n ADD_BUCKET_VERSIONED,\n ADD_BUCKET_RETENTION,\n ADD_BUCKET_RETENTION_MODE,\n ADD_BUCKET_RETENTION_UNIT,\n ADD_BUCKET_RETENTION_VALIDITY,\n BucketActionTypes,\n ADD_BUCKET_LOCKING,\n} from \"./actions\";\n\nexport interface BucketsState {\n open: boolean;\n addBucketName: string;\n addBucketVersioningEnabled: boolean;\n addBucketLockingEnabled: boolean;\n addBucketQuotaEnabled: boolean;\n addBucketQuotaType: string;\n addBucketQuotaSize: string;\n addBucketQuotaUnit: string;\n addBucketRetentionEnabled: boolean;\n addBucketRetentionMode: string;\n addBucketRetentionUnit: string;\n addBucketRetentionValidity: number;\n}\n\nconst initialState: BucketsState = {\n open: false,\n addBucketName: \"\",\n addBucketVersioningEnabled: false,\n addBucketLockingEnabled: false,\n addBucketQuotaEnabled: false,\n addBucketQuotaType: \"hard\",\n addBucketQuotaSize: \"1\",\n addBucketQuotaUnit: \"TiB\",\n addBucketRetentionEnabled: false,\n addBucketRetentionMode: \"compliance\",\n addBucketRetentionUnit: \"days\",\n addBucketRetentionValidity: 1,\n};\n\nexport function bucketsReducer(\n state = initialState,\n action: BucketActionTypes\n): BucketsState {\n switch (action.type) {\n case ADD_BUCKET_OPEN:\n return {\n ...state,\n open: action.open,\n };\n case ADD_BUCKET_NAME:\n return {\n ...state,\n addBucketName: action.name,\n };\n case ADD_BUCKET_VERSIONED:\n return {\n ...state,\n addBucketVersioningEnabled: action.versioned,\n };\n case ADD_BUCKET_LOCKING:\n return {\n ...state,\n addBucketLockingEnabled: action.locking,\n };\n case ADD_BUCKET_QUOTA:\n return {\n ...state,\n addBucketQuotaEnabled: action.quota,\n };\n case ADD_BUCKET_QUOTA_TYPE:\n return {\n ...state,\n addBucketQuotaType: action.quotaType,\n };\n case ADD_BUCKET_QUOTA_SIZE:\n return {\n ...state,\n addBucketQuotaSize: action.quotaSize,\n };\n case ADD_BUCKET_QUOTA_UNIT:\n return {\n ...state,\n addBucketQuotaUnit: action.quotaUnit,\n };\n case ADD_BUCKET_RETENTION:\n return {\n ...state,\n addBucketRetentionEnabled: action.retention,\n };\n case ADD_BUCKET_RETENTION_MODE:\n return {\n ...state,\n addBucketRetentionMode: action.retentionMode,\n };\n case ADD_BUCKET_RETENTION_UNIT:\n return {\n ...state,\n addBucketRetentionUnit: action.retentionUnit,\n };\n case ADD_BUCKET_RETENTION_VALIDITY:\n return {\n ...state,\n addBucketRetentionValidity: action.retentionValidity,\n };\n\n case ADD_BUCKET_RESET:\n return {\n ...state,\n addBucketName: \"\",\n addBucketVersioningEnabled: false,\n addBucketLockingEnabled: false,\n addBucketQuotaEnabled: false,\n addBucketQuotaType: \"hard\",\n addBucketQuotaSize: \"1\",\n addBucketQuotaUnit: \"TiB\",\n addBucketRetentionEnabled: false,\n addBucketRetentionMode: \"compliance\",\n addBucketRetentionUnit: \"days\",\n addBucketRetentionValidity: 1,\n };\n default:\n return state;\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 .\nimport history from \"../../../history\";\n\nimport {\n OBJECT_BROWSER_ADD_ROUTE,\n OBJECT_BROWSER_CREATE_FOLDER,\n OBJECT_BROWSER_REMOVE_ROUTE_LEVEL,\n OBJECT_BROWSER_RESET_ROUTES_LIST,\n OBJECT_BROWSER_SET_ALL_ROUTES,\n OBJECT_BROWSER_SET_LAST_AS_FILE,\n OBJECT_BROWSER_DOWNLOAD_FILE_LOADER,\n OBJECT_BROWSER_DOWNLOADED_FILE,\n ObjectBrowserActionTypes,\n} from \"./actions\";\n\nexport interface Route {\n route: string;\n label: string;\n type: string;\n}\n\nexport interface ObjectBrowserState {\n routesList: Route[];\n downloadingFiles: string[];\n}\n\nexport interface ObjectBrowserReducer {\n objectBrowser: ObjectBrowserState;\n}\n\nconst initialRoute = [\n { route: \"/object-browser\", label: \"All Buckets\", type: \"path\" },\n];\n\nconst initialState: ObjectBrowserState = {\n routesList: initialRoute,\n downloadingFiles: [],\n};\n\nexport function objectBrowserReducer(\n state = initialState,\n action: ObjectBrowserActionTypes\n): ObjectBrowserState {\n switch (action.type) {\n case OBJECT_BROWSER_ADD_ROUTE:\n const newRouteList = [\n ...state.routesList,\n { route: action.route, label: action.label, type: action.routeType },\n ];\n history.push(action.route);\n\n return { ...state, routesList: newRouteList };\n case OBJECT_BROWSER_RESET_ROUTES_LIST:\n return {\n ...state,\n routesList: [...initialRoute],\n };\n case OBJECT_BROWSER_REMOVE_ROUTE_LEVEL:\n const indexOfTopPath =\n state.routesList.findIndex(\n (element) => element.route === action.toRoute\n ) + 1;\n const newRouteLevels = state.routesList.slice(0, indexOfTopPath);\n\n return {\n ...state,\n routesList: newRouteLevels,\n };\n case OBJECT_BROWSER_SET_ALL_ROUTES:\n const splitRoutes = action.currentRoute.split(\"/\");\n const routesArray: Route[] = [];\n let initRoute = initialRoute[0].route;\n\n splitRoutes.forEach((route) => {\n if (route !== \"\" && route !== \"object-browser\") {\n initRoute = `${initRoute}/${route}`;\n\n routesArray.push({\n route: initRoute,\n label: route,\n type: \"path\",\n });\n }\n });\n\n const newSetOfRoutes = [...initialRoute, ...routesArray];\n\n return {\n ...state,\n routesList: newSetOfRoutes,\n };\n case OBJECT_BROWSER_CREATE_FOLDER:\n const newFoldersRoutes = [...state.routesList];\n let lastRoute = state.routesList[state.routesList.length - 1].route;\n\n const splitElements = action.newRoute.split(\"/\");\n\n splitElements.forEach((element) => {\n const folderTrim = element.trim();\n if (folderTrim !== \"\") {\n lastRoute = `${lastRoute}/${folderTrim}`;\n\n const newItem = { route: lastRoute, label: folderTrim, type: \"path\" };\n newFoldersRoutes.push(newItem);\n }\n });\n\n history.push(lastRoute);\n\n return {\n ...state,\n routesList: newFoldersRoutes,\n };\n case OBJECT_BROWSER_SET_LAST_AS_FILE:\n const currentList = state.routesList;\n const lastItem = currentList.slice(-1)[0];\n\n if (lastItem.type === \"path\") {\n lastItem.type = \"file\";\n }\n\n const newList = [...currentList.slice(0, -1), lastItem];\n\n return {\n ...state,\n routesList: newList,\n };\n case OBJECT_BROWSER_DOWNLOAD_FILE_LOADER:\n const actualFiles = [...state.downloadingFiles];\n\n actualFiles.push(action.path);\n\n return {\n ...state,\n downloadingFiles: [...actualFiles],\n };\n case OBJECT_BROWSER_DOWNLOADED_FILE:\n const downloadingFiles = state.downloadingFiles.filter(\n (item) => item !== action.path\n );\n\n return {\n ...state,\n downloadingFiles: [...downloadingFiles],\n };\n default:\n return state;\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 .\nimport has from \"lodash/has\";\nimport get from \"lodash/get\";\nimport {\n TenantsManagementTypes,\n ITenantState,\n ADD_TENANT_SET_CURRENT_PAGE,\n ADD_TENANT_SET_ADVANCED_MODE,\n ADD_TENANT_UPDATE_FIELD,\n ADD_TENANT_SET_PAGE_VALID,\n ADD_TENANT_SET_STORAGE_CLASSES_LIST,\n ADD_TENANT_ADD_MINIO_KEYPAIR,\n ADD_TENANT_DELETE_MINIO_KEYPAIR,\n ADD_TENANT_ADD_CA_KEYPAIR,\n ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR,\n ADD_TENANT_DELETE_CA_KEYPAIR,\n ADD_TENANT_ADD_CONSOLE_CERT,\n ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR,\n ADD_TENANT_ENCRYPTION_SERVER_CERT,\n ADD_TENANT_ENCRYPTION_CLIENT_CERT,\n ADD_TENANT_ENCRYPTION_VAULT_CERT,\n ADD_TENANT_ENCRYPTION_VAULT_CA,\n ADD_TENANT_ENCRYPTION_GEMALTO_CA,\n ADD_TENANT_RESET_FORM,\n} from \"./types\";\nimport { KeyPair } from \"./ListTenants/utils\";\nimport { getRandomString } from \"./utils\";\n\nconst initialState: ITenantState = {\n createTenant: {\n page: 0,\n validPages: [],\n advancedModeOn: false,\n storageClasses: [],\n limitSize: {},\n fields: {\n nameTenant: {\n tenantName: \"\",\n namespace: \"\",\n selectedStorageClass: \"\",\n },\n configure: {\n customImage: false,\n imageName: \"\",\n consoleImage: \"\",\n customDockerhub: false,\n imageRegistry: \"\",\n imageRegistryUsername: \"\",\n imageRegistryPassword: \"\",\n exposeMinIO: true,\n exposeConsole: true,\n logSearchCustom: false,\n prometheusCustom: false,\n logSearchVolumeSize: \"5\",\n logSearchSizeFactor: \"Gi\",\n logSearchImage: \"\",\n kesImage: \"\",\n logSearchPostgresImage: \"\",\n prometheusVolumeSize: \"5\",\n prometheusSizeFactor: \"Gi\",\n logSearchSelectedStorageClass: \"\",\n prometheusSelectedStorageClass: \"\",\n prometheusImage: \"\",\n },\n identityProvider: {\n idpSelection: \"Built-in\",\n accessKeys: [getRandomString(16)],\n secretKeys: [getRandomString(32)],\n openIDURL: \"\",\n openIDClientID: \"\",\n openIDSecretID: \"\",\n ADURL: \"\",\n ADSkipTLS: false,\n ADServerInsecure: false,\n ADUserNameFilter: \"\",\n ADGroupBaseDN: \"\",\n ADGroupSearchFilter: \"\",\n ADNameAttribute: \"\",\n },\n security: {\n enableAutoCert: true,\n enableCustomCerts: false,\n enableTLS: true,\n },\n encryption: {\n enableEncryption: false,\n encryptionType: \"vault\",\n gemaltoEndpoint: \"\",\n gemaltoToken: \"\",\n gemaltoDomain: \"\",\n gemaltoRetry: \"0\",\n awsEndpoint: \"\",\n awsRegion: \"\",\n awsKMSKey: \"\",\n awsAccessKey: \"\",\n awsSecretKey: \"\",\n awsToken: \"\",\n vaultEndpoint: \"\",\n vaultEngine: \"\",\n vaultNamespace: \"\",\n vaultPrefix: \"\",\n vaultAppRoleEngine: \"\",\n vaultId: \"\",\n vaultSecret: \"\",\n vaultRetry: \"0\",\n vaultPing: \"0\",\n gcpProjectID: \"\",\n gcpEndpoint: \"\",\n gcpClientEmail: \"\",\n gcpClientID: \"\",\n gcpPrivateKeyID: \"\",\n gcpPrivateKey: \"\",\n enableCustomCertsForKES: false,\n },\n tenantSize: {\n volumeSize: \"100\",\n sizeFactor: \"Gi\",\n drivesPerServer: \"1\",\n nodes: \"4\",\n memoryNode: \"2\",\n ecParity: \"\",\n ecParityChoices: [],\n cleanECChoices: [],\n maxAllocableMemo: 0,\n memorySize: {\n error: \"\",\n limit: 0,\n request: 0,\n },\n distribution: {\n error: \"\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n volumePerDisk: 0,\n },\n ecParityCalc: {\n error: 0,\n defaultEC: \"\",\n erasureCodeSet: 0,\n maxEC: \"\",\n rawCapacity: \"0\",\n storageFactors: [],\n },\n limitSize: {},\n },\n affinity: {\n nodeSelectorLabels: \"\",\n podAffinity: \"default\",\n withPodAntiAffinity: true,\n },\n },\n certificates: {\n minioCertificates: [\n {\n id: Date.now().toString(),\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n ],\n caCertificates: [\n {\n id: Date.now().toString(),\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n ],\n consoleCertificate: {\n id: \"console_cert_pair\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n serverCertificate: {\n id: \"encryptionServerCertificate\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n clientCertificate: {\n id: \"encryptionClientCertificate\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n vaultCertificate: {\n id: \"encryptionVaultCertificate\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n vaultCA: {\n id: \"encryptionVaultCA\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n gemaltoCA: {\n id: \"encryptionGemaltoCA\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n },\n },\n};\n\nexport function tenantsReducer(\n state = initialState,\n action: TenantsManagementTypes\n): ITenantState {\n let newState: ITenantState = { ...state };\n\n switch (action.type) {\n case ADD_TENANT_SET_CURRENT_PAGE:\n newState.createTenant.page = action.page;\n\n return { ...newState };\n case ADD_TENANT_SET_ADVANCED_MODE:\n newState.createTenant.advancedModeOn = action.state;\n\n return { ...newState };\n case ADD_TENANT_UPDATE_FIELD:\n if (\n has(newState.createTenant.fields, `${action.pageName}.${action.field}`)\n ) {\n const originPageNameItems = get(\n newState.createTenant.fields,\n `${action.pageName}`,\n {}\n );\n\n let newValue: typeof originPageNameItems = {};\n newValue[action.field] = action.value;\n\n const joinValue = { ...originPageNameItems, ...newValue };\n\n newState.createTenant.fields[action.pageName] = { ...joinValue };\n\n return { ...newState };\n }\n return state;\n case ADD_TENANT_SET_PAGE_VALID:\n let originValidPages = state.createTenant.validPages;\n\n if (action.valid) {\n if (!originValidPages.includes(action.pageName)) {\n originValidPages.push(action.pageName);\n\n newState.createTenant.validPages = [...originValidPages];\n }\n } else {\n const newSetOfPages = originValidPages.filter(\n (elm) => elm !== action.pageName\n );\n\n newState.createTenant.validPages = [...newSetOfPages];\n }\n\n return { ...newState };\n case ADD_TENANT_SET_STORAGE_CLASSES_LIST:\n const changeCL = {\n ...state,\n createTenant: {\n ...state.createTenant,\n storageClasses: action.storageClasses,\n },\n };\n return { ...changeCL };\n case ADD_TENANT_ADD_MINIO_KEYPAIR:\n const minioCerts = [\n ...state.createTenant.certificates.minioCertificates,\n {\n id: Date.now().toString(),\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n ];\n newState.createTenant.certificates.minioCertificates = [...minioCerts];\n return { ...newState };\n case ADD_TENANT_ADD_FILE_TO_MINIO_KEYPAIR:\n const minioCertificates =\n state.createTenant.certificates.minioCertificates;\n\n const NCertList = minioCertificates.map((item: KeyPair) => {\n if (item.id === action.id) {\n return {\n ...item,\n [action.key]: action.fileName,\n [`encoded_${action.key}`]: action.value,\n };\n }\n return item;\n });\n newState.createTenant.certificates.minioCertificates = [...NCertList];\n return { ...newState };\n case ADD_TENANT_DELETE_MINIO_KEYPAIR:\n const minioCertsList = state.createTenant.certificates.minioCertificates;\n\n if (minioCertsList.length > 1) {\n const cleanMinioCertsList = minioCertsList.filter(\n (item: KeyPair) => item.id !== action.id\n );\n newState.createTenant.certificates.minioCertificates = [\n ...cleanMinioCertsList,\n ];\n return { ...newState };\n }\n return { ...state };\n case ADD_TENANT_ADD_CA_KEYPAIR:\n const CACerts = [\n ...state.createTenant.certificates.caCertificates,\n {\n id: Date.now().toString(),\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n ];\n newState.createTenant.certificates.caCertificates = [...CACerts];\n return { ...newState };\n case ADD_TENANT_ADD_FILE_TO_CA_KEYPAIR:\n const caCertificates = state.createTenant.certificates.caCertificates;\n\n const NACList = caCertificates.map((item: KeyPair) => {\n if (item.id === action.id) {\n return {\n ...item,\n [action.key]: action.fileName,\n [`encoded_${action.key}`]: action.value,\n };\n }\n return item;\n });\n newState.createTenant.certificates.caCertificates = [...NACList];\n return { ...newState };\n case ADD_TENANT_DELETE_CA_KEYPAIR:\n const CACertsList = state.createTenant.certificates.minioCertificates;\n\n if (CACertsList.length > 1) {\n const cleanMinioCertsList = CACertsList.filter(\n (item: KeyPair) => item.id !== action.id\n );\n newState.createTenant.certificates.caCertificates = [\n ...cleanMinioCertsList,\n ];\n return { ...newState };\n }\n return { ...state };\n case ADD_TENANT_ADD_CONSOLE_CERT:\n const consoleCert = state.createTenant.certificates.consoleCertificate;\n\n newState.createTenant.certificates.consoleCertificate = {\n ...consoleCert,\n [action.key]: action.fileName,\n [`encoded_${action.key}`]: action.value,\n };\n\n return { ...newState };\n case ADD_TENANT_ENCRYPTION_SERVER_CERT:\n const encServerCert = state.createTenant.certificates.serverCertificate;\n\n newState.createTenant.certificates.serverCertificate = {\n ...encServerCert,\n [action.key]: action.fileName,\n [`encoded_${action.key}`]: action.value,\n };\n\n return { ...newState };\n case ADD_TENANT_ENCRYPTION_CLIENT_CERT:\n const encClientCert = state.createTenant.certificates.clientCertificate;\n\n newState.createTenant.certificates.clientCertificate = {\n ...encClientCert,\n [action.key]: action.fileName,\n [`encoded_${action.key}`]: action.value,\n };\n\n return { ...newState };\n case ADD_TENANT_ENCRYPTION_VAULT_CERT:\n const encVaultCert = state.createTenant.certificates.vaultCertificate;\n\n newState.createTenant.certificates.vaultCertificate = {\n ...encVaultCert,\n [action.key]: action.fileName,\n [`encoded_${action.key}`]: action.value,\n };\n\n return { ...newState };\n case ADD_TENANT_ENCRYPTION_VAULT_CA:\n const encVaultCA = state.createTenant.certificates.vaultCA;\n\n newState.createTenant.certificates.vaultCA = {\n ...encVaultCA,\n cert: action.fileName,\n encoded_cert: action.value,\n };\n\n return { ...newState };\n case ADD_TENANT_ENCRYPTION_GEMALTO_CA:\n const encGemaltoCA = state.createTenant.certificates.gemaltoCA;\n\n newState.createTenant.certificates.gemaltoCA = {\n ...encGemaltoCA,\n cert: action.fileName,\n encoded_cert: action.value,\n };\n\n return { ...newState };\n case ADD_TENANT_RESET_FORM:\n return {\n ...state,\n createTenant: {\n page: 0,\n validPages: [],\n advancedModeOn: false,\n storageClasses: [],\n limitSize: {},\n fields: {\n nameTenant: {\n tenantName: \"\",\n namespace: \"\",\n selectedStorageClass: \"\",\n },\n configure: {\n customImage: false,\n imageName: \"\",\n consoleImage: \"\",\n customDockerhub: false,\n imageRegistry: \"\",\n imageRegistryUsername: \"\",\n imageRegistryPassword: \"\",\n exposeMinIO: true,\n exposeConsole: true,\n logSearchCustom: false,\n prometheusCustom: false,\n logSearchVolumeSize: \"5\",\n logSearchSizeFactor: \"Gi\",\n logSearchSelectedStorageClass: \"\",\n logSearchImage: \"\",\n kesImage: \"\",\n logSearchPostgresImage: \"\",\n prometheusVolumeSize: \"5\",\n prometheusSizeFactor: \"Gi\",\n prometheusSelectedStorageClass: \"\",\n prometheusImage: \"\",\n },\n identityProvider: {\n idpSelection: \"Built-in\",\n accessKeys: [getRandomString(16)],\n secretKeys: [getRandomString(32)],\n openIDURL: \"\",\n openIDClientID: \"\",\n openIDSecretID: \"\",\n ADURL: \"\",\n ADSkipTLS: false,\n ADServerInsecure: false,\n ADUserNameFilter: \"\",\n ADGroupBaseDN: \"\",\n ADGroupSearchFilter: \"\",\n ADNameAttribute: \"\",\n },\n security: {\n enableAutoCert: true,\n enableCustomCerts: false,\n enableTLS: true,\n },\n encryption: {\n enableEncryption: false,\n encryptionType: \"vault\",\n gemaltoEndpoint: \"\",\n gemaltoToken: \"\",\n gemaltoDomain: \"\",\n gemaltoRetry: \"0\",\n awsEndpoint: \"\",\n awsRegion: \"\",\n awsKMSKey: \"\",\n awsAccessKey: \"\",\n awsSecretKey: \"\",\n awsToken: \"\",\n vaultEndpoint: \"\",\n vaultEngine: \"\",\n vaultNamespace: \"\",\n vaultPrefix: \"\",\n vaultAppRoleEngine: \"\",\n vaultId: \"\",\n vaultSecret: \"\",\n vaultRetry: \"0\",\n vaultPing: \"0\",\n gcpProjectID: \"\",\n gcpEndpoint: \"\",\n gcpClientEmail: \"\",\n gcpClientID: \"\",\n gcpPrivateKeyID: \"\",\n gcpPrivateKey: \"\",\n enableCustomCertsForKES: false,\n },\n tenantSize: {\n volumeSize: \"100\",\n sizeFactor: \"Gi\",\n drivesPerServer: \"1\",\n nodes: \"4\",\n memoryNode: \"2\",\n ecParity: \"\",\n ecParityChoices: [],\n cleanECChoices: [],\n maxAllocableMemo: 0,\n memorySize: {\n error: \"\",\n limit: 0,\n request: 0,\n },\n distribution: {\n error: \"\",\n nodes: 0,\n persistentVolumes: 0,\n disks: 0,\n volumePerDisk: 0,\n },\n ecParityCalc: {\n error: 0,\n defaultEC: \"\",\n erasureCodeSet: 0,\n maxEC: \"\",\n rawCapacity: \"0\",\n storageFactors: [],\n },\n limitSize: {},\n },\n affinity: {\n nodeSelectorLabels: \"\",\n podAffinity: \"default\",\n withPodAntiAffinity: true,\n },\n },\n certificates: {\n minioCertificates: [\n {\n id: Date.now().toString(),\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n ],\n caCertificates: [\n {\n id: Date.now().toString(),\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n ],\n consoleCertificate: {\n id: \"console_cert_pair\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n serverCertificate: {\n id: \"encryptionServerCertificate\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n clientCertificate: {\n id: \"encryptionClientCertificate\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n vaultCertificate: {\n id: \"encryptionVaultCertificate\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n vaultCA: {\n id: \"encryptionVaultCA\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n gemaltoCA: {\n id: \"encryptionGemaltoCA\",\n key: \"\",\n cert: \"\",\n encoded_key: \"\",\n encoded_cert: \"\",\n },\n },\n },\n };\n default:\n return state;\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 {\n DirectCSITypes,\n DIRECT_CSI_SELECT_DRIVE,\n IDirectCSIState,\n} from \"./types\";\n\nconst initialState: IDirectCSIState = {\n selectedDrive: \"\",\n};\n\nexport function directCSIReducer(\n state = initialState,\n action: DirectCSITypes\n): IDirectCSIState {\n switch (action.type) {\n case DIRECT_CSI_SELECT_DRIVE:\n if (action.driveName !== \"\") {\n const newState = { ...state };\n newState.selectedDrive = action.driveName;\n return newState;\n }\n return state;\n default:\n return state;\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 { applyMiddleware, combineReducers, compose, createStore } from \"redux\";\nimport thunk from \"redux-thunk\";\nimport { systemReducer } from \"./reducer\";\nimport { traceReducer } from \"./screens/Console/Trace/reducers\";\nimport { logReducer } from \"./screens/Console/Logs/reducers\";\nimport { healthInfoReducer } from \"./screens/Console/HealthInfo/reducers\";\nimport { watchReducer } from \"./screens/Console/Watch/reducers\";\nimport { consoleReducer } from \"./screens/Console/reducer\";\nimport { bucketsReducer } from \"./screens/Console/Buckets/reducers\";\nimport { objectBrowserReducer } from \"./screens/Console/ObjectBrowser/reducers\";\nimport { tenantsReducer } from \"./screens/Console/Tenants/reducer\";\nimport { directCSIReducer } from \"./screens/Console/DirectCSI/reducer\";\n\nconst globalReducer = combineReducers({\n system: systemReducer,\n trace: traceReducer,\n logs: logReducer,\n watch: watchReducer,\n console: consoleReducer,\n buckets: bucketsReducer,\n objectBrowser: objectBrowserReducer,\n healthInfo: healthInfoReducer,\n tenants: tenantsReducer,\n directCSI: directCSIReducer,\n});\n\ndeclare global {\n interface Window {\n __REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: typeof compose;\n }\n}\n\nconst composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n\nexport type AppState = ReturnType;\n\nexport default function configureStore() {\n return createStore(globalReducer, composeEnhancers(applyMiddleware(thunk)));\n}\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === \"localhost\" ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === \"[::1]\" ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === \"production\" && \"serviceWorker\" in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n (process as { env: { [key: string]: string } }).env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener(\"load\", () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n \"This web app is being served cache-first by a service \" +\n \"worker. To learn more, visit https://bit.ly/CRA-PWA\"\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === \"installed\") {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n \"New content is available and will be used when all \" +\n \"tabs for this page are closed. See https://bit.ly/CRA-PWA.\"\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log(\"Content is cached for offline use.\");\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error(\"Error during service worker registration:\", error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get(\"content-type\");\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf(\"javascript\") === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n \"No internet connection found. App is running in offline mode.\"\n );\n });\n}\n\nexport function unregister() {\n if (\"serviceWorker\" in navigator) {\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister();\n });\n }\n}\n","import { createMuiTheme } from \"@material-ui/core\";\n\nconst theme = createMuiTheme({\n palette: {\n primary: {\n light: \"#073052\",\n main: \"#081C42\",\n dark: \"#05122B\",\n contrastText: \"#fff\",\n },\n secondary: {\n light: \"#ff7961\",\n main: \"#f44336\",\n dark: \"#ba000d\",\n contrastText: \"#000\",\n },\n error: {\n light: \"#e03a48\",\n main: \"#dc1f2e\",\n contrastText: \"#ffffff\",\n },\n grey: {\n 100: \"#f0f0f0\",\n 200: \"#e6e6e6\",\n 300: \"#cccccc\",\n 400: \"#999999\",\n 500: \"#8c8c8c\",\n 600: \"#737373\",\n 700: \"#666666\",\n 800: \"#4d4d4d\",\n 900: \"#333333\",\n },\n background: {\n default: \"#F4F4F4\",\n },\n },\n typography: {\n fontFamily: [\"Lato\", \"sans-serif\"].join(\",\"),\n h1: {\n fontWeight: \"bold\",\n color: \"#081C42\",\n },\n h2: {\n fontWeight: \"bold\",\n color: \"#081C42\",\n },\n h3: {\n fontWeight: \"bold\",\n color: \"#081C42\",\n },\n h4: {\n fontWeight: \"bold\",\n color: \"#081C42\",\n },\n h5: {\n fontWeight: \"bold\",\n color: \"#081C42\",\n },\n h6: {\n fontWeight: \"bold\",\n color: \"#000000\",\n },\n },\n overrides: {\n MuiButton: {\n root: {\n borderRadius: 3,\n color: \"white\",\n height: 40,\n padding: \"0 20px\",\n fontSize: 14,\n fontWeight: 600,\n boxShadow: \"none\",\n \"& .MuiSvgIcon-root\": {\n maxHeight: 18,\n },\n \"&.MuiButton-contained.Mui-disabled\": {\n backgroundColor: \"#EAEDEE\",\n fontWeight: 600,\n color: \"#767676\",\n },\n \"& .MuiButton-iconSizeMedium > *:first-child\": {\n fontSize: 12,\n },\n },\n },\n },\n});\n\nexport default theme;\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 from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport Routes from \"./Routes\";\nimport configureStore from \"./store\";\nimport * as serviceWorker from \"./serviceWorker\";\nimport { ThemeProvider, withStyles } from \"@material-ui/core/styles\";\nimport \"react-virtualized/styles.css\";\nimport \"react-grid-layout/css/styles.css\";\nimport \"react-resizable/css/styles.css\";\n\nimport \"./index.css\";\nimport theme from \"./theme/main\";\n\nconst GlobalCss = withStyles({\n // @global is handled by jss-plugin-global.\n \"@global\": {\n // You should target [class*=\"MuiButton-root\"] instead if you nest themes.\n \".MuiButton-contained\": {\n fontSize: \"14px\",\n textTransform: \"capitalize\",\n padding: \"16px 25px 16px 25px\",\n borderRadius: 3,\n },\n \".MuiButton-sizeSmall\": {\n padding: \"4px 10px\",\n fontSize: \"0.8125rem\",\n },\n \".MuiTableCell-head\": {\n borderRadius: \"3px 3px 0px 0px\",\n fontSize: 13,\n },\n \".MuiPaper-root\": {\n borderRadius: 3,\n },\n \".MuiDrawer-paperAnchorDockedLeft\": {\n borderRight: 0,\n },\n \".MuiDrawer-root\": {\n \"& .MuiPaper-root\": {\n borderRadius: 0,\n },\n },\n },\n})(() => null);\n\nReactDOM.render(\n \n \n \n {/**/}\n \n \n ,\n document.getElementById(\"root\")\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/portal-ui/src/screens/Console/Tenants/AddTenant/Steps/Configure.tsx b/portal-ui/src/screens/Console/Tenants/AddTenant/Steps/Configure.tsx index 66c5aec609..8ed5dca39a 100644 --- a/portal-ui/src/screens/Console/Tenants/AddTenant/Steps/Configure.tsx +++ b/portal-ui/src/screens/Console/Tenants/AddTenant/Steps/Configure.tsx @@ -332,7 +332,7 @@ const Configure = ({ label="Console's Image" value={consoleImage} error={validationErrors["consoleImage"] || ""} - placeholder="E.g. minio/console:v0.7.1" + placeholder="E.g. minio/console:v0.7.2" /> diff --git a/restapi/admin_tenants_test.go b/restapi/admin_tenants_test.go index c9005089c9..c7a65a5aa7 100644 --- a/restapi/admin_tenants_test.go +++ b/restapi/admin_tenants_test.go @@ -1028,7 +1028,7 @@ func Test_UpdateTenantAction(t *testing.T) { }, params: admin_api.UpdateTenantParams{ Body: &models.UpdateTenantRequest{ - ConsoleImage: "minio/console:v0.7.1", + ConsoleImage: "minio/console:v0.7.2", }, }, }, diff --git a/restapi/consts.go b/restapi/consts.go index 206e5d7886..535d0dafc0 100644 --- a/restapi/consts.go +++ b/restapi/consts.go @@ -63,7 +63,7 @@ const ( // Image versions const ( KESImageVersion = "minio/kes:v0.13.4" - ConsoleImageDefaultVersion = "minio/console:v0.7.1" + ConsoleImageDefaultVersion = "minio/console:v0.7.2" ) // K8s