2 lines
23 KiB
JavaScript
2 lines
23 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[3097,9478],{23804:function(e,t,n){n(72791);var i=n(11135),o=n(25787),r=n(61889),a=n(80184);t.Z=(0,o.Z)((function(e){return(0,i.Z)({root:{border:"1px solid #E2E2E2",borderRadius:2,backgroundColor:"#FBFAFA",paddingLeft:25,paddingTop:31,paddingBottom:21,paddingRight:30},leftItems:{fontSize:16,fontWeight:"bold",marginBottom:15,display:"flex",alignItems:"center","& .min-icon":{marginRight:15,height:28,width:38}},helpText:{fontSize:16,paddingLeft:5}})}))((function(e){var t=e.classes,n=e.iconComponent,i=e.title,o=e.help;return(0,a.jsx)("div",{className:t.root,children:(0,a.jsxs)(r.ZP,{container:!0,children:[(0,a.jsxs)(r.ZP,{item:!0,xs:12,className:t.leftItems,children:[n,i]}),(0,a.jsx)(r.ZP,{item:!0,xs:12,className:t.helpText,children:o})]})})}))},57314:function(e,t,n){var i=n(1413),o=n(72791),r=n(61889),a=n(30829),l=n(20068),s=n(27391),c=n(11135),u=n(25787),d=n(23814),p=n(84570),f=n(80184);t.Z=(0,u.Z)((function(e){return(0,c.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},d.YI),d.Hr),{},{inputLabel:(0,i.Z)((0,i.Z)({},d.YI.inputLabel),{},{fontSize:14,margin:0,alignItems:"flex-start",paddingTop:"20px",flexWrap:"wrap",display:"flex"}),textBoxContainer:{flexGrow:1,position:"relative"},cssOutlinedInput:{borderColor:"#EAEAEA",padding:16},rootContainer:{"& .MuiOutlinedInput-inputMultiline":(0,i.Z)((0,i.Z)({},d.YI.inputLabel),{},{fontSize:13,minHeight:150}),"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#07193E",borderWidth:1},"& textarea":{color:"#07193E",fontSize:13,fontWeight:600,"&:placeholder":{color:"#858585",opacity:1,fontWeight:400}}}}))}))((function(e){var t=e.label,n=e.onChange,i=e.value,c=e.id,u=e.name,d=e.disabled,m=void 0!==d&&d,h=e.tooltip,g=void 0===h?"":h,x=e.index,b=void 0===x?0:x,v=e.error,y=void 0===v?"":v,Z=e.required,j=void 0!==Z&&Z,_=e.placeholder,C=void 0===_?"":_,E=e.classes,w={"data-index":b};return(0,f.jsx)(o.Fragment,{children:(0,f.jsxs)(r.ZP,{item:!0,xs:12,className:"".concat(E.fieldContainer," ").concat(""!==y?E.errorInField:""),children:[""!==t&&(0,f.jsxs)(a.Z,{htmlFor:c,className:E.inputLabel,children:[(0,f.jsxs)("span",{children:[t,j?"*":""]}),""!==g&&(0,f.jsx)("div",{className:E.tooltipContainer,children:(0,f.jsx)(l.Z,{title:g,placement:"top-start",children:(0,f.jsx)("div",{className:E.tooltip,children:(0,f.jsx)(p.Z,{})})})})]}),(0,f.jsx)("div",{className:E.textBoxContainer,children:(0,f.jsx)(s.Z,{id:c,name:u,fullWidth:!0,value:i,disabled:m,onChange:n,multiline:!0,rows:5,inputProps:w,error:""!==y,helperText:y,placeholder:C,InputLabelProps:{shrink:!0},InputProps:{classes:{notchedOutline:E.cssOutlinedInput,root:E.rootContainer}},variant:"outlined"})})]})})}))},50276:function(e,t,n){var i=n(1413),o=n(29439),r=n(72791),a=n(64554),l=n(43896),s=n(83449),c=n(47283),u=n(82851),d=n(25787),p=n(13967),f=n(11135),m=n(95193),h=n(16871),g=n(80184),x={minHeight:60};t.Z=(0,d.Z)((function(e){return(0,f.Z)({tabsContainer:{display:"flex",height:"100%",width:"100%"},tabsHeaderContainer:{width:"300px",background:"#F8F8F8",borderRight:"1px solid #EAEAEA","& .MuiTabs-root":{"& .MuiTabs-indicator":{display:"none"},"& .MuiTab-root":{display:"flex",flexFlow:"row",alignItems:"center",justifyContent:"flex-start",borderBottom:"1px solid #EAEAEA","& .MuiSvgIcon-root":{marginRight:8,marginBottom:0},"&.Mui-selected":{background:"#E5E5E5",fontWeight:600}},"&. MuiTabs-scroller":{display:"none"}}},tabContentContainer:{width:"100%","& .MuiTabPanel-root":{height:"100%"}},tabPanel:{height:"100%"},"@media (max-width: 900px)":{tabsContainer:{flexFlow:"column",flexDirection:"column"},tabsHeaderContainer:{width:"100%",borderBottom:" 1px solid #EAEAEA","& .MuiTabs-root .MuiTabs-scroller .MuiButtonBase-root":{borderBottom:" 0px"}}}})}))((function(e){var t=e.children,n=e.classes,d=e.selectedTab,f=void 0===d?"0":d,b=e.routes,v=e.isRouteTabs,y=(0,p.Z)(),Z=(0,h.TH)().pathname,j=void 0===Z?"":Z,_=(0,m.Z)(y.breakpoints.down("md")),C=(0,r.useState)(f),E=(0,o.Z)(C,2),w=E[0],k=E[1],S=[],N=[];if((0,r.useEffect)((function(){if(v){var e=t.find((function(e){return e.tabConfig.to===j}));e&&k(e.tabConfig.value)}}),[v,t,j]),!t)return null;t.forEach((function(e){S.push(e.tabConfig),N.push(e.content)}));return(0,g.jsx)(s.ZP,{value:"".concat(w),children:(0,g.jsxs)(a.Z,{className:n.tabsContainer,children:[(0,g.jsx)(a.Z,{className:n.tabsHeaderContainer,children:(0,g.jsx)(c.Z,{onChange:function(e,t){k(t)},orientation:_?"horizontal":"vertical",variant:_?"scrollable":"standard",scrollButtons:"auto",className:n.tabList,children:S.map((function(e,t){return e?(0,g.jsx)(l.Z,(0,i.Z)((0,i.Z)({className:n.tabHeader,value:"".concat(t),style:x},e),{},{disableRipple:!0,disableTouchRipple:!0,focusRipple:!0}),"v-tab-".concat(t)):null}))})}),(0,g.jsxs)(a.Z,{className:n.tabContentContainer,children:[v?null:N.map((function(e,t){return(0,g.jsx)(u.Z,{classes:(0,i.Z)({},n.tabPanel),value:"".concat(t),children:e||null},"v-tab-p-".concat(t))})),v?(0,g.jsx)("div",{className:n.tabPanel,children:b}):null]})]})})}))},63097:function(e,t,n){n.r(t),n.d(t,{default:function(){return M}});var i=n(1413),o=n(72791),r=n(11135),a=n(25787),l=n(61889),s=n(58493),c=n(23814),u=n(32291),d=n(23804),p=n(56096),f=n(16871),m=n(43504),h=n(50276),g=n(74794),x=n(14917),b=n(29439),v=n(75952),y=n(26181),Z=n.n(y),j=n(64554),_=n(81207),C=n(29478),E=n(40986),w=n(51691),k=n(23508),S=n(87995),N=n(25469),T=n(80184),q=(0,a.Z)((function(e){return(0,r.Z)((0,i.Z)({wrapText:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"}},c.Qw))}))((function(e){var t=e.classes,n=e.configurationName,i=e.closeResetModalAndRefresh,r=e.resetOpen,a=(0,N.TL)(),l=(0,o.useState)(!1),s=(0,b.Z)(l,2),c=s[0],u=s[1];(0,o.useEffect)((function(){c&&_.Z.invoke("POST","/api/v1/configs/".concat(n,"/reset")).then((function(e){u(!1),i(!0)})).catch((function(e){u(!1),a((0,S.Ih)(e))}))}),[i,n,c,a]);return(0,T.jsx)(k.Z,{title:"Restore Defaults",confirmText:"Yes, Reset Configuration",isOpen:r,titleIcon:(0,T.jsx)(p.NvT,{}),isLoading:c,onConfirm:function(){u(!0)},onClose:function(){i(!1)},confirmationContent:(0,T.jsxs)(o.Fragment,{children:[c&&(0,T.jsx)(E.Z,{}),(0,T.jsxs)(w.Z,{children:["Are you sure you want to restore these configurations to default values?",(0,T.jsx)("br",{}),(0,T.jsx)("b",{className:t.wrapText,children:"Please note that this may cause your system to not be accessible"})]})]})})})),A=n(72401),P=n(92983),I=(0,a.Z)((function(e){return(0,r.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},c.YI),c.Je),{},{settingsFormContainer:{display:"grid",gridTemplateColumns:"1fr",gridGap:"10px"}}))}))((function(e){var t=e.classes,n=e.configSubsysList,i=(e.className,(0,o.useState)([])),r=(0,b.Z)(i,2),a=r[0],l=r[1];return(0,o.useEffect)((function(){var e=[];null!==n&&(n.forEach((function(t){null!==t.name&&null!==t.key_values&&(e.push({name:t.name,endpoint:t.key_values[0].value}),"off"===t.key_values[0].value&&(e=[]))})),l(e))}),[n]),(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)("h3",{children:"Currently Configured Endpoints"}),(0,T.jsx)(P.Z,{columns:[{label:"Name",elementKey:"name"},{label:"Endpoint",elementKey:"endpoint"}],idField:"config-id",isLoading:!1,records:a,classes:t,entityName:"endpoints"})]})})),D=(0,a.Z)((function(e){return(0,r.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},c.YI),c.Je),{},{settingsFormContainer:{display:"grid",gridTemplateColumns:"1fr",gridGap:"10px"}}))}))((function(e){var t=e.selectedConfiguration,n=e.classes,i=e.className,r=void 0===i?"":i,a=(0,N.TL)(),c=(0,f.s0)(),u=(0,f.TH)().pathname,d=void 0===u?"":u,p=d.substring(d.lastIndexOf("/")+1);p="settings"===p?"region":p;var m=(0,o.useState)([]),h=(0,b.Z)(m,2),g=h[0],x=h[1],y=(0,o.useState)(!1),E=(0,b.Z)(y,2),w=E[0],k=E[1],P=(0,o.useState)(!0),D=(0,b.Z)(P,2),L=D[0],R=D[1],M=(0,o.useState)([]),F=(0,b.Z)(M,2),B=F[0],O=F[1],W=(0,o.useState)([]),H=(0,b.Z)(W,2),Y=H[0],z=H[1],U=(0,o.useState)(!1),G=(0,b.Z)(U,2),V=G[0],K=G[1];(0,o.useEffect)((function(){R(!0)}),[p]),(0,o.useEffect)((function(){if(L){var e=Z()(t,"configuration_id",!1);if(e)return void _.Z.invoke("GET","/api/v1/configs/".concat(e)).then((function(e){z(e);var t=Z()(e[0],"key_values",[]);O(t),R(!1)})).catch((function(e){R(!1),a((0,S.Ih)(e))}));R(!1)}}),[L,t,a]),(0,o.useEffect)((function(){if(w){var e={key_values:(0,s.DD)(g)};_.Z.invoke("PUT","/api/v1/configs/".concat(t.configuration_id),e).then((function(e){k(!1),a((0,S.cN)(e.restart)),e.restart||a((0,S.y1)("Configuration saved successfully"))})).catch((function(e){k(!1),a((0,S.Ih)(e))}))}}),[w,a,t,g,c]);var J=(0,o.useCallback)((function(e){x(e)}),[x]);return(0,T.jsxs)(o.Fragment,{children:[V&&(0,T.jsx)(q,{configurationName:t.configuration_id,closeResetModalAndRefresh:function(e){K(!1),a((0,S.cN)(e)),e&&R(!0)},resetOpen:V}),L?(0,T.jsx)(l.ZP,{item:!0,xs:12,sx:{textAlign:"center",paddingTop:"15px"},children:(0,T.jsx)(A.Z,{})}):(0,T.jsx)(j.Z,{sx:{padding:"15px",height:"100%"},children:(0,T.jsxs)("form",{noValidate:!0,onSubmit:function(e){e.preventDefault(),k(!0)},className:r,style:{height:"100%",display:"flex",flexFlow:"column"},children:[(0,T.jsxs)(l.ZP,{item:!0,xs:12,className:n.settingsFormContainer,children:[(0,T.jsx)(C.default,{fields:s.DP[t.configuration_id],onChange:J,defaultVals:B}),("logger_webhook"===t.configuration_id||"audit_webhook"===t.configuration_id)&&(0,T.jsx)(I,{classes:n,configSubsysList:Y})]}),(0,T.jsxs)(l.ZP,{item:!0,xs:12,sx:{paddingTop:"15px ",textAlign:"right",maxHeight:"60px",display:"flex",alignItems:"center",justifyContent:"flex-end"},children:[(0,T.jsx)(v.zx,{id:"restore-defaults",variant:"secondary",onClick:function(){K(!0)},label:"Restore Defaults"}),"\xa0 \xa0",(0,T.jsx)(v.zx,{id:"save",type:"submit",variant:"callAction",disabled:w,label:"Save"})]})]})})]})})),L=function(){var e=(0,f.TH)().pathname,t=void 0===e?"":e,n=t.substring(t.lastIndexOf("/")+1),i=s.bx.find((function(e){return e.configuration_id===n})),o="".concat(n);return(0,T.jsx)(l.ZP,{item:!0,xs:12,sx:{height:"100%","& .identity_ldap, .api":{"& label":{minWidth:220,marginRight:0}}},children:i&&(0,T.jsx)(D,{className:"".concat(o),selectedConfiguration:i})})},R=n(56087),M=(0,a.Z)((function(e){return(0,r.Z)((0,i.Z)((0,i.Z)((0,i.Z)({settingsOptionsContainer:{display:"flex",flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",border:"#E5E5E5 1px solid",borderRadius:2,backgroundColor:"#fff"}},c.qg),c.OR),(0,c.Bz)(e.spacing(4))))}))((function(e){var t=e.classes,n=(0,f.TH)().pathname,i=void 0===n?"":n,r=i.substring(i.lastIndexOf("/")+1);return r="settings"===r?"region":r,(0,T.jsxs)(o.Fragment,{children:[(0,T.jsx)(u.Z,{label:"Settings"}),(0,T.jsxs)(g.Z,{children:[(0,T.jsx)(l.ZP,{item:!0,xs:12,children:(0,T.jsxs)("div",{id:"settings-container",className:t.settingsOptionsContainer,children:[(0,T.jsx)(x.Z,{icon:(0,T.jsx)(p.ewm,{}),title:"MinIO Configuration:"}),(0,T.jsx)(h.Z,{selectedTab:r,isRouteTabs:!0,routes:(0,T.jsxs)(f.Z5,{children:[s.bx.map((function(e){return(0,T.jsx)(f.AW,{path:"".concat(e.configuration_id),element:(0,T.jsx)(L,{})},"configItem-".concat(e.configuration_label))})),(0,T.jsx)(f.AW,{path:"/",element:(0,T.jsx)(f.Fg,{to:"".concat(R.gA.SETTINGS,"/region")})})]}),children:s.bx.map((function(e){var t,n=e.configuration_id;return{tabConfig:{label:e.configuration_label,value:n,icon:e.icon,component:m.rU,to:(t=n,"".concat(R.gA.SETTINGS,"/").concat(t))}}}))})]})}),(0,T.jsx)(l.ZP,{item:!0,xs:12,sx:{paddingTop:"15px"},children:(0,T.jsx)(d.Z,{title:"Learn more about Configurations",iconComponent:(0,T.jsx)(p.ewm,{}),help:(0,T.jsxs)(o.Fragment,{children:["MinIO supports a variety of configurations ranging from encryption, compression, region, notifications, etc.",(0,T.jsx)("br",{}),(0,T.jsx)("br",{}),"You can learn more at our"," ",(0,T.jsx)("a",{href:"https://min.io/docs/minio/linux/reference/minio-mc-admin/mc-admin-config.html?ref=con#id4",target:"_blank",rel:"noreferrer",children:"documentation"}),"."]})})})]})]})}))},58493:function(e,t,n){n.d(t,{DD:function(){return x},DP:function(){return g},_0:function(){return b},bx:function(){return h}});var i=n(93433),o=(n(72791),n(87569)),r=n(61809),a=n(31292),l=n(98095),s=n(67055),c=n(21141),u=n(61248),d=n(50521),p=n(36909),f=n(13901),m=n(80184),h=[{icon:(0,m.jsx)(o.Z,{}),configuration_id:"region",configuration_label:"Region"},{icon:(0,m.jsx)(r.Z,{}),configuration_id:"compression",configuration_label:"Compression"},{icon:(0,m.jsx)(a.Z,{}),configuration_id:"api",configuration_label:"API"},{icon:(0,m.jsx)(l.Z,{}),configuration_id:"heal",configuration_label:"Heal"},{icon:(0,m.jsx)(s.Z,{}),configuration_id:"scanner",configuration_label:"Scanner"},{icon:(0,m.jsx)(c.Z,{}),configuration_id:"etcd",configuration_label:"Etcd"},{icon:(0,m.jsx)(u.Z,{}),configuration_id:"identity_openid",configuration_label:"Identity Openid"},{icon:(0,m.jsx)(d.Z,{}),configuration_id:"identity_ldap",configuration_label:"Identity LDAP"},{icon:(0,m.jsx)(f.Z,{}),configuration_id:"logger_webhook",configuration_label:"Logger Webhook"},{icon:(0,m.jsx)(p.Z,{}),configuration_id:"audit_webhook",configuration_label:"Audit Webhook"}],g={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 custom notes if any"}],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}],api:[{name:"requests_max",required:!1,label:"Requests Max",tooltip:"Maximum number of concurrent requests, e.g. '1600'",type:"number",placeholder:"Enter Requests Max"},{name:"cors_allow_origin",required:!1,label:"Cors Allow Origin",tooltip:"List of origins allowed for CORS requests",type:"csv",placeholder:"Enter allowed origin e.g. https://example.com"},{name:"replication_workers",required:!1,label:"Replication Workers",tooltip:"Number of replication workers, defaults to 100",type:"number",placeholder:"Enter Replication Workers"},{name:"replication_failed_workers",required:!1,label:"Replication Failed Workers",tooltip:"Number of replication workers for recently failed replicas, defaults to 4",type:"number",placeholder:"Enter Replication Failed Workers"}],heal:[{name:"bitrotscan",required:!1,label:"Bitrot Scan",tooltip:"Perform bitrot scan on disks when checking objects during scanner",type:"on|off"},{name:"max_sleep",required:!1,label:"Max Sleep",tooltip:"Maximum sleep duration between objects to slow down heal operation. eg. 2s",type:"duration",placeholder:"Enter Max Sleep duration"},{name:"max_io",required:!1,label:"Max IO",tooltip:"Maximum IO requests allowed between objects to slow down heal operation. eg. 3",type:"number",placeholder:"Enter Max IO"}],scanner:[{name:"delay",required:!1,label:"Delay multiplier",tooltip:"Scanner delay multiplier, defaults to '10.0'",type:"number",placeholder:"Enter Delay"},{name:"max_wait",required:!1,label:"Max Wait",tooltip:"Maximum wait time between operations, defaults to '15s'",type:"duration",placeholder:"Enter Max Wait"},{name:"cycle",required:!1,label:"Cycle",tooltip:"Time duration between scanner cycles, defaults to '1m'",type:"duration",placeholder:"Enter Cycle"}],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 custom notes if any"}],identity_openid:[{name:"config_url",required:!1,label:"Config URL",tooltip:"Config URL for identity provider configuration",type:"string",placeholder:"https://identity-provider-url/.well-known/openid-configuration"},{name:"client_id",required:!1,label:"Client ID",type:"string",placeholder:"Enter Client ID"},{name:"client_secret",required:!1,label:"Secret ID",type:"string",placeholder:"Enter Secret ID"},{name:"claim_name",required:!1,label:"Claim Name",tooltip:"Claim from which MinIO will read the policy or role to use",type:"string",placeholder:"Enter Claim Name"},{name:"claim_prefix",required:!1,label:"Claim Prefix",tooltip:"Claim Prefix",type:"string",placeholder:"Enter Claim Prefix"},{name:"claim_userinfo",required:!1,label:"Claim UserInfo",type:"on|off"},{name:"redirect_uri",required:!1,label:"Redirect URI",type:"string",placeholder:"https://console-endpoint-url/oauth_callback"},{name:"scopes",required:!1,label:"Scopes",type:"string",placeholder:"openid,profile,email"}],identity_ldap:[{name:"server_addr",required:!0,label:"Server Addr",tooltip:'AD/LDAP server address e.g. "myldapserver.com:636"',type:"string",placeholder:"myldapserver.com:636"},{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:"server_starttls",required:!1,label:"Start TLS connection to AD/LDAP server",tooltip:"Use StartTLS connection to AD/LDAP server",type:"on|off"},{name:"lookup_bind_dn",required:!0,label:"Lookup Bind DN",tooltip:"DN for LDAP read-only service account used to perform DN and group lookups",type:"string",placeholder:"cn=admin,dc=min,dc=io"},{name:"lookup_bind_password",required:!1,label:"Lookup Bind Password",tooltip:"Password for LDAP read-only service account used to perform DN and group lookups",type:"string",placeholder:"admin"},{name:"user_dn_search_base_dn",required:!1,label:"User DN Search Base DN",tooltip:"Base LDAP DN to search for user DN",type:"csv",placeholder:"dc=myldapserver"},{name:"user_dn_search_filter",required:!1,label:"User DN Search Filter",tooltip:"Search filter to lookup user DN",type:"string",placeholder:"(sAMAcountName=%s)"},{name:"group_search_filter",required:!1,label:"Group Search Filter",tooltip:"Search filter for groups",type:"string",placeholder:"(&(objectclass=groupOfNames)(member=%d))"},{name:"group_search_base_dn",required:!1,label:"Group Search Base DN",tooltip:"List of group search base DNs",type:"csv",placeholder:"dc=minioad,dc=local"},{name:"comment",required:!1,label:"Comment",tooltip:"Optionally add a comment to this setting",type:"comment",placeholder:"Enter custom notes if any"}],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"}]},x=function(e){return e.filter((function(e){return""!==e.value}))},b=function(e,t,n){var o=e.target,r=o.value,a=o.checked,l=(0,i.Z)(n);return a?l.push(r):l=l.filter((function(e){return e!==r})),t(l),l}},29478:function(e,t,n){n.r(t),n.d(t,{default:function(){return _},valueDef:function(){return j}});var i=n(93433),o=n(29439),r=n(1413),a=n(72791),l=n(11135),s=n(25787),c=n(61889),u=n(23814),d=n(21435),p=n(26181),f=n.n(p),m=n(30829),h=n(20068),g=n(84570),x=n(47919),b=n(80184),v=(0,s.Z)((function(e){return(0,l.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},u.YI),u.Hr),{},{inputWithBorder:{border:"1px solid #EAEAEA",padding:15,height:150,overflowY:"auto",position:"relative",marginTop:15,flex:1},inputBoxSpacer:{marginBottom:7},inputLabel:(0,r.Z)((0,r.Z)({},u.YI.inputLabel),{},{margin:0,alignItems:"flex-start",paddingTop:"20px",minWidth:162})}))}))((function(e){var t=e.elements,n=e.name,r=e.label,l=e.tooltip,s=void 0===l?"":l,u=e.commonPlaceholder,p=void 0===u?"":u,v=e.onChange,y=e.withBorder,Z=void 0!==y&&y,j=e.classes,_=(0,a.useState)([""]),C=(0,o.Z)(_,2),E=C[0],w=C[1],k=(0,a.createRef)();(0,a.useEffect)((function(){if(1===E.length&&""===E[0]&&t&&""!==t){var e=t.split(",");e.push(""),w(e)}}),[t,E]),(0,a.useEffect)((function(){if(E.length>1){var e=k.current;e&&e.scrollIntoView(!1)}}),[E,k]);var S=(0,a.useCallback)((function(e){v(e)}),[v]),N=(0,a.useRef)(!0);(0,a.useEffect)((function(){if(N.current)N.current=!1;else{var e=E.filter((function(e){return""!==e.trim()})).join(",");S(e)}}),[E]);var T=function(e){e.persist();var t=(0,i.Z)(E);t[f()(e.target,"dataset.index",0)]=e.target.value,w(t)},q=E.map((function(e,t){return(0,b.jsx)("div",{className:j.inputBoxSpacer,children:(0,b.jsx)(d.Z,{id:"".concat(n,"-").concat(t.toString()),label:"",name:"".concat(n,"-").concat(t.toString()),value:E[t],onChange:T,index:t,placeholder:p,overlayIcon:t===E.length-1?(0,b.jsx)(x.Z,{}):null,overlayAction:function(){!function(e){if(""!==e[e.length-1].trim()){var t=(0,i.Z)(e);t.push(""),w(t)}}(E)}},"csv-".concat(n,"-").concat(t.toString()))},"csv-multi-".concat(n,"-").concat(t.toString()))}));return(0,b.jsx)(a.Fragment,{children:(0,b.jsxs)(c.ZP,{item:!0,xs:12,className:j.fieldContainer,children:[(0,b.jsxs)(m.Z,{className:j.inputLabel,children:[(0,b.jsx)("span",{children:r}),""!==s&&(0,b.jsx)("div",{className:j.tooltipContainer,children:(0,b.jsx)(h.Z,{title:s,placement:"top-start",children:(0,b.jsx)("div",{className:j.tooltip,children:(0,b.jsx)(g.Z,{})})})})]}),(0,b.jsxs)(c.ZP,{item:!0,xs:12,className:"".concat(Z?j.inputWithBorder:""),children:[q,(0,b.jsx)("div",{ref:k})]})]})})})),y=n(57314),Z=n(37516),j=function(e,t,n){var i="on|off"===t?"off":"";if(n.length>0){var o=n.find((function(t){return t.key===e}));o&&(i=o.value||"")}return i},_=(0,s.Z)((function(e){return(0,l.Z)((0,r.Z)((0,r.Z)({},u.DF),{},{formFieldRow:(0,r.Z)({},u.DF.formFieldRow)},u.oO))}))((function(e){var t=e.onChange,n=e.fields,r=e.defaultVals,l=e.classes,s=(0,a.useState)([]),u=(0,o.Z)(s,2),p=u[0],f=u[1],m=n||[],h=r||[];(0,a.useEffect)((function(){var e=n.map((function(e){return{key:e.name,value:j(e.name,e.type,h)}}));f(e)}),[n,r]),(0,a.useEffect)((function(){t(p)}),[p]);var g=function(e,t,n){var o=(0,i.Z)(p);o[n]={key:e,value:t},f(o)},x=function(e,t){switch(e.type){case"on|off":var n=p[t]?p[t].value:"off";return(0,b.jsx)(Z.Z,{onChange:function(n){var i=n.target.checked?"on":"off";g(e.name,i,t)},id:e.name,name:e.name,label:e.label,value:"switch_on",tooltip:e.tooltip,checked:"on"===n});case"csv":return(0,b.jsx)(v,{elements:p[t]?p[t].value:"",label:e.label,name:e.name,onChange:function(n){g(e.name,n,t)},tooltip:e.tooltip,commonPlaceholder:e.placeholder,withBorder:!0});case"comment":return(0,b.jsx)(y.Z,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:p[t]?p[t].value:"",onChange:function(n){return g(e.name,n.target.value,t)},placeholder:e.placeholder});default:return(0,b.jsx)(d.Z,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:p[t]?p[t].value:"",onChange:function(n){return g(e.name,n.target.value,t)},multiline:!!e.multiline,placeholder:e.placeholder})}};return(0,b.jsx)(c.ZP,{container:!0,children:(0,b.jsx)(c.ZP,{xs:12,item:!0,className:l.fieldBox,children:m.map((function(e,t){return(0,b.jsx)(c.ZP,{item:!0,xs:12,className:l.formFieldRow,children:x(e,t)},e.name)}))})})}))}}]);
|
|
//# sourceMappingURL=3097.86eccc21.chunk.js.map
|