2 lines
28 KiB
JavaScript
2 lines
28 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(42649),f=t(29823),g=t(28057),x=t(80184),Z=(0,l.$j)((function(e){return{modalSnackMessage:e.system.modalSnackBar}}),{setModalSnackMessage:h.MK});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))}))(Z((function(e){var n=e.onClose,t=e.modalOpen,l=e.title,m=e.children,v=e.classes,p=e.wideLimit,h=void 0===p||p,Z=e.modalSnackMessage,b=e.noContentPadding,j=e.setModalSnackMessage,y=e.titleIcon,S=void 0===y?null:y,w=(0,o.useState)(!1),k=(0,i.Z)(w,2),P=k[0],C=k[1];(0,o.useEffect)((function(){j("")}),[j]),(0,o.useEffect)((function(){if(Z){if(""===Z.message)return void C(!1);"error"!==Z.type&&C(!0)}}),[Z]);var E=h?{classes:{paper:v.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},R="";return Z&&(R=Z.detailedErrorMsg,(""===Z.detailedErrorMsg||Z.detailedErrorMsg.length<5)&&(R=Z.message)),(0,x.jsxs)(c.Z,(0,a.Z)((0,a.Z)({open:t,classes:v},E),{},{scroll:"paper",onClose:function(e,t){"backdropClick"!==t&&n()},className:v.root,children:[(0,x.jsxs)(d.Z,{className:v.title,children:[(0,x.jsxs)("div",{className:v.titleText,children:[S," ",l]}),(0,x.jsx)("div",{className:v.closeContainer,children:(0,x.jsx)(r.Z,{"aria-label":"close",id:"close",className:v.closeButton,onClick:n,disableRipple:!0,size:"small",children:(0,x.jsx)(f.Z,{})})})]}),(0,x.jsx)(g.Z,{isModal:!0}),(0,x.jsx)(s.Z,{open:P,className:v.snackBarModal,onClose:function(){C(!1),j("")},message:R,ContentProps:{className:"".concat(v.snackBar," ").concat(Z&&"error"===Z.type?v.errorSnackBar:"")},autoHideDuration:Z&&"error"===Z.type?1e4:5e3}),(0,x.jsx)(u.Z,{className:b?"":v.content,children:m})]}))})))},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(92388),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 b="#07193E",j=100*Z.value/n;j>=90?b="#C83B51":j>=75&&(b="#FFAB0F");var y=[{value:Z.value,color:b,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$,{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 K}});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(42649),f=t(56028),g=t(21435),x=t(37516),Z=t(81207),b=t(80184),j=(0,l.$j)(null,{setModalErrorSnackMessage:h.zb}),y=(0,d.Z)((function(e){return(0,c.Z)((0,a.Z)((0,a.Z)({buttonContainer:{textAlign:"right"},infoText:{fontSize:14}},u.DF),u.ID))}))(j((function(e){var n=e.open,t=e.closeModalAndRefresh,l=e.namespace,r=e.idTenant,s=e.setModalErrorSnackMessage,c=e.classes,d=(0,o.useState)(!1),u=(0,i.Z)(d,2),v=u[0],h=u[1],j=(0,o.useState)(""),y=(0,i.Z)(j,2),S=y[0],w=y[1],k=(0,o.useState)(!1),P=(0,i.Z)(k,2),C=P[0],E=P[1],R=(0,o.useState)(""),D=(0,i.Z)(R,2),A=D[0],N=D[1],I=(0,o.useState)(""),F=(0,i.Z)(I,2),M=F[0],_=F[1],z=(0,o.useState)(""),T=(0,i.Z)(z,2),B=T[0],W=T[1],U=(0,o.useState)(!0),L=(0,i.Z)(U,2),O=L[0],$=L[1],V=(0,o.useCallback)((function(e){var n=new RegExp("^$|^((.*?)/(.*?):(.+))$");if("minioImage"===e)$(n.test(S))}),[S]);(0,o.useEffect)((function(){V("minioImage")}),[S,V]);return(0,b.jsx)(f.Z,{title:"Update MinIO Version",modalOpen:n,onClose:function(){t(!1)},children:(0,b.jsxs)(m.ZP,{container:!0,children:[(0,b.jsxs)(m.ZP,{item:!0,xs:12,className:c.modalFormScrollable,children:[(0,b.jsx)("div",{className:c.infoText,children:"Please enter the MinIO image from dockerhub to use. If blank, then latest build will be used."}),(0,b.jsx)("br",{}),(0,b.jsx)("br",{}),(0,b.jsx)(m.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,b.jsx)(g.Z,{value:S,label:"MinIO's Image",id:"minioImage",name:"minioImage",placeholder:"E.g. minio/minio:RELEASE.2022-02-26T02-54-46Z",onChange:function(e){w(e.target.value)}})}),(0,b.jsx)(m.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,b.jsx)(x.Z,{value:"imageRegistry",id:"setImageRegistry",name:"setImageRegistry",checked:C,onChange:function(e){E(!C)},label:"Set Custom Image Registry",indicatorLabels:["Yes","No"]})}),C&&(0,b.jsxs)(o.Fragment,{children:[(0,b.jsx)(m.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,b.jsx)(g.Z,{value:A,label:"Endpoint",id:"imageRegistry",name:"imageRegistry",placeholder:"E.g. https://index.docker.io/v1/",onChange:function(e){N(e.target.value)}})}),(0,b.jsx)(m.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,b.jsx)(g.Z,{value:M,label:"Username",id:"imageRegistryUsername",name:"imageRegistryUsername",placeholder:"Enter image registry username",onChange:function(e){_(e.target.value)}})}),(0,b.jsx)(m.ZP,{item:!0,xs:12,className:c.formFieldRow,children:(0,b.jsx)(g.Z,{value:B,label:"Password",id:"imageRegistryPassword",name:"imageRegistryPassword",placeholder:"Enter image registry password",onChange:function(e){W(e.target.value)}})})]})]}),(0,b.jsxs)(m.ZP,{item:!0,xs:12,className:c.modalButtonBar,children:[(0,b.jsx)(p.Z,{type:"button",color:"primary",variant:"outlined",onClick:function(){w(""),E(!1),N(""),_(""),W("")},children:"Clear"}),(0,b.jsx)(p.Z,{type:"submit",variant:"contained",color:"primary",disabled:!O||C&&(""===A.trim()||""===M.trim()||""===B.trim())||v,onClick:function(){h(!0);var e={image:S,enable_prometheus:!0};if(C){var n={image_registry:{registry:A,username:M,password:B}};e=(0,a.Z)((0,a.Z)({},e),n)}Z.Z.invoke("PUT","/api/v1/namespaces/".concat(l,"/tenants/").concat(r),e).then((function(){h(!1),t(!0)})).catch((function(e){s(e),h(!1)}))},children:"Save"})]})]})})}))),S=t(81806),w=t(40986),k=t(53767),P=t(92388),C=t(45248),E=t(72401),R=t(74815),D=t(22512),A=t(45902),N=((0,d.Z)((function(e){return{root:{height:10,borderRadius:5},colorPrimary:{backgroundColor:"#F4F4F4"},bar:{borderRadius:5,backgroundColor:"#081C42"},padChart:{padding:"5px"}}}))(w.Z),(0,d.Z)((function(e){return(0,c.Z)({allValue:{fontSize:16,fontWeight:700,marginBottom:8},currentUsage:{fontSize:12,marginTop:8},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,C.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 j=(0,C.ae)("".concat(c.status.usage.capacity),!0).split(" ");h.value=j[0],h.unit=j[1]}if(null!==(l=c.status)&&void 0!==l&&null!==(r=l.usage)&&void 0!==r&&r.capacity_usage){var y=(0,C.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 w=c.tiers.filter((function(e){return"internal"===e.type})).reduce((function(e,n){return e+n.size}),0),N=c.tiers.filter((function(e){return"internal"!==e.type})).reduce((function(e,n){return e+n.size}),0),I=(0,C.l5)(N,!0).split(" ");x.value=I[0],x.unit=I[1];var F=(0,C.l5)(w,!0).split(" ");g.value=F[0],g.unit=F[1]}else{var M,_;S=[{value:(null===(M=c.status)||void 0===M||null===(_=M.usage)||void 0===_?void 0:_.capacity_usage)||0,variant:"STANDARD"}]}return(0,b.jsxs)(o.Fragment,{children:[u&&(0,b.jsx)("div",{className:s.padChart,children:(0,b.jsx)(m.ZP,{item:!0,xs:12,className:s.centerItem,children:(0,b.jsx)(E.Z,{style:{width:40,height:40}})})}),function(){var e,n;return u?null:""!==v?(0,b.jsx)(D.Z,{errorMessage:v,withBreak:!1}):(0,b.jsxs)(m.ZP,{item:!0,xs:12,children:[(0,b.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,b.jsxs)(k.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,b.jsx)(o.Fragment,{children:(0,b.jsx)(A.Z,{label:"Internal:",orientation:"row",value:"".concat(f.value," ").concat(f.unit)})}),c.tiers&&c.tiers.length>0&&(0,b.jsxs)(o.Fragment,{children:[(0,b.jsx)(A.Z,{label:"Internal:",orientation:"row",value:"".concat(g.value," ").concat(g.unit)}),(0,b.jsx)(A.Z,{label:"Tiered:",orientation:"row",value:"".concat(x.value," ").concat(x.unit)})]}),d&&(0,b.jsx)(A.Z,{orientation:"row",label:"Health:",value:(0,b.jsx)("span",{className:d,children:(0,b.jsx)(P.J$,{})})})]})]})}()]})}))),I=t(50896),F=t(40603),M=t(93433),_=t(13400),z=t(42419),T=t(51979),B=(0,l.$j)(null,{setModalErrorSnackMessage:h.zb}),W=(0,d.Z)((function(e){return(0,c.Z)((0,a.Z)((0,a.Z)({buttonContainer:{textAlign:"right"},infoText:{fontSize:14},domainInline:{display:"flex",marginBottom:15},overlayAction:{marginLeft:10,display:"flex",alignItems:"center","& svg":{width:15,height:15},"& button":{background:"#EAEAEA"}}},u.DF),u.ID))}))(B((function(e){var n=e.open,t=e.closeModalAndRefresh,a=e.namespace,l=e.idTenant,r=e.domains,s=e.setModalErrorSnackMessage,c=e.classes,d=(0,o.useState)(!1),u=(0,i.Z)(d,2),v=u[0],h=u[1],x=(0,o.useState)(""),j=(0,i.Z)(x,2),y=j[0],S=j[1],w=(0,o.useState)([""]),k=(0,i.Z)(w,2),P=k[0],C=k[1],E=(0,o.useState)(!0),R=(0,i.Z)(E,2),D=R[0],A=R[1],N=(0,o.useState)([!0]),I=(0,i.Z)(N,2),F=I[0],B=I[1];(0,o.useEffect)((function(){if(r){var e=r.console||"";if(S(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,})*?$/);A(n.test(e))}else A(!0);if(r.minio&&r.minio.length>0){C(r.minio);var t=new RegExp(/((http|https):\/\/)+[a-zA-Z0-9\-.]{3,}\.[a-zA-Z]{2,}(\.[a-zA-Z]{2,})?$/),i=r.minio.map((function(e){return""===e.trim()||t.test(e)}));B(i)}}}),[r]);var W=function(){var e=(0,M.Z)(P),n=(0,M.Z)(F);e.push(""),n.push(!0),C(e),B(n)};return(0,b.jsx)(f.Z,{title:"Edit Tenant Domains - ".concat(l),modalOpen:n,onClose:function(){t(!1)},children:(0,b.jsx)(m.ZP,{container:!0,children:(0,b.jsxs)(m.ZP,{item:!0,xs:12,className:c.modalFormScrollable,children:[(0,b.jsxs)(m.ZP,{item:!0,xs:12,className:"".concat(c.configSectionItem),children:[(0,b.jsx)("div",{className:c.containerItem,children:(0,b.jsx)(g.Z,{id:"console_domain",name:"console_domain",onChange:function(e){S(e.target.value),A(e.target.validity.valid)},label:"Console Domain",value:y,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:D?"":"Domain format is incorrect (http|https://subdomain.domain:port/subpath1/subpath2)"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h4",{children:"MinIO Domains"}),(0,b.jsx)("div",{children:P.map((function(e,n){return(0,b.jsxs)("div",{className:"".concat(c.domainInline),children:[(0,b.jsx)(g.Z,{id:"minio-domain-".concat(n.toString()),name:"minio-domain-".concat(n.toString()),onChange:function(e){!function(e,n){var t=(0,M.Z)(P);t[n]=e,C(t)}(e.target.value,n),function(e,n){var t=(0,M.Z)(F);t[n]=e,B(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:F[n]?"":"MinIO domain format is incorrect (http|https://subdomain.domain)"}),(0,b.jsx)("div",{className:c.overlayAction,children:(0,b.jsx)(_.Z,{size:"small",onClick:W,disabled:n!==P.length-1,children:(0,b.jsx)(z.Z,{})})}),(0,b.jsx)("div",{className:c.overlayAction,children:(0,b.jsx)(_.Z,{size:"small",onClick:function(){return function(e){var n=P.filter((function(n,t){return t!==e})),t=F.filter((function(n,t){return t!==e}));C(n),B(t)}(n)},disabled:P.length<=1,children:(0,b.jsx)(T.Z,{})})})]},"minio-domain-key-".concat(n.toString()))}))})]})]}),(0,b.jsxs)(m.ZP,{item:!0,xs:12,className:c.modalButtonBar,children:[(0,b.jsx)(p.Z,{type:"button",color:"primary",variant:"outlined",onClick:function(){S(""),A(!0),C([""]),B([!0])},children:"Clear"}),(0,b.jsx)(p.Z,{type:"submit",variant:"contained",color:"primary",disabled:v||!D||F.filter((function(e){return!e})).length>0,onClick:function(){h(!0);var e={domains:{console:y,minio:P.filter((function(e){return""!==e.trim()}))}};Z.Z.invoke("PUT","/api/v1/namespaces/".concat(a,"/tenants/").concat(l,"/domains"),e).then((function(){h(!1),t(!0)})).catch((function(e){s(e),h(!1)}))},children:"Save"})]})]})})})}))),U=t(75460),L=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},O=function(e){var n,t=e.tenant,i=e.classes;return t?(0,b.jsx)(N,{tenant:t,label:"Storage",error:"",loading:!1,healthStatus:L(null===t||void 0===t||null===(n=t.status)||void 0===n?void 0:n.health_status,i)}):null},$=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,b.jsx)(x.Z,{indicatorLabels:["Enabled","Disabled"],checked:e,value:e,id:"".concat(n,"-status"),name:"".concat(n,"-status"),onChange:function(){},switchOnly:!0})},V={display:"flex",justifyContent:"space-between",marginTop:"10px","@media (max-width: 600px)":{flexFlow:"column"}},G={stkProps:{sx:{flex:1,marginRight:10,display:"flex",alignItems:"center",justifyContent:"space-between","@media (max-width: 900px)":{marginRight:"25px"}}},lblProps:{style:{minWidth:100}}},H=(0,l.$j)((function(e){return{selectedTenant:e.tenants.tenantDetails.currentTenant,tenant:e.tenants.tenantDetails.tenantInfo,logEnabled:s()(e.tenants.tenantDetails.tenantInfo,"logEnabled",!1),monitoringEnabled:s()(e.tenants.tenantDetails.tenantInfo,"monitoringEnabled",!1),encryptionEnabled:s()(e.tenants.tenantDetails.tenantInfo,"encryptionEnabled",!1),minioTLS:s()(e.tenants.tenantDetails.tenantInfo,"minioTLS",!1),consoleTLS:s()(e.tenants.tenantDetails.tenantInfo,"consoleTLS",!1),consoleEnabled:s()(e.tenants.tenantDetails.tenantInfo,"consoleEnabled",!1),adEnabled:s()(e.tenants.tenantDetails.tenantInfo,"idpAdEnabled",!1),oidcEnabled:s()(e.tenants.tenantDetails.tenantInfo,"idpOidcEnabled",!1)}}),{setTenantDetailsLoad:U.V2}),K=(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}},centerAlign:{textAlign:"center"},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))))}))(H((function(e){var n,t,l,r,s,c,d,u,p,h,f,g,x,Z,j,w,k,C,E,R,D,N,M,_,z=e.classes,T=e.match,B=e.tenant,U=e.logEnabled,L=e.monitoringEnabled,H=e.encryptionEnabled,K=e.minioTLS,q=e.adEnabled,J=e.oidcEnabled,Q=e.setTenantDetailsLoad,Y=(0,o.useState)(0),X=(0,i.Z)(Y,2),ee=X[0],ne=X[1],te=(0,o.useState)(0),ie=(0,i.Z)(te,2),ae=ie[0],oe=ie[1],le=(0,o.useState)(0),re=(0,i.Z)(le,2),se=re[0],ce=re[1],de=(0,o.useState)(!1),ue=(0,i.Z)(de,2),me=ue[0],ve=ue[1],pe=(0,o.useState)(!1),he=(0,i.Z)(pe,2),fe=he[0],ge=he[1],xe=T.params.tenantName,Ze=T.params.tenantNamespace;(0,o.useEffect)((function(){B&&(ne(B.pools.length),ce(B.total_volumes||0),oe(B.total_instances||0))}),[B]);return(0,b.jsxs)(o.Fragment,{children:[me&&(0,b.jsx)(y,{open:me,closeModalAndRefresh:function(){ve(!1)},idTenant:xe,namespace:Ze}),fe&&(0,b.jsx)(W,{open:fe,idTenant:xe,namespace:Ze,domains:(null===B||void 0===B?void 0:B.domains)||null,closeModalAndRefresh:function(e){ge(!1),e&&Q(!0)}}),(0,b.jsx)(I.Z,{separator:!1,children:"Details"}),(0,b.jsx)(O,{tenant:B,classes:z}),(0,b.jsxs)(m.ZP,{container:!0,children:[(0,b.jsxs)(m.ZP,{item:!0,xs:12,sm:12,md:8,children:[(0,b.jsx)(m.ZP,{item:!0,xs:12,children:(0,b.jsx)(A.Z,{label:"State:",value:null===B||void 0===B?void 0:B.currentState})}),(0,b.jsx)(m.ZP,{item:!0,xs:12,children:(0,b.jsx)(A.Z,{label:"MinIO:",value:(0,b.jsx)(S.Z,{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal",wordBreak:"break-all"},onClick:function(){ve(!0)},children:B?B.image:""})})}),(0,b.jsx)(m.ZP,{item:!0,xs:12,children:(0,b.jsxs)("h3",{children:["Domains",(0,b.jsx)(F.Z,{icon:(0,b.jsx)(P.dY,{}),title:"",onClick:function(){ge(!0)}})]})}),(0,b.jsx)(m.ZP,{item:!0,xs:12,children:(0,b.jsx)(A.Z,{label:"Console:",value:(0,b.jsxs)(o.Fragment,{children:[null!==B&&void 0!==B&&null!==(n=B.domains)&&void 0!==n&&n.console&&""!==(null===B||void 0===B||null===(t=B.domains)||void 0===t?void 0:t.console)||null!==B&&void 0!==B&&null!==(l=B.endpoints)&&void 0!==l&&l.console?"":"-",(null===B||void 0===B||null===(r=B.endpoints)||void 0===r?void 0:r.console)&&(0,b.jsxs)(o.Fragment,{children:[(0,b.jsx)("a",{href:null===B||void 0===B||null===(s=B.endpoints)||void 0===s?void 0:s.console,target:"_blank",rel:"noopener noreferrer",className:"".concat(z.linkedSection," ").concat(z.autoGeneratedLink),children:(null===B||void 0===B||null===(c=B.endpoints)||void 0===c?void 0:c.console)||"-"}),(0,b.jsx)("br",{})]}),(null===B||void 0===B||null===(d=B.domains)||void 0===d?void 0:d.console)&&""!==(null===B||void 0===B||null===(u=B.domains)||void 0===u?void 0:u.console)&&(0,b.jsx)("a",{href:(null===B||void 0===B||null===(p=B.domains)||void 0===p?void 0:p.console)||"",target:"_blank",rel:"noopener noreferrer",className:z.linkedSection,children:(null===B||void 0===B||null===(h=B.domains)||void 0===h?void 0:h.console)||""})]})})}),(0,b.jsx)(m.ZP,{item:!0,xs:12,children:(0,b.jsx)(A.Z,{label:"MinIO Endpoint".concat(null!==B&&void 0!==B&&null!==(f=B.endpoints)&&void 0!==f&&f.minio&&1===(null===B||void 0===B||null===(g=B.endpoints)||void 0===g?void 0:g.minio.length)?"":"s",":"),value:(0,b.jsxs)(o.Fragment,{children:[null!==B&&void 0!==B&&null!==(x=B.domains)&&void 0!==x&&x.minio||null!==B&&void 0!==B&&null!==(Z=B.endpoints)&&void 0!==Z&&Z.minio?"":"-",(null===B||void 0===B||null===(j=B.endpoints)||void 0===j?void 0:j.minio)&&(0,b.jsxs)(o.Fragment,{children:[(0,b.jsx)("a",{href:null===B||void 0===B||null===(w=B.endpoints)||void 0===w?void 0:w.minio,target:"_blank",rel:"noopener noreferrer",className:"".concat(z.linkedSection," ").concat(z.autoGeneratedLink),children:(null===B||void 0===B||null===(k=B.endpoints)||void 0===k?void 0:k.minio)||"-"}),(0,b.jsx)("br",{})]}),(null===B||void 0===B||null===(C=B.domains)||void 0===C?void 0:C.minio)&&B.domains.minio.map((function(e){return(0,b.jsxs)(o.Fragment,{children:[(0,b.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:z.linkedSection,children:e}),(0,b.jsx)("br",{})]})}))]})})})]}),(0,b.jsxs)(m.ZP,{item:!0,xs:12,sm:12,md:4,children:[(0,b.jsx)(m.ZP,{item:!0,xs:12,children:(0,b.jsx)(A.Z,{label:"Instances:",value:ae})}),(0,b.jsx)(m.ZP,{item:!0,xs:12,children:(0,b.jsx)(A.Z,{label:"Clusters:",value:ee,stkProps:{style:{marginRight:47}}})}),(0,b.jsx)(m.ZP,{item:!0,xs:12,children:(0,b.jsx)(A.Z,{label:"Total Drives:",value:se,stkProps:{style:{marginRight:43}}})}),(0,b.jsx)(m.ZP,{item:!0,xs:12,children:(0,b.jsx)(A.Z,{label:"Write Quorum:",value:null!==B&&void 0!==B&&null!==(E=B.status)&&void 0!==E&&E.write_quorum?null===B||void 0===B||null===(R=B.status)||void 0===R?void 0:R.write_quorum:0})}),(0,b.jsx)(m.ZP,{item:!0,xs:12,children:(0,b.jsx)(A.Z,{label:"Drives Online:",value:null!==B&&void 0!==B&&null!==(D=B.status)&&void 0!==D&&D.drives_online?null===B||void 0===B||null===(N=B.status)||void 0===N?void 0:N.drives_online:0,stkProps:{style:{marginRight:8}}})}),(0,b.jsx)(m.ZP,{item:!0,xs:12,children:(0,b.jsx)(A.Z,{label:"Drives Offline:",value:null!==B&&void 0!==B&&null!==(M=B.status)&&void 0!==M&&M.drives_offline?null===B||void 0===B||null===(_=B.status)||void 0===_?void 0:_.drives_offline:0,stkProps:{style:{marginRight:7}}})})]})]}),(0,b.jsx)(I.Z,{children:"Features"}),(0,b.jsxs)(v.Z,{sx:(0,a.Z)({},V),children:[(0,b.jsx)(A.Z,(0,a.Z)({orientation:"row",label:"Logs:",value:$(U,"tenant-log")},G)),(0,b.jsx)(A.Z,(0,a.Z)({orientation:"row",label:"AD/LDAP:",value:$(q,"tenant-sts")},G)),(0,b.jsx)(A.Z,(0,a.Z)({orientation:"row",label:"Encryption:",value:$(H,"tenant-enc")},G))]}),(0,b.jsxs)(v.Z,{sx:(0,a.Z)({},V),children:[(0,b.jsx)(A.Z,(0,a.Z)({orientation:"row",label:"MinIO TLS:",value:$(K,"tenant-tls")},G)),(0,b.jsx)(A.Z,(0,a.Z)({orientation:"row",label:"Monitoring:",value:$(L,"tenant-monitor")},G)),(0,b.jsx)(A.Z,(0,a.Z)({orientation:"row",label:"OpenID:",value:$(J,"tenant-oidc")},G))]})]})})))},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,b=(0,a.Z)(i,p),j={direction:d,spacing:g};return(0,v.jsx)(f,(0,o.Z)({as:r,ownerState:j,ref:n},b,{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.4a654568.chunk.js.map
|