Files
object-browser/portal-ui/build/static/js/1030.9d4efe7b.chunk.js
Daniel Valdivia fbed90224f Release v0.17.0 (#2014)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-05-19 01:07:54 -07:00

2 lines
27 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1030],{81806:function(e,n,t){var i=t(1413),a=t(45987),o=(t(72791),t(11135)),l=t(25787),r=t(80184),s=["classes","children"];n.Z=(0,l.Z)((function(e){return(0,o.Z)({root:{padding:0,margin:0,border:0,backgroundColor:"transparent",textDecoration:"underline",cursor:"pointer",fontSize:"inherit",color:e.palette.info.main,fontFamily:"Lato, sans-serif"}})}))((function(e){var n=e.classes,t=e.children,o=(0,a.Z)(e,s);return(0,r.jsx)("button",(0,i.Z)((0,i.Z)({},o),{},{className:n.root,children:t}))}))},56028:function(e,n,t){var i=t(29439),a=t(1413),o=t(72791),l=t(60364),r=t(13400),s=t(55646),c=t(5574),d=t(65661),u=t(39157),m=t(11135),v=t(25787),p=t(23814),h=t(29823),f=t(28057),g=t(87995),x=t(80184);n.Z=(0,v.Z)((function(e){return(0,m.Z)((0,a.Z)((0,a.Z)({},p.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},p.sN))}))((function(e){var n=e.onClose,t=e.modalOpen,m=e.title,v=e.children,p=e.classes,Z=e.wideLimit,j=void 0===Z||Z,b=e.noContentPadding,y=e.titleIcon,S=void 0===y?null:y,w=(0,l.I0)(),k=(0,o.useState)(!1),P=(0,i.Z)(k,2),C=P[0],R=P[1],I=(0,l.v9)((function(e){return e.system.modalSnackBar}));(0,o.useEffect)((function(){w((0,g.MK)(""))}),[w]),(0,o.useEffect)((function(){if(I){if(""===I.message)return void R(!1);"error"!==I.type&&R(!0)}}),[I]);var N=j?{classes:{paper:p.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},D="";return I&&(D=I.detailedErrorMsg,(""===I.detailedErrorMsg||I.detailedErrorMsg.length<5)&&(D=I.message)),(0,x.jsxs)(c.Z,(0,a.Z)((0,a.Z)({open:t,classes:p},N),{},{scroll:"paper",onClose:function(e,t){"backdropClick"!==t&&n()},className:p.root,children:[(0,x.jsxs)(d.Z,{className:p.title,children:[(0,x.jsxs)("div",{className:p.titleText,children:[S," ",m]}),(0,x.jsx)("div",{className:p.closeContainer,children:(0,x.jsx)(r.Z,{"aria-label":"close",id:"close",className:p.closeButton,onClick:n,disableRipple:!0,size:"small",children:(0,x.jsx)(h.Z,{})})})]}),(0,x.jsx)(f.Z,{isModal:!0}),(0,x.jsx)(s.Z,{open:C,className:p.snackBarModal,onClose:function(){R(!1),w((0,g.MK)(""))},message:D,ContentProps:{className:"".concat(p.snackBar," ").concat(I&&"error"===I.type?p.errorSnackBar:"")},autoHideDuration:I&&"error"===I.type?1e4:5e3}),(0,x.jsx)(u.Z,{className:b?"":p.content,children:v})]}))}))},45902:function(e,n,t){var i=t(1413),a=(t(72791),t(53767)),o=t(80184);n.Z=function(e){var n=e.label,t=void 0===n?null:n,l=e.value,r=void 0===l?"-":l,s=e.orientation,c=void 0===s?"column":s,d=e.stkProps,u=void 0===d?{}:d,m=e.lblProps,v=void 0===m?{}:m,p=e.valProps,h=void 0===p?{}:p;return(0,o.jsxs)(a.Z,(0,i.Z)((0,i.Z)({direction:{xs:"column",sm:c}},u),{},{children:[(0,o.jsx)("label",(0,i.Z)((0,i.Z)({style:{marginRight:5,fontWeight:600}},v),{},{children:t})),(0,o.jsx)("label",(0,i.Z)((0,i.Z)({style:{marginRight:5,fontWeight:500}},h),{},{children:r}))]}))}},74815:function(e,n,t){t.d(n,{Z:function(){return u}});var i=t(93433),a=(t(72791),t(73909)),o=t(21041),l=t(41048),r=t(45248),s=t(62410),c=t(80184),d=function(e){var n=e.totalValue,t=e.sizeItems,i=e.bgColor,a=void 0===i?"#ededed":i;return(0,c.jsx)("div",{style:{width:"100%",height:12,backgroundColor:a,borderRadius:30,display:"flex",transitionDuration:"0.3s",overflow:"hidden"},children:t.map((function(e,t){var i=100*e.value/n;return(0,c.jsx)("div",{style:{width:"".concat(i,"%"),height:"100%",backgroundColor:e.color,transitionDuration:"0.3s"}},"itemSize-".concat(t.toString()))}))})},u=function(e){var n=e.totalCapacity,t=e.usedSpaceVariants,u=e.statusClass,m=e.render,v=void 0===m?"pie":m,p=["#8dacd3","#bca1ea","#92e8d2","#efc9ac","#97f274","#f7d291","#71ACCB","#f28282","#e28cc1","#2781B0"],h="#ededed",f=t.reduce((function(e,n){return e+n.value}),0),g=n-f,x=[],Z=t.find((function(e){return"STANDARD"===e.variant}))||{value:0,variant:"empty"};t.length>10?x=[{value:f-Z.value,color:"#2781B0",label:"Total Tiers Space"}]:x=t.filter((function(e){return"STANDARD"!==e.variant})).map((function(e,n){return{value:e.value,color:p[n],label:"Tier - ".concat(e.variant)}}));var j="#07193E",b=100*Z.value/n;b>=90?j="#C83B51":b>=75&&(j="#FFAB0F");var y=[{value:Z.value,color:j,label:"Used Space by Tenant"}].concat((0,i.Z)(x),[{value:g,color:"bar"===v?h:"transparent",label:"Empty Space"}]);if("bar"===v){var S=y.map((function(e){return{value:e.value,color:e.color,itemName:e.label}}));return(0,c.jsx)("div",{style:{width:"100%",marginBottom:15},children:(0,c.jsx)(d,{totalValue:n,sizeItems:S,bgColor:h})})}return(0,c.jsxs)("div",{style:{position:"relative",width:110,height:110},children:[(0,c.jsx)("div",{style:{position:"absolute",right:-5,top:15,zIndex:400},className:u,children:(0,c.jsx)(s.J$M,{style:{border:"#fff 2px solid",borderRadius:"100%",width:20,height:20}})}),(0,c.jsx)("span",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",fontWeight:"bold",color:"#000",fontSize:12},children:isNaN(f)?"N/A":(0,r.l5)(f)}),(0,c.jsx)("div",{children:(0,c.jsxs)(a.u,{width:110,height:110,children:[(0,c.jsx)(o.b,{data:[{value:100}],cx:"50%",cy:"50%",dataKey:"value",outerRadius:50,innerRadius:40,fill:h,isAnimationActive:!1,stroke:"none"}),(0,c.jsx)(o.b,{data:y,cx:"50%",cy:"50%",dataKey:"value",outerRadius:50,innerRadius:40,children:y.map((function(e,n){return(0,c.jsx)(l.b,{fill:e.color,stroke:"none"},"cellCapacity-".concat(n))}))})]})})]})}},21353:function(e,n,t){t.r(n),t.d(n,{default:function(){return V}});var i=t(29439),a=t(1413),o=t(72791),l=t(60364),r=t(26181),s=t.n(r),c=t(11135),d=t(25787),u=t(23814),m=t(61889),v=t(64554),p=t(36151),h=t(56028),f=t(21435),g=t(37516),x=t(81207),Z=t(87995),j=t(80184),b=(0,d.Z)((function(e){return(0,c.Z)((0,a.Z)((0,a.Z)({infoText:{fontSize:14}},u.DF),u.ID))}))((function(e){var n=e.open,t=e.closeModalAndRefresh,r=e.namespace,s=e.idTenant,c=e.classes,d=(0,l.I0)(),u=(0,o.useState)(!1),v=(0,i.Z)(u,2),b=v[0],y=v[1],S=(0,o.useState)(""),w=(0,i.Z)(S,2),k=w[0],P=w[1],C=(0,o.useState)(!1),R=(0,i.Z)(C,2),I=R[0],N=R[1],D=(0,o.useState)(""),A=(0,i.Z)(D,2),E=A[0],F=A[1],_=(0,o.useState)(""),z=(0,i.Z)(_,2),B=z[0],M=z[1],W=(0,o.useState)(""),U=(0,i.Z)(W,2),T=U[0],O=U[1],L=(0,o.useState)(!0),$=(0,i.Z)(L,2),V=$[0],K=$[1],G=(0,o.useCallback)((function(e){var n=new RegExp("^$|^((.*?)/(.*?):(.+))$");if("minioImage"===e)K(n.test(k))}),[k]);(0,o.useEffect)((function(){G("minioImage")}),[k,G]);return(0,j.jsx)(h.Z,{title:"Update MinIO Version",modalOpen:n,onClose:function(){t(!1)},children:(0,j.jsxs)(m.ZP,{container:!0,children:[(0,j.jsxs)(m.ZP,{item:!0,xs:12,className:c.modalFormScrollable,children:[(0,j.jsx)("div",{className:c.infoText,children:"Please enter the MinIO image from dockerhub to use. If blank, then latest build will be used."}),(0,j.jsx)("br",{}),(0,j.jsx)("br",{}),(0,j.jsx)(m.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,j.jsx)(f.Z,{value:k,label:"MinIO's Image",id:"minioImage",name:"minioImage",placeholder:"E.g. minio/minio:RELEASE.2022-02-26T02-54-46Z",onChange:function(e){P(e.target.value)}})}),(0,j.jsx)(m.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,j.jsx)(g.Z,{value:"imageRegistry",id:"setImageRegistry",name:"setImageRegistry",checked:I,onChange:function(e){N(!I)},label:"Set Custom Image Registry",indicatorLabels:["Yes","No"]})}),I&&(0,j.jsxs)(o.Fragment,{children:[(0,j.jsx)(m.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,j.jsx)(f.Z,{value:E,label:"Endpoint",id:"imageRegistry",name:"imageRegistry",placeholder:"E.g. https://index.docker.io/v1/",onChange:function(e){F(e.target.value)}})}),(0,j.jsx)(m.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,j.jsx)(f.Z,{value:B,label:"Username",id:"imageRegistryUsername",name:"imageRegistryUsername",placeholder:"Enter image registry username",onChange:function(e){M(e.target.value)}})}),(0,j.jsx)(m.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,j.jsx)(f.Z,{value:T,label:"Password",id:"imageRegistryPassword",name:"imageRegistryPassword",placeholder:"Enter image registry password",onChange:function(e){O(e.target.value)}})})]})]}),(0,j.jsxs)(m.ZP,{item:!0,xs:12,className:c.modalButtonBar,children:[(0,j.jsx)(p.Z,{type:"button",color:"primary",variant:"outlined",onClick:function(){P(""),N(!1),F(""),M(""),O("")},children:"Clear"}),(0,j.jsx)(p.Z,{type:"submit",variant:"contained",color:"primary",disabled:!V||I&&(""===E.trim()||""===B.trim()||""===T.trim())||b,onClick:function(){y(!0);var e={image:k,enable_prometheus:!0};if(I){var n={image_registry:{registry:E,username:B,password:T}};e=(0,a.Z)((0,a.Z)({},e),n)}x.Z.invoke("PUT","/api/v1/namespaces/".concat(r,"/tenants/").concat(s),e).then((function(){y(!1),t(!0)})).catch((function(e){d((0,Z.zb)(e)),y(!1)}))},children:"Save"})]})]})})})),y=t(81806),S=t(40986),w=t(53767),k=t(62410),P=t(45248),C=t(72401),R=t(74815),I=t(22512),N=t(45902),D=((0,d.Z)((function(e){return{root:{height:10,borderRadius:5},colorPrimary:{backgroundColor:"#F4F4F4"},bar:{borderRadius:5,backgroundColor:"#081C42"},padChart:{padding:"5px"}}}))(S.Z),(0,d.Z)((function(e){return(0,c.Z)({centerItem:{textAlign:"center"}})}))((function(e){var n,t,i,a,l,r,s=e.classes,c=e.tenant,d=e.healthStatus,u=e.loading,v=e.error,p={value:"n/a",unit:""},h={value:"n/a",unit:""},f={value:"n/a",unit:""},g={value:"n/a",unit:""},x={value:"n/a",unit:""};if(null!==(n=c.status)&&void 0!==n&&null!==(t=n.usage)&&void 0!==t&&t.raw){var Z=(0,P.ae)("".concat(c.status.usage.raw),!0).split(" ");p.value=Z[0],p.unit=Z[1]}if(null!==(i=c.status)&&void 0!==i&&null!==(a=i.usage)&&void 0!==a&&a.capacity){var b=(0,P.ae)("".concat(c.status.usage.capacity),!0).split(" ");h.value=b[0],h.unit=b[1]}if(null!==(l=c.status)&&void 0!==l&&null!==(r=l.usage)&&void 0!==r&&r.capacity_usage){var y=(0,P.l5)(c.status.usage.capacity_usage,!0).split(" ");f.value=y[0],f.unit=y[1]}var S=[];if(c.tiers&&0!==c.tiers.length){S=c.tiers.map((function(e){return{value:e.size,variant:e.name}}));var D=c.tiers.filter((function(e){return"internal"===e.type})).reduce((function(e,n){return e+n.size}),0),A=c.tiers.filter((function(e){return"internal"!==e.type})).reduce((function(e,n){return e+n.size}),0),E=(0,P.l5)(A,!0).split(" ");x.value=E[0],x.unit=E[1];var F=(0,P.l5)(D,!0).split(" ");g.value=F[0],g.unit=F[1]}else{var _,z;S=[{value:(null===(_=c.status)||void 0===_||null===(z=_.usage)||void 0===z?void 0:z.capacity_usage)||0,variant:"STANDARD"}]}return(0,j.jsxs)(o.Fragment,{children:[u&&(0,j.jsx)("div",{className:s.padChart,children:(0,j.jsx)(m.ZP,{item:!0,xs:12,className:s.centerItem,children:(0,j.jsx)(C.Z,{style:{width:40,height:40}})})}),function(){var e,n;return u?null:""!==v?(0,j.jsx)(I.Z,{errorMessage:v,withBreak:!1}):(0,j.jsxs)(m.ZP,{item:!0,xs:12,children:[(0,j.jsx)(R.Z,{totalCapacity:(null===(e=c.status)||void 0===e||null===(n=e.usage)||void 0===n?void 0:n.raw)||0,usedSpaceVariants:S,statusClass:"",render:"bar"}),(0,j.jsxs)(w.Z,{direction:{xs:"column",sm:"row"},spacing:{xs:1,sm:2,md:4},alignItems:"stretch",margin:"0 0 15px 0",children:[(!c.tiers||0===c.tiers.length)&&(0,j.jsx)(o.Fragment,{children:(0,j.jsx)(N.Z,{label:"Internal:",orientation:"row",value:"".concat(f.value," ").concat(f.unit)})}),c.tiers&&c.tiers.length>0&&(0,j.jsxs)(o.Fragment,{children:[(0,j.jsx)(N.Z,{label:"Internal:",orientation:"row",value:"".concat(g.value," ").concat(g.unit)}),(0,j.jsx)(N.Z,{label:"Tiered:",orientation:"row",value:"".concat(x.value," ").concat(x.unit)})]}),d&&(0,j.jsx)(N.Z,{orientation:"row",label:"Health:",value:(0,j.jsx)("span",{className:d,children:(0,j.jsx)(k.J$M,{})})})]})]})}()]})}))),A=t(50896),E=t(40603),F=t(93433),_=t(13400),z=t(42419),B=t(51979),M=(0,d.Z)((function(e){return(0,c.Z)((0,a.Z)((0,a.Z)({domainInline:{display:"flex",marginBottom:15},overlayAction:{marginLeft:10,display:"flex",alignItems:"center","& svg":{width:15,height:15},"& button":{background:"#EAEAEA"}}},u.DF),u.ID))}))((function(e){var n=e.open,t=e.closeModalAndRefresh,a=e.namespace,r=e.idTenant,s=e.domains,c=e.classes,d=(0,l.I0)(),u=(0,o.useState)(!1),v=(0,i.Z)(u,2),g=v[0],b=v[1],y=(0,o.useState)(""),S=(0,i.Z)(y,2),w=S[0],k=S[1],P=(0,o.useState)([""]),C=(0,i.Z)(P,2),R=C[0],I=C[1],N=(0,o.useState)(!0),D=(0,i.Z)(N,2),A=D[0],E=D[1],M=(0,o.useState)([!0]),W=(0,i.Z)(M,2),U=W[0],T=W[1];(0,o.useEffect)((function(){if(s){var e=s.console||"";if(k(e),""!==e){var n=new RegExp(/((http|https):\/\/)+[a-zA-Z0-9\-.]{3,}\.[a-zA-Z]{2,}(\.[a-zA-Z]{2,})?(:[1-9]{1}([0-9]{1,4})?)?(\/[a-zA-Z0-9]{1,})*?$/);E(n.test(e))}else E(!0);if(s.minio&&s.minio.length>0){I(s.minio);var t=new RegExp(/((http|https):\/\/)+[a-zA-Z0-9\-.]{3,}\.[a-zA-Z]{2,}(\.[a-zA-Z]{2,})?$/),i=s.minio.map((function(e){return""===e.trim()||t.test(e)}));T(i)}}}),[s]);var O=function(){var e=(0,F.Z)(R),n=(0,F.Z)(U);e.push(""),n.push(!0),I(e),T(n)};return(0,j.jsx)(h.Z,{title:"Edit Tenant Domains - ".concat(r),modalOpen:n,onClose:function(){t(!1)},children:(0,j.jsx)(m.ZP,{container:!0,children:(0,j.jsxs)(m.ZP,{item:!0,xs:12,className:c.modalFormScrollable,children:[(0,j.jsxs)(m.ZP,{item:!0,xs:12,className:"".concat(c.configSectionItem),children:[(0,j.jsx)("div",{className:c.containerItem,children:(0,j.jsx)(f.Z,{id:"console_domain",name:"console_domain",onChange:function(e){k(e.target.value),E(e.target.validity.valid)},label:"Console Domain",value:w,placeholder:"Eg. http://subdomain.domain:port/subpath1/subpath2",pattern:"((http|https):\\/\\/)+[a-zA-Z0-9\\-.]{3,}\\.[a-zA-Z]{2,}(\\.[a-zA-Z]{2,})?(:[1-9]{1}([0-9]{1,4})?)?(\\/[a-zA-Z0-9]{1,})*?$",error:A?"":"Domain format is incorrect (http|https://subdomain.domain:port/subpath1/subpath2)"})}),(0,j.jsxs)("div",{children:[(0,j.jsx)("h4",{children:"MinIO Domains"}),(0,j.jsx)("div",{children:R.map((function(e,n){return(0,j.jsxs)("div",{className:"".concat(c.domainInline),children:[(0,j.jsx)(f.Z,{id:"minio-domain-".concat(n.toString()),name:"minio-domain-".concat(n.toString()),onChange:function(e){!function(e,n){var t=(0,F.Z)(R);t[n]=e,I(t)}(e.target.value,n),function(e,n){var t=(0,F.Z)(U);t[n]=e,T(t)}(e.target.validity.valid,n)},label:"MinIO Domain ".concat(n+1),value:e,placeholder:"Eg. http://subdomain.domain",pattern:"((http|https):\\/\\/)+[a-zA-Z0-9\\-.]{3,}\\.[a-zA-Z]{2,}(\\.[a-zA-Z]{2,})?$",error:U[n]?"":"MinIO domain format is incorrect (http|https://subdomain.domain)"}),(0,j.jsx)("div",{className:c.overlayAction,children:(0,j.jsx)(_.Z,{size:"small",onClick:O,disabled:n!==R.length-1,children:(0,j.jsx)(z.Z,{})})}),(0,j.jsx)("div",{className:c.overlayAction,children:(0,j.jsx)(_.Z,{size:"small",onClick:function(){return function(e){var n=R.filter((function(n,t){return t!==e})),t=U.filter((function(n,t){return t!==e}));I(n),T(t)}(n)},disabled:R.length<=1,children:(0,j.jsx)(B.Z,{})})})]},"minio-domain-key-".concat(n.toString()))}))})]})]}),(0,j.jsxs)(m.ZP,{item:!0,xs:12,className:c.modalButtonBar,children:[(0,j.jsx)(p.Z,{type:"button",color:"primary",variant:"outlined",onClick:function(){k(""),E(!0),I([""]),T([!0])},children:"Clear"}),(0,j.jsx)(p.Z,{type:"submit",variant:"contained",color:"primary",disabled:g||!A||U.filter((function(e){return!e})).length>0,onClick:function(){b(!0);var e={domains:{console:w,minio:R.filter((function(e){return""!==e.trim()}))}};x.Z.invoke("PUT","/api/v1/namespaces/".concat(a,"/tenants/").concat(r,"/domains"),e).then((function(){b(!1),t(!0)})).catch((function(e){d((0,Z.zb)(e)),b(!1)}))},children:"Save"})]})]})})})})),W=t(17238),U=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"red",n=arguments.length>1?arguments[1]:void 0;return"red"===e?n.redState:"yellow"===e?n.yellowState:"green"===e?n.greenState:n.greyState},T=function(e){var n,t=e.tenant,i=e.classes;return t?(0,j.jsx)(D,{tenant:t,label:"Storage",error:"",loading:!1,healthStatus:U(null===t||void 0===t||null===(n=t.status)||void 0===n?void 0:n.health_status,i)}):null},O=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,j.jsx)(g.Z,{indicatorLabels:["Enabled","Disabled"],checked:e,value:e,id:"".concat(n,"-status"),name:"".concat(n,"-status"),onChange:function(){},switchOnly:!0})},L={display:"flex",justifyContent:"space-between",marginTop:"10px","@media (max-width: 600px)":{flexFlow:"column"}},$={stkProps:{sx:{flex:1,marginRight:10,display:"flex",alignItems:"center",justifyContent:"space-between","@media (max-width: 900px)":{marginRight:"25px"}}},lblProps:{style:{minWidth:100}}},V=(0,d.Z)((function(e){return(0,c.Z)((0,a.Z)((0,a.Z)({},u.oZ),{},{redState:{color:e.palette.error.main,"& .min-icon":{width:16,height:16,marginRight:4}},yellowState:{color:e.palette.warning.main,"& .min-icon":{width:16,height:16,marginRight:4}},greenState:{color:e.palette.success.main,"& .min-icon":{width:16,height:16,marginRight:4}},greyState:{color:"grey","& .min-icon":{width:16,height:16,marginRight:4}},detailSection:{"& div":{"& b,i":{minWidth:80,display:"block",float:"left"},"& i":{fontStyle:"normal",wordWrap:"break-word",overflowWrap:"break-word"},"& div":{clear:"both"},clear:"both",marginBottom:2}},linkedSection:{color:e.palette.info.main,fontFamily:"'Lato', sans-serif"},autoGeneratedLink:{fontStyle:"italic"}},(0,u.Bz)(e.spacing(4))))}))((function(e){var n,t,r,c,d,u,p,h,f,g,x,Z,S,w,P,C,R,I,D,F,_,z,B,U,V=e.classes,K=e.match,G=(0,l.I0)(),H=(0,l.v9)((function(e){return e.tenants.tenantDetails.tenantInfo})),q=(0,l.v9)((function(e){return s()(e.tenants.tenantDetails.tenantInfo,"logEnabled",!1)})),J=(0,l.v9)((function(e){return s()(e.tenants.tenantDetails.tenantInfo,"monitoringEnabled",!1)})),Q=(0,l.v9)((function(e){return s()(e.tenants.tenantDetails.tenantInfo,"encryptionEnabled",!1)})),Y=(0,l.v9)((function(e){return s()(e.tenants.tenantDetails.tenantInfo,"minioTLS",!1)})),X=(0,l.v9)((function(e){return s()(e.tenants.tenantDetails.tenantInfo,"idpAdEnabled",!1)})),ee=(0,l.v9)((function(e){return s()(e.tenants.tenantDetails.tenantInfo,"idpOidcEnabled",!1)})),ne=(0,o.useState)(0),te=(0,i.Z)(ne,2),ie=te[0],ae=te[1],oe=(0,o.useState)(0),le=(0,i.Z)(oe,2),re=le[0],se=le[1],ce=(0,o.useState)(0),de=(0,i.Z)(ce,2),ue=de[0],me=de[1],ve=(0,o.useState)(!1),pe=(0,i.Z)(ve,2),he=pe[0],fe=pe[1],ge=(0,o.useState)(!1),xe=(0,i.Z)(ge,2),Ze=xe[0],je=xe[1],be=K.params.tenantName,ye=K.params.tenantNamespace;(0,o.useEffect)((function(){H&&(ae(H.pools.length),me(H.total_volumes||0),se(H.total_instances||0))}),[H]);return(0,j.jsxs)(o.Fragment,{children:[he&&(0,j.jsx)(b,{open:he,closeModalAndRefresh:function(){fe(!1)},idTenant:be,namespace:ye}),Ze&&(0,j.jsx)(M,{open:Ze,idTenant:be,namespace:ye,domains:(null===H||void 0===H?void 0:H.domains)||null,closeModalAndRefresh:function(e){je(!1),e&&G((0,W.V2)(!0))}}),(0,j.jsx)(A.Z,{separator:!1,children:"Details"}),(0,j.jsx)(T,{tenant:H,classes:V}),(0,j.jsxs)(m.ZP,{container:!0,children:[(0,j.jsxs)(m.ZP,{item:!0,xs:12,sm:12,md:8,children:[(0,j.jsx)(m.ZP,{item:!0,xs:12,children:(0,j.jsx)(N.Z,{label:"State:",value:null===H||void 0===H?void 0:H.currentState})}),(0,j.jsx)(m.ZP,{item:!0,xs:12,children:(0,j.jsx)(N.Z,{label:"MinIO:",value:(0,j.jsx)(y.Z,{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal",wordBreak:"break-all"},onClick:function(){fe(!0)},children:H?H.image:""})})}),(0,j.jsx)(m.ZP,{item:!0,xs:12,children:(0,j.jsxs)("h3",{children:["Domains",(0,j.jsx)(E.Z,{icon:(0,j.jsx)(k.dY8,{}),title:"",onClick:function(){je(!0)}})]})}),(0,j.jsx)(m.ZP,{item:!0,xs:12,children:(0,j.jsx)(N.Z,{label:"Console:",value:(0,j.jsxs)(o.Fragment,{children:[null!==H&&void 0!==H&&null!==(n=H.domains)&&void 0!==n&&n.console&&""!==(null===H||void 0===H||null===(t=H.domains)||void 0===t?void 0:t.console)||null!==H&&void 0!==H&&null!==(r=H.endpoints)&&void 0!==r&&r.console?"":"-",(null===H||void 0===H||null===(c=H.endpoints)||void 0===c?void 0:c.console)&&(0,j.jsxs)(o.Fragment,{children:[(0,j.jsx)("a",{href:null===H||void 0===H||null===(d=H.endpoints)||void 0===d?void 0:d.console,target:"_blank",rel:"noopener noreferrer",className:"".concat(V.linkedSection," ").concat(V.autoGeneratedLink),children:(null===H||void 0===H||null===(u=H.endpoints)||void 0===u?void 0:u.console)||"-"}),(0,j.jsx)("br",{})]}),(null===H||void 0===H||null===(p=H.domains)||void 0===p?void 0:p.console)&&""!==(null===H||void 0===H||null===(h=H.domains)||void 0===h?void 0:h.console)&&(0,j.jsx)("a",{href:(null===H||void 0===H||null===(f=H.domains)||void 0===f?void 0:f.console)||"",target:"_blank",rel:"noopener noreferrer",className:V.linkedSection,children:(null===H||void 0===H||null===(g=H.domains)||void 0===g?void 0:g.console)||""})]})})}),(0,j.jsx)(m.ZP,{item:!0,xs:12,children:(0,j.jsx)(N.Z,{label:"MinIO Endpoint".concat(null!==H&&void 0!==H&&null!==(x=H.endpoints)&&void 0!==x&&x.minio&&1===(null===H||void 0===H||null===(Z=H.endpoints)||void 0===Z?void 0:Z.minio.length)?"":"s",":"),value:(0,j.jsxs)(o.Fragment,{children:[null!==H&&void 0!==H&&null!==(S=H.domains)&&void 0!==S&&S.minio||null!==H&&void 0!==H&&null!==(w=H.endpoints)&&void 0!==w&&w.minio?"":"-",(null===H||void 0===H||null===(P=H.endpoints)||void 0===P?void 0:P.minio)&&(0,j.jsxs)(o.Fragment,{children:[(0,j.jsx)("a",{href:null===H||void 0===H||null===(C=H.endpoints)||void 0===C?void 0:C.minio,target:"_blank",rel:"noopener noreferrer",className:"".concat(V.linkedSection," ").concat(V.autoGeneratedLink),children:(null===H||void 0===H||null===(R=H.endpoints)||void 0===R?void 0:R.minio)||"-"}),(0,j.jsx)("br",{})]}),(null===H||void 0===H||null===(I=H.domains)||void 0===I?void 0:I.minio)&&H.domains.minio.map((function(e){return(0,j.jsxs)(o.Fragment,{children:[(0,j.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:V.linkedSection,children:e}),(0,j.jsx)("br",{})]})}))]})})})]}),(0,j.jsxs)(m.ZP,{item:!0,xs:12,sm:12,md:4,children:[(0,j.jsx)(m.ZP,{item:!0,xs:12,children:(0,j.jsx)(N.Z,{label:"Instances:",value:re})}),(0,j.jsx)(m.ZP,{item:!0,xs:12,children:(0,j.jsx)(N.Z,{label:"Clusters:",value:ie,stkProps:{style:{marginRight:47}}})}),(0,j.jsx)(m.ZP,{item:!0,xs:12,children:(0,j.jsx)(N.Z,{label:"Total Drives:",value:ue,stkProps:{style:{marginRight:43}}})}),(0,j.jsx)(m.ZP,{item:!0,xs:12,children:(0,j.jsx)(N.Z,{label:"Write Quorum:",value:null!==H&&void 0!==H&&null!==(D=H.status)&&void 0!==D&&D.write_quorum?null===H||void 0===H||null===(F=H.status)||void 0===F?void 0:F.write_quorum:0})}),(0,j.jsx)(m.ZP,{item:!0,xs:12,children:(0,j.jsx)(N.Z,{label:"Drives Online:",value:null!==H&&void 0!==H&&null!==(_=H.status)&&void 0!==_&&_.drives_online?null===H||void 0===H||null===(z=H.status)||void 0===z?void 0:z.drives_online:0,stkProps:{style:{marginRight:8}}})}),(0,j.jsx)(m.ZP,{item:!0,xs:12,children:(0,j.jsx)(N.Z,{label:"Drives Offline:",value:null!==H&&void 0!==H&&null!==(B=H.status)&&void 0!==B&&B.drives_offline?null===H||void 0===H||null===(U=H.status)||void 0===U?void 0:U.drives_offline:0,stkProps:{style:{marginRight:7}}})})]})]}),(0,j.jsx)(A.Z,{children:"Features"}),(0,j.jsxs)(v.Z,{sx:(0,a.Z)({},L),children:[(0,j.jsx)(N.Z,(0,a.Z)({orientation:"row",label:"Logs:",value:O(q,"tenant-log")},$)),(0,j.jsx)(N.Z,(0,a.Z)({orientation:"row",label:"AD/LDAP:",value:O(X,"tenant-sts")},$)),(0,j.jsx)(N.Z,(0,a.Z)({orientation:"row",label:"Encryption:",value:O(Q,"tenant-enc")},$))]}),(0,j.jsxs)(v.Z,{sx:(0,a.Z)({},L),children:[(0,j.jsx)(N.Z,(0,a.Z)({orientation:"row",label:"MinIO TLS:",value:O(Y,"tenant-tls")},$)),(0,j.jsx)(N.Z,(0,a.Z)({orientation:"row",label:"Monitoring:",value:O(J,"tenant-monitor")},$)),(0,j.jsx)(N.Z,(0,a.Z)({orientation:"row",label:"OpenID:",value:O(ee,"tenant-oidc")},$))]})]})}))},22512:function(e,n,t){var i=t(72791),a=t(20890),o=t(11135),l=t(25787),r=t(80184);n.Z=(0,l.Z)((function(e){var n;return(0,o.Z)({errorBlock:{color:(null===(n=e.palette)||void 0===n?void 0:n.error.main)||"#C83B51"}})}))((function(e){var n=e.classes,t=e.errorMessage,o=e.withBreak,l=void 0===o||o;return(0,r.jsxs)(i.Fragment,{children:[l&&(0,r.jsx)("br",{}),(0,r.jsx)(a.Z,{component:"p",variant:"body1",className:n.errorBlock,children:t})]})}))},42419:function(e,n,t){var i=t(95318);n.Z=void 0;var a=i(t(45649)),o=t(80184),l=(0,a.default)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");n.Z=l},53767:function(e,n,t){var i=t(4942),a=t(63366),o=t(87462),l=t(72791),r=t(51184),s=t(45682),c=t(78519),d=t(82466),u=t(47630),m=t(93736),v=t(80184),p=["component","direction","spacing","divider","children"];function h(e,n){var t=l.Children.toArray(e).filter(Boolean);return t.reduce((function(e,i,a){return e.push(i),a<t.length-1&&e.push(l.cloneElement(n,{key:"separator-".concat(a)})),e}),[])}var f=(0,u.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:function(e,n){return[n.root]}})((function(e){var n=e.ownerState,t=e.theme,a=(0,o.Z)({display:"flex"},(0,r.k9)({theme:t},(0,r.P$)({values:n.direction,breakpoints:t.breakpoints.values}),(function(e){return{flexDirection:e}})));if(n.spacing){var l=(0,s.hB)(t),c=Object.keys(t.breakpoints.values).reduce((function(e,t){return null==n.spacing[t]&&null==n.direction[t]||(e[t]=!0),e}),{}),u=(0,r.P$)({values:n.direction,base:c}),m=(0,r.P$)({values:n.spacing,base:c});a=(0,d.Z)(a,(0,r.k9)({theme:t},m,(function(e,t){return{"& > :not(style) + :not(style)":(0,i.Z)({margin:0},"margin".concat((a=t?u[t]:n.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[a])),(0,s.NA)(l,e))};var a})))}return a})),g=l.forwardRef((function(e,n){var t=(0,m.Z)({props:e,name:"MuiStack"}),i=(0,c.Z)(t),l=i.component,r=void 0===l?"div":l,s=i.direction,d=void 0===s?"column":s,u=i.spacing,g=void 0===u?0:u,x=i.divider,Z=i.children,j=(0,a.Z)(i,p),b={direction:d,spacing:g};return(0,v.jsx)(f,(0,o.Z)({as:r,ownerState:b,ref:n},j,{children:x?h(Z,x):Z}))}));n.Z=g},23688:function(e,n,t){function i(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function a(e){this.setState(function(n){var t=this.constructor.getDerivedStateFromProps(e,n);return null!==t&&void 0!==t?t:null}.bind(this))}function o(e,n){try{var t=this.props,i=this.state;this.props=e,this.state=n,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(t,i)}finally{this.props=t,this.state=i}}function l(e){var n=e.prototype;if(!n||!n.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof n.getSnapshotBeforeUpdate)return e;var t=null,l=null,r=null;if("function"===typeof n.componentWillMount?t="componentWillMount":"function"===typeof n.UNSAFE_componentWillMount&&(t="UNSAFE_componentWillMount"),"function"===typeof n.componentWillReceiveProps?l="componentWillReceiveProps":"function"===typeof n.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"===typeof n.componentWillUpdate?r="componentWillUpdate":"function"===typeof n.UNSAFE_componentWillUpdate&&(r="UNSAFE_componentWillUpdate"),null!==t||null!==l||null!==r){var s=e.displayName||e.name,c="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==t?"\n "+t:"")+(null!==l?"\n "+l:"")+(null!==r?"\n "+r:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(n.componentWillMount=i,n.componentWillReceiveProps=a),"function"===typeof n.getSnapshotBeforeUpdate){if("function"!==typeof n.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");n.componentWillUpdate=o;var d=n.componentDidUpdate;n.componentDidUpdate=function(e,n,t){var i=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:t;d.call(this,e,n,i)}}return e}t.r(n),t.d(n,{polyfill:function(){return l}}),i.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0}}]);
//# sourceMappingURL=1030.9d4efe7b.chunk.js.map