Files
object-browser/portal-ui/build/static/js/1690.5ad5531b.chunk.js
2023-07-06 10:32:39 -07:00

2 lines
32 KiB
JavaScript

(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1690],{81159:function(e,n,t){"use strict";var r=t(4942),i=t(1413),o=t(72791),a=t(11135),s=t(25787),l=t(9955),c=t(30829),u=t(20068),d=t(20890),p=t(61889),f=t(23814),x=t(29945),h=t(28182),m=t(80184),g=(0,s.Z)((function(e){return{root:{width:50,height:24,padding:0,margin:0},switchBase:{padding:1,"&$checked":{transform:"translateX(24px)",color:e.palette.common.white,"& + $track":{backgroundColor:"#4CCB92",boxShadow:"inset 0px 1px 4px rgba(0,0,0,0.1)",opacity:1,border:"none"}},"&$focusVisible $thumb":{color:"#4CCB92",border:"6px solid #fff"}},thumb:{width:22,height:22,backgroundColor:"#FAFAFA",border:"2px solid #FFFFFF",marginLeft:1},track:{borderRadius:12,backgroundColor:"#E2E2E2",boxShadow:"inset 0px 1px 4px rgba(0,0,0,0.1)",opacity:1,transition:e.transitions.create(["background-color","border"])},checked:{},focusVisible:{},switchContainer:{display:"flex",alignItems:"center",justifyContent:"flex-end"}}}))(l.Z);n.Z=(0,s.Z)((function(e){return(0,a.Z)((0,i.Z)((0,i.Z)({indicatorLabelOn:{fontWeight:"bold",color:"#081C42 !important"},indicatorLabel:{fontSize:12,color:"#E2E2E2",margin:"0 8px 0 10px"},fieldDescription:{marginTop:4,color:"#999999"},tooltip:{fontSize:16}},f.OR),f.YI))}))((function(e){var n=e.label,t=void 0===n?"":n,a=e.onChange,s=e.value,l=e.id,f=e.name,v=e.checked,b=void 0!==v&&v,y=e.disabled,j=void 0!==y&&y,Z=e.switchOnly,C=void 0!==Z&&Z,k=e.tooltip,w=void 0===k?"":k,S=e.description,D=void 0===S?"":S,N=e.classes,P=e.indicatorLabels,E=e.extraInputProps,I=void 0===E?{}:E,F=(0,m.jsxs)(o.Fragment,{children:[!C&&(0,m.jsx)("span",{className:(0,h.Z)(N.indicatorLabel,(0,r.Z)({},N.indicatorLabelOn,!b)),children:P&&P.length>1?P[1]:"OFF"}),(0,m.jsx)(g,{checked:b,onChange:a,color:"primary",name:f,inputProps:(0,i.Z)({"aria-label":"primary checkbox"},I),disabled:j,disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0,value:s,id:l}),!C&&(0,m.jsx)("span",{className:(0,h.Z)(N.indicatorLabel,(0,r.Z)({},N.indicatorLabelOn,b)),children:P?P[0]:"ON"})]});return C?F:(0,m.jsx)("div",{children:(0,m.jsxs)(p.ZP,{container:!0,alignItems:"center",children:[(0,m.jsx)(p.ZP,{item:!0,xs:12,sm:8,md:8,children:""!==t&&(0,m.jsxs)(c.Z,{htmlFor:l,className:N.inputLabel,children:[(0,m.jsx)("span",{children:t}),""!==w&&(0,m.jsx)("div",{className:N.tooltipContainer,children:(0,m.jsx)(u.Z,{title:w,placement:"top-start",children:(0,m.jsx)("div",{className:N.tooltip,children:(0,m.jsx)(x.byK,{})})})})]})}),(0,m.jsx)(p.ZP,{item:!0,xs:12,sm:""!==t?4:12,md:""!==t?4:12,textAlign:"right",justifyContent:"end",className:N.switchContainer,children:F}),""!==D&&(0,m.jsx)(p.ZP,{item:!0,xs:12,textAlign:"left",children:(0,m.jsx)(d.Z,{component:"p",className:N.fieldDescription,children:D})})]})})}))},14917:function(e,n,t){"use strict";t(72791);var r=t(61889),i=t(72455),o=t(80184),a=(0,i.Z)((function(e){return{headerBarIcon:{marginRight:".7rem",color:e.palette.primary.main,"& .min-icon":{width:44,height:44},"@media (max-width: 600px)":{display:"none"}},headerBarSubheader:{color:"grey","@media (max-width: 900px)":{maxWidth:200}},stContainer:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:8,borderBottom:"1px solid #EAEAEA","@media (max-width: 600px)":{flexFlow:"column"}},titleColumn:{height:"auto",justifyContent:"center",display:"flex",flexFlow:"column",alignItems:"flex-start","& h1":{fontSize:19}},leftItems:{display:"flex",alignItems:"center","@media (max-width: 600px)":{flexFlow:"column",width:"100%"}},rightItems:{display:"flex",alignItems:"center","& button":{marginLeft:8},"@media (max-width: 600px)":{width:"100%"}}}}));n.Z=function(e){var n=e.icon,t=e.title,i=e.subTitle,s=e.actions,l=e.className,c=a();return(0,o.jsx)(r.ZP,{container:!0,children:(0,o.jsxs)(r.ZP,{item:!0,xs:12,className:"".concat(c.stContainer," ").concat(l||""),children:[(0,o.jsxs)("div",{className:c.leftItems,children:[n?(0,o.jsx)("div",{className:c.headerBarIcon,children:n}):null,(0,o.jsxs)("div",{className:c.titleColumn,children:[(0,o.jsx)("h1",{style:{margin:0},children:t}),(0,o.jsx)("span",{className:c.headerBarSubheader,children:i})]})]}),(0,o.jsx)("div",{className:c.rightItems,children:s})]})})}},38571:function(e,n,t){"use strict";var r=t(1413),i=t(72791),o=t(72455),a=t(18073),s=t(43896),l=t(80184),c=(0,o.Z)({tabRoot:{height:"40px",borderBottom:"1px solid #eaeaea"},root:{width:"120px",backgroundColor:"transparent",paddingTop:0,paddingBottom:0,fontSize:"14px",fontWeight:600,color:"#07193E",height:"40px"},selected:{"&.MuiTab-selected":{backgroundColor:"#F6F7F7 !important"},"&.MuiTab-wrapper":{color:"#07193E",fontWeight:600}},indicator:{background:"transparent linear-gradient(90deg, #072B4E 0%, #081C42 100%) 0% 0% no-repeat padding-box;",height:2},scroller:{maxWidth:1185,position:"relative","&::after":{content:'" "',backgroundColor:"#EEF1F4",height:2,width:"100%",display:"block"}}});n.Z=function(e){var n=e.selectedTab,t=e.onChange,o=e.tabOptions,u=c();return(0,l.jsx)(i.Fragment,{children:(0,l.jsx)(a.Z,{indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",value:n,onChange:function(e,n){t(n)},classes:{root:u.tabRoot,indicator:u.indicator,scroller:u.scroller},children:o.map((function(e,n){var t={label:e.label};return e.value&&(t=(0,r.Z)((0,r.Z)({},t),{},{value:e.value})),e.disabled&&(t=(0,r.Z)((0,r.Z)({},t),{},{disabled:e.disabled})),(0,i.createElement)(s.Z,(0,r.Z)((0,r.Z)({},t),{},{classes:{root:u.root,selected:u.selected},id:"simple-tab-".concat(n),"aria-controls":"simple-tabpanel-".concat(n),key:"tab-".concat(n,"-").concat(e.label)}))}))})})}},59197:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var r=t(1413),i=t(72791),o=t(4942),a=t(63366),s=t(87462),l=t(28182),c=t(82466),u=t(94419),d=t(21217),p=(0,t(44046).ZP)(),f=t(86083),x=t(78519),h=t(85080),m=t(51184),g=t(45682),v=t(80184),b=["component","direction","spacing","divider","children","className","useFlexGap"],y=(0,h.Z)(),j=p("div",{name:"MuiStack",slot:"Root",overridesResolver:function(e,n){return n.root}});function Z(e){return(0,f.Z)({props:e,name:"MuiStack",defaultTheme:y})}function C(e,n){var t=i.Children.toArray(e).filter(Boolean);return t.reduce((function(e,r,o){return e.push(r),o<t.length-1&&e.push(i.cloneElement(n,{key:"separator-".concat(o)})),e}),[])}var k=function(e){var n=e.ownerState,t=e.theme,r=(0,s.Z)({display:"flex",flexDirection:"column"},(0,m.k9)({theme:t},(0,m.P$)({values:n.direction,breakpoints:t.breakpoints.values}),(function(e){return{flexDirection:e}})));if(n.spacing){var i=(0,g.hB)(t),a=Object.keys(t.breakpoints.values).reduce((function(e,t){return("object"===typeof n.spacing&&null!=n.spacing[t]||"object"===typeof n.direction&&null!=n.direction[t])&&(e[t]=!0),e}),{}),l=(0,m.P$)({values:n.direction,base:a}),u=(0,m.P$)({values:n.spacing,base:a});"object"===typeof l&&Object.keys(l).forEach((function(e,n,t){if(!l[e]){var r=n>0?l[t[n-1]]:"column";l[e]=r}}));r=(0,c.Z)(r,(0,m.k9)({theme:t},u,(function(e,t){return n.useFlexGap?{gap:(0,g.NA)(i,e)}:{"& > :not(style) + :not(style)":(0,o.Z)({margin:0},"margin".concat((r=t?l[t]:n.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[r])),(0,g.NA)(i,e))};var r})))}return r=(0,m.dt)(t.breakpoints,r)};var w=t(66934),S=t(31402),D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.createStyledComponent,t=void 0===n?j:n,r=e.useThemeProps,o=void 0===r?Z:r,c=e.componentName,p=void 0===c?"MuiStack":c,f=t(k),h=i.forwardRef((function(e,n){var t=o(e),r=(0,x.Z)(t),i=r.component,c=void 0===i?"div":i,h=r.direction,m=void 0===h?"column":h,g=r.spacing,y=void 0===g?0:g,j=r.divider,Z=r.children,k=r.className,w=r.useFlexGap,S=void 0!==w&&w,D=(0,a.Z)(r,b),N={direction:m,spacing:y,useFlexGap:S},P=(0,u.Z)({root:["root"]},(function(e){return(0,d.Z)(p,e)}),{});return(0,v.jsx)(f,(0,s.Z)({as:c,ownerState:N,ref:n,className:(0,l.Z)(P.root,k)},D,{children:j?C(Z,j):Z}))}));return h}({createStyledComponent:(0,w.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:function(e,n){return n.root}}),useThemeProps:function(e){return(0,S.Z)({props:e,name:"MuiStack"})}}),N=D,P=function(e){var n=e.label,t=void 0===n?null:n,i=e.value,o=void 0===i?"-":i,a=e.orientation,s=void 0===a?"column":a,l=e.stkProps,c=void 0===l?{}:l,u=e.lblProps,d=void 0===u?{}:u,p=e.valProps,f=void 0===p?{}:p;return(0,v.jsxs)(N,(0,r.Z)((0,r.Z)({direction:{xs:"column",sm:s}},c),{},{children:[(0,v.jsx)("label",(0,r.Z)((0,r.Z)({style:{marginRight:5,fontWeight:600}},d),{},{children:t})),(0,v.jsx)("label",(0,r.Z)((0,r.Z)({style:{marginRight:5,fontWeight:500}},f),{},{children:o}))]}))}},90767:function(e,n,t){"use strict";var r=t(29439),i=t(1413),o=t(72791),a=t(40986),s=t(51691),l=t(11135),c=t(25787),u=t(23814),d=t(23508),p=t(29945),f=t(87995),x=t(81551),h=t(31776),m=t(82342),g=t(80184);n.Z=(0,c.Z)((function(e){return(0,l.Z)((0,i.Z)({wrapText:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"}},u.Qw))}))((function(e){var n=e.classes,t=e.configurationName,i=e.closeResetModalAndRefresh,l=e.resetOpen,c=(0,x.TL)(),u=(0,o.useState)(!1),v=(0,r.Z)(u,2),b=v[0],y=v[1];(0,o.useEffect)((function(){b&&h.h.configs.resetConfig(t).then((function(){y(!1),i(!0)})).catch((function(e){y(!1),c((0,f.Ih)((0,m.g)(e.error)))}))}),[i,t,b,c]);return(0,g.jsx)(d.Z,{title:"Restore Defaults",confirmText:"Yes, Reset Configuration",isOpen:l,titleIcon:(0,g.jsx)(p.NvT,{}),isLoading:b,onConfirm:function(){y(!0)},onClose:function(){i(!1)},confirmationContent:(0,g.jsxs)(o.Fragment,{children:[b&&(0,g.jsx)(a.Z,{}),(0,g.jsxs)(s.Z,{children:["Are you sure you want to restore these configurations to default values?",(0,g.jsx)("br",{}),(0,g.jsx)("b",{className:n.wrapText,children:"Please note that this may cause your system to not be accessible"})]})]})})}))},37099:function(e,n,t){"use strict";var r=t(72791),i=t(64554),o=t(29945),a=t(80184),s=function(e){var n=e.icon,t=e.description;return(0,a.jsxs)(i.Z,{sx:{display:"flex","& .min-icon":{marginRight:"10px",height:"23px",width:"23px",marginBottom:"10px"}},children:[n," ",(0,a.jsx)("div",{style:{fontSize:"14px",fontStyle:"italic",color:"#5E5E5E"},children:t})]})};n.Z=function(e){var n=e.helpText,t=e.docLink,l=e.docText,c=e.contents;return(0,a.jsxs)(i.Z,{sx:{flex:1,border:"1px solid #eaeaea",borderRadius:"2px",display:"flex",flexFlow:"column",padding:"20px"},children:[(0,a.jsxs)(i.Z,{sx:{fontSize:"16px",fontWeight:600,display:"flex",alignItems:"center",marginBottom:"16px",paddingBottom:"20px","& .min-icon":{height:"21px",width:"21px",marginRight:"15px"}},children:[(0,a.jsx)(o.M9A,{}),(0,a.jsx)("div",{children:n})]}),(0,a.jsxs)(i.Z,{sx:{fontSize:"14px",marginBottom:"15px"},children:[c.map((function(e,n){return(0,a.jsxs)(r.Fragment,{children:[e.icon&&(0,a.jsx)(i.Z,{sx:{paddingBottom:"20px"},children:(0,a.jsx)(s,{icon:e.icon,description:e.iconDescription})}),(0,a.jsx)(i.Z,{sx:{paddingBottom:"20px"},children:e.text})]},"feature-item-".concat(n))})),(0,a.jsx)(i.Z,{sx:{paddingBottom:"20px"},children:(0,a.jsx)("a",{href:t,target:"_blank",rel:"noopener",children:l})})]})]})}},11690:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return A}});var r=t(4942),i=t(1413),o=t(74165),a=t(15861),s=t(29439),l=t(72791),c=t(29945),u=t(81551),d=t(87995),p=t(14917),f=t(81159),x=t(59197),h=t(47974),m=t(79979),g=t(37099),v=t(93433),b=t(58400),y=t(78687),j=t(99779),Z=t(80184),C=function(e){var n=e.name;return(0,Z.jsxs)("h4",{children:[(0,Z.jsx)(c.ZyT,{style:{transform:"rotateZ(90deg)"}}),n]})},k=function(e){var n=e.blockName,t=e.results;return(0,Z.jsxs)(l.Fragment,{children:[(0,Z.jsxs)("strong",{children:[n,":"]}),(0,Z.jsx)("ul",{children:t.map((function(e,t){return(0,Z.jsx)("li",{children:e},"policy-".concat(n,"-").concat(t))}))})]})},w=function(e){var n,t,r,i,o,a,s=e.entityName,u=e.results,d=0;switch(s){case"Group":d=(null===(n=u.groups)||void 0===n?void 0:n.length)||0;break;case"Policy":d=(null===(t=u.policies)||void 0===t?void 0:t.length)||0;break;case"User":d=(null===(r=u.users)||void 0===r?void 0:r.length)||0}return(0,Z.jsxs)(c.xuv,{className:"resultElement",sx:{marginTop:50,"&:first-of-type":{marginTop:0}},children:[(0,Z.jsxs)(c.NZf,{separator:!0,sx:{fontSize:12},icon:(0,Z.jsx)(c.anK,{style:{width:17,height:17}}),actions:(0,Z.jsxs)(c.xuv,{sx:{fontSize:14},children:[(0,Z.jsx)("strong",{children:d})," Entit",1===d?"y":"ies"," Found"]}),children:[s," Mappings"]}),(0,Z.jsxs)(c.xuv,{className:"resultsList",sx:{h4:{borderBottom:"#e2e2e2 1px solid",padding:"12px 0",margin:0,marginBottom:15,display:"flex",alignItems:"center","& svg":{marginRight:10,fill:"#3C77A7"}}},children:["Group"===s&&(null===(i=u.groups)||void 0===i?void 0:i.map((function(e,n){return(0,Z.jsxs)(l.Fragment,{children:[(0,Z.jsx)(C,{name:e.group||""}),e.policies&&(0,Z.jsx)(k,{blockName:"Policies",results:e.policies})]},"policy-res-".concat(n))}))),"User"===s&&(null===(o=u.users)||void 0===o?void 0:o.map((function(e,n){return(0,Z.jsxs)(l.Fragment,{children:[(0,Z.jsx)(C,{name:e.user||""}),e.policies&&(0,Z.jsx)(k,{blockName:"Policies",results:e.policies})]},"users-res-".concat(n))}))),"Policy"===s&&(null===(a=u.policies)||void 0===a?void 0:a.map((function(e,n){return(0,Z.jsxs)(l.Fragment,{children:[(0,Z.jsx)(C,{name:e.policy||""}),e.groups&&(0,Z.jsx)(k,{blockName:"Groups",results:e.groups}),e.users&&(0,Z.jsx)(k,{blockName:"Users",results:e.users})]},"policy-map-".concat(n))})))]})]})},S=t(31776),D=t(82342),N=function(){var e=(0,u.TL)(),n=(0,l.useState)(!1),t=(0,s.Z)(n,2),r=t[0],i=t[1],o=(0,l.useState)([""]),a=(0,s.Z)(o,2),p=a[0],f=a[1],x=(0,l.useState)([""]),h=(0,s.Z)(x,2),m=h[0],g=h[1],C=(0,l.useState)(null),k=(0,s.Z)(C,2),N=k[0],P=k[1],E=(0,y.v9)((function(e){return e.createUser.selectedPolicies}));return(0,Z.jsxs)(c.xuv,{sx:{marginTop:15,paddingTop:0},children:[(0,Z.jsxs)(c.rjZ,{container:!0,sx:{marginTop:5},children:[(0,Z.jsxs)(c.rjZ,{item:!0,sm:12,md:6,lg:5,sx:{padding:10,paddingTop:0},children:[(0,Z.jsx)(c.NZf,{children:"Query Filters"}),(0,Z.jsxs)(c.xuv,{sx:{padding:"0 10px",display:"flex",flexDirection:"column",gap:40},children:[(0,Z.jsxs)(c.xuv,{sx:{padding:"10px 26px"},withBorders:!0,children:[(0,Z.jsx)(c.xuv,{sx:{display:"flex"},children:(0,Z.jsx)("h4",{style:{margin:0,marginBottom:10,fontSize:14},children:"Users"})}),(0,Z.jsx)(c.xuv,{sx:{overflowY:"auto",minHeight:50,maxHeight:250,"& > div > div":{width:"100%"}},children:p.map((function(e,n){return(0,Z.jsx)(c.Wzg,{id:"search-user-".concat(n),value:e,onChange:function(e){var t=(0,v.Z)(p);t[n]=e.target.value,f(t)},overlayIcon:p.length===n+1?(0,Z.jsx)(c.dtP,{}):(0,Z.jsx)(c.HFL,{}),overlayAction:function(){!function(e,n){if(e){var t=[].concat((0,v.Z)(p),[""]);f(t)}else{var r=p.filter((function(e,t){return t!==n}));f(r)}}(p.length===n+1,n)}},"search-user-".concat(n))}))})]}),(0,Z.jsxs)(c.xuv,{sx:{padding:"10px 26px"},withBorders:!0,children:[(0,Z.jsx)("h4",{style:{margin:0,marginBottom:10,fontSize:14},children:"Groups"}),(0,Z.jsx)(c.xuv,{sx:{overflowY:"auto",minHeight:50,maxHeight:"calc(100vh - 340px)","& > div > div":{width:"100%"}},children:m.map((function(e,n){return(0,Z.jsx)(c.Wzg,{id:"search-group-".concat(n),value:e,onChange:function(e){var t=(0,v.Z)(m);t[n]=e.target.value,g(t)},overlayIcon:m.length===n+1?(0,Z.jsx)(c.dtP,{}):(0,Z.jsx)(c.HFL,{}),overlayAction:function(){!function(e,n){if(e){var t=[].concat((0,v.Z)(m),[""]);g(t)}else{var r=m.filter((function(e,t){return t!==n}));g(r)}}(m.length===n+1,n)}},"search-group-".concat(n))}))})]}),(0,Z.jsxs)(c.xuv,{sx:{padding:"10px 26px"},withBorders:!0,children:[(0,Z.jsx)("h4",{style:{margin:0,marginBottom:10,fontSize:14},children:"Policies"}),(0,Z.jsx)(c.xuv,{sx:{minHeight:265,maxHeight:"calc(100vh - 740px)"},children:(0,Z.jsx)(b.Z,{selectedPolicy:E,noTitle:!0})})]})]})]}),(0,Z.jsx)(c.rjZ,{item:!0,sm:12,md:6,lg:7,sx:{padding:10,paddingTop:0,display:"flex",flexDirection:"column"},children:r?(0,Z.jsx)(c.xuv,{sx:{textAlign:"center"},children:(0,Z.jsx)(c.aNw,{})}):(0,Z.jsxs)(l.Fragment,{children:[(0,Z.jsx)(c.NZf,{actions:(0,Z.jsx)(c.xuv,{sx:{display:"flex",flexDirection:"row",alignItems:"center",fontSize:14},children:null!==N&&void 0!==N&&N.timestamp?(0,Z.jsxs)(l.Fragment,{children:[(0,Z.jsx)(c.wZd,{style:{width:14,height:14,marginRight:5,fill:"#BEBFBF"}}),j.ou.fromISO(N.timestamp).toFormat("D HH:mm:ss")]}):""}),children:"Query Results"}),N?(0,Z.jsxs)(c.xuv,{sx:{backgroundColor:"#FBFAFA",padding:"8px 22px",flexGrow:1,overflowY:"auto"},children:[!N.groups&&!N.users&&!N.policies&&(0,Z.jsx)(c.xuv,{sx:{textAlign:"center"},children:(0,Z.jsx)("h4",{children:"No Results Available"})}),!!N.groups&&(0,Z.jsx)(w,{results:N,entityName:"Group"}),!!N.users&&(0,Z.jsx)(w,{results:N,entityName:"User"}),!!N.policies&&(0,Z.jsx)(w,{results:N,entityName:"Policy"})]}):(0,Z.jsx)(c.xuv,{sx:{textAlign:"center"},children:"No query results yet"})]})})]}),(0,Z.jsx)(c.rjZ,{container:!0,children:(0,Z.jsx)(c.rjZ,{item:!0,xs:12,sx:{display:"flex",justifyContent:"flex-start",marginTop:45,padding:"0 20px"},children:(0,Z.jsx)(c.zxk,{id:"search-entity",type:"button",variant:"callAction",onClick:function(){i(!0);var n={},t=E.filter((function(e){return""!==e})),r=p.filter((function(e){return""!==e})),o=m.filter((function(e){return""!==e}));t.length>0&&(n.policies=t),r.length>0&&(n.users=r),o.length>0&&(n.groups=o),S.h.ldapEntities.getLdapEntities(n).then((function(e){P(e.data),i(!1)})).catch((function(n){e((0,d.Ih)((0,D.g)(n.error))),i(!1)}))},icon:(0,Z.jsx)(c.W1M,{}),children:"Search"})})})]})},P=t(90767),E=t(19847),I=t(38571),F=t(99670),_=["server_addr","lookup_bind_dn","lookup_bind_password","user_dn_search_base_dn","user_dn_search_filter"],A=function(){var e=(0,u.TL)(),n=m.iR,t=(0,l.useState)(!0),v=(0,s.Z)(t,2),b=v[0],y=v[1],j=(0,l.useState)(!1),C=(0,s.Z)(j,2),k=C[0],w=C[1],A=(0,l.useState)(!1),L=(0,s.Z)(A,2),B=L[0],R=L[1],T=(0,l.useState)({}),O=(0,s.Z)(T,2),q=O[0],M=O[1],z=(0,l.useState)(void 0),U=(0,s.Z)(z,2),W=U[0],G=U[1],H=(0,l.useState)(!1),K=(0,s.Z)(H,2),Y=K[0],$=K[1],V=(0,l.useState)(!1),Q=(0,s.Z)(V,2),X=Q[0],J=Q[1],ee=(0,l.useState)(0),ne=(0,s.Z)(ee,2),te=ne[0],re=ne[1],ie=function(){Y&&W&&oe(W),$(!Y)},oe=function(e){var n={};if(e&&e.length>0){var t=e.find((function(e){return"enable"===e.key})),r=0;e.forEach((function(e){n[e.key]=e.value,_.includes(e.key)&&e.value&&""!==e.value&&"off"!==e.value&&r++}));var i=r===_.length;t&&"on"!==t.value||!i?w(!1):w(!0),R(i)}M(n)};(0,l.useEffect)((function(){b&&S.h.configs.configInfo("identity_ldap").then((function(e){e.data.length>0&&(G(e.data[0].key_values),oe(e.data[0].key_values||[])),y(!1)})).catch((function(n){y(!1),e((0,d.Ih)((0,D.g)(n.error)))}))}),[e,b]);var ae=function(){var n=(0,a.Z)((0,o.Z)().mark((function n(t){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:J(!1),t&&(e((0,d.cN)(t)),G(void 0),M({}),w(!1),R(!1),$(!1));case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();return(0,l.useEffect)((function(){e((0,d.Sc)("LDAP"))}),[]),(0,Z.jsxs)(c.rjZ,{item:!0,xs:12,children:[X&&(0,Z.jsx)(P.Z,{configurationName:"identity_ldap",closeResetModalAndRefresh:ae,resetOpen:X}),(0,Z.jsx)(h.Z,{label:"LDAP",actions:(0,Z.jsx)(F.Z,{})}),(0,Z.jsxs)(c.Xgh,{variant:"constrained",children:[(0,Z.jsx)(I.Z,{selectedTab:te,onChange:function(e){re(e),$(!1)},tabOptions:[{label:"Configuration"},{label:"Entities",disabled:!B||!k}]}),(0,Z.jsxs)(E.x,{index:0,value:te,children:[(0,Z.jsx)(p.Z,{title:Y?"Edit Configuration":"",actions:Y?null:(0,Z.jsxs)(l.Fragment,{children:[(0,Z.jsx)(c.zxk,{id:"edit",type:"button",variant:"callAction",icon:(0,Z.jsx)(c.dY8,{}),onClick:ie,label:"Edit Configuration",disabled:b}),B&&(0,Z.jsx)(c.zxk,{id:"is-configuration-enabled",onClick:function(){return function(n){var t={key_values:[{key:"enable",value:n?"on":"off"}]};S.h.configs.setConfig("identity_ldap",t).then((function(n){w(!k),e((0,d.cN)(n.data.restart||!1)),n.data.restart||e((0,d.y1)("Configuration saved successfully"))})).catch((function(n){e((0,d.Ih)((0,D.g)(n.error)))}))}(!k)},label:k?"Disable LDAP":"Enable LDAP",variant:k?"secondary":"regular"}),(0,Z.jsx)(c.zxk,{id:"refresh-idp-config",onClick:function(){return y(!0)},label:"Refresh",icon:(0,Z.jsx)(c.DuK,{})})]})}),(0,Z.jsx)("br",{}),b?(0,Z.jsx)(c.xuv,{sx:{display:"flex",justifyContent:"center",marginTop:10},children:(0,Z.jsx)(c.aNw,{})}):(0,Z.jsx)(l.Fragment,{children:Y?(0,Z.jsx)(l.Fragment,{children:(0,Z.jsxs)(c.ltY,{helpBox:(0,Z.jsx)(g.Z,{helpText:"Learn more about LDAP Configurations",contents:m.Si,docLink:"https://min.io/docs/minio/linux/operations/external-iam.html?ref=con#minio-external-iam-ad-ldap",docText:"Learn more about LDAP Configurations"}),children:[Object.entries(n).map((function(e){var n=(0,s.Z)(e,2);return function(e,n){return"toggle"===n.type?(0,Z.jsx)(c.xuv,{className:"inputItem",children:(0,Z.jsx)(f.Z,{indicatorLabels:["Enabled","Disabled"],checked:"on"===q[e],value:"is-field-enabled",id:"is-field-enabled",name:"is-field-enabled",label:n.label,tooltip:n.tooltip,onChange:function(n){return M((0,i.Z)((0,i.Z)({},q),{},(0,r.Z)({},e,n.target.checked?"on":"off")))},description:"",disabled:!Y},e)}):(0,Z.jsx)(c.Wzg,{id:e,required:n.required,name:e,label:n.label,tooltip:n.tooltip,error:n.hasError(q[e],Y),value:q[e]?q[e]:"",onChange:function(n){return M((0,i.Z)((0,i.Z)({},q),{},(0,r.Z)({},e,n.target.value)))},placeholder:n.placeholder,disabled:!Y,type:n.type},e)}(n[0],n[1])})),(0,Z.jsxs)(c.xuv,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",marginTop:"20px",gap:"15px"},children:[Y&&(0,Z.jsx)(c.zxk,{id:"clear",type:"button",variant:"secondary",onClick:function(){return J(!0)},label:"Reset Configuration"}),Y&&(0,Z.jsx)(c.zxk,{id:"cancel",type:"button",variant:"regular",onClick:ie,label:"Cancel"}),Y&&(0,Z.jsx)(c.zxk,{id:"save-key",type:"submit",variant:"callAction",color:"primary",disabled:b||!function(){for(var e=0,t=Object.entries(n);e<t.length;e++){var r=(0,s.Z)(t[e],2),i=r[0];if(r[1].required&&(void 0===q[i]||null===q[i]||""===q[i]))return!1}return!0}(),label:"Save",onClick:function(){var t=Object.keys(n).map((function(e){return{key:e,value:q[e]}}));S.h.configs.setConfig("identity_ldap",{key_values:t}).then((function(n){$(!1),G(t),oe(t),e((0,d.cN)(n.data.restart||!1)),n.data.restart||e((0,d.y1)("Configuration saved successfully"))})).catch((function(n){e((0,d.Ih)((0,D.g)(n.error)))}))}})]})]})}):(0,Z.jsx)(l.Fragment,{children:(0,Z.jsxs)(c.xuv,{sx:(0,r.Z)({display:"grid",gridTemplateColumns:"1fr",gridAutoFlow:"dense",gap:3,padding:"15px",border:"1px solid #eaeaea"},"@media (min-width: 576px)",{gridTemplateColumns:"2fr 1fr",gridAutoFlow:"row"}),children:[(0,Z.jsx)(x.Z,{label:"LDAP Enabled",value:k?"Yes":"No"}),B&&(0,Z.jsx)(l.Fragment,{children:Object.entries(n).map((function(e){var n=(0,s.Z)(e,2),t=n[0],r=n[1];return(0,Z.jsx)(x.Z,{label:r.label,value:q[t]?q[t]:""},t)}))})]})})})]}),(0,Z.jsx)(E.x,{index:1,value:te,children:B&&(0,Z.jsx)(c.xuv,{children:(0,Z.jsx)(N,{})})})]})]})}},79979:function(e,n,t){"use strict";t.d(n,{DY:function(){return l},Si:function(){return a},f4:function(){return s},iR:function(){return c}});var r=t(50521),i=t(29945),o=t(80184),a=[{text:"MinIO supports using an Active Directory or LDAP (AD/LDAP) service for external management of user identities. Configuring an external IDentity Provider (IDP) enables Single-Sign On (SSO) workflows, where applications authenticate against the external IDP before accessing MinIO.",icon:(0,o.jsx)(r.Z,{}),iconDescription:"Create Configurations"},{text:"MinIO queries the configured Active Directory / LDAP server to verify the credentials specified by the application and optionally return a list of groups in which the user has membership. MinIO supports two modes (Lookup-Bind Mode and Username-Bind Mode) for performing these queries",icon:null,iconDescription:""},{text:"MinIO recommends using Lookup-Bind mode as the preferred method for verifying AD/LDAP credentials. Username-Bind mode is a legacy method retained for backwards compatibility only.",icon:null,iconDescription:""}],s=[{text:"MinIO supports using an OpenID Connect (OIDC) compatible IDentity Provider (IDP) such as Okta, KeyCloak, Dex, Google, or Facebook for external management of user identities.",icon:(0,o.jsx)(i.mBM,{}),iconDescription:"Create Configurations"},{text:"Configuring an external IDP enables Single-Sign On workflows, where applications authenticate against the external IDP before accessing MinIO.",icon:null,iconDescription:""}],l={config_url:{required:!0,hasError:function(e,n){return!e&&n?"Config URL is required":""},label:"Config URL",tooltip:"Config URL for identity provider configuration",placeholder:"https://identity-provider-url/.well-known/openid-configuration",type:"text"},client_id:{required:!0,hasError:function(e,n){return!e&&n?"Client ID is required":""},label:"Client ID",tooltip:"Identity provider Client ID",placeholder:"Enter Client ID",type:"text"},client_secret:{required:!0,hasError:function(e,n){return!e&&n?"Client Secret is required":""},label:"Client Secret",tooltip:"Identity provider Client Secret",placeholder:"Enter Client Secret",type:"password"},claim_name:{required:!1,label:"Claim Name",tooltip:"Claim from which MinIO will read the policy or role to use",placeholder:"Enter Claim Name",type:"text",hasError:function(e,n){return""}},display_name:{required:!1,label:"Display Name",tooltip:"",placeholder:"Enter Display Name",type:"text",hasError:function(e,n){return""}},claim_prefix:{required:!1,label:"Claim Prefix",tooltip:"",placeholder:"Enter Claim Prefix",type:"text",hasError:function(e,n){return""}},scopes:{required:!1,label:"Scopes",tooltip:"",placeholder:"openid,profile,email",type:"text",hasError:function(e,n){return""}},redirect_uri:{required:!1,label:"Redirect URI",tooltip:"",placeholder:"https://console-endpoint-url/oauth_callback",type:"text",hasError:function(e,n){return""}},role_policy:{required:!1,label:"Role Policy",tooltip:"",placeholder:"readonly",type:"text",hasError:function(e,n){return""}},claim_userinfo:{required:!1,label:"Claim User Info",tooltip:"",placeholder:"Claim User Info",type:"toggle",hasError:function(e,n){return""}},redirect_uri_dynamic:{required:!1,label:"Redirect URI Dynamic",tooltip:"",placeholder:"Redirect URI Dynamic",type:"toggle",hasError:function(e,n){return""}}},c={server_insecure:{required:!0,hasError:function(e,n){return!e&&n?"Server Address is required":""},label:"Server Insecure",tooltip:"Disable SSL certificate verification ",placeholder:"myldapserver.com:636",type:"toggle"},server_addr:{required:!0,hasError:function(e,n){return!e&&n?"Server Address is required":""},label:"Server Address",tooltip:'AD/LDAP server address e.g. "myldapserver.com:636"',placeholder:"myldapserver.com:636",type:"text"},lookup_bind_dn:{required:!0,hasError:function(e,n){return!e&&n?"Lookup Bind DN is required":""},label:"Lookup Bind DN",tooltip:"DN (Distinguished Name) for LDAP read-only service account used to perform DN and group lookups",placeholder:"cn=admin,dc=min,dc=io",type:"text"},lookup_bind_password:{required:!0,hasError:function(e,n){return!e&&n?"Lookup Bind Password is required":""},label:"Lookup Bind Password",tooltip:"Password for LDAP read-only service account used to perform DN and group lookups",placeholder:"admin",type:"password"},user_dn_search_base_dn:{required:!0,hasError:function(e,n){return!e&&n?"User DN Search Base DN is required":""},label:"User DN Search Base",tooltip:"",placeholder:"DC=example,DC=net",type:"text"},user_dn_search_filter:{required:!0,hasError:function(e,n){return!e&&n?"User DN Search Filter is required":""},label:"User DN Search Filter",tooltip:"",placeholder:"(sAMAcountName=%s)",type:"text"},group_search_base_dn:{required:!1,hasError:function(e,n){return""},label:"Group Search Base DN",tooltip:"",placeholder:"ou=swengg,dc=min,dc=io",type:"text"},group_search_filter:{required:!1,hasError:function(e,n){return""},label:"Group Search Filter",tooltip:"",placeholder:"(&(objectclass=groupofnames)(member=%d))",type:"text"}}},58400:function(e,n,t){"use strict";var r=t(93433),i=t(29439),o=t(72791),a=t(40986),s=t(29945),l=t(21639),c=t(59114),u=t(87995),d=t(81551),p=t(74616),f=t(78687),x=t(31776),h=t(80184);n.Z=function(e){var n=e.noTitle,t=void 0!==n&&n,m=(0,d.TL)(),g=(0,o.useState)([]),v=(0,i.Z)(g,2),b=v[0],y=v[1],j=(0,o.useState)(!1),Z=(0,i.Z)(j,2),C=Z[0],k=Z[1],w=(0,o.useState)(""),S=(0,i.Z)(w,2),D=S[0],N=S[1],P=(0,f.v9)((function(e){return e.createUser.selectedPolicies})),E=(0,o.useCallback)((function(){k(!0),x.h.policies.listPolicies().then((function(e){var n,t=null!==(n=e.data.policies)&&void 0!==n?n:[];k(!1),y(t.sort(l.g4))})).catch((function(e){k(!1),m((0,u.zb)(e))}))}),[m]);(0,o.useEffect)((function(){k(!0)}),[]),(0,o.useEffect)((function(){C&&E()}),[C,E]);var I=b.filter((function(e){return e.name.includes(D)}));return(0,h.jsxs)(s.rjZ,{item:!0,xs:12,className:"inputItem",children:[C&&(0,h.jsx)(a.Z,{}),b.length>0?(0,h.jsxs)(o.Fragment,{children:[(0,h.jsx)(s.rjZ,{item:!0,xs:12,className:"inputItem",children:(0,h.jsx)(c.Z,{placeholder:"Start typing to search for a Policy",onChange:function(e){N(e)},value:D,label:t?"":"Assign Policies"})}),(0,h.jsx)(s.wQF,{columns:[{label:"Policy",elementKey:"name"}],onSelect:function(e){var n=e.target,t=n.value,i=n.checked,o=(0,r.Z)(P);i?o.push(t):o=o.filter((function(e){return e!==t})),o=o.filter((function(e){return""!==e})),m((0,p.ue)(o))},selectedItems:P,isLoading:C,records:I,entityName:"Policies",idField:"name",customPaperHeight:"200px"})]}):(0,h.jsx)(s.xuv,{sx:{textAlign:"center",padding:"10px 0"},children:"No Policies Available"})]})}},21639:function(e,n,t){"use strict";t.d(n,{KE:function(){return a},LQ:function(){return r},V2:function(){return o},g4:function(){return i}});var r=function(e,n){if(e.accessKey&&n.accessKey){if(e.accessKey>n.accessKey)return 1;if(e.accessKey<n.accessKey)return-1}return 0},i=function(e,n){return e.name>n.name?1:e.name<n.name?-1:0},o=function(e,n){return e>n?1:e<n?-1:0},a=function(e,n){return e.policy>n.policy?1:e.policy<n.policy?-1:0}},50521:function(e,n,t){"use strict";var r=t(64836);n.Z=void 0;var i=r(t(45649)),o=t(80184),a=(0,i.default)((0,o.jsx)("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5-5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8v14z"}),"Login");n.Z=a},45649:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=t(28610)},31260:function(e,n,t){"use strict";var r=t(78949);n.Z=r.Z},28610:function(e,n,t){"use strict";t.r(n),t.d(n,{capitalize:function(){return i.Z},createChainedFunction:function(){return o.Z},createSvgIcon:function(){return a.Z},debounce:function(){return s.Z},deprecatedPropType:function(){return l},isMuiElement:function(){return c.Z},ownerDocument:function(){return u.Z},ownerWindow:function(){return d.Z},requirePropFactory:function(){return p},setRef:function(){return f},unstable_ClassNameGenerator:function(){return j},unstable_useEnhancedEffect:function(){return x.Z},unstable_useId:function(){return h.Z},unsupportedProp:function(){return m},useControlled:function(){return g.Z},useEventCallback:function(){return v.Z},useForkRef:function(){return b.Z},useIsFocusVisible:function(){return y.Z}});var r=t(55902),i=t(14036),o=t(31260),a=t(76189),s=t(83199);var l=function(e,n){return function(){return null}},c=t(19103),u=t(98301),d=t(17602);t(87462);var p=function(e,n){return function(){return null}},f=t(62971).Z,x=t(40162),h=t(67384);var m=function(e,n,t,r,i){return null},g=t(98278),v=t(89683),b=t(42071),y=t(23031),j={configure:function(e){r.Z.configure(e)}}},19103:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(72791);var i=function(e,n){return r.isValidElement(e)&&-1!==n.indexOf(e.type.muiName)}},78949:function(e,n,t){"use strict";function r(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return n.reduce((function(e,n){return null==n?e:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];e.apply(this,r),n.apply(this,r)}}),(function(){}))}t.d(n,{Z:function(){return r}})},64836:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}}]);
//# sourceMappingURL=1690.5ad5531b.chunk.js.map