\ No newline at end of file
diff --git a/web-app/build/static/js/1324.71a25603.chunk.js b/web-app/build/static/js/1324.71a25603.chunk.js
new file mode 100644
index 0000000000..1382cdb7f5
--- /dev/null
+++ b/web-app/build/static/js/1324.71a25603.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[1324,5851,4705],{94141:(e,s,t)=>{t.d(s,{A:()=>d});var l=t(65043),n=t(22166),o=t(89923),i=t(21383),r=t(64159),c=t(49555),a=t(70579);const d=e=>{let{onClose:s,modalOpen:t,title:d,children:u,wideLimit:p=!0,titleIcon:x=null,iconColor:h="default",sx:m}=e;const j=(0,i.jL)(),[g,b]=(0,l.useState)(!1),y=(0,n.d4)((e=>e.system.modalSnackBar));(0,l.useEffect)((()=>{j((0,r.h0)(""))}),[j]),(0,l.useEffect)((()=>{if(y){if(""===y.message)return void b(!1);"error"!==y.type&&b(!0)}}),[y]);let f="";return y&&(f=y.detailedErrorMsg,(""===f||f&&f.length<5)&&(f=y.message)),(0,a.jsxs)(o.ngX,{onClose:s,open:t,title:d,titleIcon:x,widthLimit:p,sx:m,iconColor:h,children:[(0,a.jsx)(c.A,{isModal:!0}),(0,a.jsx)(o.qb_,{onClose:()=>{b(!1),j((0,r.h0)(""))},open:g,message:f,mode:"inline",variant:"error"===y.type?"error":"default",autoHideDuration:"error"===y.type?10:5,condensed:!0}),u]})}},85851:(e,s,t)=>{t.r(s),t.d(s,{default:()=>u});var l=t(65043),n=t(89923),o=t(64159),i=t(21383),r=t(58661),c=t(56629),a=t(53518),d=t(70579);const u=e=>{let{selectedGroups:s,deleteOpen:t,closeDeleteModalAndRefresh:u}=e;const p=(0,i.jL)(),[x,h]=(0,l.useState)(!1);if(!s)return null;const m=s.map((e=>(0,d.jsx)("div",{children:(0,d.jsx)("b",{children:e})},e)));return(0,d.jsx)(r.A,{title:"Delete Group".concat(s.length>1?"s":""),confirmText:"Delete",isOpen:t,titleIcon:(0,d.jsx)(n.xWY,{}),isLoading:x,onConfirm:()=>{for(let e of s)h(!0),c.F.group.removeGroup(e).then((e=>{u(!0)})).catch((async e=>{const s=await e.json();p((0,o.C9)((0,a.S)(s))),u(!1)})).finally((()=>h(!1)))},onClose:()=>u(!1),confirmationContent:(0,d.jsxs)(l.Fragment,{children:["Are you sure you want to delete the following"," ",1===s.length?"":s.length," group",s.length>1?"s?":"?",m]})})}},91324:(e,s,t)=>{t.r(s),t.d(s,{default:()=>C});var l=t(65043),n=t(73216),o=t(89923),i=t(56629),r=t(53518),c=t(99161),a=t(77938),d=t(64159),u=t(21383),p=t(62560),x=t(74705),h=t(77403),m=t(22923),j=t(94141),g=t(70579);const b=e=>{let{title:s="",groupStatus:t="enabled",preSelectedUsers:n=[],selectedGroup:c="",open:a,onClose:p}=e;const x=(0,u.jL)(),[b,y]=(0,l.useState)(n);return(0,g.jsxs)(j.A,{modalOpen:a,onClose:p,title:s,titleIcon:(0,g.jsx)(o.WC,{}),children:[(0,g.jsxs)(o.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,g.jsx)(o.EmB,{label:"Selected Group",sx:{width:"100%"},children:c}),(0,g.jsx)(m.A,{selectedUsers:b,setSelectedUsers:y,editMode:!c})]}),(0,g.jsxs)(o.xA9,{item:!0,xs:12,sx:h.Uz.modalButtonBar,children:[(0,g.jsx)(o.$nd,{id:"reset-add-group-member",type:"button",variant:"regular",onClick:()=>{y(n)},label:"Reset"}),(0,g.jsx)(o.$nd,{id:"save-add-group-member",type:"button",variant:"callAction",onClick:()=>{i.F.group.updateGroup(c,{members:b,status:t}).then((()=>{p()})).catch((e=>{p(),x((0,d.Dy)((0,r.S)(e.error)))}))},label:"Save"})]})]})};var y=t(85851),f=t(64681),v=t(6681),A=t(55968),S=t(48793);const C=()=>{const e=(0,u.jL)(),s=(0,n.Zp)(),t=(0,n.g)(),[h,m]=(0,l.useState)({}),[j,C]=(0,l.useState)(!1),[P,G]=(0,l.useState)(!1),[M,U]=(0,l.useState)(!1),[k,w]=(0,l.useState)(""),[E,L]=(0,l.useState)("members"),{members:z=[],policy:D="",status:I}=h,N=z.filter((e=>e.includes(k))),R=(0,a._)(c.Ms,c.Ld,!0);(0,l.useEffect)((()=>{e((0,d.ph)("group_details"))}),[]),(0,l.useEffect)((()=>{t.groupName&&J()}),[t.groupName]);const F=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.length<=0?[]:e.split(",")}(D),B="enabled"===I,K=z.length>0?"Edit Members":"Add Members",_=(0,a._)(c.Ms,c.Oh),O=(0,a._)(c.Ms,c.Hr,!0),H=(0,a._)(c.Ms,c.QR,!0),$=(0,a._)(c.Ms,c.yv,!0);function J(){_&&i.F.group.groupInfo(t.groupName||"").then((e=>{m(e.data)})).catch((s=>{e((0,d.Dy)((0,r.S)(s.error))),m({})}))}const T=(0,g.jsxs)(o.azJ,{onMouseMove:()=>{e((0,d.ph)("groups_members"))},children:[(0,g.jsx)(o._xt,{separator:!0,sx:{marginBottom:15},actions:(0,g.jsxs)(o.azJ,{sx:{display:"flex",gap:10},children:[(0,g.jsx)(f.A,{placeholder:"Search members",onChange:e=>{w(e)},value:k,sx:{maxWidth:280}}),(0,g.jsx)(a.R,{resource:c.Ms,scopes:c.BD,errorProps:{disabled:!0},children:(0,g.jsx)(v.A,{tooltip:O?K:(0,c.vj)(c.k1,"edit Group membership"),children:(0,g.jsx)(o.$nd,{id:"add-user-group",label:K,variant:"callAction",icon:(0,g.jsx)(o.REV,{}),onClick:()=>{G(!0)},disabled:!O})})})]}),children:"Members"}),(0,g.jsx)(o.xA9,{item:!0,xs:12,children:(0,g.jsx)(a.R,{resource:c.Ms,scopes:c.x6,errorProps:{disabled:!0},children:(0,g.jsx)(v.A,{tooltip:R?"":(0,c.vj)(c.Ld,"view User details"),children:(0,g.jsx)(o.bQt,{itemActions:[{type:"view",onClick:e=>{s("".concat(c.zZ.USERS,"/").concat(encodeURIComponent(e)))},isDisabled:!R}],columns:[{label:"Access Key"}],selectedItems:[],isLoading:!1,records:N,entityName:"Users"})})})})]}),Q=(0,g.jsxs)(l.Fragment,{children:[(0,g.jsx)(o.azJ,{onMouseMove:()=>{e((0,d.ph)("groups_policies"))},children:(0,g.jsx)(o._xt,{separator:!0,sx:{marginBottom:15},actions:(0,g.jsx)(v.A,{tooltip:H?"Set Policies":(0,c.vj)(c.QR,"assign Policies"),children:(0,g.jsx)(o.$nd,{id:"set-policies",label:"Set Policies",variant:"callAction",icon:(0,g.jsx)(o.n$X,{}),onClick:()=>{C(!0)},disabled:!H})}),children:"Policies"})}),(0,g.jsx)(o.xA9,{item:!0,xs:12,children:(0,g.jsx)(v.A,{tooltip:$?"":(0,c.vj)(c.yv,"view Policy details"),children:(0,g.jsx)(o.bQt,{itemActions:[{type:"view",onClick:e=>{s("".concat(c.zZ.POLICIES,"/").concat(encodeURIComponent(e)))},isDisabled:!$}],columns:[{label:"Policy"}],isLoading:!1,records:F,entityName:"Policies"})})})]});return(0,g.jsxs)(l.Fragment,{children:[j?(0,g.jsx)(x.default,{open:j,selectedGroups:[t.groupName||""],selectedUser:null,closeModalAndRefresh:()=>{C(!1),J(),e((0,p.Gy)([]))}}):null,P?(0,g.jsx)(b,{selectedGroup:t.groupName,onSaveClick:()=>{},title:K,groupStatus:I,preSelectedUsers:z,open:P,onClose:()=>{G(!1),J()}}):null,M&&(0,g.jsx)(y.default,{deleteOpen:M,selectedGroups:[t.groupName||""],closeDeleteModalAndRefresh:e=>{U(!1),e&&s(c.zZ.GROUPS)}}),(0,g.jsx)(S.A,{label:(0,g.jsx)(l.Fragment,{children:(0,g.jsx)(o.EGL,{label:"Groups",onClick:()=>s(c.zZ.GROUPS)})}),actions:(0,g.jsx)(A.A,{})}),(0,g.jsxs)(o.Mxu,{children:[(0,g.jsx)(o.xA9,{item:!0,xs:12,children:(0,g.jsx)(o.lcx,{icon:(0,g.jsx)(l.Fragment,{children:(0,g.jsx)(o.YXz,{width:40})}),title:t.groupName||"",subTitle:null,bottomBorder:!0,actions:(0,g.jsxs)(o.azJ,{sx:{display:"flex",fontSize:14,alignItems:"center",gap:15},children:[(0,g.jsx)("span",{children:"Group Status:"}),(0,g.jsx)("span",{id:"group-status-label",style:{fontWeight:"bold"},children:B?"Enabled":"Disabled"}),(0,g.jsx)(v.A,{tooltip:(0,a._)(c.Ms,c.pf,!0)?"":(0,c.vj)(c.pf,"enable or disable Groups"),children:(0,g.jsx)(a.R,{resource:c.Ms,scopes:c.pf,errorProps:{disabled:!0},matchAll:!0,children:(0,g.jsx)(o.dOG,{indicatorLabels:["Enabled","Disabled"],checked:B,value:"group_enabled",id:"group-status",name:"group-status",onChange:()=>{var s;s=!B,i.F.group.updateGroup(t.groupName||"",{members:z,status:s?"enabled":"disabled"}).then((()=>{J()})).catch((s=>{e((0,d.Dy)((0,r.S)(s.error)))}))},switchOnly:!0})})}),(0,g.jsx)(v.A,{tooltip:"Delete Group",children:(0,g.jsx)(o.$nd,{id:"delete-user-group",variant:"secondary",icon:(0,g.jsx)(o.ucK,{}),onClick:()=>{U(!0)}})})]}),sx:{marginBottom:15}})}),(0,g.jsx)(o.xA9,{item:!0,xs:12,children:(0,g.jsx)(o.tUM,{options:[{tabConfig:{id:"members",label:"Members"},content:T},{tabConfig:{id:"policies",label:"Policies"},content:Q}],currentTabOrPath:E,onTabClick:L})})]})]})}},22923:(e,s,t)=>{t.d(s,{A:()=>h});var l=t(65043),n=t(33097),o=t.n(n),i=t(56629),r=t(53518),c=t(89923),a=t(8185),d=t(64159),u=t(21383),p=t(64681),x=t(70579);const h=e=>{let{selectedUsers:s,setSelectedUsers:t,editMode:n=!1}=e;const h=(0,u.jL)(),[m,j]=(0,l.useState)([]),[g,b]=(0,l.useState)(!1),[y,f]=(0,l.useState)(""),v=(0,l.useCallback)((()=>{i.F.users.listUsers().then((e=>{let s=o()(e.data,"users",[]);s||(s=[]),j(s.sort(a.LA)),b(!1)})).catch((e=>{h((0,d.Dy)((0,r.S)(e.error))),b(!1)}))}),[h]);(0,l.useEffect)((()=>{b(!0)}),[]),(0,l.useEffect)((()=>{g&&v()}),[g,v]);const A=s||[],S=m.filter((e=>e.accessKey.includes(y)));return(0,x.jsx)(c.xA9,{item:!0,xs:12,className:"inputItem",children:(0,x.jsxs)(c.azJ,{children:[g&&(0,x.jsx)(c.z21,{}),(null===m||void 0===m?void 0:m.length)>0?(0,x.jsxs)(l.Fragment,{children:[(0,x.jsx)(c.xA9,{item:!0,xs:12,className:"inputItem",children:(0,x.jsx)(p.A,{label:n?"Edit Members":"Assign Users",placeholder:"Filter Users",onChange:f,value:y})}),(0,x.jsx)(c.bQt,{columns:[{label:"Access Key",elementKey:"accessKey"}],onSelect:e=>{const s=e.target,l=s.value,n=s.checked;let o=[...A];return n?o.push(l):o=o.filter((e=>e!==l)),t(o),o},selectedItems:A,isLoading:g,records:S,entityName:"Users",idField:"accessKey",customPaperHeight:"200px"})]}):(0,x.jsx)(c.azJ,{sx:{textAlign:"center",padding:"10px 0"},children:"No Users to display"})]})})}},42967:(e,s,t)=>{t.d(s,{A:()=>x});var l=t(65043),n=t(89923),o=t(8185),i=t(64681),r=t(64159),c=t(21383),a=t(62560),d=t(22166),u=t(56629),p=t(70579);const x=e=>{let{noTitle:s=!1}=e;const t=(0,c.jL)(),[x,h]=(0,l.useState)([]),[m,j]=(0,l.useState)(!1),[g,b]=(0,l.useState)(""),y=(0,d.d4)((e=>e.createUser.selectedPolicies)),f=(0,l.useCallback)((()=>{j(!0),u.F.policies.listPolicies().then((e=>{var s;const t=null!==(s=e.data.policies)&&void 0!==s?s:[];j(!1),h(t.sort(o.Hw))})).catch((e=>{j(!1),t((0,r.Dy)(e))}))}),[t]);(0,l.useEffect)((()=>{j(!0)}),[]),(0,l.useEffect)((()=>{m&&f()}),[m,f]);const v=x.filter((e=>e.name.includes(g)));return(0,p.jsxs)(n.xA9,{item:!0,xs:12,className:"inputItem",children:[m&&(0,p.jsx)(n.z21,{}),x.length>0?(0,p.jsxs)(l.Fragment,{children:[(0,p.jsx)(n.xA9,{item:!0,xs:12,className:"inputItem",children:(0,p.jsx)(i.A,{placeholder:"Start typing to search for a Policy",onChange:e=>{b(e)},value:g,label:s?"":"Assign Policies"})}),(0,p.jsx)(n.bQt,{columns:[{label:"Policy",elementKey:"name"}],onSelect:e=>{const s=e.target,l=s.value,n=s.checked;let o=[...y];n?o.push(l):o=o.filter((e=>e!==l)),o=o.filter((e=>""!==e)),t((0,a.Gy)(o))},selectedItems:y,isLoading:m,records:v,entityName:"Policies",idField:"name",customPaperHeight:"200px"})]}):(0,p.jsx)(n.azJ,{sx:{textAlign:"center",padding:"10px 0"},children:"No Policies Available"})]})}},74705:(e,s,t)=>{t.r(s),t.d(s,{default:()=>j});var l=t(65043),n=t(33097),o=t.n(n),i=t(22166),r=t(89923),c=t(64159),a=t(21383),d=t(77403),u=t(62560),p=t(94141),x=t(42967),h=t(20649),m=t(70579);const j=e=>{let{closeModalAndRefresh:s,selectedUser:t,selectedGroups:n,open:j}=e;const g=(0,a.jL)(),[b,y]=(0,l.useState)(!1),[f,v]=(0,l.useState)([]),[A,S]=(0,l.useState)([]),C=(0,i.d4)((e=>e.createUser.selectedPolicies));(0,l.useEffect)((()=>{if(j){if(1===(null===n||void 0===n?void 0:n.length))return void(1===(null===n||void 0===n?void 0:n.length)&&h.A.invoke("GET","/api/v1/group/".concat(encodeURIComponent(n[0]))).then((e=>{const s=o()(e,"policy","");v(s.split(",")),S(s.split(",")),g((0,u.Gy)(s.split(",")))})).catch((e=>{g((0,c.Dy)(e)),y(!1)})));const e=o()(t,"policy",[]);v(e),S(e),g((0,u.Gy)(e))}}),[j,null===n||void 0===n?void 0:n.length,t]);const P=o()(t,"accessKey","");return(0,m.jsxs)(p.A,{onClose:()=>{s()},modalOpen:j,title:"Set Policies",children:[(0,m.jsxs)(r.Hbc,{withBorders:!1,containerPadding:!1,children:[(1===(null===n||void 0===n?void 0:n.length)||null!=t)&&(0,m.jsxs)(l.Fragment,{children:[(0,m.jsx)(r.EmB,{label:"Selected ".concat(null!==n?"Group":"User"),sx:{width:"100%"},children:null!==n?n[0]:P}),(0,m.jsx)(r.EmB,{label:"Current Policy",sx:{width:"100%"},children:f.join(", ")})]}),n&&(null===n||void 0===n?void 0:n.length)>1&&(0,m.jsx)(r.EmB,{label:"Selected Groups",sx:{width:"100%"},children:n.join(", ")}),(0,m.jsx)(r.xA9,{item:!0,xs:12,children:(0,m.jsx)(x.A,{selectedPolicy:A})})]}),(0,m.jsxs)(r.xA9,{item:!0,xs:12,sx:d.Uz.modalButtonBar,children:[(0,m.jsx)(r.$nd,{id:"reset",type:"button",variant:"regular",onClick:()=>{S(f),g((0,u.Gy)(f))},label:"Reset"}),(0,m.jsx)(r.$nd,{id:"save",type:"button",variant:"callAction",color:"primary",disabled:b,onClick:()=>{let e=null,l=null;null!==n?l=n:null!==t&&(e=[t.accessKey]||0),y(!0),h.A.invoke("PUT","/api/v1/set-policy-multi",{name:C,groups:l,users:e}).then((()=>{y(!1),s()})).catch((e=>{y(!1),g((0,c.Dy)(e))}))},label:"Save"})]}),b&&(0,m.jsx)(r.xA9,{item:!0,xs:12,children:(0,m.jsx)(r.z21,{})})]})}},8185:(e,s,t)=>{t.d(s,{Hw:()=>n,LA:()=>l,SO:()=>o,rY:()=>i});const l=(e,s)=>{if(e.accessKey&&s.accessKey){if(e.accessKey>s.accessKey)return 1;if(e.accessKeye.name>s.name?1:e.namee>s?1:ee.policy>s.policy?1:e.policy.\nimport React, { useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { ModalBox, Snackbar } from \"mds\";\nimport { CSSObject } from \"styled-components\";\nimport { AppState, useAppDispatch } from \"../../../../store\";\nimport { setModalSnackMessage } from \"../../../../systemSlice\";\nimport MainError from \"../MainError/MainError\";\n\ninterface IModalProps {\n onClose: () => void;\n modalOpen: boolean;\n title: string | React.ReactNode;\n children: any;\n wideLimit?: boolean;\n titleIcon?: React.ReactNode;\n iconColor?: \"default\" | \"delete\" | \"accept\";\n sx?: CSSObject;\n}\n\nconst ModalWrapper = ({\n onClose,\n modalOpen,\n title,\n children,\n wideLimit = true,\n titleIcon = null,\n iconColor = \"default\",\n sx,\n}: IModalProps) => {\n const dispatch = useAppDispatch();\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n const modalSnackMessage = useSelector(\n (state: AppState) => state.system.modalSnackBar,\n );\n\n useEffect(() => {\n dispatch(setModalSnackMessage(\"\"));\n }, [dispatch]);\n\n useEffect(() => {\n if (modalSnackMessage) {\n if (modalSnackMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n if (modalSnackMessage.type !== \"error\") {\n setOpenSnackbar(true);\n }\n }\n }, [modalSnackMessage]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n dispatch(setModalSnackMessage(\"\"));\n };\n\n let message = \"\";\n\n if (modalSnackMessage) {\n message = modalSnackMessage.detailedErrorMsg;\n if (message === \"\" || (message && message.length < 5)) {\n message = modalSnackMessage.message;\n }\n }\n\n return (\n \n \n \n {children}\n \n );\n};\n\nexport default ModalWrapper;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { ConfirmDeleteIcon } from \"mds\";\nimport { setErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport ConfirmDialog from \"../Common/ModalWrapper/ConfirmDialog\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { ApiError, HttpResponse } from \"api/consoleApi\";\n\ninterface IDeleteGroup {\n selectedGroups: string[];\n deleteOpen: boolean;\n closeDeleteModalAndRefresh: any;\n}\n\nconst DeleteGroup = ({\n selectedGroups,\n deleteOpen,\n closeDeleteModalAndRefresh,\n}: IDeleteGroup) => {\n const dispatch = useAppDispatch();\n const onClose = () => closeDeleteModalAndRefresh(false);\n const [loadingDelete, setLoadingDelete] = useState(false);\n\n if (!selectedGroups) {\n return null;\n }\n const onDeleteGroups = () => {\n for (let group of selectedGroups) {\n setLoadingDelete(true);\n api.group\n .removeGroup(group)\n .then((_) => {\n closeDeleteModalAndRefresh(true);\n })\n .catch(async (res: HttpResponse) => {\n const err = (await res.json()) as ApiError;\n dispatch(setErrorSnackMessage(errorToHandler(err)));\n closeDeleteModalAndRefresh(false);\n })\n .finally(() => setLoadingDelete(false));\n }\n };\n\n const renderGroups = selectedGroups.map((group) => (\n
\n {group}\n
\n ));\n\n return (\n 1 ? \"s\" : \"\"}`}\n confirmText={\"Delete\"}\n isOpen={deleteOpen}\n titleIcon={}\n isLoading={loadingDelete}\n onConfirm={onDeleteGroups}\n onClose={onClose}\n confirmationContent={\n \n Are you sure you want to delete the following{\" \"}\n {selectedGroups.length === 1 ? \"\" : selectedGroups.length} group\n {selectedGroups.length > 1 ? \"s?\" : \"?\"}\n {renderGroups}\n \n }\n />\n );\n};\n\nexport default DeleteGroup;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport { AddMembersToGroupIcon, Button, FormLayout, Grid, ReadBox } from \"mds\";\nimport { modalStyleUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport UsersSelectors from \"./UsersSelectors\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\n\ntype UserPickerModalProps = {\n title?: string;\n preSelectedUsers?: string[];\n selectedGroup?: string;\n open: boolean;\n onClose: () => void;\n onSaveClick: () => void;\n groupStatus?: string;\n};\n\nconst AddGroupMember = ({\n title = \"\",\n groupStatus = \"enabled\",\n preSelectedUsers = [],\n selectedGroup = \"\",\n open,\n onClose,\n}: UserPickerModalProps) => {\n const dispatch = useAppDispatch();\n const [selectedUsers, setSelectedUsers] = useState(preSelectedUsers);\n\n function addMembersToGroup() {\n return api.group\n .updateGroup(selectedGroup, {\n members: selectedUsers,\n status: groupStatus,\n })\n .then(() => {\n onClose();\n })\n .catch((err) => {\n onClose();\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n });\n }\n\n return (\n }\n >\n \n \n {selectedGroup}\n \n \n \n \n \n \n );\n};\n\nexport default AddGroupMember;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { useNavigate, useParams } from \"react-router-dom\";\nimport {\n AddIcon,\n BackLink,\n Box,\n Button,\n DataTable,\n Grid,\n GroupsIcon,\n IAMPoliciesIcon,\n PageLayout,\n ScreenTitle,\n SectionTitle,\n Switch,\n Tabs,\n TrashIcon,\n} from \"mds\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { Group } from \"api/consoleApi\";\nimport {\n addUserToGroupPermissions,\n CONSOLE_UI_RESOURCE,\n createGroupPermissions,\n editGroupMembersPermissions,\n enableDisableGroupPermissions,\n getGroupPermissions,\n IAM_PAGES,\n listUsersPermissions,\n permissionTooltipHelper,\n setGroupPoliciesPermissions,\n viewPolicyPermissions,\n viewUserPermissions,\n} from \"../../../common/SecureComponent/permissions\";\nimport {\n hasPermission,\n SecureComponent,\n} from \"../../../common/SecureComponent\";\nimport { setHelpName, setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport { setSelectedPolicies } from \"../Users/AddUsersSlice\";\nimport SetPolicy from \"../Policies/SetPolicy\";\nimport AddGroupMember from \"./AddGroupMember\";\nimport DeleteGroup from \"./DeleteGroup\";\nimport SearchBox from \"../Common/SearchBox\";\nimport TooltipWrapper from \"../Common/TooltipWrapper/TooltipWrapper\";\nimport HelpMenu from \"../HelpMenu\";\nimport PageHeaderWrapper from \"../Common/PageHeaderWrapper/PageHeaderWrapper\";\n\nconst formatPolicy = (policy: string = \"\"): string[] => {\n if (policy.length <= 0) return [];\n return policy.split(\",\");\n};\n\nconst GroupsDetails = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n const params = useParams();\n\n const [groupDetails, setGroupDetails] = useState({});\n const [policyOpen, setPolicyOpen] = useState(false);\n const [usersOpen, setUsersOpen] = useState(false);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [memberFilter, setMemberFilter] = useState(\"\");\n const [currentTab, setCurrentTab] = useState(\"members\");\n\n const { members = [], policy = \"\", status: groupEnabled } = groupDetails;\n\n const filteredMembers = members.filter((elementItem) =>\n elementItem.includes(memberFilter),\n );\n\n const viewUser = hasPermission(\n CONSOLE_UI_RESOURCE,\n viewUserPermissions,\n true,\n );\n\n useEffect(() => {\n dispatch(setHelpName(\"group_details\"));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n if (params.groupName) {\n fetchGroupInfo();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [params.groupName]);\n\n const groupPolicies = formatPolicy(policy);\n const isGroupEnabled = groupEnabled === \"enabled\";\n const memberActionText = members.length > 0 ? \"Edit Members\" : \"Add Members\";\n\n const getGroupDetails = hasPermission(\n CONSOLE_UI_RESOURCE,\n getGroupPermissions,\n );\n\n const canEditGroupMembers = hasPermission(\n CONSOLE_UI_RESOURCE,\n editGroupMembersPermissions,\n true,\n );\n\n const canSetPolicies = hasPermission(\n CONSOLE_UI_RESOURCE,\n setGroupPoliciesPermissions,\n true,\n );\n\n const canViewPolicy = hasPermission(\n CONSOLE_UI_RESOURCE,\n viewPolicyPermissions,\n true,\n );\n\n function fetchGroupInfo() {\n if (getGroupDetails) {\n api.group\n .groupInfo(params.groupName || \"\")\n .then((res) => {\n setGroupDetails(res.data);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n setGroupDetails({});\n });\n }\n }\n\n function toggleGroupStatus(nextStatus: boolean) {\n return api.group\n .updateGroup(params.groupName || \"\", {\n members: members,\n status: nextStatus ? \"enabled\" : \"disabled\",\n })\n .then(() => {\n fetchGroupInfo();\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n });\n }\n\n const groupsTabContent = (\n {\n dispatch(setHelpName(\"groups_members\"));\n }}\n >\n \n {\n setMemberFilter(searchText);\n }}\n value={memberFilter}\n sx={{\n maxWidth: 280,\n }}\n />\n \n \n }\n onClick={() => {\n setUsersOpen(true);\n }}\n disabled={!canEditGroupMembers}\n />\n \n \n \n }\n >\n Members\n \n \n \n \n {\n navigate(\n `${IAM_PAGES.USERS}/${encodeURIComponent(userName)}`,\n );\n },\n isDisabled: !viewUser,\n },\n ]}\n columns={[{ label: \"Access Key\" }]}\n selectedItems={[]}\n isLoading={false}\n records={filteredMembers}\n entityName=\"Users\"\n />\n \n \n \n \n );\n\n const policiesTabContent = (\n \n {\n dispatch(setHelpName(\"groups_policies\"));\n }}\n >\n \n }\n onClick={() => {\n setPolicyOpen(true);\n }}\n disabled={!canSetPolicies}\n />\n \n }\n >\n Policies\n \n \n \n \n {\n navigate(\n `${IAM_PAGES.POLICIES}/${encodeURIComponent(policy)}`,\n );\n },\n isDisabled: !canViewPolicy,\n },\n ]}\n columns={[{ label: \"Policy\" }]}\n isLoading={false}\n records={groupPolicies}\n entityName=\"Policies\"\n />\n \n \n \n );\n\n return (\n \n {policyOpen ? (\n {\n setPolicyOpen(false);\n fetchGroupInfo();\n dispatch(setSelectedPolicies([]));\n }}\n />\n ) : null}\n\n {usersOpen ? (\n {}}\n title={memberActionText}\n groupStatus={groupEnabled}\n preSelectedUsers={members}\n open={usersOpen}\n onClose={() => {\n setUsersOpen(false);\n fetchGroupInfo();\n }}\n />\n ) : null}\n\n {deleteOpen && (\n {\n setDeleteOpen(false);\n if (isDelSuccess) {\n navigate(IAM_PAGES.GROUPS);\n }\n }}\n />\n )}\n \n navigate(IAM_PAGES.GROUPS)}\n />\n \n }\n actions={}\n />\n \n \n \n \n \n }\n title={params.groupName || \"\"}\n subTitle={null}\n bottomBorder\n actions={\n \n Group Status:\n \n {isGroupEnabled ? \"Enabled\" : \"Disabled\"}\n \n \n \n {\n toggleGroupStatus(!isGroupEnabled);\n }}\n switchOnly\n />\n \n \n\n \n }\n onClick={() => {\n setDeleteOpen(true);\n }}\n />\n \n \n }\n sx={{ marginBottom: 15 }}\n />\n \n\n \n \n \n \n \n );\n};\n\nexport default GroupsDetails;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useCallback, useEffect, useState, Fragment } from \"react\";\nimport get from \"lodash/get\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { Box, DataTable, Grid, ProgressBar } from \"mds\";\n\nimport { usersSort } from \"../../../utils/sortFunctions\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport SearchBox from \"../Common/SearchBox\";\n\ninterface IGroupsProps {\n selectedUsers: string[];\n setSelectedUsers: any;\n editMode?: boolean;\n}\n\nconst UsersSelectors = ({\n selectedUsers,\n setSelectedUsers,\n editMode = false,\n}: IGroupsProps) => {\n const dispatch = useAppDispatch();\n //Local States\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const fetchUsers = useCallback(() => {\n api.users\n .listUsers()\n .then((res) => {\n let users = get(res.data, \"users\", []);\n\n if (!users) {\n users = [];\n }\n\n setRecords(users.sort(usersSort));\n isLoading(false);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n isLoading(false);\n });\n }, [dispatch]);\n\n //Effects\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n fetchUsers();\n }\n }, [loading, fetchUsers]);\n\n const selUsers = !selectedUsers ? [] : selectedUsers;\n\n //Fetch Actions\n const selectionChanged = (e: React.ChangeEvent) => {\n const targetD = e.target;\n const value = targetD.value;\n const checked = targetD.checked;\n\n let elements: string[] = [...selUsers]; // We clone the selectedGroups array\n\n if (checked) {\n // If the user has checked this field we need to push this to selectedGroupsList\n elements.push(value);\n } else {\n // User has unchecked this field, we need to remove it from the list\n elements = elements.filter((element) => element !== value);\n }\n setSelectedUsers(elements);\n\n return elements;\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.accessKey.includes(filter),\n );\n\n return (\n \n \n {loading && }\n {records?.length > 0 ? (\n \n \n \n \n \n \n ) : (\n \n No Users to display\n \n )}\n \n \n );\n};\n\nexport default UsersSelectors;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\n\nimport { Box, DataTable, Grid, ProgressBar } from \"mds\";\nimport { policySort } from \"../../../utils/sortFunctions\";\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport SearchBox from \"../Common/SearchBox\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport { setSelectedPolicies } from \"../Users/AddUsersSlice\";\nimport { useSelector } from \"react-redux\";\nimport { api } from \"../../../api\";\n\ninterface ISelectPolicyProps {\n selectedPolicy?: string[];\n noTitle?: boolean;\n}\n\nconst PolicySelectors = ({ noTitle = false }: ISelectPolicyProps) => {\n const dispatch = useAppDispatch();\n // Local State\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const currentPolicies = useSelector(\n (state: AppState) => state.createUser.selectedPolicies,\n );\n\n const fetchPolicies = useCallback(() => {\n isLoading(true);\n\n api.policies\n .listPolicies()\n .then((res) => {\n const policies = res.data.policies ?? [];\n isLoading(false);\n setRecords(policies.sort(policySort));\n })\n .catch((err: ErrorResponseHandler) => {\n isLoading(false);\n dispatch(setModalErrorSnackMessage(err));\n });\n }, [dispatch]);\n\n //Effects\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n fetchPolicies();\n }\n }, [loading, fetchPolicies]);\n\n const selectionChanged = (e: React.ChangeEvent) => {\n const targetD = e.target;\n const value = targetD.value;\n const checked = targetD.checked;\n\n let elements: string[] = [...currentPolicies]; // We clone the checkedUsers array\n\n if (checked) {\n // If the user has checked this field we need to push this to checkedUsersList\n elements.push(value);\n } else {\n // User has unchecked this field, we need to remove it from the list\n elements = elements.filter((element) => element !== value);\n }\n // remove empty values\n elements = elements.filter((element) => element !== \"\");\n\n dispatch(setSelectedPolicies(elements));\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.name.includes(filter),\n );\n\n return (\n \n {loading && }\n {records.length > 0 ? (\n \n \n {\n setFilter(value);\n }}\n value={filter}\n label={!noTitle ? \"Assign Policies\" : \"\"}\n />\n \n\n \n \n ) : (\n \n No Policies Available\n \n )}\n \n );\n};\n\nexport default PolicySelectors;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { useSelector } from \"react-redux\";\nimport { Button, FormLayout, ReadBox, Grid, ProgressBar } from \"mds\";\n\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport { modalStyleUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport { User } from \"../Users/types\";\nimport { setSelectedPolicies } from \"../Users/AddUsersSlice\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport PolicySelectors from \"./PolicySelectors\";\nimport api from \"../../../common/api\";\n\ninterface ISetPolicyProps {\n closeModalAndRefresh: () => void;\n selectedUser: User | null;\n selectedGroups: string[] | null;\n open: boolean;\n}\n\nconst SetPolicy = ({\n closeModalAndRefresh,\n selectedUser,\n selectedGroups,\n open,\n}: ISetPolicyProps) => {\n const dispatch = useAppDispatch();\n //Local States\n const [loading, setLoading] = useState(false);\n const [actualPolicy, setActualPolicy] = useState([]);\n const [selectedPolicy, setSelectedPolicy] = useState([]);\n const currentPolicies = useSelector(\n (state: AppState) => state.createUser.selectedPolicies,\n );\n const setPolicyAction = () => {\n let users = null;\n let groups = null;\n if (selectedGroups !== null) {\n groups = selectedGroups;\n } else {\n if (selectedUser !== null) {\n users = [selectedUser.accessKey] || [\" \"];\n }\n }\n\n setLoading(true);\n\n api\n .invoke(\"PUT\", `/api/v1/set-policy-multi`, {\n name: currentPolicies,\n groups: groups,\n users: users,\n })\n .then(() => {\n setLoading(false);\n closeModalAndRefresh();\n })\n .catch((err: ErrorResponseHandler) => {\n setLoading(false);\n dispatch(setModalErrorSnackMessage(err));\n });\n };\n\n const fetchGroupInformation = () => {\n if (selectedGroups?.length === 1) {\n api\n .invoke(\"GET\", `/api/v1/group/${encodeURIComponent(selectedGroups[0])}`)\n .then((res: any) => {\n const groupPolicy: String = get(res, \"policy\", \"\");\n setActualPolicy(groupPolicy.split(\",\"));\n setSelectedPolicy(groupPolicy.split(\",\"));\n dispatch(setSelectedPolicies(groupPolicy.split(\",\")));\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(err));\n setLoading(false);\n });\n }\n };\n\n const resetSelection = () => {\n setSelectedPolicy(actualPolicy);\n dispatch(setSelectedPolicies(actualPolicy));\n };\n\n useEffect(() => {\n if (open) {\n if (selectedGroups?.length === 1) {\n fetchGroupInformation();\n return;\n }\n\n const userPolicy: string[] = get(selectedUser, \"policy\", []);\n setActualPolicy(userPolicy);\n setSelectedPolicy(userPolicy);\n dispatch(setSelectedPolicies(userPolicy));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, selectedGroups?.length, selectedUser]);\n\n const userName = get(selectedUser, \"accessKey\", \"\");\n\n return (\n {\n closeModalAndRefresh();\n }}\n modalOpen={open}\n title=\"Set Policies\"\n >\n \n {(selectedGroups?.length === 1 || selectedUser != null) && (\n \n \n {selectedGroups !== null ? selectedGroups[0] : userName}\n \n \n {actualPolicy.join(\", \")}\n \n \n )}\n {selectedGroups && selectedGroups?.length > 1 && (\n \n {selectedGroups.join(\", \")}\n \n )}\n \n \n \n \n \n \n \n \n {loading && (\n \n \n \n )}\n \n );\n};\n\nexport default SetPolicy;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { Policy, User } from \"api/consoleApi\";\n\ninterface policyDetailsInterface {\n policy: string;\n}\n\nexport const usersSort = (a: User, b: User) => {\n if (a.accessKey && b.accessKey) {\n if (a.accessKey > b.accessKey) {\n return 1;\n }\n if (a.accessKey < b.accessKey) {\n return -1;\n }\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policySort = (a: Policy, b: Policy) => {\n if (a.name! > b.name!) {\n return 1;\n }\n if (a.name! < b.name!) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const stringSort = (a: string, b: string) => {\n if (a > b) {\n return 1;\n }\n if (a < b) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policyDetailsSort = (\n a: policyDetailsInterface,\n b: policyDetailsInterface,\n) => {\n if (a.policy > b.policy) {\n return 1;\n }\n if (a.policy < b.policy) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n"],"names":["_ref","onClose","modalOpen","title","children","wideLimit","titleIcon","iconColor","sx","dispatch","useAppDispatch","openSnackbar","setOpenSnackbar","useState","modalSnackMessage","useSelector","state","system","modalSnackBar","useEffect","setModalSnackMessage","message","type","detailedErrorMsg","length","_jsxs","ModalBox","open","widthLimit","_jsx","MainError","isModal","Snackbar","closeSnackBar","mode","variant","autoHideDuration","condensed","selectedGroups","deleteOpen","closeDeleteModalAndRefresh","loadingDelete","setLoadingDelete","renderGroups","map","group","ConfirmDialog","concat","confirmText","isOpen","ConfirmDeleteIcon","isLoading","onConfirm","onDeleteGroups","api","removeGroup","then","_","catch","async","err","res","json","setErrorSnackMessage","errorToHandler","finally","confirmationContent","Fragment","groupStatus","preSelectedUsers","selectedGroup","selectedUsers","setSelectedUsers","ModalWrapper","AddMembersToGroupIcon","FormLayout","withBorders","containerPadding","ReadBox","label","width","UsersSelectors","editMode","Grid","item","xs","modalStyleUtils","modalButtonBar","Button","id","onClick","updateGroup","members","status","setModalErrorSnackMessage","error","GroupsDetails","navigate","useNavigate","params","useParams","groupDetails","setGroupDetails","policyOpen","setPolicyOpen","usersOpen","setUsersOpen","setDeleteOpen","memberFilter","setMemberFilter","currentTab","setCurrentTab","policy","groupEnabled","filteredMembers","filter","elementItem","includes","viewUser","hasPermission","CONSOLE_UI_RESOURCE","viewUserPermissions","setHelpName","groupName","fetchGroupInfo","groupPolicies","arguments","undefined","split","formatPolicy","isGroupEnabled","memberActionText","getGroupDetails","getGroupPermissions","canEditGroupMembers","editGroupMembersPermissions","canSetPolicies","setGroupPoliciesPermissions","canViewPolicy","viewPolicyPermissions","groupInfo","data","groupsTabContent","Box","onMouseMove","SectionTitle","separator","marginBottom","actions","display","gap","SearchBox","placeholder","onChange","searchText","value","maxWidth","SecureComponent","resource","scopes","addUserToGroupPermissions","errorProps","disabled","TooltipWrapper","tooltip","permissionTooltipHelper","createGroupPermissions","icon","AddIcon","listUsersPermissions","DataTable","itemActions","userName","IAM_PAGES","USERS","encodeURIComponent","isDisabled","columns","selectedItems","records","entityName","policiesTabContent","IAMPoliciesIcon","POLICIES","SetPolicy","selectedUser","closeModalAndRefresh","setSelectedPolicies","AddGroupMember","onSaveClick","DeleteGroup","isDelSuccess","GROUPS","PageHeaderWrapper","BackLink","HelpMenu","PageLayout","ScreenTitle","GroupsIcon","subTitle","bottomBorder","fontSize","alignItems","style","fontWeight","enableDisableGroupPermissions","matchAll","Switch","indicatorLabels","checked","name","nextStatus","switchOnly","TrashIcon","Tabs","options","tabConfig","content","currentTabOrPath","onTabClick","setRecords","loading","setFilter","fetchUsers","useCallback","users","listUsers","get","sort","usersSort","selUsers","filteredRecords","accessKey","className","ProgressBar","elementKey","onSelect","e","targetD","target","elements","push","element","idField","customPaperHeight","textAlign","padding","noTitle","currentPolicies","createUser","selectedPolicies","fetchPolicies","policies","listPolicies","_res$data$policies","policySort","setLoading","actualPolicy","setActualPolicy","selectedPolicy","setSelectedPolicy","invoke","groupPolicy","userPolicy","join","PolicySelectors","resetSelection","color","setPolicyAction","groups","a","b","stringSort","policyDetailsSort"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/1324.acba4c47.chunk.js b/web-app/build/static/js/1324.acba4c47.chunk.js
deleted file mode 100644
index 2e829b4365..0000000000
--- a/web-app/build/static/js/1324.acba4c47.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[1324,5851,4705],{94141:(e,s,t)=>{t.d(s,{A:()=>d});var l=t(65043),n=t(22166),o=t(89923),i=t(21383),r=t(64159),c=t(49555),a=t(70579);const d=e=>{let{onClose:s,modalOpen:t,title:d,children:u,wideLimit:p=!0,titleIcon:x=null,iconColor:h="default",sx:m}=e;const j=(0,i.jL)(),[g,b]=(0,l.useState)(!1),y=(0,n.d4)((e=>e.system.modalSnackBar));(0,l.useEffect)((()=>{j((0,r.h0)(""))}),[j]),(0,l.useEffect)((()=>{if(y){if(""===y.message)return void b(!1);"error"!==y.type&&b(!0)}}),[y]);let f="";return y&&(f=y.detailedErrorMsg,(""===f||f&&f.length<5)&&(f=y.message)),(0,a.jsxs)(o.ngX,{onClose:s,open:t,title:d,titleIcon:x,widthLimit:p,sx:m,iconColor:h,children:[(0,a.jsx)(c.A,{isModal:!0}),(0,a.jsx)(o.qb_,{onClose:()=>{b(!1),j((0,r.h0)(""))},open:g,message:f,mode:"inline",variant:"error"===y.type?"error":"default",autoHideDuration:"error"===y.type?10:5,condensed:!0}),u]})}},85851:(e,s,t)=>{t.r(s),t.d(s,{default:()=>u});var l=t(65043),n=t(89923),o=t(64159),i=t(21383),r=t(58661),c=t(56629),a=t(53518),d=t(70579);const u=e=>{let{selectedGroups:s,deleteOpen:t,closeDeleteModalAndRefresh:u}=e;const p=(0,i.jL)(),[x,h]=(0,l.useState)(!1);if(!s)return null;const m=s.map((e=>(0,d.jsx)("div",{children:(0,d.jsx)("b",{children:e})},e)));return(0,d.jsx)(r.A,{title:"Delete Group".concat(s.length>1?"s":""),confirmText:"Delete",isOpen:t,titleIcon:(0,d.jsx)(n.xWY,{}),isLoading:x,onConfirm:()=>{for(let e of s)h(!0),c.F.group.removeGroup(e).then((e=>{u(!0)})).catch((async e=>{const s=await e.json();p((0,o.C9)((0,a.S)(s))),u(!1)})).finally((()=>h(!1)))},onClose:()=>u(!1),confirmationContent:(0,d.jsxs)(l.Fragment,{children:["Are you sure you want to delete the following"," ",1===s.length?"":s.length," group",s.length>1?"s?":"?",m]})})}},91324:(e,s,t)=>{t.r(s),t.d(s,{default:()=>P,formatPolicy:()=>C});var l=t(65043),n=t(73216),o=t(89923),i=t(56629),r=t(53518),c=t(99161),a=t(77938),d=t(64159),u=t(21383),p=t(62560),x=t(74705),h=t(77403),m=t(22923),j=t(94141),g=t(70579);const b=e=>{let{title:s="",groupStatus:t="enabled",preSelectedUsers:n=[],selectedGroup:c="",open:a,onClose:p}=e;const x=(0,u.jL)(),[b,y]=(0,l.useState)(n);return(0,g.jsxs)(j.A,{modalOpen:a,onClose:p,title:s,titleIcon:(0,g.jsx)(o.WC,{}),children:[(0,g.jsxs)(o.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,g.jsx)(o.EmB,{label:"Selected Group",sx:{width:"100%"},children:c}),(0,g.jsx)(m.A,{selectedUsers:b,setSelectedUsers:y,editMode:!c})]}),(0,g.jsxs)(o.xA9,{item:!0,xs:12,sx:h.Uz.modalButtonBar,children:[(0,g.jsx)(o.$nd,{id:"reset-add-group-member",type:"button",variant:"regular",onClick:()=>{y(n)},label:"Reset"}),(0,g.jsx)(o.$nd,{id:"save-add-group-member",type:"button",variant:"callAction",onClick:()=>{i.F.group.updateGroup(c,{members:b,status:t}).then((()=>{p()})).catch((e=>{p(),x((0,d.Dy)((0,r.S)(e.error)))}))},label:"Save"})]})]})};var y=t(85851),f=t(64681),v=t(6681),A=t(55968),S=t(48793);const C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.length<=0?[]:e.split(",")},P=()=>{const e=(0,u.jL)(),s=(0,n.Zp)(),t=(0,n.g)(),[h,m]=(0,l.useState)({}),[j,P]=(0,l.useState)(!1),[G,M]=(0,l.useState)(!1),[U,k]=(0,l.useState)(!1),[w,E]=(0,l.useState)(""),[L,z]=(0,l.useState)("members"),{members:D=[],policy:I="",status:N}=h,R=D.filter((e=>e.includes(w))),F=(0,a._)(c.Ms,c.Ld,!0);(0,l.useEffect)((()=>{e((0,d.ph)("group_details"))}),[]),(0,l.useEffect)((()=>{t.groupName&&T()}),[t.groupName]);const B=C(I),K="enabled"===N,_=D.length>0?"Edit Members":"Add Members",O=(0,a._)(c.Ms,c.Oh),H=(0,a._)(c.Ms,c.Hr,!0),$=(0,a._)(c.Ms,c.QR,!0),J=(0,a._)(c.Ms,c.yv,!0);function T(){O&&i.F.group.groupInfo(t.groupName||"").then((e=>{m(e.data)})).catch((s=>{e((0,d.Dy)((0,r.S)(s.error))),m({})}))}const Q=(0,g.jsxs)(o.azJ,{onMouseMove:()=>{e((0,d.ph)("groups_members"))},children:[(0,g.jsx)(o._xt,{separator:!0,sx:{marginBottom:15},actions:(0,g.jsxs)(o.azJ,{sx:{display:"flex",gap:10},children:[(0,g.jsx)(f.A,{placeholder:"Search members",onChange:e=>{E(e)},value:w,sx:{maxWidth:280}}),(0,g.jsx)(a.R,{resource:c.Ms,scopes:c.BD,errorProps:{disabled:!0},children:(0,g.jsx)(v.A,{tooltip:H?_:(0,c.vj)(c.k1,"edit Group membership"),children:(0,g.jsx)(o.$nd,{id:"add-user-group",label:_,variant:"callAction",icon:(0,g.jsx)(o.REV,{}),onClick:()=>{M(!0)},disabled:!H})})})]}),children:"Members"}),(0,g.jsx)(o.xA9,{item:!0,xs:12,children:(0,g.jsx)(a.R,{resource:c.Ms,scopes:c.x6,errorProps:{disabled:!0},children:(0,g.jsx)(v.A,{tooltip:F?"":(0,c.vj)(c.Ld,"view User details"),children:(0,g.jsx)(o.bQt,{itemActions:[{type:"view",onClick:e=>{s("".concat(c.zZ.USERS,"/").concat(encodeURIComponent(e)))},isDisabled:!F}],columns:[{label:"Access Key"}],selectedItems:[],isLoading:!1,records:R,entityName:"Users"})})})})]}),Z=(0,g.jsxs)(l.Fragment,{children:[(0,g.jsx)(o.azJ,{onMouseMove:()=>{e((0,d.ph)("groups_policies"))},children:(0,g.jsx)(o._xt,{separator:!0,sx:{marginBottom:15},actions:(0,g.jsx)(v.A,{tooltip:$?"Set Policies":(0,c.vj)(c.QR,"assign Policies"),children:(0,g.jsx)(o.$nd,{id:"set-policies",label:"Set Policies",variant:"callAction",icon:(0,g.jsx)(o.n$X,{}),onClick:()=>{P(!0)},disabled:!$})}),children:"Policies"})}),(0,g.jsx)(o.xA9,{item:!0,xs:12,children:(0,g.jsx)(v.A,{tooltip:J?"":(0,c.vj)(c.yv,"view Policy details"),children:(0,g.jsx)(o.bQt,{itemActions:[{type:"view",onClick:e=>{s("".concat(c.zZ.POLICIES,"/").concat(encodeURIComponent(e)))},isDisabled:!J}],columns:[{label:"Policy"}],isLoading:!1,records:B,entityName:"Policies"})})})]});return(0,g.jsxs)(l.Fragment,{children:[j?(0,g.jsx)(x.default,{open:j,selectedGroups:[t.groupName||""],selectedUser:null,closeModalAndRefresh:()=>{P(!1),T(),e((0,p.Gy)([]))}}):null,G?(0,g.jsx)(b,{selectedGroup:t.groupName,onSaveClick:()=>{},title:_,groupStatus:N,preSelectedUsers:D,open:G,onClose:()=>{M(!1),T()}}):null,U&&(0,g.jsx)(y.default,{deleteOpen:U,selectedGroups:[t.groupName||""],closeDeleteModalAndRefresh:e=>{k(!1),e&&s(c.zZ.GROUPS)}}),(0,g.jsx)(S.A,{label:(0,g.jsx)(l.Fragment,{children:(0,g.jsx)(o.EGL,{label:"Groups",onClick:()=>s(c.zZ.GROUPS)})}),actions:(0,g.jsx)(A.A,{})}),(0,g.jsxs)(o.Mxu,{children:[(0,g.jsx)(o.xA9,{item:!0,xs:12,children:(0,g.jsx)(o.lcx,{icon:(0,g.jsx)(l.Fragment,{children:(0,g.jsx)(o.YXz,{width:40})}),title:t.groupName||"",subTitle:null,bottomBorder:!0,actions:(0,g.jsxs)(o.azJ,{sx:{display:"flex",fontSize:14,alignItems:"center",gap:15},children:[(0,g.jsx)("span",{children:"Group Status:"}),(0,g.jsx)("span",{id:"group-status-label",style:{fontWeight:"bold"},children:K?"Enabled":"Disabled"}),(0,g.jsx)(v.A,{tooltip:(0,a._)(c.Ms,c.pf,!0)?"":(0,c.vj)(c.pf,"enable or disable Groups"),children:(0,g.jsx)(a.R,{resource:c.Ms,scopes:c.pf,errorProps:{disabled:!0},matchAll:!0,children:(0,g.jsx)(o.dOG,{indicatorLabels:["Enabled","Disabled"],checked:K,value:"group_enabled",id:"group-status",name:"group-status",onChange:()=>{var s;s=!K,i.F.group.updateGroup(t.groupName||"",{members:D,status:s?"enabled":"disabled"}).then((()=>{T()})).catch((s=>{e((0,d.Dy)((0,r.S)(s.error)))}))},switchOnly:!0})})}),(0,g.jsx)(v.A,{tooltip:"Delete Group",children:(0,g.jsx)(o.$nd,{id:"delete-user-group",variant:"secondary",icon:(0,g.jsx)(o.ucK,{}),onClick:()=>{k(!0)}})})]}),sx:{marginBottom:15}})}),(0,g.jsx)(o.xA9,{item:!0,xs:12,children:(0,g.jsx)(o.tUM,{options:[{tabConfig:{id:"members",label:"Members"},content:Q},{tabConfig:{id:"policies",label:"Policies"},content:Z}],currentTabOrPath:L,onTabClick:z})})]})]})}},22923:(e,s,t)=>{t.d(s,{A:()=>h});var l=t(65043),n=t(33097),o=t.n(n),i=t(56629),r=t(53518),c=t(89923),a=t(8185),d=t(64159),u=t(21383),p=t(64681),x=t(70579);const h=e=>{let{selectedUsers:s,setSelectedUsers:t,editMode:n=!1}=e;const h=(0,u.jL)(),[m,j]=(0,l.useState)([]),[g,b]=(0,l.useState)(!1),[y,f]=(0,l.useState)(""),v=(0,l.useCallback)((()=>{i.F.users.listUsers().then((e=>{let s=o()(e.data,"users",[]);s||(s=[]),j(s.sort(a.LA)),b(!1)})).catch((e=>{h((0,d.Dy)((0,r.S)(e.error))),b(!1)}))}),[h]);(0,l.useEffect)((()=>{b(!0)}),[]),(0,l.useEffect)((()=>{g&&v()}),[g,v]);const A=s||[],S=m.filter((e=>e.accessKey.includes(y)));return(0,x.jsx)(c.xA9,{item:!0,xs:12,className:"inputItem",children:(0,x.jsxs)(c.azJ,{children:[g&&(0,x.jsx)(c.z21,{}),(null===m||void 0===m?void 0:m.length)>0?(0,x.jsxs)(l.Fragment,{children:[(0,x.jsx)(c.xA9,{item:!0,xs:12,className:"inputItem",children:(0,x.jsx)(p.A,{label:n?"Edit Members":"Assign Users",placeholder:"Filter Users",onChange:f,value:y})}),(0,x.jsx)(c.bQt,{columns:[{label:"Access Key",elementKey:"accessKey"}],onSelect:e=>{const s=e.target,l=s.value,n=s.checked;let o=[...A];return n?o.push(l):o=o.filter((e=>e!==l)),t(o),o},selectedItems:A,isLoading:g,records:S,entityName:"Users",idField:"accessKey",customPaperHeight:"200px"})]}):(0,x.jsx)(c.azJ,{sx:{textAlign:"center",padding:"10px 0"},children:"No Users to display"})]})})}},42967:(e,s,t)=>{t.d(s,{A:()=>x});var l=t(65043),n=t(89923),o=t(8185),i=t(64681),r=t(64159),c=t(21383),a=t(62560),d=t(22166),u=t(56629),p=t(70579);const x=e=>{let{noTitle:s=!1}=e;const t=(0,c.jL)(),[x,h]=(0,l.useState)([]),[m,j]=(0,l.useState)(!1),[g,b]=(0,l.useState)(""),y=(0,d.d4)((e=>e.createUser.selectedPolicies)),f=(0,l.useCallback)((()=>{j(!0),u.F.policies.listPolicies().then((e=>{var s;const t=null!==(s=e.data.policies)&&void 0!==s?s:[];j(!1),h(t.sort(o.Hw))})).catch((e=>{j(!1),t((0,r.Dy)(e))}))}),[t]);(0,l.useEffect)((()=>{j(!0)}),[]),(0,l.useEffect)((()=>{m&&f()}),[m,f]);const v=x.filter((e=>e.name.includes(g)));return(0,p.jsxs)(n.xA9,{item:!0,xs:12,className:"inputItem",children:[m&&(0,p.jsx)(n.z21,{}),x.length>0?(0,p.jsxs)(l.Fragment,{children:[(0,p.jsx)(n.xA9,{item:!0,xs:12,className:"inputItem",children:(0,p.jsx)(i.A,{placeholder:"Start typing to search for a Policy",onChange:e=>{b(e)},value:g,label:s?"":"Assign Policies"})}),(0,p.jsx)(n.bQt,{columns:[{label:"Policy",elementKey:"name"}],onSelect:e=>{const s=e.target,l=s.value,n=s.checked;let o=[...y];n?o.push(l):o=o.filter((e=>e!==l)),o=o.filter((e=>""!==e)),t((0,a.Gy)(o))},selectedItems:y,isLoading:m,records:v,entityName:"Policies",idField:"name",customPaperHeight:"200px"})]}):(0,p.jsx)(n.azJ,{sx:{textAlign:"center",padding:"10px 0"},children:"No Policies Available"})]})}},74705:(e,s,t)=>{t.r(s),t.d(s,{default:()=>j});var l=t(65043),n=t(33097),o=t.n(n),i=t(22166),r=t(89923),c=t(64159),a=t(21383),d=t(77403),u=t(62560),p=t(94141),x=t(42967),h=t(20649),m=t(70579);const j=e=>{let{closeModalAndRefresh:s,selectedUser:t,selectedGroups:n,open:j}=e;const g=(0,a.jL)(),[b,y]=(0,l.useState)(!1),[f,v]=(0,l.useState)([]),[A,S]=(0,l.useState)([]),C=(0,i.d4)((e=>e.createUser.selectedPolicies));(0,l.useEffect)((()=>{if(j){if(1===(null===n||void 0===n?void 0:n.length))return void(1===(null===n||void 0===n?void 0:n.length)&&h.A.invoke("GET","/api/v1/group/".concat(encodeURIComponent(n[0]))).then((e=>{const s=o()(e,"policy","");v(s.split(",")),S(s.split(",")),g((0,u.Gy)(s.split(",")))})).catch((e=>{g((0,c.Dy)(e)),y(!1)})));const e=o()(t,"policy",[]);v(e),S(e),g((0,u.Gy)(e))}}),[j,null===n||void 0===n?void 0:n.length,t]);const P=o()(t,"accessKey","");return(0,m.jsxs)(p.A,{onClose:()=>{s()},modalOpen:j,title:"Set Policies",children:[(0,m.jsxs)(r.Hbc,{withBorders:!1,containerPadding:!1,children:[(1===(null===n||void 0===n?void 0:n.length)||null!=t)&&(0,m.jsxs)(l.Fragment,{children:[(0,m.jsx)(r.EmB,{label:"Selected ".concat(null!==n?"Group":"User"),sx:{width:"100%"},children:null!==n?n[0]:P}),(0,m.jsx)(r.EmB,{label:"Current Policy",sx:{width:"100%"},children:f.join(", ")})]}),n&&(null===n||void 0===n?void 0:n.length)>1&&(0,m.jsx)(r.EmB,{label:"Selected Groups",sx:{width:"100%"},children:n.join(", ")}),(0,m.jsx)(r.xA9,{item:!0,xs:12,children:(0,m.jsx)(x.A,{selectedPolicy:A})})]}),(0,m.jsxs)(r.xA9,{item:!0,xs:12,sx:d.Uz.modalButtonBar,children:[(0,m.jsx)(r.$nd,{id:"reset",type:"button",variant:"regular",onClick:()=>{S(f),g((0,u.Gy)(f))},label:"Reset"}),(0,m.jsx)(r.$nd,{id:"save",type:"button",variant:"callAction",color:"primary",disabled:b,onClick:()=>{let e=null,l=null;null!==n?l=n:null!==t&&(e=[t.accessKey]||0),y(!0),h.A.invoke("PUT","/api/v1/set-policy-multi",{name:C,groups:l,users:e}).then((()=>{y(!1),s()})).catch((e=>{y(!1),g((0,c.Dy)(e))}))},label:"Save"})]}),b&&(0,m.jsx)(r.xA9,{item:!0,xs:12,children:(0,m.jsx)(r.z21,{})})]})}},8185:(e,s,t)=>{t.d(s,{Hw:()=>n,LA:()=>l,SO:()=>o,rY:()=>i});const l=(e,s)=>{if(e.accessKey&&s.accessKey){if(e.accessKey>s.accessKey)return 1;if(e.accessKeye.name>s.name?1:e.namee>s?1:ee.policy>s.policy?1:e.policy.\nimport React, { useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { ModalBox, Snackbar } from \"mds\";\nimport { CSSObject } from \"styled-components\";\nimport { AppState, useAppDispatch } from \"../../../../store\";\nimport { setModalSnackMessage } from \"../../../../systemSlice\";\nimport MainError from \"../MainError/MainError\";\n\ninterface IModalProps {\n onClose: () => void;\n modalOpen: boolean;\n title: string | React.ReactNode;\n children: any;\n wideLimit?: boolean;\n titleIcon?: React.ReactNode;\n iconColor?: \"default\" | \"delete\" | \"accept\";\n sx?: CSSObject;\n}\n\nconst ModalWrapper = ({\n onClose,\n modalOpen,\n title,\n children,\n wideLimit = true,\n titleIcon = null,\n iconColor = \"default\",\n sx,\n}: IModalProps) => {\n const dispatch = useAppDispatch();\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n const modalSnackMessage = useSelector(\n (state: AppState) => state.system.modalSnackBar,\n );\n\n useEffect(() => {\n dispatch(setModalSnackMessage(\"\"));\n }, [dispatch]);\n\n useEffect(() => {\n if (modalSnackMessage) {\n if (modalSnackMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n if (modalSnackMessage.type !== \"error\") {\n setOpenSnackbar(true);\n }\n }\n }, [modalSnackMessage]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n dispatch(setModalSnackMessage(\"\"));\n };\n\n let message = \"\";\n\n if (modalSnackMessage) {\n message = modalSnackMessage.detailedErrorMsg;\n if (message === \"\" || (message && message.length < 5)) {\n message = modalSnackMessage.message;\n }\n }\n\n return (\n \n \n \n {children}\n \n );\n};\n\nexport default ModalWrapper;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { ConfirmDeleteIcon } from \"mds\";\nimport { setErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport ConfirmDialog from \"../Common/ModalWrapper/ConfirmDialog\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { ApiError, HttpResponse } from \"api/consoleApi\";\n\ninterface IDeleteGroup {\n selectedGroups: string[];\n deleteOpen: boolean;\n closeDeleteModalAndRefresh: any;\n}\n\nconst DeleteGroup = ({\n selectedGroups,\n deleteOpen,\n closeDeleteModalAndRefresh,\n}: IDeleteGroup) => {\n const dispatch = useAppDispatch();\n const onClose = () => closeDeleteModalAndRefresh(false);\n const [loadingDelete, setLoadingDelete] = useState(false);\n\n if (!selectedGroups) {\n return null;\n }\n const onDeleteGroups = () => {\n for (let group of selectedGroups) {\n setLoadingDelete(true);\n api.group\n .removeGroup(group)\n .then((_) => {\n closeDeleteModalAndRefresh(true);\n })\n .catch(async (res: HttpResponse) => {\n const err = (await res.json()) as ApiError;\n dispatch(setErrorSnackMessage(errorToHandler(err)));\n closeDeleteModalAndRefresh(false);\n })\n .finally(() => setLoadingDelete(false));\n }\n };\n\n const renderGroups = selectedGroups.map((group) => (\n
\n {group}\n
\n ));\n\n return (\n 1 ? \"s\" : \"\"}`}\n confirmText={\"Delete\"}\n isOpen={deleteOpen}\n titleIcon={}\n isLoading={loadingDelete}\n onConfirm={onDeleteGroups}\n onClose={onClose}\n confirmationContent={\n \n Are you sure you want to delete the following{\" \"}\n {selectedGroups.length === 1 ? \"\" : selectedGroups.length} group\n {selectedGroups.length > 1 ? \"s?\" : \"?\"}\n {renderGroups}\n \n }\n />\n );\n};\n\nexport default DeleteGroup;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport { AddMembersToGroupIcon, Button, FormLayout, Grid, ReadBox } from \"mds\";\nimport { modalStyleUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport UsersSelectors from \"./UsersSelectors\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\n\ntype UserPickerModalProps = {\n title?: string;\n preSelectedUsers?: string[];\n selectedGroup?: string;\n open: boolean;\n onClose: () => void;\n onSaveClick: () => void;\n groupStatus?: string;\n};\n\nconst AddGroupMember = ({\n title = \"\",\n groupStatus = \"enabled\",\n preSelectedUsers = [],\n selectedGroup = \"\",\n open,\n onClose,\n}: UserPickerModalProps) => {\n const dispatch = useAppDispatch();\n const [selectedUsers, setSelectedUsers] = useState(preSelectedUsers);\n\n function addMembersToGroup() {\n return api.group\n .updateGroup(selectedGroup, {\n members: selectedUsers,\n status: groupStatus,\n })\n .then(() => {\n onClose();\n })\n .catch((err) => {\n onClose();\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n });\n }\n\n return (\n }\n >\n \n \n {selectedGroup}\n \n \n \n \n {\n setSelectedUsers(preSelectedUsers);\n }}\n label={\"Reset\"}\n />\n\n {\n addMembersToGroup();\n }}\n label={\"Save\"}\n />\n \n \n );\n};\n\nexport default AddGroupMember;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { useNavigate, useParams } from \"react-router-dom\";\nimport {\n AddIcon,\n BackLink,\n Box,\n Button,\n DataTable,\n Grid,\n GroupsIcon,\n IAMPoliciesIcon,\n PageLayout,\n ScreenTitle,\n SectionTitle,\n Switch,\n Tabs,\n TrashIcon,\n} from \"mds\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { Group } from \"api/consoleApi\";\nimport {\n addUserToGroupPermissions,\n CONSOLE_UI_RESOURCE,\n createGroupPermissions,\n editGroupMembersPermissions,\n enableDisableGroupPermissions,\n getGroupPermissions,\n IAM_PAGES,\n listUsersPermissions,\n permissionTooltipHelper,\n setGroupPoliciesPermissions,\n viewPolicyPermissions,\n viewUserPermissions,\n} from \"../../../common/SecureComponent/permissions\";\nimport {\n hasPermission,\n SecureComponent,\n} from \"../../../common/SecureComponent\";\nimport { setHelpName, setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport { setSelectedPolicies } from \"../Users/AddUsersSlice\";\nimport SetPolicy from \"../Policies/SetPolicy\";\nimport AddGroupMember from \"./AddGroupMember\";\nimport DeleteGroup from \"./DeleteGroup\";\nimport SearchBox from \"../Common/SearchBox\";\nimport TooltipWrapper from \"../Common/TooltipWrapper/TooltipWrapper\";\nimport HelpMenu from \"../HelpMenu\";\nimport PageHeaderWrapper from \"../Common/PageHeaderWrapper/PageHeaderWrapper\";\n\nexport const formatPolicy = (policy: string = \"\"): string[] => {\n if (policy.length <= 0) return [];\n return policy.split(\",\");\n};\n\nconst GroupsDetails = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n const params = useParams();\n\n const [groupDetails, setGroupDetails] = useState({});\n const [policyOpen, setPolicyOpen] = useState(false);\n const [usersOpen, setUsersOpen] = useState(false);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [memberFilter, setMemberFilter] = useState(\"\");\n const [currentTab, setCurrentTab] = useState(\"members\");\n\n const { members = [], policy = \"\", status: groupEnabled } = groupDetails;\n\n const filteredMembers = members.filter((elementItem) =>\n elementItem.includes(memberFilter),\n );\n\n const viewUser = hasPermission(\n CONSOLE_UI_RESOURCE,\n viewUserPermissions,\n true,\n );\n\n useEffect(() => {\n dispatch(setHelpName(\"group_details\"));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n if (params.groupName) {\n fetchGroupInfo();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [params.groupName]);\n\n const groupPolicies = formatPolicy(policy);\n const isGroupEnabled = groupEnabled === \"enabled\";\n const memberActionText = members.length > 0 ? \"Edit Members\" : \"Add Members\";\n\n const getGroupDetails = hasPermission(\n CONSOLE_UI_RESOURCE,\n getGroupPermissions,\n );\n\n const canEditGroupMembers = hasPermission(\n CONSOLE_UI_RESOURCE,\n editGroupMembersPermissions,\n true,\n );\n\n const canSetPolicies = hasPermission(\n CONSOLE_UI_RESOURCE,\n setGroupPoliciesPermissions,\n true,\n );\n\n const canViewPolicy = hasPermission(\n CONSOLE_UI_RESOURCE,\n viewPolicyPermissions,\n true,\n );\n\n function fetchGroupInfo() {\n if (getGroupDetails) {\n api.group\n .groupInfo(params.groupName || \"\")\n .then((res) => {\n setGroupDetails(res.data);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n setGroupDetails({});\n });\n }\n }\n\n function toggleGroupStatus(nextStatus: boolean) {\n return api.group\n .updateGroup(params.groupName || \"\", {\n members: members,\n status: nextStatus ? \"enabled\" : \"disabled\",\n })\n .then(() => {\n fetchGroupInfo();\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n });\n }\n\n const groupsTabContent = (\n {\n dispatch(setHelpName(\"groups_members\"));\n }}\n >\n \n {\n setMemberFilter(searchText);\n }}\n value={memberFilter}\n sx={{\n maxWidth: 280,\n }}\n />\n \n \n }\n onClick={() => {\n setUsersOpen(true);\n }}\n disabled={!canEditGroupMembers}\n />\n \n \n \n }\n >\n Members\n \n \n \n \n {\n navigate(\n `${IAM_PAGES.USERS}/${encodeURIComponent(userName)}`,\n );\n },\n isDisabled: !viewUser,\n },\n ]}\n columns={[{ label: \"Access Key\" }]}\n selectedItems={[]}\n isLoading={false}\n records={filteredMembers}\n entityName=\"Users\"\n />\n \n \n \n \n );\n\n const policiesTabContent = (\n \n {\n dispatch(setHelpName(\"groups_policies\"));\n }}\n >\n \n }\n onClick={() => {\n setPolicyOpen(true);\n }}\n disabled={!canSetPolicies}\n />\n \n }\n >\n Policies\n \n \n \n \n {\n navigate(\n `${IAM_PAGES.POLICIES}/${encodeURIComponent(policy)}`,\n );\n },\n isDisabled: !canViewPolicy,\n },\n ]}\n columns={[{ label: \"Policy\" }]}\n isLoading={false}\n records={groupPolicies}\n entityName=\"Policies\"\n />\n \n \n \n );\n\n return (\n \n {policyOpen ? (\n {\n setPolicyOpen(false);\n fetchGroupInfo();\n dispatch(setSelectedPolicies([]));\n }}\n />\n ) : null}\n\n {usersOpen ? (\n {}}\n title={memberActionText}\n groupStatus={groupEnabled}\n preSelectedUsers={members}\n open={usersOpen}\n onClose={() => {\n setUsersOpen(false);\n fetchGroupInfo();\n }}\n />\n ) : null}\n\n {deleteOpen && (\n {\n setDeleteOpen(false);\n if (isDelSuccess) {\n navigate(IAM_PAGES.GROUPS);\n }\n }}\n />\n )}\n \n navigate(IAM_PAGES.GROUPS)}\n />\n \n }\n actions={}\n />\n \n \n \n \n \n }\n title={params.groupName || \"\"}\n subTitle={null}\n bottomBorder\n actions={\n \n Group Status:\n \n {isGroupEnabled ? \"Enabled\" : \"Disabled\"}\n \n \n \n {\n toggleGroupStatus(!isGroupEnabled);\n }}\n switchOnly\n />\n \n \n\n \n }\n onClick={() => {\n setDeleteOpen(true);\n }}\n />\n \n \n }\n sx={{ marginBottom: 15 }}\n />\n \n\n \n \n \n \n \n );\n};\n\nexport default GroupsDetails;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useCallback, useEffect, useState, Fragment } from \"react\";\nimport get from \"lodash/get\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport { Box, DataTable, Grid, ProgressBar } from \"mds\";\n\nimport { usersSort } from \"../../../utils/sortFunctions\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\nimport SearchBox from \"../Common/SearchBox\";\n\ninterface IGroupsProps {\n selectedUsers: string[];\n setSelectedUsers: any;\n editMode?: boolean;\n}\n\nconst UsersSelectors = ({\n selectedUsers,\n setSelectedUsers,\n editMode = false,\n}: IGroupsProps) => {\n const dispatch = useAppDispatch();\n //Local States\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const fetchUsers = useCallback(() => {\n api.users\n .listUsers()\n .then((res) => {\n let users = get(res.data, \"users\", []);\n\n if (!users) {\n users = [];\n }\n\n setRecords(users.sort(usersSort));\n isLoading(false);\n })\n .catch((err) => {\n dispatch(setModalErrorSnackMessage(errorToHandler(err.error)));\n isLoading(false);\n });\n }, [dispatch]);\n\n //Effects\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n fetchUsers();\n }\n }, [loading, fetchUsers]);\n\n const selUsers = !selectedUsers ? [] : selectedUsers;\n\n //Fetch Actions\n const selectionChanged = (e: React.ChangeEvent) => {\n const targetD = e.target;\n const value = targetD.value;\n const checked = targetD.checked;\n\n let elements: string[] = [...selUsers]; // We clone the selectedGroups array\n\n if (checked) {\n // If the user has checked this field we need to push this to selectedGroupsList\n elements.push(value);\n } else {\n // User has unchecked this field, we need to remove it from the list\n elements = elements.filter((element) => element !== value);\n }\n setSelectedUsers(elements);\n\n return elements;\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.accessKey.includes(filter),\n );\n\n return (\n \n \n {loading && }\n {records?.length > 0 ? (\n \n \n \n \n \n \n ) : (\n \n No Users to display\n \n )}\n \n \n );\n};\n\nexport default UsersSelectors;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useCallback, useEffect, useState } from \"react\";\n\nimport { Box, DataTable, Grid, ProgressBar } from \"mds\";\nimport { policySort } from \"../../../utils/sortFunctions\";\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport SearchBox from \"../Common/SearchBox\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport { setSelectedPolicies } from \"../Users/AddUsersSlice\";\nimport { useSelector } from \"react-redux\";\nimport { api } from \"../../../api\";\n\ninterface ISelectPolicyProps {\n selectedPolicy?: string[];\n noTitle?: boolean;\n}\n\nconst PolicySelectors = ({ noTitle = false }: ISelectPolicyProps) => {\n const dispatch = useAppDispatch();\n // Local State\n const [records, setRecords] = useState([]);\n const [loading, isLoading] = useState(false);\n const [filter, setFilter] = useState(\"\");\n\n const currentPolicies = useSelector(\n (state: AppState) => state.createUser.selectedPolicies,\n );\n\n const fetchPolicies = useCallback(() => {\n isLoading(true);\n\n api.policies\n .listPolicies()\n .then((res) => {\n const policies = res.data.policies ?? [];\n isLoading(false);\n setRecords(policies.sort(policySort));\n })\n .catch((err: ErrorResponseHandler) => {\n isLoading(false);\n dispatch(setModalErrorSnackMessage(err));\n });\n }, [dispatch]);\n\n //Effects\n useEffect(() => {\n isLoading(true);\n }, []);\n\n useEffect(() => {\n if (loading) {\n fetchPolicies();\n }\n }, [loading, fetchPolicies]);\n\n const selectionChanged = (e: React.ChangeEvent) => {\n const targetD = e.target;\n const value = targetD.value;\n const checked = targetD.checked;\n\n let elements: string[] = [...currentPolicies]; // We clone the checkedUsers array\n\n if (checked) {\n // If the user has checked this field we need to push this to checkedUsersList\n elements.push(value);\n } else {\n // User has unchecked this field, we need to remove it from the list\n elements = elements.filter((element) => element !== value);\n }\n // remove empty values\n elements = elements.filter((element) => element !== \"\");\n\n dispatch(setSelectedPolicies(elements));\n };\n\n const filteredRecords = records.filter((elementItem) =>\n elementItem.name.includes(filter),\n );\n\n return (\n \n {loading && }\n {records.length > 0 ? (\n \n \n {\n setFilter(value);\n }}\n value={filter}\n label={!noTitle ? \"Assign Policies\" : \"\"}\n />\n \n\n \n \n ) : (\n \n No Policies Available\n \n )}\n \n );\n};\n\nexport default PolicySelectors;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport get from \"lodash/get\";\nimport { useSelector } from \"react-redux\";\nimport { Button, FormLayout, ReadBox, Grid, ProgressBar } from \"mds\";\n\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport { setModalErrorSnackMessage } from \"../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../store\";\nimport { modalStyleUtils } from \"../Common/FormComponents/common/styleLibrary\";\nimport { User } from \"../Users/types\";\nimport { setSelectedPolicies } from \"../Users/AddUsersSlice\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport PolicySelectors from \"./PolicySelectors\";\nimport api from \"../../../common/api\";\n\ninterface ISetPolicyProps {\n closeModalAndRefresh: () => void;\n selectedUser: User | null;\n selectedGroups: string[] | null;\n open: boolean;\n}\n\nconst SetPolicy = ({\n closeModalAndRefresh,\n selectedUser,\n selectedGroups,\n open,\n}: ISetPolicyProps) => {\n const dispatch = useAppDispatch();\n //Local States\n const [loading, setLoading] = useState(false);\n const [actualPolicy, setActualPolicy] = useState([]);\n const [selectedPolicy, setSelectedPolicy] = useState([]);\n const currentPolicies = useSelector(\n (state: AppState) => state.createUser.selectedPolicies,\n );\n const setPolicyAction = () => {\n let users = null;\n let groups = null;\n if (selectedGroups !== null) {\n groups = selectedGroups;\n } else {\n if (selectedUser !== null) {\n users = [selectedUser.accessKey] || [\" \"];\n }\n }\n\n setLoading(true);\n\n api\n .invoke(\"PUT\", `/api/v1/set-policy-multi`, {\n name: currentPolicies,\n groups: groups,\n users: users,\n })\n .then(() => {\n setLoading(false);\n closeModalAndRefresh();\n })\n .catch((err: ErrorResponseHandler) => {\n setLoading(false);\n dispatch(setModalErrorSnackMessage(err));\n });\n };\n\n const fetchGroupInformation = () => {\n if (selectedGroups?.length === 1) {\n api\n .invoke(\"GET\", `/api/v1/group/${encodeURIComponent(selectedGroups[0])}`)\n .then((res: any) => {\n const groupPolicy: String = get(res, \"policy\", \"\");\n setActualPolicy(groupPolicy.split(\",\"));\n setSelectedPolicy(groupPolicy.split(\",\"));\n dispatch(setSelectedPolicies(groupPolicy.split(\",\")));\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(err));\n setLoading(false);\n });\n }\n };\n\n const resetSelection = () => {\n setSelectedPolicy(actualPolicy);\n dispatch(setSelectedPolicies(actualPolicy));\n };\n\n useEffect(() => {\n if (open) {\n if (selectedGroups?.length === 1) {\n fetchGroupInformation();\n return;\n }\n\n const userPolicy: string[] = get(selectedUser, \"policy\", []);\n setActualPolicy(userPolicy);\n setSelectedPolicy(userPolicy);\n dispatch(setSelectedPolicies(userPolicy));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, selectedGroups?.length, selectedUser]);\n\n const userName = get(selectedUser, \"accessKey\", \"\");\n\n return (\n {\n closeModalAndRefresh();\n }}\n modalOpen={open}\n title=\"Set Policies\"\n >\n \n {(selectedGroups?.length === 1 || selectedUser != null) && (\n \n \n {selectedGroups !== null ? selectedGroups[0] : userName}\n \n \n {actualPolicy.join(\", \")}\n \n \n )}\n {selectedGroups && selectedGroups?.length > 1 && (\n \n {selectedGroups.join(\", \")}\n \n )}\n \n \n \n \n \n \n \n \n {loading && (\n \n \n \n )}\n \n );\n};\n\nexport default SetPolicy;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { Policy, User } from \"api/consoleApi\";\n\ninterface policyDetailsInterface {\n policy: string;\n}\n\nexport const usersSort = (a: User, b: User) => {\n if (a.accessKey && b.accessKey) {\n if (a.accessKey > b.accessKey) {\n return 1;\n }\n if (a.accessKey < b.accessKey) {\n return -1;\n }\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policySort = (a: Policy, b: Policy) => {\n if (a.name! > b.name!) {\n return 1;\n }\n if (a.name! < b.name!) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const stringSort = (a: string, b: string) => {\n if (a > b) {\n return 1;\n }\n if (a < b) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n\nexport const policyDetailsSort = (\n a: policyDetailsInterface,\n b: policyDetailsInterface,\n) => {\n if (a.policy > b.policy) {\n return 1;\n }\n if (a.policy < b.policy) {\n return -1;\n }\n // a must be equal to b\n return 0;\n};\n"],"names":["_ref","onClose","modalOpen","title","children","wideLimit","titleIcon","iconColor","sx","dispatch","useAppDispatch","openSnackbar","setOpenSnackbar","useState","modalSnackMessage","useSelector","state","system","modalSnackBar","useEffect","setModalSnackMessage","message","type","detailedErrorMsg","length","_jsxs","ModalBox","open","widthLimit","_jsx","MainError","isModal","Snackbar","closeSnackBar","mode","variant","autoHideDuration","condensed","selectedGroups","deleteOpen","closeDeleteModalAndRefresh","loadingDelete","setLoadingDelete","renderGroups","map","group","ConfirmDialog","concat","confirmText","isOpen","ConfirmDeleteIcon","isLoading","onConfirm","onDeleteGroups","api","removeGroup","then","_","catch","async","err","res","json","setErrorSnackMessage","errorToHandler","finally","confirmationContent","Fragment","groupStatus","preSelectedUsers","selectedGroup","selectedUsers","setSelectedUsers","ModalWrapper","AddMembersToGroupIcon","FormLayout","withBorders","containerPadding","ReadBox","label","width","UsersSelectors","editMode","Grid","item","xs","modalStyleUtils","modalButtonBar","Button","id","onClick","updateGroup","members","status","setModalErrorSnackMessage","error","formatPolicy","policy","arguments","undefined","split","GroupsDetails","navigate","useNavigate","params","useParams","groupDetails","setGroupDetails","policyOpen","setPolicyOpen","usersOpen","setUsersOpen","setDeleteOpen","memberFilter","setMemberFilter","currentTab","setCurrentTab","groupEnabled","filteredMembers","filter","elementItem","includes","viewUser","hasPermission","CONSOLE_UI_RESOURCE","viewUserPermissions","setHelpName","groupName","fetchGroupInfo","groupPolicies","isGroupEnabled","memberActionText","getGroupDetails","getGroupPermissions","canEditGroupMembers","editGroupMembersPermissions","canSetPolicies","setGroupPoliciesPermissions","canViewPolicy","viewPolicyPermissions","groupInfo","data","groupsTabContent","Box","onMouseMove","SectionTitle","separator","marginBottom","actions","display","gap","SearchBox","placeholder","onChange","searchText","value","maxWidth","SecureComponent","resource","scopes","addUserToGroupPermissions","errorProps","disabled","TooltipWrapper","tooltip","permissionTooltipHelper","createGroupPermissions","icon","AddIcon","listUsersPermissions","DataTable","itemActions","userName","IAM_PAGES","USERS","encodeURIComponent","isDisabled","columns","selectedItems","records","entityName","policiesTabContent","IAMPoliciesIcon","POLICIES","SetPolicy","selectedUser","closeModalAndRefresh","setSelectedPolicies","AddGroupMember","onSaveClick","DeleteGroup","isDelSuccess","GROUPS","PageHeaderWrapper","BackLink","HelpMenu","PageLayout","ScreenTitle","GroupsIcon","subTitle","bottomBorder","fontSize","alignItems","style","fontWeight","enableDisableGroupPermissions","matchAll","Switch","indicatorLabels","checked","name","nextStatus","switchOnly","TrashIcon","Tabs","options","tabConfig","content","currentTabOrPath","onTabClick","setRecords","loading","setFilter","fetchUsers","useCallback","users","listUsers","get","sort","usersSort","selUsers","filteredRecords","accessKey","className","ProgressBar","elementKey","onSelect","e","targetD","target","elements","push","element","idField","customPaperHeight","textAlign","padding","noTitle","currentPolicies","createUser","selectedPolicies","fetchPolicies","policies","listPolicies","_res$data$policies","policySort","setLoading","actualPolicy","setActualPolicy","selectedPolicy","setSelectedPolicy","invoke","groupPolicy","userPolicy","join","PolicySelectors","resetSelection","color","setPolicyAction","groups","a","b","stringSort","policyDetailsSort"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/2033.a7412d01.chunk.js.map b/web-app/build/static/js/2033.a7412d01.chunk.js.map
index ee7c3be55b..9685a114c7 100644
--- a/web-app/build/static/js/2033.a7412d01.chunk.js.map
+++ b/web-app/build/static/js/2033.a7412d01.chunk.js.map
@@ -1 +1 @@
-{"version":3,"file":"static/js/2033.a7412d01.chunk.js","mappings":"kNAmBA,MAiBA,EAjBgDA,KAE5CC,EAAAA,EAAAA,KAACC,EAAAA,IAAO,CACNC,eAAeF,EAAAA,EAAAA,KAACG,EAAAA,IAAuB,IACvCC,MAAO,+BACPC,MACEL,EAAAA,EAAAA,KAACM,EAAAA,IAAG,CAACC,GAAI,CAAEC,WAAY,QAASC,SAAC,8O,mCCGzC,MAAMC,E,SAAwBC,GAAOC,QAAOC,IAAA,IAAC,MAAEC,GAAOD,EAAA,MAAM,CAC1DE,WAAYC,IAAIF,EAAO,gBAAiB,QACxCG,OAAO,GAADC,OAAKF,IAAIF,EAAO,cAAe,WAAU,cAC/CK,aAAc,EACdC,MAAO,IACPC,OAAQ,GACRC,QAAS,OACTC,WAAY,SACZC,eAAgB,QAChBC,aAAc,GACdC,YAAa,EACbC,OAAQ,UACRC,SAAU,SACV,UAAW,CACTC,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ER,KAAM,MACNhC,MAAO,MACPuC,QAAS,4BACTC,KAAM,UAER,CACER,KAAM,kBACNhC,MAAO,kBACPuC,QACE,mEACFC,KAAM,UAER,CACER,KAAM,kBACNhC,MAAO,kBACPuC,QAAS,oDACTC,KAAM,OACNC,YAAa,yBAEf,CACET,KAAM,iBACNhC,MAAO,iBACPuC,QAAS,4CACTC,KAAM,OACNC,YAAa,wBAEf,CACET,KAAM,UACNhC,MAAO,UACPuC,QAAS,uDACTC,KAAM,SACNC,YAAa,0BAEZJ,GAEL,CAAClB,GAAa,CACZ,CACEa,KAAM,MACNM,UAAU,EACVtC,MAAO,MACPuC,QACE,sEACFC,KAAM,OAER,CACER,KAAM,WACNhC,MAAO,WACPuC,QAAS,4BACTC,KAAM,SACNC,YAAa,kBAEf,CACET,KAAM,gBACNhC,MAAO,gBACPuC,QAAS,qBACTC,KAAM,SACNC,YAAa,uBAEf,CACET,KAAM,cACNhC,MAAO,cACPuC,QAAS,6BACTC,KAAM,SACNC,YAAa,qBAEf,CACET,KAAM,YACNhC,MAAO,YACPuC,QACE,yEACFC,KAAM,UAER,CACER,KAAM,UACNhC,MAAO,UACPuC,QACE,0EACFC,KAAM,UAER,CACER,KAAM,UACNhC,MAAO,UACPuC,QACE,mEACFC,KAAM,UAER,CACER,KAAM,WACNhC,MAAO,WACPuC,QACE,yGACFC,KAAM,UAER,CACER,KAAM,eACNhC,MAAO,eACPuC,QACE,kEACFC,KAAM,UAER,CACER,KAAM,gBACNhC,MAAO,gBACPuC,QAAS,4DACTC,KAAM,SACNC,YAAa,0BAEZJ,GAEL,CAAChB,GAAc,CACb,CACEW,KAAM,UACNM,UAAU,EACVtC,MAAO,UACPuC,QAAS,+CACTC,KAAM,UACNC,YAAa,iBAEf,CACET,KAAM,MACNM,UAAU,EACVtC,MAAO,MACPuC,QAAS,wDACTC,KAAM,SACNC,YAAa,aAEf,CACET,KAAM,WACNhC,MAAO,WACPuC,QAAS,wBACTC,KAAM,SACNC,YAAa,qBAEZJ,GAEL,CAACjB,GAAa,CACZ,CACEY,KAAM,SACNM,UAAU,EACVtC,MAAO,SACPuC,QAAS,mDACTC,KAAM,MACNC,YAAa,iBAEf,CACET,KAAM,QACNM,UAAU,EACVtC,MAAO,QACPuC,QAAS,oCACTC,KAAM,SACNC,YAAa,eAEf,CACET,KAAM,WACNhC,MAAO,WACPuC,QAAS,gBACTC,KAAM,SACNC,YAAa,kBAEf,CACET,KAAM,WACNhC,MAAO,WACPuC,QAAS,gBACTC,KAAM,SACNC,YAAa,kBAEf,CACET,KAAM,MACNhC,MAAO,MACPuC,QAAS,uDACTC,KAAM,SACNC,YAAa,aAEf,CACET,KAAM,sBACNhC,MAAO,sBACPuC,QAAS,sDACTC,KAAM,WACNC,YAAa,6BAEf,CACET,KAAM,qBACNhC,MAAO,qBACPuC,QAAS,qDACTC,KAAM,WACNC,YAAa,+BAEZJ,GAEL,CAACf,GAAa,CACZ,CACEU,KAAM,UACNM,UAAU,EACVtC,MAAO,UACPuC,QAAS,0CACTC,KAAM,UACNC,YAAa,iBAEf,CACET,KAAM,UACNM,UAAU,EACVtC,MAAO,UACPuC,QAAS,4BACTC,KAAM,SACNC,YAAa,sBAEf,CACET,KAAM,WACNhC,MAAO,WACPuC,QAAS,gBACTC,KAAM,SACNC,YAAa,uBAEf,CACET,KAAM,WACNhC,MAAO,WACPuC,QAAS,gBACTC,KAAM,SACNC,YAAa,uBAEf,CACET,KAAM,QACNhC,MAAO,QACPuC,QAAS,aACTC,KAAM,SACNC,YAAa,oBAEf,CACET,KAAM,MACNhC,MAAO,MACPuC,QAAS,4BACTC,KAAM,UAER,CACER,KAAM,kBACNhC,MAAO,kBACPuC,QACE,mEACFC,KAAM,UAER,CACER,KAAM,gBACNhC,MAAO,gBACPuC,QAAS,gEACTC,KAAM,WACNC,YAAa,uBAEf,CACET,KAAM,YACNhC,MAAO,YACPuC,QAAS,2CACTC,KAAM,UAER,CACER,KAAM,kBACNhC,MAAO,kBACPuC,QAAS,6CACTC,KAAM,UAER,CACER,KAAM,mCACNhC,MAAO,uCACPuC,QAAS,yDACTC,KAAM,SACNC,YAAa,mCAEf,CACET,KAAM,uBACNhC,MAAO,uBACPuC,QAAS,uCACTC,KAAM,SACNC,YAAa,8BAEf,CACET,KAAM,iBACNhC,MAAO,iBACPuC,QAAS,sDACTC,KAAM,SACNC,YAAa,wBAEf,CACET,KAAM,cACNhC,MAAO,cACPuC,QAAS,iCACTC,KAAM,SACNC,YAAa,qBAEf,CACET,KAAM,aACNhC,MAAO,aACPuC,QAAS,8CACTC,KAAM,SACNC,YAAa,uBAEZJ,GAEL,CAACd,GAAsB,CACrB,CACES,KAAM,MACNM,UAAU,EACVtC,MAAO,MACPuC,QACE,oEACFC,KAAM,MACNC,YAAa,aAEf,CACET,KAAM,QACNM,UAAU,EACVtC,MAAO,QACPuC,QACE,oEACFC,KAAM,SACNC,YAAa,eAEf,CACET,KAAM,SACNM,UAAU,EACVtC,MAAO,SACPuC,QACE,gIACFC,KAAM,OACNC,YAAa,mBAEZJ,GAEL,CAACb,GAAiB,CAChB,CACEQ,KAAM,WACNM,UAAU,EACVtC,MAAO,WACPuC,QACE,kEACFC,KAAM,MACNC,YAAa,kBAEf,CACET,KAAM,aACNhC,MAAO,aACPuC,QAAS,2CACTC,KAAM,SACNC,YAAa,uBAEZJ,GAEL,CAACZ,GAAY,CACX,CACEO,KAAM,eACNM,UAAU,EACVtC,MAAO,eACPuC,QAAS,2CACTC,KAAM,UACNC,YAAa,sBAEf,CACET,KAAM,QACNM,UAAU,EACVtC,MAAO,QACPuC,QAAS,YACTC,KAAM,SACNC,YAAa,eAEf,CACET,KAAM,MACNhC,MAAO,MACPuC,QAAS,4BACTC,KAAM,UAER,CACER,KAAM,kBACNhC,MAAO,kBACPuC,QACE,mEACFC,KAAM,aAELH,IAIDU,EAA6C,CACjDC,QAAS,iBACTC,KAAM,cACNC,MAAO,eACPC,KAAM,cACNC,KAAM,cACNC,IAAK,aACLC,MAAO,eACPC,WAAY,kBACZC,cAAe,uBACfC,MAAO,gBAGIC,EAA4BC,GAChCZ,EAAmBY,E","sources":["screens/Console/Account/NotificationEndpointTypeSelectorHelpBox.tsx","screens/Console/EventDestinations/DestinationButton.tsx","screens/Console/EventDestinations/EventTypeSelector.tsx","screens/Console/EventDestinations/utils.ts"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\n\nimport { HelpBox, LambdaNotificationsIcon, Box } from \"mds\";\n\nconst NotificationEndpointTypeSelectorHelpBox = () => {\n return (\n }\n title={\"What are Event Destinations?\"}\n help={\n \n MinIO bucket notifications allow administrators to send notifications\n to supported external services on certain object or bucket events.\n MinIO supports bucket and object-level S3 events similar to the Amazon\n S3 Event Notifications.\n \n }\n />\n );\n};\n\nexport default NotificationEndpointTypeSelectorHelpBox;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport get from \"lodash/get\";\nimport { useNavigate } from \"react-router-dom\";\nimport styled from \"styled-components\";\nimport { IAM_PAGES } from \"../../../common/SecureComponent/permissions\";\n\ninterface IDestinationButton {\n destinationType: string;\n srcImage: string;\n title: string;\n}\n\nconst DestinationButtonBase = styled.button(({ theme }) => ({\n background: get(theme, \"boxBackground\", \"#FFF\"),\n border: `${get(theme, \"borderColor\", \"#E2E2E2\")} 1px solid`,\n borderRadius: 5,\n width: 250,\n height: 80,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"start\",\n marginBottom: 16,\n marginRight: 8,\n cursor: \"pointer\",\n overflow: \"hidden\",\n \"&:hover\": {\n backgroundColor: get(theme, \"buttons.regular.hover.background\", \"#ebebeb\"),\n },\n \"& .imageContainer\": {\n width: 80,\n \"& .logoButton\": {\n maxWidth: 46,\n maxHeight: 46,\n filter: \"drop-shadow(1px 1px 8px #fff)\",\n },\n },\n \"& .lambdaNotifTitle\": {\n color: get(theme, \"buttons.callAction.enabled.background\", \"#07193E\"),\n fontSize: 16,\n fontFamily: \"Inter,sans-serif\",\n paddingLeft: 18,\n fontWeight: \"bold\",\n },\n}));\n\nconst DestinationButton = ({\n destinationType,\n srcImage,\n title,\n}: IDestinationButton) => {\n const navigate = useNavigate();\n\n return (\n {\n navigate(`${IAM_PAGES.EVENT_DESTINATIONS_ADD}/${destinationType}`);\n }}\n >\n \n \n \n {title}\n \n );\n};\n\nexport default DestinationButton;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { BackLink, Box, FormLayout, PageLayout } from \"mds\";\nimport { destinationList, DestType } from \"./utils\";\nimport { typesSelection } from \"../Common/FormComponents/common/styleLibrary\";\nimport { IAM_PAGES } from \"../../../common/SecureComponent/permissions\";\nimport NotificationEndpointTypeSelectorHelpBox from \"../Account/NotificationEndpointTypeSelectorHelpBox\";\nimport PageHeaderWrapper from \"../Common/PageHeaderWrapper/PageHeaderWrapper\";\nimport DestinationButton from \"./DestinationButton\";\n\nimport HelpMenu from \"../HelpMenu\";\nimport { useAppDispatch } from \"../../../store\";\nimport { setHelpName } from \"../../../systemSlice\";\n\nconst withLogos = destinationList.filter((elService) => elService.logo !== \"\");\nconst database = withLogos.filter(\n (elService) => elService.category === DestType.DB,\n);\nconst queue = withLogos.filter(\n (elService) => elService.category === DestType.Queue,\n);\nconst functions = withLogos.filter(\n (elService) => elService.category === DestType.Func,\n);\n\nconst EventTypeSelector = () => {\n const navigate = useNavigate();\n const dispatch = useAppDispatch();\n useEffect(() => {\n dispatch(setHelpName(\"notification_type_selector\"));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return (\n \n \n navigate(IAM_PAGES.EVENT_DESTINATIONS)}\n />\n \n }\n actions={}\n />\n \n }>\n \n \n Queue\n \n \n {queue.map((item) => {\n return (\n \n );\n })}\n \n \n Database\n \n \n {database.map((item) => {\n return (\n \n );\n })}\n \n \n Functions\n \n \n {functions.map((item) => {\n return (\n \n );\n })}\n \n \n \n \n \n );\n};\n\nexport default EventTypeSelector;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { NotificationEndpointItem } from \"api/consoleApi\";\nimport { IElementValue } from \"../Configurations/types\";\nimport { TransformedEndpointItem } from \"./types\";\n\nexport const notifyPostgres = \"notify_postgres\";\nexport const notifyMysql = \"notify_mysql\";\nexport const notifyKafka = \"notify_kafka\";\nexport const notifyAmqp = \"notify_amqp\";\nexport const notifyMqtt = \"notify_mqtt\";\nexport const notifyRedis = \"notify_redis\";\nexport const notifyNats = \"notify_nats\";\nexport const notifyElasticsearch = \"notify_elasticsearch\";\nexport const notifyWebhooks = \"notify_webhook\";\nexport const notifyNsq = \"notify_nsq\";\nexport const notificationTransform = (\n notificationElements: NotificationEndpointItem[],\n) => {\n return notificationElements.map((element) => {\n return {\n service_name: `${element.service}:${element.account_id}`,\n name: element.service,\n account_id: element.account_id,\n status: element.status,\n };\n }) as TransformedEndpointItem[];\n};\n\nexport class DestType {\n static DB: string = \"database\";\n static Queue: string = \"queue\";\n static Func: string = \"functions\";\n}\n\nconst getImgBaseURL = () => {\n return `${document.baseURI}`;\n};\n\nexport const destinationList = [\n {\n actionTrigger: notifyPostgres,\n targetTitle: \"PostgreSQL\",\n logo: `${getImgBaseURL()}postgres-logo.svg`,\n category: DestType.DB,\n },\n {\n actionTrigger: notifyKafka,\n targetTitle: \"Kafka\",\n logo: `${getImgBaseURL()}kafka-logo.svg`,\n category: DestType.Queue,\n },\n {\n actionTrigger: notifyAmqp,\n targetTitle: \"AMQP\",\n logo: `${getImgBaseURL()}amqp-logo.svg`,\n category: DestType.Queue,\n },\n {\n actionTrigger: notifyMqtt,\n targetTitle: \"MQTT\",\n logo: `${getImgBaseURL()}mqtt-logo.svg`,\n category: DestType.Queue,\n },\n {\n actionTrigger: notifyRedis,\n targetTitle: \"Redis\",\n logo: `${getImgBaseURL()}redis-logo.svg`,\n category: DestType.Queue,\n },\n {\n actionTrigger: notifyNats,\n targetTitle: \"NATS\",\n logo: `${getImgBaseURL()}nats-logo.svg`,\n category: DestType.Queue,\n },\n {\n actionTrigger: notifyMysql,\n targetTitle: \"Mysql\",\n logo: `${getImgBaseURL()}mysql-logo.svg`,\n category: DestType.DB,\n },\n {\n actionTrigger: notifyElasticsearch,\n targetTitle: \"Elastic Search\",\n logo: `${getImgBaseURL()}elasticsearch-logo.svg`,\n category: DestType.DB,\n },\n {\n actionTrigger: notifyWebhooks,\n targetTitle: \"Webhook\",\n logo: `${getImgBaseURL()}webhooks-logo.svg`,\n category: DestType.Func,\n },\n {\n actionTrigger: notifyNsq,\n targetTitle: \"NSQ\",\n logo: `${getImgBaseURL()}nsq-logo.svg`,\n category: DestType.Queue,\n },\n];\n\nconst commonFields = [\n {\n name: \"queue_dir\",\n label: \"Queue Directory\",\n required: false,\n\n tooltip: \"Staging directory for undelivered messages e.g. '/home/events'\",\n type: \"string\",\n placeholder: \"Enter Queue Directory\",\n },\n {\n name: \"queue_limit\",\n label: \"Queue Limit\",\n required: false,\n\n tooltip: \"Maximum limit for undelivered messages, defaults to '10000'\",\n type: \"number\",\n placeholder: \"Enter Queue Limit\",\n },\n {\n name: \"comment\",\n label: \"Comment\",\n required: false,\n type: \"comment\",\n placeholder: \"Enter custom notes if any\",\n },\n];\n\nexport const removeEmptyFields = (formFields: IElementValue[]) => {\n const nonEmptyFields = formFields.filter((field) => field.value !== \"\");\n\n return nonEmptyFields;\n};\n\nexport const notificationEndpointsFields: any = {\n [notifyKafka]: [\n {\n name: \"brokers\",\n label: \"Brokers\",\n required: true,\n\n tooltip: \"Comma separated list of Kafka broker addresses\",\n type: \"string\",\n placeholder: \"Enter Brokers\",\n },\n {\n name: \"topic\",\n label: \"Topic\",\n tooltip: \"Kafka topic used for bucket notifications\",\n type: \"string\",\n placeholder: \"Enter Topic\",\n },\n {\n name: \"sasl_username\",\n label: \"SASL Username\",\n tooltip: \"Username for SASL/PLAIN or SASL/SCRAM authentication\",\n type: \"string\",\n placeholder: \"Enter SASL Username\",\n },\n {\n name: \"sasl_password\",\n label: \"SASL Password\",\n tooltip: \"Password for SASL/PLAIN or SASL/SCRAM authentication\",\n type: \"string\",\n placeholder: \"Enter SASL Password\",\n },\n {\n name: \"sasl_mechanism\",\n label: \"SASL Mechanism\",\n tooltip: \"SASL authentication mechanism, default 'PLAIN'\",\n type: \"string\",\n },\n {\n name: \"tls_client_auth\",\n label: \"TLS Client Auth\",\n tooltip:\n \"Client Auth determines the Kafka server's policy for TLS client authorization\",\n type: \"string\",\n placeholder: \"Enter TLS Client Auth\",\n },\n {\n name: \"sasl\",\n label: \"SASL\",\n tooltip: \"Set to 'on' to enable SASL authentication\",\n type: \"on|off\",\n },\n {\n name: \"tls\",\n label: \"TLS\",\n tooltip: \"Set to 'on' to enable TLS\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n label: \"TLS skip verify\",\n tooltip:\n 'Trust server TLS without verification, defaults to \"on\" (verify)',\n type: \"on|off\",\n },\n {\n name: \"client_tls_cert\",\n label: \"client TLS cert\",\n tooltip: \"Path to client certificate for mTLS authorization\",\n type: \"path\",\n placeholder: \"Enter TLS Client Cert\",\n },\n {\n name: \"client_tls_key\",\n label: \"client TLS key\",\n tooltip: \"Path to client key for mTLS authorization\",\n type: \"path\",\n placeholder: \"Enter TLS Client Key\",\n },\n {\n name: \"version\",\n label: \"Version\",\n tooltip: \"Specify the version of the Kafka cluster e.g '2.2.0'\",\n type: \"string\",\n placeholder: \"Enter Kafka Version\",\n },\n ...commonFields,\n ],\n [notifyAmqp]: [\n {\n name: \"url\",\n required: true,\n label: \"URL\",\n tooltip:\n \"AMQP server endpoint e.g. `amqp://myuser:mypassword@localhost:5672`\",\n type: \"url\",\n },\n {\n name: \"exchange\",\n label: \"Exchange\",\n tooltip: \"Name of the AMQP exchange\",\n type: \"string\",\n placeholder: \"Enter Exchange\",\n },\n {\n name: \"exchange_type\",\n label: \"Exchange Type\",\n tooltip: \"AMQP exchange type\",\n type: \"string\",\n placeholder: \"Enter Exchange Type\",\n },\n {\n name: \"routing_key\",\n label: \"Routing Key\",\n tooltip: \"Routing key for publishing\",\n type: \"string\",\n placeholder: \"Enter Routing Key\",\n },\n {\n name: \"mandatory\",\n label: \"Mandatory\",\n tooltip:\n \"Quietly ignore undelivered messages when set to 'off', default is 'on'\",\n type: \"on|off\",\n },\n {\n name: \"durable\",\n label: \"Durable\",\n tooltip:\n \"Persist queue across broker restarts when set to 'on', default is 'off'\",\n type: \"on|off\",\n },\n {\n name: \"no_wait\",\n label: \"No Wait\",\n tooltip:\n \"Non-blocking message delivery when set to 'on', default is 'off'\",\n type: \"on|off\",\n },\n {\n name: \"internal\",\n label: \"Internal\",\n tooltip:\n \"Set to 'on' for exchange to be not used directly by publishers, but only when bound to other exchanges\",\n type: \"on|off\",\n },\n {\n name: \"auto_deleted\",\n label: \"Auto Deleted\",\n tooltip:\n \"Auto delete queue when set to 'on', when there are no consumers\",\n type: \"on|off\",\n },\n {\n name: \"delivery_mode\",\n label: \"Delivery Mode\",\n tooltip: \"Set to '1' for non-persistent or '2' for persistent queue\",\n type: \"number\",\n placeholder: \"Enter Delivery Mode\",\n },\n ...commonFields,\n ],\n [notifyRedis]: [\n {\n name: \"address\",\n required: true,\n label: \"Address\",\n tooltip: \"Redis server's address e.g. `localhost:6379`\",\n type: \"address\",\n placeholder: \"Enter Address\",\n },\n {\n name: \"key\",\n required: true,\n label: \"Key\",\n tooltip: \"Redis key to store/update events, key is auto-created\",\n type: \"string\",\n placeholder: \"Enter Key\",\n },\n {\n name: \"password\",\n label: \"Password\",\n tooltip: \"Redis server password\",\n type: \"string\",\n placeholder: \"Enter Password\",\n },\n ...commonFields,\n ],\n [notifyMqtt]: [\n {\n name: \"broker\",\n required: true,\n label: \"Broker\",\n tooltip: \"MQTT server endpoint e.g. `tcp://localhost:1883`\",\n type: \"uri\",\n placeholder: \"Enter Brokers\",\n },\n {\n name: \"topic\",\n required: true,\n label: \"Topic\",\n tooltip: \"Name of the MQTT topic to publish\",\n type: \"string\",\n placeholder: \"Enter Topic\",\n },\n {\n name: \"username\",\n label: \"Username\",\n tooltip: \"MQTT username\",\n type: \"string\",\n placeholder: \"Enter Username\",\n },\n {\n name: \"password\",\n label: \"Password\",\n tooltip: \"MQTT password\",\n type: \"string\",\n placeholder: \"Enter Password\",\n },\n {\n name: \"qos\",\n label: \"QOS\",\n tooltip: \"Set the quality of service priority, defaults to '0'\",\n type: \"number\",\n placeholder: \"Enter QOS\",\n },\n {\n name: \"keep_alive_interval\",\n label: \"Keep Alive Interval\",\n tooltip: \"Keep-alive interval for MQTT connections in s,m,h,d\",\n type: \"duration\",\n placeholder: \"Enter Keep Alive Interval\",\n },\n {\n name: \"reconnect_interval\",\n label: \"Reconnect Interval\",\n tooltip: \"Reconnect interval for MQTT connections in s,m,h,d\",\n type: \"duration\",\n placeholder: \"Enter Reconnect Interval\",\n },\n ...commonFields,\n ],\n [notifyNats]: [\n {\n name: \"address\",\n required: true,\n label: \"Address\",\n tooltip: \"NATS server address e.g. '0.0.0.0:4222'\",\n type: \"address\",\n placeholder: \"Enter Address\",\n },\n {\n name: \"subject\",\n required: true,\n label: \"Subject\",\n tooltip: \"NATS subscription subject\",\n type: \"string\",\n placeholder: \"Enter NATS Subject\",\n },\n {\n name: \"username\",\n label: \"Username\",\n tooltip: \"NATS username\",\n type: \"string\",\n placeholder: \"Enter NATS Username\",\n },\n {\n name: \"password\",\n label: \"Password\",\n tooltip: \"NATS password\",\n type: \"string\",\n placeholder: \"Enter NATS password\",\n },\n {\n name: \"token\",\n label: \"Token\",\n tooltip: \"NATS token\",\n type: \"string\",\n placeholder: \"Enter NATS token\",\n },\n {\n name: \"tls\",\n label: \"TLS\",\n tooltip: \"Set to 'on' to enable TLS\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n label: \"TLS Skip Verify\",\n tooltip:\n 'Trust server TLS without verification, defaults to \"on\" (verify)',\n type: \"on|off\",\n },\n {\n name: \"ping_interval\",\n label: \"Ping Interval\",\n tooltip: \"Client ping commands interval in s,m,h,d. Disabled by default\",\n type: \"duration\",\n placeholder: \"Enter Ping Interval\",\n },\n {\n name: \"streaming\",\n label: \"Streaming\",\n tooltip: \"Set to 'on' to use streaming NATS server\",\n type: \"on|off\",\n },\n {\n name: \"streaming_async\",\n label: \"Streaming async\",\n tooltip: \"Set to 'on' to enable asynchronous publish\",\n type: \"on|off\",\n },\n {\n name: \"streaming_max_pub_acks_in_flight\",\n label: \"Streaming max publish ACKS in flight\",\n tooltip: \"Number of messages to publish without waiting for ACKs\",\n type: \"number\",\n placeholder: \"Enter Streaming in flight value\",\n },\n {\n name: \"streaming_cluster_id\",\n label: \"Streaming Cluster ID\",\n tooltip: \"Unique ID for NATS streaming cluster\",\n type: \"string\",\n placeholder: \"Enter Streaming Cluster ID\",\n },\n {\n name: \"cert_authority\",\n label: \"Cert Authority\",\n tooltip: \"Path to certificate chain of the target NATS server\",\n type: \"string\",\n placeholder: \"Enter Cert Authority\",\n },\n {\n name: \"client_cert\",\n label: \"Client Cert\",\n tooltip: \"Client cert for NATS mTLS auth\",\n type: \"string\",\n placeholder: \"Enter Client Cert\",\n },\n {\n name: \"client_key\",\n label: \"Client Key\",\n tooltip: \"Client cert key for NATS mTLS authorization\",\n type: \"string\",\n placeholder: \"Enter Client Key\",\n },\n ...commonFields,\n ],\n [notifyElasticsearch]: [\n {\n name: \"url\",\n required: true,\n label: \"URL\",\n tooltip:\n \"Elasticsearch server's address, with optional authentication info\",\n type: \"url\",\n placeholder: \"Enter URL\",\n },\n {\n name: \"index\",\n required: true,\n label: \"Index\",\n tooltip:\n \"Elasticsearch index to store/update events, index is auto-created\",\n type: \"string\",\n placeholder: \"Enter Index\",\n },\n {\n name: \"format\",\n required: true,\n label: \"Format\",\n tooltip:\n \"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'\",\n type: \"enum\",\n placeholder: \"Enter Format\",\n },\n ...commonFields,\n ],\n [notifyWebhooks]: [\n {\n name: \"endpoint\",\n required: true,\n label: \"Endpoint\",\n tooltip:\n \"Webhook server endpoint e.g. http://localhost:8080/minio/events\",\n type: \"url\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"auth_token\",\n label: \"Auth Token\",\n tooltip: \"Opaque string or JWT authorization token\",\n type: \"string\",\n placeholder: \"Enter auth_token\",\n },\n ...commonFields,\n ],\n [notifyNsq]: [\n {\n name: \"nsqd_address\",\n required: true,\n label: \"NSQD Address\",\n tooltip: \"NSQ server address e.g. '127.0.0.1:4150'\",\n type: \"address\",\n placeholder: \"Enter nsqd_address\",\n },\n {\n name: \"topic\",\n required: true,\n label: \"Topic\",\n tooltip: \"NSQ topic\",\n type: \"string\",\n placeholder: \"Enter Topic\",\n },\n {\n name: \"tls\",\n label: \"TLS\",\n tooltip: \"Set to 'on' to enable TLS\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n label: \"TLS Skip Verify\",\n tooltip:\n 'Trust server TLS without verification, defaults to \"on\" (verify)',\n type: \"on|off\",\n },\n ...commonFields,\n ],\n};\n\nconst serviceToConfigMap: Record = {\n webhook: \"notify_webhook\",\n amqp: \"notify_amqp\",\n kafka: \"notify_kafka\",\n mqtt: \"notify_mqtt\",\n nats: \"notify_nats\",\n nsq: \"notify_nsq\",\n mysql: \"notify_mysql\",\n postgresql: \"notify_postgres\", //looks different in server response(postgresql as opposed to postgres) from api/admin_notification_endpoints.go\n elasticsearch: \"notify_elasticsearch\",\n redis: \"notify_redis\",\n};\n\nexport const getNotificationConfigKey = (serviceName: string) => {\n return serviceToConfigMap[serviceName];\n};\n"],"names":["NotificationEndpointTypeSelectorHelpBox","_jsx","HelpBox","iconComponent","LambdaNotificationsIcon","title","help","Box","sx","paddingTop","children","DestinationButtonBase","styled","button","_ref","theme","background","get","border","concat","borderRadius","width","height","display","alignItems","justifyContent","marginBottom","marginRight","cursor","overflow","backgroundColor","maxWidth","maxHeight","filter","color","fontSize","fontFamily","paddingLeft","fontWeight","_ref2","destinationType","srcImage","navigate","useNavigate","_jsxs","onClick","IAM_PAGES","EVENT_DESTINATIONS_ADD","className","src","alt","withLogos","destinationList","elService","logo","database","category","DestType","DB","queue","Queue","functions","Func","EventTypeSelector","dispatch","useAppDispatch","useEffect","setHelpName","Fragment","PageHeaderWrapper","label","BackLink","EVENT_DESTINATIONS","actions","HelpMenu","PageLayout","FormLayout","helpBox","paddingBottom","typesSelection","iconContainer","map","item","DestinationButton","actionTrigger","targetTitle","notifyPostgres","notifyMysql","notifyKafka","notifyAmqp","notifyMqtt","notifyRedis","notifyNats","notifyElasticsearch","notifyWebhooks","notifyNsq","notificationTransform","notificationElements","element","service_name","service","account_id","name","status","getImgBaseURL","document","baseURI","commonFields","required","tooltip","type","placeholder","removeEmptyFields","formFields","field","value","notificationEndpointsFields","serviceToConfigMap","webhook","amqp","kafka","mqtt","nats","nsq","mysql","postgresql","elasticsearch","redis","getNotificationConfigKey","serviceName"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"static/js/2033.a7412d01.chunk.js","mappings":"kNAmBA,MAiBA,EAjBgDA,KAE5CC,EAAAA,EAAAA,KAACC,EAAAA,IAAO,CACNC,eAAeF,EAAAA,EAAAA,KAACG,EAAAA,IAAuB,IACvCC,MAAO,+BACPC,MACEL,EAAAA,EAAAA,KAACM,EAAAA,IAAG,CAACC,GAAI,CAAEC,WAAY,QAASC,SAAC,8O,mCCGzC,MAAMC,E,SAAwBC,GAAOC,QAAOC,IAAA,IAAC,MAAEC,GAAOD,EAAA,MAAM,CAC1DE,WAAYC,IAAIF,EAAO,gBAAiB,QACxCG,OAAO,GAADC,OAAKF,IAAIF,EAAO,cAAe,WAAU,cAC/CK,aAAc,EACdC,MAAO,IACPC,OAAQ,GACRC,QAAS,OACTC,WAAY,SACZC,eAAgB,QAChBC,aAAc,GACdC,YAAa,EACbC,OAAQ,UACRC,SAAU,SACV,UAAW,CACTC,gBAAiBb,IAAIF,EAAO,mCAAoC,YAElE,oBAAqB,CACnBM,MAAO,GACP,gBAAiB,CACfU,SAAU,GACVC,UAAW,GACXC,OAAQ,kCAGZ,sBAAuB,CACrBC,MAAOjB,IAAIF,EAAO,wCAAyC,WAC3Do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AAa,yBAEf,CACET,KAAM,iBACNhC,MAAO,iBACPuC,QAAS,4CACTC,KAAM,OACNC,YAAa,wBAEf,CACET,KAAM,UACNhC,MAAO,UACPuC,QAAS,uDACTC,KAAM,SACNC,YAAa,0BAEZJ,GAEL,CAAClB,GAAa,CACZ,CACEa,KAAM,MACNM,UAAU,EACVtC,MAAO,MACPuC,QACE,sEACFC,KAAM,OAER,CACER,KAAM,WACNhC,MAAO,WACPuC,QAAS,4BACTC,KAAM,SACNC,YAAa,kBAEf,CACET,KAAM,gBACNhC,MAAO,gBACPuC,QAAS,qBACTC,KAAM,SACNC,YAAa,uBAEf,CACET,KAAM,cACNhC,MAAO,cACPuC,QAAS,6BACTC,KAAM,SACNC,YAAa,qBAEf,CACET,KAAM,YACNhC,MAAO,YACPuC,QACE,yEACFC,KAAM,UAER,CACER,KAAM,UACNhC,MAAO,UACPuC,QACE,0EACFC,KAAM,UAER,CACER,KAAM,UACNhC,MAAO,UACPuC,QACE,mEACFC,KAAM,UAER,CACER,KAAM,WACNhC,MAAO,WACPuC,QACE,yGACFC,KAAM,UAER,CACER,KAAM,eACNhC,MAAO,eACPuC,QACE,kEACFC,KAAM,UAER,CACER,KAAM,gBACNhC,MAAO,gBACPuC,QAAS,4DACTC,KAAM,SACNC,YAAa,0BAEZJ,GAEL,CAAChB,GAAc,CACb,CACEW,KAAM,UACNM,UAAU,EACVtC,MAAO,UACPuC,QAAS,+CACTC,KAAM,UACNC,YAAa,iBAEf,CACET,KAAM,MACNM,UAAU,EACVtC,MAAO,MACPuC,QAAS,wDACTC,KAAM,SACNC,YAAa,aAEf,CACET,KAAM,WACNhC,MAAO,WACPuC,QAAS,wBACTC,KAAM,SACNC,YAAa,qBAEZJ,GAEL,CAACjB,GAAa,CACZ,CACEY,KAAM,SACNM,UAAU,EACVtC,MAAO,SACPuC,QAAS,mDACTC,KAAM,MACNC,YAAa,iBAEf,CACET,KAAM,QACNM,UAAU,EACVtC,MAAO,QACPuC,QAAS,oCACTC,KAAM,SACNC,YAAa,eAEf,CACET,KAAM,WACNhC,MAAO,WACPuC,QAAS,gBACTC,KAAM,SACNC,YAAa,kBAEf,CACET,KAAM,WACNhC,MAAO,WACPuC,QAAS,gBACTC,KAAM,SACNC,YAAa,kBAEf,CACET,KAAM,MACNhC,MAAO,MACPuC,QAAS,uDACTC,KAAM,SACNC,YAAa,aAEf,CACET,KAAM,sBACNhC,MAAO,sBACPuC,QAAS,sDACTC,KAAM,WACNC,YAAa,6BAEf,CACET,KAAM,qBACNhC,MAAO,qBACPuC,QAAS,qDACTC,KAAM,WACNC,YAAa,+BAEZJ,GAEL,CAACf,GAAa,CACZ,CACEU,KAAM,UACNM,UAAU,EACVtC,MAAO,UACPuC,QAAS,0CACTC,KAAM,UACNC,YAAa,iBAEf,CACET,KAAM,UACNM,UAAU,EACVtC,MAAO,UACPuC,QAAS,4BACTC,KAAM,SACNC,YAAa,sBAEf,CACET,KAAM,WACNhC,MAAO,WACPuC,QAAS,gBACTC,KAAM,SACNC,YAAa,uBAEf,CACET,KAAM,WACNhC,MAAO,WACPuC,QAAS,gBACTC,KAAM,SACNC,YAAa,uBAEf,CACET,KAAM,QACNhC,MAAO,QACPuC,QAAS,aACTC,KAAM,SACNC,YAAa,oBAEf,CACET,KAAM,MACNhC,MAAO,MACPuC,QAAS,4BACTC,KAAM,UAER,CACER,KAAM,kBACNhC,MAAO,kBACPuC,QACE,mEACFC,KAAM,UAER,CACER,KAAM,gBACNhC,MAAO,gBACPuC,QAAS,gEACTC,KAAM,WACNC,YAAa,uBAEf,CACET,KAAM,YACNhC,MAAO,YACPuC,QAAS,2CACTC,KAAM,UAER,CACER,KAAM,kBACNhC,MAAO,kBACPuC,QAAS,6CACTC,KAAM,UAER,CACER,KAAM,mCACNhC,MAAO,uCACPuC,QAAS,yDACTC,KAAM,SACNC,YAAa,mCAEf,CACET,KAAM,uBACNhC,MAAO,uBACPuC,QAAS,uCACTC,KAAM,SACNC,YAAa,8BAEf,CACET,KAAM,iBACNhC,MAAO,iBACPuC,QAAS,sDACTC,KAAM,SACNC,YAAa,wBAEf,CACET,KAAM,cACNhC,MAAO,cACPuC,QAAS,iCACTC,KAAM,SACNC,YAAa,qBAEf,CACET,KAAM,aACNhC,MAAO,aACPuC,QAAS,8CACTC,KAAM,SACNC,YAAa,uBAEZJ,GAEL,CAACd,GAAsB,CACrB,CACES,KAAM,MACNM,UAAU,EACVtC,MAAO,MACPuC,QACE,oEACFC,KAAM,MACNC,YAAa,aAEf,CACET,KAAM,QACNM,UAAU,EACVtC,MAAO,QACPuC,QACE,oEACFC,KAAM,SACNC,YAAa,eAEf,CACET,KAAM,SACNM,UAAU,EACVtC,MAAO,SACPuC,QACE,gIACFC,KAAM,OACNC,YAAa,mBAEZJ,GAEL,CAACb,GAAiB,CAChB,CACEQ,KAAM,WACNM,UAAU,EACVtC,MAAO,WACPuC,QACE,kEACFC,KAAM,MACNC,YAAa,kBAEf,CACET,KAAM,aACNhC,MAAO,aACPuC,QAAS,2CACTC,KAAM,SACNC,YAAa,uBAEZJ,GAEL,CAACZ,GAAY,CACX,CACEO,KAAM,eACNM,UAAU,EACVtC,MAAO,eACPuC,QAAS,2CACTC,KAAM,UACNC,YAAa,sBAEf,CACET,KAAM,QACNM,UAAU,EACVtC,MAAO,QACPuC,QAAS,YACTC,KAAM,SACNC,YAAa,eAEf,CACET,KAAM,MACNhC,MAAO,MACPuC,QAAS,4BACTC,KAAM,UAER,CACER,KAAM,kBACNhC,MAAO,kBACPuC,QACE,mEACFC,KAAM,aAELH,IAIDU,EAA6C,CACjDC,QAAS,iBACTC,KAAM,cACNC,MAAO,eACPC,KAAM,cACNC,KAAM,cACNC,IAAK,aACLC,MAAO,eACPC,WAAY,kBACZC,cAAe,uBACfC,MAAO,gBAGIC,EAA4BC,GAChCZ,EAAmBY,E","sources":["screens/Console/Account/NotificationEndpointTypeSelectorHelpBox.tsx","screens/Console/EventDestinations/DestinationButton.tsx","screens/Console/EventDestinations/EventTypeSelector.tsx","screens/Console/EventDestinations/utils.ts"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React from \"react\";\n\nimport { HelpBox, LambdaNotificationsIcon, Box } from \"mds\";\n\nconst NotificationEndpointTypeSelectorHelpBox = () => {\n return (\n }\n title={\"What are Event Destinations?\"}\n help={\n \n MinIO bucket notifications allow administrators to send notifications\n to supported external services on certain object or bucket events.\n MinIO supports bucket and object-level S3 events similar to the Amazon\n S3 Event Notifications.\n \n }\n />\n );\n};\n\nexport default NotificationEndpointTypeSelectorHelpBox;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport get from \"lodash/get\";\nimport { useNavigate } from \"react-router-dom\";\nimport styled from \"styled-components\";\nimport { IAM_PAGES } from \"../../../common/SecureComponent/permissions\";\n\ninterface IDestinationButton {\n destinationType: string;\n srcImage: string;\n title: string;\n}\n\nconst DestinationButtonBase = styled.button(({ theme }) => ({\n background: get(theme, \"boxBackground\", \"#FFF\"),\n border: `${get(theme, \"borderColor\", \"#E2E2E2\")} 1px solid`,\n borderRadius: 5,\n width: 250,\n height: 80,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"start\",\n marginBottom: 16,\n marginRight: 8,\n cursor: \"pointer\",\n overflow: \"hidden\",\n \"&:hover\": {\n backgroundColor: get(theme, \"buttons.regular.hover.background\", \"#ebebeb\"),\n },\n \"& .imageContainer\": {\n width: 80,\n \"& .logoButton\": {\n maxWidth: 46,\n maxHeight: 46,\n filter: \"drop-shadow(1px 1px 8px #fff)\",\n },\n },\n \"& .lambdaNotifTitle\": {\n color: get(theme, \"buttons.callAction.enabled.background\", \"#07193E\"),\n fontSize: 16,\n fontFamily: \"Inter,sans-serif\",\n paddingLeft: 18,\n fontWeight: \"bold\",\n },\n}));\n\nconst DestinationButton = ({\n destinationType,\n srcImage,\n title,\n}: IDestinationButton) => {\n const navigate = useNavigate();\n\n return (\n {\n navigate(`${IAM_PAGES.EVENT_DESTINATIONS_ADD}/${destinationType}`);\n }}\n >\n \n \n \n {title}\n \n );\n};\n\nexport default DestinationButton;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { BackLink, Box, FormLayout, PageLayout } from \"mds\";\nimport { destinationList, DestType } from \"./utils\";\nimport { typesSelection } from \"../Common/FormComponents/common/styleLibrary\";\nimport { IAM_PAGES } from \"../../../common/SecureComponent/permissions\";\nimport NotificationEndpointTypeSelectorHelpBox from \"../Account/NotificationEndpointTypeSelectorHelpBox\";\nimport PageHeaderWrapper from \"../Common/PageHeaderWrapper/PageHeaderWrapper\";\nimport DestinationButton from \"./DestinationButton\";\n\nimport HelpMenu from \"../HelpMenu\";\nimport { useAppDispatch } from \"../../../store\";\nimport { setHelpName } from \"../../../systemSlice\";\n\nconst withLogos = destinationList.filter((elService) => elService.logo !== \"\");\nconst database = withLogos.filter(\n (elService) => elService.category === DestType.DB,\n);\nconst queue = withLogos.filter(\n (elService) => elService.category === DestType.Queue,\n);\nconst functions = withLogos.filter(\n (elService) => elService.category === DestType.Func,\n);\n\nconst EventTypeSelector = () => {\n const navigate = useNavigate();\n const dispatch = useAppDispatch();\n useEffect(() => {\n dispatch(setHelpName(\"notification_type_selector\"));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return (\n \n \n navigate(IAM_PAGES.EVENT_DESTINATIONS)}\n />\n \n }\n actions={}\n />\n \n }>\n \n \n Queue\n \n \n {queue.map((item) => {\n return (\n \n );\n })}\n \n \n Database\n \n \n {database.map((item) => {\n return (\n \n );\n })}\n \n \n Functions\n \n \n {functions.map((item) => {\n return (\n \n );\n })}\n \n \n \n \n \n );\n};\n\nexport default EventTypeSelector;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport { NotificationEndpointItem } from \"api/consoleApi\";\nimport { IElementValue } from \"../Configurations/types\";\nimport { TransformedEndpointItem } from \"./types\";\n\nexport const notifyPostgres = \"notify_postgres\";\nexport const notifyMysql = \"notify_mysql\";\nconst notifyKafka = \"notify_kafka\";\nconst notifyAmqp = \"notify_amqp\";\nconst notifyMqtt = \"notify_mqtt\";\nconst notifyRedis = \"notify_redis\";\nconst notifyNats = \"notify_nats\";\nconst notifyElasticsearch = \"notify_elasticsearch\";\nconst notifyWebhooks = \"notify_webhook\";\nconst notifyNsq = \"notify_nsq\";\nexport const notificationTransform = (\n notificationElements: NotificationEndpointItem[],\n) => {\n return notificationElements.map((element) => {\n return {\n service_name: `${element.service}:${element.account_id}`,\n name: element.service,\n account_id: element.account_id,\n status: element.status,\n };\n }) as TransformedEndpointItem[];\n};\n\nexport class DestType {\n static DB: string = \"database\";\n static Queue: string = \"queue\";\n static Func: string = \"functions\";\n}\n\nconst getImgBaseURL = () => {\n return `${document.baseURI}`;\n};\n\nexport const destinationList = [\n {\n actionTrigger: notifyPostgres,\n targetTitle: \"PostgreSQL\",\n logo: `${getImgBaseURL()}postgres-logo.svg`,\n category: DestType.DB,\n },\n {\n actionTrigger: notifyKafka,\n targetTitle: \"Kafka\",\n logo: `${getImgBaseURL()}kafka-logo.svg`,\n category: DestType.Queue,\n },\n {\n actionTrigger: notifyAmqp,\n targetTitle: \"AMQP\",\n logo: `${getImgBaseURL()}amqp-logo.svg`,\n category: DestType.Queue,\n },\n {\n actionTrigger: notifyMqtt,\n targetTitle: \"MQTT\",\n logo: `${getImgBaseURL()}mqtt-logo.svg`,\n category: DestType.Queue,\n },\n {\n actionTrigger: notifyRedis,\n targetTitle: \"Redis\",\n logo: `${getImgBaseURL()}redis-logo.svg`,\n category: DestType.Queue,\n },\n {\n actionTrigger: notifyNats,\n targetTitle: \"NATS\",\n logo: `${getImgBaseURL()}nats-logo.svg`,\n category: DestType.Queue,\n },\n {\n actionTrigger: notifyMysql,\n targetTitle: \"Mysql\",\n logo: `${getImgBaseURL()}mysql-logo.svg`,\n category: DestType.DB,\n },\n {\n actionTrigger: notifyElasticsearch,\n targetTitle: \"Elastic Search\",\n logo: `${getImgBaseURL()}elasticsearch-logo.svg`,\n category: DestType.DB,\n },\n {\n actionTrigger: notifyWebhooks,\n targetTitle: \"Webhook\",\n logo: `${getImgBaseURL()}webhooks-logo.svg`,\n category: DestType.Func,\n },\n {\n actionTrigger: notifyNsq,\n targetTitle: \"NSQ\",\n logo: `${getImgBaseURL()}nsq-logo.svg`,\n category: DestType.Queue,\n },\n];\n\nconst commonFields = [\n {\n name: \"queue_dir\",\n label: \"Queue Directory\",\n required: false,\n\n tooltip: \"Staging directory for undelivered messages e.g. '/home/events'\",\n type: \"string\",\n placeholder: \"Enter Queue Directory\",\n },\n {\n name: \"queue_limit\",\n label: \"Queue Limit\",\n required: false,\n\n tooltip: \"Maximum limit for undelivered messages, defaults to '10000'\",\n type: \"number\",\n placeholder: \"Enter Queue Limit\",\n },\n {\n name: \"comment\",\n label: \"Comment\",\n required: false,\n type: \"comment\",\n placeholder: \"Enter custom notes if any\",\n },\n];\n\nexport const removeEmptyFields = (formFields: IElementValue[]) => {\n const nonEmptyFields = formFields.filter((field) => field.value !== \"\");\n\n return nonEmptyFields;\n};\n\nexport const notificationEndpointsFields: any = {\n [notifyKafka]: [\n {\n name: \"brokers\",\n label: \"Brokers\",\n required: true,\n\n tooltip: \"Comma separated list of Kafka broker addresses\",\n type: \"string\",\n placeholder: \"Enter Brokers\",\n },\n {\n name: \"topic\",\n label: \"Topic\",\n tooltip: \"Kafka topic used for bucket notifications\",\n type: \"string\",\n placeholder: \"Enter Topic\",\n },\n {\n name: \"sasl_username\",\n label: \"SASL Username\",\n tooltip: \"Username for SASL/PLAIN or SASL/SCRAM authentication\",\n type: \"string\",\n placeholder: \"Enter SASL Username\",\n },\n {\n name: \"sasl_password\",\n label: \"SASL Password\",\n tooltip: \"Password for SASL/PLAIN or SASL/SCRAM authentication\",\n type: \"string\",\n placeholder: \"Enter SASL Password\",\n },\n {\n name: \"sasl_mechanism\",\n label: \"SASL Mechanism\",\n tooltip: \"SASL authentication mechanism, default 'PLAIN'\",\n type: \"string\",\n },\n {\n name: \"tls_client_auth\",\n label: \"TLS Client Auth\",\n tooltip:\n \"Client Auth determines the Kafka server's policy for TLS client authorization\",\n type: \"string\",\n placeholder: \"Enter TLS Client Auth\",\n },\n {\n name: \"sasl\",\n label: \"SASL\",\n tooltip: \"Set to 'on' to enable SASL authentication\",\n type: \"on|off\",\n },\n {\n name: \"tls\",\n label: \"TLS\",\n tooltip: \"Set to 'on' to enable TLS\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n label: \"TLS skip verify\",\n tooltip:\n 'Trust server TLS without verification, defaults to \"on\" (verify)',\n type: \"on|off\",\n },\n {\n name: \"client_tls_cert\",\n label: \"client TLS cert\",\n tooltip: \"Path to client certificate for mTLS authorization\",\n type: \"path\",\n placeholder: \"Enter TLS Client Cert\",\n },\n {\n name: \"client_tls_key\",\n label: \"client TLS key\",\n tooltip: \"Path to client key for mTLS authorization\",\n type: \"path\",\n placeholder: \"Enter TLS Client Key\",\n },\n {\n name: \"version\",\n label: \"Version\",\n tooltip: \"Specify the version of the Kafka cluster e.g '2.2.0'\",\n type: \"string\",\n placeholder: \"Enter Kafka Version\",\n },\n ...commonFields,\n ],\n [notifyAmqp]: [\n {\n name: \"url\",\n required: true,\n label: \"URL\",\n tooltip:\n \"AMQP server endpoint e.g. `amqp://myuser:mypassword@localhost:5672`\",\n type: \"url\",\n },\n {\n name: \"exchange\",\n label: \"Exchange\",\n tooltip: \"Name of the AMQP exchange\",\n type: \"string\",\n placeholder: \"Enter Exchange\",\n },\n {\n name: \"exchange_type\",\n label: \"Exchange Type\",\n tooltip: \"AMQP exchange type\",\n type: \"string\",\n placeholder: \"Enter Exchange Type\",\n },\n {\n name: \"routing_key\",\n label: \"Routing Key\",\n tooltip: \"Routing key for publishing\",\n type: \"string\",\n placeholder: \"Enter Routing Key\",\n },\n {\n name: \"mandatory\",\n label: \"Mandatory\",\n tooltip:\n \"Quietly ignore undelivered messages when set to 'off', default is 'on'\",\n type: \"on|off\",\n },\n {\n name: \"durable\",\n label: \"Durable\",\n tooltip:\n \"Persist queue across broker restarts when set to 'on', default is 'off'\",\n type: \"on|off\",\n },\n {\n name: \"no_wait\",\n label: \"No Wait\",\n tooltip:\n \"Non-blocking message delivery when set to 'on', default is 'off'\",\n type: \"on|off\",\n },\n {\n name: \"internal\",\n label: \"Internal\",\n tooltip:\n \"Set to 'on' for exchange to be not used directly by publishers, but only when bound to other exchanges\",\n type: \"on|off\",\n },\n {\n name: \"auto_deleted\",\n label: \"Auto Deleted\",\n tooltip:\n \"Auto delete queue when set to 'on', when there are no consumers\",\n type: \"on|off\",\n },\n {\n name: \"delivery_mode\",\n label: \"Delivery Mode\",\n tooltip: \"Set to '1' for non-persistent or '2' for persistent queue\",\n type: \"number\",\n placeholder: \"Enter Delivery Mode\",\n },\n ...commonFields,\n ],\n [notifyRedis]: [\n {\n name: \"address\",\n required: true,\n label: \"Address\",\n tooltip: \"Redis server's address e.g. `localhost:6379`\",\n type: \"address\",\n placeholder: \"Enter Address\",\n },\n {\n name: \"key\",\n required: true,\n label: \"Key\",\n tooltip: \"Redis key to store/update events, key is auto-created\",\n type: \"string\",\n placeholder: \"Enter Key\",\n },\n {\n name: \"password\",\n label: \"Password\",\n tooltip: \"Redis server password\",\n type: \"string\",\n placeholder: \"Enter Password\",\n },\n ...commonFields,\n ],\n [notifyMqtt]: [\n {\n name: \"broker\",\n required: true,\n label: \"Broker\",\n tooltip: \"MQTT server endpoint e.g. `tcp://localhost:1883`\",\n type: \"uri\",\n placeholder: \"Enter Brokers\",\n },\n {\n name: \"topic\",\n required: true,\n label: \"Topic\",\n tooltip: \"Name of the MQTT topic to publish\",\n type: \"string\",\n placeholder: \"Enter Topic\",\n },\n {\n name: \"username\",\n label: \"Username\",\n tooltip: \"MQTT username\",\n type: \"string\",\n placeholder: \"Enter Username\",\n },\n {\n name: \"password\",\n label: \"Password\",\n tooltip: \"MQTT password\",\n type: \"string\",\n placeholder: \"Enter Password\",\n },\n {\n name: \"qos\",\n label: \"QOS\",\n tooltip: \"Set the quality of service priority, defaults to '0'\",\n type: \"number\",\n placeholder: \"Enter QOS\",\n },\n {\n name: \"keep_alive_interval\",\n label: \"Keep Alive Interval\",\n tooltip: \"Keep-alive interval for MQTT connections in s,m,h,d\",\n type: \"duration\",\n placeholder: \"Enter Keep Alive Interval\",\n },\n {\n name: \"reconnect_interval\",\n label: \"Reconnect Interval\",\n tooltip: \"Reconnect interval for MQTT connections in s,m,h,d\",\n type: \"duration\",\n placeholder: \"Enter Reconnect Interval\",\n },\n ...commonFields,\n ],\n [notifyNats]: [\n {\n name: \"address\",\n required: true,\n label: \"Address\",\n tooltip: \"NATS server address e.g. '0.0.0.0:4222'\",\n type: \"address\",\n placeholder: \"Enter Address\",\n },\n {\n name: \"subject\",\n required: true,\n label: \"Subject\",\n tooltip: \"NATS subscription subject\",\n type: \"string\",\n placeholder: \"Enter NATS Subject\",\n },\n {\n name: \"username\",\n label: \"Username\",\n tooltip: \"NATS username\",\n type: \"string\",\n placeholder: \"Enter NATS Username\",\n },\n {\n name: \"password\",\n label: \"Password\",\n tooltip: \"NATS password\",\n type: \"string\",\n placeholder: \"Enter NATS password\",\n },\n {\n name: \"token\",\n label: \"Token\",\n tooltip: \"NATS token\",\n type: \"string\",\n placeholder: \"Enter NATS token\",\n },\n {\n name: \"tls\",\n label: \"TLS\",\n tooltip: \"Set to 'on' to enable TLS\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n label: \"TLS Skip Verify\",\n tooltip:\n 'Trust server TLS without verification, defaults to \"on\" (verify)',\n type: \"on|off\",\n },\n {\n name: \"ping_interval\",\n label: \"Ping Interval\",\n tooltip: \"Client ping commands interval in s,m,h,d. Disabled by default\",\n type: \"duration\",\n placeholder: \"Enter Ping Interval\",\n },\n {\n name: \"streaming\",\n label: \"Streaming\",\n tooltip: \"Set to 'on' to use streaming NATS server\",\n type: \"on|off\",\n },\n {\n name: \"streaming_async\",\n label: \"Streaming async\",\n tooltip: \"Set to 'on' to enable asynchronous publish\",\n type: \"on|off\",\n },\n {\n name: \"streaming_max_pub_acks_in_flight\",\n label: \"Streaming max publish ACKS in flight\",\n tooltip: \"Number of messages to publish without waiting for ACKs\",\n type: \"number\",\n placeholder: \"Enter Streaming in flight value\",\n },\n {\n name: \"streaming_cluster_id\",\n label: \"Streaming Cluster ID\",\n tooltip: \"Unique ID for NATS streaming cluster\",\n type: \"string\",\n placeholder: \"Enter Streaming Cluster ID\",\n },\n {\n name: \"cert_authority\",\n label: \"Cert Authority\",\n tooltip: \"Path to certificate chain of the target NATS server\",\n type: \"string\",\n placeholder: \"Enter Cert Authority\",\n },\n {\n name: \"client_cert\",\n label: \"Client Cert\",\n tooltip: \"Client cert for NATS mTLS auth\",\n type: \"string\",\n placeholder: \"Enter Client Cert\",\n },\n {\n name: \"client_key\",\n label: \"Client Key\",\n tooltip: \"Client cert key for NATS mTLS authorization\",\n type: \"string\",\n placeholder: \"Enter Client Key\",\n },\n ...commonFields,\n ],\n [notifyElasticsearch]: [\n {\n name: \"url\",\n required: true,\n label: \"URL\",\n tooltip:\n \"Elasticsearch server's address, with optional authentication info\",\n type: \"url\",\n placeholder: \"Enter URL\",\n },\n {\n name: \"index\",\n required: true,\n label: \"Index\",\n tooltip:\n \"Elasticsearch index to store/update events, index is auto-created\",\n type: \"string\",\n placeholder: \"Enter Index\",\n },\n {\n name: \"format\",\n required: true,\n label: \"Format\",\n tooltip:\n \"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'\",\n type: \"enum\",\n placeholder: \"Enter Format\",\n },\n ...commonFields,\n ],\n [notifyWebhooks]: [\n {\n name: \"endpoint\",\n required: true,\n label: \"Endpoint\",\n tooltip:\n \"Webhook server endpoint e.g. http://localhost:8080/minio/events\",\n type: \"url\",\n placeholder: \"Enter Endpoint\",\n },\n {\n name: \"auth_token\",\n label: \"Auth Token\",\n tooltip: \"Opaque string or JWT authorization token\",\n type: \"string\",\n placeholder: \"Enter auth_token\",\n },\n ...commonFields,\n ],\n [notifyNsq]: [\n {\n name: \"nsqd_address\",\n required: true,\n label: \"NSQD Address\",\n tooltip: \"NSQ server address e.g. '127.0.0.1:4150'\",\n type: \"address\",\n placeholder: \"Enter nsqd_address\",\n },\n {\n name: \"topic\",\n required: true,\n label: \"Topic\",\n tooltip: \"NSQ topic\",\n type: \"string\",\n placeholder: \"Enter Topic\",\n },\n {\n name: \"tls\",\n label: \"TLS\",\n tooltip: \"Set to 'on' to enable TLS\",\n type: \"on|off\",\n },\n {\n name: \"tls_skip_verify\",\n label: \"TLS Skip Verify\",\n tooltip:\n 'Trust server TLS without verification, defaults to \"on\" (verify)',\n type: \"on|off\",\n },\n ...commonFields,\n ],\n};\n\nconst serviceToConfigMap: Record = {\n webhook: \"notify_webhook\",\n amqp: \"notify_amqp\",\n kafka: \"notify_kafka\",\n mqtt: \"notify_mqtt\",\n nats: \"notify_nats\",\n nsq: \"notify_nsq\",\n mysql: \"notify_mysql\",\n postgresql: \"notify_postgres\", //looks different in server response(postgresql as opposed to postgres) from api/admin_notification_endpoints.go\n elasticsearch: \"notify_elasticsearch\",\n redis: \"notify_redis\",\n};\n\nexport const getNotificationConfigKey = (serviceName: string) => {\n return serviceToConfigMap[serviceName];\n};\n"],"names":["NotificationEndpointTypeSelectorHelpBox","_jsx","HelpBox","iconComponent","LambdaNotificationsIcon","title","help","Box","sx","paddingTop","children","DestinationButtonBase","styled","button","_ref","theme","background","get","border","concat","borderRadius","width","height","display","alignItems","justifyContent","marginBottom","marginRight","cursor","overflow","backgroundColor","maxWidth","maxHeight","filter","color","fontSize","fontFamily","paddingLeft","fontWeight","_ref2","destinationType","srcImage","navigate","useNavigate","_jsxs","onClick","IAM_PAGES","EVENT_DESTINATIONS_ADD","className","src","alt","withLogos","destinationList","elService","logo","database","category","DestType","DB","queue","Queue","functions","Func","EventTypeSelector","dispatch","useAppDispatch","useEffect","setHelpName","Fragment","PageHeaderWrapper","label","BackLink","EVENT_DESTINATIONS","actions","HelpMenu","PageLayout","FormLayout","helpBox","paddingBottom","typesSelection","iconContainer","map","item","DestinationButton","actionTrigger","targetTitle","notifyPostgres","notifyMysql","notifyKafka","notifyAmqp","notifyMqtt","notifyRedis","notifyNats","notifyElasticsearch","notifyWebhooks","notifyNsq","notificationTransform","notificationElements","element","service_name","service","account_id","name","status","getImgBaseURL","document","baseURI","commonFields","required","tooltip","type","placeholder","removeEmptyFields","formFields","field","value","notificationEndpointsFields","serviceToConfigMap","webhook","amqp","kafka","mqtt","nats","nsq","mysql","postgresql","elasticsearch","redis","getNotificationConfigKey","serviceName"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/4103.f42a2340.chunk.js.map b/web-app/build/static/js/4103.f42a2340.chunk.js.map
index 15c71ab5cd..d38fececce 100644
--- a/web-app/build/static/js/4103.f42a2340.chunk.js.map
+++ b/web-app/build/static/js/4103.f42a2340.chunk.js.map
@@ -1 +1 @@
-{"version":3,"file":"static/js/4103.f42a2340.chunk.js","mappings":"uQAqBA,MAAMA,EAAkBC,EAAAA,GAAOC,KAAIC,IAAA,IAAC,MAAEC,GAAOD,EAAA,MAAM,CACjDE,UAAW,GACXC,MAAO,CACLC,MAAO,OACPC,eAAgB,WAChB,kBAAmB,CACjBC,WAAY,IACZC,SAAU,GACVC,YAAa,IAEf,iBAAkB,CAChBC,UAAW,UAEb,iBAAkB,CAChBA,UAAW,UAEb,OAAQ,CACNC,OAAQ,GACR,OAAQ,CACNC,aAAa,aAADC,OAAeC,IAAIZ,EAAO,cAAe,aAEvD,OAAQ,CACNU,aAAa,aAADC,OAAeC,IAAIZ,EAAO,cAAe,cAGzD,eAAgB,CACda,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChB,cAAe,CACbN,OAAQ,GACRN,MAAO,IAET,WAAY,CACV,cAAe,CACba,KAAMJ,IAAIZ,EAAO,oBAAqB,aAG1C,gBAAiB,CACf,cAAe,CACbgB,KAAMJ,IAAIZ,EAAO,sBAAuB,eAKjD,IA2ED,EAzE0BiB,IAQnB,IARoB,WACzBC,EAAa,GAAE,WACfC,EAAa,GAAE,WACfC,EAAa,IAKdH,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AAA,EAAAA,MAACF,EAAAA,IAAG,CAACR,UAAW,gBAAgBC,SAAA,EAC9BF,EAAAA,EAAAA,KAACU,EAAAA,IAAU,KACXV,EAAAA,EAAAA,KAAA,OAAKC,UAAU,YAAWC,SAAEsI,WAIhC7H,EAAAA,EAAAA,MAACF,EAAAA,IAAG,CAAAP,SAAA,EACFF,EAAAA,EAAAA,KAACS,EAAAA,IAAG,CAACR,UAAU,aAAYC,SAAEqI,KAC7B5H,EAAAA,EAAAA,MAACF,EAAAA,IAAG,CAACR,UAAW,eAAeC,SAAA,EAC7BF,EAAAA,EAAAA,KAACU,EAAAA,IAAU,IAAI,KACfV,EAAAA,EAAAA,KAAA,OAAKC,UAAU,YAAWC,SAAEuI,iBAKpCzI,EAAAA,EAAAA,KAACS,EAAAA,IAAG,CAACR,UAAW,gBAAgBC,SAAE+G,QAEpB,C","sources":["screens/Console/Configurations/SiteReplication/LookupStatus/LookupStatusTable.tsx","screens/Console/Configurations/SiteReplication/LookupStatus/Utils.tsx","screens/Console/Configurations/SiteReplication/LookupStatus/BucketEntityStatus.tsx","screens/Console/Configurations/SiteReplication/LookupStatus/PolicyEntityStatus.tsx","screens/Console/Configurations/SiteReplication/LookupStatus/GroupEntityStatus.tsx","screens/Console/Configurations/SiteReplication/LookupStatus/UserEntityStatus.tsx","screens/Console/Configurations/SiteReplication/EntityReplicationLookup.tsx","screens/Console/Configurations/SiteReplication/SiteReplicationStatus.tsx","screens/Console/Dashboard/BasicDashboard/StatusCountCard.tsx"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport styled from \"styled-components\";\nimport get from \"lodash/get\";\nimport { Box, CircleIcon } from \"mds\";\n\nconst LookupTableBase = styled.div(({ theme }) => ({\n marginTop: 15,\n table: {\n width: \"100%\",\n borderCollapse: \"collapse\",\n \"& .feature-cell\": {\n fontWeight: 600,\n fontSize: 14,\n paddingLeft: 15,\n },\n \"& .status-cell\": {\n textAlign: \"center\",\n },\n \"& .header-cell\": {\n textAlign: \"center\",\n },\n \"& tr\": {\n height: 38,\n \"& td\": {\n borderBottom: `1px solid ${get(theme, \"borderColor\", \"#E2E2E2\")}`,\n },\n \"& th\": {\n borderBottom: `2px solid ${get(theme, \"borderColor\", \"#E2E2E2\")}`,\n },\n },\n \"& .indicator\": {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n \"& .min-icon\": {\n height: 15,\n width: 15,\n },\n \"&.active\": {\n \"& .min-icon\": {\n fill: get(theme, \"signalColors.good\", \"#4CCB92\"),\n },\n },\n \"&.deactivated\": {\n \"& .min-icon\": {\n fill: get(theme, \"signalColors.danger\", \"#C51B3F\"),\n },\n },\n },\n },\n}));\n\nconst LookupStatusTable = ({\n matrixData = [],\n entityName = \"\",\n entityType = \"\",\n}: {\n matrixData: any;\n entityName: string;\n entityType: string;\n}) => {\n //Assumes 1st row should be a header row.\n const [header = [], ...rows] = matrixData;\n\n const tableHeader = header.map((hC: string, hcIdx: number) => {\n return (\n
\n {r.map((v: any, cIdx: number) => {\n let indicator = null;\n\n if (cIdx === 0) {\n indicator = v;\n } else if (v === \"\") {\n indicator = \"\";\n }\n if (v === true) {\n indicator = (\n \n \n \n );\n } else if (v === false) {\n indicator = (\n \n \n \n );\n }\n\n return (\n
\n {indicator}\n
\n );\n })}\n
\n );\n });\n\n return (\n \n \n Replication status for {entityType}: {entityName}.\n \n
\n \n
{tableHeader}
\n \n {tableRowsToRender}\n
\n \n );\n};\n\nexport default LookupStatusTable;\n","import React from \"react\";\nimport { StatsResponseType } from \"../SiteReplicationStatus\";\nimport { Box } from \"mds\";\n\nexport function syncStatus(mismatch: boolean, set: boolean): string | boolean {\n if (!set) {\n return \"\";\n }\n return !mismatch;\n}\n\nexport function isEntityNotFound(\n sites: Partial,\n lookupList: Partial,\n lookupKey: string,\n) {\n const siteKeys: string[] = Object.keys(sites);\n return siteKeys.find((sk: string) => {\n // there is no way to find the type of this ! as it is an entry in the structure itself.\n // @ts-ignore\n const result: Record = lookupList[sk] || {};\n return !result[lookupKey];\n });\n}\n\nexport const EntityNotFound = ({\n entityType,\n entityValue,\n}: {\n entityType: string;\n entityValue: string;\n}) => {\n return (\n \n {entityType}:{\" \"}\n \n {entityValue}\n {\" \"}\n not found.\n \n );\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { StatsResponseType } from \"../SiteReplicationStatus\";\nimport LookupStatusTable from \"./LookupStatusTable\";\nimport { EntityNotFound, isEntityNotFound, syncStatus } from \"./Utils\";\n\ntype BucketEntityStatusProps = Partial & {\n lookupValue?: string;\n};\nconst BucketEntityStatus = ({\n bucketStats = {},\n sites = {},\n lookupValue = \"\",\n}: BucketEntityStatusProps) => {\n const rowsForStatus = [\n \"Tags\",\n \"Policy\",\n \"Quota\",\n \"Retention\",\n \"Encryption\",\n \"Replication\",\n ];\n\n const bucketSites: Record = bucketStats[lookupValue] || {};\n\n if (!lookupValue) return null;\n\n const siteKeys = Object.keys(sites);\n\n const notFound = isEntityNotFound(sites, bucketSites, \"HasBucket\");\n const resultMatrix: any = [];\n if (notFound) {\n return ;\n } else {\n const row = [];\n for (let sCol = 0; sCol < siteKeys.length; sCol++) {\n if (sCol === 0) {\n row.push(\"\");\n }\n /**\n * ----------------------------------\n * | | sit-0 | site-1 |\n * -----------------------------------\n */\n row.push(sites[siteKeys[sCol]].name);\n }\n resultMatrix.push(row);\n for (let fi = 0; fi < rowsForStatus.length; fi++) {\n /**\n * -------------------------------------------------\n * | Feature Name | site-0-status | site-1-status |\n * --------------------------------------------------\n */\n const sfRow = [];\n const feature = rowsForStatus[fi];\n let sbStatus: string | boolean = \"\";\n\n for (let si = 0; si < siteKeys.length; si++) {\n const bucketSiteDeploymentId = sites[siteKeys[si]].deploymentID;\n\n const rSite = bucketSites[bucketSiteDeploymentId];\n\n if (si === 0) {\n sfRow.push(feature);\n }\n\n switch (fi) {\n case 0:\n sbStatus = syncStatus(rSite.TagMismatch, rSite.HasTagsSet);\n sfRow.push(sbStatus);\n break;\n case 1:\n sbStatus = syncStatus(rSite.PolicyMismatch, rSite.HasPolicySet);\n sfRow.push(sbStatus);\n break;\n case 2:\n sbStatus = syncStatus(rSite.QuotaCfgMismatch, rSite.HasQuotaCfgSet);\n sfRow.push(sbStatus);\n break;\n case 3:\n sbStatus = syncStatus(\n rSite.OLockConfigMismatch,\n rSite.HasOLockConfigSet,\n );\n sfRow.push(sbStatus);\n break;\n case 4:\n sbStatus = syncStatus(rSite.SSEConfigMismatch, rSite.HasSSECfgSet);\n sfRow.push(sbStatus);\n break;\n case 5:\n sbStatus = syncStatus(\n rSite.ReplicationCfgMismatch,\n rSite.HasReplicationCfg,\n );\n sfRow.push(sbStatus);\n break;\n }\n }\n\n resultMatrix.push(sfRow);\n }\n }\n\n return (\n \n );\n};\n\nexport default BucketEntityStatus;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { StatsResponseType } from \"../SiteReplicationStatus\";\nimport LookupStatusTable from \"./LookupStatusTable\";\nimport { EntityNotFound, isEntityNotFound, syncStatus } from \"./Utils\";\n\ntype PolicyEntityStatusProps = Partial & {\n lookupValue?: string;\n};\nconst PolicyEntityStatus = ({\n policyStats = {},\n sites = {},\n lookupValue = \"\",\n}: PolicyEntityStatusProps) => {\n const rowsForStatus = [\"Policy\"];\n\n const policySites: Record = policyStats[lookupValue] || {};\n\n if (!lookupValue) return null;\n\n const siteKeys = Object.keys(sites);\n const notFound = isEntityNotFound(sites, policySites, \"HasPolicy\");\n const resultMatrix: any = [];\n if (notFound) {\n return ;\n } else {\n const row = [];\n for (let sCol = 0; sCol < siteKeys.length; sCol++) {\n if (sCol === 0) {\n row.push(\"\");\n }\n row.push(sites[siteKeys[sCol]].name);\n }\n resultMatrix.push(row);\n for (let fi = 0; fi < rowsForStatus.length; fi++) {\n const sfRow = [];\n const feature = rowsForStatus[fi];\n let sbStatus: string | boolean = \"\";\n\n for (let si = 0; si < siteKeys.length; si++) {\n const bucketSiteDeploymentId = sites[siteKeys[si]].deploymentID;\n\n const rSite = policySites[bucketSiteDeploymentId];\n\n if (si === 0) {\n sfRow.push(feature);\n }\n\n switch (fi) {\n case 0:\n sbStatus = syncStatus(rSite.PolicyMismatch, rSite.HasPolicy);\n sfRow.push(sbStatus);\n break;\n }\n }\n\n resultMatrix.push(sfRow);\n }\n }\n\n return (\n \n );\n};\n\nexport default PolicyEntityStatus;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { StatsResponseType } from \"../SiteReplicationStatus\";\nimport LookupStatusTable from \"./LookupStatusTable\";\nimport { EntityNotFound, isEntityNotFound, syncStatus } from \"./Utils\";\n\ntype GroupEntityStatusProps = Partial & {\n lookupValue?: string;\n};\nconst UserEntityStatus = ({\n groupStats = {},\n sites = {},\n lookupValue = \"\",\n}: GroupEntityStatusProps) => {\n const rowsForStatus = [\"Info\", \"Policy mapping\"];\n\n const groupSites: Record = groupStats[lookupValue] || {};\n\n if (!lookupValue) return null;\n\n const siteKeys = Object.keys(sites);\n const notFound = isEntityNotFound(sites, groupSites, \"HasGroup\");\n const resultMatrix: any = [];\n if (notFound) {\n return ;\n } else {\n const row = [];\n for (let sCol = 0; sCol < siteKeys.length; sCol++) {\n if (sCol === 0) {\n row.push(\"\");\n }\n /**\n * ----------------------------------\n * | | sit-0 | site-1 |\n * -----------------------------------\n */\n row.push(sites[siteKeys[sCol]].name);\n }\n resultMatrix.push(row);\n for (let fi = 0; fi < rowsForStatus.length; fi++) {\n /**\n * -------------------------------------------------\n * | Feature Name | site-0-status | site-1-status |\n * --------------------------------------------------\n */\n const sfRow = [];\n const feature = rowsForStatus[fi];\n let sbStatus: string | boolean = \"\";\n\n for (let si = 0; si < siteKeys.length; si++) {\n const bucketSiteDeploymentId = sites[siteKeys[si]].deploymentID;\n\n const rSite = groupSites[bucketSiteDeploymentId];\n\n if (si === 0) {\n sfRow.push(feature);\n }\n\n switch (fi) {\n case 0:\n sbStatus = syncStatus(rSite.GroupDescMismatch, rSite.HasGroup);\n sfRow.push(sbStatus);\n break;\n case 1:\n sbStatus = syncStatus(rSite.PolicyMismatch, rSite.HasPolicyMapping);\n sfRow.push(sbStatus);\n break;\n }\n }\n\n resultMatrix.push(sfRow);\n }\n }\n\n return (\n \n );\n};\n\nexport default UserEntityStatus;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { StatsResponseType } from \"../SiteReplicationStatus\";\nimport LookupStatusTable from \"./LookupStatusTable\";\nimport { EntityNotFound, isEntityNotFound, syncStatus } from \"./Utils\";\n\ntype PolicyEntityStatusProps = Partial & {\n lookupValue?: string;\n};\nconst UserEntityStatus = ({\n userStats = {},\n sites = {},\n lookupValue = \"\",\n}: PolicyEntityStatusProps) => {\n const rowsForStatus = [\"Info\", \"Policy mapping\"];\n\n const userSites: Record = userStats[lookupValue] || {};\n\n if (!lookupValue) return null;\n\n const siteKeys = Object.keys(sites);\n\n const notFound = isEntityNotFound(sites, userSites, \"HasUser\");\n\n const resultMatrix: any = [];\n if (notFound) {\n return ;\n } else {\n const row = [];\n for (let sCol = 0; sCol < siteKeys.length; sCol++) {\n if (sCol === 0) {\n row.push(\"\");\n }\n row.push(sites[siteKeys[sCol]].name);\n }\n resultMatrix.push(row);\n for (let fi = 0; fi < rowsForStatus.length; fi++) {\n const sfRow = [];\n const feature = rowsForStatus[fi];\n let sbStatus: string | boolean = \"\";\n\n for (let si = 0; si < siteKeys.length; si++) {\n const bucketSiteDeploymentId = sites[siteKeys[si]].deploymentID;\n\n const rSite = userSites[bucketSiteDeploymentId];\n\n if (si === 0) {\n sfRow.push(feature);\n }\n\n switch (fi) {\n case 0:\n sbStatus = syncStatus(rSite.UserInfoMismatch, rSite.HasUser);\n sfRow.push(sbStatus);\n break;\n case 1:\n sbStatus = syncStatus(rSite.PolicyMismatch, rSite.HasPolicyMapping);\n sfRow.push(sbStatus);\n break;\n }\n }\n\n resultMatrix.push(sfRow);\n }\n }\n\n return (\n \n );\n};\n\nexport default UserEntityStatus;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport {\n Box,\n breakPoints,\n Button,\n ClustersIcon,\n Grid,\n Loader,\n Select,\n InputBox,\n} from \"mds\";\nimport useApi from \"../../Common/Hooks/useApi\";\nimport { StatsResponseType } from \"./SiteReplicationStatus\";\nimport BucketEntityStatus from \"./LookupStatus/BucketEntityStatus\";\nimport PolicyEntityStatus from \"./LookupStatus/PolicyEntityStatus\";\nimport GroupEntityStatus from \"./LookupStatus/GroupEntityStatus\";\nimport UserEntityStatus from \"./LookupStatus/UserEntityStatus\";\nimport TooltipWrapper from \"../../Common/TooltipWrapper/TooltipWrapper\";\n\nconst EntityReplicationLookup = () => {\n const [entityType, setEntityType] = useState(\"bucket\");\n const [entityValue, setEntityValue] = useState(\"\");\n\n const [stats, setStats] = useState({});\n const [statsLoaded, setStatsLoaded] = useState(false);\n\n const [isStatsLoading, invokeSiteStatsApi] = useApi(\n (res: any) => {\n setStats(res);\n setStatsLoaded(true);\n },\n (err: any) => {\n setStats({});\n setStatsLoaded(true);\n },\n );\n\n const {\n bucketStats = {},\n sites = {},\n userStats = {},\n policyStats = {},\n groupStats = {},\n } = stats || {};\n\n const getStats = (entityType: string = \"\", entityValue: string = \"\") => {\n setStatsLoaded(false);\n if (entityType && entityValue) {\n let url = `api/v1/admin/site-replication/status?buckets=false&entityType=${entityType}&entityValue=${entityValue}&groups=false&policies=false&users=false`;\n invokeSiteStatsApi(\"GET\", url);\n }\n };\n\n return (\n \n \n \n View Replication Status for a:\n \n \n \n\n \n ) => {\n setEntityValue(e.target.value);\n setStatsLoaded(false);\n }}\n placeholder={`test-${entityType}`}\n label=\"\"\n value={entityValue}\n />\n \n \n \n {\n getStats(entityType, entityValue);\n }}\n label={`View`}\n icon={}\n collapseOnSmall={false}\n disabled={!entityValue || !entityType}\n />\n \n \n \n\n {isStatsLoading ? (\n \n \n \n ) : null}\n\n {statsLoaded ? (\n \n {!isStatsLoading && entityType === \"bucket\" && entityValue ? (\n \n ) : null}\n\n {!isStatsLoading && entityType === \"user\" && entityValue ? (\n \n ) : null}\n\n {!isStatsLoading && entityType === \"group\" && entityValue ? (\n \n ) : null}\n\n {!isStatsLoading && entityType === \"policy\" && entityValue ? (\n \n ) : null}\n \n ) : null}\n \n );\n};\n\nexport default EntityReplicationLookup;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport {\n BackLink,\n Box,\n breakPoints,\n BucketsIcon,\n Button,\n Grid,\n GroupsIcon,\n IAMPoliciesIcon,\n Loader,\n PageLayout,\n RefreshIcon,\n UsersIcon,\n SectionTitle,\n} from \"mds\";\nimport { useNavigate } from \"react-router-dom\";\nimport { IAM_PAGES } from \"../../../../common/SecureComponent/permissions\";\nimport { useAppDispatch } from \"../../../../store\";\nimport { setErrorSnackMessage, setHelpName } from \"../../../../systemSlice\";\nimport StatusCountCard from \"../../Dashboard/BasicDashboard/StatusCountCard\";\nimport EntityReplicationLookup from \"./EntityReplicationLookup\";\nimport TooltipWrapper from \"../../Common/TooltipWrapper/TooltipWrapper\";\nimport PageHeaderWrapper from \"../../Common/PageHeaderWrapper/PageHeaderWrapper\";\nimport HelpMenu from \"../../HelpMenu\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport {\n ApiError,\n HttpResponse,\n SiteReplicationStatusResponse,\n} from \"api/consoleApi\";\n\nexport type StatsResponseType = {\n maxBuckets?: number;\n bucketStats?: Record;\n maxGroups?: number;\n groupStats?: Record;\n maxUsers?: number;\n userStats?: Record;\n maxPolicies?: number;\n policyStats?: Record;\n sites?: Record;\n};\n\nconst SREntityStatus = ({\n maxValue = 0,\n entityStatObj = {},\n entityTextPlural = \"\",\n icon = null,\n}: {\n maxValue: number;\n entityStatObj: Record;\n entityTextPlural: string;\n icon?: React.ReactNode;\n}) => {\n const statEntityLen = Object.keys(entityStatObj || {})?.length;\n return (\n \n \n \n );\n};\n\nconst SiteReplicationStatus = () => {\n const navigate = useNavigate();\n\n const [stats, setStats] = useState({});\n const [loading, setLoading] = useState(false);\n\n const {\n maxBuckets = 0,\n bucketStats = {},\n maxGroups = 0,\n groupStats = {},\n maxUsers = 0,\n userStats = {},\n maxPolicies = 0,\n policyStats = {},\n } = stats || {};\n\n const getStats = () => {\n setLoading(true);\n api.admin\n .getSiteReplicationStatus({\n buckets: true,\n groups: true,\n policies: true,\n users: true,\n })\n .then((res: HttpResponse) => {\n setStats(res.data);\n })\n .catch((res: HttpResponse) => {\n setStats({});\n dispatch(setErrorSnackMessage(errorToHandler(res.error)));\n })\n .finally(() => setLoading(false));\n };\n\n useEffect(() => {\n getStats();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const dispatch = useAppDispatch();\n useEffect(() => {\n dispatch(setHelpName(\"replication_status\"));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n \n navigate(IAM_PAGES.SITE_REPLICATION)}\n />\n }\n actions={}\n />\n\n \n \n \n {\n getStats();\n }}\n label={\"Refresh\"}\n icon={}\n variant={\"regular\"}\n collapseOnSmall={false}\n />\n \n \n }\n separator\n >\n Replication status from all Sites\n \n\n {!loading ? (\n \n }\n />\n }\n />\n }\n />\n }\n />\n \n ) : (\n \n \n \n )}\n\n \n \n \n \n \n );\n};\n\nexport default SiteReplicationStatus;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport styled from \"styled-components\";\nimport get from \"lodash/get\";\nimport { Box, breakPoints, CircleIcon } from \"mds\";\n\nconst StatusCountBase = styled.div(({ theme }) => ({\n fontFamily: \"Inter,sans-serif\",\n maxWidth: \"321px\",\n display: \"flex\",\n marginLeft: \"auto\",\n marginRight: \"auto\",\n cursor: \"default\",\n color: get(theme, \"signalColors.main\", \"#07193E\"),\n \"& .mainBox\": {\n flex: 1,\n display: \"flex\",\n padding: \"0 8px 0 8px\",\n [`@media (max-width: ${breakPoints.sm}px)`]: {\n padding: \"0 10px 0 10px\",\n },\n \"& .indicatorIcon\": {\n width: \"20px\",\n height: \"20px\",\n marginTop: \"8px\",\n maxWidth: \"26px\",\n \"& .min-icon\": {\n width: \"16px\",\n height: \"16px\",\n },\n },\n \"& .indicatorContainer\": {\n flex: 1,\n display: \"flex\",\n flexFlow: \"column\",\n \"& .indicatorLabel\": {\n fontSize: \"16px\",\n fontWeight: 600,\n },\n \"& .counterIndicator\": {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"5px\",\n justifyContent: \"space-between\",\n paddingBottom: 0,\n fontSize: \"55px\",\n [`@media (max-width: ${breakPoints.sm}px)`]: {\n paddingBottom: 10,\n fontSize: \"35px\",\n },\n [`@media (max-width: ${breakPoints.lg}px)`]: {\n fontSize: \"45px\",\n },\n [`@media (max-width: ${breakPoints.xl}px)`]: {\n fontSize: \"50px\",\n },\n flexFlow: \"row\",\n fontWeight: 600,\n\n \"& .stat-text\": {\n color: get(theme, \"mutedText\", \"#87888D\"),\n fontSize: \"12px\",\n marginTop: \"8px\",\n },\n \"& .stat-value\": {\n textAlign: \"center\",\n height: \"50px\",\n },\n \"& .min-icon\": {\n marginRight: \"8px\",\n marginTop: \"8px\",\n height: \"10px\",\n width: \"10px\",\n },\n },\n \"& .onlineCounter\": {\n display: \"flex\",\n alignItems: \"center\",\n marginTop: \"5px\",\n \"& .min-icon\": {\n fill: get(theme, \"signalColors.good\", \"#4CCB92\"),\n },\n },\n \"& .offlineCount\": {\n display: \"flex\",\n alignItems: \"center\",\n marginTop: \"8px\",\n \"& .min-icon\": {\n fill: get(theme, \"signalColors.danger\", \"#C51B3F\"),\n },\n },\n },\n },\n}));\n\nexport const StatusCountCard = ({\n onlineCount = 0,\n offlineCount = 0,\n icon = null,\n label = \"\",\n okStatusText = \"Online\",\n notOkStatusText = \"Offline\",\n}: {\n icon: any;\n onlineCount: number;\n offlineCount: number;\n label: string;\n okStatusText?: string;\n notOkStatusText?: string;\n}) => {\n return (\n \n \n \n {label}\n\n \n \n {onlineCount}\n \n \n
{okStatusText}
\n \n \n\n \n {offlineCount}\n \n {\" \"}\n
{notOkStatusText}
\n \n \n \n \n {icon}\n \n \n );\n};\n\nexport default StatusCountCard;\n"],"names":["LookupTableBase","styled","div","_ref","theme","marginTop","table","width","borderCollapse","fontWeight","fontSize","paddingLeft","textAlign","height","borderBottom","concat","get","display","alignItems","justifyContent","fill","_ref2","matrixData","entityName","entityType","header","rows","tableHeader","map","hC","hcIdx","_jsx","className","children","tableRowsToRender","r","rIdx","v","cIdx","indicator","Box","CircleIcon","_jsxs","sx","marginBottom","syncStatus","mismatch","set","isEntityNotFound","sites","lookupList","lookupKey","Object","keys","find","sk","EntityNotFound","entityValue","marginLeft","marginRight","bucketStats","lookupValue","rowsForStatus","bucketSites","siteKeys","resultMatrix","row","sCol","length","push","name","fi","sfRow","feature","sbStatus","si","rSite","deploymentID","TagMismatch","HasTagsSet","PolicyMismatch","HasPolicySet","QuotaCfgMismatch","HasQuotaCfgSet","OLockConfigMismatch","HasOLockConfigSet","SSEConfigMismatch","HasSSECfgSet","ReplicationCfgMismatch","HasReplicationCfg","LookupStatusTable","policyStats","policySites","HasPolicy","groupStats","groupSites","GroupDescMismatch","HasGroup","HasPolicyMapping","userStats","userSites","UserInfoMismatch","HasUser","EntityReplicationLookup","setEntityType","useState","setEntityValue","stats","setStats","statsLoaded","setStatsLoaded","isStatsLoading","invokeSiteStatsApi","useApi","res","err","gridTemplateColumns","breakPoints","sm","md","gap","flexGrow","Select","id","onChange","value","label","options","disabled","flex","InputBox","e","target","placeholder","maxWidth","TooltipWrapper","tooltip","Button","type","onClick","arguments","undefined","url","getStats","icon","ClustersIcon","collapseOnSmall","Grid","item","xs","Loader","style","BucketEntityStatus","UserEntityStatus","GroupEntityStatus","PolicyEntityStatus","SREntityStatus","_Object$keys","maxValue","entityStatObj","entityTextPlural","statEntityLen","withBorders","padding","StatusCountCard","onlineCount","offlineCount","okStatusText","notOkStatusText","SiteReplicationStatus","navigate","useNavigate","loading","setLoading","maxBuckets","maxGroups","maxUsers","maxPolicies","api","admin","getSiteReplicationStatus","buckets","groups","policies","users","then","data","catch","dispatch","setErrorSnackMessage","errorToHandler","error","finally","useEffect","useAppDispatch","setHelpName","Fragment","PageHeaderWrapper","BackLink","IAM_PAGES","SITE_REPLICATION","actions","HelpMenu","PageLayout","SectionTitle","RefreshIcon","variant","separator","BucketsIcon","UsersIcon","GroupsIcon","IAMPoliciesIcon","minHeight","StatusCountBase","fontFamily","cursor","color","flexFlow","paddingBottom","lg","xl"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"static/js/4103.f42a2340.chunk.js","mappings":"uQAqBA,MAAMA,EAAkBC,EAAAA,GAAOC,KAAIC,IAAA,IAAC,MAAEC,GAAOD,EAAA,MAAM,CACjDE,UAAW,GACXC,MAAO,CACLC,MAAO,OACPC,eAAgB,WAChB,kBAAmB,CACjBC,WAAY,IACZC,SAAU,GACVC,YAAa,IAEf,iBAAkB,CAChBC,UAAW,UAEb,iBAAkB,CAChBA,UAAW,UAEb,OAAQ,CACNC,OAAQ,GACR,OAAQ,CACNC,aAAa,aAADC,OAAeC,IAAIZ,EAAO,cAAe,aAEvD,OAAQ,CACNU,aAAa,aAADC,OAAeC,IAAIZ,EAAO,cAAe,cAGzD,eAAgB,CACda,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChB,cAAe,CACbN,OAAQ,GACRN,MAAO,IAET,WAAY,CACV,cAAe,CACba,KAAMJ,IAAIZ,EAAO,oBAAqB,aAG1C,gBAAiB,CACf,cAAe,CACbgB,KAAMJ,IAAIZ,EAAO,sBAAuB,eAKjD,IA2ED,EAzE0BiB,IAQnB,IARoB,WACzBC,EAAa,GAAE,WACfC,EAAa,GAAE,WACfC,EAAa,IAKdH,EAEC,MAAOI,EAAS,MAAOC,GAAQJ,EAEzBK,EAAcF,EAAOG,KAAI,CAACC,EAAYC,KAExCC,EAAAA,EAAAA,KAAA,MAAIC,UAAU,cAAaC,SACxBJ,GAAE,GAAAd,OAD+B,EAAIe,MAMtCI,EAAoBR,EAAKE,KAAI,CAACO,EAAQC,KAExCL,EAAAA,EAAAA,KAAA,MAAAE,SACGE,EAAEP,KAAI,CAACS,EAAQC,KACd,IAAIC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7B5H,EAAAA,EAAAA,MAACF,EAAAA,IAAG,CAACR,UAAW,eAAeC,SAAA,EAC7BF,EAAAA,EAAAA,KAACU,EAAAA,IAAU,IAAI,KACfV,EAAAA,EAAAA,KAAA,OAAKC,UAAU,YAAWC,SAAEuI,iBAKpCzI,EAAAA,EAAAA,KAACS,EAAAA,IAAG,CAACR,UAAW,gBAAgBC,SAAE+G,QAEpB,C","sources":["screens/Console/Configurations/SiteReplication/LookupStatus/LookupStatusTable.tsx","screens/Console/Configurations/SiteReplication/LookupStatus/Utils.tsx","screens/Console/Configurations/SiteReplication/LookupStatus/BucketEntityStatus.tsx","screens/Console/Configurations/SiteReplication/LookupStatus/PolicyEntityStatus.tsx","screens/Console/Configurations/SiteReplication/LookupStatus/GroupEntityStatus.tsx","screens/Console/Configurations/SiteReplication/LookupStatus/UserEntityStatus.tsx","screens/Console/Configurations/SiteReplication/EntityReplicationLookup.tsx","screens/Console/Configurations/SiteReplication/SiteReplicationStatus.tsx","screens/Console/Dashboard/BasicDashboard/StatusCountCard.tsx"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport styled from \"styled-components\";\nimport get from \"lodash/get\";\nimport { Box, CircleIcon } from \"mds\";\n\nconst LookupTableBase = styled.div(({ theme }) => ({\n marginTop: 15,\n table: {\n width: \"100%\",\n borderCollapse: \"collapse\",\n \"& .feature-cell\": {\n fontWeight: 600,\n fontSize: 14,\n paddingLeft: 15,\n },\n \"& .status-cell\": {\n textAlign: \"center\",\n },\n \"& .header-cell\": {\n textAlign: \"center\",\n },\n \"& tr\": {\n height: 38,\n \"& td\": {\n borderBottom: `1px solid ${get(theme, \"borderColor\", \"#E2E2E2\")}`,\n },\n \"& th\": {\n borderBottom: `2px solid ${get(theme, \"borderColor\", \"#E2E2E2\")}`,\n },\n },\n \"& .indicator\": {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n \"& .min-icon\": {\n height: 15,\n width: 15,\n },\n \"&.active\": {\n \"& .min-icon\": {\n fill: get(theme, \"signalColors.good\", \"#4CCB92\"),\n },\n },\n \"&.deactivated\": {\n \"& .min-icon\": {\n fill: get(theme, \"signalColors.danger\", \"#C51B3F\"),\n },\n },\n },\n },\n}));\n\nconst LookupStatusTable = ({\n matrixData = [],\n entityName = \"\",\n entityType = \"\",\n}: {\n matrixData: any;\n entityName: string;\n entityType: string;\n}) => {\n //Assumes 1st row should be a header row.\n const [header = [], ...rows] = matrixData;\n\n const tableHeader = header.map((hC: string, hcIdx: number) => {\n return (\n
\n {r.map((v: any, cIdx: number) => {\n let indicator = null;\n\n if (cIdx === 0) {\n indicator = v;\n } else if (v === \"\") {\n indicator = \"\";\n }\n if (v === true) {\n indicator = (\n \n \n \n );\n } else if (v === false) {\n indicator = (\n \n \n \n );\n }\n\n return (\n
\n {indicator}\n
\n );\n })}\n
\n );\n });\n\n return (\n \n \n Replication status for {entityType}: {entityName}.\n \n
\n \n
{tableHeader}
\n \n {tableRowsToRender}\n
\n \n );\n};\n\nexport default LookupStatusTable;\n","import React from \"react\";\nimport { StatsResponseType } from \"../SiteReplicationStatus\";\nimport { Box } from \"mds\";\n\nexport function syncStatus(mismatch: boolean, set: boolean): string | boolean {\n if (!set) {\n return \"\";\n }\n return !mismatch;\n}\n\nexport function isEntityNotFound(\n sites: Partial,\n lookupList: Partial,\n lookupKey: string,\n) {\n const siteKeys: string[] = Object.keys(sites);\n return siteKeys.find((sk: string) => {\n // there is no way to find the type of this ! as it is an entry in the structure itself.\n // @ts-ignore\n const result: Record = lookupList[sk] || {};\n return !result[lookupKey];\n });\n}\n\nexport const EntityNotFound = ({\n entityType,\n entityValue,\n}: {\n entityType: string;\n entityValue: string;\n}) => {\n return (\n \n {entityType}:{\" \"}\n \n {entityValue}\n {\" \"}\n not found.\n \n );\n};\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { StatsResponseType } from \"../SiteReplicationStatus\";\nimport LookupStatusTable from \"./LookupStatusTable\";\nimport { EntityNotFound, isEntityNotFound, syncStatus } from \"./Utils\";\n\ntype BucketEntityStatusProps = Partial & {\n lookupValue?: string;\n};\nconst BucketEntityStatus = ({\n bucketStats = {},\n sites = {},\n lookupValue = \"\",\n}: BucketEntityStatusProps) => {\n const rowsForStatus = [\n \"Tags\",\n \"Policy\",\n \"Quota\",\n \"Retention\",\n \"Encryption\",\n \"Replication\",\n ];\n\n const bucketSites: Record = bucketStats[lookupValue] || {};\n\n if (!lookupValue) return null;\n\n const siteKeys = Object.keys(sites);\n\n const notFound = isEntityNotFound(sites, bucketSites, \"HasBucket\");\n const resultMatrix: any = [];\n if (notFound) {\n return ;\n } else {\n const row = [];\n for (let sCol = 0; sCol < siteKeys.length; sCol++) {\n if (sCol === 0) {\n row.push(\"\");\n }\n /**\n * ----------------------------------\n * | | sit-0 | site-1 |\n * -----------------------------------\n */\n row.push(sites[siteKeys[sCol]].name);\n }\n resultMatrix.push(row);\n for (let fi = 0; fi < rowsForStatus.length; fi++) {\n /**\n * -------------------------------------------------\n * | Feature Name | site-0-status | site-1-status |\n * --------------------------------------------------\n */\n const sfRow = [];\n const feature = rowsForStatus[fi];\n let sbStatus: string | boolean = \"\";\n\n for (let si = 0; si < siteKeys.length; si++) {\n const bucketSiteDeploymentId = sites[siteKeys[si]].deploymentID;\n\n const rSite = bucketSites[bucketSiteDeploymentId];\n\n if (si === 0) {\n sfRow.push(feature);\n }\n\n switch (fi) {\n case 0:\n sbStatus = syncStatus(rSite.TagMismatch, rSite.HasTagsSet);\n sfRow.push(sbStatus);\n break;\n case 1:\n sbStatus = syncStatus(rSite.PolicyMismatch, rSite.HasPolicySet);\n sfRow.push(sbStatus);\n break;\n case 2:\n sbStatus = syncStatus(rSite.QuotaCfgMismatch, rSite.HasQuotaCfgSet);\n sfRow.push(sbStatus);\n break;\n case 3:\n sbStatus = syncStatus(\n rSite.OLockConfigMismatch,\n rSite.HasOLockConfigSet,\n );\n sfRow.push(sbStatus);\n break;\n case 4:\n sbStatus = syncStatus(rSite.SSEConfigMismatch, rSite.HasSSECfgSet);\n sfRow.push(sbStatus);\n break;\n case 5:\n sbStatus = syncStatus(\n rSite.ReplicationCfgMismatch,\n rSite.HasReplicationCfg,\n );\n sfRow.push(sbStatus);\n break;\n }\n }\n\n resultMatrix.push(sfRow);\n }\n }\n\n return (\n \n );\n};\n\nexport default BucketEntityStatus;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { StatsResponseType } from \"../SiteReplicationStatus\";\nimport LookupStatusTable from \"./LookupStatusTable\";\nimport { EntityNotFound, isEntityNotFound, syncStatus } from \"./Utils\";\n\ntype PolicyEntityStatusProps = Partial & {\n lookupValue?: string;\n};\nconst PolicyEntityStatus = ({\n policyStats = {},\n sites = {},\n lookupValue = \"\",\n}: PolicyEntityStatusProps) => {\n const rowsForStatus = [\"Policy\"];\n\n const policySites: Record = policyStats[lookupValue] || {};\n\n if (!lookupValue) return null;\n\n const siteKeys = Object.keys(sites);\n const notFound = isEntityNotFound(sites, policySites, \"HasPolicy\");\n const resultMatrix: any = [];\n if (notFound) {\n return ;\n } else {\n const row = [];\n for (let sCol = 0; sCol < siteKeys.length; sCol++) {\n if (sCol === 0) {\n row.push(\"\");\n }\n row.push(sites[siteKeys[sCol]].name);\n }\n resultMatrix.push(row);\n for (let fi = 0; fi < rowsForStatus.length; fi++) {\n const sfRow = [];\n const feature = rowsForStatus[fi];\n let sbStatus: string | boolean = \"\";\n\n for (let si = 0; si < siteKeys.length; si++) {\n const bucketSiteDeploymentId = sites[siteKeys[si]].deploymentID;\n\n const rSite = policySites[bucketSiteDeploymentId];\n\n if (si === 0) {\n sfRow.push(feature);\n }\n\n switch (fi) {\n case 0:\n sbStatus = syncStatus(rSite.PolicyMismatch, rSite.HasPolicy);\n sfRow.push(sbStatus);\n break;\n }\n }\n\n resultMatrix.push(sfRow);\n }\n }\n\n return (\n \n );\n};\n\nexport default PolicyEntityStatus;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { StatsResponseType } from \"../SiteReplicationStatus\";\nimport LookupStatusTable from \"./LookupStatusTable\";\nimport { EntityNotFound, isEntityNotFound, syncStatus } from \"./Utils\";\n\ntype GroupEntityStatusProps = Partial & {\n lookupValue?: string;\n};\nconst UserEntityStatus = ({\n groupStats = {},\n sites = {},\n lookupValue = \"\",\n}: GroupEntityStatusProps) => {\n const rowsForStatus = [\"Info\", \"Policy mapping\"];\n\n const groupSites: Record = groupStats[lookupValue] || {};\n\n if (!lookupValue) return null;\n\n const siteKeys = Object.keys(sites);\n const notFound = isEntityNotFound(sites, groupSites, \"HasGroup\");\n const resultMatrix: any = [];\n if (notFound) {\n return ;\n } else {\n const row = [];\n for (let sCol = 0; sCol < siteKeys.length; sCol++) {\n if (sCol === 0) {\n row.push(\"\");\n }\n /**\n * ----------------------------------\n * | | sit-0 | site-1 |\n * -----------------------------------\n */\n row.push(sites[siteKeys[sCol]].name);\n }\n resultMatrix.push(row);\n for (let fi = 0; fi < rowsForStatus.length; fi++) {\n /**\n * -------------------------------------------------\n * | Feature Name | site-0-status | site-1-status |\n * --------------------------------------------------\n */\n const sfRow = [];\n const feature = rowsForStatus[fi];\n let sbStatus: string | boolean = \"\";\n\n for (let si = 0; si < siteKeys.length; si++) {\n const bucketSiteDeploymentId = sites[siteKeys[si]].deploymentID;\n\n const rSite = groupSites[bucketSiteDeploymentId];\n\n if (si === 0) {\n sfRow.push(feature);\n }\n\n switch (fi) {\n case 0:\n sbStatus = syncStatus(rSite.GroupDescMismatch, rSite.HasGroup);\n sfRow.push(sbStatus);\n break;\n case 1:\n sbStatus = syncStatus(rSite.PolicyMismatch, rSite.HasPolicyMapping);\n sfRow.push(sbStatus);\n break;\n }\n }\n\n resultMatrix.push(sfRow);\n }\n }\n\n return (\n \n );\n};\n\nexport default UserEntityStatus;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { StatsResponseType } from \"../SiteReplicationStatus\";\nimport LookupStatusTable from \"./LookupStatusTable\";\nimport { EntityNotFound, isEntityNotFound, syncStatus } from \"./Utils\";\n\ntype PolicyEntityStatusProps = Partial & {\n lookupValue?: string;\n};\nconst UserEntityStatus = ({\n userStats = {},\n sites = {},\n lookupValue = \"\",\n}: PolicyEntityStatusProps) => {\n const rowsForStatus = [\"Info\", \"Policy mapping\"];\n\n const userSites: Record = userStats[lookupValue] || {};\n\n if (!lookupValue) return null;\n\n const siteKeys = Object.keys(sites);\n\n const notFound = isEntityNotFound(sites, userSites, \"HasUser\");\n\n const resultMatrix: any = [];\n if (notFound) {\n return ;\n } else {\n const row = [];\n for (let sCol = 0; sCol < siteKeys.length; sCol++) {\n if (sCol === 0) {\n row.push(\"\");\n }\n row.push(sites[siteKeys[sCol]].name);\n }\n resultMatrix.push(row);\n for (let fi = 0; fi < rowsForStatus.length; fi++) {\n const sfRow = [];\n const feature = rowsForStatus[fi];\n let sbStatus: string | boolean = \"\";\n\n for (let si = 0; si < siteKeys.length; si++) {\n const bucketSiteDeploymentId = sites[siteKeys[si]].deploymentID;\n\n const rSite = userSites[bucketSiteDeploymentId];\n\n if (si === 0) {\n sfRow.push(feature);\n }\n\n switch (fi) {\n case 0:\n sbStatus = syncStatus(rSite.UserInfoMismatch, rSite.HasUser);\n sfRow.push(sbStatus);\n break;\n case 1:\n sbStatus = syncStatus(rSite.PolicyMismatch, rSite.HasPolicyMapping);\n sfRow.push(sbStatus);\n break;\n }\n }\n\n resultMatrix.push(sfRow);\n }\n }\n\n return (\n \n );\n};\n\nexport default UserEntityStatus;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState } from \"react\";\nimport {\n Box,\n breakPoints,\n Button,\n ClustersIcon,\n Grid,\n Loader,\n Select,\n InputBox,\n} from \"mds\";\nimport useApi from \"../../Common/Hooks/useApi\";\nimport { StatsResponseType } from \"./SiteReplicationStatus\";\nimport BucketEntityStatus from \"./LookupStatus/BucketEntityStatus\";\nimport PolicyEntityStatus from \"./LookupStatus/PolicyEntityStatus\";\nimport GroupEntityStatus from \"./LookupStatus/GroupEntityStatus\";\nimport UserEntityStatus from \"./LookupStatus/UserEntityStatus\";\nimport TooltipWrapper from \"../../Common/TooltipWrapper/TooltipWrapper\";\n\nconst EntityReplicationLookup = () => {\n const [entityType, setEntityType] = useState(\"bucket\");\n const [entityValue, setEntityValue] = useState(\"\");\n\n const [stats, setStats] = useState({});\n const [statsLoaded, setStatsLoaded] = useState(false);\n\n const [isStatsLoading, invokeSiteStatsApi] = useApi(\n (res: any) => {\n setStats(res);\n setStatsLoaded(true);\n },\n (err: any) => {\n setStats({});\n setStatsLoaded(true);\n },\n );\n\n const {\n bucketStats = {},\n sites = {},\n userStats = {},\n policyStats = {},\n groupStats = {},\n } = stats || {};\n\n const getStats = (entityType: string = \"\", entityValue: string = \"\") => {\n setStatsLoaded(false);\n if (entityType && entityValue) {\n let url = `api/v1/admin/site-replication/status?buckets=false&entityType=${entityType}&entityValue=${entityValue}&groups=false&policies=false&users=false`;\n invokeSiteStatsApi(\"GET\", url);\n }\n };\n\n return (\n \n \n \n View Replication Status for a:\n \n \n \n\n \n ) => {\n setEntityValue(e.target.value);\n setStatsLoaded(false);\n }}\n placeholder={`test-${entityType}`}\n label=\"\"\n value={entityValue}\n />\n \n \n \n {\n getStats(entityType, entityValue);\n }}\n label={`View`}\n icon={}\n collapseOnSmall={false}\n disabled={!entityValue || !entityType}\n />\n \n \n \n\n {isStatsLoading ? (\n \n \n \n ) : null}\n\n {statsLoaded ? (\n \n {!isStatsLoading && entityType === \"bucket\" && entityValue ? (\n \n ) : null}\n\n {!isStatsLoading && entityType === \"user\" && entityValue ? (\n \n ) : null}\n\n {!isStatsLoading && entityType === \"group\" && entityValue ? (\n \n ) : null}\n\n {!isStatsLoading && entityType === \"policy\" && entityValue ? (\n \n ) : null}\n \n ) : null}\n \n );\n};\n\nexport default EntityReplicationLookup;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport {\n BackLink,\n Box,\n breakPoints,\n BucketsIcon,\n Button,\n Grid,\n GroupsIcon,\n IAMPoliciesIcon,\n Loader,\n PageLayout,\n RefreshIcon,\n UsersIcon,\n SectionTitle,\n} from \"mds\";\nimport { useNavigate } from \"react-router-dom\";\nimport { IAM_PAGES } from \"../../../../common/SecureComponent/permissions\";\nimport { useAppDispatch } from \"../../../../store\";\nimport { setErrorSnackMessage, setHelpName } from \"../../../../systemSlice\";\nimport StatusCountCard from \"../../Dashboard/BasicDashboard/StatusCountCard\";\nimport EntityReplicationLookup from \"./EntityReplicationLookup\";\nimport TooltipWrapper from \"../../Common/TooltipWrapper/TooltipWrapper\";\nimport PageHeaderWrapper from \"../../Common/PageHeaderWrapper/PageHeaderWrapper\";\nimport HelpMenu from \"../../HelpMenu\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport {\n ApiError,\n HttpResponse,\n SiteReplicationStatusResponse,\n} from \"api/consoleApi\";\n\nexport type StatsResponseType = {\n maxBuckets?: number;\n bucketStats?: Record;\n maxGroups?: number;\n groupStats?: Record;\n maxUsers?: number;\n userStats?: Record;\n maxPolicies?: number;\n policyStats?: Record;\n sites?: Record;\n};\n\nconst SREntityStatus = ({\n maxValue = 0,\n entityStatObj = {},\n entityTextPlural = \"\",\n icon = null,\n}: {\n maxValue: number;\n entityStatObj: Record;\n entityTextPlural: string;\n icon?: React.ReactNode;\n}) => {\n const statEntityLen = Object.keys(entityStatObj || {})?.length;\n return (\n \n \n \n );\n};\n\nconst SiteReplicationStatus = () => {\n const navigate = useNavigate();\n\n const [stats, setStats] = useState({});\n const [loading, setLoading] = useState(false);\n\n const {\n maxBuckets = 0,\n bucketStats = {},\n maxGroups = 0,\n groupStats = {},\n maxUsers = 0,\n userStats = {},\n maxPolicies = 0,\n policyStats = {},\n } = stats || {};\n\n const getStats = () => {\n setLoading(true);\n api.admin\n .getSiteReplicationStatus({\n buckets: true,\n groups: true,\n policies: true,\n users: true,\n })\n .then((res: HttpResponse) => {\n setStats(res.data);\n })\n .catch((res: HttpResponse) => {\n setStats({});\n dispatch(setErrorSnackMessage(errorToHandler(res.error)));\n })\n .finally(() => setLoading(false));\n };\n\n useEffect(() => {\n getStats();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const dispatch = useAppDispatch();\n useEffect(() => {\n dispatch(setHelpName(\"replication_status\"));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n \n navigate(IAM_PAGES.SITE_REPLICATION)}\n />\n }\n actions={}\n />\n\n \n \n \n {\n getStats();\n }}\n label={\"Refresh\"}\n icon={}\n variant={\"regular\"}\n collapseOnSmall={false}\n />\n \n \n }\n separator\n >\n Replication status from all Sites\n \n\n {!loading ? (\n \n }\n />\n }\n />\n }\n />\n }\n />\n \n ) : (\n \n \n \n )}\n\n \n \n \n \n \n );\n};\n\nexport default SiteReplicationStatus;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport styled from \"styled-components\";\nimport get from \"lodash/get\";\nimport { Box, breakPoints, CircleIcon } from \"mds\";\n\nconst StatusCountBase = styled.div(({ theme }) => ({\n fontFamily: \"Inter,sans-serif\",\n maxWidth: \"321px\",\n display: \"flex\",\n marginLeft: \"auto\",\n marginRight: \"auto\",\n cursor: \"default\",\n color: get(theme, \"signalColors.main\", \"#07193E\"),\n \"& .mainBox\": {\n flex: 1,\n display: \"flex\",\n padding: \"0 8px 0 8px\",\n [`@media (max-width: ${breakPoints.sm}px)`]: {\n padding: \"0 10px 0 10px\",\n },\n \"& .indicatorIcon\": {\n width: \"20px\",\n height: \"20px\",\n marginTop: \"8px\",\n maxWidth: \"26px\",\n \"& .min-icon\": {\n width: \"16px\",\n height: \"16px\",\n },\n },\n \"& .indicatorContainer\": {\n flex: 1,\n display: \"flex\",\n flexFlow: \"column\",\n \"& .indicatorLabel\": {\n fontSize: \"16px\",\n fontWeight: 600,\n },\n \"& .counterIndicator\": {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"5px\",\n justifyContent: \"space-between\",\n paddingBottom: 0,\n fontSize: \"55px\",\n [`@media (max-width: ${breakPoints.sm}px)`]: {\n paddingBottom: 10,\n fontSize: \"35px\",\n },\n [`@media (max-width: ${breakPoints.lg}px)`]: {\n fontSize: \"45px\",\n },\n [`@media (max-width: ${breakPoints.xl}px)`]: {\n fontSize: \"50px\",\n },\n flexFlow: \"row\",\n fontWeight: 600,\n\n \"& .stat-text\": {\n color: get(theme, \"mutedText\", \"#87888D\"),\n fontSize: \"12px\",\n marginTop: \"8px\",\n },\n \"& .stat-value\": {\n textAlign: \"center\",\n height: \"50px\",\n },\n \"& .min-icon\": {\n marginRight: \"8px\",\n marginTop: \"8px\",\n height: \"10px\",\n width: \"10px\",\n },\n },\n \"& .onlineCounter\": {\n display: \"flex\",\n alignItems: \"center\",\n marginTop: \"5px\",\n \"& .min-icon\": {\n fill: get(theme, \"signalColors.good\", \"#4CCB92\"),\n },\n },\n \"& .offlineCount\": {\n display: \"flex\",\n alignItems: \"center\",\n marginTop: \"8px\",\n \"& .min-icon\": {\n fill: get(theme, \"signalColors.danger\", \"#C51B3F\"),\n },\n },\n },\n },\n}));\n\nconst StatusCountCard = ({\n onlineCount = 0,\n offlineCount = 0,\n icon = null,\n label = \"\",\n okStatusText = \"Online\",\n notOkStatusText = \"Offline\",\n}: {\n icon: any;\n onlineCount: number;\n offlineCount: number;\n label: string;\n okStatusText?: string;\n notOkStatusText?: string;\n}) => {\n return (\n \n \n \n {label}\n\n \n \n {onlineCount}\n \n \n
{okStatusText}
\n \n \n\n \n {offlineCount}\n \n {\" \"}\n
{notOkStatusText}
\n \n \n \n \n {icon}\n \n \n );\n};\n\nexport default StatusCountCard;\n"],"names":["LookupTableBase","styled","div","_ref","theme","marginTop","table","width","borderCollapse","fontWeight","fontSize","paddingLeft","textAlign","height","borderBottom","concat","get","display","alignItems","justifyContent","fill","_ref2","matrixData","entityName","entityType","header","rows","tableHeader","map","hC","hcIdx","_jsx","className","children","tableRowsToRender","r","rIdx","v","cIdx","indicator","Box","CircleIcon","_jsxs","sx","marginBottom","syncStatus","mismatch","set","isEntityNotFound","sites","lookupList","lookupKey","Object","keys","find","sk","EntityNotFound","entityValue","marginLeft","marginRight","bucketStats","lookupValue","rowsForStatus","bucketSites","siteKeys","resultMatrix","row","sCol","length","push","name","fi","sfRow","feature","sbStatus","si","rSite","deploymentID","TagMismatch","HasTagsSet","PolicyMismatch","HasPolicySet","QuotaCfgMismatch","HasQuotaCfgSet","OLockConfigMismatch","HasOLockConfigSet","SSEConfigMismatch","HasSSECfgSet","ReplicationCfgMismatch","HasReplicationCfg","LookupStatusTable","policyStats","policySites","HasPolicy","groupStats","groupSites","GroupDescMismatch","HasGroup","HasPolicyMapping","userStats","userSites","UserInfoMismatch","HasUser","EntityReplicationLookup","setEntityType","useState","setEntityValue","stats","setStats","statsLoaded","setStatsLoaded","isStatsLoading","invokeSiteStatsApi","useApi","res","err","gridTemplateColumns","breakPoints","sm","md","gap","flexGrow","Select","id","onChange","value","label","options","disabled","flex","InputBox","e","target","placeholder","maxWidth","TooltipWrapper","tooltip","Button","type","onClick","arguments","undefined","url","getStats","icon","ClustersIcon","collapseOnSmall","Grid","item","xs","Loader","style","BucketEntityStatus","UserEntityStatus","GroupEntityStatus","PolicyEntityStatus","SREntityStatus","_Object$keys","maxValue","entityStatObj","entityTextPlural","statEntityLen","withBorders","padding","StatusCountCard","onlineCount","offlineCount","okStatusText","notOkStatusText","SiteReplicationStatus","navigate","useNavigate","loading","setLoading","maxBuckets","maxGroups","maxUsers","maxPolicies","api","admin","getSiteReplicationStatus","buckets","groups","policies","users","then","data","catch","dispatch","setErrorSnackMessage","errorToHandler","error","finally","useEffect","useAppDispatch","setHelpName","Fragment","PageHeaderWrapper","BackLink","IAM_PAGES","SITE_REPLICATION","actions","HelpMenu","PageLayout","SectionTitle","RefreshIcon","variant","separator","BucketsIcon","UsersIcon","GroupsIcon","IAMPoliciesIcon","minHeight","StatusCountBase","fontFamily","cursor","color","flexFlow","paddingBottom","lg","xl"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/5128.96ab1387.chunk.js b/web-app/build/static/js/5128.96ab1387.chunk.js
deleted file mode 100644
index 7806c69d1a..0000000000
--- a/web-app/build/static/js/5128.96ab1387.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[5128],{12848:(e,t,n)=>{n.d(t,{A:()=>i});var l=n(65043),a=n(33097),o=n.n(a),s=n(89923),c=n(70579);const i=e=>{let{elements:t,name:n,label:a,tooltip:i="",commonPlaceholder:r="",onChange:d,withBorder:h=!1}=e;const[u,m]=(0,l.useState)([""]),f=(0,l.createRef)();(0,l.useEffect)((()=>{if(1===u.length&&""===u[0]&&t&&""!==t){const e=t.split(",");e.push(""),m(e)}}),[t,u]),(0,l.useEffect)((()=>{if(u.length>1){const e=f.current;e&&e.scrollIntoView(!1)}}),[u,f]);const p=(0,l.useCallback)((e=>{d(e)}),[d]),x=(0,l.useRef)(!0);(0,l.useEffect)((()=>{if(x.current)return void(x.current=!1);const e=u.filter((e=>""!==e.trim())).join(",");p(e)}),[u]);const v=e=>{e.persist();let t=[...u];const n=o()(e.target,"dataset.index","0");t[parseInt(n)]=e.target.value,m(t)},g=u.map(((e,t)=>(0,c.jsx)(s.cl_,{id:"".concat(n,"-").concat(t.toString()),label:"",name:"".concat(n,"-").concat(t.toString()),value:u[t],onChange:v,index:t,placeholder:r,overlayIcon:t===u.length-1?(0,c.jsx)(s.REV,{}):null,overlayAction:()=>{(e=>{if(""!==e[e.length-1].trim()){const t=[...e];t.push(""),m(t)}})(u)}},"csv-multi-".concat(n,"-").concat(t.toString()))));return(0,c.jsx)(l.Fragment,{children:(0,c.jsxs)(s.azJ,{sx:{display:"flex"},className:"inputItem",children:[(0,c.jsxs)(s.l1Y,{sx:{alignItems:"flex-start"},children:[(0,c.jsx)("span",{children:a}),""!==i&&(0,c.jsx)(s.azJ,{sx:{marginLeft:5,display:"flex",alignItems:"center","& .min-icon":{width:13}},children:(0,c.jsx)(s.m_M,{tooltip:i,placement:"top",children:(0,c.jsx)(s.azJ,{className:i,children:(0,c.jsx)(s.NTw,{})})})})]}),(0,c.jsxs)(s.azJ,{withBorders:h,sx:{width:"100%",overflowY:"auto",height:150,position:"relative"},children:[g,(0,c.jsx)("div",{ref:f})]})]})})}},5128:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i,valueDef:()=>c});var l=n(65043),a=n(89923),o=n(12848),s=n(70579);const c=(e,t,n)=>{let l="on|off"===t?"off":"";if(n.length>0){const t=n.find((t=>t.key===e));t&&(l=t.value||"")}return l},i=e=>{let{onChange:t,fields:n,defaultVals:i,overrideEnv:r}=e;const[d,h]=(0,l.useState)([]),u=n||[],m=i||[];(0,l.useEffect)((()=>{const e=n.map((e=>({key:e.name,value:c(e.name,e.type,m)})));h(e)}),[n,i]),(0,l.useEffect)((()=>{t(d)}),[d]);const f=(e,t,n)=>{const l=[...d];t=t.trim(),l[n]={key:e,value:t},h(l)},p=(e,t)=>{const n=d[t];if(n){const t=null===r||void 0===r?void 0:r["".concat(n.key)];if(t)return(0,s.jsx)(a.EmB,{label:e.label,actionButton:(0,s.jsx)(a.xA9,{item:!0,sx:{display:"flex",justifyContent:"flex-end",paddingRight:"10px"},children:(0,s.jsx)(a.m_M,{tooltip:"This value is set from the ".concat(t.overrideEnv," environment variable"),placement:"left",children:(0,s.jsx)(a.D0K,{style:{width:20}})})}),sx:{width:"100%"},children:t.value})}switch(e.type){case"on|off":const l=n?n.value:"off";return(0,s.jsx)(a.dOG,{onChange:n=>{const l=n.target.checked?"on":"off";f(e.name,l,t)},id:e.name,name:e.name,label:e.label,value:"switch_on",tooltip:e.tooltip,checked:"on"===l});case"csv":return(0,s.jsx)(o.A,{elements:n?n.value:"",label:e.label,name:e.name,onChange:n=>{let l="";l=Array.isArray(n)?n.join(","):n,f(e.name,l,t)},tooltip:e.tooltip,commonPlaceholder:e.placeholder,withBorder:!0});case"comment":return(0,s.jsx)(a.hFj,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:n?n.value:"",onChange:n=>f(e.name,n.target.value,t),placeholder:e.placeholder});default:return(0,s.jsx)(a.cl_,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:n?n.value:"",onChange:n=>f(e.name,n.target.value,t),placeholder:e.placeholder})}};return(0,s.jsx)(a.Hbc,{withBorders:!1,containerPadding:!1,children:u.map(((e,t)=>(0,s.jsx)(l.Fragment,{children:p(e,t)},e.name)))})}}}]);
-//# sourceMappingURL=5128.96ab1387.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/5128.a36f1ed5.chunk.js b/web-app/build/static/js/5128.a36f1ed5.chunk.js
new file mode 100644
index 0000000000..d67affbea5
--- /dev/null
+++ b/web-app/build/static/js/5128.a36f1ed5.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[5128],{12848:(e,t,n)=>{n.d(t,{A:()=>i});var l=n(65043),a=n(33097),o=n.n(a),s=n(89923),c=n(70579);const i=e=>{let{elements:t,name:n,label:a,tooltip:i="",commonPlaceholder:r="",onChange:d,withBorder:h=!1}=e;const[u,m]=(0,l.useState)([""]),f=(0,l.createRef)();(0,l.useEffect)((()=>{if(1===u.length&&""===u[0]&&t&&""!==t){const e=t.split(",");e.push(""),m(e)}}),[t,u]),(0,l.useEffect)((()=>{if(u.length>1){const e=f.current;e&&e.scrollIntoView(!1)}}),[u,f]);const p=(0,l.useCallback)((e=>{d(e)}),[d]),x=(0,l.useRef)(!0);(0,l.useEffect)((()=>{if(x.current)return void(x.current=!1);const e=u.filter((e=>""!==e.trim())).join(",");p(e)}),[u]);const v=e=>{e.persist();let t=[...u];const n=o()(e.target,"dataset.index","0");t[parseInt(n)]=e.target.value,m(t)},g=u.map(((e,t)=>(0,c.jsx)(s.cl_,{id:"".concat(n,"-").concat(t.toString()),label:"",name:"".concat(n,"-").concat(t.toString()),value:u[t],onChange:v,index:t,placeholder:r,overlayIcon:t===u.length-1?(0,c.jsx)(s.REV,{}):null,overlayAction:()=>{(e=>{if(""!==e[e.length-1].trim()){const t=[...e];t.push(""),m(t)}})(u)}},"csv-multi-".concat(n,"-").concat(t.toString()))));return(0,c.jsx)(l.Fragment,{children:(0,c.jsxs)(s.azJ,{sx:{display:"flex"},className:"inputItem",children:[(0,c.jsxs)(s.l1Y,{sx:{alignItems:"flex-start"},children:[(0,c.jsx)("span",{children:a}),""!==i&&(0,c.jsx)(s.azJ,{sx:{marginLeft:5,display:"flex",alignItems:"center","& .min-icon":{width:13}},children:(0,c.jsx)(s.m_M,{tooltip:i,placement:"top",children:(0,c.jsx)(s.azJ,{className:i,children:(0,c.jsx)(s.NTw,{})})})})]}),(0,c.jsxs)(s.azJ,{withBorders:h,sx:{width:"100%",overflowY:"auto",height:150,position:"relative"},children:[g,(0,c.jsx)("div",{ref:f})]})]})})}},5128:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var l=n(65043),a=n(89923),o=n(12848),s=n(70579);const c=(e,t,n)=>{let l="on|off"===t?"off":"";if(n.length>0){const t=n.find((t=>t.key===e));t&&(l=t.value||"")}return l},i=e=>{let{onChange:t,fields:n,defaultVals:i,overrideEnv:r}=e;const[d,h]=(0,l.useState)([]),u=n||[],m=i||[];(0,l.useEffect)((()=>{const e=n.map((e=>({key:e.name,value:c(e.name,e.type,m)})));h(e)}),[n,i]),(0,l.useEffect)((()=>{t(d)}),[d]);const f=(e,t,n)=>{const l=[...d];t=t.trim(),l[n]={key:e,value:t},h(l)},p=(e,t)=>{const n=d[t];if(n){const t=null===r||void 0===r?void 0:r["".concat(n.key)];if(t)return(0,s.jsx)(a.EmB,{label:e.label,actionButton:(0,s.jsx)(a.xA9,{item:!0,sx:{display:"flex",justifyContent:"flex-end",paddingRight:"10px"},children:(0,s.jsx)(a.m_M,{tooltip:"This value is set from the ".concat(t.overrideEnv," environment variable"),placement:"left",children:(0,s.jsx)(a.D0K,{style:{width:20}})})}),sx:{width:"100%"},children:t.value})}switch(e.type){case"on|off":const l=n?n.value:"off";return(0,s.jsx)(a.dOG,{onChange:n=>{const l=n.target.checked?"on":"off";f(e.name,l,t)},id:e.name,name:e.name,label:e.label,value:"switch_on",tooltip:e.tooltip,checked:"on"===l});case"csv":return(0,s.jsx)(o.A,{elements:n?n.value:"",label:e.label,name:e.name,onChange:n=>{let l="";l=Array.isArray(n)?n.join(","):n,f(e.name,l,t)},tooltip:e.tooltip,commonPlaceholder:e.placeholder,withBorder:!0});case"comment":return(0,s.jsx)(a.hFj,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:n?n.value:"",onChange:n=>f(e.name,n.target.value,t),placeholder:e.placeholder});default:return(0,s.jsx)(a.cl_,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:n?n.value:"",onChange:n=>f(e.name,n.target.value,t),placeholder:e.placeholder})}};return(0,s.jsx)(a.Hbc,{withBorders:!1,containerPadding:!1,children:u.map(((e,t)=>(0,s.jsx)(l.Fragment,{children:p(e,t)},e.name)))})}}}]);
+//# sourceMappingURL=5128.a36f1ed5.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/5128.96ab1387.chunk.js.map b/web-app/build/static/js/5128.a36f1ed5.chunk.js.map
similarity index 64%
rename from web-app/build/static/js/5128.96ab1387.chunk.js.map
rename to web-app/build/static/js/5128.a36f1ed5.chunk.js.map
index 898087f3cd..1e52e24b11 100644
--- a/web-app/build/static/js/5128.96ab1387.chunk.js.map
+++ b/web-app/build/static/js/5128.a36f1ed5.chunk.js.map
@@ -1 +1 @@
-{"version":3,"file":"static/js/5128.96ab1387.chunk.js","mappings":"6KAqCA,MAkJA,EAlJyBA,IAQC,IARA,SACxBC,EAAQ,KACRC,EAAI,MACJC,EAAK,QACLC,EAAU,GAAE,kBACZC,EAAoB,GAAE,SACtBC,EAAQ,WACRC,GAAa,GACKP,EAClB,MAAOQ,EAAiBC,IAAsBC,EAAAA,EAAAA,UAAmB,CAAC,KAC5DC,GAAaC,EAAAA,EAAAA,cAGnBC,EAAAA,EAAAA,YAAU,KACR,GAC6B,IAA3BL,EAAgBM,QACO,K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,aAAa,EAAO0C,kBAAkB,EAAMvD,SACrD8B,EAAe5C,KAAI,CAAC+C,EAAOI,KAC1BlD,EAAAA,EAAAA,KAACY,EAAAA,SAAQ,CAAAC,SAAmBoC,EAAgBH,EAAOI,IAApCJ,EAAMtF,SAEZ,C","sources":["screens/Console/Common/FormComponents/CSVMultiSelector/CSVMultiSelector.tsx","screens/Console/EventDestinations/ConfTargetGeneric.tsx"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React, {\n ChangeEvent,\n createRef,\n useCallback,\n useEffect,\n useRef,\n useState,\n Fragment,\n} from \"react\";\nimport get from \"lodash/get\";\nimport { AddIcon, Box, HelpIcon, InputBox, InputLabel, Tooltip } from \"mds\";\n\ninterface ICSVMultiSelector {\n elements: string;\n name: string;\n label: string;\n tooltip?: string;\n commonPlaceholder?: string;\n withBorder?: boolean;\n onChange: (elements: string) => void;\n}\n\nconst CSVMultiSelector = ({\n elements,\n name,\n label,\n tooltip = \"\",\n commonPlaceholder = \"\",\n onChange,\n withBorder = false,\n}: ICSVMultiSelector) => {\n const [currentElements, setCurrentElements] = useState([\"\"]);\n const bottomList = createRef();\n\n // Use effect to get the initial values from props\n useEffect(() => {\n if (\n currentElements.length === 1 &&\n currentElements[0] === \"\" &&\n elements &&\n elements !== \"\"\n ) {\n const elementsSplit = elements.split(\",\");\n elementsSplit.push(\"\");\n\n setCurrentElements(elementsSplit);\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [elements, currentElements]);\n\n // Use effect to send new values to onChange\n useEffect(() => {\n if (currentElements.length > 1) {\n const refScroll = bottomList.current;\n if (refScroll) {\n refScroll.scrollIntoView(false);\n }\n }\n }, [currentElements, bottomList]);\n\n const onChangeCallback = useCallback(\n (newString: string) => {\n onChange(newString);\n },\n [onChange],\n );\n\n // We avoid multiple re-renders / hang issue typing too fast\n const firstUpdate = useRef(true);\n useEffect(() => {\n if (firstUpdate.current) {\n firstUpdate.current = false;\n return;\n }\n const elementsString = currentElements\n .filter((element) => element.trim() !== \"\")\n .join(\",\");\n\n onChangeCallback(elementsString);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentElements]);\n\n // If the last input is not empty, we add a new one\n const addEmptyLine = (elementsUp: string[]) => {\n if (elementsUp[elementsUp.length - 1].trim() !== \"\") {\n const cpList = [...elementsUp];\n cpList.push(\"\");\n setCurrentElements(cpList);\n }\n };\n\n // Onchange function for input box, we get the dataset-index & only update that value in the array\n const onChangeElement = (e: ChangeEvent) => {\n e.persist();\n\n let updatedElement = [...currentElements];\n const index = get(e.target, \"dataset.index\", \"0\");\n const indexNum = parseInt(index);\n updatedElement[indexNum] = e.target.value;\n\n setCurrentElements(updatedElement);\n };\n\n const inputs = currentElements.map((element, index) => {\n return (\n : null}\n overlayAction={() => {\n addEmptyLine(currentElements);\n }}\n />\n );\n });\n\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n \n \n \n \n \n \n \n )}\n \n \n {inputs}\n \n \n \n \n );\n};\nexport default CSVMultiSelector;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport {\n CommentBox,\n ConsoleIcon,\n FormLayout,\n Grid,\n InputBox,\n ReadBox,\n Switch,\n Tooltip,\n} from \"mds\";\nimport { IElementValue, IOverrideEnv, KVField } from \"../Configurations/types\";\nimport CSVMultiSelector from \"../Common/FormComponents/CSVMultiSelector/CSVMultiSelector\";\n\ninterface IConfGenericProps {\n onChange: (newValue: IElementValue[]) => void;\n fields: KVField[];\n defaultVals?: IElementValue[];\n overrideEnv?: IOverrideEnv;\n}\n\n// Function to get defined values,\n//we make this because the backed sometimes don't return all the keys when there is an initial configuration\nexport const valueDef = (\n key: string,\n type: string,\n defaults: IElementValue[],\n) => {\n let defValue = type === \"on|off\" ? \"off\" : \"\";\n\n if (defaults.length > 0) {\n const storedConfig = defaults.find((element) => element.key === key);\n\n if (storedConfig) {\n defValue = storedConfig.value || \"\";\n }\n }\n\n return defValue;\n};\n\nconst ConfTargetGeneric = ({\n onChange,\n fields,\n defaultVals,\n overrideEnv,\n}: IConfGenericProps) => {\n const [valueHolder, setValueHolder] = useState([]);\n const fieldsElements = !fields ? [] : fields;\n const defValList = !defaultVals ? [] : defaultVals;\n\n // Effect to create all the values to hold\n useEffect(() => {\n const values: IElementValue[] = fields.map((field) => {\n const stateInsert: IElementValue = {\n key: field.name,\n value: valueDef(field.name, field.type, defValList),\n };\n return stateInsert;\n });\n\n setValueHolder(values);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fields, defaultVals]);\n\n useEffect(() => {\n onChange(valueHolder);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [valueHolder]);\n\n const setValueElement = (key: string, value: string, index: number) => {\n const valuesDup = [...valueHolder];\n value = value.trim();\n valuesDup[index] = { key, value };\n\n setValueHolder(valuesDup);\n };\n\n const fieldDefinition = (field: KVField, item: number) => {\n const holderItem = valueHolder[item];\n\n if (holderItem) {\n // Override Value with env var, we display generic string component\n const override = overrideEnv?.[`${holderItem.key}`];\n\n if (override) {\n return (\n \n \n \n \n \n }\n sx={{ width: \"100%\" }}\n >\n {override.value}\n \n );\n }\n }\n\n switch (field.type) {\n case \"on|off\":\n const value = holderItem ? holderItem.value : \"off\";\n\n return (\n ) => {\n const value = e.target.checked ? \"on\" : \"off\";\n setValueElement(field.name, value, item);\n }}\n id={field.name}\n name={field.name}\n label={field.label}\n value={\"switch_on\"}\n tooltip={field.tooltip}\n checked={value === \"on\"}\n />\n );\n case \"csv\":\n return (\n {\n let valCh = \"\";\n\n if (Array.isArray(value)) {\n valCh = value.join(\",\");\n } else {\n valCh = value;\n }\n\n setValueElement(field.name, valCh, item);\n }}\n tooltip={field.tooltip}\n commonPlaceholder={field.placeholder}\n withBorder={true}\n />\n );\n case \"comment\":\n return (\n setValueElement(field.name, e.target.value, item)}\n placeholder={field.placeholder}\n />\n );\n default:\n return (\n ) =>\n setValueElement(field.name, e.target.value, item)\n }\n placeholder={field.placeholder}\n />\n );\n }\n };\n\n return (\n \n {fieldsElements.map((field, item) => (\n {fieldDefinition(field, item)}\n ))}\n \n );\n};\n\nexport default ConfTargetGeneric;\n"],"names":["_ref","elements","name","label","tooltip","commonPlaceholder","onChange","withBorder","currentElements","setCurrentElements","useState","bottomList","createRef","useEffect","length","elementsSplit","split","push","refScroll","current","scrollIntoView","onChangeCallback","useCallback","newString","firstUpdate","useRef","elementsString","filter","element","trim","join","onChangeElement","e","persist","updatedElement","index","get","target","parseInt","value","inputs","map","_jsx","InputBox","id","concat","toString","placeholder","overlayIcon","AddIcon","overlayAction","elementsUp","cpList","addEmptyLine","Fragment","children","_jsxs","Box","sx","display","className","InputLabel","alignItems","marginLeft","width","Tooltip","placement","HelpIcon","withBorders","overflowY","height","position","ref","valueDef","key","type","defaults","defValue","storedConfig","find","fields","defaultVals","overrideEnv","valueHolder","setValueHolder","fieldsElements","defValList","values","field","setValueElement","valuesDup","fieldDefinition","item","holderItem","override","ReadBox","actionButton","Grid","justifyContent","paddingRight","ConsoleIcon","style","Switch","checked","CSVMultiSelector","valCh","Array","isArray","CommentBox","FormLayout","containerPadding"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"static/js/5128.a36f1ed5.chunk.js","mappings":"6KAqCA,MAkJA,EAlJyBA,IAQC,IARA,SACxBC,EAAQ,KACRC,EAAI,MACJC,EAAK,QACLC,EAAU,GAAE,kBACZC,EAAoB,GAAE,SACtBC,EAAQ,WACRC,GAAa,GACKP,EAClB,MAAOQ,EAAiBC,IAAsBC,EAAAA,EAAAA,UAAmB,CAAC,KAC5DC,GAAaC,EAAAA,EAAAA,cAGnBC,EAAAA,EAAAA,YAAU,KACR,GAC6B,IAA3BL,EAAgBM,QACO,KAAvBN,EAAgB,IAChBP,GACa,KAAbA,EACA,CACA,MAAMc,EAAgBd,EAASe,MAAM,KACrCD,EAAcE,KAAK,IAEnBR,EAAmBM,EACrB,IAGC,CAACd,EAAUO,KAGdK,EAAAA,EAAAA,YAAU,KACR,GAAIL,EAAgBM,OAAS,EAAG,CAC9B,MAAMI,EAAYP,EAAWQ,QACzBD,GACFA,EAAUE,gBAAe,EAE7B,IACC,CAACZ,EAAiBG,IAErB,MAAMU,GAAmBC,EAAAA,EAAAA,cACtBC,IACCjB,EAASiB,EAAU,GAErB,CAACjB,IAIGkB,GAAcC,EAAAA,EAAAA,SAAO,IAC3BZ,EAAAA,EAAAA,YAAU,KACR,GAAIW,EAAYL,QAEd,YADAK,EAAYL,SAAU,GAGxB,MAAMO,EAAiBlB,EACpBmB,QAAQC,GAA+B,KAAnBA,EAAQC,SAC5BC,KAAK,KAERT,EAAiBK,EAAe,GAG/B,CAAClB,IAGJ,MASMuB,EAAmBC,IACvBA,EAAEC,UAEF,IAAIC,EAAiB,IAAI1B,GACzB,MAAM2B,EAAQC,IAAIJ,EAAEK,OAAQ,gBAAiB,KAE7CH,EADiBI,SAASH,IACCH,EAAEK,OAAOE,MAEpC9B,EAAmByB,EAAe,EAG9BM,EAAShC,EAAgBiC,KAAI,CAACb,EAAS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AAW0B,GAAMyD,EAAgBD,EAAMtF,KAAM8B,EAAEK,OAAOE,MAAOqD,GAC7D7C,YAAayC,EAAMzC,cAGzB,QACE,OACEL,EAAAA,EAAAA,KAACC,EAAAA,IAAQ,CACPC,GAAI4C,EAAMtF,KACVA,KAAMsF,EAAMtF,KACZC,MAAOqF,EAAMrF,MACbC,QAASoF,EAAMpF,QACfmC,MAAOsD,EAAaA,EAAWtD,MAAQ,GACvCjC,SAAW0B,GACTyD,EAAgBD,EAAMtF,KAAM8B,EAAEK,OAAOE,MAAOqD,GAE9C7C,YAAayC,EAAMzC,cAG3B,EAGF,OACEL,EAAAA,EAAAA,KAACmE,EAAAA,IAAU,CAACzC,aAAa,EAAO0C,kBAAkB,EAAMvD,SACrD8B,EAAe5C,KAAI,CAAC+C,EAAOI,KAC1BlD,EAAAA,EAAAA,KAACY,EAAAA,SAAQ,CAAAC,SAAmBoC,EAAgBH,EAAOI,IAApCJ,EAAMtF,SAEZ,C","sources":["screens/Console/Common/FormComponents/CSVMultiSelector/CSVMultiSelector.tsx","screens/Console/EventDestinations/ConfTargetGeneric.tsx"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React, {\n ChangeEvent,\n createRef,\n useCallback,\n useEffect,\n useRef,\n useState,\n Fragment,\n} from \"react\";\nimport get from \"lodash/get\";\nimport { AddIcon, Box, HelpIcon, InputBox, InputLabel, Tooltip } from \"mds\";\n\ninterface ICSVMultiSelector {\n elements: string;\n name: string;\n label: string;\n tooltip?: string;\n commonPlaceholder?: string;\n withBorder?: boolean;\n onChange: (elements: string) => void;\n}\n\nconst CSVMultiSelector = ({\n elements,\n name,\n label,\n tooltip = \"\",\n commonPlaceholder = \"\",\n onChange,\n withBorder = false,\n}: ICSVMultiSelector) => {\n const [currentElements, setCurrentElements] = useState([\"\"]);\n const bottomList = createRef();\n\n // Use effect to get the initial values from props\n useEffect(() => {\n if (\n currentElements.length === 1 &&\n currentElements[0] === \"\" &&\n elements &&\n elements !== \"\"\n ) {\n const elementsSplit = elements.split(\",\");\n elementsSplit.push(\"\");\n\n setCurrentElements(elementsSplit);\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [elements, currentElements]);\n\n // Use effect to send new values to onChange\n useEffect(() => {\n if (currentElements.length > 1) {\n const refScroll = bottomList.current;\n if (refScroll) {\n refScroll.scrollIntoView(false);\n }\n }\n }, [currentElements, bottomList]);\n\n const onChangeCallback = useCallback(\n (newString: string) => {\n onChange(newString);\n },\n [onChange],\n );\n\n // We avoid multiple re-renders / hang issue typing too fast\n const firstUpdate = useRef(true);\n useEffect(() => {\n if (firstUpdate.current) {\n firstUpdate.current = false;\n return;\n }\n const elementsString = currentElements\n .filter((element) => element.trim() !== \"\")\n .join(\",\");\n\n onChangeCallback(elementsString);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentElements]);\n\n // If the last input is not empty, we add a new one\n const addEmptyLine = (elementsUp: string[]) => {\n if (elementsUp[elementsUp.length - 1].trim() !== \"\") {\n const cpList = [...elementsUp];\n cpList.push(\"\");\n setCurrentElements(cpList);\n }\n };\n\n // Onchange function for input box, we get the dataset-index & only update that value in the array\n const onChangeElement = (e: ChangeEvent) => {\n e.persist();\n\n let updatedElement = [...currentElements];\n const index = get(e.target, \"dataset.index\", \"0\");\n const indexNum = parseInt(index);\n updatedElement[indexNum] = e.target.value;\n\n setCurrentElements(updatedElement);\n };\n\n const inputs = currentElements.map((element, index) => {\n return (\n : null}\n overlayAction={() => {\n addEmptyLine(currentElements);\n }}\n />\n );\n });\n\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n \n \n \n \n \n \n \n )}\n \n \n {inputs}\n \n \n \n \n );\n};\nexport default CSVMultiSelector;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport {\n CommentBox,\n ConsoleIcon,\n FormLayout,\n Grid,\n InputBox,\n ReadBox,\n Switch,\n Tooltip,\n} from \"mds\";\nimport { IElementValue, IOverrideEnv, KVField } from \"../Configurations/types\";\nimport CSVMultiSelector from \"../Common/FormComponents/CSVMultiSelector/CSVMultiSelector\";\n\ninterface IConfGenericProps {\n onChange: (newValue: IElementValue[]) => void;\n fields: KVField[];\n defaultVals?: IElementValue[];\n overrideEnv?: IOverrideEnv;\n}\n\n// Function to get defined values,\n//we make this because the backed sometimes don't return all the keys when there is an initial configuration\nconst valueDef = (key: string, type: string, defaults: IElementValue[]) => {\n let defValue = type === \"on|off\" ? \"off\" : \"\";\n\n if (defaults.length > 0) {\n const storedConfig = defaults.find((element) => element.key === key);\n\n if (storedConfig) {\n defValue = storedConfig.value || \"\";\n }\n }\n\n return defValue;\n};\n\nconst ConfTargetGeneric = ({\n onChange,\n fields,\n defaultVals,\n overrideEnv,\n}: IConfGenericProps) => {\n const [valueHolder, setValueHolder] = useState([]);\n const fieldsElements = !fields ? [] : fields;\n const defValList = !defaultVals ? [] : defaultVals;\n\n // Effect to create all the values to hold\n useEffect(() => {\n const values: IElementValue[] = fields.map((field) => {\n const stateInsert: IElementValue = {\n key: field.name,\n value: valueDef(field.name, field.type, defValList),\n };\n return stateInsert;\n });\n\n setValueHolder(values);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fields, defaultVals]);\n\n useEffect(() => {\n onChange(valueHolder);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [valueHolder]);\n\n const setValueElement = (key: string, value: string, index: number) => {\n const valuesDup = [...valueHolder];\n value = value.trim();\n valuesDup[index] = { key, value };\n\n setValueHolder(valuesDup);\n };\n\n const fieldDefinition = (field: KVField, item: number) => {\n const holderItem = valueHolder[item];\n\n if (holderItem) {\n // Override Value with env var, we display generic string component\n const override = overrideEnv?.[`${holderItem.key}`];\n\n if (override) {\n return (\n \n \n \n \n \n }\n sx={{ width: \"100%\" }}\n >\n {override.value}\n \n );\n }\n }\n\n switch (field.type) {\n case \"on|off\":\n const value = holderItem ? holderItem.value : \"off\";\n\n return (\n ) => {\n const value = e.target.checked ? \"on\" : \"off\";\n setValueElement(field.name, value, item);\n }}\n id={field.name}\n name={field.name}\n label={field.label}\n value={\"switch_on\"}\n tooltip={field.tooltip}\n checked={value === \"on\"}\n />\n );\n case \"csv\":\n return (\n {\n let valCh = \"\";\n\n if (Array.isArray(value)) {\n valCh = value.join(\",\");\n } else {\n valCh = value;\n }\n\n setValueElement(field.name, valCh, item);\n }}\n tooltip={field.tooltip}\n commonPlaceholder={field.placeholder}\n withBorder={true}\n />\n );\n case \"comment\":\n return (\n setValueElement(field.name, e.target.value, item)}\n placeholder={field.placeholder}\n />\n );\n default:\n return (\n ) =>\n setValueElement(field.name, e.target.value, item)\n }\n placeholder={field.placeholder}\n />\n );\n }\n };\n\n return (\n \n {fieldsElements.map((field, item) => (\n {fieldDefinition(field, item)}\n ))}\n \n );\n};\n\nexport default ConfTargetGeneric;\n"],"names":["_ref","elements","name","label","tooltip","commonPlaceholder","onChange","withBorder","currentElements","setCurrentElements","useState","bottomList","createRef","useEffect","length","elementsSplit","split","push","refScroll","current","scrollIntoView","onChangeCallback","useCallback","newString","firstUpdate","useRef","elementsString","filter","element","trim","join","onChangeElement","e","persist","updatedElement","index","get","target","parseInt","value","inputs","map","_jsx","InputBox","id","concat","toString","placeholder","overlayIcon","AddIcon","overlayAction","elementsUp","cpList","addEmptyLine","Fragment","children","_jsxs","Box","sx","display","className","InputLabel","alignItems","marginLeft","width","Tooltip","placement","HelpIcon","withBorders","overflowY","height","position","ref","valueDef","key","type","defaults","defValue","storedConfig","find","fields","defaultVals","overrideEnv","valueHolder","setValueHolder","fieldsElements","defValList","values","field","setValueElement","valuesDup","fieldDefinition","item","holderItem","override","ReadBox","actionButton","Grid","justifyContent","paddingRight","ConsoleIcon","style","Switch","checked","CSVMultiSelector","valCh","Array","isArray","CommentBox","FormLayout","containerPadding"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/7052.50a0217e.chunk.js b/web-app/build/static/js/7052.37bcb35a.chunk.js
similarity index 85%
rename from web-app/build/static/js/7052.50a0217e.chunk.js
rename to web-app/build/static/js/7052.37bcb35a.chunk.js
index c3ca2c8eb2..c6d5e7029b 100644
--- a/web-app/build/static/js/7052.50a0217e.chunk.js
+++ b/web-app/build/static/js/7052.37bcb35a.chunk.js
@@ -1,2 +1,2 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[7052,5128],{12848:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(65043),o=n(33097),a=n.n(o),l=n(89923),r=n(70579);const s=e=>{let{elements:t,name:n,label:o,tooltip:s="",commonPlaceholder:c="",onChange:d,withBorder:u=!1}=e;const[p,m]=(0,i.useState)([""]),h=(0,i.createRef)();(0,i.useEffect)((()=>{if(1===p.length&&""===p[0]&&t&&""!==t){const e=t.split(",");e.push(""),m(e)}}),[t,p]),(0,i.useEffect)((()=>{if(p.length>1){const e=h.current;e&&e.scrollIntoView(!1)}}),[p,h]);const f=(0,i.useCallback)((e=>{d(e)}),[d]),x=(0,i.useRef)(!0);(0,i.useEffect)((()=>{if(x.current)return void(x.current=!1);const e=p.filter((e=>""!==e.trim())).join(",");f(e)}),[p]);const g=e=>{e.persist();let t=[...p];const n=a()(e.target,"dataset.index","0");t[parseInt(n)]=e.target.value,m(t)},v=p.map(((e,t)=>(0,r.jsx)(l.cl_,{id:"".concat(n,"-").concat(t.toString()),label:"",name:"".concat(n,"-").concat(t.toString()),value:p[t],onChange:g,index:t,placeholder:c,overlayIcon:t===p.length-1?(0,r.jsx)(l.REV,{}):null,overlayAction:()=>{(e=>{if(""!==e[e.length-1].trim()){const t=[...e];t.push(""),m(t)}})(p)}},"csv-multi-".concat(n,"-").concat(t.toString()))));return(0,r.jsx)(i.Fragment,{children:(0,r.jsxs)(l.azJ,{sx:{display:"flex"},className:"inputItem",children:[(0,r.jsxs)(l.l1Y,{sx:{alignItems:"flex-start"},children:[(0,r.jsx)("span",{children:o}),""!==s&&(0,r.jsx)(l.azJ,{sx:{marginLeft:5,display:"flex",alignItems:"center","& .min-icon":{width:13}},children:(0,r.jsx)(l.m_M,{tooltip:s,placement:"top",children:(0,r.jsx)(l.azJ,{className:s,children:(0,r.jsx)(l.NTw,{})})})})]}),(0,r.jsxs)(l.azJ,{withBorders:u,sx:{width:"100%",overflowY:"auto",height:150,position:"relative"},children:[v,(0,r.jsx)("div",{ref:h})]})]})})}},94141:(e,t,n)=>{n.d(t,{A:()=>d});var i=n(65043),o=n(22166),a=n(89923),l=n(21383),r=n(64159),s=n(49555),c=n(70579);const d=e=>{let{onClose:t,modalOpen:n,title:d,children:u,wideLimit:p=!0,titleIcon:m=null,iconColor:h="default",sx:f}=e;const x=(0,l.jL)(),[g,v]=(0,i.useState)(!1),b=(0,o.d4)((e=>e.system.modalSnackBar));(0,i.useEffect)((()=>{x((0,r.h0)(""))}),[x]),(0,i.useEffect)((()=>{if(b){if(""===b.message)return void v(!1);"error"!==b.type&&v(!0)}}),[b]);let y="";return b&&(y=b.detailedErrorMsg,(""===y||y&&y.length<5)&&(y=b.message)),(0,c.jsxs)(a.ngX,{onClose:t,open:n,title:d,titleIcon:m,widthLimit:p,sx:f,iconColor:h,children:[(0,c.jsx)(s.A,{isModal:!0}),(0,c.jsx)(a.qb_,{onClose:()=>{v(!1),x((0,r.h0)(""))},open:g,message:y,mode:"inline",variant:"error"===b.type?"error":"default",autoHideDuration:"error"===b.type?10:5,condensed:!0}),u]})}},67052:(e,t,n)=>{n.r(t),n.d(t,{default:()=>F});var i=n(65043),o=n(89923),a=n(45479),l=n(73216),r=n(33097),s=n.n(r),c=n(22166),d=n(56629),u=n(53518),p=n(64159),m=n(21383),h=n(94141),f=n(77403),x=n(70579);const g=e=>{let{open:t,type:n,onCloseEndpoint:a}=e;const[l,r]=(0,i.useState)(""),[s,c]=(0,i.useState)(""),[g,v]=(0,i.useState)(""),[b,y]=(0,i.useState)(!1),[j,k]=(0,i.useState)(["name","endpoint"]),[C,_]=(0,i.useState)(["name","endpoint","auth-token"]),E=(0,m.jL)(),S=e=>{_(C.filter((t=>t!==e)))},w=(e,t)=>{j.includes(e)&&t?k(j.filter((t=>t!==e))):t||j.includes(e)||k([...j,e])};let A="Add new Webhook",T=(0,x.jsx)(o.XC7,{});switch(n){case"logger_webhook":A="New Logger Webhook",T=(0,x.jsx)(o.D0K,{});break;case"audit_webhook":A="New Audit Webhook",T=(0,x.jsx)(o.rBG,{})}return(0,x.jsx)(i.Fragment,{children:(0,x.jsxs)(h.A,{modalOpen:t,title:A,onClose:a,titleIcon:T,children:[(0,x.jsxs)(o.Hbc,{containerPadding:!1,withBorders:!1,children:[(0,x.jsx)(o.cl_,{id:"name",name:"name",onChange:e=>{S("name"),r(e.target.value),w("name",e.target.validity.valid)},error:j.includes("name")&&!C.includes("name")?"Invalid Name":"",label:"Name",value:l,pattern:"^(?=.*[a-zA-Z0-9]).{1,}$",required:!0}),(0,x.jsx)(o.cl_,{id:"endpoint",name:"endpoint",onChange:e=>{S("endpoint"),c(e.target.value),w("endpoint",e.target.validity.valid)},error:j.includes("endpoint")&&!C.includes("endpoint")?"Invalid Endpoint set":"",label:"Endpoint",value:s,pattern:"^(https?):\\/\\/([a-zA-Z0-9\\-.]+)(:[0-9]+)?(\\/[a-zA-Z0-9\\-.\\/]*)?$",required:!0}),(0,x.jsx)(o.cl_,{id:"auth-token",name:"auth-token",onChange:e=>{S("auth-token"),v(e.target.value)},label:"Auth Token",value:g})]}),b&&(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{marginBottom:10},children:(0,x.jsx)(o.z21,{})}),(0,x.jsxs)(o.xA9,{item:!0,xs:12,sx:f.Uz.modalButtonBar,children:[(0,x.jsx)(o.$nd,{id:"reset",type:"button",variant:"regular",disabled:b,onClick:a,label:"Cancel",sx:{marginRight:10}}),(0,x.jsx)(o.$nd,{id:"save-lifecycle",type:"submit",variant:"callAction",color:"primary",disabled:b||0!==j.length,label:"Save",onClick:()=>{if(b)return;if(0!==j.length)return;if(""===l.trim())return void k([...j,"name"]);if(""===s.trim())return void k([...j,"endpoint"]);y(!0);const e={key_values:[{key:"endpoint",value:s},{key:"auth_token",value:g}],arn_resource_id:l};d.F.configs.setConfig(n,e).then((e=>{y(!1),E((0,p.YR)(e.data.restart||!1)),e.data.restart||E((0,p.Hk)("Configuration saved successfully")),a(),E((0,p.TE)(!0))})).catch((e=>{y(!1),E((0,p.C9)((0,u.S)(e.error)))}))}})]})]})})};var v=n(58661);const b=e=>{let{modalOpen:t,onClose:n,selectedARN:a}=e;const[l,r]=(0,i.useState)(!1),s=(0,m.jL)();(0,i.useEffect)((()=>{l&&d.F.configs.resetConfig(a).then((()=>{r(!1),s((0,p.YR)(!0)),s((0,p.TE)(!0)),n()})).catch((e=>{r(!1),s((0,p.C9)((0,u.S)(e.error)))}))}),[l,s,n,a]);const c=!a.includes(":");let h="Are you sure you want to delete the Configured Endpoint";return c&&(h="Are you sure you want to reset the Default"),(0,x.jsx)(v.A,{title:c?"Reset Default Webhook":"Delete Webhook",confirmText:c?"Reset":"Delete",isOpen:t,isLoading:l,onConfirm:()=>{r(!0)},titleIcon:(0,x.jsx)(o.xWY,{}),onClose:n,confirmationContent:(0,x.jsxs)(i.Fragment,{children:["".concat(h," "),(0,x.jsx)("strong",{children:a}),"?"]})})},y=e=>{var t,n,l,r,s,c;let{open:g,type:v,endpointInfo:b,onCloseEndpoint:y}=e;const[j,k]=(0,i.useState)(""),[C,_]=(0,i.useState)(""),[E,S]=(0,i.useState)(""),[w,A]=(0,i.useState)("on"),[T,q]=(0,i.useState)(!1),[L,R]=(0,i.useState)([]),I=(0,m.jL)();(0,i.useEffect)((()=>{if(b){const e=b.key_values.find((e=>"endpoint"===e.key)),t=b.key_values.find((e=>"auth_token"===e.key)),n=b.key_values.find((e=>"enable"===e.key));let i=[];if(e){const t=e.value;""===t?i.push("endpoint"):_(t)}if(t){const e=t.value;""===e?i.push("auth-token"):S(e)}n&&"off"===n.value&&A(n.value),k(b.name||""),R(i)}}),[b]);const M=!j.includes(":"),B=b.key_values.filter((e=>!!e.env_override)),D=(0,a.uu)(B);let F="Edit Webhook",N=(0,x.jsx)(o.XC7,{});switch(v){case"logger_webhook":F="Edit ".concat(M?" the Default ":"","Logger Webhook"),N=(0,x.jsx)(o.D0K,{});break;case"audit_webhook":F="Edit ".concat(M?" the Default ":"","Audit Webhook"),N=(0,x.jsx)(o.rBG,{})}return B.length>0&&(F="View env variable Webhook"),(0,x.jsx)(i.Fragment,{children:(0,x.jsx)(h.A,{modalOpen:g,title:"".concat(F).concat(M?"":" - ".concat(j)),onClose:y,titleIcon:N,children:(0,x.jsx)(o.Hbc,{withBorders:!1,containerPadding:!1,children:B.length>0?(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)(o.EmB,{label:"Enabled",sx:{width:"100%"},actionButton:(0,x.jsx)(o.xA9,{item:!0,sx:{display:"flex",justifyContent:"flex-end",paddingRight:"10px"},children:(0,x.jsx)(o.m_M,{tooltip:D.enable?"This value is set from the ".concat((null===(t=D.enable)||void 0===t?void 0:t.overrideEnv)||"N/A"," environment variable"):"",placement:"left",children:(0,x.jsx)(o.D0K,{style:{width:20}})})}),children:(null===(n=D.enable)||void 0===n?void 0:n.value)||"-"}),(0,x.jsx)(o.EmB,{label:"Endpoint",sx:{width:"100%"},actionButton:(0,x.jsx)(o.xA9,{item:!0,sx:{display:"flex",justifyContent:"flex-end",paddingRight:"10px"},children:(0,x.jsx)(o.m_M,{tooltip:D.enable?"This value is set from the ".concat((null===(l=D.endpoint)||void 0===l?void 0:l.overrideEnv)||"N/A"," environment variable"):"",placement:"left",children:(0,x.jsx)(o.D0K,{style:{width:20}})})}),children:(null===(r=D.endpoint)||void 0===r?void 0:r.value)||"-"}),(0,x.jsx)(o.EmB,{label:"Auth Token",sx:{width:"100%"},actionButton:(0,x.jsx)(o.xA9,{item:!0,sx:{display:"flex",justifyContent:"flex-end",paddingRight:"10px"},children:(0,x.jsx)(o.m_M,{tooltip:D.enable?"This value is set from the ".concat((null===(s=D.auth_token)||void 0===s?void 0:s.overrideEnv)||"N/A"," environment variable"):"",placement:"left",children:(0,x.jsx)(o.D0K,{style:{width:20}})})}),children:(null===(c=D.auth_token)||void 0===c?void 0:c.value)||"-"})]}):(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)(o.dOG,{onChange:e=>{const t=e.target.checked?"on":"off";A(t)},id:"endpoint_enabled",name:"endpoint_enabled",label:"Enabled",value:"switch_on",checked:"on"===w}),(0,x.jsx)(o.cl_,{id:"endpoint",name:"endpoint",onChange:e=>{_(e.target.value),((e,t)=>{L.includes(e)&&t?R(L.filter((t=>t!==e))):t||L.includes(e)||R([...L,e])})("endpoint",e.target.validity.valid)},error:L.includes("endpoint")?"Invalid Endpoint set":"",label:"Endpoint",value:C,pattern:"^(https?):\\/\\/([a-zA-Z0-9\\-.]+)(:[0-9]+)?(\\/[a-zA-Z0-9\\-.\\/]*)?$",required:!0}),(0,x.jsx)(o.cl_,{id:"auth-token",name:"auth-token",onChange:e=>{S(e.target.value)},label:"Auth Token",value:E}),T&&(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{marginBottom:10},children:(0,x.jsx)(o.z21,{})}),(0,x.jsxs)(o.xA9,{item:!0,sx:f.Uz.modalButtonBar,children:[(0,x.jsx)(o.$nd,{id:"reset",type:"button",variant:"regular",disabled:T,onClick:y,label:"Cancel"}),(0,x.jsx)(o.$nd,{id:"save-lifecycle",type:"submit",variant:"callAction",color:"primary",disabled:T||0!==L.length,label:"Update",onClick:()=>{if(T)return;if(0!==L.length)return;if(!C||""===C.trim())return void R([...L,"endpoint"]);q(!0);const e={key_values:[{key:"endpoint",value:C},{key:"auth_token",value:E},{key:"enable",value:w}]};d.F.configs.setConfig(j,e).then((e=>{q(!1),I((0,p.YR)(e.data.restart||!1)),e.data.restart||I((0,p.Hk)("Configuration saved successfully")),y(),I((0,p.TE)(!0))})).catch((e=>{q(!1),I((0,p.C9)((0,u.S)(e.error)))}))}})]})]})})})})},j=e=>{let{setResetConfigurationOpen:t,WebhookSettingslist:n,type:a}=e;const[l,r]=(0,i.useState)(!1),[s,c]=(0,i.useState)(!1),[d,u]=(0,i.useState)(!1),[p,m]=(0,i.useState)(""),[h,f]=(0,i.useState)(null),v=[{type:"view",onClick:e=>{e.name&&(u(!0),f(e))}},{type:"delete",onClick:e=>{e.name&&(c(!0),m(e.name))},disableButtonFunction:e=>{const t=n.find((t=>t.name===e));if(t){var i;const e=null===(i=t.key_values)||void 0===i?void 0:i.filter((e=>!!e.env_override));return!!(e&&e.length>0)}return!1}}];return(0,x.jsxs)(o.xA9,{container:!0,children:[l&&(0,x.jsx)(g,{open:l,type:a,onCloseEndpoint:()=>{r(!1)}}),s&&(0,x.jsx)(b,{modalOpen:s,onClose:()=>{c(!1),m("")},selectedARN:p,type:a}),d&&h&&(0,x.jsx)(y,{open:d,type:a,endpointInfo:h,onCloseEndpoint:()=>{u(!1),f(null)}}),(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{display:"flex",justifyContent:"flex-end"},children:(0,x.jsx)(o.$nd,{id:"newWebhook",variant:"callAction",onClick:()=>{r(!0)},children:"New Endpoint"})}),(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{padding:"0 10px 10px"},children:(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)("h3",{children:"Currently Configured Endpoints"}),(0,x.jsx)(o.bQt,{columns:[{label:"Status",elementKey:"key_values",renderFunction:e=>{const t=e.find((e=>"enable"===e.key));if(null!==t&&void 0!==t&&t.env_override){const e=null!==t&&void 0!==t&&t.env_override.value&&"on"!==(null===t||void 0===t?void 0:t.env_override.value)&&null!==t&&void 0!==t&&t.env_override.value?"Disabled":"Enabled";return(0,x.jsxs)(o.xA9,{container:!0,sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyItems:"start",fontSize:"8px"},children:[(0,x.jsx)(o.D0K,{style:{fill:"#052F51",width:"14px"}}),e?"Enabled":"Disabled"]})}return t&&"on"!==t.value&&t.value?(0,x.jsxs)(o.xA9,{container:!0,sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyItems:"start",fontSize:"8px"},children:[(0,x.jsx)(o.lgW,{style:{fill:"#C83B51",width:14,height:14}}),"Disabled"]}):(0,x.jsxs)(o.xA9,{container:!0,sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyItems:"start",fontSize:"8px"},children:[(0,x.jsx)(o.JrA,{style:{fill:"#4CCB92",width:14,height:14}}),"Enabled"]})},width:50},{label:"Name",elementKey:"name"},{label:"Endpoint",elementKey:"key_values",renderFunction:e=>{const t=e.find((e=>"endpoint"===e.key));return t?t.env_override?t.env_override.value:t.value:""}}],itemActions:v,idField:"name",isLoading:!1,records:n,entityName:"endpoints",customPaperHeight:"calc(100vh - 750px)"})]})})]})};var k=n(5128),C=n(48967);const _=e=>{let{selectedConfiguration:t,className:n=""}=e;const r=(0,m.jL)(),h=(0,l.Zp)(),{pathname:f=""}=(0,l.zy)();let g=f.substring(f.lastIndexOf("/")+1);g="settings"===g?"region":g;const[v,b]=(0,i.useState)([]),[y,_]=(0,i.useState)(!1),[E,S]=(0,i.useState)([]),[w,A]=(0,i.useState)([]),[T,q]=(0,i.useState)(!1),[L,R]=(0,i.useState)({}),I=(0,c.d4)((e=>e.system.loadingConfigurations));(0,i.useEffect)((()=>{r((0,p.TE)(!0))}),[g,r]),(0,i.useEffect)((()=>{if(I){const e=s()(t,"configuration_id",!1);if(e)return void d.F.configs.configInfo(e).then((t=>{A(t.data);let n=s()(t.data[0],"key_values",[]);const i=a.PE[e].map((e=>{const t=n.find((t=>t.key===e.name)),i=(null===t||void 0===t?void 0:t.value)||"";return{key:e.name,value:e.customValueProcess?e.customValueProcess(i):i,env_override:null===t||void 0===t?void 0:t.env_override}}));S(i),R((0,a.uu)(i)),r((0,p.TE)(!1))})).catch((e=>{r((0,p.TE)(!1)),r((0,p.C9)((0,u.S)(e.error)))}));r((0,p.TE)(!1))}}),[I,t,r]),(0,i.useEffect)((()=>{if(y){const e={key_values:(0,a.Xm)(v)};d.F.configs.setConfig(t.configuration_id,e).then((e=>{_(!1),r((0,p.YR)(e.data.restart||!1)),r((0,p.TE)(!0)),e.data.restart||r((0,p.Hk)("Configuration saved successfully"))})).catch((e=>{_(!1),r((0,p.C9)((0,u.S)(e.error)))}))}}),[y,r,t,v,h]);const M=(0,i.useCallback)((e=>{b(e)}),[b]),B=()=>{q(!0)};return(0,x.jsx)(i.Fragment,{children:(0,x.jsxs)("div",{onMouseMove:()=>{r((0,p.ph)("settings_".concat(t.configuration_label)))},children:[T&&(0,x.jsx)(C.A,{configurationName:t.configuration_id,closeResetModalAndRefresh:e=>{q(!1),r((0,p.YR)(e)),e&&r((0,p.TE)(!0))},resetOpen:T}),I?(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{textAlign:"center",paddingTop:"15px"},children:(0,x.jsx)(o.aHM,{})}):(0,x.jsx)(o.azJ,{sx:{padding:"15px",height:"100%"},children:"logger_webhook"===t.configuration_id||"audit_webhook"===t.configuration_id?(0,x.jsx)(j,{WebhookSettingslist:w,setResetConfigurationOpen:B,type:t.configuration_id}):(0,x.jsx)(i.Fragment,{children:(0,x.jsxs)("form",{noValidate:!0,onSubmit:e=>{e.preventDefault(),_(!0)},className:n,style:{height:"100%",display:"flex",flexFlow:"column"},children:[(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{display:"grid",gridTemplateColumns:"1fr",gap:"10px"},children:(0,x.jsx)(k.default,{fields:a.PE[t.configuration_id],onChange:M,defaultVals:E,overrideEnv:L})}),(0,x.jsxs)(o.xA9,{item:!0,xs:12,sx:{paddingTop:"15px ",textAlign:"right",maxHeight:"60px",display:"flex",alignItems:"center",justifyContent:"flex-end"},children:[(0,x.jsx)(o.$nd,{type:"button",id:"restore-defaults",variant:"secondary",onClick:B,label:"Restore Defaults"}),"\xa0 \xa0",(0,x.jsx)(o.$nd,{id:"save",type:"submit",variant:"callAction",disabled:y,label:"Save"})]})]})})})]})})},E=()=>{const{pathname:e=""}=(0,l.zy)(),t=e.substring(e.lastIndexOf("/")+1),n=a.Ck.find((e=>e.configuration_id===t)),i="".concat(t);return(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{height:"100%","& .identity_ldap, .api":{"& label":{minWidth:220,marginRight:0}}},children:n&&(0,x.jsx)(_,{className:"".concat(i),selectedConfiguration:n})})};var S=n(99161),w=n(48793),A=n(25448),T=n(56483),q=n(24241),L=n(6681);const R=()=>{const e=(0,c.wA)(),[t,n]=(0,A.A)((e=>{(0,T.OT)(new Blob([window.atob(e.value)]),"minio-server-config-".concat(q.c9.now().toFormat("LL-dd-yyyy-HH-mm-ss"),".conf"))}),(t=>{e((0,p.C9)(t))}));return(0,x.jsx)(L.A,{tooltip:"Warning! The resulting file will contain server configuration information in plain text",children:(0,x.jsx)(o.$nd,{id:"export-config",onClick:()=>{n("GET","api/v1/configs/export")},icon:(0,x.jsx)(o.JMY,{}),label:"Export",variant:"regular",disabled:t})})},I=()=>{const e=(0,l.Zp)(),t=(0,c.wA)(),n=(0,c.d4)((e=>e.system.serverNeedsRestart)),[a,r]=(0,i.useState)(void 0),s=(0,i.useRef)(null),[d,u]=(0,A.A)((e=>{t((0,p.YR)(!0)),r(!0)}),(e=>{t((0,p.C9)(e))}));(0,i.useEffect)((()=>{!n&&a&&e(0)}),[n,a,e]);return(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)("input",{type:"file",onChange:e=>{if(null===e||void 0===e||null===e.target.files||void 0===e.target.files)return;e.preventDefault();const[t]=e.target.files,n=new FormData,i=new Blob([t],{type:t.type});n.append("file",i,t.name),u("POST","api/v1/configs/import",n),e.target.value=""},style:{display:"none"},ref:s}),(0,x.jsx)(L.A,{tooltip:"The file must be valid and should have valid config values",children:(0,x.jsx)(o.$nd,{id:"import-config",onClick:()=>{s&&s.current&&s.current.click()},icon:(0,x.jsx)(o.s3U,{}),label:"Import",variant:"regular",disabled:d})})]})};var M=n(55968);const B=["region"],D=["cache"],F=()=>{const{pathname:e=""}=(0,l.zy)(),t=(0,m.jL)(),n=(0,l.Zp)(),[r,s]=(0,i.useState)([]),c=(0,i.useCallback)((async()=>{d.F.configs.listConfig().then((e=>{var t;if(e&&null!==e&&void 0!==e&&e.data&&null!==e&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&t.configurations){var n;const t=((null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.configurations)||[]).reduce(((e,t)=>{let{key:n=""}=t;return D.includes(n)||e.push(n),e}),[]);s(t)}})).catch((e=>{t((0,p.C9)((0,u.S)(e)))}))}),[t]);(0,i.useEffect)((()=>{c(),t((0,p.ph)("settings_Region"))}),[]);const h=a.Ck.filter((e=>{let{configuration_id:t}=e;return B.includes(t)||r.includes(t)||!r.length}));return(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)(w.A,{label:"Configuration",actions:(0,x.jsx)(M.A,{})}),(0,x.jsxs)(o.Mxu,{children:[(0,x.jsxs)(o.xA9,{item:!0,xs:12,id:"settings-container",children:[(0,x.jsx)(o.lcx,{icon:(0,x.jsx)(o.Zes,{}),title:"MinIO Configuration:",actions:(0,x.jsxs)(o.azJ,{sx:{display:"flex",gap:10},children:[(0,x.jsx)(I,{}),(0,x.jsx)(R,{})]}),sx:{marginBottom:15}}),(0,x.jsx)(o.tUM,{currentTabOrPath:e,onTabClick:e=>{n(e)},useRouteTabs:!0,options:h.map((e=>{const{configuration_id:t,configuration_label:n,icon:i}=e;return{tabConfig:{id:"settings-tab-".concat(n),label:n,value:t,icon:i,to:(o=t,"".concat(S.zZ.SETTINGS,"/").concat(o))}};var o})),routes:(0,x.jsxs)(l.BV,{children:[h.map((e=>(0,x.jsx)(l.qh,{path:"".concat(e.configuration_id),element:(0,x.jsx)(E,{})},"configItem-".concat(e.configuration_label)))),(0,x.jsx)(l.qh,{path:"/",element:(0,x.jsx)(l.C5,{to:"".concat(S.zZ.SETTINGS,"/region")})})]})})]}),(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{paddingTop:"15px"},children:(0,x.jsx)(o.lVp,{title:"Learn more about Configurations",iconComponent:(0,x.jsx)(o.Zes,{}),help:(0,x.jsxs)(i.Fragment,{children:["MinIO supports a variety of configurations ranging from encryption, compression, region, notifications, etc.",(0,x.jsx)("br",{}),(0,x.jsx)("br",{}),"You can learn more at our"," ",(0,x.jsx)("a",{href:"https://min.io/docs/minio/linux/reference/minio-mc-admin/mc-admin-config.html?ref=con#id4",target:"_blank",rel:"noopener",children:"documentation"}),"."]})})})]})]})}},45479:(e,t,n)=>{n.d(t,{Ck:()=>a,PE:()=>l,Qm:()=>s,Xm:()=>r,uu:()=>c});n(65043);var i=n(89923),o=n(70579);const a=[{icon:(0,o.jsx)(i.DzZ,{}),configuration_id:"region",configuration_label:"Region"},{icon:(0,o.jsx)(i.MZJ,{}),configuration_id:"compression",configuration_label:"Compression"},{icon:(0,o.jsx)(i.loI,{}),configuration_id:"api",configuration_label:"API"},{icon:(0,o.jsx)(i.qm4,{}),configuration_id:"heal",configuration_label:"Heal"},{icon:(0,o.jsx)(i.Pq3,{}),configuration_id:"scanner",configuration_label:"Scanner"},{icon:(0,o.jsx)(i.RYV,{}),configuration_id:"etcd",configuration_label:"Etcd"},{icon:(0,o.jsx)(i.D0K,{}),configuration_id:"logger_webhook",configuration_label:"Logger Webhook"},{icon:(0,o.jsx)(i.rBG,{}),configuration_id:"audit_webhook",configuration_label:"Audit Webhook"},{icon:(0,o.jsx)(i.Dk$,{}),configuration_id:"audit_kafka",configuration_label:"Audit Kafka"}],l={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, e.g. 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, e.g. 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"}],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"}],audit_kafka:[{name:"enable",required:!1,label:"Enable",tooltip:"Enable audit_kafka target",type:"on|off",customValueProcess:e=>""===e||"on"===e?"on":"off"},{name:"brokers",required:!0,label:"Brokers",type:"csv",placeholder:"Enter Kafka Broker"},{name:"topic",required:!1,label:"Topic",type:"string",placeholder:"Enter Kafka Topic",tooltip:"Kafka topic used for bucket notifications"},{name:"sasl",required:!1,label:"Use SASL",tooltip:"Enable SASL (Simple Authentication and Security Layer) authentication",type:"on|off"},{name:"sasl_username",required:!1,label:"SASL Username",type:"string",placeholder:"Enter SASL Username",tooltip:"Username for SASL/PLAIN or SASL/SCRAM authentication"},{name:"sasl_password",required:!1,label:"SASL Password",type:"password",placeholder:"Enter SASL Password",tooltip:"Password for SASL/PLAIN or SASL/SCRAM authentication"},{name:"sasl_mechanism",required:!1,label:"SASL Mechanism",type:"string",placeholder:"Enter SASL Mechanism",tooltip:"SASL authentication mechanism"},{name:"tls",required:!1,label:"Use TLS",tooltip:"Enable TLS (Transport Layer Security)",type:"on|off"},{name:"tls_skip_verify",required:!1,label:"Skip TLS Verification",tooltip:"Trust server TLS without verification",type:"on|off"},{name:"client_tls_cert",required:!1,label:"Client Cert",tooltip:"Client cert for mTLS authentication",type:"string",placeholder:"Enter Client Cert"},{name:"client_tls_key",required:!1,label:"Client Cert Key",tooltip:"Client cert key for mTLS authentication",type:"string",placeholder:"Enter Client Cert Key"},{name:"tls_client_auth",required:!1,label:"TLS Client Auth",tooltip:"ClientAuth determines the Kafka server's policy for TLS client authorization",type:"string"},{name:"version",required:!1,label:"Version",tooltip:"Specify the version of the Kafka cluster",type:"string"}]},r=e=>e.filter((e=>""!==e.value)),s=(e,t,n)=>{const i=e.target,o=i.value;let a=[...n];return i.checked?a.push(o):a=a.filter((e=>e!==o)),t(a),a},c=e=>{let t={};return e.forEach((e=>{if(e.env_override){const n={value:e.env_override.value||"",overrideEnv:e.env_override.name||""};t={...t,[e.key]:n}}})),t}},5128:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s,valueDef:()=>r});var i=n(65043),o=n(89923),a=n(12848),l=n(70579);const r=(e,t,n)=>{let i="on|off"===t?"off":"";if(n.length>0){const t=n.find((t=>t.key===e));t&&(i=t.value||"")}return i},s=e=>{let{onChange:t,fields:n,defaultVals:s,overrideEnv:c}=e;const[d,u]=(0,i.useState)([]),p=n||[],m=s||[];(0,i.useEffect)((()=>{const e=n.map((e=>({key:e.name,value:r(e.name,e.type,m)})));u(e)}),[n,s]),(0,i.useEffect)((()=>{t(d)}),[d]);const h=(e,t,n)=>{const i=[...d];t=t.trim(),i[n]={key:e,value:t},u(i)},f=(e,t)=>{const n=d[t];if(n){const t=null===c||void 0===c?void 0:c["".concat(n.key)];if(t)return(0,l.jsx)(o.EmB,{label:e.label,actionButton:(0,l.jsx)(o.xA9,{item:!0,sx:{display:"flex",justifyContent:"flex-end",paddingRight:"10px"},children:(0,l.jsx)(o.m_M,{tooltip:"This value is set from the ".concat(t.overrideEnv," environment variable"),placement:"left",children:(0,l.jsx)(o.D0K,{style:{width:20}})})}),sx:{width:"100%"},children:t.value})}switch(e.type){case"on|off":const i=n?n.value:"off";return(0,l.jsx)(o.dOG,{onChange:n=>{const i=n.target.checked?"on":"off";h(e.name,i,t)},id:e.name,name:e.name,label:e.label,value:"switch_on",tooltip:e.tooltip,checked:"on"===i});case"csv":return(0,l.jsx)(a.A,{elements:n?n.value:"",label:e.label,name:e.name,onChange:n=>{let i="";i=Array.isArray(n)?n.join(","):n,h(e.name,i,t)},tooltip:e.tooltip,commonPlaceholder:e.placeholder,withBorder:!0});case"comment":return(0,l.jsx)(o.hFj,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:n?n.value:"",onChange:n=>h(e.name,n.target.value,t),placeholder:e.placeholder});default:return(0,l.jsx)(o.cl_,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:n?n.value:"",onChange:n=>h(e.name,n.target.value,t),placeholder:e.placeholder})}};return(0,l.jsx)(o.Hbc,{withBorders:!1,containerPadding:!1,children:p.map(((e,t)=>(0,l.jsx)(i.Fragment,{children:f(e,t)},e.name)))})}},48967:(e,t,n)=>{n.d(t,{A:()=>u});var i=n(65043),o=n(56629),a=n(53518),l=n(58661),r=n(89923),s=n(64159),c=n(21383),d=n(70579);const u=e=>{let{configurationName:t,closeResetModalAndRefresh:n,resetOpen:u}=e;const p=(0,c.jL)(),[m,h]=(0,i.useState)(!1);(0,i.useEffect)((()=>{m&&o.F.configs.resetConfig(t).then((()=>{h(!1),n(!0)})).catch((e=>{h(!1),p((0,s.C9)((0,a.S)(e.error)))}))}),[n,t,m,p]);return(0,d.jsx)(l.A,{title:"Restore Defaults",confirmText:"Yes, Reset Configuration",isOpen:u,titleIcon:(0,d.jsx)(r.xWY,{}),isLoading:m,onConfirm:()=>{h(!0)},onClose:()=>{n(!1)},confirmationContent:(0,d.jsxs)(i.Fragment,{children:[m&&(0,d.jsx)(r.z21,{}),(0,d.jsxs)(i.Fragment,{children:["Are you sure you want to restore these configurations to default values?",(0,d.jsx)("br",{}),(0,d.jsx)("b",{style:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},children:"Please note that this may cause your system to not be accessible"})]})]})})}}}]);
-//# sourceMappingURL=7052.50a0217e.chunk.js.map
\ No newline at end of file
+"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[7052,5128],{12848:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(65043),o=n(33097),a=n.n(o),l=n(89923),r=n(70579);const s=e=>{let{elements:t,name:n,label:o,tooltip:s="",commonPlaceholder:c="",onChange:d,withBorder:u=!1}=e;const[p,m]=(0,i.useState)([""]),h=(0,i.createRef)();(0,i.useEffect)((()=>{if(1===p.length&&""===p[0]&&t&&""!==t){const e=t.split(",");e.push(""),m(e)}}),[t,p]),(0,i.useEffect)((()=>{if(p.length>1){const e=h.current;e&&e.scrollIntoView(!1)}}),[p,h]);const f=(0,i.useCallback)((e=>{d(e)}),[d]),x=(0,i.useRef)(!0);(0,i.useEffect)((()=>{if(x.current)return void(x.current=!1);const e=p.filter((e=>""!==e.trim())).join(",");f(e)}),[p]);const g=e=>{e.persist();let t=[...p];const n=a()(e.target,"dataset.index","0");t[parseInt(n)]=e.target.value,m(t)},v=p.map(((e,t)=>(0,r.jsx)(l.cl_,{id:"".concat(n,"-").concat(t.toString()),label:"",name:"".concat(n,"-").concat(t.toString()),value:p[t],onChange:g,index:t,placeholder:c,overlayIcon:t===p.length-1?(0,r.jsx)(l.REV,{}):null,overlayAction:()=>{(e=>{if(""!==e[e.length-1].trim()){const t=[...e];t.push(""),m(t)}})(p)}},"csv-multi-".concat(n,"-").concat(t.toString()))));return(0,r.jsx)(i.Fragment,{children:(0,r.jsxs)(l.azJ,{sx:{display:"flex"},className:"inputItem",children:[(0,r.jsxs)(l.l1Y,{sx:{alignItems:"flex-start"},children:[(0,r.jsx)("span",{children:o}),""!==s&&(0,r.jsx)(l.azJ,{sx:{marginLeft:5,display:"flex",alignItems:"center","& .min-icon":{width:13}},children:(0,r.jsx)(l.m_M,{tooltip:s,placement:"top",children:(0,r.jsx)(l.azJ,{className:s,children:(0,r.jsx)(l.NTw,{})})})})]}),(0,r.jsxs)(l.azJ,{withBorders:u,sx:{width:"100%",overflowY:"auto",height:150,position:"relative"},children:[v,(0,r.jsx)("div",{ref:h})]})]})})}},94141:(e,t,n)=>{n.d(t,{A:()=>d});var i=n(65043),o=n(22166),a=n(89923),l=n(21383),r=n(64159),s=n(49555),c=n(70579);const d=e=>{let{onClose:t,modalOpen:n,title:d,children:u,wideLimit:p=!0,titleIcon:m=null,iconColor:h="default",sx:f}=e;const x=(0,l.jL)(),[g,v]=(0,i.useState)(!1),b=(0,o.d4)((e=>e.system.modalSnackBar));(0,i.useEffect)((()=>{x((0,r.h0)(""))}),[x]),(0,i.useEffect)((()=>{if(b){if(""===b.message)return void v(!1);"error"!==b.type&&v(!0)}}),[b]);let y="";return b&&(y=b.detailedErrorMsg,(""===y||y&&y.length<5)&&(y=b.message)),(0,c.jsxs)(a.ngX,{onClose:t,open:n,title:d,titleIcon:m,widthLimit:p,sx:f,iconColor:h,children:[(0,c.jsx)(s.A,{isModal:!0}),(0,c.jsx)(a.qb_,{onClose:()=>{v(!1),x((0,r.h0)(""))},open:g,message:y,mode:"inline",variant:"error"===b.type?"error":"default",autoHideDuration:"error"===b.type?10:5,condensed:!0}),u]})}},67052:(e,t,n)=>{n.r(t),n.d(t,{default:()=>D});var i=n(65043),o=n(89923),a=n(45479),l=n(73216),r=n(33097),s=n.n(r),c=n(22166),d=n(56629),u=n(53518),p=n(64159),m=n(21383),h=n(94141),f=n(77403),x=n(70579);const g=e=>{let{open:t,type:n,onCloseEndpoint:a}=e;const[l,r]=(0,i.useState)(""),[s,c]=(0,i.useState)(""),[g,v]=(0,i.useState)(""),[b,y]=(0,i.useState)(!1),[j,k]=(0,i.useState)(["name","endpoint"]),[C,_]=(0,i.useState)(["name","endpoint","auth-token"]),E=(0,m.jL)(),S=e=>{_(C.filter((t=>t!==e)))},w=(e,t)=>{j.includes(e)&&t?k(j.filter((t=>t!==e))):t||j.includes(e)||k([...j,e])};let A="Add new Webhook",T=(0,x.jsx)(o.XC7,{});switch(n){case"logger_webhook":A="New Logger Webhook",T=(0,x.jsx)(o.D0K,{});break;case"audit_webhook":A="New Audit Webhook",T=(0,x.jsx)(o.rBG,{})}return(0,x.jsx)(i.Fragment,{children:(0,x.jsxs)(h.A,{modalOpen:t,title:A,onClose:a,titleIcon:T,children:[(0,x.jsxs)(o.Hbc,{containerPadding:!1,withBorders:!1,children:[(0,x.jsx)(o.cl_,{id:"name",name:"name",onChange:e=>{S("name"),r(e.target.value),w("name",e.target.validity.valid)},error:j.includes("name")&&!C.includes("name")?"Invalid Name":"",label:"Name",value:l,pattern:"^(?=.*[a-zA-Z0-9]).{1,}$",required:!0}),(0,x.jsx)(o.cl_,{id:"endpoint",name:"endpoint",onChange:e=>{S("endpoint"),c(e.target.value),w("endpoint",e.target.validity.valid)},error:j.includes("endpoint")&&!C.includes("endpoint")?"Invalid Endpoint set":"",label:"Endpoint",value:s,pattern:"^(https?):\\/\\/([a-zA-Z0-9\\-.]+)(:[0-9]+)?(\\/[a-zA-Z0-9\\-.\\/]*)?$",required:!0}),(0,x.jsx)(o.cl_,{id:"auth-token",name:"auth-token",onChange:e=>{S("auth-token"),v(e.target.value)},label:"Auth Token",value:g})]}),b&&(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{marginBottom:10},children:(0,x.jsx)(o.z21,{})}),(0,x.jsxs)(o.xA9,{item:!0,xs:12,sx:f.Uz.modalButtonBar,children:[(0,x.jsx)(o.$nd,{id:"reset",type:"button",variant:"regular",disabled:b,onClick:a,label:"Cancel",sx:{marginRight:10}}),(0,x.jsx)(o.$nd,{id:"save-lifecycle",type:"submit",variant:"callAction",color:"primary",disabled:b||0!==j.length,label:"Save",onClick:()=>{if(b)return;if(0!==j.length)return;if(""===l.trim())return void k([...j,"name"]);if(""===s.trim())return void k([...j,"endpoint"]);y(!0);const e={key_values:[{key:"endpoint",value:s},{key:"auth_token",value:g}],arn_resource_id:l};d.F.configs.setConfig(n,e).then((e=>{y(!1),E((0,p.YR)(e.data.restart||!1)),e.data.restart||E((0,p.Hk)("Configuration saved successfully")),a(),E((0,p.TE)(!0))})).catch((e=>{y(!1),E((0,p.C9)((0,u.S)(e.error)))}))}})]})]})})};var v=n(58661);const b=e=>{let{modalOpen:t,onClose:n,selectedARN:a}=e;const[l,r]=(0,i.useState)(!1),s=(0,m.jL)();(0,i.useEffect)((()=>{l&&d.F.configs.resetConfig(a).then((()=>{r(!1),s((0,p.YR)(!0)),s((0,p.TE)(!0)),n()})).catch((e=>{r(!1),s((0,p.C9)((0,u.S)(e.error)))}))}),[l,s,n,a]);const c=!a.includes(":");let h="Are you sure you want to delete the Configured Endpoint";return c&&(h="Are you sure you want to reset the Default"),(0,x.jsx)(v.A,{title:c?"Reset Default Webhook":"Delete Webhook",confirmText:c?"Reset":"Delete",isOpen:t,isLoading:l,onConfirm:()=>{r(!0)},titleIcon:(0,x.jsx)(o.xWY,{}),onClose:n,confirmationContent:(0,x.jsxs)(i.Fragment,{children:["".concat(h," "),(0,x.jsx)("strong",{children:a}),"?"]})})},y=e=>{var t,n,l,r,s,c;let{open:g,type:v,endpointInfo:b,onCloseEndpoint:y}=e;const[j,k]=(0,i.useState)(""),[C,_]=(0,i.useState)(""),[E,S]=(0,i.useState)(""),[w,A]=(0,i.useState)("on"),[T,q]=(0,i.useState)(!1),[L,R]=(0,i.useState)([]),I=(0,m.jL)();(0,i.useEffect)((()=>{if(b){const e=b.key_values.find((e=>"endpoint"===e.key)),t=b.key_values.find((e=>"auth_token"===e.key)),n=b.key_values.find((e=>"enable"===e.key));let i=[];if(e){const t=e.value;""===t?i.push("endpoint"):_(t)}if(t){const e=t.value;""===e?i.push("auth-token"):S(e)}n&&"off"===n.value&&A(n.value),k(b.name||""),R(i)}}),[b]);const M=!j.includes(":"),B=b.key_values.filter((e=>!!e.env_override)),F=(0,a.uu)(B);let D="Edit Webhook",N=(0,x.jsx)(o.XC7,{});switch(v){case"logger_webhook":D="Edit ".concat(M?" the Default ":"","Logger Webhook"),N=(0,x.jsx)(o.D0K,{});break;case"audit_webhook":D="Edit ".concat(M?" the Default ":"","Audit Webhook"),N=(0,x.jsx)(o.rBG,{})}return B.length>0&&(D="View env variable Webhook"),(0,x.jsx)(i.Fragment,{children:(0,x.jsx)(h.A,{modalOpen:g,title:"".concat(D).concat(M?"":" - ".concat(j)),onClose:y,titleIcon:N,children:(0,x.jsx)(o.Hbc,{withBorders:!1,containerPadding:!1,children:B.length>0?(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)(o.EmB,{label:"Enabled",sx:{width:"100%"},actionButton:(0,x.jsx)(o.xA9,{item:!0,sx:{display:"flex",justifyContent:"flex-end",paddingRight:"10px"},children:(0,x.jsx)(o.m_M,{tooltip:F.enable?"This value is set from the ".concat((null===(t=F.enable)||void 0===t?void 0:t.overrideEnv)||"N/A"," environment variable"):"",placement:"left",children:(0,x.jsx)(o.D0K,{style:{width:20}})})}),children:(null===(n=F.enable)||void 0===n?void 0:n.value)||"-"}),(0,x.jsx)(o.EmB,{label:"Endpoint",sx:{width:"100%"},actionButton:(0,x.jsx)(o.xA9,{item:!0,sx:{display:"flex",justifyContent:"flex-end",paddingRight:"10px"},children:(0,x.jsx)(o.m_M,{tooltip:F.enable?"This value is set from the ".concat((null===(l=F.endpoint)||void 0===l?void 0:l.overrideEnv)||"N/A"," environment variable"):"",placement:"left",children:(0,x.jsx)(o.D0K,{style:{width:20}})})}),children:(null===(r=F.endpoint)||void 0===r?void 0:r.value)||"-"}),(0,x.jsx)(o.EmB,{label:"Auth Token",sx:{width:"100%"},actionButton:(0,x.jsx)(o.xA9,{item:!0,sx:{display:"flex",justifyContent:"flex-end",paddingRight:"10px"},children:(0,x.jsx)(o.m_M,{tooltip:F.enable?"This value is set from the ".concat((null===(s=F.auth_token)||void 0===s?void 0:s.overrideEnv)||"N/A"," environment variable"):"",placement:"left",children:(0,x.jsx)(o.D0K,{style:{width:20}})})}),children:(null===(c=F.auth_token)||void 0===c?void 0:c.value)||"-"})]}):(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)(o.dOG,{onChange:e=>{const t=e.target.checked?"on":"off";A(t)},id:"endpoint_enabled",name:"endpoint_enabled",label:"Enabled",value:"switch_on",checked:"on"===w}),(0,x.jsx)(o.cl_,{id:"endpoint",name:"endpoint",onChange:e=>{_(e.target.value),((e,t)=>{L.includes(e)&&t?R(L.filter((t=>t!==e))):t||L.includes(e)||R([...L,e])})("endpoint",e.target.validity.valid)},error:L.includes("endpoint")?"Invalid Endpoint set":"",label:"Endpoint",value:C,pattern:"^(https?):\\/\\/([a-zA-Z0-9\\-.]+)(:[0-9]+)?(\\/[a-zA-Z0-9\\-.\\/]*)?$",required:!0}),(0,x.jsx)(o.cl_,{id:"auth-token",name:"auth-token",onChange:e=>{S(e.target.value)},label:"Auth Token",value:E}),T&&(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{marginBottom:10},children:(0,x.jsx)(o.z21,{})}),(0,x.jsxs)(o.xA9,{item:!0,sx:f.Uz.modalButtonBar,children:[(0,x.jsx)(o.$nd,{id:"reset",type:"button",variant:"regular",disabled:T,onClick:y,label:"Cancel"}),(0,x.jsx)(o.$nd,{id:"save-lifecycle",type:"submit",variant:"callAction",color:"primary",disabled:T||0!==L.length,label:"Update",onClick:()=>{if(T)return;if(0!==L.length)return;if(!C||""===C.trim())return void R([...L,"endpoint"]);q(!0);const e={key_values:[{key:"endpoint",value:C},{key:"auth_token",value:E},{key:"enable",value:w}]};d.F.configs.setConfig(j,e).then((e=>{q(!1),I((0,p.YR)(e.data.restart||!1)),e.data.restart||I((0,p.Hk)("Configuration saved successfully")),y(),I((0,p.TE)(!0))})).catch((e=>{q(!1),I((0,p.C9)((0,u.S)(e.error)))}))}})]})]})})})})},j=e=>{let{setResetConfigurationOpen:t,WebhookSettingslist:n,type:a}=e;const[l,r]=(0,i.useState)(!1),[s,c]=(0,i.useState)(!1),[d,u]=(0,i.useState)(!1),[p,m]=(0,i.useState)(""),[h,f]=(0,i.useState)(null),v=[{type:"view",onClick:e=>{e.name&&(u(!0),f(e))}},{type:"delete",onClick:e=>{e.name&&(c(!0),m(e.name))},disableButtonFunction:e=>{const t=n.find((t=>t.name===e));if(t){var i;const e=null===(i=t.key_values)||void 0===i?void 0:i.filter((e=>!!e.env_override));return!!(e&&e.length>0)}return!1}}];return(0,x.jsxs)(o.xA9,{container:!0,children:[l&&(0,x.jsx)(g,{open:l,type:a,onCloseEndpoint:()=>{r(!1)}}),s&&(0,x.jsx)(b,{modalOpen:s,onClose:()=>{c(!1),m("")},selectedARN:p,type:a}),d&&h&&(0,x.jsx)(y,{open:d,type:a,endpointInfo:h,onCloseEndpoint:()=>{u(!1),f(null)}}),(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{display:"flex",justifyContent:"flex-end"},children:(0,x.jsx)(o.$nd,{id:"newWebhook",variant:"callAction",onClick:()=>{r(!0)},children:"New Endpoint"})}),(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{padding:"0 10px 10px"},children:(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)("h3",{children:"Currently Configured Endpoints"}),(0,x.jsx)(o.bQt,{columns:[{label:"Status",elementKey:"key_values",renderFunction:e=>{const t=e.find((e=>"enable"===e.key));if(null!==t&&void 0!==t&&t.env_override){const e=null!==t&&void 0!==t&&t.env_override.value&&"on"!==(null===t||void 0===t?void 0:t.env_override.value)&&null!==t&&void 0!==t&&t.env_override.value?"Disabled":"Enabled";return(0,x.jsxs)(o.xA9,{container:!0,sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyItems:"start",fontSize:"8px"},children:[(0,x.jsx)(o.D0K,{style:{fill:"#052F51",width:"14px"}}),e?"Enabled":"Disabled"]})}return t&&"on"!==t.value&&t.value?(0,x.jsxs)(o.xA9,{container:!0,sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyItems:"start",fontSize:"8px"},children:[(0,x.jsx)(o.lgW,{style:{fill:"#C83B51",width:14,height:14}}),"Disabled"]}):(0,x.jsxs)(o.xA9,{container:!0,sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyItems:"start",fontSize:"8px"},children:[(0,x.jsx)(o.JrA,{style:{fill:"#4CCB92",width:14,height:14}}),"Enabled"]})},width:50},{label:"Name",elementKey:"name"},{label:"Endpoint",elementKey:"key_values",renderFunction:e=>{const t=e.find((e=>"endpoint"===e.key));return t?t.env_override?t.env_override.value:t.value:""}}],itemActions:v,idField:"name",isLoading:!1,records:n,entityName:"endpoints",customPaperHeight:"calc(100vh - 750px)"})]})})]})};var k=n(5128),C=n(48967);const _=e=>{let{selectedConfiguration:t,className:n=""}=e;const r=(0,m.jL)(),h=(0,l.Zp)(),{pathname:f=""}=(0,l.zy)();let g=f.substring(f.lastIndexOf("/")+1);g="settings"===g?"region":g;const[v,b]=(0,i.useState)([]),[y,_]=(0,i.useState)(!1),[E,S]=(0,i.useState)([]),[w,A]=(0,i.useState)([]),[T,q]=(0,i.useState)(!1),[L,R]=(0,i.useState)({}),I=(0,c.d4)((e=>e.system.loadingConfigurations));(0,i.useEffect)((()=>{r((0,p.TE)(!0))}),[g,r]),(0,i.useEffect)((()=>{if(I){const e=s()(t,"configuration_id",!1);if(e)return void d.F.configs.configInfo(e).then((t=>{A(t.data);let n=s()(t.data[0],"key_values",[]);const i=a.PE[e].map((e=>{const t=n.find((t=>t.key===e.name)),i=(null===t||void 0===t?void 0:t.value)||"";return{key:e.name,value:e.customValueProcess?e.customValueProcess(i):i,env_override:null===t||void 0===t?void 0:t.env_override}}));S(i),R((0,a.uu)(i)),r((0,p.TE)(!1))})).catch((e=>{r((0,p.TE)(!1)),r((0,p.C9)((0,u.S)(e.error)))}));r((0,p.TE)(!1))}}),[I,t,r]),(0,i.useEffect)((()=>{if(y){const e={key_values:(0,a.Xm)(v)};d.F.configs.setConfig(t.configuration_id,e).then((e=>{_(!1),r((0,p.YR)(e.data.restart||!1)),r((0,p.TE)(!0)),e.data.restart||r((0,p.Hk)("Configuration saved successfully"))})).catch((e=>{_(!1),r((0,p.C9)((0,u.S)(e.error)))}))}}),[y,r,t,v,h]);const M=(0,i.useCallback)((e=>{b(e)}),[b]),B=()=>{q(!0)};return(0,x.jsx)(i.Fragment,{children:(0,x.jsxs)("div",{onMouseMove:()=>{r((0,p.ph)("settings_".concat(t.configuration_label)))},children:[T&&(0,x.jsx)(C.A,{configurationName:t.configuration_id,closeResetModalAndRefresh:e=>{q(!1),r((0,p.YR)(e)),e&&r((0,p.TE)(!0))},resetOpen:T}),I?(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{textAlign:"center",paddingTop:"15px"},children:(0,x.jsx)(o.aHM,{})}):(0,x.jsx)(o.azJ,{sx:{padding:"15px",height:"100%"},children:"logger_webhook"===t.configuration_id||"audit_webhook"===t.configuration_id?(0,x.jsx)(j,{WebhookSettingslist:w,setResetConfigurationOpen:B,type:t.configuration_id}):(0,x.jsx)(i.Fragment,{children:(0,x.jsxs)("form",{noValidate:!0,onSubmit:e=>{e.preventDefault(),_(!0)},className:n,style:{height:"100%",display:"flex",flexFlow:"column"},children:[(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{display:"grid",gridTemplateColumns:"1fr",gap:"10px"},children:(0,x.jsx)(k.default,{fields:a.PE[t.configuration_id],onChange:M,defaultVals:E,overrideEnv:L})}),(0,x.jsxs)(o.xA9,{item:!0,xs:12,sx:{paddingTop:"15px ",textAlign:"right",maxHeight:"60px",display:"flex",alignItems:"center",justifyContent:"flex-end"},children:[(0,x.jsx)(o.$nd,{type:"button",id:"restore-defaults",variant:"secondary",onClick:B,label:"Restore Defaults"}),"\xa0 \xa0",(0,x.jsx)(o.$nd,{id:"save",type:"submit",variant:"callAction",disabled:y,label:"Save"})]})]})})})]})})},E=()=>{const{pathname:e=""}=(0,l.zy)(),t=e.substring(e.lastIndexOf("/")+1),n=a.Ck.find((e=>e.configuration_id===t)),i="".concat(t);return(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{height:"100%","& .identity_ldap, .api":{"& label":{minWidth:220,marginRight:0}}},children:n&&(0,x.jsx)(_,{className:"".concat(i),selectedConfiguration:n})})};var S=n(99161),w=n(48793),A=n(25448),T=n(56483),q=n(24241),L=n(6681);const R=()=>{const e=(0,c.wA)(),[t,n]=(0,A.A)((e=>{(0,T.OT)(new Blob([window.atob(e.value)]),"minio-server-config-".concat(q.c9.now().toFormat("LL-dd-yyyy-HH-mm-ss"),".conf"))}),(t=>{e((0,p.C9)(t))}));return(0,x.jsx)(L.A,{tooltip:"Warning! The resulting file will contain server configuration information in plain text",children:(0,x.jsx)(o.$nd,{id:"export-config",onClick:()=>{n("GET","api/v1/configs/export")},icon:(0,x.jsx)(o.JMY,{}),label:"Export",variant:"regular",disabled:t})})},I=()=>{const e=(0,l.Zp)(),t=(0,c.wA)(),n=(0,c.d4)((e=>e.system.serverNeedsRestart)),[a,r]=(0,i.useState)(void 0),s=(0,i.useRef)(null),[d,u]=(0,A.A)((e=>{t((0,p.YR)(!0)),r(!0)}),(e=>{t((0,p.C9)(e))}));(0,i.useEffect)((()=>{!n&&a&&e(0)}),[n,a,e]);return(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)("input",{type:"file",onChange:e=>{if(null===e||void 0===e||null===e.target.files||void 0===e.target.files)return;e.preventDefault();const[t]=e.target.files,n=new FormData,i=new Blob([t],{type:t.type});n.append("file",i,t.name),u("POST","api/v1/configs/import",n),e.target.value=""},style:{display:"none"},ref:s}),(0,x.jsx)(L.A,{tooltip:"The file must be valid and should have valid config values",children:(0,x.jsx)(o.$nd,{id:"import-config",onClick:()=>{s&&s.current&&s.current.click()},icon:(0,x.jsx)(o.s3U,{}),label:"Import",variant:"regular",disabled:d})})]})};var M=n(55968);const B=["region"],F=["cache"],D=()=>{const{pathname:e=""}=(0,l.zy)(),t=(0,m.jL)(),n=(0,l.Zp)(),[r,s]=(0,i.useState)([]),c=(0,i.useCallback)((async()=>{d.F.configs.listConfig().then((e=>{var t;if(e&&null!==e&&void 0!==e&&e.data&&null!==e&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&t.configurations){var n;const t=((null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.configurations)||[]).reduce(((e,t)=>{let{key:n=""}=t;return F.includes(n)||e.push(n),e}),[]);s(t)}})).catch((e=>{t((0,p.C9)((0,u.S)(e)))}))}),[t]);(0,i.useEffect)((()=>{c(),t((0,p.ph)("settings_Region"))}),[]);const h=a.Ck.filter((e=>{let{configuration_id:t}=e;return B.includes(t)||r.includes(t)||!r.length}));return(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)(w.A,{label:"Configuration",actions:(0,x.jsx)(M.A,{})}),(0,x.jsxs)(o.Mxu,{children:[(0,x.jsxs)(o.xA9,{item:!0,xs:12,id:"settings-container",children:[(0,x.jsx)(o.lcx,{icon:(0,x.jsx)(o.Zes,{}),title:"MinIO Configuration:",actions:(0,x.jsxs)(o.azJ,{sx:{display:"flex",gap:10},children:[(0,x.jsx)(I,{}),(0,x.jsx)(R,{})]}),sx:{marginBottom:15}}),(0,x.jsx)(o.tUM,{currentTabOrPath:e,onTabClick:e=>{n(e)},useRouteTabs:!0,options:h.map((e=>{const{configuration_id:t,configuration_label:n,icon:i}=e;return{tabConfig:{id:"settings-tab-".concat(n),label:n,value:t,icon:i,to:(o=t,"".concat(S.zZ.SETTINGS,"/").concat(o))}};var o})),routes:(0,x.jsxs)(l.BV,{children:[h.map((e=>(0,x.jsx)(l.qh,{path:"".concat(e.configuration_id),element:(0,x.jsx)(E,{})},"configItem-".concat(e.configuration_label)))),(0,x.jsx)(l.qh,{path:"/",element:(0,x.jsx)(l.C5,{to:"".concat(S.zZ.SETTINGS,"/region")})})]})})]}),(0,x.jsx)(o.xA9,{item:!0,xs:12,sx:{paddingTop:"15px"},children:(0,x.jsx)(o.lVp,{title:"Learn more about Configurations",iconComponent:(0,x.jsx)(o.Zes,{}),help:(0,x.jsxs)(i.Fragment,{children:["MinIO supports a variety of configurations ranging from encryption, compression, region, notifications, etc.",(0,x.jsx)("br",{}),(0,x.jsx)("br",{}),"You can learn more at our"," ",(0,x.jsx)("a",{href:"https://min.io/docs/minio/linux/reference/minio-mc-admin/mc-admin-config.html?ref=con#id4",target:"_blank",rel:"noopener",children:"documentation"}),"."]})})})]})]})}},45479:(e,t,n)=>{n.d(t,{Ck:()=>a,PE:()=>l,Qm:()=>s,Xm:()=>r,uu:()=>c});n(65043);var i=n(89923),o=n(70579);const a=[{icon:(0,o.jsx)(i.DzZ,{}),configuration_id:"region",configuration_label:"Region"},{icon:(0,o.jsx)(i.MZJ,{}),configuration_id:"compression",configuration_label:"Compression"},{icon:(0,o.jsx)(i.loI,{}),configuration_id:"api",configuration_label:"API"},{icon:(0,o.jsx)(i.qm4,{}),configuration_id:"heal",configuration_label:"Heal"},{icon:(0,o.jsx)(i.Pq3,{}),configuration_id:"scanner",configuration_label:"Scanner"},{icon:(0,o.jsx)(i.RYV,{}),configuration_id:"etcd",configuration_label:"Etcd"},{icon:(0,o.jsx)(i.D0K,{}),configuration_id:"logger_webhook",configuration_label:"Logger Webhook"},{icon:(0,o.jsx)(i.rBG,{}),configuration_id:"audit_webhook",configuration_label:"Audit Webhook"},{icon:(0,o.jsx)(i.Dk$,{}),configuration_id:"audit_kafka",configuration_label:"Audit Kafka"}],l={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, e.g. 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, e.g. 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"}],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"}],audit_kafka:[{name:"enable",required:!1,label:"Enable",tooltip:"Enable audit_kafka target",type:"on|off",customValueProcess:e=>""===e||"on"===e?"on":"off"},{name:"brokers",required:!0,label:"Brokers",type:"csv",placeholder:"Enter Kafka Broker"},{name:"topic",required:!1,label:"Topic",type:"string",placeholder:"Enter Kafka Topic",tooltip:"Kafka topic used for bucket notifications"},{name:"sasl",required:!1,label:"Use SASL",tooltip:"Enable SASL (Simple Authentication and Security Layer) authentication",type:"on|off"},{name:"sasl_username",required:!1,label:"SASL Username",type:"string",placeholder:"Enter SASL Username",tooltip:"Username for SASL/PLAIN or SASL/SCRAM authentication"},{name:"sasl_password",required:!1,label:"SASL Password",type:"password",placeholder:"Enter SASL Password",tooltip:"Password for SASL/PLAIN or SASL/SCRAM authentication"},{name:"sasl_mechanism",required:!1,label:"SASL Mechanism",type:"string",placeholder:"Enter SASL Mechanism",tooltip:"SASL authentication mechanism"},{name:"tls",required:!1,label:"Use TLS",tooltip:"Enable TLS (Transport Layer Security)",type:"on|off"},{name:"tls_skip_verify",required:!1,label:"Skip TLS Verification",tooltip:"Trust server TLS without verification",type:"on|off"},{name:"client_tls_cert",required:!1,label:"Client Cert",tooltip:"Client cert for mTLS authentication",type:"string",placeholder:"Enter Client Cert"},{name:"client_tls_key",required:!1,label:"Client Cert Key",tooltip:"Client cert key for mTLS authentication",type:"string",placeholder:"Enter Client Cert Key"},{name:"tls_client_auth",required:!1,label:"TLS Client Auth",tooltip:"ClientAuth determines the Kafka server's policy for TLS client authorization",type:"string"},{name:"version",required:!1,label:"Version",tooltip:"Specify the version of the Kafka cluster",type:"string"}]},r=e=>e.filter((e=>""!==e.value)),s=(e,t,n)=>{const i=e.target,o=i.value;let a=[...n];return i.checked?a.push(o):a=a.filter((e=>e!==o)),t(a),a},c=e=>{let t={};return e.forEach((e=>{if(e.env_override){const n={value:e.env_override.value||"",overrideEnv:e.env_override.name||""};t={...t,[e.key]:n}}})),t}},5128:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var i=n(65043),o=n(89923),a=n(12848),l=n(70579);const r=(e,t,n)=>{let i="on|off"===t?"off":"";if(n.length>0){const t=n.find((t=>t.key===e));t&&(i=t.value||"")}return i},s=e=>{let{onChange:t,fields:n,defaultVals:s,overrideEnv:c}=e;const[d,u]=(0,i.useState)([]),p=n||[],m=s||[];(0,i.useEffect)((()=>{const e=n.map((e=>({key:e.name,value:r(e.name,e.type,m)})));u(e)}),[n,s]),(0,i.useEffect)((()=>{t(d)}),[d]);const h=(e,t,n)=>{const i=[...d];t=t.trim(),i[n]={key:e,value:t},u(i)},f=(e,t)=>{const n=d[t];if(n){const t=null===c||void 0===c?void 0:c["".concat(n.key)];if(t)return(0,l.jsx)(o.EmB,{label:e.label,actionButton:(0,l.jsx)(o.xA9,{item:!0,sx:{display:"flex",justifyContent:"flex-end",paddingRight:"10px"},children:(0,l.jsx)(o.m_M,{tooltip:"This value is set from the ".concat(t.overrideEnv," environment variable"),placement:"left",children:(0,l.jsx)(o.D0K,{style:{width:20}})})}),sx:{width:"100%"},children:t.value})}switch(e.type){case"on|off":const i=n?n.value:"off";return(0,l.jsx)(o.dOG,{onChange:n=>{const i=n.target.checked?"on":"off";h(e.name,i,t)},id:e.name,name:e.name,label:e.label,value:"switch_on",tooltip:e.tooltip,checked:"on"===i});case"csv":return(0,l.jsx)(a.A,{elements:n?n.value:"",label:e.label,name:e.name,onChange:n=>{let i="";i=Array.isArray(n)?n.join(","):n,h(e.name,i,t)},tooltip:e.tooltip,commonPlaceholder:e.placeholder,withBorder:!0});case"comment":return(0,l.jsx)(o.hFj,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:n?n.value:"",onChange:n=>h(e.name,n.target.value,t),placeholder:e.placeholder});default:return(0,l.jsx)(o.cl_,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:n?n.value:"",onChange:n=>h(e.name,n.target.value,t),placeholder:e.placeholder})}};return(0,l.jsx)(o.Hbc,{withBorders:!1,containerPadding:!1,children:p.map(((e,t)=>(0,l.jsx)(i.Fragment,{children:f(e,t)},e.name)))})}},48967:(e,t,n)=>{n.d(t,{A:()=>u});var i=n(65043),o=n(56629),a=n(53518),l=n(58661),r=n(89923),s=n(64159),c=n(21383),d=n(70579);const u=e=>{let{configurationName:t,closeResetModalAndRefresh:n,resetOpen:u}=e;const p=(0,c.jL)(),[m,h]=(0,i.useState)(!1);(0,i.useEffect)((()=>{m&&o.F.configs.resetConfig(t).then((()=>{h(!1),n(!0)})).catch((e=>{h(!1),p((0,s.C9)((0,a.S)(e.error)))}))}),[n,t,m,p]);return(0,d.jsx)(l.A,{title:"Restore Defaults",confirmText:"Yes, Reset Configuration",isOpen:u,titleIcon:(0,d.jsx)(r.xWY,{}),isLoading:m,onConfirm:()=>{h(!0)},onClose:()=>{n(!1)},confirmationContent:(0,d.jsxs)(i.Fragment,{children:[m&&(0,d.jsx)(r.z21,{}),(0,d.jsxs)(i.Fragment,{children:["Are you sure you want to restore these configurations to default values?",(0,d.jsx)("br",{}),(0,d.jsx)("b",{style:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},children:"Please note that this may cause your system to not be accessible"})]})]})})}}}]);
+//# sourceMappingURL=7052.37bcb35a.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/7052.50a0217e.chunk.js.map b/web-app/build/static/js/7052.37bcb35a.chunk.js.map
similarity index 88%
rename from web-app/build/static/js/7052.50a0217e.chunk.js.map
rename to web-app/build/static/js/7052.37bcb35a.chunk.js.map
index ade06abb8c..d1135ad29b 100644
--- a/web-app/build/static/js/7052.50a0217e.chunk.js.map
+++ b/web-app/build/static/js/7052.37bcb35a.chunk.js.map
@@ -1 +1 @@
-{"version":3,"file":"static/js/7052.50a0217e.chunk.js","mappings":"kLAqCA,MAkJA,EAlJyBA,IAQC,IARA,SACxBC,EAAQ,KACRC,EAAI,MACJC,EAAK,QACLC,EAAU,GAAE,kBACZC,EAAoB,GAAE,SACtBC,EAAQ,WACRC,GAAa,GACKP,EAClB,MAAOQ,EAAiBC,IAAsBC,EAAAA,EAAAA,UAAmB,CAAC,KAC5DC,GAAaC,EAAAA,EAAAA,cAGnBC,EAAAA,EAAAA,YAAU,KACR,GAC6B,IAA3BL,EAAgBM,QACO,KAAvBN,EAAgB,IAChBP,GACa,KAAbA,EACA,CACA,MAAMc,EAAgBd,EAASe,MAAM,KACrCD,EAAcE,KAAK,IAEnBR,EAAmBM,EACrB,IAGC,CAACd,EAAUO,KAGdK,EAAAA,EAAAA,YAAU,KACR,GAAIL,EAAgBM,OAAS,EAAG,CAC9B,MAAM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["screens/Console/Common/FormComponents/CSVMultiSelector/CSVMultiSelector.tsx","screens/Console/Common/ModalWrapper/ModalWrapper.tsx","screens/Console/EventDestinations/WebhookSettings/AddEndpointModal.tsx","screens/Console/EventDestinations/WebhookSettings/DeleteWebhookEndpoint.tsx","screens/Console/EventDestinations/WebhookSettings/EditWebhookEndpoint.tsx","screens/Console/EventDestinations/WebhookSettings/WebhookSettings.tsx","screens/Console/EventDestinations/CustomForms/EditConfiguration.tsx","screens/Console/Configurations/ConfigurationPanels/ConfigurationForm.tsx","screens/Console/Configurations/ConfigurationPanels/ExportConfigButton.tsx","screens/Console/Configurations/ConfigurationPanels/ImportConfigButton.tsx","screens/Console/Configurations/ConfigurationPanels/ConfigurationOptions.tsx","screens/Console/Configurations/utils.tsx","screens/Console/EventDestinations/ConfTargetGeneric.tsx","screens/Console/EventDestinations/CustomForms/ResetConfigurationModal.tsx"],"sourcesContent":["// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React, {\n ChangeEvent,\n createRef,\n useCallback,\n useEffect,\n useRef,\n useState,\n Fragment,\n} from \"react\";\nimport get from \"lodash/get\";\nimport { AddIcon, Box, HelpIcon, InputBox, InputLabel, Tooltip } from \"mds\";\n\ninterface ICSVMultiSelector {\n elements: string;\n name: string;\n label: string;\n tooltip?: string;\n commonPlaceholder?: string;\n withBorder?: boolean;\n onChange: (elements: string) => void;\n}\n\nconst CSVMultiSelector = ({\n elements,\n name,\n label,\n tooltip = \"\",\n commonPlaceholder = \"\",\n onChange,\n withBorder = false,\n}: ICSVMultiSelector) => {\n const [currentElements, setCurrentElements] = useState([\"\"]);\n const bottomList = createRef();\n\n // Use effect to get the initial values from props\n useEffect(() => {\n if (\n currentElements.length === 1 &&\n currentElements[0] === \"\" &&\n elements &&\n elements !== \"\"\n ) {\n const elementsSplit = elements.split(\",\");\n elementsSplit.push(\"\");\n\n setCurrentElements(elementsSplit);\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [elements, currentElements]);\n\n // Use effect to send new values to onChange\n useEffect(() => {\n if (currentElements.length > 1) {\n const refScroll = bottomList.current;\n if (refScroll) {\n refScroll.scrollIntoView(false);\n }\n }\n }, [currentElements, bottomList]);\n\n const onChangeCallback = useCallback(\n (newString: string) => {\n onChange(newString);\n },\n [onChange],\n );\n\n // We avoid multiple re-renders / hang issue typing too fast\n const firstUpdate = useRef(true);\n useEffect(() => {\n if (firstUpdate.current) {\n firstUpdate.current = false;\n return;\n }\n const elementsString = currentElements\n .filter((element) => element.trim() !== \"\")\n .join(\",\");\n\n onChangeCallback(elementsString);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentElements]);\n\n // If the last input is not empty, we add a new one\n const addEmptyLine = (elementsUp: string[]) => {\n if (elementsUp[elementsUp.length - 1].trim() !== \"\") {\n const cpList = [...elementsUp];\n cpList.push(\"\");\n setCurrentElements(cpList);\n }\n };\n\n // Onchange function for input box, we get the dataset-index & only update that value in the array\n const onChangeElement = (e: ChangeEvent) => {\n e.persist();\n\n let updatedElement = [...currentElements];\n const index = get(e.target, \"dataset.index\", \"0\");\n const indexNum = parseInt(index);\n updatedElement[indexNum] = e.target.value;\n\n setCurrentElements(updatedElement);\n };\n\n const inputs = currentElements.map((element, index) => {\n return (\n : null}\n overlayAction={() => {\n addEmptyLine(currentElements);\n }}\n />\n );\n });\n\n return (\n \n \n \n {label}\n {tooltip !== \"\" && (\n \n \n \n \n \n \n \n )}\n \n \n {inputs}\n \n \n \n \n );\n};\nexport default CSVMultiSelector;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React, { useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { ModalBox, Snackbar } from \"mds\";\nimport { CSSObject } from \"styled-components\";\nimport { AppState, useAppDispatch } from \"../../../../store\";\nimport { setModalSnackMessage } from \"../../../../systemSlice\";\nimport MainError from \"../MainError/MainError\";\n\ninterface IModalProps {\n onClose: () => void;\n modalOpen: boolean;\n title: string | React.ReactNode;\n children: any;\n wideLimit?: boolean;\n titleIcon?: React.ReactNode;\n iconColor?: \"default\" | \"delete\" | \"accept\";\n sx?: CSSObject;\n}\n\nconst ModalWrapper = ({\n onClose,\n modalOpen,\n title,\n children,\n wideLimit = true,\n titleIcon = null,\n iconColor = \"default\",\n sx,\n}: IModalProps) => {\n const dispatch = useAppDispatch();\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n const modalSnackMessage = useSelector(\n (state: AppState) => state.system.modalSnackBar,\n );\n\n useEffect(() => {\n dispatch(setModalSnackMessage(\"\"));\n }, [dispatch]);\n\n useEffect(() => {\n if (modalSnackMessage) {\n if (modalSnackMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n if (modalSnackMessage.type !== \"error\") {\n setOpenSnackbar(true);\n }\n }\n }, [modalSnackMessage]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n dispatch(setModalSnackMessage(\"\"));\n };\n\n let message = \"\";\n\n if (modalSnackMessage) {\n message = modalSnackMessage.detailedErrorMsg;\n if (message === \"\" || (message && message.length < 5)) {\n message = modalSnackMessage.message;\n }\n }\n\n return (\n \n \n \n {children}\n \n );\n};\n\nexport default ModalWrapper;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport {\n Button,\n ConsoleIcon,\n FormLayout,\n Grid,\n InputBox,\n PendingItemsIcon,\n ProgressBar,\n WebhookIcon,\n} from \"mds\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport {\n configurationIsLoading,\n setErrorSnackMessage,\n setServerNeedsRestart,\n setSnackBarMessage,\n} from \"../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../store\";\n\nimport { modalStyleUtils } from \"../../Common/FormComponents/common/styleLibrary\";\n\ninterface IEndpointModal {\n open: boolean;\n type: string;\n onCloseEndpoint: () => void;\n}\n\nconst AddEndpointModal = ({ open, type, onCloseEndpoint }: IEndpointModal) => {\n const [name, setName] = useState(\"\");\n const [endpoint, setEndpoint] = useState(\"\");\n const [authToken, setAuthToken] = useState(\"\");\n const [saving, setSaving] = useState(false);\n const [invalidInputs, setInvalidInput] = useState([\n \"name\",\n \"endpoint\",\n ]);\n const [initialInputs, setInitialInputs] = useState([\n \"name\",\n \"endpoint\",\n \"auth-token\",\n ]);\n\n const dispatch = useAppDispatch();\n\n const saveWebhook = () => {\n if (saving) {\n return;\n }\n\n if (invalidInputs.length !== 0) {\n return;\n }\n\n if (name.trim() === \"\") {\n setInvalidInput([...invalidInputs, \"name\"]);\n\n return;\n }\n\n if (endpoint.trim() === \"\") {\n setInvalidInput([...invalidInputs, \"endpoint\"]);\n\n return;\n }\n\n setSaving(true);\n\n const payload = {\n key_values: [\n {\n key: \"endpoint\",\n value: endpoint,\n },\n {\n key: \"auth_token\",\n value: authToken,\n },\n ],\n arn_resource_id: name,\n };\n\n api.configs\n .setConfig(type, payload)\n .then((res) => {\n setSaving(false);\n dispatch(setServerNeedsRestart(res.data.restart || false));\n if (!res.data.restart) {\n dispatch(setSnackBarMessage(\"Configuration saved successfully\"));\n }\n\n onCloseEndpoint();\n dispatch(configurationIsLoading(true));\n })\n .catch((err) => {\n setSaving(false);\n dispatch(setErrorSnackMessage(errorToHandler(err.error)));\n });\n };\n\n const initializeInput = (name: string) => {\n setInitialInputs(initialInputs.filter((item) => item !== name));\n };\n\n const validateInput = (name: string, valid: boolean) => {\n if (invalidInputs.includes(name) && valid) {\n setInvalidInput(invalidInputs.filter((item) => item !== name));\n return;\n }\n\n if (!valid && !invalidInputs.includes(name)) {\n setInvalidInput([...invalidInputs, name]);\n }\n };\n\n let title = \"Add new Webhook\";\n let icon = ;\n\n switch (type) {\n case \"logger_webhook\":\n title = \"New Logger Webhook\";\n icon = ;\n break;\n case \"audit_webhook\":\n title = \"New Audit Webhook\";\n icon = ;\n break;\n }\n\n return (\n \n \n \n ) => {\n initializeInput(\"name\");\n setName(event.target.value);\n validateInput(\"name\", event.target.validity.valid);\n }}\n error={\n invalidInputs.includes(\"name\") && !initialInputs.includes(\"name\")\n ? \"Invalid Name\"\n : \"\"\n }\n label=\"Name\"\n value={name}\n pattern={\"^(?=.*[a-zA-Z0-9]).{1,}$\"}\n required\n />\n ) => {\n initializeInput(\"endpoint\");\n setEndpoint(event.target.value);\n validateInput(\"endpoint\", event.target.validity.valid);\n }}\n error={\n invalidInputs.includes(\"endpoint\") &&\n !initialInputs.includes(\"endpoint\")\n ? \"Invalid Endpoint set\"\n : \"\"\n }\n label=\"Endpoint\"\n value={endpoint}\n pattern={\n \"^(https?):\\\\/\\\\/([a-zA-Z0-9\\\\-.]+)(:[0-9]+)?(\\\\/[a-zA-Z0-9\\\\-.\\\\/]*)?$\"\n }\n required\n />\n ) => {\n initializeInput(\"auth-token\");\n setAuthToken(event.target.value);\n }}\n label=\"Auth Token\"\n value={authToken}\n />\n \n {saving && (\n \n \n \n )}\n \n \n \n \n \n \n );\n};\n\nexport default AddEndpointModal;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useState, Fragment } from \"react\";\nimport { ConfirmDeleteIcon } from \"mds\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\nimport ConfirmDialog from \"../../Common/ModalWrapper/ConfirmDialog\";\nimport {\n configurationIsLoading,\n setErrorSnackMessage,\n setServerNeedsRestart,\n} from \"../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../store\";\n\ninterface IDeleteWebhookEndpoint {\n modalOpen: boolean;\n onClose: () => void;\n selectedARN: string;\n type: string;\n}\n\nconst DeleteWebhookEndpoint = ({\n modalOpen,\n onClose,\n selectedARN,\n}: IDeleteWebhookEndpoint) => {\n const [deleteLoading, setDeleteLoading] = useState(false);\n\n const dispatch = useAppDispatch();\n\n useEffect(() => {\n if (deleteLoading) {\n api.configs\n .resetConfig(selectedARN)\n .then(() => {\n setDeleteLoading(false);\n dispatch(setServerNeedsRestart(true));\n dispatch(configurationIsLoading(true));\n onClose();\n })\n .catch((err) => {\n setDeleteLoading(false);\n dispatch(setErrorSnackMessage(errorToHandler(err.error)));\n });\n }\n }, [deleteLoading, dispatch, onClose, selectedARN]);\n\n const onConfirmDelete = () => {\n setDeleteLoading(true);\n };\n\n const defaultWH = !selectedARN.includes(\":\");\n\n let message = \"Are you sure you want to delete the Configured Endpoint\";\n\n // Main webhook, we just reset\n if (defaultWH) {\n message = \"Are you sure you want to reset the Default\";\n }\n\n return (\n }\n onClose={onClose}\n confirmationContent={\n \n {`${message} `}\n {selectedARN}?\n \n }\n />\n );\n};\n\nexport default DeleteWebhookEndpoint;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport {\n Button,\n ConsoleIcon,\n FormLayout,\n Grid,\n InputBox,\n PendingItemsIcon,\n ProgressBar,\n ReadBox,\n Switch,\n Tooltip,\n WebhookIcon,\n} from \"mds\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport { modalStyleUtils } from \"../../Common/FormComponents/common/styleLibrary\";\nimport {\n configurationIsLoading,\n setErrorSnackMessage,\n setServerNeedsRestart,\n setSnackBarMessage,\n} from \"../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../store\";\n\nimport { IConfigurationSys } from \"../../Configurations/types\";\nimport { overrideFields } from \"../../Configurations/utils\";\nimport { api } from \"api\";\nimport { errorToHandler } from \"api/errors\";\n\ninterface IEndpointModal {\n open: boolean;\n type: string;\n endpointInfo: IConfigurationSys;\n onCloseEndpoint: () => void;\n}\n\nconst EditEndpointModal = ({\n open,\n type,\n endpointInfo,\n onCloseEndpoint,\n}: IEndpointModal) => {\n const [name, setName] = useState(\"\");\n const [endpoint, setEndpoint] = useState(\"\");\n const [authToken, setAuthToken] = useState(\"\");\n const [endpointState, setEndpointState] = useState(\"on\");\n const [saving, setSaving] = useState(false);\n const [invalidInputs, setInvalidInput] = useState([]);\n\n const dispatch = useAppDispatch();\n\n useEffect(() => {\n if (endpointInfo) {\n const endpointLocate = endpointInfo.key_values.find(\n (key) => key.key === \"endpoint\",\n );\n const tokenLocate = endpointInfo.key_values.find(\n (key) => key.key === \"auth_token\",\n );\n const enable = endpointInfo.key_values.find(\n (key) => key.key === \"enable\",\n );\n\n let invalidInputs: string[] = [];\n\n if (endpointLocate) {\n const endpointValue = endpointLocate.value;\n\n if (endpointValue === \"\") {\n invalidInputs.push(\"endpoint\");\n } else {\n setEndpoint(endpointValue);\n }\n }\n\n if (tokenLocate) {\n const tokenValue = tokenLocate.value;\n\n if (tokenValue === \"\") {\n invalidInputs.push(\"auth-token\");\n } else {\n setAuthToken(tokenValue);\n }\n }\n\n if (enable) {\n if (enable.value === \"off\") {\n setEndpointState(enable.value);\n }\n }\n\n setName(endpointInfo.name || \"\");\n setInvalidInput(invalidInputs);\n }\n }, [endpointInfo]);\n\n const updateWebhook = () => {\n if (saving) {\n return;\n }\n\n if (invalidInputs.length !== 0) {\n return;\n }\n\n if (!endpoint || endpoint.trim() === \"\") {\n setInvalidInput([...invalidInputs, \"endpoint\"]);\n\n return;\n }\n\n setSaving(true);\n\n const payload = {\n key_values: [\n {\n key: \"endpoint\",\n value: endpoint,\n },\n {\n key: \"auth_token\",\n value: authToken,\n },\n {\n key: \"enable\",\n value: endpointState,\n },\n ],\n };\n\n api.configs\n .setConfig(name, payload)\n .then((res) => {\n setSaving(false);\n dispatch(setServerNeedsRestart(res.data.restart || false));\n if (!res.data.restart) {\n dispatch(setSnackBarMessage(\"Configuration saved successfully\"));\n }\n\n onCloseEndpoint();\n dispatch(configurationIsLoading(true));\n })\n .catch((err) => {\n setSaving(false);\n dispatch(setErrorSnackMessage(errorToHandler(err.error)));\n });\n };\n\n const validateInput = (name: string, valid: boolean) => {\n if (invalidInputs.includes(name) && valid) {\n setInvalidInput(invalidInputs.filter((item) => item !== name));\n return;\n }\n\n if (!valid && !invalidInputs.includes(name)) {\n setInvalidInput([...invalidInputs, name]);\n }\n };\n\n const defaultWH = !name.includes(\":\");\n const hasOverride = endpointInfo.key_values.filter(\n (itm) => !!itm.env_override,\n );\n\n const overrideValues = overrideFields(hasOverride);\n\n let title = \"Edit Webhook\";\n let icon = ;\n\n switch (type) {\n case \"logger_webhook\":\n title = `Edit ${defaultWH ? \" the Default \" : \"\"}Logger Webhook`;\n icon = ;\n break;\n case \"audit_webhook\":\n title = `Edit ${defaultWH ? \" the Default \" : \"\"}Audit Webhook`;\n icon = ;\n break;\n }\n\n if (hasOverride.length > 0) {\n title = \"View env variable Webhook\";\n }\n\n return (\n \n \n \n {hasOverride.length > 0 ? (\n \n \n \n \n \n \n }\n >\n {overrideValues.enable?.value || \"-\"}\n \n \n \n \n \n \n }\n >\n {overrideValues.endpoint?.value || \"-\"}\n \n \n \n \n \n \n }\n >\n {overrideValues.auth_token?.value || \"-\"}\n \n \n ) : (\n \n ) => {\n const value = e.target.checked ? \"on\" : \"off\";\n setEndpointState(value);\n }}\n id={\"endpoint_enabled\"}\n name={\"endpoint_enabled\"}\n label={\"Enabled\"}\n value={\"switch_on\"}\n checked={endpointState === \"on\"}\n />\n ) => {\n setEndpoint(event.target.value);\n validateInput(\"endpoint\", event.target.validity.valid);\n }}\n error={\n invalidInputs.includes(\"endpoint\")\n ? \"Invalid Endpoint set\"\n : \"\"\n }\n label=\"Endpoint\"\n value={endpoint}\n pattern={\n \"^(https?):\\\\/\\\\/([a-zA-Z0-9\\\\-.]+)(:[0-9]+)?(\\\\/[a-zA-Z0-9\\\\-.\\\\/]*)?$\"\n }\n required\n />\n ) => {\n setAuthToken(event.target.value);\n }}\n label=\"Auth Token\"\n value={authToken}\n />\n {saving && (\n \n \n \n )}\n \n \n \n \n \n )}\n \n \n \n );\n};\n\nexport default EditEndpointModal;\n","// This file is part of MinIO Console Server\n// Copyright (c) 2023 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { IConfigurationSys, IElementValue } from \"../../Configurations/types\";\nimport {\n Button,\n ConsoleIcon,\n DataTable,\n Grid,\n TierOfflineIcon,\n TierOnlineIcon,\n} from \"mds\";\nimport AddEndpointModal from \"./AddEndpointModal\";\nimport DeleteWebhookEndpoint from \"./DeleteWebhookEndpoint\";\nimport EditWebhookEndpoint from \"./EditWebhookEndpoint\";\nimport { Configuration } from \"api/consoleApi\";\n\ninterface WebhookSettingsProps {\n WebhookSettingslist: Configuration[];\n setResetConfigurationOpen: () => void;\n type: string;\n}\n\nconst WebhookSettings = ({\n setResetConfigurationOpen,\n WebhookSettingslist,\n type,\n}: WebhookSettingsProps) => {\n const [newEndpointOpen, setNewEndpointOpen] = useState(false);\n const [deleteWebhookOpen, setDeleteWebhookOpen] = useState(false);\n const [editWebhookOpen, setEditWebhookOpen] = useState(false);\n const [selectedARN, setSelectedARN] = useState(\"\");\n const [selectedEndpoint, setSelectedEndpoint] =\n useState(null);\n\n const renderEndpoint = (item: IElementValue[]) => {\n const endpointFilter = item.find((itm) => itm.key === \"endpoint\");\n\n if (endpointFilter) {\n if (endpointFilter.env_override) {\n return endpointFilter.env_override.value;\n }\n\n return endpointFilter.value;\n }\n\n return \"\";\n };\n\n const renderWebhookStatus = (item: IElementValue[]) => {\n const EnableFilter = item.find((itm) => itm.key === \"enable\");\n\n if (EnableFilter?.env_override) {\n const overrideEnabled =\n !EnableFilter?.env_override.value ||\n EnableFilter?.env_override.value === \"on\" ||\n !EnableFilter?.env_override.value\n ? \"Enabled\"\n : \"Disabled\";\n return (\n \n \n {overrideEnabled ? \"Enabled\" : \"Disabled\"}\n \n );\n }\n\n // If enable is not set, then enabled by default\n if (!EnableFilter || EnableFilter.value === \"on\" || !EnableFilter.value) {\n return (\n \n \n Enabled\n \n );\n }\n\n return (\n \n \n Disabled\n \n );\n };\n\n const onCloseDelete = () => {\n setDeleteWebhookOpen(false);\n setSelectedARN(\"\");\n };\n\n const onCloseEditWebhook = () => {\n setEditWebhookOpen(false);\n setSelectedEndpoint(null);\n };\n\n const actions = [\n {\n type: \"view\",\n onClick: (item: IConfigurationSys) => {\n if (item.name) {\n setEditWebhookOpen(true);\n setSelectedEndpoint(item);\n }\n },\n },\n {\n type: \"delete\",\n onClick: (item: IConfigurationSys) => {\n if (item.name) {\n setDeleteWebhookOpen(true);\n setSelectedARN(item.name);\n }\n },\n disableButtonFunction: (item: string) => {\n const wHook = WebhookSettingslist.find(\n (element) => element.name === item,\n );\n\n if (wHook) {\n const hasOverride = wHook.key_values?.filter(\n (itm) => !!itm.env_override,\n );\n\n // Has override values, we cannot delete.\n if (hasOverride && hasOverride.length > 0) {\n return true;\n }\n\n return false;\n }\n return false;\n },\n },\n ];\n return (\n \n {newEndpointOpen && (\n {\n setNewEndpointOpen(false);\n }}\n />\n )}\n {deleteWebhookOpen && (\n \n )}\n {editWebhookOpen && selectedEndpoint && (\n \n )}\n \n {\n setNewEndpointOpen(true);\n }}\n >\n New Endpoint\n \n \n \n \n