\ No newline at end of file
diff --git a/portal-ui/build/static/js/1260.4d240571.chunk.js b/portal-ui/build/static/js/1260.4d240571.chunk.js
deleted file mode 100644
index fe826ad59..000000000
--- a/portal-ui/build/static/js/1260.4d240571.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1260],{1260:function(t,e,o){o.r(e);o(72791);var a=o(16871),n=o(25469),r=o(45248),u=o(81207),c=o(87995),l=o(46078),i=o(80184);e.default=function(){var t=(0,n.TL)(),e=(0,a.s0)();return function(){var o=function(){(0,r.Ov)(),t((0,c.wr)(!1)),localStorage.setItem("userLoggedIn",""),localStorage.setItem("redirect-path",""),t((0,l.lX)()),e("login")},a=localStorage.getItem("auth-state");u.Z.invoke("POST","/api/v1/logout",{state:a}).then((function(){o()})).catch((function(t){console.log(t),o()}))}(),(0,i.jsx)(i.Fragment,{})}}}]);
-//# sourceMappingURL=1260.4d240571.chunk.js.map
\ No newline at end of file
diff --git a/portal-ui/build/static/js/1260.4d240571.chunk.js.map b/portal-ui/build/static/js/1260.4d240571.chunk.js.map
deleted file mode 100644
index bdcffc9fc..000000000
--- a/portal-ui/build/static/js/1260.4d240571.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/js/1260.4d240571.chunk.js","mappings":"6MAoDA,UA3BmB,WACjB,IAAMA,GAAWC,EAAAA,EAAAA,MACXC,GAAWC,EAAAA,EAAAA,MAsBjB,OArBe,WACb,IAAMC,EAAgB,YACpBC,EAAAA,EAAAA,MACAL,GAASM,EAAAA,EAAAA,KAAW,IACpBC,aAAaC,QAAQ,eAAgB,IACrCD,aAAaC,QAAQ,gBAAiB,IACtCR,GAASS,EAAAA,EAAAA,OACTP,EAAS,QACV,EACKQ,EAAQH,aAAaI,QAAQ,cACnCC,EAAAA,EAAAA,OACU,OADV,iBACoC,CAAEF,MAAAA,IACnCG,MAAK,WACJT,GACD,IACAU,OAAM,SAACC,GACNC,QAAQC,IAAIF,GACZX,GACD,GACJ,CACDc,IACO,uBACR,C","sources":["screens/LogoutPage/LogoutPage.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 { useNavigate } from \"react-router-dom\";\nimport { useAppDispatch } from \"../../store\";\nimport { ErrorResponseHandler } from \"../../common/types\";\nimport { clearSession } from \"../../common/utils\";\nimport api from \"../../common/api\";\nimport { userLogged } from \"../../systemSlice\";\nimport { resetSession } from \"../Console/consoleSlice\";\n\nconst LogoutPage = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n const logout = () => {\n const deleteSession = () => {\n clearSession();\n dispatch(userLogged(false));\n localStorage.setItem(\"userLoggedIn\", \"\");\n localStorage.setItem(\"redirect-path\", \"\");\n dispatch(resetSession());\n navigate(`login`);\n };\n const state = localStorage.getItem(\"auth-state\");\n api\n .invoke(\"POST\", `/api/v1/logout`, { state })\n .then(() => {\n deleteSession();\n })\n .catch((err: ErrorResponseHandler) => {\n console.log(err);\n deleteSession();\n });\n };\n logout();\n return <>>;\n};\n\nexport default LogoutPage;\n"],"names":["dispatch","useAppDispatch","navigate","useNavigate","deleteSession","clearSession","userLogged","localStorage","setItem","resetSession","state","getItem","api","then","catch","err","console","log","logout"],"sourceRoot":""}
\ No newline at end of file
diff --git a/portal-ui/build/static/js/1260.ded6e17b.chunk.js b/portal-ui/build/static/js/1260.ded6e17b.chunk.js
new file mode 100644
index 000000000..7e71f4b86
--- /dev/null
+++ b/portal-ui/build/static/js/1260.ded6e17b.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1260],{1260:function(t,e,o){o.r(e);o(72791);var a=o(16871),n=o(25469),u=o(45248),c=o(87995),l=o(46078),r=o(81207),i=o(7241),s=o(80184);e.default=function(){var t=(0,n.TL)(),e=(0,a.s0)();return function(){var o=function(){(0,u.Ov)(),t((0,c.wr)(!1)),localStorage.setItem("userLoggedIn",""),localStorage.setItem("redirect-path",""),t((0,l.lX)()),e("/login")},a=localStorage.getItem("auth-state");r.Z.invoke("POST","/api/v1/logout",{state:a}).then((function(){o()})).catch((function(t){console.log(t),o()}))}(),(0,s.jsx)(i.Z,{})}}}]);
+//# sourceMappingURL=1260.ded6e17b.chunk.js.map
\ No newline at end of file
diff --git a/portal-ui/build/static/js/1260.ded6e17b.chunk.js.map b/portal-ui/build/static/js/1260.ded6e17b.chunk.js.map
new file mode 100644
index 000000000..e334469a1
--- /dev/null
+++ b/portal-ui/build/static/js/1260.ded6e17b.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/js/1260.ded6e17b.chunk.js","mappings":"uNAqDA,UA3BmB,WACjB,IAAMA,GAAWC,EAAAA,EAAAA,MACXC,GAAWC,EAAAA,EAAAA,MAsBjB,OArBe,WACb,IAAMC,EAAgB,YACpBC,EAAAA,EAAAA,MACAL,GAASM,EAAAA,EAAAA,KAAW,IACpBC,aAAaC,QAAQ,eAAgB,IACrCD,aAAaC,QAAQ,gBAAiB,IACtCR,GAASS,EAAAA,EAAAA,OACTP,EAAS,SACV,EACKQ,EAAQH,aAAaI,QAAQ,cACnCC,EAAAA,EAAAA,OACU,OADV,iBACoC,CAAEF,MAAAA,IACnCG,MAAK,WACJT,GACD,IACAU,OAAM,SAACC,GACNC,QAAQC,IAAIF,GACZX,GACD,GACJ,CACDc,IACO,SAAC,IAAD,GACR,C","sources":["screens/LogoutPage/LogoutPage.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 { useNavigate } from \"react-router-dom\";\nimport { useAppDispatch } from \"../../store\";\nimport { ErrorResponseHandler } from \"../../common/types\";\nimport { clearSession } from \"../../common/utils\";\nimport { userLogged } from \"../../systemSlice\";\nimport { resetSession } from \"../Console/consoleSlice\";\nimport api from \"../../common/api\";\nimport LoadingComponent from \"../../common/LoadingComponent\";\n\nconst LogoutPage = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n const logout = () => {\n const deleteSession = () => {\n clearSession();\n dispatch(userLogged(false));\n localStorage.setItem(\"userLoggedIn\", \"\");\n localStorage.setItem(\"redirect-path\", \"\");\n dispatch(resetSession());\n navigate(`/login`);\n };\n const state = localStorage.getItem(\"auth-state\");\n api\n .invoke(\"POST\", `/api/v1/logout`, { state })\n .then(() => {\n deleteSession();\n })\n .catch((err: ErrorResponseHandler) => {\n console.log(err);\n deleteSession();\n });\n };\n logout();\n return ;\n};\n\nexport default LogoutPage;\n"],"names":["dispatch","useAppDispatch","navigate","useNavigate","deleteSession","clearSession","userLogged","localStorage","setItem","resetSession","state","getItem","api","then","catch","err","console","log","logout"],"sourceRoot":""}
\ No newline at end of file
diff --git a/portal-ui/build/static/js/1377.6fbc40f3.chunk.js b/portal-ui/build/static/js/1377.6fbc40f3.chunk.js
new file mode 100644
index 000000000..22898109f
--- /dev/null
+++ b/portal-ui/build/static/js/1377.6fbc40f3.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1377],{81377:function(u,e,n){n.r(e);n(72791);var t=n(11135),r=n(25787),s=n(44959),i=n(80184);e.default=(0,r.Z)((function(u){return(0,t.Z)({})}))((function(u){u.classes;return(0,i.jsx)(s.Z,{idpType:"openid"})}))}}]);
+//# sourceMappingURL=1377.6fbc40f3.chunk.js.map
\ No newline at end of file
diff --git a/portal-ui/build/static/js/1377.6fbc40f3.chunk.js.map b/portal-ui/build/static/js/1377.6fbc40f3.chunk.js.map
new file mode 100644
index 000000000..141675d00
--- /dev/null
+++ b/portal-ui/build/static/js/1377.6fbc40f3.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/js/1377.6fbc40f3.chunk.js","mappings":"6KAiCA,WAAeA,EAAAA,EAAAA,IANA,SAACC,GAAD,OAAkBC,EAAAA,EAAAA,GAAa,CAAC,EAAhC,GAMf,EAJgC,SAAC,GAA8C,EAA5CC,QACjC,OAAO,SAAC,IAAD,CAAmBC,QAAS,UACpC,G","sources":["screens/Console/IDP/IDPOpenIDConfigurations.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\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport IDPConfigurations from \"./IDPConfigurations\";\n\ntype IDPOpenIDConfigurationsProps = {\n classes?: any;\n};\n\nconst styles = (theme: Theme) => createStyles({});\n\nconst IDPOpenIDConfigurations = ({ classes }: IDPOpenIDConfigurationsProps) => {\n return ;\n};\n\nexport default withStyles(styles)(IDPOpenIDConfigurations);\n"],"names":["withStyles","theme","createStyles","classes","idpType"],"sourceRoot":""}
\ No newline at end of file
diff --git a/portal-ui/build/static/js/2516.5d118ef6.chunk.js b/portal-ui/build/static/js/2516.5d118ef6.chunk.js
new file mode 100644
index 000000000..d779fee55
--- /dev/null
+++ b/portal-ui/build/static/js/2516.5d118ef6.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[2516],{70827:function(e,r,t){var i=t(4942),n=t(29439),o=t(1413),a=t(72791),l=t(11135),s=t(25787),c=t(61889),d=t(64554),p=t(23814),u=t(21435),x=t(75952),h=t(16871),f=t(25469),m=t(87995),g=t(9505),y=t(32291),b=t(84669),D=t(74794),C=t(50896),Z=t(80184);r.Z=(0,s.Z)((function(e){return(0,l.Z)((0,o.Z)((0,o.Z)({},p.DF),p.oO))}))((function(e){var r=e.classes,t=e.icon,l=e.helpBox,s=e.header,p=e.backLink,j=e.title,v=e.formFields,N=e.endpoint,_=(0,o.Z)({name:{required:!0,hasError:function(e,r){return!e&&r?"Config Name is required":""},label:"Name",tooltip:"Name for identity provider configuration",placeholder:"Name",type:"text"}},v),q=(0,h.s0)(),k=(0,f.TL)(),E=(0,a.useState)({}),I=(0,n.Z)(E,2),S=I[0],P=I[1],w=(0,g.Z)((function(e){q(p),k((0,m.cN)(!0===e.restart))}),(function(e){return k((0,m.Ih)(e))})),B=(0,n.Z)(w,2),O=B[0],L=B[1];return(0,Z.jsxs)(c.ZP,{item:!0,xs:12,children:[(0,Z.jsx)(y.Z,{label:(0,Z.jsx)(b.Z,{to:p,label:s})}),(0,Z.jsx)(D.Z,{children:(0,Z.jsxs)(d.Z,{sx:{display:"grid",padding:"25px",gap:"25px",gridTemplateColumns:{md:"2fr 1.2fr",xs:"1fr"},border:"1px solid #eaeaea"},children:[(0,Z.jsxs)(d.Z,{children:[(0,Z.jsx)(C.Z,{icon:t,children:j}),(0,Z.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault();for(var r=S.name,t="",i=0,n=Object.keys(v);i.\n\nimport React, { useState } from \"react\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Box, Grid } from \"@mui/material\";\nimport {\n formFieldStyles,\n modalBasic,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport { Button } from \"mds\";\nimport { useNavigate } from \"react-router-dom\";\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport { useAppDispatch } from \"../../../store\";\nimport {\n setErrorSnackMessage,\n setServerNeedsRestart,\n} from \"../../../systemSlice\";\nimport useApi from \"../Common/Hooks/useApi\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport BackLink from \"../../../common/BackLink\";\nimport PageLayout from \"../Common/Layout/PageLayout\";\nimport SectionTitle from \"../Common/SectionTitle\";\n\ntype AddIDPConfigurationProps = {\n classes?: any;\n icon: React.ReactNode;\n helpBox: React.ReactNode;\n header: string;\n title: string;\n backLink: string;\n formFields: object;\n endpoint: string;\n};\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...formFieldStyles,\n ...modalBasic,\n });\n\nconst AddIDPConfiguration = ({\n classes,\n icon,\n helpBox,\n header,\n backLink,\n title,\n formFields,\n endpoint,\n}: AddIDPConfigurationProps) => {\n const extraFormFields = {\n name: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Config Name is required\" : \"\";\n },\n label: \"Name\",\n tooltip: \"Name for identity provider configuration\",\n placeholder: \"Name\",\n type: \"text\",\n },\n ...formFields,\n };\n\n const navigate = useNavigate();\n const dispatch = useAppDispatch();\n\n const [fields, setFields] = useState({});\n\n const onSuccess = (res: any) => {\n navigate(backLink);\n dispatch(setServerNeedsRestart(res.restart === true));\n };\n\n const onError = (err: ErrorResponseHandler) =>\n dispatch(setErrorSnackMessage(err));\n\n const [loading, invokeApi] = useApi(onSuccess, onError);\n\n const validSave = () => {\n for (const [key, value] of Object.entries(extraFormFields)) {\n if (\n value.required &&\n !(\n fields[key] !== undefined &&\n fields[key] !== null &&\n fields[key] !== \"\"\n )\n ) {\n return false;\n }\n }\n return true;\n };\n\n const resetForm = () => {\n setFields({});\n };\n\n const addRecord = (event: React.FormEvent) => {\n event.preventDefault();\n const name = fields[\"name\"];\n let input = \"\";\n for (const key of Object.keys(formFields)) {\n if (fields[key]) {\n input += `${key}=${fields[key]} `;\n }\n }\n invokeApi(\"POST\", endpoint, { name, input });\n };\n\n return (\n \n } />\n \n \n \n {title}\n \n \n {helpBox}\n \n \n \n );\n};\n\nexport default withStyles(styles)(AddIDPConfiguration);\n","import React, { Fragment } from \"react\";\n\nimport { Box } from \"@mui/material\";\nimport { HelpIconFilled } from \"../../../icons\";\n\ninterface IContent {\n icon: React.ReactNode;\n text: string;\n iconDescription: string;\n}\n\ninterface IAddIDPConfigurationHelpBoxProps {\n helpText: string;\n docLink: string;\n docText: string;\n contents: IContent[];\n}\n\nconst FeatureItem = ({\n icon,\n description,\n}: {\n icon: any;\n description: string;\n}) => {\n return (\n \n {icon}{\" \"}\n
\n \n );\n};\n\nexport default withStyles(styles)(BrowserBreadcrumbs);\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 } from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport { Menu, MenuItem } from \"@mui/material\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport { UploadFolderIcon, UploadIcon } from \"../../../../icons\";\nimport {\n IAM_SCOPES,\n permissionTooltipHelper,\n} from \"../../../../common/SecureComponent/permissions\";\nimport { hasPermission } from \"../../../../common/SecureComponent\";\nimport { Button } from \"mds\";\nimport TooltipWrapper from \"../../Common/TooltipWrapper/TooltipWrapper\";\n\ninterface IUploadFilesButton {\n uploadPath: string;\n bucketName: string;\n forceDisable?: boolean;\n uploadFileFunction: (closeFunction: () => void) => void;\n uploadFolderFunction: (closeFunction: () => void) => void;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n listUploadIcons: {\n height: 20,\n \"& .min-icon\": {\n width: 18,\n fill: \"rgba(0,0,0,0.87)\",\n },\n },\n });\n\nconst UploadFilesButton = ({\n uploadPath,\n bucketName,\n forceDisable = false,\n uploadFileFunction,\n uploadFolderFunction,\n classes,\n}: IUploadFilesButton) => {\n const [anchorEl, setAnchorEl] = React.useState(null);\n const openUploadMenu = Boolean(anchorEl);\n const handleClick = (event: React.MouseEvent) => {\n setAnchorEl(event.currentTarget);\n };\n const handleCloseUpload = () => {\n setAnchorEl(null);\n };\n\n const uploadObjectAllowed = hasPermission(uploadPath, [\n IAM_SCOPES.S3_PUT_OBJECT,\n ]);\n const uploadFolderAllowed = hasPermission(\n bucketName,\n [IAM_SCOPES.S3_PUT_OBJECT],\n false,\n true\n );\n\n const uploadEnabled: boolean = uploadObjectAllowed || uploadFolderAllowed;\n\n return (\n \n \n }\n variant={\"callAction\"}\n disabled={forceDisable || !uploadEnabled}\n />\n \n \n \n );\n};\n\nexport default withStyles(styles)(UploadFilesButton);\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 { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { Grid, IconButton } from \"@mui/material\";\nimport { ClosePanelIcon } from \"../../../../../../icons\";\nimport makeStyles from \"@mui/styles/makeStyles\";\n\ninterface IDetailsListPanel {\n open: boolean;\n className?: string;\n closePanel: () => void;\n children: React.ReactNode;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n detailsList: {\n borderColor: \"#EAEDEE\",\n borderWidth: 0,\n borderStyle: \"solid\",\n borderRadius: 3,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n width: 0,\n transitionDuration: \"0.3s\",\n overflowX: \"hidden\",\n overflowY: \"auto\",\n position: \"relative\",\n opacity: 0,\n marginLeft: -1,\n \"&.open\": {\n width: 300,\n minWidth: 300,\n borderLeftWidth: 1,\n opacity: 1,\n },\n \"@media (max-width: 799px)\": {\n \"&.open\": {\n width: \"100%\",\n minWidth: \"100%\",\n borderLeftWidth: 0,\n },\n },\n },\n closePanel: {\n position: \"absolute\",\n right: 0,\n top: 8,\n \"& .min-icon\": {\n width: 14,\n },\n },\n })\n);\n\nconst DetailsListPanel = ({\n open,\n closePanel,\n className = \"\",\n children,\n}: IDetailsListPanel) => {\n const classes = useStyles();\n\n return (\n \n \n \n \n {children}\n \n );\n};\n\nexport default DetailsListPanel;\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\nexport const months = [\n { value: \"01\", label: \"January\" },\n { value: \"02\", label: \"February\" },\n { value: \"03\", label: \"March\" },\n { value: \"04\", label: \"April\" },\n { value: \"05\", label: \"May\" },\n { value: \"06\", label: \"June\" },\n { value: \"07\", label: \"July\" },\n { value: \"08\", label: \"August\" },\n { value: \"09\", label: \"September\" },\n { value: \"10\", label: \"October\" },\n { value: \"11\", label: \"November\" },\n { value: \"12\", label: \"December\" },\n];\n\nexport const days = Array.from(Array(31), (_, num) => num + 1);\n\nconst currentYear = new Date().getFullYear();\n\nexport const years = Array.from(\n Array(25),\n (_, numYear) => numYear + currentYear\n);\n\nexport const validDate = (year: string, month: string, day: string): any[] => {\n const currentDate = Date.parse(`${year}-${month}-${day}`);\n\n if (isNaN(currentDate)) {\n return [false, \"\"];\n }\n\n const parsedMonth = parseInt(month);\n const parsedDay = parseInt(day);\n\n const monthForString = parsedMonth < 10 ? `0${parsedMonth}` : parsedMonth;\n const dayForString = parsedDay < 10 ? `0${parsedDay}` : parsedDay;\n\n const parsedDate = new Date(currentDate).toISOString().split(\"T\")[0];\n const dateString = `${year}-${monthForString}-${dayForString}`;\n\n return [parsedDate === dateString, dateString];\n};\n\n// twoDigitDate gets a two digit string number used for months or days\n// returns \"NaN\" if number is NaN\nexport const twoDigitDate = (num: number): string => {\n return num < 10 ? `0${num}` : `${num}`;\n};\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, {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useState,\n} from \"react\";\nimport clsx from \"clsx\";\nimport Grid from \"@mui/material/Grid\";\nimport { SelectChangeEvent } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport InputLabel from \"@mui/material/InputLabel\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport FormControl from \"@mui/material/FormControl\";\nimport Select from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport InputBase from \"@mui/material/InputBase\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport FormSwitchWrapper from \"../FormSwitchWrapper/FormSwitchWrapper\";\nimport { days, months, validDate, years } from \"./utils\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n dateInput: {\n \"&:not(:last-child)\": {\n marginRight: 22,\n },\n },\n ...fieldBasic,\n ...tooltipHelper,\n labelContainer: {\n flex: 1,\n },\n fieldContainer: {\n ...fieldBasic.fieldContainer,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n paddingBottom: 10,\n marginTop: 11,\n marginBottom: 6,\n },\n fieldContainerBorder: {\n borderBottom: \"#9c9c9c 1px solid\",\n marginBottom: 20,\n },\n });\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n \"& .MuiSelect-icon\": {\n color: \"#000\",\n \"&.Mui-disabled\": {\n color: \"#9c9c9c\",\n },\n },\n },\n input: {\n borderBottom: 0,\n fontSize: 12,\n },\n })\n)(InputBase);\n\ninterface IDateSelectorProps {\n classes: any;\n id: string;\n label: string;\n disableOptions?: boolean;\n addSwitch?: boolean;\n tooltip?: string;\n borderBottom?: boolean;\n value?: string;\n onDateChange: (date: string, isValid: boolean) => any;\n}\n\nconst DateSelector = forwardRef(\n (\n {\n classes,\n id,\n label,\n disableOptions = false,\n addSwitch = false,\n tooltip = \"\",\n borderBottom = false,\n onDateChange,\n value = \"\",\n }: IDateSelectorProps,\n ref: any\n ) => {\n useImperativeHandle(ref, () => ({ resetDate }));\n\n const [dateEnabled, setDateEnabled] = useState(false);\n const [month, setMonth] = useState(\"\");\n const [day, setDay] = useState(\"\");\n const [year, setYear] = useState(\"\");\n\n useEffect(() => {\n // verify if there is a current value\n // assume is in the format \"2021-12-30\"\n if (value !== \"\") {\n const valueSplit = value.split(\"-\");\n setYear(valueSplit[0]);\n setMonth(valueSplit[1]);\n // Turn to single digit to be displayed on dropdown buttons\n setDay(`${parseInt(valueSplit[2])}`);\n }\n }, [value]);\n\n useEffect(() => {\n const [isValid, dateString] = validDate(year, month, day);\n onDateChange(dateString, isValid);\n }, [month, day, year, onDateChange]);\n\n const resetDate = () => {\n setMonth(\"\");\n setDay(\"\");\n setYear(\"\");\n };\n\n const isDateDisabled = () => {\n if (disableOptions) {\n return disableOptions;\n } else if (addSwitch) {\n return !dateEnabled;\n } else {\n return false;\n }\n };\n\n const onMonthChange = (e: SelectChangeEvent) => {\n setMonth(e.target.value as string);\n };\n\n const onDayChange = (e: SelectChangeEvent) => {\n setDay(e.target.value as string);\n };\n\n const onYearChange = (e: SelectChangeEvent) => {\n setYear(e.target.value as string);\n };\n\n return (\n \n
\n \n );\n }\n);\n\nexport default withStyles(styles)(DateSelector);\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, { useEffect, useRef, useState } from \"react\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport Grid from \"@mui/material/Grid\";\nimport { Button } from \"mds\";\nimport {\n formFieldStyles,\n modalStyleUtils,\n spacingUtils,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { IFileInfo } from \"./types\";\n\nimport { twoDigitDate } from \"../../../../Common/FormComponents/DateSelector/utils\";\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport RadioGroupSelector from \"../../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport DateSelector from \"../../../../Common/FormComponents/DateSelector/DateSelector\";\nimport api from \"../../../../../../common/api\";\nimport { encodeURLString } from \"../../../../../../common/utils\";\nimport { setModalErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...formFieldStyles,\n ...modalStyleUtils,\n ...spacingUtils,\n dateSelector: {\n \"& div\": {\n borderBottom: 0,\n marginBottom: 0,\n\n \"& div:nth-child(2)\": {\n border: \"1px solid #EAEAEA\",\n paddingLeft: 5,\n\n \"& div\": {\n border: 0,\n },\n },\n },\n },\n });\n\ninterface ISetRetentionProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (updateInfo: boolean) => void;\n objectName: string;\n bucketName: string;\n objectInfo: IFileInfo;\n}\n\ninterface IRefObject {\n resetDate: () => void;\n}\n\nconst SetRetention = ({\n classes,\n open,\n closeModalAndRefresh,\n objectName,\n objectInfo,\n bucketName,\n}: ISetRetentionProps) => {\n const dispatch = useAppDispatch();\n const [statusEnabled, setStatusEnabled] = useState(true);\n const [type, setType] = useState(\"\");\n const [date, setDate] = useState(\"\");\n const [isDateValid, setIsDateValid] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const [alreadyConfigured, setAlreadyConfigured] = useState(false);\n\n useEffect(() => {\n if (objectInfo.retention_mode) {\n setType(objectInfo.retention_mode.toLowerCase());\n setAlreadyConfigured(true);\n }\n // get retention_until_date if defined\n if (objectInfo.retention_until_date) {\n const valueDate = new Date(objectInfo.retention_until_date);\n if (valueDate.toString() !== \"Invalid Date\") {\n const year = valueDate.getFullYear();\n const month = twoDigitDate(valueDate.getMonth() + 1);\n const day = valueDate.getDate();\n if (!isNaN(day) && month !== \"NaN\" && !isNaN(year)) {\n setDate(`${year}-${month}-${day}`);\n }\n }\n setAlreadyConfigured(true);\n }\n }, [objectInfo]);\n\n const dateElement = useRef(null);\n\n const dateFieldDisabled = () => {\n return !(statusEnabled && (type === \"governance\" || type === \"compliance\"));\n };\n\n const onSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n };\n\n const resetForm = () => {\n setStatusEnabled(false);\n setType(\"\");\n if (dateElement.current) {\n dateElement.current.resetDate();\n }\n };\n\n const addRetention = (\n selectedObject: string,\n versionId: string | null,\n expireDate: string\n ) => {\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${bucketName}/objects/retention?prefix=${encodeURLString(\n selectedObject\n )}&version_id=${versionId}`,\n {\n expires: expireDate,\n mode: type,\n }\n )\n .then((res: any) => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((error: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(error));\n setIsSaving(false);\n });\n };\n\n const disableRetention = (\n selectedObject: string,\n versionId: string | null\n ) => {\n api\n .invoke(\n \"DELETE\",\n `/api/v1/buckets/${bucketName}/objects/retention?prefix=${encodeURLString(\n selectedObject\n )}&version_id=${versionId}`\n )\n .then(() => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((error: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(error));\n setIsSaving(false);\n });\n };\n\n const saveNewRetentionPolicy = () => {\n setIsSaving(true);\n const selectedObject = objectInfo.name;\n const versionId = objectInfo.version_id;\n\n const expireDate =\n !statusEnabled && type === \"governance\" ? \"\" : `${date}T23:59:59Z`;\n\n if (!statusEnabled && type === \"governance\") {\n disableRetention(selectedObject, versionId);\n\n return;\n }\n\n addRetention(selectedObject, versionId, expireDate);\n };\n\n const showSwitcher =\n alreadyConfigured && (type === \"governance\" || type === \"\");\n\n return (\n {\n resetForm();\n closeModalAndRefresh(false);\n }}\n >\n
\n Selected Object: {objectName}\n
\n \n \n );\n};\n\nexport default withStyles(styles)(SetRetention);\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 { DialogContentText } from \"@mui/material\";\n\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\nimport { decodeURLString } from \"../../../../../../common/utils\";\nimport ConfirmDialog from \"../../../../Common/ModalWrapper/ConfirmDialog\";\nimport useApi from \"../../../../Common/Hooks/useApi\";\nimport { ConfirmDeleteIcon } from \"../../../../../../icons\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\n\nimport { setErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\n\ninterface IDeleteObjectProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedObject: string;\n selectedBucket: string;\n\n versioning: boolean;\n selectedVersion?: string;\n}\n\nconst DeleteObject = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedBucket,\n selectedObject,\n\n versioning,\n selectedVersion = \"\",\n}: IDeleteObjectProps) => {\n const dispatch = useAppDispatch();\n const onDelSuccess = () => closeDeleteModalAndRefresh(true);\n const onDelError = (err: ErrorResponseHandler) =>\n dispatch(setErrorSnackMessage(err));\n const onClose = () => closeDeleteModalAndRefresh(false);\n\n const [deleteLoading, invokeDeleteApi] = useApi(onDelSuccess, onDelError);\n const [deleteVersions, setDeleteVersions] = useState(false);\n\n if (!selectedObject) {\n return null;\n }\n const onConfirmDelete = () => {\n const decodedSelectedObject = decodeURLString(selectedObject);\n const recursive = decodedSelectedObject.endsWith(\"/\");\n invokeDeleteApi(\n \"DELETE\",\n `/api/v1/buckets/${selectedBucket}/objects?path=${selectedObject}${\n selectedVersion !== \"\"\n ? `&version_id=${selectedVersion}`\n : `&recursive=${recursive}&all_versions=${deleteVersions}`\n }`\n );\n };\n\n return (\n }\n isLoading={deleteLoading}\n onConfirm={onConfirmDelete}\n onClose={onClose}\n confirmationContent={\n \n Are you sure you want to delete: \n {decodeURLString(selectedObject)}{\" \"}\n {selectedVersion !== \"\" ? (\n \n \n \n Version ID:\n \n {selectedVersion}\n \n ) : (\n \"\"\n )}\n ? \n \n {versioning && selectedVersion === \"\" && (\n {\n setDeleteVersions(!deleteVersions);\n }}\n description=\"\"\n />\n )}\n \n }\n />\n );\n};\n\nexport default DeleteObject;\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, { useEffect, useState } from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport get from \"lodash/get\";\nimport Grid from \"@mui/material/Grid\";\nimport { Button } from \"mds\";\nimport {\n formFieldStyles,\n modalStyleUtils,\n spacingUtils,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\n\nimport { IFileInfo } from \"./types\";\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport api from \"../../../../../../common/api\";\nimport { encodeURLString } from \"../../../../../../common/utils\";\n\nimport { setModalErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...formFieldStyles,\n ...modalStyleUtils,\n ...spacingUtils,\n });\n\ninterface ISetRetentionProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (reload: boolean) => void;\n objectName: string;\n bucketName: string;\n actualInfo: IFileInfo;\n}\n\nconst SetLegalHoldModal = ({\n classes,\n open,\n closeModalAndRefresh,\n objectName,\n bucketName,\n actualInfo,\n}: ISetRetentionProps) => {\n const dispatch = useAppDispatch();\n const [legalHoldEnabled, setLegalHoldEnabled] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const versionId = actualInfo.version_id;\n\n useEffect(() => {\n const status = get(actualInfo, \"legal_hold_status\", \"OFF\");\n setLegalHoldEnabled(status === \"ON\");\n }, [actualInfo]);\n\n const onSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n setIsSaving(true);\n\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${bucketName}/objects/legalhold?prefix=${encodeURLString(\n objectName\n )}&version_id=${versionId}`,\n { status: legalHoldEnabled ? \"enabled\" : \"disabled\" }\n )\n .then(() => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((error: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(error));\n setIsSaving(false);\n });\n };\n\n const resetForm = () => {\n setLegalHoldEnabled(false);\n };\n\n return (\n {\n resetForm();\n closeModalAndRefresh(false);\n }}\n >\n \n Object: {bucketName}\n \n\n \n \n );\n};\n\nexport default withStyles(styles)(SetLegalHoldModal);\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 } from \"react\";\nimport { withStyles } from \"@mui/styles\";\nimport Grid from \"@mui/material/Grid\";\nimport { Box, Table, TableBody, TableCell, TableRow } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport {\n detailsPanel,\n spacingUtils,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\n\ninterface IObjectMetadata {\n metaData: any;\n classes?: any;\n linear?: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n propertiesIcon: {\n marginLeft: 5,\n \"& .min-icon\": {\n height: 12,\n },\n },\n\n capitalizeFirst: {\n textTransform: \"capitalize\",\n \"& .min-icon\": {\n width: 16,\n height: 16,\n },\n },\n titleItem: {\n width: \"35%\",\n },\n ...spacingUtils,\n ...detailsPanel,\n });\n\nconst ObjectMetaData = ({\n metaData,\n classes,\n linear = false,\n}: IObjectMetadata) => {\n const metaKeys = Object.keys(metaData);\n\n if (linear) {\n return (\n \n {metaKeys.map((element: string, index: number) => {\n const renderItem = Array.isArray(metaData[element])\n ? metaData[element].map(decodeURIComponent).join(\", \")\n : decodeURIComponent(metaData[element]);\n\n return (\n \n {element}\n \n {renderItem}\n \n );\n })}\n \n );\n }\n\n return (\n \n \n
\n \n \n );\n};\n\nexport default withStyles(styles)(ObjectMetaData);\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 { Button } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport clsx from \"clsx\";\n\ntype ObjectActionButtonProps = {\n disabled?: boolean;\n onClick: () => void | any;\n icon: React.ReactNode;\n label: string;\n [x: string]: any;\n};\n\nconst styles = (theme: Theme) =>\n createStyles({\n root: {\n padding: \"0 15px\",\n height: 22,\n margin: 0,\n color: \"#5E5E5E\",\n fontWeight: \"normal\",\n fontSize: 14,\n whiteSpace: \"nowrap\",\n width: \"100%\",\n justifyContent: \"flex-start\",\n \"&:hover\": {\n backgroundColor: \"transparent\",\n color: \"#000\",\n },\n \"& .min-icon\": {\n width: 11,\n },\n \"&:disabled\": {\n color: \"#EBEBEB\",\n borderColor: \"#EBEBEB\",\n },\n },\n });\n\n// TODO: Create an mds version of this.\nconst ObjectActionButton = ({\n disabled,\n onClick,\n icon,\n label,\n classes,\n ...restProps\n}: ObjectActionButtonProps) => {\n return (\n \n {label}\n \n );\n};\n\nexport default withStyles(styles)(ObjectActionButton);\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 } from \"react\";\nimport ObjectActionButton from \"./ObjectActionButton\";\nimport { withStyles } from \"@mui/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { detailsPanel } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport TooltipWrapper from \"../../../../Common/TooltipWrapper/TooltipWrapper\";\n\nconst styles = () =>\n createStyles({\n ...detailsPanel,\n });\n\nexport interface MultiSelectionItem {\n action: () => void;\n label: string;\n disabled: boolean;\n icon: React.ReactNode;\n tooltip: string;\n}\n\ninterface IActionsListSectionProps {\n items: MultiSelectionItem[];\n title: string | React.ReactNode;\n classes: any;\n}\n\nconst ActionsListSection = ({\n items,\n classes,\n title,\n}: IActionsListSectionProps) => {\n return (\n \n
\n Current Tags:\n \n {currTagKeys.length === 0 ? (\n \n There are no tags for this object\n \n ) : (\n \n )}\n \n {currTagKeys.map((tagKey: string, index: number) => {\n const tag = get(currentTags, `${tagKey}`, \"\");\n if (tag !== \"\") {\n return (\n \n }\n onDelete={() => {\n onDeleteTag(tagKey, tag);\n }}\n />\n \n );\n }\n return null;\n })}\n \n
\n \n \n \n \n \n Add New Tag\n \n \n {\n setNewKey(e.target.value);\n }}\n />\n \n \n {\n setNewLabel(e.target.value);\n }}\n />\n \n \n \n \n \n \n \n \n )}\n \n \n );\n};\n\nexport default withStyles(styles)(AddTagModal);\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 { Button } from \"mds\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n decodeURLString,\n deleteCookie,\n encodeURLString,\n getCookieValue,\n performDownload,\n} from \"../../../../../../common/utils\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport { InspectMenuIcon } from \"../../../../../../icons/SidebarMenus\";\nimport Grid from \"@mui/material/Grid\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport {\n formFieldStyles,\n modalStyleUtils,\n spacingUtils,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { PasswordKeyIcon } from \"../../../../../../icons\";\nimport { Box, DialogContentText } from \"@mui/material\";\nimport KeyRevealer from \"../../../../Tools/KeyRevealer\";\nimport { setErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...formFieldStyles,\n ...modalStyleUtils,\n ...spacingUtils,\n });\n\ninterface IInspectObjectProps {\n classes: any;\n closeInspectModalAndRefresh: (refresh: boolean) => void;\n inspectOpen: boolean;\n inspectPath: string;\n volumeName: string;\n}\n\nconst InspectObject = ({\n classes,\n closeInspectModalAndRefresh,\n inspectOpen,\n inspectPath,\n volumeName,\n}: IInspectObjectProps) => {\n const dispatch = useAppDispatch();\n const onClose = () => closeInspectModalAndRefresh(false);\n const [isEncrypt, setIsEncrypt] = useState(true);\n const [decryptionKey, setDecryptionKey] = useState(\"\");\n const [insFileName, setInsFileName] = useState(\"\");\n\n if (!inspectPath) {\n return null;\n }\n const makeRequest = async (url: string) => {\n return await fetch(url, { method: \"GET\" });\n };\n\n const performInspect = async () => {\n const file = encodeURLString(inspectPath + \"/xl.meta\");\n const volume = encodeURLString(volumeName);\n\n const urlOfInspectApi = `/api/v1/admin/inspect?volume=${volume}&file=${file}&encrypt=${isEncrypt}`;\n\n makeRequest(urlOfInspectApi)\n .then(async (res) => {\n if (!res.ok) {\n const resErr: any = await res.json();\n\n dispatch(\n setErrorSnackMessage({\n errorMessage: resErr.message,\n detailedError: resErr.code,\n })\n );\n }\n const blob: Blob = await res.blob();\n\n //@ts-ignore\n const filename = res.headers.get(\"content-disposition\").split('\"')[1];\n const decryptKey = getCookieValue(filename) || \"\";\n\n performDownload(blob, filename);\n setInsFileName(filename);\n if (decryptKey === \"\") {\n onClose();\n return;\n }\n setDecryptionKey(decryptKey);\n })\n .catch((err) => {\n dispatch(setErrorSnackMessage(err));\n });\n };\n\n const onCloseDecKeyModal = () => {\n deleteCookie(insFileName);\n onClose();\n setDecryptionKey(\"\");\n };\n\n const onSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n };\n\n return (\n \n {!decryptionKey && (\n }\n title={`Inspect Object`}\n onClose={onClose}\n >\n \n \n )}\n {decryptionKey ? (\n }\n >\n \n \n This will be displayed only once. It cannot be recovered.\n \n Use secure medium to share this key.\n \n \n \n \n \n \n ) : null}\n \n );\n};\n\nexport default withStyles(styles)(InspectObject);\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, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { Button } from \"mds\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { Theme } from \"@mui/material/styles\";\nimport { EditIcon } from \"../../../icons\";\nimport {\n containerForHeader,\n formFieldStyles,\n modalStyleUtils,\n spacingUtils,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { IFileInfo } from \"../Buckets/ListBuckets/Objects/ObjectDetails/types\";\nimport { encodeURLString } from \"../../../common/utils\";\nimport { download } from \"../Buckets/ListBuckets/Objects/utils\";\nimport {\n cancelObjectInList,\n completeObject,\n failObject,\n setNewObject,\n updateProgress,\n} from \"./objectBrowserSlice\";\nimport { makeid, storeCallForObjectWithID } from \"./transferManager\";\nimport { useAppDispatch } from \"../../../store\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\n\ninterface IRenameLongFilename {\n open: boolean;\n bucketName: string;\n internalPaths: string;\n currentItem: string;\n actualInfo: IFileInfo;\n closeModal: () => void;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n ...modalStyleUtils,\n ...formFieldStyles,\n ...spacingUtils,\n ...containerForHeader(theme.spacing(4)),\n })\n);\n\nconst RenameLongFileName = ({\n open,\n closeModal,\n currentItem,\n internalPaths,\n actualInfo,\n bucketName,\n}: IRenameLongFilename) => {\n const classes = useStyles();\n const dispatch = useAppDispatch();\n\n const [newFileName, setNewFileName] = useState(currentItem);\n const [acceptLongName, setAcceptLongName] = useState(false);\n\n const doDownload = (e: React.FormEvent) => {\n e.preventDefault();\n\n const identityDownload = encodeURLString(\n `${bucketName}-${\n actualInfo.name\n }-${new Date().getTime()}-${Math.random()}`\n );\n\n const ID = makeid(8);\n\n const downloadCall = download(\n bucketName,\n internalPaths,\n actualInfo.version_id,\n parseInt(actualInfo.size || \"0\"),\n newFileName,\n ID,\n (progress) => {\n dispatch(\n updateProgress({\n instanceID: identityDownload,\n progress: progress,\n })\n );\n },\n () => {\n dispatch(completeObject(identityDownload));\n },\n (msg: string) => {\n dispatch(failObject({ instanceID: identityDownload, msg }));\n },\n () => {\n dispatch(cancelObjectInList(identityDownload));\n }\n );\n\n storeCallForObjectWithID(ID, downloadCall);\n dispatch(\n setNewObject({\n ID,\n bucketName,\n done: false,\n instanceID: identityDownload,\n percentage: 0,\n prefix: newFileName,\n type: \"download\",\n waitingForFile: true,\n failed: false,\n cancelled: false,\n errorMessage: \"\",\n })\n );\n closeModal();\n };\n\n return (\n }\n >\n
\n The file you are trying to download has a long name.\n \n This can cause issues on Windows Systems by trimming the file name after\n download.\n \n We recommend to rename the file download\n
\n \n \n );\n};\n\nexport default RenameLongFileName;\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 { useSelector } from \"react-redux\";\nimport { Box } from \"@mui/material\";\nimport { withStyles } from \"@mui/styles\";\nimport { Button } from \"mds\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport get from \"lodash/get\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n actionsTray,\n buttonsStyles,\n detailsPanel,\n spacingUtils,\n textStyleUtils,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { IFileInfo, MetadataResponse } from \"../ObjectDetails/types\";\nimport { download, extensionPreview } from \"../utils\";\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\n\nimport {\n decodeURLString,\n encodeURLString,\n getClientOS,\n niceBytes,\n niceBytesInt,\n niceDaysInt,\n} from \"../../../../../../common/utils\";\nimport {\n IAM_SCOPES,\n permissionTooltipHelper,\n} from \"../../../../../../common/SecureComponent/permissions\";\nimport { AppState, useAppDispatch } from \"../../../../../../store\";\nimport {\n DeleteIcon,\n DownloadIcon,\n LegalHoldIcon,\n MetadataIcon,\n ObjectInfoIcon,\n PreviewIcon,\n RetentionIcon,\n ShareIcon,\n TagsIcon,\n VersionsIcon,\n} from \"../../../../../../icons\";\nimport { InspectMenuIcon } from \"../../../../../../icons/SidebarMenus\";\nimport api from \"../../../../../../common/api\";\nimport ShareFile from \"../ObjectDetails/ShareFile\";\nimport SetRetention from \"../ObjectDetails/SetRetention\";\nimport DeleteObject from \"../ListObjects/DeleteObject\";\nimport SetLegalHoldModal from \"../ObjectDetails/SetLegalHoldModal\";\nimport {\n hasPermission,\n SecureComponent,\n} from \"../../../../../../common/SecureComponent\";\nimport PreviewFileModal from \"../Preview/PreviewFileModal\";\nimport ObjectMetaData from \"../ObjectDetails/ObjectMetaData\";\nimport ActionsListSection from \"./ActionsListSection\";\nimport { displayFileIconName } from \"./utils\";\nimport TagsModal from \"../ObjectDetails/TagsModal\";\nimport InspectObject from \"./InspectObject\";\nimport Loader from \"../../../../Common/Loader/Loader\";\nimport { selDistSet } from \"../../../../../../systemSlice\";\nimport {\n makeid,\n storeCallForObjectWithID,\n} from \"../../../../ObjectBrowser/transferManager\";\nimport {\n cancelObjectInList,\n completeObject,\n failObject,\n setLoadingObjectInfo,\n setLoadingVersions,\n setNewObject,\n setSelectedVersion,\n setVersionsModeEnabled,\n updateProgress,\n} from \"../../../../ObjectBrowser/objectBrowserSlice\";\nimport RenameLongFileName from \"../../../../ObjectBrowser/RenameLongFilename\";\nimport TooltipWrapper from \"../../../../Common/TooltipWrapper/TooltipWrapper\";\n\nconst styles = () =>\n createStyles({\n ObjectDetailsTitle: {\n display: \"flex\",\n alignItems: \"center\",\n \"& .min-icon\": {\n width: 26,\n height: 26,\n minWidth: 26,\n minHeight: 26,\n },\n },\n objectNameContainer: {\n whiteSpace: \"nowrap\",\n textOverflow: \"ellipsis\",\n overflow: \"hidden\",\n alignItems: \"center\",\n marginLeft: 10,\n },\n headerForSection: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n paddingBottom: 15,\n borderBottom: \"#E2E2E2 2px solid\",\n fontWeight: \"bold\",\n fontSize: 18,\n color: \"#000\",\n margin: \"20px 22px\",\n },\n capitalizeFirst: {\n textTransform: \"capitalize\",\n },\n ...buttonsStyles,\n ...actionsTray,\n ...spacingUtils,\n ...textStyleUtils,\n ...detailsPanel,\n });\n\nconst emptyFile: IFileInfo = {\n is_latest: true,\n last_modified: \"\",\n legal_hold_status: \"\",\n name: \"\",\n retention_mode: \"\",\n retention_until_date: \"\",\n size: \"0\",\n tags: {},\n version_id: null,\n};\n\ninterface IObjectDetailPanelProps {\n classes: any;\n internalPaths: string;\n bucketName: string;\n versioning: boolean;\n locking: boolean;\n onClosePanel: (hardRefresh: boolean) => void;\n}\n\nconst ObjectDetailPanel = ({\n classes,\n internalPaths,\n bucketName,\n versioning,\n locking,\n onClosePanel,\n}: IObjectDetailPanelProps) => {\n const dispatch = useAppDispatch();\n\n const distributedSetup = useSelector(selDistSet);\n const versionsMode = useSelector(\n (state: AppState) => state.objectBrowser.versionsMode\n );\n const selectedVersion = useSelector(\n (state: AppState) => state.objectBrowser.selectedVersion\n );\n const loadingObjectInfo = useSelector(\n (state: AppState) => state.objectBrowser.loadingObjectInfo\n );\n\n const [shareFileModalOpen, setShareFileModalOpen] = useState(false);\n const [retentionModalOpen, setRetentionModalOpen] = useState(false);\n const [tagModalOpen, setTagModalOpen] = useState(false);\n const [legalholdOpen, setLegalholdOpen] = useState(false);\n const [inspectModalOpen, setInspectModalOpen] = useState(false);\n const [actualInfo, setActualInfo] = useState(null);\n const [allInfoElements, setAllInfoElements] = useState([]);\n const [objectToShare, setObjectToShare] = useState(null);\n const [versions, setVersions] = useState([]);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [previewOpen, setPreviewOpen] = useState(false);\n const [totalVersionsSize, setTotalVersionsSize] = useState(0);\n const [longFileOpen, setLongFileOpen] = useState(false);\n const [metaData, setMetaData] = useState(null);\n const [loadMetadata, setLoadingMetadata] = useState(false);\n\n const internalPathsDecoded = decodeURLString(internalPaths) || \"\";\n const allPathData = internalPathsDecoded.split(\"/\");\n const currentItem = allPathData.pop() || \"\";\n\n // calculate object name to display\n let objectNameArray: string[] = [];\n if (actualInfo) {\n objectNameArray = actualInfo.name.split(\"/\");\n }\n\n useEffect(() => {\n if (distributedSetup && allInfoElements && allInfoElements.length >= 1) {\n let infoElement =\n allInfoElements.find((el: IFileInfo) => el.is_latest) || emptyFile;\n\n if (selectedVersion !== \"\") {\n infoElement =\n allInfoElements.find(\n (el: IFileInfo) => el.version_id === selectedVersion\n ) || emptyFile;\n }\n\n if (!infoElement.is_delete_marker) {\n setLoadingMetadata(true);\n }\n\n setActualInfo(infoElement);\n }\n }, [selectedVersion, distributedSetup, allInfoElements]);\n\n useEffect(() => {\n if (loadingObjectInfo && internalPaths !== \"\") {\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects?prefix=${internalPaths}${\n distributedSetup ? \"&with_versions=true\" : \"\"\n }`\n )\n .then((res: IFileInfo[]) => {\n const result = get(res, \"objects\", []);\n if (distributedSetup) {\n setAllInfoElements(result);\n setVersions(result);\n const tVersionSize = result.reduce(\n (acc: number, currValue: IFileInfo) => {\n if (currValue?.size) {\n return acc + currValue.size;\n }\n return acc;\n },\n 0\n );\n\n setTotalVersionsSize(tVersionSize);\n } else {\n const resInfo = result[0];\n\n setActualInfo(resInfo);\n setVersions([]);\n\n if (!resInfo.is_delete_marker) {\n setLoadingMetadata(true);\n }\n }\n\n dispatch(setLoadingObjectInfo(false));\n })\n .catch((error: ErrorResponseHandler) => {\n console.error(\"Error loading object details\", error);\n dispatch(setLoadingObjectInfo(false));\n });\n }\n }, [\n loadingObjectInfo,\n bucketName,\n internalPaths,\n dispatch,\n distributedSetup,\n selectedVersion,\n ]);\n\n useEffect(() => {\n if (loadMetadata && internalPaths !== \"\") {\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects/metadata?prefix=${internalPaths}`\n )\n .then((res: MetadataResponse) => {\n let metadata = get(res, \"objectMetadata\", {});\n\n setMetaData(metadata);\n setLoadingMetadata(false);\n })\n .catch((err) => {\n console.error(\"Error Getting Metadata Status: \", err.detailedError);\n setLoadingMetadata(false);\n });\n }\n }, [bucketName, internalPaths, loadMetadata]);\n\n let tagKeys: string[] = [];\n\n if (actualInfo && actualInfo.tags) {\n tagKeys = Object.keys(actualInfo.tags);\n }\n\n const openRetentionModal = () => {\n setRetentionModalOpen(true);\n };\n\n const closeRetentionModal = (updateInfo: boolean) => {\n setRetentionModalOpen(false);\n if (updateInfo) {\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const shareObject = () => {\n setShareFileModalOpen(true);\n };\n\n const closeShareModal = () => {\n setObjectToShare(null);\n setShareFileModalOpen(false);\n };\n\n const closeFileOpen = () => {\n setLongFileOpen(false);\n };\n\n const downloadObject = (object: IFileInfo) => {\n const identityDownload = encodeURLString(\n `${bucketName}-${object.name}-${new Date().getTime()}-${Math.random()}`\n );\n\n if (\n object.name.length > 200 &&\n getClientOS().toLowerCase().includes(\"win\")\n ) {\n setLongFileOpen(true);\n return;\n }\n\n const ID = makeid(8);\n\n const downloadCall = download(\n bucketName,\n internalPaths,\n object.version_id,\n parseInt(object.size || \"0\"),\n null,\n ID,\n (progress) => {\n dispatch(\n updateProgress({\n instanceID: identityDownload,\n progress: progress,\n })\n );\n },\n () => {\n dispatch(completeObject(identityDownload));\n },\n (msg: string) => {\n dispatch(failObject({ instanceID: identityDownload, msg }));\n },\n () => {\n dispatch(cancelObjectInList(identityDownload));\n }\n );\n\n storeCallForObjectWithID(ID, downloadCall);\n dispatch(\n setNewObject({\n ID,\n bucketName,\n done: false,\n instanceID: identityDownload,\n percentage: 0,\n prefix: object.name,\n type: \"download\",\n waitingForFile: true,\n failed: false,\n cancelled: false,\n errorMessage: \"\",\n })\n );\n };\n\n const closeDeleteModal = (closeAndReload: boolean) => {\n setDeleteOpen(false);\n\n if (closeAndReload && selectedVersion === \"\") {\n onClosePanel(true);\n } else {\n dispatch(setLoadingVersions(true));\n dispatch(setSelectedVersion(\"\"));\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const closeAddTagModal = (reloadObjectData: boolean) => {\n setTagModalOpen(false);\n if (reloadObjectData) {\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const closeInspectModal = (reloadObjectData: boolean) => {\n setInspectModalOpen(false);\n if (reloadObjectData) {\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const closeLegalholdModal = (reload: boolean) => {\n setLegalholdOpen(false);\n if (reload) {\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const loaderForContainer = (\n
\n )}\n \n \n \n );\n};\n\nexport default withStyles(styles)(DaysSelector);\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 { Theme } from \"@mui/material/styles\";\nimport { Button } from \"mds\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport Grid from \"@mui/material/Grid\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport {\n formFieldStyles,\n modalStyleUtils,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\n\nimport { IFileInfo } from \"./types\";\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\nimport api from \"../../../../../../common/api\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport PredefinedList from \"../../../../Common/FormComponents/PredefinedList/PredefinedList\";\nimport DaysSelector from \"../../../../Common/FormComponents/DaysSelector/DaysSelector\";\nimport { encodeURLString } from \"../../../../../../common/utils\";\nimport { ShareIcon } from \"../../../../../../icons\";\nimport {\n selDistSet,\n setModalErrorSnackMessage,\n setModalSnackMessage,\n} from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\n\nconst CopyIcon = React.lazy(() => import(\"../../../../../../icons/CopyIcon\"));\n\nconst styles = (theme: Theme) =>\n createStyles({\n shareLinkInfo: {\n fontSize: 14,\n fontWeight: 400,\n },\n copyShareLink: {\n display: \"flex\",\n \"@media (max-width: 900px)\": {\n flexFlow: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n },\n copyShareLinkInput: {\n \"& div:first-child\": {\n marginTop: 0,\n },\n \"@media (max-width: 900px)\": {\n minWidth: 250,\n },\n },\n copyShareLinkBtn: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n \"@media (max-width: 900px)\": {\n marginTop: 10,\n },\n },\n ...modalStyleUtils,\n ...formFieldStyles,\n });\n\ninterface IShareFileProps {\n classes: any;\n open: boolean;\n bucketName: string;\n dataObject: IFileInfo;\n closeModalAndRefresh: () => void;\n}\n\nconst ShareFile = ({\n classes,\n open,\n closeModalAndRefresh,\n bucketName,\n dataObject,\n}: IShareFileProps) => {\n const dispatch = useAppDispatch();\n const distributedSetup = useSelector(selDistSet);\n const [shareURL, setShareURL] = useState(\"\");\n const [isLoadingVersion, setIsLoadingVersion] = useState(true);\n const [isLoadingFile, setIsLoadingFile] = useState(false);\n const [selectedDate, setSelectedDate] = useState(\"\");\n const [dateValid, setDateValid] = useState(true);\n const [versionID, setVersionID] = useState(\"null\");\n\n const initialDate = new Date();\n\n const dateChanged = (newDate: string, isValid: boolean) => {\n setDateValid(isValid);\n if (isValid) {\n setSelectedDate(newDate);\n return;\n }\n setSelectedDate(\"\");\n setShareURL(\"\");\n };\n\n useEffect(() => {\n // In case version is undefined, we get the latest version of the object\n if (dataObject.version_id === undefined) {\n // In case it is not distributed setup, then we default to \"null\";\n if (distributedSetup) {\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects?prefix=${encodeURLString(\n dataObject.name\n )}${distributedSetup ? \"&with_versions=true\" : \"\"}`\n )\n .then((res: IFileInfo[]) => {\n const result = get(res, \"objects\", []);\n\n const latestVersion = result.find(\n (elem: IFileInfo) => elem.is_latest\n );\n\n if (latestVersion) {\n setVersionID(latestVersion.version_id);\n return;\n }\n\n // Version couldn't ve retrieved, we default\n setVersionID(\"null\");\n })\n .catch((error: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(error));\n });\n\n setIsLoadingVersion(false);\n return;\n }\n setVersionID(\"null\");\n setIsLoadingVersion(false);\n return;\n }\n setVersionID(dataObject.version_id || \"null\");\n setIsLoadingVersion(false);\n }, [bucketName, dataObject, distributedSetup, dispatch]);\n\n useEffect(() => {\n if (dateValid && !isLoadingVersion) {\n setIsLoadingFile(true);\n setShareURL(\"\");\n\n const slDate = new Date(`${selectedDate}`);\n const currDate = new Date();\n\n const diffDate = Math.ceil(\n (slDate.getTime() - currDate.getTime()) / 1000\n );\n\n if (diffDate > 0) {\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects/share?prefix=${encodeURLString(\n dataObject.name\n )}&version_id=${versionID}${\n selectedDate !== \"\" ? `&expires=${diffDate}s` : \"\"\n }`\n )\n .then((res: string) => {\n setShareURL(res);\n setIsLoadingFile(false);\n })\n .catch((error: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(error));\n setShareURL(\"\");\n setIsLoadingFile(false);\n });\n }\n }\n }, [\n dataObject,\n selectedDate,\n bucketName,\n dateValid,\n setShareURL,\n dispatch,\n distributedSetup,\n isLoadingVersion,\n versionID,\n ]);\n\n return (\n \n }\n modalOpen={open}\n onClose={() => {\n closeModalAndRefresh();\n }}\n >\n {isLoadingVersion && (\n \n \n \n )}\n {!isLoadingVersion && (\n \n \n This is a temporary URL with integrated access credentials for\n sharing objects valid for up to 7 days.\n \n \n The temporary URL expires after the configured time limit.\n \n \n \n \n \n \n \n \n {\n dispatch(\n setModalSnackMessage(\n \"Share URL Copied to clipboard\"\n )\n );\n }}\n disabled={shareURL === \"\" || isLoadingFile}\n style={{\n marginRight: \"5px\",\n width: \"28px\",\n height: \"28px\",\n padding: \"0px\",\n }}\n icon={}\n />\n \n }\n />\n \n \n \n )}\n \n \n );\n};\n\nexport default withStyles(styles)(ShareFile);\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 createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Grid, LinearProgress } from \"@mui/material\";\nimport { BucketObjectItem } from \"../ListObjects/types\";\nimport { extensionPreview } from \"../utils\";\nimport { encodeURLString } from \"../../../../../../common/utils\";\nimport clsx from \"clsx\";\n\nconst styles = () =>\n createStyles({\n iframeContainer: {\n border: \"0px\",\n flex: \"1 1 auto\",\n width: \"100%\",\n height: 250,\n backgroundColor: \"transparent\",\n borderRadius: 5,\n\n \"&.image\": {\n height: 500,\n },\n \"&.text\": {\n height: 700,\n },\n \"&.audio\": {\n height: 150,\n },\n \"&.video\": {\n height: 350,\n },\n \"&.fullHeight\": {\n height: \"calc(100vh - 185px)\",\n },\n },\n iframeBase: {\n backgroundColor: \"#fff\",\n },\n iframeHidden: {\n display: \"none\",\n },\n });\n\ninterface IPreviewFileProps {\n bucketName: string;\n object: BucketObjectItem | null;\n isFullscreen?: boolean;\n classes: any;\n}\n\nconst PreviewFile = ({\n bucketName,\n object,\n isFullscreen = false,\n classes,\n}: IPreviewFileProps) => {\n const [loading, setLoading] = useState(true);\n\n let path = \"\";\n\n if (object) {\n const encodedPath = encodeURLString(object.name);\n let basename = document.baseURI.replace(window.location.origin, \"\");\n path = `${window.location.origin}${basename}api/v1/buckets/${bucketName}/objects/download?preview=true&prefix=${encodedPath}`;\n if (object.version_id) {\n path = path.concat(`&version_id=${object.version_id}`);\n }\n }\n\n const objectType = extensionPreview(object?.name || \"\");\n\n const iframeLoaded = () => {\n setLoading(false);\n };\n\n return (\n \n {loading && (\n \n \n \n )}\n
\n \n );\n};\nexport default withStyles(styles)(PreviewFile);\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 } from \"react\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport PreviewFileContent from \"./PreviewFileContent\";\nimport { BucketObjectItem } from \"../ListObjects/types\";\nimport { ObjectPreviewIcon } from \"../../../../../../icons\";\n\ninterface IPreviewFileProps {\n open: boolean;\n bucketName: string;\n object: BucketObjectItem | null;\n onClosePreview: () => void;\n}\n\nconst PreviewFileModal = ({\n open,\n bucketName,\n object,\n onClosePreview,\n}: IPreviewFileProps) => {\n return (\n \n }\n >\n \n \n \n );\n};\n\nexport default PreviewFileModal;\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 { BucketObjectItem } from \"./ListObjects/types\";\nimport { IAllowResources } from \"../../../types\";\nimport { encodeURLString } from \"../../../../../common/utils\";\nimport { removeTrace } from \"../../../ObjectBrowser/transferManager\";\n\nexport const download = (\n bucketName: string,\n objectPath: string,\n versionID: any,\n fileSize: number,\n overrideFileName: string | null = null,\n id: string,\n progressCallback: (progress: number) => void,\n completeCallback: () => void,\n errorCallback: (msg: string) => void,\n abortCallback: () => void\n) => {\n const anchor = document.createElement(\"a\");\n document.body.appendChild(anchor);\n let basename = document.baseURI.replace(window.location.origin, \"\");\n\n let path = `${\n window.location.origin\n }${basename}api/v1/buckets/${bucketName}/objects/download?prefix=${objectPath}${\n overrideFileName !== null && overrideFileName.trim() !== \"\"\n ? `&override_file_name=${encodeURLString(overrideFileName || \"\")}`\n : \"\"\n }`;\n if (versionID) {\n path = path.concat(`&version_id=${versionID}`);\n }\n\n var req = new XMLHttpRequest();\n req.open(\"GET\", path, true);\n req.addEventListener(\n \"progress\",\n function (evt) {\n let percentComplete = Math.round((evt.loaded / fileSize) * 100);\n\n if (progressCallback) {\n progressCallback(percentComplete);\n }\n },\n false\n );\n\n req.responseType = \"blob\";\n req.onreadystatechange = () => {\n if (req.readyState === 4) {\n if (req.status === 200) {\n const rspHeader = req.getResponseHeader(\"Content-Disposition\");\n\n let filename = \"download\";\n if (rspHeader) {\n let rspHeaderDecoded = decodeURIComponent(rspHeader);\n filename = rspHeaderDecoded.split('\"')[1];\n }\n\n if (completeCallback) {\n completeCallback();\n }\n\n removeTrace(id);\n\n var link = document.createElement(\"a\");\n link.href = window.URL.createObjectURL(req.response);\n link.download = filename;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n } else {\n if (req.getResponseHeader(\"Content-Type\") === \"application/json\") {\n const rspBody: { detailedMessage?: string } = JSON.parse(\n req.response\n );\n if (rspBody.detailedMessage) {\n errorCallback(rspBody.detailedMessage);\n return;\n }\n }\n errorCallback(`Unexpected response status code (${req.status}).`);\n }\n }\n };\n req.onerror = () => {\n if (errorCallback) {\n errorCallback(\"A network error occurred.\");\n }\n };\n req.onabort = () => {\n if (abortCallback) {\n abortCallback();\n }\n };\n\n return req;\n};\n\n// Review file extension by name & returns the type of preview browser that can be used\nexport const extensionPreview = (\n fileName: string\n): \"image\" | \"text\" | \"audio\" | \"video\" | \"none\" => {\n const imageExtensions = [\n \"jif\",\n \"jfif\",\n \"apng\",\n \"avif\",\n \"svg\",\n \"webp\",\n \"bmp\",\n \"ico\",\n \"jpg\",\n \"jpe\",\n \"jpeg\",\n \"gif\",\n \"png\",\n \"heic\",\n ];\n const textExtensions = [\"pdf\", \"txt\", \"json\"];\n const audioExtensions = [\"wav\", \"mp3\", \"alac\", \"aiff\", \"dsd\", \"pcm\"];\n const videoExtensions = [\n \"mp4\",\n \"avi\",\n \"mpg\",\n \"webm\",\n \"mov\",\n \"flv\",\n \"mkv\",\n \"wmv\",\n \"avchd\",\n \"mpeg-4\",\n ];\n\n let fileExtension = fileName.split(\".\").pop();\n\n if (!fileExtension) {\n return \"none\";\n }\n\n fileExtension = fileExtension.toLowerCase();\n\n if (imageExtensions.includes(fileExtension)) {\n return \"image\";\n }\n\n if (textExtensions.includes(fileExtension)) {\n return \"text\";\n }\n\n if (audioExtensions.includes(fileExtension)) {\n return \"audio\";\n }\n\n if (videoExtensions.includes(fileExtension)) {\n return \"video\";\n }\n\n return \"none\";\n};\n\nexport const sortListObjects = (fieldSort: string) => {\n switch (fieldSort) {\n case \"name\":\n return (a: BucketObjectItem, b: BucketObjectItem) =>\n a.name.localeCompare(b.name);\n case \"last_modified\":\n return (a: BucketObjectItem, b: BucketObjectItem) =>\n new Date(a.last_modified).getTime() -\n new Date(b.last_modified).getTime();\n case \"size\":\n return (a: BucketObjectItem, b: BucketObjectItem) =>\n (a.size || -1) - (b.size || -1);\n }\n};\n\nexport const permissionItems = (\n bucketName: string,\n currentPath: string,\n permissionsArray: IAllowResources[]\n): BucketObjectItem[] | null => {\n if (permissionsArray.length === 0) {\n return null;\n }\n\n // We get permissions applied to the current bucket\n const filteredPermissionsForBucket = permissionsArray.filter(\n (permissionItem) =>\n permissionItem.resource.endsWith(`:${bucketName}`) ||\n permissionItem.resource.includes(`:${bucketName}/`)\n );\n\n // No permissions for this bucket. we can throw the error message at this point\n if (filteredPermissionsForBucket.length === 0) {\n return null;\n }\n\n const returnElements: BucketObjectItem[] = [];\n\n // We split current path\n const splitCurrentPath = currentPath.split(\"/\");\n\n filteredPermissionsForBucket.forEach((permissionElement) => {\n // We review paths in resource address\n\n // We split ARN & get the last item to check the URL\n const splitARN = permissionElement.resource.split(\":\");\n const urlARN = splitARN.pop() || \"\";\n\n // We split the paths of the URL & compare against current location to see if there are more items to include. In case current level is a wildcard or is the last one, we omit this validation\n\n const splitURLARN = urlARN.split(\"/\");\n\n // splitURL has more items than bucket name, we can continue validating\n if (splitURLARN.length > 1) {\n splitURLARN.every((currentElementInPath, index) => {\n // It is a wildcard element. We can stor the verification as value should be included (?)\n if (currentElementInPath === \"*\") {\n return false;\n }\n\n // Element is not included in the path. The user is trying to browse something else.\n if (\n splitCurrentPath[index] &&\n splitCurrentPath[index] !== currentElementInPath\n ) {\n return false;\n }\n\n // This element is not included by index in the current paths list. We add it so user can browse into it\n if (!splitCurrentPath[index]) {\n returnElements.push({\n name: `${currentElementInPath}/`,\n size: 0,\n last_modified: \"\",\n version_id: \"\",\n });\n }\n\n return true;\n });\n }\n\n // We review prefixes in allow resources for StringEquals variant only.\n if (\n permissionElement.conditionOperator === \"StringEquals\" ||\n permissionElement.conditionOperator === \"StringLike\"\n ) {\n permissionElement.prefixes.forEach((prefixItem) => {\n // Prefix Item is not empty?\n if (prefixItem !== \"\") {\n const splitItems = prefixItem.split(\"/\");\n\n let pathToRouteElements: string[] = [];\n\n splitItems.every((splitElement, index) => {\n if (!splitElement.includes(\"*\") && splitElement !== \"\") {\n if (splitElement !== splitCurrentPath[index]) {\n returnElements.push({\n name: `${pathToRouteElements.join(\"/\")}${\n pathToRouteElements.length > 0 ? \"/\" : \"\"\n }${splitElement}/`,\n size: 0,\n last_modified: \"\",\n version_id: \"\",\n });\n return false;\n }\n if (splitElement !== \"\") {\n pathToRouteElements.push(splitElement);\n }\n\n return true;\n }\n return false;\n });\n }\n });\n }\n });\n\n return returnElements;\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 { LoginMinIOLogo } from \"../../../../icons\";\nimport { useSelector } from \"react-redux\";\nimport { AppState } from \"../../../../store\";\n\ninterface IAutoColorIcon {\n marginRight: number;\n marginTop: number;\n}\n\nconst AutoColorIcon = ({ marginRight, marginTop }: IAutoColorIcon) => {\n let tinycolor = require(\"tinycolor2\");\n\n const colorVariants = useSelector(\n (state: AppState) => state.system.overrideStyles\n );\n\n const isDark =\n tinycolor(colorVariants?.backgroundColor || \"#fff\").getBrightness() <= 128;\n\n return (\n \n );\n};\n\nexport default AutoColorIcon;\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, { ComponentType, Suspense, SuspenseProps } from \"react\";\n\nfunction withSuspense
\n \n );\n};\n\nexport default withStyles(styles)(BrowserBreadcrumbs);\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 } from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport { Menu, MenuItem } from \"@mui/material\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport { UploadFolderIcon, UploadIcon } from \"../../../../icons\";\nimport {\n IAM_SCOPES,\n permissionTooltipHelper,\n} from \"../../../../common/SecureComponent/permissions\";\nimport { hasPermission } from \"../../../../common/SecureComponent\";\nimport { Button } from \"mds\";\nimport TooltipWrapper from \"../../Common/TooltipWrapper/TooltipWrapper\";\n\ninterface IUploadFilesButton {\n uploadPath: string;\n bucketName: string;\n forceDisable?: boolean;\n uploadFileFunction: (closeFunction: () => void) => void;\n uploadFolderFunction: (closeFunction: () => void) => void;\n classes: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n listUploadIcons: {\n height: 20,\n \"& .min-icon\": {\n width: 18,\n fill: \"rgba(0,0,0,0.87)\",\n },\n },\n });\n\nconst UploadFilesButton = ({\n uploadPath,\n bucketName,\n forceDisable = false,\n uploadFileFunction,\n uploadFolderFunction,\n classes,\n}: IUploadFilesButton) => {\n const [anchorEl, setAnchorEl] = React.useState(null);\n const openUploadMenu = Boolean(anchorEl);\n const handleClick = (event: React.MouseEvent) => {\n setAnchorEl(event.currentTarget);\n };\n const handleCloseUpload = () => {\n setAnchorEl(null);\n };\n\n const uploadObjectAllowed = hasPermission(uploadPath, [\n IAM_SCOPES.S3_PUT_OBJECT,\n ]);\n const uploadFolderAllowed = hasPermission(\n bucketName,\n [IAM_SCOPES.S3_PUT_OBJECT],\n false,\n true\n );\n\n const uploadEnabled: boolean = uploadObjectAllowed || uploadFolderAllowed;\n\n return (\n \n \n }\n variant={\"callAction\"}\n disabled={forceDisable || !uploadEnabled}\n />\n \n \n \n );\n};\n\nexport default withStyles(styles)(UploadFilesButton);\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 { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { Grid, IconButton } from \"@mui/material\";\nimport { ClosePanelIcon } from \"../../../../../../icons\";\nimport makeStyles from \"@mui/styles/makeStyles\";\n\ninterface IDetailsListPanel {\n open: boolean;\n className?: string;\n closePanel: () => void;\n children: React.ReactNode;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n detailsList: {\n borderColor: \"#EAEDEE\",\n borderWidth: 0,\n borderStyle: \"solid\",\n borderRadius: 3,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n width: 0,\n transitionDuration: \"0.3s\",\n overflowX: \"hidden\",\n overflowY: \"auto\",\n position: \"relative\",\n opacity: 0,\n marginLeft: -1,\n \"&.open\": {\n width: 300,\n minWidth: 300,\n borderLeftWidth: 1,\n opacity: 1,\n },\n \"@media (max-width: 799px)\": {\n \"&.open\": {\n width: \"100%\",\n minWidth: \"100%\",\n borderLeftWidth: 0,\n },\n },\n },\n closePanel: {\n position: \"absolute\",\n right: 0,\n top: 8,\n \"& .min-icon\": {\n width: 14,\n },\n },\n })\n);\n\nconst DetailsListPanel = ({\n open,\n closePanel,\n className = \"\",\n children,\n}: IDetailsListPanel) => {\n const classes = useStyles();\n\n return (\n \n \n \n \n {children}\n \n );\n};\n\nexport default DetailsListPanel;\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\nexport const months = [\n { value: \"01\", label: \"January\" },\n { value: \"02\", label: \"February\" },\n { value: \"03\", label: \"March\" },\n { value: \"04\", label: \"April\" },\n { value: \"05\", label: \"May\" },\n { value: \"06\", label: \"June\" },\n { value: \"07\", label: \"July\" },\n { value: \"08\", label: \"August\" },\n { value: \"09\", label: \"September\" },\n { value: \"10\", label: \"October\" },\n { value: \"11\", label: \"November\" },\n { value: \"12\", label: \"December\" },\n];\n\nexport const days = Array.from(Array(31), (_, num) => num + 1);\n\nconst currentYear = new Date().getFullYear();\n\nexport const years = Array.from(\n Array(25),\n (_, numYear) => numYear + currentYear\n);\n\nexport const validDate = (year: string, month: string, day: string): any[] => {\n const currentDate = Date.parse(`${year}-${month}-${day}`);\n\n if (isNaN(currentDate)) {\n return [false, \"\"];\n }\n\n const parsedMonth = parseInt(month);\n const parsedDay = parseInt(day);\n\n const monthForString = parsedMonth < 10 ? `0${parsedMonth}` : parsedMonth;\n const dayForString = parsedDay < 10 ? `0${parsedDay}` : parsedDay;\n\n const parsedDate = new Date(currentDate).toISOString().split(\"T\")[0];\n const dateString = `${year}-${monthForString}-${dayForString}`;\n\n return [parsedDate === dateString, dateString];\n};\n\n// twoDigitDate gets a two digit string number used for months or days\n// returns \"NaN\" if number is NaN\nexport const twoDigitDate = (num: number): string => {\n return num < 10 ? `0${num}` : `${num}`;\n};\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, {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useState,\n} from \"react\";\nimport clsx from \"clsx\";\nimport Grid from \"@mui/material/Grid\";\nimport { SelectChangeEvent } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport InputLabel from \"@mui/material/InputLabel\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport FormControl from \"@mui/material/FormControl\";\nimport Select from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport InputBase from \"@mui/material/InputBase\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport FormSwitchWrapper from \"../FormSwitchWrapper/FormSwitchWrapper\";\nimport { days, months, validDate, years } from \"./utils\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n dateInput: {\n \"&:not(:last-child)\": {\n marginRight: 22,\n },\n },\n ...fieldBasic,\n ...tooltipHelper,\n labelContainer: {\n flex: 1,\n },\n fieldContainer: {\n ...fieldBasic.fieldContainer,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n paddingBottom: 10,\n marginTop: 11,\n marginBottom: 6,\n },\n fieldContainerBorder: {\n borderBottom: \"#9c9c9c 1px solid\",\n marginBottom: 20,\n },\n });\n\nconst SelectStyled = withStyles((theme: Theme) =>\n createStyles({\n root: {\n \"& .MuiSelect-icon\": {\n color: \"#000\",\n \"&.Mui-disabled\": {\n color: \"#9c9c9c\",\n },\n },\n },\n input: {\n borderBottom: 0,\n fontSize: 12,\n },\n })\n)(InputBase);\n\ninterface IDateSelectorProps {\n classes: any;\n id: string;\n label: string;\n disableOptions?: boolean;\n addSwitch?: boolean;\n tooltip?: string;\n borderBottom?: boolean;\n value?: string;\n onDateChange: (date: string, isValid: boolean) => any;\n}\n\nconst DateSelector = forwardRef(\n (\n {\n classes,\n id,\n label,\n disableOptions = false,\n addSwitch = false,\n tooltip = \"\",\n borderBottom = false,\n onDateChange,\n value = \"\",\n }: IDateSelectorProps,\n ref: any\n ) => {\n useImperativeHandle(ref, () => ({ resetDate }));\n\n const [dateEnabled, setDateEnabled] = useState(false);\n const [month, setMonth] = useState(\"\");\n const [day, setDay] = useState(\"\");\n const [year, setYear] = useState(\"\");\n\n useEffect(() => {\n // verify if there is a current value\n // assume is in the format \"2021-12-30\"\n if (value !== \"\") {\n const valueSplit = value.split(\"-\");\n setYear(valueSplit[0]);\n setMonth(valueSplit[1]);\n // Turn to single digit to be displayed on dropdown buttons\n setDay(`${parseInt(valueSplit[2])}`);\n }\n }, [value]);\n\n useEffect(() => {\n const [isValid, dateString] = validDate(year, month, day);\n onDateChange(dateString, isValid);\n }, [month, day, year, onDateChange]);\n\n const resetDate = () => {\n setMonth(\"\");\n setDay(\"\");\n setYear(\"\");\n };\n\n const isDateDisabled = () => {\n if (disableOptions) {\n return disableOptions;\n } else if (addSwitch) {\n return !dateEnabled;\n } else {\n return false;\n }\n };\n\n const onMonthChange = (e: SelectChangeEvent) => {\n setMonth(e.target.value as string);\n };\n\n const onDayChange = (e: SelectChangeEvent) => {\n setDay(e.target.value as string);\n };\n\n const onYearChange = (e: SelectChangeEvent) => {\n setYear(e.target.value as string);\n };\n\n return (\n \n
\n \n );\n }\n);\n\nexport default withStyles(styles)(DateSelector);\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, { useEffect, useRef, useState } from \"react\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport Grid from \"@mui/material/Grid\";\nimport { Button } from \"mds\";\nimport {\n formFieldStyles,\n modalStyleUtils,\n spacingUtils,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { IFileInfo } from \"./types\";\n\nimport { twoDigitDate } from \"../../../../Common/FormComponents/DateSelector/utils\";\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport RadioGroupSelector from \"../../../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport DateSelector from \"../../../../Common/FormComponents/DateSelector/DateSelector\";\nimport api from \"../../../../../../common/api\";\nimport { encodeURLString } from \"../../../../../../common/utils\";\nimport { setModalErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...formFieldStyles,\n ...modalStyleUtils,\n ...spacingUtils,\n dateSelector: {\n \"& div\": {\n borderBottom: 0,\n marginBottom: 0,\n\n \"& div:nth-child(2)\": {\n border: \"1px solid #EAEAEA\",\n paddingLeft: 5,\n\n \"& div\": {\n border: 0,\n },\n },\n },\n },\n });\n\ninterface ISetRetentionProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (updateInfo: boolean) => void;\n objectName: string;\n bucketName: string;\n objectInfo: IFileInfo;\n}\n\ninterface IRefObject {\n resetDate: () => void;\n}\n\nconst SetRetention = ({\n classes,\n open,\n closeModalAndRefresh,\n objectName,\n objectInfo,\n bucketName,\n}: ISetRetentionProps) => {\n const dispatch = useAppDispatch();\n const [statusEnabled, setStatusEnabled] = useState(true);\n const [type, setType] = useState(\"\");\n const [date, setDate] = useState(\"\");\n const [isDateValid, setIsDateValid] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const [alreadyConfigured, setAlreadyConfigured] = useState(false);\n\n useEffect(() => {\n if (objectInfo.retention_mode) {\n setType(objectInfo.retention_mode.toLowerCase());\n setAlreadyConfigured(true);\n }\n // get retention_until_date if defined\n if (objectInfo.retention_until_date) {\n const valueDate = new Date(objectInfo.retention_until_date);\n if (valueDate.toString() !== \"Invalid Date\") {\n const year = valueDate.getFullYear();\n const month = twoDigitDate(valueDate.getMonth() + 1);\n const day = valueDate.getDate();\n if (!isNaN(day) && month !== \"NaN\" && !isNaN(year)) {\n setDate(`${year}-${month}-${day}`);\n }\n }\n setAlreadyConfigured(true);\n }\n }, [objectInfo]);\n\n const dateElement = useRef(null);\n\n const dateFieldDisabled = () => {\n return !(statusEnabled && (type === \"governance\" || type === \"compliance\"));\n };\n\n const onSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n };\n\n const resetForm = () => {\n setStatusEnabled(false);\n setType(\"\");\n if (dateElement.current) {\n dateElement.current.resetDate();\n }\n };\n\n const addRetention = (\n selectedObject: string,\n versionId: string | null,\n expireDate: string\n ) => {\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${bucketName}/objects/retention?prefix=${encodeURLString(\n selectedObject\n )}&version_id=${versionId}`,\n {\n expires: expireDate,\n mode: type,\n }\n )\n .then((res: any) => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((error: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(error));\n setIsSaving(false);\n });\n };\n\n const disableRetention = (\n selectedObject: string,\n versionId: string | null\n ) => {\n api\n .invoke(\n \"DELETE\",\n `/api/v1/buckets/${bucketName}/objects/retention?prefix=${encodeURLString(\n selectedObject\n )}&version_id=${versionId}`\n )\n .then(() => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((error: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(error));\n setIsSaving(false);\n });\n };\n\n const saveNewRetentionPolicy = () => {\n setIsSaving(true);\n const selectedObject = objectInfo.name;\n const versionId = objectInfo.version_id;\n\n const expireDate =\n !statusEnabled && type === \"governance\" ? \"\" : `${date}T23:59:59Z`;\n\n if (!statusEnabled && type === \"governance\") {\n disableRetention(selectedObject, versionId);\n\n return;\n }\n\n addRetention(selectedObject, versionId, expireDate);\n };\n\n const showSwitcher =\n alreadyConfigured && (type === \"governance\" || type === \"\");\n\n return (\n {\n resetForm();\n closeModalAndRefresh(false);\n }}\n >\n
\n Selected Object: {objectName}\n
\n \n \n );\n};\n\nexport default withStyles(styles)(SetRetention);\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 { DialogContentText } from \"@mui/material\";\n\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\nimport { decodeURLString } from \"../../../../../../common/utils\";\nimport ConfirmDialog from \"../../../../Common/ModalWrapper/ConfirmDialog\";\nimport useApi from \"../../../../Common/Hooks/useApi\";\nimport { ConfirmDeleteIcon } from \"../../../../../../icons\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\n\nimport { setErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\n\ninterface IDeleteObjectProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n selectedObject: string;\n selectedBucket: string;\n\n versioning: boolean;\n selectedVersion?: string;\n}\n\nconst DeleteObject = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n selectedBucket,\n selectedObject,\n\n versioning,\n selectedVersion = \"\",\n}: IDeleteObjectProps) => {\n const dispatch = useAppDispatch();\n const onDelSuccess = () => closeDeleteModalAndRefresh(true);\n const onDelError = (err: ErrorResponseHandler) =>\n dispatch(setErrorSnackMessage(err));\n const onClose = () => closeDeleteModalAndRefresh(false);\n\n const [deleteLoading, invokeDeleteApi] = useApi(onDelSuccess, onDelError);\n const [deleteVersions, setDeleteVersions] = useState(false);\n\n if (!selectedObject) {\n return null;\n }\n const onConfirmDelete = () => {\n const decodedSelectedObject = decodeURLString(selectedObject);\n const recursive = decodedSelectedObject.endsWith(\"/\");\n invokeDeleteApi(\n \"DELETE\",\n `/api/v1/buckets/${selectedBucket}/objects?path=${selectedObject}${\n selectedVersion !== \"\"\n ? `&version_id=${selectedVersion}`\n : `&recursive=${recursive}&all_versions=${deleteVersions}`\n }`\n );\n };\n\n return (\n }\n isLoading={deleteLoading}\n onConfirm={onConfirmDelete}\n onClose={onClose}\n confirmationContent={\n \n Are you sure you want to delete: \n {decodeURLString(selectedObject)}{\" \"}\n {selectedVersion !== \"\" ? (\n \n \n \n Version ID:\n \n {selectedVersion}\n \n ) : (\n \"\"\n )}\n ? \n \n {versioning && selectedVersion === \"\" && (\n {\n setDeleteVersions(!deleteVersions);\n }}\n description=\"\"\n />\n )}\n \n }\n />\n );\n};\n\nexport default DeleteObject;\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, { useEffect, useState } from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport get from \"lodash/get\";\nimport Grid from \"@mui/material/Grid\";\nimport { Button } from \"mds\";\nimport {\n formFieldStyles,\n modalStyleUtils,\n spacingUtils,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\n\nimport { IFileInfo } from \"./types\";\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport api from \"../../../../../../common/api\";\nimport { encodeURLString } from \"../../../../../../common/utils\";\n\nimport { setModalErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...formFieldStyles,\n ...modalStyleUtils,\n ...spacingUtils,\n });\n\ninterface ISetRetentionProps {\n classes: any;\n open: boolean;\n closeModalAndRefresh: (reload: boolean) => void;\n objectName: string;\n bucketName: string;\n actualInfo: IFileInfo;\n}\n\nconst SetLegalHoldModal = ({\n classes,\n open,\n closeModalAndRefresh,\n objectName,\n bucketName,\n actualInfo,\n}: ISetRetentionProps) => {\n const dispatch = useAppDispatch();\n const [legalHoldEnabled, setLegalHoldEnabled] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const versionId = actualInfo.version_id;\n\n useEffect(() => {\n const status = get(actualInfo, \"legal_hold_status\", \"OFF\");\n setLegalHoldEnabled(status === \"ON\");\n }, [actualInfo]);\n\n const onSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n setIsSaving(true);\n\n api\n .invoke(\n \"PUT\",\n `/api/v1/buckets/${bucketName}/objects/legalhold?prefix=${encodeURLString(\n objectName\n )}&version_id=${versionId}`,\n { status: legalHoldEnabled ? \"enabled\" : \"disabled\" }\n )\n .then(() => {\n setIsSaving(false);\n closeModalAndRefresh(true);\n })\n .catch((error: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(error));\n setIsSaving(false);\n });\n };\n\n const resetForm = () => {\n setLegalHoldEnabled(false);\n };\n\n return (\n {\n resetForm();\n closeModalAndRefresh(false);\n }}\n >\n \n Object: {bucketName}\n \n\n \n \n );\n};\n\nexport default withStyles(styles)(SetLegalHoldModal);\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 } from \"react\";\nimport { withStyles } from \"@mui/styles\";\nimport Grid from \"@mui/material/Grid\";\nimport { Box, Table, TableBody, TableCell, TableRow } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport {\n detailsPanel,\n spacingUtils,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\n\ninterface IObjectMetadata {\n metaData: any;\n classes?: any;\n linear?: boolean;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n propertiesIcon: {\n marginLeft: 5,\n \"& .min-icon\": {\n height: 12,\n },\n },\n\n capitalizeFirst: {\n textTransform: \"capitalize\",\n \"& .min-icon\": {\n width: 16,\n height: 16,\n },\n },\n titleItem: {\n width: \"35%\",\n },\n ...spacingUtils,\n ...detailsPanel,\n });\n\nconst ObjectMetaData = ({\n metaData,\n classes,\n linear = false,\n}: IObjectMetadata) => {\n const metaKeys = Object.keys(metaData);\n\n if (linear) {\n return (\n \n {metaKeys.map((element: string, index: number) => {\n const renderItem = Array.isArray(metaData[element])\n ? metaData[element].map(decodeURIComponent).join(\", \")\n : decodeURIComponent(metaData[element]);\n\n return (\n \n {element}\n \n {renderItem}\n \n );\n })}\n \n );\n }\n\n return (\n \n \n
\n \n \n );\n};\n\nexport default withStyles(styles)(ObjectMetaData);\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 { Button } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport clsx from \"clsx\";\n\ntype ObjectActionButtonProps = {\n disabled?: boolean;\n onClick: () => void | any;\n icon: React.ReactNode;\n label: string;\n [x: string]: any;\n};\n\nconst styles = (theme: Theme) =>\n createStyles({\n root: {\n padding: \"0 15px\",\n height: 22,\n margin: 0,\n color: \"#5E5E5E\",\n fontWeight: \"normal\",\n fontSize: 14,\n whiteSpace: \"nowrap\",\n width: \"100%\",\n justifyContent: \"flex-start\",\n \"&:hover\": {\n backgroundColor: \"transparent\",\n color: \"#000\",\n },\n \"& .min-icon\": {\n width: 11,\n },\n \"&:disabled\": {\n color: \"#EBEBEB\",\n borderColor: \"#EBEBEB\",\n },\n },\n });\n\n// TODO: Create an mds version of this.\nconst ObjectActionButton = ({\n disabled,\n onClick,\n icon,\n label,\n classes,\n ...restProps\n}: ObjectActionButtonProps) => {\n return (\n \n {label}\n \n );\n};\n\nexport default withStyles(styles)(ObjectActionButton);\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 } from \"react\";\nimport ObjectActionButton from \"./ObjectActionButton\";\nimport { withStyles } from \"@mui/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { detailsPanel } from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport TooltipWrapper from \"../../../../Common/TooltipWrapper/TooltipWrapper\";\n\nconst styles = () =>\n createStyles({\n ...detailsPanel,\n });\n\nexport interface MultiSelectionItem {\n action: () => void;\n label: string;\n disabled: boolean;\n icon: React.ReactNode;\n tooltip: string;\n}\n\ninterface IActionsListSectionProps {\n items: MultiSelectionItem[];\n title: string | React.ReactNode;\n classes: any;\n}\n\nconst ActionsListSection = ({\n items,\n classes,\n title,\n}: IActionsListSectionProps) => {\n return (\n \n
\n Current Tags:\n \n {currTagKeys.length === 0 ? (\n \n There are no tags for this object\n \n ) : (\n \n )}\n \n {currTagKeys.map((tagKey: string, index: number) => {\n const tag = get(currentTags, `${tagKey}`, \"\");\n if (tag !== \"\") {\n return (\n \n }\n onDelete={() => {\n onDeleteTag(tagKey, tag);\n }}\n />\n \n );\n }\n return null;\n })}\n \n
\n \n \n \n \n \n Add New Tag\n \n \n {\n setNewKey(e.target.value);\n }}\n />\n \n \n {\n setNewLabel(e.target.value);\n }}\n />\n \n \n \n \n \n \n \n \n )}\n \n \n );\n};\n\nexport default withStyles(styles)(AddTagModal);\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 { Button } from \"mds\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n decodeURLString,\n deleteCookie,\n encodeURLString,\n getCookieValue,\n performDownload,\n} from \"../../../../../../common/utils\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport { InspectMenuIcon } from \"../../../../../../icons/SidebarMenus\";\nimport Grid from \"@mui/material/Grid\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport {\n formFieldStyles,\n modalStyleUtils,\n spacingUtils,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { PasswordKeyIcon } from \"../../../../../../icons\";\nimport { Box, DialogContentText } from \"@mui/material\";\nimport KeyRevealer from \"../../../../Tools/KeyRevealer\";\nimport { setErrorSnackMessage } from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...formFieldStyles,\n ...modalStyleUtils,\n ...spacingUtils,\n });\n\ninterface IInspectObjectProps {\n classes: any;\n closeInspectModalAndRefresh: (refresh: boolean) => void;\n inspectOpen: boolean;\n inspectPath: string;\n volumeName: string;\n}\n\nconst InspectObject = ({\n classes,\n closeInspectModalAndRefresh,\n inspectOpen,\n inspectPath,\n volumeName,\n}: IInspectObjectProps) => {\n const dispatch = useAppDispatch();\n const onClose = () => closeInspectModalAndRefresh(false);\n const [isEncrypt, setIsEncrypt] = useState(true);\n const [decryptionKey, setDecryptionKey] = useState(\"\");\n const [insFileName, setInsFileName] = useState(\"\");\n\n if (!inspectPath) {\n return null;\n }\n const makeRequest = async (url: string) => {\n return await fetch(url, { method: \"GET\" });\n };\n\n const performInspect = async () => {\n const file = encodeURLString(inspectPath + \"/xl.meta\");\n const volume = encodeURLString(volumeName);\n\n const urlOfInspectApi = `/api/v1/admin/inspect?volume=${volume}&file=${file}&encrypt=${isEncrypt}`;\n\n makeRequest(urlOfInspectApi)\n .then(async (res) => {\n if (!res.ok) {\n const resErr: any = await res.json();\n\n dispatch(\n setErrorSnackMessage({\n errorMessage: resErr.message,\n detailedError: resErr.code,\n })\n );\n }\n const blob: Blob = await res.blob();\n\n //@ts-ignore\n const filename = res.headers.get(\"content-disposition\").split('\"')[1];\n const decryptKey = getCookieValue(filename) || \"\";\n\n performDownload(blob, filename);\n setInsFileName(filename);\n if (decryptKey === \"\") {\n onClose();\n return;\n }\n setDecryptionKey(decryptKey);\n })\n .catch((err) => {\n dispatch(setErrorSnackMessage(err));\n });\n };\n\n const onCloseDecKeyModal = () => {\n deleteCookie(insFileName);\n onClose();\n setDecryptionKey(\"\");\n };\n\n const onSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n };\n\n return (\n \n {!decryptionKey && (\n }\n title={`Inspect Object`}\n onClose={onClose}\n >\n \n \n )}\n {decryptionKey ? (\n }\n >\n \n \n This will be displayed only once. It cannot be recovered.\n \n Use secure medium to share this key.\n \n \n \n \n \n \n ) : null}\n \n );\n};\n\nexport default withStyles(styles)(InspectObject);\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, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { Button } from \"mds\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { Theme } from \"@mui/material/styles\";\nimport { EditIcon } from \"../../../icons\";\nimport {\n containerForHeader,\n formFieldStyles,\n modalStyleUtils,\n spacingUtils,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { IFileInfo } from \"../Buckets/ListBuckets/Objects/ObjectDetails/types\";\nimport { encodeURLString } from \"../../../common/utils\";\nimport { download } from \"../Buckets/ListBuckets/Objects/utils\";\nimport {\n cancelObjectInList,\n completeObject,\n failObject,\n setNewObject,\n updateProgress,\n} from \"./objectBrowserSlice\";\nimport { makeid, storeCallForObjectWithID } from \"./transferManager\";\nimport { useAppDispatch } from \"../../../store\";\nimport ModalWrapper from \"../Common/ModalWrapper/ModalWrapper\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\n\ninterface IRenameLongFilename {\n open: boolean;\n bucketName: string;\n internalPaths: string;\n currentItem: string;\n actualInfo: IFileInfo;\n closeModal: () => void;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n ...modalStyleUtils,\n ...formFieldStyles,\n ...spacingUtils,\n ...containerForHeader(theme.spacing(4)),\n })\n);\n\nconst RenameLongFileName = ({\n open,\n closeModal,\n currentItem,\n internalPaths,\n actualInfo,\n bucketName,\n}: IRenameLongFilename) => {\n const classes = useStyles();\n const dispatch = useAppDispatch();\n\n const [newFileName, setNewFileName] = useState(currentItem);\n const [acceptLongName, setAcceptLongName] = useState(false);\n\n const doDownload = (e: React.FormEvent) => {\n e.preventDefault();\n\n const identityDownload = encodeURLString(\n `${bucketName}-${\n actualInfo.name\n }-${new Date().getTime()}-${Math.random()}`\n );\n\n const ID = makeid(8);\n\n const downloadCall = download(\n bucketName,\n internalPaths,\n actualInfo.version_id,\n parseInt(actualInfo.size || \"0\"),\n newFileName,\n ID,\n (progress) => {\n dispatch(\n updateProgress({\n instanceID: identityDownload,\n progress: progress,\n })\n );\n },\n () => {\n dispatch(completeObject(identityDownload));\n },\n (msg: string) => {\n dispatch(failObject({ instanceID: identityDownload, msg }));\n },\n () => {\n dispatch(cancelObjectInList(identityDownload));\n }\n );\n\n storeCallForObjectWithID(ID, downloadCall);\n dispatch(\n setNewObject({\n ID,\n bucketName,\n done: false,\n instanceID: identityDownload,\n percentage: 0,\n prefix: newFileName,\n type: \"download\",\n waitingForFile: true,\n failed: false,\n cancelled: false,\n errorMessage: \"\",\n })\n );\n closeModal();\n };\n\n return (\n }\n >\n
\n The file you are trying to download has a long name.\n \n This can cause issues on Windows Systems by trimming the file name after\n download.\n \n We recommend to rename the file download\n
\n \n \n );\n};\n\nexport default RenameLongFileName;\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 { useSelector } from \"react-redux\";\nimport { Box } from \"@mui/material\";\nimport { withStyles } from \"@mui/styles\";\nimport { Button } from \"mds\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport get from \"lodash/get\";\nimport Grid from \"@mui/material/Grid\";\nimport {\n actionsTray,\n buttonsStyles,\n detailsPanel,\n spacingUtils,\n textStyleUtils,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\nimport { IFileInfo, MetadataResponse } from \"../ObjectDetails/types\";\nimport { download, extensionPreview } from \"../utils\";\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\n\nimport {\n decodeURLString,\n encodeURLString,\n getClientOS,\n niceBytes,\n niceBytesInt,\n niceDaysInt,\n} from \"../../../../../../common/utils\";\nimport {\n IAM_SCOPES,\n permissionTooltipHelper,\n} from \"../../../../../../common/SecureComponent/permissions\";\nimport { AppState, useAppDispatch } from \"../../../../../../store\";\nimport {\n DeleteIcon,\n DownloadIcon,\n LegalHoldIcon,\n MetadataIcon,\n ObjectInfoIcon,\n PreviewIcon,\n RetentionIcon,\n ShareIcon,\n TagsIcon,\n VersionsIcon,\n} from \"../../../../../../icons\";\nimport { InspectMenuIcon } from \"../../../../../../icons/SidebarMenus\";\nimport api from \"../../../../../../common/api\";\nimport ShareFile from \"../ObjectDetails/ShareFile\";\nimport SetRetention from \"../ObjectDetails/SetRetention\";\nimport DeleteObject from \"../ListObjects/DeleteObject\";\nimport SetLegalHoldModal from \"../ObjectDetails/SetLegalHoldModal\";\nimport {\n hasPermission,\n SecureComponent,\n} from \"../../../../../../common/SecureComponent\";\nimport PreviewFileModal from \"../Preview/PreviewFileModal\";\nimport ObjectMetaData from \"../ObjectDetails/ObjectMetaData\";\nimport ActionsListSection from \"./ActionsListSection\";\nimport { displayFileIconName } from \"./utils\";\nimport TagsModal from \"../ObjectDetails/TagsModal\";\nimport InspectObject from \"./InspectObject\";\nimport Loader from \"../../../../Common/Loader/Loader\";\nimport { selDistSet } from \"../../../../../../systemSlice\";\nimport {\n makeid,\n storeCallForObjectWithID,\n} from \"../../../../ObjectBrowser/transferManager\";\nimport {\n cancelObjectInList,\n completeObject,\n failObject,\n setLoadingObjectInfo,\n setLoadingVersions,\n setNewObject,\n setSelectedVersion,\n setVersionsModeEnabled,\n updateProgress,\n} from \"../../../../ObjectBrowser/objectBrowserSlice\";\nimport RenameLongFileName from \"../../../../ObjectBrowser/RenameLongFilename\";\nimport TooltipWrapper from \"../../../../Common/TooltipWrapper/TooltipWrapper\";\n\nconst styles = () =>\n createStyles({\n ObjectDetailsTitle: {\n display: \"flex\",\n alignItems: \"center\",\n \"& .min-icon\": {\n width: 26,\n height: 26,\n minWidth: 26,\n minHeight: 26,\n },\n },\n objectNameContainer: {\n whiteSpace: \"nowrap\",\n textOverflow: \"ellipsis\",\n overflow: \"hidden\",\n alignItems: \"center\",\n marginLeft: 10,\n },\n headerForSection: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n paddingBottom: 15,\n borderBottom: \"#E2E2E2 2px solid\",\n fontWeight: \"bold\",\n fontSize: 18,\n color: \"#000\",\n margin: \"20px 22px\",\n },\n capitalizeFirst: {\n textTransform: \"capitalize\",\n },\n ...buttonsStyles,\n ...actionsTray,\n ...spacingUtils,\n ...textStyleUtils,\n ...detailsPanel,\n });\n\nconst emptyFile: IFileInfo = {\n is_latest: true,\n last_modified: \"\",\n legal_hold_status: \"\",\n name: \"\",\n retention_mode: \"\",\n retention_until_date: \"\",\n size: \"0\",\n tags: {},\n version_id: null,\n};\n\ninterface IObjectDetailPanelProps {\n classes: any;\n internalPaths: string;\n bucketName: string;\n versioning: boolean;\n locking: boolean;\n onClosePanel: (hardRefresh: boolean) => void;\n}\n\nconst ObjectDetailPanel = ({\n classes,\n internalPaths,\n bucketName,\n versioning,\n locking,\n onClosePanel,\n}: IObjectDetailPanelProps) => {\n const dispatch = useAppDispatch();\n\n const distributedSetup = useSelector(selDistSet);\n const versionsMode = useSelector(\n (state: AppState) => state.objectBrowser.versionsMode\n );\n const selectedVersion = useSelector(\n (state: AppState) => state.objectBrowser.selectedVersion\n );\n const loadingObjectInfo = useSelector(\n (state: AppState) => state.objectBrowser.loadingObjectInfo\n );\n\n const [shareFileModalOpen, setShareFileModalOpen] = useState(false);\n const [retentionModalOpen, setRetentionModalOpen] = useState(false);\n const [tagModalOpen, setTagModalOpen] = useState(false);\n const [legalholdOpen, setLegalholdOpen] = useState(false);\n const [inspectModalOpen, setInspectModalOpen] = useState(false);\n const [actualInfo, setActualInfo] = useState(null);\n const [allInfoElements, setAllInfoElements] = useState([]);\n const [objectToShare, setObjectToShare] = useState(null);\n const [versions, setVersions] = useState([]);\n const [deleteOpen, setDeleteOpen] = useState(false);\n const [previewOpen, setPreviewOpen] = useState(false);\n const [totalVersionsSize, setTotalVersionsSize] = useState(0);\n const [longFileOpen, setLongFileOpen] = useState(false);\n const [metaData, setMetaData] = useState(null);\n const [loadMetadata, setLoadingMetadata] = useState(false);\n\n const internalPathsDecoded = decodeURLString(internalPaths) || \"\";\n const allPathData = internalPathsDecoded.split(\"/\");\n const currentItem = allPathData.pop() || \"\";\n\n // calculate object name to display\n let objectNameArray: string[] = [];\n if (actualInfo) {\n objectNameArray = actualInfo.name.split(\"/\");\n }\n\n useEffect(() => {\n if (distributedSetup && allInfoElements && allInfoElements.length >= 1) {\n let infoElement =\n allInfoElements.find((el: IFileInfo) => el.is_latest) || emptyFile;\n\n if (selectedVersion !== \"\") {\n infoElement =\n allInfoElements.find(\n (el: IFileInfo) => el.version_id === selectedVersion\n ) || emptyFile;\n }\n\n if (!infoElement.is_delete_marker) {\n setLoadingMetadata(true);\n }\n\n setActualInfo(infoElement);\n }\n }, [selectedVersion, distributedSetup, allInfoElements]);\n\n useEffect(() => {\n if (loadingObjectInfo && internalPaths !== \"\") {\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects?prefix=${internalPaths}${\n distributedSetup ? \"&with_versions=true\" : \"\"\n }`\n )\n .then((res: IFileInfo[]) => {\n const result = get(res, \"objects\", []);\n if (distributedSetup) {\n setAllInfoElements(result);\n setVersions(result);\n const tVersionSize = result.reduce(\n (acc: number, currValue: IFileInfo) => {\n if (currValue?.size) {\n return acc + currValue.size;\n }\n return acc;\n },\n 0\n );\n\n setTotalVersionsSize(tVersionSize);\n } else {\n const resInfo = result[0];\n\n setActualInfo(resInfo);\n setVersions([]);\n\n if (!resInfo.is_delete_marker) {\n setLoadingMetadata(true);\n }\n }\n\n dispatch(setLoadingObjectInfo(false));\n })\n .catch((error: ErrorResponseHandler) => {\n console.error(\"Error loading object details\", error);\n dispatch(setLoadingObjectInfo(false));\n });\n }\n }, [\n loadingObjectInfo,\n bucketName,\n internalPaths,\n dispatch,\n distributedSetup,\n selectedVersion,\n ]);\n\n useEffect(() => {\n if (loadMetadata && internalPaths !== \"\") {\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects/metadata?prefix=${internalPaths}`\n )\n .then((res: MetadataResponse) => {\n let metadata = get(res, \"objectMetadata\", {});\n\n setMetaData(metadata);\n setLoadingMetadata(false);\n })\n .catch((err) => {\n console.error(\"Error Getting Metadata Status: \", err.detailedError);\n setLoadingMetadata(false);\n });\n }\n }, [bucketName, internalPaths, loadMetadata]);\n\n let tagKeys: string[] = [];\n\n if (actualInfo && actualInfo.tags) {\n tagKeys = Object.keys(actualInfo.tags);\n }\n\n const openRetentionModal = () => {\n setRetentionModalOpen(true);\n };\n\n const closeRetentionModal = (updateInfo: boolean) => {\n setRetentionModalOpen(false);\n if (updateInfo) {\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const shareObject = () => {\n setShareFileModalOpen(true);\n };\n\n const closeShareModal = () => {\n setObjectToShare(null);\n setShareFileModalOpen(false);\n };\n\n const closeFileOpen = () => {\n setLongFileOpen(false);\n };\n\n const downloadObject = (object: IFileInfo) => {\n const identityDownload = encodeURLString(\n `${bucketName}-${object.name}-${new Date().getTime()}-${Math.random()}`\n );\n\n if (\n object.name.length > 200 &&\n getClientOS().toLowerCase().includes(\"win\")\n ) {\n setLongFileOpen(true);\n return;\n }\n\n const ID = makeid(8);\n\n const downloadCall = download(\n bucketName,\n internalPaths,\n object.version_id,\n parseInt(object.size || \"0\"),\n null,\n ID,\n (progress) => {\n dispatch(\n updateProgress({\n instanceID: identityDownload,\n progress: progress,\n })\n );\n },\n () => {\n dispatch(completeObject(identityDownload));\n },\n (msg: string) => {\n dispatch(failObject({ instanceID: identityDownload, msg }));\n },\n () => {\n dispatch(cancelObjectInList(identityDownload));\n }\n );\n\n storeCallForObjectWithID(ID, downloadCall);\n dispatch(\n setNewObject({\n ID,\n bucketName,\n done: false,\n instanceID: identityDownload,\n percentage: 0,\n prefix: object.name,\n type: \"download\",\n waitingForFile: true,\n failed: false,\n cancelled: false,\n errorMessage: \"\",\n })\n );\n };\n\n const closeDeleteModal = (closeAndReload: boolean) => {\n setDeleteOpen(false);\n\n if (closeAndReload && selectedVersion === \"\") {\n onClosePanel(true);\n } else {\n dispatch(setLoadingVersions(true));\n dispatch(setSelectedVersion(\"\"));\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const closeAddTagModal = (reloadObjectData: boolean) => {\n setTagModalOpen(false);\n if (reloadObjectData) {\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const closeInspectModal = (reloadObjectData: boolean) => {\n setInspectModalOpen(false);\n if (reloadObjectData) {\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const closeLegalholdModal = (reload: boolean) => {\n setLegalholdOpen(false);\n if (reload) {\n dispatch(setLoadingObjectInfo(true));\n }\n };\n\n const loaderForContainer = (\n
\n )}\n \n \n \n );\n};\n\nexport default withStyles(styles)(DaysSelector);\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 { Theme } from \"@mui/material/styles\";\nimport { Button } from \"mds\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport CopyToClipboard from \"react-copy-to-clipboard\";\nimport Grid from \"@mui/material/Grid\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport {\n formFieldStyles,\n modalStyleUtils,\n} from \"../../../../Common/FormComponents/common/styleLibrary\";\n\nimport { IFileInfo } from \"./types\";\nimport { ErrorResponseHandler } from \"../../../../../../common/types\";\nimport api from \"../../../../../../common/api\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport PredefinedList from \"../../../../Common/FormComponents/PredefinedList/PredefinedList\";\nimport DaysSelector from \"../../../../Common/FormComponents/DaysSelector/DaysSelector\";\nimport { encodeURLString } from \"../../../../../../common/utils\";\nimport { ShareIcon } from \"../../../../../../icons\";\nimport {\n selDistSet,\n setModalErrorSnackMessage,\n setModalSnackMessage,\n} from \"../../../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../../../store\";\n\nconst CopyIcon = React.lazy(() => import(\"../../../../../../icons/CopyIcon\"));\n\nconst styles = (theme: Theme) =>\n createStyles({\n shareLinkInfo: {\n fontSize: 14,\n fontWeight: 400,\n },\n copyShareLink: {\n display: \"flex\",\n \"@media (max-width: 900px)\": {\n flexFlow: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n },\n copyShareLinkInput: {\n \"& div:first-child\": {\n marginTop: 0,\n },\n \"@media (max-width: 900px)\": {\n minWidth: 250,\n },\n },\n copyShareLinkBtn: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n \"@media (max-width: 900px)\": {\n marginTop: 10,\n },\n },\n ...modalStyleUtils,\n ...formFieldStyles,\n });\n\ninterface IShareFileProps {\n classes: any;\n open: boolean;\n bucketName: string;\n dataObject: IFileInfo;\n closeModalAndRefresh: () => void;\n}\n\nconst ShareFile = ({\n classes,\n open,\n closeModalAndRefresh,\n bucketName,\n dataObject,\n}: IShareFileProps) => {\n const dispatch = useAppDispatch();\n const distributedSetup = useSelector(selDistSet);\n const [shareURL, setShareURL] = useState(\"\");\n const [isLoadingVersion, setIsLoadingVersion] = useState(true);\n const [isLoadingFile, setIsLoadingFile] = useState(false);\n const [selectedDate, setSelectedDate] = useState(\"\");\n const [dateValid, setDateValid] = useState(true);\n const [versionID, setVersionID] = useState(\"null\");\n\n const initialDate = new Date();\n\n const dateChanged = (newDate: string, isValid: boolean) => {\n setDateValid(isValid);\n if (isValid) {\n setSelectedDate(newDate);\n return;\n }\n setSelectedDate(\"\");\n setShareURL(\"\");\n };\n\n useEffect(() => {\n // In case version is undefined, we get the latest version of the object\n if (dataObject.version_id === undefined) {\n // In case it is not distributed setup, then we default to \"null\";\n if (distributedSetup) {\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects?prefix=${encodeURLString(\n dataObject.name\n )}${distributedSetup ? \"&with_versions=true\" : \"\"}`\n )\n .then((res: IFileInfo[]) => {\n const result = get(res, \"objects\", []);\n\n const latestVersion = result.find(\n (elem: IFileInfo) => elem.is_latest\n );\n\n if (latestVersion) {\n setVersionID(latestVersion.version_id);\n return;\n }\n\n // Version couldn't ve retrieved, we default\n setVersionID(\"null\");\n })\n .catch((error: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(error));\n });\n\n setIsLoadingVersion(false);\n return;\n }\n setVersionID(\"null\");\n setIsLoadingVersion(false);\n return;\n }\n setVersionID(dataObject.version_id || \"null\");\n setIsLoadingVersion(false);\n }, [bucketName, dataObject, distributedSetup, dispatch]);\n\n useEffect(() => {\n if (dateValid && !isLoadingVersion) {\n setIsLoadingFile(true);\n setShareURL(\"\");\n\n const slDate = new Date(`${selectedDate}`);\n const currDate = new Date();\n\n const diffDate = Math.ceil(\n (slDate.getTime() - currDate.getTime()) / 1000\n );\n\n if (diffDate > 0) {\n api\n .invoke(\n \"GET\",\n `/api/v1/buckets/${bucketName}/objects/share?prefix=${encodeURLString(\n dataObject.name\n )}&version_id=${versionID}${\n selectedDate !== \"\" ? `&expires=${diffDate}s` : \"\"\n }`\n )\n .then((res: string) => {\n setShareURL(res);\n setIsLoadingFile(false);\n })\n .catch((error: ErrorResponseHandler) => {\n dispatch(setModalErrorSnackMessage(error));\n setShareURL(\"\");\n setIsLoadingFile(false);\n });\n }\n }\n }, [\n dataObject,\n selectedDate,\n bucketName,\n dateValid,\n setShareURL,\n dispatch,\n distributedSetup,\n isLoadingVersion,\n versionID,\n ]);\n\n return (\n \n }\n modalOpen={open}\n onClose={() => {\n closeModalAndRefresh();\n }}\n >\n {isLoadingVersion && (\n \n \n \n )}\n {!isLoadingVersion && (\n \n \n This is a temporary URL with integrated access credentials for\n sharing objects valid for up to 7 days.\n \n \n The temporary URL expires after the configured time limit.\n \n \n \n \n \n \n \n \n {\n dispatch(\n setModalSnackMessage(\n \"Share URL Copied to clipboard\"\n )\n );\n }}\n disabled={shareURL === \"\" || isLoadingFile}\n style={{\n marginRight: \"5px\",\n width: \"28px\",\n height: \"28px\",\n padding: \"0px\",\n }}\n icon={}\n />\n \n }\n />\n \n \n \n )}\n \n \n );\n};\n\nexport default withStyles(styles)(ShareFile);\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 createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Grid, LinearProgress } from \"@mui/material\";\nimport { BucketObjectItem } from \"../ListObjects/types\";\nimport { extensionPreview } from \"../utils\";\nimport { encodeURLString } from \"../../../../../../common/utils\";\nimport clsx from \"clsx\";\n\nconst styles = () =>\n createStyles({\n iframeContainer: {\n border: \"0px\",\n flex: \"1 1 auto\",\n width: \"100%\",\n height: 250,\n backgroundColor: \"transparent\",\n borderRadius: 5,\n\n \"&.image\": {\n height: 500,\n },\n \"&.text\": {\n height: 700,\n },\n \"&.audio\": {\n height: 150,\n },\n \"&.video\": {\n height: 350,\n },\n \"&.fullHeight\": {\n height: \"calc(100vh - 185px)\",\n },\n },\n iframeBase: {\n backgroundColor: \"#fff\",\n },\n iframeHidden: {\n display: \"none\",\n },\n });\n\ninterface IPreviewFileProps {\n bucketName: string;\n object: BucketObjectItem | null;\n isFullscreen?: boolean;\n classes: any;\n}\n\nconst PreviewFile = ({\n bucketName,\n object,\n isFullscreen = false,\n classes,\n}: IPreviewFileProps) => {\n const [loading, setLoading] = useState(true);\n\n let path = \"\";\n\n if (object) {\n const encodedPath = encodeURLString(object.name);\n let basename = document.baseURI.replace(window.location.origin, \"\");\n path = `${window.location.origin}${basename}api/v1/buckets/${bucketName}/objects/download?preview=true&prefix=${encodedPath}`;\n if (object.version_id) {\n path = path.concat(`&version_id=${object.version_id}`);\n }\n }\n\n const objectType = extensionPreview(object?.name || \"\");\n\n const iframeLoaded = () => {\n setLoading(false);\n };\n\n return (\n \n {loading && (\n \n \n \n )}\n
\n \n );\n};\nexport default withStyles(styles)(PreviewFile);\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 } from \"react\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport PreviewFileContent from \"./PreviewFileContent\";\nimport { BucketObjectItem } from \"../ListObjects/types\";\nimport { ObjectPreviewIcon } from \"../../../../../../icons\";\n\ninterface IPreviewFileProps {\n open: boolean;\n bucketName: string;\n object: BucketObjectItem | null;\n onClosePreview: () => void;\n}\n\nconst PreviewFileModal = ({\n open,\n bucketName,\n object,\n onClosePreview,\n}: IPreviewFileProps) => {\n return (\n \n }\n >\n \n \n \n );\n};\n\nexport default PreviewFileModal;\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 { BucketObjectItem } from \"./ListObjects/types\";\nimport { IAllowResources } from \"../../../types\";\nimport { encodeURLString } from \"../../../../../common/utils\";\nimport { removeTrace } from \"../../../ObjectBrowser/transferManager\";\n\nexport const download = (\n bucketName: string,\n objectPath: string,\n versionID: any,\n fileSize: number,\n overrideFileName: string | null = null,\n id: string,\n progressCallback: (progress: number) => void,\n completeCallback: () => void,\n errorCallback: (msg: string) => void,\n abortCallback: () => void\n) => {\n const anchor = document.createElement(\"a\");\n document.body.appendChild(anchor);\n let basename = document.baseURI.replace(window.location.origin, \"\");\n\n let path = `${\n window.location.origin\n }${basename}api/v1/buckets/${bucketName}/objects/download?prefix=${objectPath}${\n overrideFileName !== null && overrideFileName.trim() !== \"\"\n ? `&override_file_name=${encodeURLString(overrideFileName || \"\")}`\n : \"\"\n }`;\n if (versionID) {\n path = path.concat(`&version_id=${versionID}`);\n }\n\n var req = new XMLHttpRequest();\n req.open(\"GET\", path, true);\n req.addEventListener(\n \"progress\",\n function (evt) {\n let percentComplete = Math.round((evt.loaded / fileSize) * 100);\n\n if (progressCallback) {\n progressCallback(percentComplete);\n }\n },\n false\n );\n\n req.responseType = \"blob\";\n req.onreadystatechange = () => {\n if (req.readyState === 4) {\n if (req.status === 200) {\n const rspHeader = req.getResponseHeader(\"Content-Disposition\");\n\n let filename = \"download\";\n if (rspHeader) {\n let rspHeaderDecoded = decodeURIComponent(rspHeader);\n filename = rspHeaderDecoded.split('\"')[1];\n }\n\n if (completeCallback) {\n completeCallback();\n }\n\n removeTrace(id);\n\n var link = document.createElement(\"a\");\n link.href = window.URL.createObjectURL(req.response);\n link.download = filename;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n } else {\n if (req.getResponseHeader(\"Content-Type\") === \"application/json\") {\n const rspBody: { detailedMessage?: string } = JSON.parse(\n req.response\n );\n if (rspBody.detailedMessage) {\n errorCallback(rspBody.detailedMessage);\n return;\n }\n }\n errorCallback(`Unexpected response status code (${req.status}).`);\n }\n }\n };\n req.onerror = () => {\n if (errorCallback) {\n errorCallback(\"A network error occurred.\");\n }\n };\n req.onabort = () => {\n if (abortCallback) {\n abortCallback();\n }\n };\n\n return req;\n};\n\n// Review file extension by name & returns the type of preview browser that can be used\nexport const extensionPreview = (\n fileName: string\n): \"image\" | \"text\" | \"audio\" | \"video\" | \"none\" => {\n const imageExtensions = [\n \"jif\",\n \"jfif\",\n \"apng\",\n \"avif\",\n \"svg\",\n \"webp\",\n \"bmp\",\n \"ico\",\n \"jpg\",\n \"jpe\",\n \"jpeg\",\n \"gif\",\n \"png\",\n \"heic\",\n ];\n const textExtensions = [\"pdf\", \"txt\", \"json\"];\n const audioExtensions = [\"wav\", \"mp3\", \"alac\", \"aiff\", \"dsd\", \"pcm\"];\n const videoExtensions = [\n \"mp4\",\n \"avi\",\n \"mpg\",\n \"webm\",\n \"mov\",\n \"flv\",\n \"mkv\",\n \"wmv\",\n \"avchd\",\n \"mpeg-4\",\n ];\n\n let fileExtension = fileName.split(\".\").pop();\n\n if (!fileExtension) {\n return \"none\";\n }\n\n fileExtension = fileExtension.toLowerCase();\n\n if (imageExtensions.includes(fileExtension)) {\n return \"image\";\n }\n\n if (textExtensions.includes(fileExtension)) {\n return \"text\";\n }\n\n if (audioExtensions.includes(fileExtension)) {\n return \"audio\";\n }\n\n if (videoExtensions.includes(fileExtension)) {\n return \"video\";\n }\n\n return \"none\";\n};\n\nexport const sortListObjects = (fieldSort: string) => {\n switch (fieldSort) {\n case \"name\":\n return (a: BucketObjectItem, b: BucketObjectItem) =>\n a.name.localeCompare(b.name);\n case \"last_modified\":\n return (a: BucketObjectItem, b: BucketObjectItem) =>\n new Date(a.last_modified).getTime() -\n new Date(b.last_modified).getTime();\n case \"size\":\n return (a: BucketObjectItem, b: BucketObjectItem) =>\n (a.size || -1) - (b.size || -1);\n }\n};\n\nexport const permissionItems = (\n bucketName: string,\n currentPath: string,\n permissionsArray: IAllowResources[]\n): BucketObjectItem[] | null => {\n if (permissionsArray.length === 0) {\n return null;\n }\n\n // We get permissions applied to the current bucket\n const filteredPermissionsForBucket = permissionsArray.filter(\n (permissionItem) =>\n permissionItem.resource.endsWith(`:${bucketName}`) ||\n permissionItem.resource.includes(`:${bucketName}/`)\n );\n\n // No permissions for this bucket. we can throw the error message at this point\n if (filteredPermissionsForBucket.length === 0) {\n return null;\n }\n\n const returnElements: BucketObjectItem[] = [];\n\n // We split current path\n const splitCurrentPath = currentPath.split(\"/\");\n\n filteredPermissionsForBucket.forEach((permissionElement) => {\n // We review paths in resource address\n\n // We split ARN & get the last item to check the URL\n const splitARN = permissionElement.resource.split(\":\");\n const urlARN = splitARN.pop() || \"\";\n\n // We split the paths of the URL & compare against current location to see if there are more items to include. In case current level is a wildcard or is the last one, we omit this validation\n\n const splitURLARN = urlARN.split(\"/\");\n\n // splitURL has more items than bucket name, we can continue validating\n if (splitURLARN.length > 1) {\n splitURLARN.every((currentElementInPath, index) => {\n // It is a wildcard element. We can stor the verification as value should be included (?)\n if (currentElementInPath === \"*\") {\n return false;\n }\n\n // Element is not included in the path. The user is trying to browse something else.\n if (\n splitCurrentPath[index] &&\n splitCurrentPath[index] !== currentElementInPath\n ) {\n return false;\n }\n\n // This element is not included by index in the current paths list. We add it so user can browse into it\n if (!splitCurrentPath[index]) {\n returnElements.push({\n name: `${currentElementInPath}/`,\n size: 0,\n last_modified: \"\",\n version_id: \"\",\n });\n }\n\n return true;\n });\n }\n\n // We review prefixes in allow resources for StringEquals variant only.\n if (\n permissionElement.conditionOperator === \"StringEquals\" ||\n permissionElement.conditionOperator === \"StringLike\"\n ) {\n permissionElement.prefixes.forEach((prefixItem) => {\n // Prefix Item is not empty?\n if (prefixItem !== \"\") {\n const splitItems = prefixItem.split(\"/\");\n\n let pathToRouteElements: string[] = [];\n\n splitItems.every((splitElement, index) => {\n if (!splitElement.includes(\"*\") && splitElement !== \"\") {\n if (splitElement !== splitCurrentPath[index]) {\n returnElements.push({\n name: `${pathToRouteElements.join(\"/\")}${\n pathToRouteElements.length > 0 ? \"/\" : \"\"\n }${splitElement}/`,\n size: 0,\n last_modified: \"\",\n version_id: \"\",\n });\n return false;\n }\n if (splitElement !== \"\") {\n pathToRouteElements.push(splitElement);\n }\n\n return true;\n }\n return false;\n });\n }\n });\n }\n });\n\n return returnElements;\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 { LoginMinIOLogo } from \"../../../../icons\";\nimport { useSelector } from \"react-redux\";\nimport { AppState } from \"../../../../store\";\n\ninterface IAutoColorIcon {\n marginRight: number;\n marginTop: number;\n}\n\nconst AutoColorIcon = ({ marginRight, marginTop }: IAutoColorIcon) => {\n let tinycolor = require(\"tinycolor2\");\n\n const colorVariants = useSelector(\n (state: AppState) => state.system.overrideStyles\n );\n\n const isDark =\n tinycolor(colorVariants?.backgroundColor || \"#fff\").getBrightness() <= 128;\n\n return (\n \n );\n};\n\nexport default AutoColorIcon;\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, { ComponentType, Suspense, SuspenseProps } from \"react\";\n\nfunction withSuspense
\n )}\n \n \n \n );\n};\n\nexport default withStyles(styles)(PredefinedList);\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 IconButton from \"@mui/material/IconButton\";\nimport Snackbar from \"@mui/material/Snackbar\";\nimport { Dialog, DialogContent, DialogTitle } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport {\n deleteDialogStyles,\n snackBarCommon,\n} from \"../FormComponents/common/styleLibrary\";\nimport { AppState, useAppDispatch } from \"../../../../store\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport MainError from \"../MainError/MainError\";\nimport { setModalSnackMessage } from \"../../../../systemSlice\";\n\ninterface IModalProps {\n classes: any;\n onClose: () => void;\n modalOpen: boolean;\n title: string | React.ReactNode;\n children: any;\n wideLimit?: boolean;\n noContentPadding?: boolean;\n titleIcon?: React.ReactNode;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...deleteDialogStyles,\n content: {\n padding: 25,\n paddingBottom: 0,\n },\n customDialogSize: {\n width: \"100%\",\n maxWidth: 765,\n },\n ...snackBarCommon,\n });\n\nconst ModalWrapper = ({\n onClose,\n modalOpen,\n title,\n children,\n classes,\n wideLimit = true,\n noContentPadding,\n titleIcon = null,\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 const customSize = wideLimit\n ? {\n classes: {\n paper: classes.customDialogSize,\n },\n }\n : { maxWidth: \"lg\" as const, fullWidth: true };\n\n let message = \"\";\n\n if (modalSnackMessage) {\n message = modalSnackMessage.detailedErrorMsg;\n if (\n modalSnackMessage.detailedErrorMsg === \"\" ||\n modalSnackMessage.detailedErrorMsg.length < 5\n ) {\n message = modalSnackMessage.message;\n }\n }\n\n return (\n \n );\n};\n\nexport default withStyles(styles)(ModalWrapper);\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 InputAdornment from \"@mui/material/InputAdornment\";\nimport SearchIcon from \"../../../icons/SearchIcon\";\nimport TextField from \"@mui/material/TextField\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { searchField } from \"./FormComponents/common/styleLibrary\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n searchField: {\n ...searchField.searchField,\n },\n adornment: {},\n });\n\ntype SearchBoxProps = {\n placeholder?: string;\n value: string;\n classes: any;\n onChange: (value: string) => void;\n adornmentPosition?: \"start\" | \"end\";\n overrideClass?: any;\n};\n\nconst SearchBox = ({\n placeholder = \"\",\n classes,\n onChange,\n adornmentPosition = \"end\",\n overrideClass,\n value,\n}: SearchBoxProps) => {\n const inputProps = {\n disableUnderline: true,\n [`${adornmentPosition}Adornment`]: (\n \n \n \n ),\n };\n return (\n {\n onChange(e.target.value);\n }}\n variant=\"standard\"\n value={value}\n />\n );\n};\n\nexport default withStyles(styles)(SearchBox);\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 { Box } from \"@mui/material\";\nimport { Button } from \"mds\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport { CopyIcon } from \"../../../icons\";\n\nconst KeyRevealer = ({ value }: { value: string }) => {\n const [shown, setShown] = useState(false);\n\n return (\n \n {}}\n value={value}\n overlayIcon={}\n extraInputProps={{\n readOnly: true,\n }}\n overlayAction={() => navigator.clipboard.writeText(value)}\n />\n\n setShown(!shown)}\n label={\"Show/Hide\"}\n />\n \n );\n};\n\nexport default KeyRevealer;\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\n// Close codes for websockets defined in RFC 6455\nexport const WSCloseNormalClosure = 1000;\nexport const WSCloseCloseGoingAway = 1001;\nexport const WSCloseAbnormalClosure = 1006;\nexport const WSClosePolicyViolation = 1008;\nexport const WSCloseInternalServerErr = 1011;\n\nexport const wsProtocol = (protocol: string): string => {\n let wsProtocol = \"ws\";\n if (protocol === \"https:\") {\n wsProtocol = \"wss\";\n }\n return wsProtocol;\n};\n"],"names":["objectsWS","CreatePathModal","withSuspense","React","withStyles","theme","createStyles","objectBrowserCommon","slashSpacingStyle","margin","classes","bucketName","internalPaths","hidePathButton","additionalOptions","dispatch","useAppDispatch","navigate","useNavigate","rewindEnabled","useSelector","state","objectBrowser","rewind","versionsMode","versionedFile","useState","createFolderOpen","setCreateFolderOpen","canCreatePath","hasPermission","IAM_SCOPES","paths","splitPaths","split","filter","path","lastBreadcrumbsIndex","length","breadcrumbsMap","map","objectItem","index","subSplit","slice","join","route","encodeURLString","Fragment","className","style","cursor","to","onClick","setVersionsModeEnabled","status","objectName","toString","versionsItem","listBreadcrumbs","breadcrumbsMain","modalOpen","folderName","onClose","Grid","item","xs","breadcrumbs","IconButton","sx","border","backgroundColor","borderLeft","borderRadius","width","height","marginRight","breadcrumbsList","dir","text","id","icon","fill","marginTop","variant","setSnackBarMessage","color","TooltipWrapper","tooltip","permissionTooltipHelper","disabled","whiteSpace","label","breadcrumbsSecond","listUploadIcons","uploadPath","forceDisable","uploadFileFunction","uploadFolderFunction","anchorEl","setAnchorEl","openUploadMenu","Boolean","handleCloseUpload","uploadObjectAllowed","uploadFolderAllowed","uploadEnabled","undefined","event","currentTarget","Menu","open","anchorOrigin","vertical","horizontal","transformOrigin","MenuItem","ListItemIcon","ListItemText","useStyles","makeStyles","detailsList","borderColor","borderWidth","borderStyle","borderBottomLeftRadius","borderBottomRightRadius","transitionDuration","overflowX","overflowY","position","opacity","marginLeft","minWidth","borderLeftWidth","closePanel","right","top","children","months","value","days","Array","from","_","num","currentYear","Date","getFullYear","years","numYear","SelectStyled","root","input","borderBottom","fontSize","InputBase","DateSelector","forwardRef","ref","disableOptions","addSwitch","onDateChange","useImperativeHandle","resetDate","dateEnabled","setDateEnabled","month","setMonth","day","setDay","year","setYear","useEffect","valueSplit","parseInt","currentDate","parse","isNaN","parsedMonth","parsedDay","monthForString","dayForString","parsedDate","toISOString","dateString","validDate","isValid","isDateDisabled","clsx","fieldContainer","fieldContainerBorder","labelContainer","container","InputLabel","htmlFor","inputLabel","tooltipContainer","Tooltip","title","placement","HelpIcon","FormSwitchWrapper","indicatorLabels","checked","name","onChange","e","target","switchOnly","FormControl","dateInput","Select","displayEmpty","option","dayNumber","fieldBasic","tooltipHelper","flex","display","alignItems","justifyContent","paddingBottom","marginBottom","formFieldStyles","modalStyleUtils","spacingUtils","dateSelector","paddingLeft","closeModalAndRefresh","objectInfo","statusEnabled","setStatusEnabled","type","setType","date","setDate","isDateValid","setIsDateValid","isSaving","setIsSaving","alreadyConfigured","setAlreadyConfigured","retention_mode","toLowerCase","retention_until_date","valueDate","getMonth","getDate","dateElement","useRef","resetForm","current","showSwitcher","ModalWrapper","spacerBottom","noValidate","autoComplete","onSubmit","preventDefault","formFieldRow","RadioGroupSelector","currentSelection","selectorOptions","modalButtonBar","selectedObject","versionId","version_id","expireDate","api","expires","mode","then","res","catch","error","setModalErrorSnackMessage","addRetention","disableRetention","closeDeleteModalAndRefresh","deleteOpen","selectedBucket","versioning","selectedVersion","useApi","err","setErrorSnackMessage","deleteLoading","invokeDeleteApi","deleteVersions","setDeleteVersions","ConfirmDialog","confirmText","isOpen","titleIcon","isLoading","onConfirm","recursive","decodeURLString","endsWith","confirmationContent","DialogContentText","description","actualInfo","legalHoldEnabled","setLegalHoldEnabled","get","propertiesIcon","capitalizeFirst","textTransform","titleItem","detailsPanel","metaData","linear","metaKeys","Object","keys","element","renderItem","isArray","decodeURIComponent","Box","metadataLinear","Table","table","TableBody","TableRow","TableCell","component","scope","align","padding","fontWeight","restProps","Button","startIcon","items","titleLabel","objectActions","actionItem","action","fileName","minHeight","fileNameText","overflow","textOverflow","strings","FileBookIcon","FileCodeIcon","FileConfigIcon","FileDbIcon","FileFontIcon","FileImageIcon","FileLockIcon","FileMissingIcon","FileMusicIcon","FilePdfIcon","FilePptIcon","FileTxtIcon","FileVideoIcon","FileXlsIcon","FileZipIcon","extensionToIcon","extensions","displayFileIconName","returnOnlyIcon","elementString","ObjectBrowserIcon","ObjectBrowserFolderIcon","lowercaseElement","etc","ext","indexOf","splitItem","newTileHeader","tagsForLabel","currentTagsContainer","noTagsForObject","deleteTag","onCloseAndUpdate","distributedSetup","selDistSet","newKey","setNewKey","newLabel","setNewLabel","isSending","setIsSending","deleteEnabled","setDeleteEnabled","deleteKey","setDeleteKey","deleteLabel","setDeleteLabel","currentTags","tags","currTagKeys","currentItem","pop","tagsFor","plural","cleanObject","verID","SecureComponent","scopes","resource","flexFlow","tagKey","tag","errorProps","deleteIcon","onDelete","Chip","size","Close","onDeleteTag","InputBoxWrapper","placeholder","trim","newTag","newTagList","closeInspectModalAndRefresh","inspectOpen","inspectPath","volumeName","isEncrypt","setIsEncrypt","decryptionKey","setDecryptionKey","insFileName","setInsFileName","makeRequest","url","fetch","method","performInspect","file","volume","urlOfInspectApi","ok","json","resErr","errorMessage","message","detailedError","code","blob","filename","headers","decryptKey","getCookieValue","performDownload","deleteCookie","KeyRevealer","containerForHeader","spacing","closeModal","newFileName","setNewFileName","acceptLongName","setAcceptLongName","identityDownload","getTime","Math","random","ID","makeid","downloadCall","download","progress","updateProgress","instanceID","completeObject","msg","failObject","cancelObjectInList","storeCallForObjectWithID","setNewObject","done","percentage","prefix","waitingForFile","failed","cancelled","doDownload","modalFormScrollable","emptyFile","is_latest","last_modified","legal_hold_status","ObjectDetailsTitle","objectNameContainer","headerForSection","buttonsStyles","actionsTray","textStyleUtils","locking","onClosePanel","loadingObjectInfo","shareFileModalOpen","setShareFileModalOpen","retentionModalOpen","setRetentionModalOpen","tagModalOpen","setTagModalOpen","legalholdOpen","setLegalholdOpen","inspectModalOpen","setInspectModalOpen","setActualInfo","allInfoElements","setAllInfoElements","objectToShare","setObjectToShare","versions","setVersions","setDeleteOpen","previewOpen","setPreviewOpen","totalVersionsSize","setTotalVersionsSize","longFileOpen","setLongFileOpen","setMetaData","loadMetadata","setLoadingMetadata","objectNameArray","infoElement","find","el","is_delete_marker","result","tVersionSize","reduce","acc","currValue","resInfo","setLoadingObjectInfo","console","metadata","tagKeys","loaderForContainer","textAlign","Loader","objectResources","canSetLegalHold","canSetTags","canChangeRetention","canInspect","canChangeVersioning","canGetObject","canDelete","multiActionButtons","object","getClientOS","includes","downloadObject","extensionPreview","ShareFile","dataObject","updateInfo","closeAndReload","setLoadingVersions","setSelectedVersion","reload","PreviewFileModal","content_type","onClosePreview","TagsModal","reloadObjectData","iconLocation","fullWidth","detailContainer","overflowWrap","niceBytes","niceBytesInt","lastModified","currentTime","modifiedTime","difTime","formatTime","niceDaysInt","calculateLastModifyTime","etag","modalBasic","versionToRestore","objectPath","restoreOpen","restoreLoading","setRestoreLoading","RecoverIcon","log","restoreLocalObjectList","confirmButtonProps","wrapText","bgColor","mainFileVersionItem","intermediateLayer","borderBottomColor","versionContainer","buttonContainer","versionID","maxWidth","versionData","ctrItem","content","left","collapsableInfo","flexDirection","versionItem","versionInfo","isSelected","checkable","isChecked","onCheck","onShare","onDownload","onRestore","onPreview","globalClick","key","disableButtons","versionItemButtons","pill","md","CheckboxWrapper","stopPropagation","overrideCheckboxStyles","noTopMargin","button","buttonDisabled","setDeleteLoading","typeConfirm","setTypeConfirm","selectedVersions","selectedObjectsRequest","versionsContainer","noBottomBorder","versionsVirtualPanel","flexGrow","screenTitleContainer","bottom","sortByLabel","hrClass","tableStyles","objectBrowserExtras","searchVersions","loadingVersions","restoreVersionOpen","setRestoreVersionOpen","restoreVersion","setRestoreVersion","sortValue","setSortValue","deleteNonCurrentOpen","setDeleteNonCurrentOpen","selectEnabled","setSelectEnabled","selectedItems","setSelectedItems","delSelectedVOpen","setDelSelectedVOpen","decodedInternalPaths","filteredPrefixes","onShareItem","onPreviewItem","onRestoreItem","onDownloadItem","onGlobalClick","filteredRecords","version","totalSpace","sort","a","b","dateA","dateB","onCheckVersion","filteredItems","cloneState","push","DeleteNonCurrent","reloadAfterDelete","DeleteSelectedVersions","reloadOnComplete","LinearProgress","ScreenTitle","listIcon","titleSpacer","subTitle","bucketDetails","detailsSpacer","actions","SelectWrapper","options","containerStyle","rowCount","rowHeight","rowRenderer","isScrolling","isVisible","versOrd","displayParsedDate","displayNiceBytes","String","listModeColumns","elementKey","renderFunction","enableSort","renderFullObject","rewindModeColumns","browsePaper","parentWrapper","backgroundImage","params","useParams","sortDirection","setSortDirection","currentSortField","setCurrentSortField","detailsOpen","objectDetailsOpen","loadingObjects","features","selFeatures","obOnly","records","searchObjects","selectedObjects","displayListObjects","sortASC","sortListObjects","payload","reverse","tableActions","idElement","setSelectedObjects","newPath","setObjectDetailsView","setSelectedObjectView","sendOnlyId","TableWrapper","itemActions","columns","entityName","idField","customPaperHeight","onSelect","targetD","elements","customEmptyMessage","sortConfig","currentSort","currentDirection","triggerSort","sortData","newSortDirection","sortBy","setLoadingObjects","onSelectAll","rowStyle","delete_flag","parentClassName","downloadSelected","createAsyncThunk","getState","rejectWithValue","itemsToDownload","filterFunction","setDownloadRenameModal","forEach","filteredItem","openPreview","findFunction","fileObject","setSelectedPreview","openShare","HistoryIcon","RefreshIcon","DeleteIcon","DeleteMultipleObjects","RewindEnable","badgeOverlap","screenTitle","paddingTop","paddingRight","searchField","labelStyle","breadcrumbsContainer","fullContainer","hideListOnSmall","baseDnDStyle","outline","activeDnDStyle","acceptDnDStyle","location","useLocation","bucketToRewind","showDeleted","selectedInternalPaths","simplePath","isVersioned","lockingEnabled","downloadRenameModal","selectedPreview","loadingBucket","selBucketDetailsLoading","bucketInfo","selBucketDetailsInfo","deleteMultipleOpen","setDeleteMultipleOpen","rewindSelect","setRewindSelect","iniLoad","setIniLoad","canShareFile","setCanShareFile","canPreviewFile","setCanPreviewFile","quota","setQuota","pathSegment","pathname","pageTitle","currentPath","i","concat","fileUpload","folderUpload","canDownload","canUpload","displayDeleteObject","setSearchObjects","resetRewind","setAttribute","quotaVals","setBucketDetailsLoad","setBucketInfo","handleUploadButton","files","newFiles","uploadObject","useCallback","folderPath","pathPrefix","uploadPromise","Promise","resolve","reject","uploadUrl","blobFile","Blob","encodedPath","filePath","fileWebkitRelativePath","relativeFolderPath","finalFolderPath","pathClean","startsWith","identity","xhr","XMLHttpRequest","areMultipleFiles","errorMessages","withCredentials","onload","removeTrace","response","JSON","detailedMessage","upload","addEventListener","floor","loaded","total","onerror","onloadend","onabort","formData","FormData","append","storeFormDataWithID","uploadFilePromises","openList","allSettled","results","errors","totalFiles","successUploadedFiles","onDrop","acceptedFiles","newFolderPath","useDropzone","noClick","getRootProps","getInputProps","isDragActive","isDragAccept","dndStyles","useMemo","forceRefresh","splitURLS","URLItem","refresh","PageLayout","creation_date","access","objects","actionsSection","Badge","badgeContent","invisible","resetMessages","setLoadingRecords","multiple","closeMenu","click","tableBlock","borderTop","setShowDeletedObjects","overrideLabelClasses","overrideShowDeleted","currentRequestID","errorCounter","wsInFlight","initWSConnection","openCallback","onMessageCallback","URL","window","port","baseUrl","document","baseURI","wsProt","wsProtocol","protocol","WebSocket","hostname","onopen","onmessage","reconnectFn","onclose","warn","setTimeout","loadingVersioning","rewindDate","dateToRewind","allowResources","session","loadingLocking","loadRecords","onMessageCallBack","data","request_id","decodedPath","permitItems","permissionItems","setRecords","request_end","newMessage","initWSRequest","readyState","newRequestID","request","bucket_name","send","stringify","decodedIPaths","setSimplePathHandler","parentPath","requestDate","setIsVersioned","is_versioned","setLoadingVersioning","setLockingEnabled","object_locking_enabled","setLoadingLocking","configureBucketAllowed","searchBar","SearchBox","setSearchVersions","AutoColorIcon","PageHeader","BackLink","IAM_PAGES","IAM_PERMISSIONS","IAM_ROLES","SettingsIcon","middleComponent","dateInputContainer","durationInputs","validityIndicator","invalidDurationText","reverseInput","validityText","validTill","initialDate","maxDays","entity","selectedDays","setSelectedDays","selectedHours","setSelectedHours","selectedMinutes","setSelectedMinutes","setValidDate","moment","dateSelected","setDateSelected","hours","minutes","add","calculateNewTime","format","valid","extraInputProps","min","max","noLabelMinWidth","validityLabel","CopyIcon","shareLinkInfo","copyShareLink","copyShareLinkInput","copyShareLinkBtn","shareURL","setShareURL","isLoadingVersion","setIsLoadingVersion","isLoadingFile","setIsLoadingFile","selectedDate","setSelectedDate","dateValid","setDateValid","setVersionID","latestVersion","elem","slDate","currDate","diffDate","ceil","dateContainer","newDate","PredefinedList","actionButton","setModalSnackMessage","iframeContainer","iframeBase","iframeHidden","isFullscreen","loading","setLoading","basename","replace","origin","objectType","iframeLoaded","maxHeight","autoPlay","controls","muted","playsInline","onPlay","src","alt","onLoad","allowTransparency","wideLimit","PreviewFileContent","fileSize","overrideFileName","progressCallback","completeCallback","errorCallback","abortCallback","anchor","createElement","body","appendChild","req","evt","percentComplete","round","responseType","onreadystatechange","rspHeader","getResponseHeader","link","href","createObjectURL","removeChild","rspBody","fileExtension","fieldSort","localeCompare","permissionsArray","filteredPermissionsForBucket","permissionItem","returnElements","splitCurrentPath","permissionElement","splitURLARN","every","currentElementInPath","conditionOperator","prefixes","prefixItem","splitItems","pathToRouteElements","splitElement","tinycolor","require","colorVariants","system","overrideStyles","isDark","getBrightness","WrappedComponent","fallback","ComponentWithSuspense","props","Suspense","predefinedList","multiLine","prefinedContainer","predefinedTitle","includesActionButton","innerContentMultiline","innerContent","overlayShareOption","deleteDialogStyles","customDialogSize","snackBarCommon","noContentPadding","openSnackbar","setOpenSnackbar","modalSnackMessage","modalSnackBar","customSize","paper","detailedErrorMsg","scroll","reason","titleText","closeContainer","closeButton","disableRipple","isModal","snackBarModal","ContentProps","snackBar","errorSnackBar","autoHideDuration","adornment","adornmentPosition","overrideClass","inputProps","disableUnderline","InputProps","shown","setShown","sm","overlayIcon","readOnly","overlayAction","navigator","clipboard","writeText","WSCloseAbnormalClosure","WSClosePolicyViolation","WSCloseInternalServerErr"],"sourceRoot":""}
\ No newline at end of file
diff --git a/portal-ui/build/static/js/6901.e2472ebd.chunk.js b/portal-ui/build/static/js/6901.cda3f1f9.chunk.js
similarity index 83%
rename from portal-ui/build/static/js/6901.e2472ebd.chunk.js
rename to portal-ui/build/static/js/6901.cda3f1f9.chunk.js
index bda397a53..4bb8ee135 100644
--- a/portal-ui/build/static/js/6901.e2472ebd.chunk.js
+++ b/portal-ui/build/static/js/6901.cda3f1f9.chunk.js
@@ -1,2 +1,2 @@
-"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[6901],{26901:function(e,r,t){t.r(r);var o=t(29439),i=t(72791),a=t(60364),n=t(40986),d=t(75952),l=t(61889),s=t(56028),c=t(80705),u=t(37516),h=t(25469),p=t(54756),b=t(80184);r.default=function(e){var r=e.closeModalAndRefresh,t=e.open,f=e.bucketName,v=(0,h.TL)(),m=(0,a.v9)((function(e){return e.objectBrowser.rewind.rewindEnabled})),x=(0,a.v9)((function(e){return e.objectBrowser.rewind.dateToRewind})),g=(0,i.useState)(!1),w=(0,o.Z)(g,2),C=w[0],Z=w[1],j=(0,i.useState)(!0),B=(0,o.Z)(j,2),k=B[0],P=B[1],S=(0,i.useState)(null),F=(0,o.Z)(S,2),M=F[0],y=F[1];(0,i.useEffect)((function(){m&&(P(!0),y(new Date(x)))}),[m,x]);return(0,b.jsxs)(s.Z,{modalOpen:t,onClose:function(){r()},title:"Rewind - ".concat(f),children:[(0,b.jsx)(l.ZP,{item:!0,xs:12,children:(0,b.jsx)(c.Z,{value:M,onChange:y,id:"rewind-selector",label:"Rewind to",disabled:!k})}),(0,b.jsxs)(l.ZP,{container:!0,children:[m&&(0,b.jsx)(l.ZP,{item:!0,xs:12,sx:{marginBottom:"10px"},children:(0,b.jsx)(u.Z,{value:"status",id:"status",name:"status",checked:k,onChange:function(e){P(e.target.checked)},label:"Current Status",indicatorLabels:["Enabled","Disabled"]})}),(0,b.jsx)(l.ZP,{item:!0,xs:12,style:{justifyContent:"flex-end",display:"flex"},children:(0,b.jsx)(d.zx,{type:"button",variant:"callAction",disabled:C||!M&&k,onClick:function(){!k&&m?v((0,p._w)()):(Z(!0),v((0,p.SV)({state:!0,bucket:f,dateRewind:M}))),v((0,p.MU)(!0)),r()},id:"rewind-apply-button",label:!k&&m?"Show Current Data":"Show Rewind Data"})}),C&&(0,b.jsx)(l.ZP,{item:!0,xs:12,children:(0,b.jsx)(n.Z,{})})]})]})}},80705:function(e,r,t){var o=t(1413),i=t(72791),a=t(27391),n=t(61889),d=t(30829),l=t(20068),s=t(36571),c=t(69783),u=t(98439),h=t(63466),p=t(27197),b=t(11135),f=t(25787),v=t(84570),m=t(23814),x=t(33976),g=t(80184);r.Z=(0,f.Z)((function(e){return(0,b.Z)((0,o.Z)((0,o.Z)({dateSelectorOverride:{height:40,border:"#EAEDEE 1px solid",marginLeft:15,backgroundColor:"#fff",padding:"0 16px",borderRadius:5,"&.MuiInput-underline:hover:not(.Mui-disabled):before":{borderBottom:0},"&:hover":{borderColor:"#000","&:before, &:after":{borderColor:"transparent",borderBottom:0}},"&:before, &:after":{borderColor:"transparent",borderBottom:0},"& input":{fontSize:12,fontWeight:600,color:"#393939"}},dateSelectorFilterOverride:{width:180,height:42,marginLeft:20,padding:0,borderRadius:5,"&.MuiInput-underline:hover:not(.Mui-disabled):before":{borderBottom:0},"&:hover":{"&:before, &:after":{borderColor:"transparent",borderBottom:0}},"&:before, &:after":{borderColor:"transparent",borderBottom:0},"& input":{fontSize:12,fontWeight:"bold",color:"#081C42"},"@media (max-width: 900px)":{width:103}},dateSelectorFormOverride:{width:"100%",maxWidth:840},parentDateOverride:{flexGrow:1},textBoxContainer:{flexGrow:1},openListIcon:{color:"#9D9E9D",width:8,marginTop:2},paperOverride:{"& .MuiCalendarPicker-root":{padding:"0 22px","& > div":{padding:0,"& > div > div.PrivatePickersFadeTransitionGroup-root:first-of-type":{color:"#0A224C",fontWeight:"bold"},"& > div > div.PrivatePickersFadeTransitionGroup-root:last-of-type":{color:"#9D9E9D","& + button.MuiButtonBase-root":{color:"#9D9E9D"}},"& > div:nth-child(2)":{"& > div":{width:0},"& > button.MuiButtonBase-root":{color:"#0A224C"}}}},"& .MuiTypography-root.MuiTypography-caption":{width:26,height:26,margin:5,color:"#BCBCBC",fontSize:10},"& button.MuiPickersDay-root":{fontWeight:"bold",width:26,height:26,margin:5,textAlign:"center","&.Mui-selected":{backgroundColor:e.palette.primary.main,color:"#fff"}},"& div.MuiPickersDay-hiddenDaySpacingFiller":{width:26,height:26,margin:5},"& div.PrivatePickersSlideTransition-root":{minHeight:240},"& div.MuiCalendarPicker-viewTransitionContainer":{borderTop:"#F0F3F5 1px solid"},"& .MuiClockPicker-arrowSwitcher":{marginRight:10,marginTop:-1,"& > div":{width:0},"& > button.MuiButtonBase-root":{color:"#0A224C"},"& + div > div":{width:255,height:255,backgroundColor:"#fff",marginTop:30,marginBottom:14,border:"#F0F3F5 3px solid","& > div:nth-child(2)":{backgroundColor:"#B4B5B4",width:12,height:12,"&::before":{content:"' '",width:35,height:35,display:"block",position:"absolute",border:"#F0F3F5 3px solid",top:-12,left:-12,borderRadius:"100%"}},"& > div:nth-child(3)":{backgroundColor:"#B4B5B4",width:4},"& > div:last-of-type":{marginTop:15,"& > span":{color:"#0A224C","&.Mui-selected":{color:"#fff"},"&[aria-label='1 hours'], &[aria-label='2 hours'], &[aria-label='3 hours'], &[aria-label='4 hours'], &[aria-label='5 hours'], &[aria-label='6 hours'], &[aria-label='7 hours'], &[aria-label='8 hours'], &[aria-label='9 hours'], &[aria-label='10 hours'], &[aria-label='11 hours'], &[aria-label='12 hours']":{fontWeight:"bold",fontSize:20,marginTop:-1}}}}}}},m.YI),m.Hr))}))((function(e){var r=e.value,t=e.onChange,b=e.classes,f=e.forSearchBlock,m=void 0!==f&&f,w=e.forFilterContained,C=void 0!==w&&w,Z=e.label,j=e.tooltip,B=void 0===j?"":j,k=e.required,P=e.id,S=e.disabled,F=void 0!==S&&S,M=e.noInputIcon,y=void 0!==M&&M,D=e.classNamePrefix,T=void 0===D?"":D,O=e.openPickerIcon,A={};y||(A={startAdornment:(0,g.jsx)(h.Z,{position:"start",children:(0,g.jsx)(p.Z,{})})}),C&&(A={endAdornment:(0,g.jsx)(h.Z,{position:"end",children:(0,g.jsx)(x.Z,{className:b.openListIcon})})});var I="".concat(T,"date-time-input ").concat(m?b.dateSelectorOverride:""," ").concat(C&&!m?b.dateSelectorFilterOverride:""),N=m?b.parentDateOverride:b.dateSelectorFormOverride,E=(0,g.jsx)(s._,{dateAdapter:c.Z,children:(0,g.jsx)(u.x,{value:r,onChange:t,InputProps:(0,o.Z)((0,o.Z)({},A),{},{className:I}),components:{OpenPickerIcon:O},label:"",className:N,disabled:F,renderInput:function(e){return(0,g.jsx)(a.Z,(0,o.Z)((0,o.Z)({id:P,variant:"standard"},e),{},{disabled:!0}))},ampm:!1,PopperProps:{className:b.paperOverride}})});if(m)return E;var R=C?"":b.fieldContainer;return(0,g.jsx)(i.Fragment,{children:(0,g.jsxs)(n.ZP,{item:!0,xs:12,className:"".concat(R," ").concat(T,"input-field-container "),children:[""!==Z&&(0,g.jsxs)(d.Z,{htmlFor:P,className:"".concat(b.inputLabel," ").concat(T,"input-label"),children:[(0,g.jsxs)("span",{children:[Z,k?"*":""]}),""!==B&&(0,g.jsx)("div",{className:b.tooltipContainer,children:(0,g.jsx)(l.Z,{title:B,placement:"top-start",children:(0,g.jsx)("div",{className:b.tooltip,children:(0,g.jsx)(v.Z,{})})})})]}),(0,g.jsx)("div",{className:"".concat(b.textBoxContainer," ").concat(T,"input-wrapper "),children:E})]})})}))}}]);
-//# sourceMappingURL=6901.e2472ebd.chunk.js.map
\ No newline at end of file
+"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[6901],{26901:function(e,r,t){t.r(r);var o=t(29439),i=t(72791),a=t(60364),n=t(40986),d=t(75952),l=t(61889),s=t(56028),c=t(80705),u=t(37516),h=t(25469),p=t(54756),b=t(80184);r.default=function(e){var r=e.closeModalAndRefresh,t=e.open,f=e.bucketName,v=(0,h.TL)(),m=(0,a.v9)((function(e){return e.objectBrowser.rewind.rewindEnabled})),x=(0,a.v9)((function(e){return e.objectBrowser.rewind.dateToRewind})),g=(0,i.useState)(!1),C=(0,o.Z)(g,2),w=C[0],Z=C[1],j=(0,i.useState)(!0),B=(0,o.Z)(j,2),k=B[0],P=B[1],S=(0,i.useState)(null),F=(0,o.Z)(S,2),y=F[0],M=F[1];(0,i.useEffect)((function(){m&&(P(!0),M(new Date(x)))}),[m,x]);return(0,b.jsxs)(s.Z,{modalOpen:t,onClose:function(){r()},title:"Rewind - ".concat(f),children:[(0,b.jsx)(l.ZP,{item:!0,xs:12,children:(0,b.jsx)(c.Z,{value:y,onChange:M,id:"rewind-selector",label:"Rewind to",disabled:!k})}),(0,b.jsxs)(l.ZP,{container:!0,children:[m&&(0,b.jsx)(l.ZP,{item:!0,xs:12,sx:{marginBottom:"10px"},children:(0,b.jsx)(u.Z,{value:"status",id:"status",name:"status",checked:k,onChange:function(e){P(e.target.checked)},label:"Current Status",indicatorLabels:["Enabled","Disabled"]})}),(0,b.jsx)(l.ZP,{item:!0,xs:12,style:{justifyContent:"flex-end",display:"flex"},children:(0,b.jsx)(d.zx,{type:"button",variant:"callAction",disabled:w||!y&&k,onClick:function(){!k&&m?v((0,p._w)()):(Z(!0),v((0,p.SV)({state:!0,bucket:f,dateRewind:y}))),v((0,p.Cn)(!0)),r()},id:"rewind-apply-button",label:!k&&m?"Show Current Data":"Show Rewind Data"})}),w&&(0,b.jsx)(l.ZP,{item:!0,xs:12,children:(0,b.jsx)(n.Z,{})})]})]})}},80705:function(e,r,t){var o=t(1413),i=t(72791),a=t(27391),n=t(61889),d=t(30829),l=t(20068),s=t(36571),c=t(69783),u=t(98439),h=t(63466),p=t(27197),b=t(11135),f=t(25787),v=t(84570),m=t(23814),x=t(33976),g=t(80184);r.Z=(0,f.Z)((function(e){return(0,b.Z)((0,o.Z)((0,o.Z)({dateSelectorOverride:{height:40,border:"#EAEDEE 1px solid",marginLeft:15,backgroundColor:"#fff",padding:"0 16px",borderRadius:5,"&.MuiInput-underline:hover:not(.Mui-disabled):before":{borderBottom:0},"&:hover":{borderColor:"#000","&:before, &:after":{borderColor:"transparent",borderBottom:0}},"&:before, &:after":{borderColor:"transparent",borderBottom:0},"& input":{fontSize:12,fontWeight:600,color:"#393939"}},dateSelectorFilterOverride:{width:180,height:42,marginLeft:20,padding:0,borderRadius:5,"&.MuiInput-underline:hover:not(.Mui-disabled):before":{borderBottom:0},"&:hover":{"&:before, &:after":{borderColor:"transparent",borderBottom:0}},"&:before, &:after":{borderColor:"transparent",borderBottom:0},"& input":{fontSize:12,fontWeight:"bold",color:"#081C42"},"@media (max-width: 900px)":{width:103}},dateSelectorFormOverride:{width:"100%",maxWidth:840},parentDateOverride:{flexGrow:1},textBoxContainer:{flexGrow:1},openListIcon:{color:"#9D9E9D",width:8,marginTop:2},paperOverride:{"& .MuiCalendarPicker-root":{padding:"0 22px","& > div":{padding:0,"& > div > div.PrivatePickersFadeTransitionGroup-root:first-of-type":{color:"#0A224C",fontWeight:"bold"},"& > div > div.PrivatePickersFadeTransitionGroup-root:last-of-type":{color:"#9D9E9D","& + button.MuiButtonBase-root":{color:"#9D9E9D"}},"& > div:nth-child(2)":{"& > div":{width:0},"& > button.MuiButtonBase-root":{color:"#0A224C"}}}},"& .MuiTypography-root.MuiTypography-caption":{width:26,height:26,margin:5,color:"#BCBCBC",fontSize:10},"& button.MuiPickersDay-root":{fontWeight:"bold",width:26,height:26,margin:5,textAlign:"center","&.Mui-selected":{backgroundColor:e.palette.primary.main,color:"#fff"}},"& div.MuiPickersDay-hiddenDaySpacingFiller":{width:26,height:26,margin:5},"& div.PrivatePickersSlideTransition-root":{minHeight:240},"& div.MuiCalendarPicker-viewTransitionContainer":{borderTop:"#F0F3F5 1px solid"},"& .MuiClockPicker-arrowSwitcher":{marginRight:10,marginTop:-1,"& > div":{width:0},"& > button.MuiButtonBase-root":{color:"#0A224C"},"& + div > div":{width:255,height:255,backgroundColor:"#fff",marginTop:30,marginBottom:14,border:"#F0F3F5 3px solid","& > div:nth-child(2)":{backgroundColor:"#B4B5B4",width:12,height:12,"&::before":{content:"' '",width:35,height:35,display:"block",position:"absolute",border:"#F0F3F5 3px solid",top:-12,left:-12,borderRadius:"100%"}},"& > div:nth-child(3)":{backgroundColor:"#B4B5B4",width:4},"& > div:last-of-type":{marginTop:15,"& > span":{color:"#0A224C","&.Mui-selected":{color:"#fff"},"&[aria-label='1 hours'], &[aria-label='2 hours'], &[aria-label='3 hours'], &[aria-label='4 hours'], &[aria-label='5 hours'], &[aria-label='6 hours'], &[aria-label='7 hours'], &[aria-label='8 hours'], &[aria-label='9 hours'], &[aria-label='10 hours'], &[aria-label='11 hours'], &[aria-label='12 hours']":{fontWeight:"bold",fontSize:20,marginTop:-1}}}}}}},m.YI),m.Hr))}))((function(e){var r=e.value,t=e.onChange,b=e.classes,f=e.forSearchBlock,m=void 0!==f&&f,C=e.forFilterContained,w=void 0!==C&&C,Z=e.label,j=e.tooltip,B=void 0===j?"":j,k=e.required,P=e.id,S=e.disabled,F=void 0!==S&&S,y=e.noInputIcon,M=void 0!==y&&y,D=e.classNamePrefix,T=void 0===D?"":D,O=e.openPickerIcon,A={};M||(A={startAdornment:(0,g.jsx)(h.Z,{position:"start",children:(0,g.jsx)(p.Z,{})})}),w&&(A={endAdornment:(0,g.jsx)(h.Z,{position:"end",children:(0,g.jsx)(x.Z,{className:b.openListIcon})})});var I="".concat(T,"date-time-input ").concat(m?b.dateSelectorOverride:""," ").concat(w&&!m?b.dateSelectorFilterOverride:""),N=m?b.parentDateOverride:b.dateSelectorFormOverride,E=(0,g.jsx)(s._,{dateAdapter:c.Z,children:(0,g.jsx)(u.x,{value:r,onChange:t,InputProps:(0,o.Z)((0,o.Z)({},A),{},{className:I}),components:{OpenPickerIcon:O},label:"",className:N,disabled:F,renderInput:function(e){return(0,g.jsx)(a.Z,(0,o.Z)((0,o.Z)({id:P,variant:"standard"},e),{},{disabled:!0}))},ampm:!1,PopperProps:{className:b.paperOverride}})});if(m)return E;var R=w?"":b.fieldContainer;return(0,g.jsx)(i.Fragment,{children:(0,g.jsxs)(n.ZP,{item:!0,xs:12,className:"".concat(R," ").concat(T,"input-field-container "),children:[""!==Z&&(0,g.jsxs)(d.Z,{htmlFor:P,className:"".concat(b.inputLabel," ").concat(T,"input-label"),children:[(0,g.jsxs)("span",{children:[Z,k?"*":""]}),""!==B&&(0,g.jsx)("div",{className:b.tooltipContainer,children:(0,g.jsx)(l.Z,{title:B,placement:"top-start",children:(0,g.jsx)("div",{className:b.tooltip,children:(0,g.jsx)(v.Z,{})})})})]}),(0,g.jsx)("div",{className:"".concat(b.textBoxContainer," ").concat(T,"input-wrapper "),children:E})]})})}))}}]);
+//# sourceMappingURL=6901.cda3f1f9.chunk.js.map
\ No newline at end of file
diff --git a/portal-ui/build/static/js/6901.cda3f1f9.chunk.js.map b/portal-ui/build/static/js/6901.cda3f1f9.chunk.js.map
new file mode 100644
index 000000000..d8883ef5e
--- /dev/null
+++ b/portal-ui/build/static/js/6901.cda3f1f9.chunk.js.map
@@ -0,0 +1 @@
+{"version":3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IAAD,CACEsF,QAASvF,EACTuE,UAAS,UAAKX,EAAQ4B,WAAb,YAA2BtB,EAA3B,eAFX,WAIE,4BACGjE,EACA+D,EAAW,IAAM,MAEP,KAAZD,IACC,gBAAKQ,UAAWX,EAAQ6B,iBAAxB,UACE,SAAC,IAAD,CAAS9F,MAAOoE,EAAS2B,UAAU,YAAnC,UACE,gBAAKnB,UAAWX,EAAQG,QAAxB,UACE,SAAC,IAAD,cAQZ,gBACEQ,UAAS,UAAKX,EAAQlB,iBAAb,YAAiCwB,EAAjC,mBADX,SAGGQ,QAKV,G","sources":["screens/Console/Buckets/ListBuckets/Objects/ListObjects/RewindEnable.tsx","screens/Console/Common/FormComponents/DateTimePickerWrapper/DateTimePickerWrapper.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 .\n\nimport React, { useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { LinearProgress } from \"@mui/material\";\nimport { Button } from \"mds\";\nimport Grid from \"@mui/material/Grid\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport DateTimePickerWrapper from \"../../../../Common/FormComponents/DateTimePickerWrapper/DateTimePickerWrapper\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport { AppState, useAppDispatch } from \"../../../../../../store\";\nimport {\n resetRewind,\n setLoadingObjects,\n setRewindEnable,\n} from \"../../../../ObjectBrowser/objectBrowserSlice\";\n\ninterface IRewindEnable {\n closeModalAndRefresh: () => void;\n open: boolean;\n bucketName: string;\n}\n\nconst RewindEnable = ({\n closeModalAndRefresh,\n open,\n bucketName,\n}: IRewindEnable) => {\n const dispatch = useAppDispatch();\n\n const rewindEnabled = useSelector(\n (state: AppState) => state.objectBrowser.rewind.rewindEnabled\n );\n const dateRewind = useSelector(\n (state: AppState) => state.objectBrowser.rewind.dateToRewind\n );\n\n const [rewindEnabling, setRewindEnabling] = useState(false);\n const [rewindEnableButton, setRewindEnableButton] = useState(true);\n const [dateSelected, setDateSelected] = useState(null);\n\n useEffect(() => {\n if (rewindEnabled) {\n setRewindEnableButton(true);\n setDateSelected(new Date(dateRewind));\n }\n }, [rewindEnabled, dateRewind]);\n\n const rewindApply = () => {\n if (!rewindEnableButton && rewindEnabled) {\n dispatch(resetRewind());\n } else {\n setRewindEnabling(true);\n dispatch(\n setRewindEnable({\n state: true,\n bucket: bucketName,\n dateRewind: dateSelected,\n })\n );\n }\n dispatch(setLoadingObjects(true));\n\n closeModalAndRefresh();\n };\n\n return (\n {\n closeModalAndRefresh();\n }}\n title={`Rewind - ${bucketName}`}\n >\n \n \n \n \n {rewindEnabled && (\n \n ) => {\n setRewindEnableButton(e.target.checked);\n }}\n label={\"Current Status\"}\n indicatorLabels={[\"Enabled\", \"Disabled\"]}\n />\n \n )}\n \n \n \n {rewindEnabling && (\n \n \n \n )}\n \n \n );\n};\n\nexport default RewindEnable;\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 } from \"react\";\nimport { Grid, InputLabel, TextField, Tooltip } from \"@mui/material\";\nimport { LocalizationProvider } from \"@mui/x-date-pickers\";\nimport { AdapterMoment } from \"@mui/x-date-pickers/AdapterMoment\";\nimport { DateTimePicker } from \"@mui/x-date-pickers\";\nimport InputAdornment from \"@mui/material/InputAdornment\";\nimport ScheduleIcon from \"@mui/icons-material/Schedule\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport OpenListIcon from \"../../../../../icons/OpenListIcon\";\n\ninterface IDateTimePicker {\n value: any;\n onChange: (value: any) => any;\n classes: any;\n forSearchBlock?: boolean;\n forFilterContained?: boolean;\n label?: string;\n required?: boolean;\n tooltip?: string;\n id: string;\n disabled?: boolean;\n noInputIcon?: boolean;\n classNamePrefix?: string;\n openPickerIcon?: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n dateSelectorOverride: {\n height: 40,\n border: \"#EAEDEE 1px solid\",\n marginLeft: 15,\n backgroundColor: \"#fff\",\n padding: \"0 16px\",\n borderRadius: 5,\n \"&.MuiInput-underline:hover:not(.Mui-disabled):before\": {\n borderBottom: 0,\n },\n \"&:hover\": {\n borderColor: \"#000\",\n \"&:before, &:after\": {\n borderColor: \"transparent\",\n borderBottom: 0,\n },\n },\n \"&:before, &:after\": {\n borderColor: \"transparent\",\n borderBottom: 0,\n },\n \"& input\": {\n fontSize: 12,\n fontWeight: 600,\n color: \"#393939\",\n },\n },\n dateSelectorFilterOverride: {\n width: 180,\n height: 42,\n marginLeft: 20,\n padding: 0,\n borderRadius: 5,\n \"&.MuiInput-underline:hover:not(.Mui-disabled):before\": {\n borderBottom: 0,\n },\n \"&:hover\": {\n \"&:before, &:after\": {\n borderColor: \"transparent\",\n borderBottom: 0,\n },\n },\n \"&:before, &:after\": {\n borderColor: \"transparent\",\n borderBottom: 0,\n },\n \"& input\": {\n fontSize: 12,\n fontWeight: \"bold\",\n color: \"#081C42\",\n },\n \"@media (max-width: 900px)\": {\n width: 103,\n },\n },\n dateSelectorFormOverride: {\n width: \"100%\",\n maxWidth: 840,\n },\n parentDateOverride: {\n flexGrow: 1,\n },\n textBoxContainer: {\n flexGrow: 1,\n },\n openListIcon: {\n color: \"#9D9E9D\",\n width: 8,\n marginTop: 2,\n },\n paperOverride: {\n \"& .MuiCalendarPicker-root\": {\n padding: \"0 22px\",\n \"& > div\": {\n padding: 0,\n \"& > div > div.PrivatePickersFadeTransitionGroup-root:first-of-type\":\n {\n color: \"#0A224C\",\n fontWeight: \"bold\",\n },\n \"& > div > div.PrivatePickersFadeTransitionGroup-root:last-of-type\": {\n color: \"#9D9E9D\",\n \"& + button.MuiButtonBase-root\": {\n color: \"#9D9E9D\",\n },\n },\n \"& > div:nth-child(2)\": {\n \"& > div\": {\n width: 0,\n },\n \"& > button.MuiButtonBase-root\": {\n color: \"#0A224C\",\n },\n },\n },\n },\n \"& .MuiTypography-root.MuiTypography-caption\": {\n width: 26,\n height: 26,\n margin: 5,\n color: \"#BCBCBC\",\n fontSize: 10,\n },\n \"& button.MuiPickersDay-root\": {\n fontWeight: \"bold\",\n width: 26,\n height: 26,\n margin: 5,\n textAlign: \"center\",\n \"&.Mui-selected\": {\n backgroundColor: theme.palette.primary.main,\n color: \"#fff\",\n },\n },\n \"& div.MuiPickersDay-hiddenDaySpacingFiller\": {\n width: 26,\n height: 26,\n margin: 5,\n },\n \"& div.PrivatePickersSlideTransition-root\": {\n minHeight: 240,\n },\n \"& div.MuiCalendarPicker-viewTransitionContainer\": {\n borderTop: \"#F0F3F5 1px solid\",\n },\n \"& .MuiClockPicker-arrowSwitcher\": {\n marginRight: 10,\n marginTop: -1,\n \"& > div\": {\n width: 0,\n },\n \"& > button.MuiButtonBase-root\": {\n color: \"#0A224C\",\n },\n \"& + div > div\": {\n width: 255,\n height: 255,\n backgroundColor: \"#fff\",\n marginTop: 30,\n marginBottom: 14,\n border: \"#F0F3F5 3px solid\",\n \"& > div:nth-child(2)\": {\n backgroundColor: \"#B4B5B4\",\n width: 12,\n height: 12,\n \"&::before\": {\n content: \"' '\",\n width: 35,\n height: 35,\n display: \"block\",\n position: \"absolute\",\n border: \"#F0F3F5 3px solid\",\n top: -12,\n left: -12,\n borderRadius: \"100%\",\n },\n },\n \"& > div:nth-child(3)\": {\n backgroundColor: \"#B4B5B4\",\n width: 4,\n },\n \"& > div:last-of-type\": {\n marginTop: 15,\n \"& > span\": {\n color: \"#0A224C\",\n \"&.Mui-selected\": {\n color: \"#fff\",\n },\n \"&[aria-label='1 hours'], &[aria-label='2 hours'], &[aria-label='3 hours'], &[aria-label='4 hours'], &[aria-label='5 hours'], &[aria-label='6 hours'], &[aria-label='7 hours'], &[aria-label='8 hours'], &[aria-label='9 hours'], &[aria-label='10 hours'], &[aria-label='11 hours'], &[aria-label='12 hours']\":\n {\n fontWeight: \"bold\",\n fontSize: 20,\n marginTop: -1,\n },\n },\n },\n },\n },\n },\n ...fieldBasic,\n ...tooltipHelper,\n });\n\nconst DateTimePickerWrapper = ({\n value,\n onChange,\n classes,\n forSearchBlock = false,\n forFilterContained = false,\n label,\n tooltip = \"\",\n required,\n id,\n disabled = false,\n noInputIcon = false,\n classNamePrefix = \"\",\n openPickerIcon,\n}: IDateTimePicker) => {\n let adornment = {};\n\n if (!noInputIcon) {\n adornment = {\n startAdornment: (\n \n \n \n ),\n };\n }\n\n if (forFilterContained) {\n adornment = {\n endAdornment: (\n \n \n \n ),\n };\n }\n\n const classOverridden = `${classNamePrefix}date-time-input ${\n forSearchBlock ? classes.dateSelectorOverride : \"\"\n } ${\n forFilterContained && !forSearchBlock\n ? classes.dateSelectorFilterOverride\n : \"\"\n }`;\n\n const clsName = forSearchBlock\n ? classes.parentDateOverride\n : classes.dateSelectorFormOverride;\n\n const inputItem = (\n \n (\n \n )}\n ampm={false}\n PopperProps={{\n className: classes.paperOverride,\n }}\n />\n \n );\n\n if (forSearchBlock) {\n return inputItem;\n }\n\n const containerCls = !forFilterContained ? classes.fieldContainer : \"\";\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n \n
\n )}\n \n )}\n\n
\n {inputItem}\n
\n \n \n );\n};\n\nexport default withStyles(styles)(DateTimePickerWrapper);\n"],"names":["closeModalAndRefresh","open","bucketName","dispatch","useAppDispatch","rewindEnabled","useSelector","state","objectBrowser","rewind","dateRewind","dateToRewind","useState","rewindEnabling","setRewindEnabling","rewindEnableButton","setRewindEnableButton","dateSelected","setDateSelected","useEffect","Date","modalOpen","onClose","title","item","xs","value","onChange","id","label","disabled","container","sx","marginBottom","name","checked","e","target","indicatorLabels","style","justifyContent","display","type","variant","onClick","resetRewind","setRewindEnable","bucket","setLoadingObjects","withStyles","theme","createStyles","dateSelectorOverride","height","border","marginLeft","backgroundColor","padding","borderRadius","borderBottom","borderColor","fontSize","fontWeight","color","dateSelectorFilterOverride","width","dateSelectorFormOverride","maxWidth","parentDateOverride","flexGrow","textBoxContainer","openListIcon","marginTop","paperOverride","margin","textAlign","palette","primary","main","minHeight","borderTop","marginRight","content","position","top","left","fieldBasic","tooltipHelper","classes","forSearchBlock","forFilterContained","tooltip","required","noInputIcon","classNamePrefix","openPickerIcon","adornment","startAdornment","endAdornment","className","classOverridden","clsName","inputItem","dateAdapter","AdapterMoment","InputProps","components","OpenPickerIcon","renderInput","props","ampm","PopperProps","containerCls","fieldContainer","Fragment","htmlFor","inputLabel","tooltipContainer","placement"],"sourceRoot":""}
\ No newline at end of file
diff --git a/portal-ui/build/static/js/6901.e2472ebd.chunk.js.map b/portal-ui/build/static/js/6901.e2472ebd.chunk.js.map
deleted file mode 100644
index a1554e300..000000000
--- a/portal-ui/build/static/js/6901.e2472ebd.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/js/6901.e2472ebd.chunk.js","mappings":"4PA6IA,UAxGq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AAb,YAA2BtB,EAA3B,eAFX,WAIE,4BACGjE,EACA+D,EAAW,IAAM,MAEP,KAAZD,IACC,gBAAKQ,UAAWX,EAAQ6B,iBAAxB,UACE,SAAC,IAAD,CAAS9F,MAAOoE,EAAS2B,UAAU,YAAnC,UACE,gBAAKnB,UAAWX,EAAQG,QAAxB,UACE,SAAC,IAAD,cAQZ,gBACEQ,UAAS,UAAKX,EAAQlB,iBAAb,YAAiCwB,EAAjC,mBADX,SAGGQ,QAKV,G","sources":["screens/Console/Buckets/ListBuckets/Objects/ListObjects/RewindEnable.tsx","screens/Console/Common/FormComponents/DateTimePickerWrapper/DateTimePickerWrapper.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 .\n\nimport React, { useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { LinearProgress } from \"@mui/material\";\nimport { Button } from \"mds\";\nimport Grid from \"@mui/material/Grid\";\nimport ModalWrapper from \"../../../../Common/ModalWrapper/ModalWrapper\";\nimport DateTimePickerWrapper from \"../../../../Common/FormComponents/DateTimePickerWrapper/DateTimePickerWrapper\";\nimport FormSwitchWrapper from \"../../../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport { AppState, useAppDispatch } from \"../../../../../../store\";\nimport {\n resetRewind,\n setLoadingObjectsList,\n setRewindEnable,\n} from \"../../../../ObjectBrowser/objectBrowserSlice\";\n\ninterface IRewindEnable {\n closeModalAndRefresh: () => void;\n open: boolean;\n bucketName: string;\n}\n\nconst RewindEnable = ({\n closeModalAndRefresh,\n open,\n bucketName,\n}: IRewindEnable) => {\n const dispatch = useAppDispatch();\n\n const rewindEnabled = useSelector(\n (state: AppState) => state.objectBrowser.rewind.rewindEnabled\n );\n const dateRewind = useSelector(\n (state: AppState) => state.objectBrowser.rewind.dateToRewind\n );\n\n const [rewindEnabling, setRewindEnabling] = useState(false);\n const [rewindEnableButton, setRewindEnableButton] = useState(true);\n const [dateSelected, setDateSelected] = useState(null);\n\n useEffect(() => {\n if (rewindEnabled) {\n setRewindEnableButton(true);\n setDateSelected(new Date(dateRewind));\n }\n }, [rewindEnabled, dateRewind]);\n\n const rewindApply = () => {\n if (!rewindEnableButton && rewindEnabled) {\n dispatch(resetRewind());\n } else {\n setRewindEnabling(true);\n dispatch(\n setRewindEnable({\n state: true,\n bucket: bucketName,\n dateRewind: dateSelected,\n })\n );\n }\n dispatch(setLoadingObjectsList(true));\n\n closeModalAndRefresh();\n };\n\n return (\n {\n closeModalAndRefresh();\n }}\n title={`Rewind - ${bucketName}`}\n >\n \n \n \n \n {rewindEnabled && (\n \n ) => {\n setRewindEnableButton(e.target.checked);\n }}\n label={\"Current Status\"}\n indicatorLabels={[\"Enabled\", \"Disabled\"]}\n />\n \n )}\n \n \n \n {rewindEnabling && (\n \n \n \n )}\n \n \n );\n};\n\nexport default RewindEnable;\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 } from \"react\";\nimport { Grid, InputLabel, TextField, Tooltip } from \"@mui/material\";\nimport { LocalizationProvider } from \"@mui/x-date-pickers\";\nimport { AdapterMoment } from \"@mui/x-date-pickers/AdapterMoment\";\nimport { DateTimePicker } from \"@mui/x-date-pickers\";\nimport InputAdornment from \"@mui/material/InputAdornment\";\nimport ScheduleIcon from \"@mui/icons-material/Schedule\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport HelpIcon from \"../../../../../icons/HelpIcon\";\nimport { fieldBasic, tooltipHelper } from \"../common/styleLibrary\";\nimport OpenListIcon from \"../../../../../icons/OpenListIcon\";\n\ninterface IDateTimePicker {\n value: any;\n onChange: (value: any) => any;\n classes: any;\n forSearchBlock?: boolean;\n forFilterContained?: boolean;\n label?: string;\n required?: boolean;\n tooltip?: string;\n id: string;\n disabled?: boolean;\n noInputIcon?: boolean;\n classNamePrefix?: string;\n openPickerIcon?: any;\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n dateSelectorOverride: {\n height: 40,\n border: \"#EAEDEE 1px solid\",\n marginLeft: 15,\n backgroundColor: \"#fff\",\n padding: \"0 16px\",\n borderRadius: 5,\n \"&.MuiInput-underline:hover:not(.Mui-disabled):before\": {\n borderBottom: 0,\n },\n \"&:hover\": {\n borderColor: \"#000\",\n \"&:before, &:after\": {\n borderColor: \"transparent\",\n borderBottom: 0,\n },\n },\n \"&:before, &:after\": {\n borderColor: \"transparent\",\n borderBottom: 0,\n },\n \"& input\": {\n fontSize: 12,\n fontWeight: 600,\n color: \"#393939\",\n },\n },\n dateSelectorFilterOverride: {\n width: 180,\n height: 42,\n marginLeft: 20,\n padding: 0,\n borderRadius: 5,\n \"&.MuiInput-underline:hover:not(.Mui-disabled):before\": {\n borderBottom: 0,\n },\n \"&:hover\": {\n \"&:before, &:after\": {\n borderColor: \"transparent\",\n borderBottom: 0,\n },\n },\n \"&:before, &:after\": {\n borderColor: \"transparent\",\n borderBottom: 0,\n },\n \"& input\": {\n fontSize: 12,\n fontWeight: \"bold\",\n color: \"#081C42\",\n },\n \"@media (max-width: 900px)\": {\n width: 103,\n },\n },\n dateSelectorFormOverride: {\n width: \"100%\",\n maxWidth: 840,\n },\n parentDateOverride: {\n flexGrow: 1,\n },\n textBoxContainer: {\n flexGrow: 1,\n },\n openListIcon: {\n color: \"#9D9E9D\",\n width: 8,\n marginTop: 2,\n },\n paperOverride: {\n \"& .MuiCalendarPicker-root\": {\n padding: \"0 22px\",\n \"& > div\": {\n padding: 0,\n \"& > div > div.PrivatePickersFadeTransitionGroup-root:first-of-type\":\n {\n color: \"#0A224C\",\n fontWeight: \"bold\",\n },\n \"& > div > div.PrivatePickersFadeTransitionGroup-root:last-of-type\": {\n color: \"#9D9E9D\",\n \"& + button.MuiButtonBase-root\": {\n color: \"#9D9E9D\",\n },\n },\n \"& > div:nth-child(2)\": {\n \"& > div\": {\n width: 0,\n },\n \"& > button.MuiButtonBase-root\": {\n color: \"#0A224C\",\n },\n },\n },\n },\n \"& .MuiTypography-root.MuiTypography-caption\": {\n width: 26,\n height: 26,\n margin: 5,\n color: \"#BCBCBC\",\n fontSize: 10,\n },\n \"& button.MuiPickersDay-root\": {\n fontWeight: \"bold\",\n width: 26,\n height: 26,\n margin: 5,\n textAlign: \"center\",\n \"&.Mui-selected\": {\n backgroundColor: theme.palette.primary.main,\n color: \"#fff\",\n },\n },\n \"& div.MuiPickersDay-hiddenDaySpacingFiller\": {\n width: 26,\n height: 26,\n margin: 5,\n },\n \"& div.PrivatePickersSlideTransition-root\": {\n minHeight: 240,\n },\n \"& div.MuiCalendarPicker-viewTransitionContainer\": {\n borderTop: \"#F0F3F5 1px solid\",\n },\n \"& .MuiClockPicker-arrowSwitcher\": {\n marginRight: 10,\n marginTop: -1,\n \"& > div\": {\n width: 0,\n },\n \"& > button.MuiButtonBase-root\": {\n color: \"#0A224C\",\n },\n \"& + div > div\": {\n width: 255,\n height: 255,\n backgroundColor: \"#fff\",\n marginTop: 30,\n marginBottom: 14,\n border: \"#F0F3F5 3px solid\",\n \"& > div:nth-child(2)\": {\n backgroundColor: \"#B4B5B4\",\n width: 12,\n height: 12,\n \"&::before\": {\n content: \"' '\",\n width: 35,\n height: 35,\n display: \"block\",\n position: \"absolute\",\n border: \"#F0F3F5 3px solid\",\n top: -12,\n left: -12,\n borderRadius: \"100%\",\n },\n },\n \"& > div:nth-child(3)\": {\n backgroundColor: \"#B4B5B4\",\n width: 4,\n },\n \"& > div:last-of-type\": {\n marginTop: 15,\n \"& > span\": {\n color: \"#0A224C\",\n \"&.Mui-selected\": {\n color: \"#fff\",\n },\n \"&[aria-label='1 hours'], &[aria-label='2 hours'], &[aria-label='3 hours'], &[aria-label='4 hours'], &[aria-label='5 hours'], &[aria-label='6 hours'], &[aria-label='7 hours'], &[aria-label='8 hours'], &[aria-label='9 hours'], &[aria-label='10 hours'], &[aria-label='11 hours'], &[aria-label='12 hours']\":\n {\n fontWeight: \"bold\",\n fontSize: 20,\n marginTop: -1,\n },\n },\n },\n },\n },\n },\n ...fieldBasic,\n ...tooltipHelper,\n });\n\nconst DateTimePickerWrapper = ({\n value,\n onChange,\n classes,\n forSearchBlock = false,\n forFilterContained = false,\n label,\n tooltip = \"\",\n required,\n id,\n disabled = false,\n noInputIcon = false,\n classNamePrefix = \"\",\n openPickerIcon,\n}: IDateTimePicker) => {\n let adornment = {};\n\n if (!noInputIcon) {\n adornment = {\n startAdornment: (\n \n \n \n ),\n };\n }\n\n if (forFilterContained) {\n adornment = {\n endAdornment: (\n \n \n \n ),\n };\n }\n\n const classOverridden = `${classNamePrefix}date-time-input ${\n forSearchBlock ? classes.dateSelectorOverride : \"\"\n } ${\n forFilterContained && !forSearchBlock\n ? classes.dateSelectorFilterOverride\n : \"\"\n }`;\n\n const clsName = forSearchBlock\n ? classes.parentDateOverride\n : classes.dateSelectorFormOverride;\n\n const inputItem = (\n \n (\n \n )}\n ampm={false}\n PopperProps={{\n className: classes.paperOverride,\n }}\n />\n \n );\n\n if (forSearchBlock) {\n return inputItem;\n }\n\n const containerCls = !forFilterContained ? classes.fieldContainer : \"\";\n return (\n \n \n {label !== \"\" && (\n \n \n {label}\n {required ? \"*\" : \"\"}\n \n {tooltip !== \"\" && (\n
\n \n
\n \n
\n \n
\n )}\n \n )}\n\n
\n {inputItem}\n
\n \n \n );\n};\n\nexport default withStyles(styles)(DateTimePickerWrapper);\n"],"names":["closeModalAndRefresh","open","bucketName","dispatch","useAppDispatch","rewindEnabled","useSelector","state","objectBrowser","rewind","dateRewind","dateToRewind","useState","rewindEnabling","setRewindEnabling","rewindEnableButton","setRewindEnableButton","dateSelected","setDateSelected","useEffect","Date","modalOpen","onClose","title","item","xs","value","onChange","id","label","disabled","container","sx","marginBottom","name","checked","e","target","indicatorLabels","style","justifyContent","display","type","variant","onClick","resetRewind","setRewindEnable","bucket","setLoadingObjectsList","withStyles","theme","createStyles","dateSelectorOverride","height","border","marginLeft","backgroundColor","padding","borderRadius","borderBottom","borderColor","fontSize","fontWeight","color","dateSelectorFilterOverride","width","dateSelectorFormOverride","maxWidth","parentDateOverride","flexGrow","textBoxContainer","openListIcon","marginTop","paperOverride","margin","textAlign","palette","primary","main","minHeight","borderTop","marginRight","content","position","top","left","fieldBasic","tooltipHelper","classes","forSearchBlock","forFilterContained","tooltip","required","noInputIcon","classNamePrefix","openPickerIcon","adornment","startAdornment","endAdornment","className","classOverridden","clsName","inputItem","dateAdapter","AdapterMoment","InputProps","components","OpenPickerIcon","renderInput","props","ampm","PopperProps","containerCls","fieldContainer","Fragment","htmlFor","inputLabel","tooltipContainer","placement"],"sourceRoot":""}
\ No newline at end of file
diff --git a/portal-ui/build/static/js/7295.c85034bf.chunk.js b/portal-ui/build/static/js/7295.c85034bf.chunk.js
new file mode 100644
index 000000000..dc66c65b1
--- /dev/null
+++ b/portal-ui/build/static/js/7295.c85034bf.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[7295],{51270:function(e,r,t){var n=t(29439),i=(t(72791),t(51691)),o=t(9505),a=t(23508),l=t(56096),c=t(87995),s=t(25469),u=t(80184);r.Z=function(e){var r=e.closeDeleteModalAndRefresh,t=e.deleteOpen,d=e.idp,p=e.idpType,f=(0,s.TL)(),h=(0,o.Z)((function(e){r(!0),f((0,c.cN)(!0===e.restart))}),(function(e){return f((0,c.Ih)(e))})),x=(0,n.Z)(h,2),m=x[0],b=x[1];if(!d)return null;var y="_"===d?"Default":d;return(0,u.jsx)(a.Z,{title:"Delete ".concat(y),confirmText:"Delete",isOpen:t,titleIcon:(0,u.jsx)(l.NvT,{}),isLoading:m,onConfirm:function(){b("DELETE","/api/v1/idp/".concat(p,"/").concat(d))},onClose:function(){return r(!1)},confirmButtonProps:{disabled:m},confirmationContent:(0,u.jsxs)(i.Z,{children:["Are you sure you want to delete IDP ",(0,u.jsx)("b",{children:y})," ","configuration? ",(0,u.jsx)("br",{})]})})}},18476:function(e,r,t){var n=t(4942),i=t(74165),o=t(15861),a=t(29439),l=t(1413),c=t(72791),s=t(11135),u=t(25787),d=t(61889),p=t(64554),f=t(23814),h=t(56096),x=t(21435),m=t(75952),b=t(16871),y=t(25469),Z=t(87995),D=t(9505),v=t(81207),g=t(74794),C=t(32291),j=t(84669),E=t(14917),N=t(51270),_=t(37516),k=t(80184);r.Z=(0,u.Z)((function(e){return(0,s.Z)((0,l.Z)((0,l.Z)((0,l.Z)((0,l.Z)((0,l.Z)((0,l.Z)((0,l.Z)({},f.DF),{},{formFieldRow:(0,l.Z)({},f.DF.formFieldRow)},f.oO),{},{pageContainer:{height:"100%"},screenTitle:{border:0,paddingTop:0}},f.Bw),f.qg),{},{capitalize:{textTransform:"capitalize"}},f.bp),f.Si),(0,f.Bz)(e.spacing(4))))}))((function(e){var r=e.classes,t=e.formFields,s=e.endpoint,u=e.backLink,f=e.header,q=e.idpType,S=e.icon,P=(0,y.TL)(),w=(0,b.s0)(),I=(0,b.UO)().idpName,T=(0,c.useState)(!0),L=(0,a.Z)(T,2),A=L[0],R=L[1],B=(0,c.useState)(!1),F=(0,a.Z)(B,2),O=F[0],U=F[1],z=(0,c.useState)({}),G=(0,a.Z)(z,2),M=G[0],H=G[1],J=(0,c.useState)({}),K=(0,a.Z)(J,2),V=K[0],X=K[1],Q=(0,c.useState)({}),W=(0,a.Z)(Q,2),Y=W[0],$=W[1],ee=(0,c.useState)(!1),re=(0,a.Z)(ee,2),te=re[0],ne=re[1],ie=(0,c.useState)(!1),oe=(0,a.Z)(ie,2),ae=oe[0],le=oe[1],ce=(0,D.Z)((function(e){P((0,Z.cN)(!0===e.restart))}),(function(e){return P((0,Z.Ih)(e))})),se=(0,a.Z)(ce,2),ue=se[0],de=se[1],pe=(0,D.Z)((function(e){U(!O),P((0,Z.cN)(!0===e.restart))}),(function(e){P((0,Z.Ih)(e))})),fe=(0,a.Z)(pe,2),he=fe[0],xe=fe[1],me=function(e){var r={};e.info&&e.info.forEach((function(e){"enable"===e.key&&U("on"===e.value),r[e.key]=e.value})),H(r)};(0,c.useEffect)((function(){R(!0)}),[]),(0,c.useEffect)((function(){A&&v.Z.invoke("GET","".concat(s).concat(I)).then((function(e){e&&($(e),me(e),function(e){var r={};e.info&&e.info.forEach((function(e){r[e.key]=e.value})),X(r)}(e)),R(!1)})).catch((function(e){P((0,Z.Ih)(e)),R(!1)}))}),[P,A,I,s]);var be=function(){var e=(0,o.Z)((0,i.Z)().mark((function e(r){return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:le(!1),r&&w(u);case 2:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}();return(0,k.jsxs)(d.ZP,{item:!0,xs:12,children:[ae&&I&&(0,k.jsx)(N.Z,{deleteOpen:ae,idp:I,idpType:q,closeDeleteModalAndRefresh:be}),(0,k.jsx)(C.Z,{label:(0,k.jsx)(j.Z,{to:u,label:f}),actions:(0,k.jsx)(_.Z,{label:"",indicatorLabels:["Enabled","Disabled"],checked:O,value:"is-configuration-enabled",id:"is-configuration-enabled",name:"is-configuration-enabled",onChange:function(e){return function(e){var r="enable=".concat(e?"on":"off");xe("PUT","".concat(s).concat(I),{input:r})}(e.target.checked)},description:"",disabled:he})}),(0,k.jsxs)(g.Z,{className:r.pageContainer,children:[(0,k.jsx)(d.ZP,{item:!0,xs:12,children:(0,k.jsx)(E.Z,{classes:{screenTitle:r.screenTitle},icon:S,title:"_"===I?"Default":I,actions:(0,k.jsxs)(c.Fragment,{children:["_"!==I&&(0,k.jsx)(m.zx,{id:"delete-idp-config",onClick:function(){le(!0)},label:"Delete Configuration",icon:(0,k.jsx)(h.XHJ,{}),variant:"secondary"}),(0,k.jsx)(m.zx,{id:"refresh-idp-config",onClick:function(){return R(!0)},label:"Refresh",icon:(0,k.jsx)(h.DuK,{})})]})})}),(0,k.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault();for(var r="",n=0,i=Object.keys(t);n.\n\nimport React from \"react\";\n\nimport { DialogContentText } from \"@mui/material\";\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport useApi from \"../Common/Hooks/useApi\";\nimport ConfirmDialog from \"../Common/ModalWrapper/ConfirmDialog\";\nimport { ConfirmDeleteIcon } from \"../../../icons\";\nimport {\n setErrorSnackMessage,\n setServerNeedsRestart,\n} from \"../../../systemSlice\";\nimport { useAppDispatch } from \"../../../store\";\n\ninterface IDeleteIDPConfigurationModalProps {\n closeDeleteModalAndRefresh: (refresh: boolean) => void;\n deleteOpen: boolean;\n idp: string;\n idpType: string;\n}\n\nconst DeleteIDPConfigurationModal = ({\n closeDeleteModalAndRefresh,\n deleteOpen,\n idp,\n idpType,\n}: IDeleteIDPConfigurationModalProps) => {\n const dispatch = useAppDispatch();\n const onDelSuccess = (res: any) => {\n closeDeleteModalAndRefresh(true);\n dispatch(setServerNeedsRestart(res.restart === true));\n };\n const onDelError = (err: ErrorResponseHandler) =>\n dispatch(setErrorSnackMessage(err));\n const onClose = () => closeDeleteModalAndRefresh(false);\n\n const [deleteLoading, invokeDeleteApi] = useApi(onDelSuccess, onDelError);\n\n if (!idp) {\n return null;\n }\n\n const onConfirmDelete = () => {\n invokeDeleteApi(\"DELETE\", `/api/v1/idp/${idpType}/${idp}`);\n };\n\n const displayName = idp === \"_\" ? \"Default\" : idp;\n\n return (\n }\n isLoading={deleteLoading}\n onConfirm={onConfirmDelete}\n onClose={onClose}\n confirmButtonProps={{\n disabled: deleteLoading,\n }}\n confirmationContent={\n \n Are you sure you want to delete IDP {displayName}{\" \"}\n configuration? \n \n }\n />\n );\n};\n\nexport default DeleteIDPConfigurationModal;\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\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Box, Grid } from \"@mui/material\";\nimport {\n buttonsStyles,\n containerForHeader,\n formFieldStyles,\n hrClass,\n modalBasic,\n pageContentStyles,\n searchField,\n} from \"../Common/FormComponents/common/styleLibrary\";\nimport { RefreshIcon, TrashIcon } from \"../../../icons\";\nimport InputBoxWrapper from \"../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport { Button } from \"mds\";\nimport { useNavigate, useParams } from \"react-router-dom\";\nimport { ErrorResponseHandler } from \"../../../common/types\";\nimport { useAppDispatch } from \"../../../store\";\nimport {\n setErrorSnackMessage,\n setServerNeedsRestart,\n} from \"../../../systemSlice\";\nimport useApi from \"../Common/Hooks/useApi\";\nimport api from \"../../../common/api\";\nimport PageLayout from \"../Common/Layout/PageLayout\";\nimport PageHeader from \"../Common/PageHeader/PageHeader\";\nimport BackLink from \"../../../common/BackLink\";\nimport ScreenTitle from \"../Common/ScreenTitle/ScreenTitle\";\nimport DeleteIDPConfigurationModal from \"./DeleteIDPConfigurationModal\";\nimport FormSwitchWrapper from \"../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\n\ntype IDPConfigurationDetailsProps = {\n classes?: any;\n formFields: object;\n endpoint: string;\n backLink: string;\n header: string;\n idpType: string;\n icon: React.ReactNode;\n};\n\nconst styles = (theme: Theme) =>\n createStyles({\n ...formFieldStyles,\n formFieldRow: {\n ...formFieldStyles.formFieldRow,\n },\n ...modalBasic,\n pageContainer: {\n height: \"100%\",\n },\n screenTitle: {\n border: 0,\n paddingTop: 0,\n },\n ...pageContentStyles,\n ...searchField,\n capitalize: {\n textTransform: \"capitalize\",\n },\n ...hrClass,\n ...buttonsStyles,\n ...containerForHeader(theme.spacing(4)),\n });\n\nconst IDPConfigurationDetails = ({\n classes,\n formFields,\n endpoint,\n backLink,\n header,\n idpType,\n icon,\n}: IDPConfigurationDetailsProps) => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n const params = useParams();\n\n const configurationName = params.idpName;\n\n const [loading, setLoading] = useState(true);\n const [isEnabled, setIsEnabled] = useState(false);\n const [fields, setFields] = useState({});\n const [originalFields, setOriginalFields] = useState({});\n const [record, setRecord] = useState({});\n const [editMode, setEditMode] = useState(false);\n const [deleteOpen, setDeleteOpen] = useState(false);\n\n const onSuccess = (res: any) => {\n dispatch(setServerNeedsRestart(res.restart === true));\n };\n\n const onError = (err: ErrorResponseHandler) =>\n dispatch(setErrorSnackMessage(err));\n\n const [loadingSave, invokeApi] = useApi(onSuccess, onError);\n\n const onEnabledSuccess = (res: any) => {\n setIsEnabled(!isEnabled);\n dispatch(setServerNeedsRestart(res.restart === true));\n };\n\n const onEnabledError = (err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n };\n\n const [loadingEnabledSave, invokeEnabledApi] = useApi(\n onEnabledSuccess,\n onEnabledError\n );\n\n const toggleEditMode = () => {\n if (editMode) {\n parseFields(record);\n }\n setEditMode(!editMode);\n };\n\n const parseFields = (record: any) => {\n let fields: any = {};\n if (record.info) {\n record.info.forEach((item: any) => {\n if (item.key === \"enable\") {\n setIsEnabled(item.value === \"on\");\n }\n fields[item.key] = item.value;\n });\n }\n setFields(fields);\n };\n\n const parseOriginalFields = (record: any) => {\n let fields: any = {};\n if (record.info) {\n record.info.forEach((item: any) => {\n fields[item.key] = item.value;\n });\n }\n setOriginalFields(fields);\n };\n\n useEffect(() => {\n setLoading(true);\n }, []);\n\n useEffect(() => {\n const loadRecord = () => {\n api\n .invoke(\"GET\", `${endpoint}${configurationName}`)\n .then((result: any) => {\n if (result) {\n setRecord(result);\n parseFields(result);\n parseOriginalFields(result);\n }\n setLoading(false);\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n setLoading(false);\n });\n };\n if (loading) {\n loadRecord();\n }\n }, [dispatch, loading, configurationName, endpoint]);\n\n const validSave = () => {\n for (const [key, value] of Object.entries(formFields)) {\n if (\n value.required &&\n !(\n fields[key] !== undefined &&\n fields[key] !== null &&\n fields[key] !== \"\"\n )\n ) {\n return false;\n }\n }\n return true;\n };\n\n const resetForm = () => {\n setFields({});\n };\n\n const saveRecord = (event: React.FormEvent) => {\n event.preventDefault();\n let input = \"\";\n for (const key of Object.keys(formFields)) {\n if (fields[key] || fields[key] !== originalFields[key]) {\n input += `${key}=${fields[key]} `;\n }\n }\n invokeApi(\"PUT\", `${endpoint}${configurationName}`, { input });\n setEditMode(false);\n };\n\n const closeDeleteModalAndRefresh = async (refresh: boolean) => {\n setDeleteOpen(false);\n\n if (refresh) {\n navigate(backLink);\n }\n };\n\n const toggleConfiguration = (value: boolean) => {\n const input = `enable=${value ? \"on\" : \"off\"}`;\n invokeEnabledApi(\"PUT\", `${endpoint}${configurationName}`, { input });\n };\n\n return (\n \n {deleteOpen && configurationName && (\n \n )}\n }\n actions={\n toggleConfiguration(e.target.checked)}\n description=\"\"\n disabled={loadingEnabledSave}\n />\n }\n />\n \n \n \n {configurationName !== \"_\" && (\n {\n setDeleteOpen(true);\n }}\n label={\"Delete Configuration\"}\n icon={}\n variant={\"secondary\"}\n />\n )}\n setLoading(true)}\n label={\"Refresh\"}\n icon={}\n />\n \n }\n />\n \n \n \n \n );\n};\n\nexport default withStyles(styles)(IDPConfigurationDetails);\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\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { IAM_PAGES } from \"../../../common/SecureComponent/permissions\";\nimport { LockIcon } from \"../../../icons\";\nimport { openIDFormFields } from \"./utils\";\nimport IDPConfigurationDetails from \"./IDPConfigurationDetails\";\n\ntype IDPOpenIDConfigurationDetailsProps = {\n classes?: any;\n};\n\nconst styles = (theme: Theme) => createStyles({});\n\nconst IDPOpenIDConfigurationDetails = ({\n classes,\n}: IDPOpenIDConfigurationDetailsProps) => {\n return (\n }\n />\n );\n};\n\nexport default withStyles(styles)(IDPOpenIDConfigurationDetails);\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\nexport const openIDFormFields = {\n config_url: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Config URL is required\" : \"\";\n },\n label: \"Config URL\",\n tooltip: \"Config URL for identity provider configuration\",\n placeholder:\n \"https://identity-provider-url/.well-known/openid-configuration\",\n type: \"text\",\n },\n client_id: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Client ID is required\" : \"\";\n },\n label: \"Client ID\",\n tooltip: \"Identity provider Client ID\",\n placeholder: \"Enter Client ID\",\n type: \"text\",\n },\n client_secret: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Client Secret is required\" : \"\";\n },\n label: \"Client Secret\",\n tooltip: \"Identity provider Client Secret\",\n placeholder: \"Enter Client Secret\",\n type: \"password\",\n },\n display_name: {\n required: false,\n label: \"Display Name\",\n tooltip: \"Display Name\",\n placeholder: \"Enter Display Name\",\n type: \"text\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n claim_name: {\n required: false,\n label: \"Claim Name\",\n tooltip: \"Claim from which MinIO will read the policy or role to use\",\n placeholder: \"Enter Claim Name\",\n type: \"text\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n claim_prefix: {\n required: false,\n label: \"Claim Prefix\",\n tooltip: \"Claim Prefix\",\n placeholder: \"Enter Claim Prefix\",\n type: \"text\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n scopes: {\n required: false,\n label: \"Scopes\",\n tooltip: \"Scopes\",\n placeholder: \"openid,profile,email\",\n type: \"text\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n redirect_uri: {\n required: false,\n label: \"Redirect URI\",\n tooltip: \"Redirect URI\",\n placeholder: \"https://console-endpoint-url/oauth_callback\",\n type: \"text\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n role_policy: {\n required: false,\n label: \"Role Policy\",\n tooltip: \"Role Policy\",\n placeholder: \"readonly\",\n type: \"text\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n};\n\nexport const ldapFormFields = {\n server_addr: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Server Address is required\" : \"\";\n },\n label: \"Server Address\",\n tooltip: 'AD/LDAP server address e.g. \"myldapserver.com:636\"',\n placeholder: \"myldapserver.com:636\",\n type: \"text\",\n },\n lookup_bind_dn: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Lookup Bind DN is required\" : \"\";\n },\n label: \"Lookup Bind DN\",\n tooltip:\n \"DN for LDAP read-only service account used to perform DN and group lookups\",\n placeholder: \"cn=admin,dc=min,dc=io\",\n type: \"text\",\n },\n lookup_bind_password: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"Lookup Bind Password is required\" : \"\";\n },\n label: \"Lookup Bind Password\",\n tooltip:\n \"Password for LDAP read-only service account used to perform DN and group lookups\",\n placeholder: \"admin\",\n type: \"password\",\n },\n user_dn_search_base_dn: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"User DN Search Base DN is required\" : \"\";\n },\n label: \"User DN Search Base\",\n tooltip: \"Base LDAP DN to search for user DN\",\n placeholder: \"DC=example,DC=net\",\n type: \"text\",\n },\n user_dn_search_filter: {\n required: true,\n hasError: (s: string, editMode: boolean) => {\n return !s && editMode ? \"User DN Search Filter is required\" : \"\";\n },\n label: \"User DN Search Filter\",\n tooltip: \"Search filter to lookup user DN\",\n placeholder: \"(sAMAcountName=%s)\",\n type: \"text\",\n },\n display_name: {\n required: false,\n label: \"Display Name\",\n tooltip: \"Display Name\",\n placeholder: \"Enter Display Name\",\n type: \"text\",\n hasError: (s: string, editMode: boolean) => \"\",\n },\n group_search_base_dn: {\n required: false,\n hasError: (s: string, editMode: boolean) => \"\",\n label: \"Group Search Base DN\",\n tooltip: \"Group Search Base DN\",\n placeholder: \"ou=swengg,dc=min,dc=io\",\n type: \"text\",\n },\n group_search_filter: {\n required: false,\n hasError: (s: string, editMode: boolean) => \"\",\n label: \"Group Search Filter\",\n tooltip: \"Group Search Filter\",\n placeholder: \"(&(objectclass=groupofnames)(member=%d))\",\n type: \"text\",\n },\n};\n"],"names":["closeDeleteModalAndRefresh","deleteOpen","idp","idpType","dispatch","useAppDispatch","useApi","res","setServerNeedsRestart","restart","err","setErrorSnackMessage","deleteLoading","invokeDeleteApi","displayName","title","confirmText","isOpen","titleIcon","isLoading","onConfirm","onClose","confirmButtonProps","disabled","confirmationContent","withStyles","theme","createStyles","formFieldStyles","formFieldRow","modalBasic","pageContainer","height","screenTitle","border","paddingTop","pageContentStyles","searchField","capitalize","textTransform","hrClass","buttonsStyles","containerForHeader","spacing","classes","formFields","endpoint","backLink","header","icon","navigate","useNavigate","configurationName","useParams","idpName","useState","loading","setLoading","isEnabled","setIsEnabled","fields","setFields","originalFields","setOriginalFields","record","setRecord","editMode","setEditMode","setDeleteOpen","loadingSave","invokeApi","loadingEnabledSave","invokeEnabledApi","parseFields","info","forEach","item","key","value","useEffect","api","then","result","parseOriginalFields","catch","refresh","xs","label","to","actions","indicatorLabels","checked","id","name","onChange","e","input","toggleConfiguration","target","description","className","Fragment","onClick","variant","noValidate","autoComplete","onSubmit","event","preventDefault","Object","keys","saveRecord","container","sx","marginTop","fieldBox","entries","map","required","tooltip","error","hasError","placeholder","type","textAlign","display","alignItems","justifyContent","gap","color","undefined","validSave","IAM_PAGES","openIDFormFields","width","config_url","s","client_id","client_secret","display_name","claim_name","claim_prefix","scopes","redirect_uri","role_policy","ldapFormFields","server_addr","lookup_bind_dn","lookup_bind_password","user_dn_search_base_dn","user_dn_search_filter","group_search_base_dn","group_search_filter"],"sourceRoot":""}
\ No newline at end of file
diff --git a/portal-ui/build/static/js/7486.83e0d248.chunk.js b/portal-ui/build/static/js/7486.83e0d248.chunk.js
new file mode 100644
index 000000000..591a196c8
--- /dev/null
+++ b/portal-ui/build/static/js/7486.83e0d248.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[7486],{17486:function(u,e,n){n.r(e);n(72791);var t=n(11135),r=n(25787),s=n(44959),a=n(80184);e.default=(0,r.Z)((function(u){return(0,t.Z)({})}))((function(u){u.classes;return(0,a.jsx)(s.Z,{idpType:"ldap"})}))}}]);
+//# sourceMappingURL=7486.83e0d248.chunk.js.map
\ No newline at end of file
diff --git a/portal-ui/build/static/js/7486.83e0d248.chunk.js.map b/portal-ui/build/static/js/7486.83e0d248.chunk.js.map
new file mode 100644
index 000000000..ac9545862
--- /dev/null
+++ b/portal-ui/build/static/js/7486.83e0d248.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/js/7486.83e0d248.chunk.js","mappings":"6KAiCA,WAAeA,EAAAA,EAAAA,IANA,SAACC,GAAD,OAAkBC,EAAAA,EAAAA,GAAa,CAAC,EAAhC,GAMf,EAJ8B,SAAC,GAA4C,EAA1CC,QAC/B,OAAO,SAAC,IAAD,CAAmBC,QAAS,QACpC,G","sources":["screens/Console/IDP/IDPLDAPConfigurations.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\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport IDPConfigurations from \"./IDPConfigurations\";\n\ntype IDPLDAPConfigurationsProps = {\n classes?: any;\n};\n\nconst styles = (theme: Theme) => createStyles({});\n\nconst IDPLDAPConfigurations = ({ classes }: IDPLDAPConfigurationsProps) => {\n return ;\n};\n\nexport default withStyles(styles)(IDPLDAPConfigurations);\n"],"names":["withStyles","theme","createStyles","classes","idpType"],"sourceRoot":""}
\ No newline at end of file
diff --git a/portal-ui/build/static/js/9467.5b40a136.chunk.js b/portal-ui/build/static/js/9467.8e1b707f.chunk.js
similarity index 99%
rename from portal-ui/build/static/js/9467.5b40a136.chunk.js
rename to portal-ui/build/static/js/9467.8e1b707f.chunk.js
index 273c65839..0f1c7138a 100644
--- a/portal-ui/build/static/js/9467.5b40a136.chunk.js
+++ b/portal-ui/build/static/js/9467.8e1b707f.chunk.js
@@ -1,2 +1,2 @@
-"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[9467],{23804:function(e,n,t){t(72791);var i=t(11135),a=t(25787),s=t(61889),r=t(80184);n.Z=(0,a.Z)((function(e){return(0,i.Z)({root:{border:"1px solid #E2E2E2",borderRadius:2,backgroundColor:"#FBFAFA",paddingLeft:25,paddingTop:31,paddingBottom:21,paddingRight:30},leftItems:{fontSize:16,fontWeight:"bold",marginBottom:15,display:"flex",alignItems:"center","& .min-icon":{marginRight:15,height:28,width:38}},helpText:{fontSize:16,paddingLeft:5}})}))((function(e){var n=e.classes,t=e.iconComponent,i=e.title,a=e.help;return(0,r.jsx)("div",{className:n.root,children:(0,r.jsxs)(s.ZP,{container:!0,children:[(0,r.jsxs)(s.ZP,{item:!0,xs:12,className:n.leftItems,children:[t,i]}),(0,r.jsx)(s.ZP,{item:!0,xs:12,className:n.helpText,children:a})]})})}))},89467:function(e,n,t){t.r(n),t.d(n,{default:function(){return se}});var i=t(93433),a=t(29439),s=t(1413),r=t(72791),c=t(16871),o=t(75952),l=t(11135),u=t(25787),d=t(40986),h=t(61889),m=t(56096),x=t(23814),f=t(81207),p=t(32291),g=t(26181),Z=t.n(g),j=t(20890),v=t(64554),b=t(45248),k=t(34866),C=t(43504),y=t(56087),S=t(38442),N=t(28182),P=t(27454),w=t(80184),T=(0,u.Z)((function(e){return(0,l.Z)({root:{marginBottom:30,padding:20,color:e.palette.primary.main,border:"#E5E5E5 1px solid",borderRadius:2,"& .min-icon":{height:14,width:14},"& .MuiTypography-body2":{fontSize:14},"& .MuiCardHeader-content":{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-all",font:"normal normal bold 24px/27px Lato",color:e.palette.primary.main,"& .MuiTypography-root":{fontSize:19,fontWeight:"bold","& .min-icon":{position:"relative",top:4,marginRight:4,height:"24px !important"}}},"& .MuiCardHeader-root":{background:"transparent linear-gradient(0deg, #EEF1F44E 0%, #FFFFFF 100%) 0% 0% no-repeat padding-box"}},checkBoxElement:{width:32,height:32,float:"left",overflow:"hidden","& div":{position:"absolute"}},manageButton:{borderRadius:4,width:111,color:e.palette.grey[700],textTransform:"unset",fontSize:12,fontWeight:"normal","& .MuiButton-endIcon":{"& .min-icon":{fontSize:18}}},metric:{"& .min-icon":{color:"#000000",width:13,marginRight:5}},metricLabel:{fontSize:14,fontWeight:"bold",color:"#000000"},metricText:{fontSize:24,fontWeight:"bold"},unit:{fontSize:12,fontWeight:"normal"},bucketName:{padding:0,margin:0,fontSize:22},bucketIcon:{"& .min-icon":{height:48,width:48,color:e.palette.primary.main}},bucketInfo:{display:"flex","@media (max-width: 900px)":{flexFlow:"column-reverse"}},bucketStats:{marginTop:15,borderTop:"1px solid rgb(234,234,234, .7)",paddingTop:14},bucketActionButtons:{display:"flex",alignItems:"center",justifyContent:"flex-end","& button":{marginLeft:8},"@media (max-width: 900px)":{marginTop:"-33px"}}})}))((function(e){var n=e.classes,t=e.bucket,i=e.onSelect,a=e.selected,s=e.bulkSelect,l=e.noManage,u=void 0!==l&&l,d=(0,c.s0)(),x=(0,b.ae)("".concat(t.size)||"0"),f=x.split(" ")[0],p=x.split(" ")[1],g=Z()(t,"details.quota.quota","0"),T=(0,b.Am)(g,!0,!1),B=(0,S.F)(t.name,y.D[y.EI.BUCKET_ADMIN]);return(0,w.jsxs)(h.ZP,{container:!0,className:(0,N.Z)(n.root,"bucket-item"),children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsxs)(h.ZP,{container:!0,justifyContent:"space-between",children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,sm:7,children:(0,w.jsxs)(h.ZP,{container:!0,children:[(0,w.jsxs)(h.ZP,{item:!0,xs:12,children:[s&&(0,w.jsx)("div",{className:n.checkBoxElement,onClick:function(e){e.stopPropagation()},children:(0,w.jsx)(k.Z,{checked:a,id:"select-".concat(t.name),label:"",name:"select-".concat(t.name),onChange:function(e){i(e)},value:t.name})}),(0,w.jsx)("h1",{className:n.bucketName,children:t.name})]}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsxs)(h.ZP,{container:!0,className:n.bucketInfo,children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,sm:!0,paddingRight:5,children:(0,w.jsxs)(j.Z,{variant:"body2",children:["Created: ",new Date(t.creation_date).toString()]})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,sm:!0,children:(0,w.jsxs)(j.Z,{variant:"body2",children:["Access: ",function(e){var n,t,i,a,s,r;return null===(n=e.rw_access)||void 0===n||!n.read||null!==(t=e.rw_access)&&void 0!==t&&t.write?null!==(i=e.rw_access)&&void 0!==i&&i.read||null===(a=e.rw_access)||void 0===a||!a.write?null!==(s=e.rw_access)&&void 0!==s&&s.read&&null!==(r=e.rw_access)&&void 0!==r&&r.write?"R/W":"":"W":"R"}(t)]})})]})})]})}),(0,w.jsxs)(h.ZP,{item:!0,xs:12,sm:5,className:n.bucketActionButtons,children:[!u&&(0,w.jsx)(S.s,{scopes:y.D[y.EI.BUCKET_ADMIN],resource:t.name,children:(0,w.jsx)(P.Z,{tooltip:B?"Manage Bucket":(0,y.MK)(y.D[y.EI.BUCKET_ADMIN],"managing this bucket"),children:(0,w.jsx)(o.zx,{onClick:function(){return d("/buckets/".concat(t.name,"/admin"))},label:"Manage",icon:(0,w.jsx)(m.ewm,{}),color:"primary",variant:"regular",id:"manage-".concat(t.name),disabled:!B})})}),(0,w.jsx)(P.Z,{tooltip:"Browse",children:(0,w.jsx)(o.zx,{onClick:function(){return d("/buckets/".concat(t.name,"/browse"))},label:"Browse",icon:(0,w.jsx)(m.LZ3,{}),color:"primary",variant:"callAction",id:"browse-".concat(t.name)})}),(0,w.jsx)(v.Z,{display:{xs:"none",sm:"block"},children:(0,w.jsx)("div",{style:{marginBottom:10}})})]})]})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,className:n.bucketStats,children:(0,w.jsxs)(h.ZP,{container:!0,justifyContent:"flex-start",spacing:4,children:[(0,w.jsx)(h.ZP,{item:!0,className:n.bucketIcon,children:(0,w.jsx)(C.rU,{to:"/buckets/".concat(t.name,"/browse"),children:(0,w.jsx)(m.wNb,{})})}),(0,w.jsxs)(h.ZP,{item:!0,textAlign:"left",className:n.metric,children:[(0,w.jsx)(m.rHZ,{}),(0,w.jsx)("span",{className:n.metricLabel,children:"Usage"}),(0,w.jsxs)("div",{className:n.metricText,children:[f,(0,w.jsx)("span",{className:n.unit,children:p}),"0"!==g&&(0,w.jsxs)(r.Fragment,{children:[" ","/ ",T.total,(0,w.jsx)("span",{className:n.unit,children:T.unit})]})]})]}),(0,w.jsxs)(h.ZP,{item:!0,textAlign:"left",className:n.metric,children:[(0,w.jsx)(m.xpX,{}),(0,w.jsx)("span",{className:n.metricLabel,children:"Objects"}),(0,w.jsx)("div",{className:n.metricText,children:t.objects?(0,b.CE)(t.objects):0})]})]})})]})})),B=t(20068),E=t(15146),_=t(98946),R=t(21435),I=t(56028),F=t(64163),L=t(28371),M=t(37516),z=t(90673),A=t(56578),K=t(87995),D=t(25469),U=(0,u.Z)((function(e){return(0,l.Z)((0,s.Z)((0,s.Z)({remoteBucketList:{display:"grid",gridTemplateColumns:"auto auto 45px",alignItems:"center",justifyContent:"stretch"},errorIcon:{color:"#C72C48"},successIcon:{color:"#42C91A"},hide:{opacity:0,transitionDuration:"0.3s"}},x.oO),x.AK))}))((function(e){var n=e.open,t=e.closeModalAndRefresh,s=e.classes,c=e.buckets,o=(0,D.TL)(),l=(0,r.useState)([]),u=(0,a.Z)(l,2),d=u[0],m=u[1],x=(0,r.useState)(!1),p=(0,a.Z)(x,2),g=p[0],j=p[1],v=(0,r.useState)(!1),k=(0,a.Z)(v,2),C=k[0],y=k[1],S=(0,r.useState)(""),N=(0,a.Z)(S,2),P=N[0],T=N[1],U=(0,r.useState)(""),W=(0,a.Z)(U,2),O=W[0],q=W[1],H=(0,r.useState)(""),G=(0,a.Z)(H,2),Q=G[0],Y=G[1],V=(0,r.useState)(""),X=(0,a.Z)(V,2),$=X[0],J=X[1],ee=(0,r.useState)(!0),ne=(0,a.Z)(ee,2),te=ne[0],ie=ne[1],ae=(0,r.useState)("async"),se=(0,a.Z)(ae,2),re=se[0],ce=se[1],oe=(0,r.useState)("100"),le=(0,a.Z)(oe,2),ue=le[0],de=le[1],he=(0,r.useState)("Gi"),me=(0,a.Z)(he,2),xe=me[0],fe=me[1],pe=(0,r.useState)("60"),ge=(0,a.Z)(pe,2),Ze=ge[0],je=ge[1],ve=(0,r.useState)([]),be=(0,a.Z)(ve,2),ke=be[0],Ce=be[1],ye=(0,r.useState)([]),Se=(0,a.Z)(ye,2),Ne=Se[0],Pe=Se[1],we=(0,r.useState)([]),Te=(0,a.Z)(we,2),Be=Te[0],Ee=Te[1],_e=Ne.map((function(e){return{label:e,value:e}}));(0,r.useEffect)((function(){if(0===ke.length){var e=[],n=[];c.forEach((function(t){e.push(t),n.push("")})),Ce(n),m(e)}}),[c,ke.length]);var Re=function(e){var n=e.errString;switch(n){case"":return(0,w.jsx)("div",{className:s.successIcon,children:(0,w.jsx)(_.Z,{})});case"n/a":return null;default:if(n)return(0,w.jsx)("div",{className:s.errorIcon,children:(0,w.jsx)(B.Z,{title:n,placement:"top-start",children:(0,w.jsx)(E.Z,{})})})}return null},Ie=function(e,n){var t=(0,i.Z)(ke);t[e]=n,Ce(t)},Fe=function(e){var n=(0,i.Z)(d),t=(0,i.Z)(ke);e.forEach((function(e){var i=Z()(e,"errorString","");if(!i||""===i){var a=n.indexOf(e.originBucket);n.splice(a,1),t.splice(a,1)}})),m(n),Ce(t)};return(0,w.jsx)(I.Z,{modalOpen:n,onClose:function(){t(!1)},title:"Set Multiple Bucket Replication",children:(0,w.jsx)(L.Z,{loadingStep:g||C,wizardSteps:[{label:"Remote Configuration",componentRender:(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(F.Z,{label:"Local Buckets to replicate",content:d.join(", ")})}),(0,w.jsx)("h4",{children:"Remote Endpoint Configuration"}),(0,w.jsx)("span",{className:s.descriptionText,children:"Please avoid the use of root credentials for this feature"}),(0,w.jsx)("br",{}),(0,w.jsx)("br",{}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{id:"accessKey",name:"accessKey",onChange:function(e){T(e.target.value)},label:"Access Key",value:P})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{id:"secretKey",name:"secretKey",onChange:function(e){q(e.target.value)},label:"Secret Key",value:O})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{id:"targetURL",name:"targetURL",onChange:function(e){Y(e.target.value)},placeholder:"play.min.io:9000",label:"Target URL",value:Q})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(M.Z,{checked:te,id:"useTLS",name:"useTLS",label:"Use TLS",onChange:function(e){ie(e.target.checked)},value:"yes"})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{id:"region",name:"region",onChange:function(e){J(e.target.value)},label:"Region",value:$})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(z.Z,{id:"replication_mode",name:"replication_mode",onChange:function(e){ce(e.target.value)},label:"Replication Mode",value:re,options:[{label:"Asynchronous",value:"async"},{label:"Synchronous",value:"sync"}]})}),"async"===re&&(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{type:"number",id:"bandwidth_scalar",name:"bandwidth_scalar",onChange:function(e){e.target.validity.valid&&de(e.target.value)},label:"Bandwidth",value:ue,min:"0",pattern:"[0-9]*",overlayObject:(0,w.jsx)(A.Z,{id:"quota_unit",onUnitChange:function(e){fe(e)},unitSelected:xe,unitsList:(0,b.zQ)(["Ki"]),disabled:!1})})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{id:"healthCheck",name:"healthCheck",onChange:function(e){je(e.target.value)},label:"Health Check Duration",value:Ze})})]}),buttons:[{type:"custom",label:"Next",enabled:!C,action:function(e){var n={accessKey:P,secretKey:O,targetURL:Q,useTLS:te};y(!0),f.Z.invoke("POST","/api/v1/list-external-buckets",n).then((function(n){var t=Z()(n,"buckets",[]);if(t&&t.length>0){var i=t.map((function(e){return e.name}));Pe(i)}e("++"),y(!1)})).catch((function(e){y(!1),o((0,K.zb)(e))}))}}]},{label:"Bucket Assignments",componentRender:(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)("h3",{children:"Remote Bucket Assignments"}),(0,w.jsx)("span",{className:s.descriptionText,children:"Please select / type the desired remote bucket were you want the local data to be replicated."}),(0,w.jsx)("div",{className:s.remoteBucketList,children:d.map((function(e,n){var t,i=function(e){if(Be.length>0){var n=Be.find((function(n){return n.originBucket===e}));if(n)return Z()(n,"errorString","")||""}return"n/a"}(e);return(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)("div",{className:""===i?s.hide:"",children:e}),(0,w.jsx)("div",{className:""===i?s.hide:"",children:(t=n,Ne.length>0?(0,w.jsx)(r.Fragment,{children:(0,w.jsx)(z.Z,{label:"",id:"assign-bucket-".concat(t),name:"assign-bucket-".concat(t),value:ke[t],onChange:function(e){Ie(t,e.target.value)},options:_e,disabled:g})}):(0,w.jsx)(r.Fragment,{children:(0,w.jsx)(R.Z,{id:"assign-bucket-".concat(t),name:"assign-bucket-".concat(t),label:"",onChange:function(e){Ie(t,e.target.value)},value:ke[t],disabled:g})}))}),(0,w.jsx)("div",{className:""===i?s.hide:"",children:Be.length>0&&(0,w.jsx)(Re,{errString:i})})]},"buckets-assignation-".concat(n.toString(),"-").concat(e))}))})]}),buttons:[{type:"back",label:"Back",enabled:!0},{type:"next",label:"Create",enabled:!g,action:function(){j(!0);var e=d.map((function(e,n){return{originBucket:e,destinationBucket:ke[n]}})),n="".concat(te?"https://":"http://").concat(Q),i=parseInt(Ze),a={accessKey:P,secretKey:O,targetURL:n,region:$,bucketsRelation:e,syncMode:re,bandwidth:"async"===re?parseInt((0,b.Pw)(ue,xe,!0)):0,healthCheckPeriod:i};f.Z.invoke("POST","/api/v1/buckets-replication",a).then((function(e){j(!1);var n=e.replicationState;Ee(n),0===n.filter((function(e){return e.errorString&&""!==e.errorString})).length?t(!0):setTimeout((function(){Fe(n)}),500)})).catch((function(e){j(!1),o((0,K.zb)(e))}))}}]}],forModal:!0})})})),W=t(23804),O=t(28789),q=t(49818),H=t(2289),G=t(74794),Q=t(59114),Y=t(98994),V=t(83679),X=t(17420),$=(0,u.Z)((function(e){return(0,l.Z)((0,s.Z)((0,s.Z)((0,s.Z)((0,s.Z)({resultGrid:{display:"grid",gridTemplateColumns:"45px auto",alignItems:"center",justifyContent:"stretch"},errorIcon:{paddingTop:5,color:"#C72C48"},successIcon:{paddingTop:5,color:"#42C91A"}},x.bK),x.ID),x.DF),x.QV))}))((function(e){var n=e.open,t=e.closeModalAndRefresh,i=e.classes,c=e.buckets,o=(0,D.TL)(),l=(0,r.useState)(!1),u=(0,a.Z)(l,2),d=u[0],m=u[1],x=(0,r.useState)(!0),p=(0,a.Z)(x,2),g=p[0],j=p[1],v=(0,r.useState)([]),b=(0,a.Z)(v,2),k=b[0],C=b[1],y=(0,r.useState)(""),S=(0,a.Z)(y,2),N=S[0],P=S[1],T=(0,r.useState)(""),A=(0,a.Z)(T,2),U=A[0],W=A[1],O=(0,r.useState)(""),q=(0,a.Z)(O,2),H=q[0],G=q[1],Q=(0,r.useState)(""),Y=(0,a.Z)(Q,2),$=Y[0],J=Y[1],ee=(0,r.useState)(!1),ne=(0,a.Z)(ee,2),te=ne[0],ie=ne[1],ae=(0,r.useState)("0"),se=(0,a.Z)(ae,2),re=se[0],ce=se[1],oe=(0,r.useState)("0"),le=(0,a.Z)(oe,2),ue=le[0],de=le[1],he=(0,r.useState)("expiry"),me=(0,a.Z)(he,2),xe=me[0],fe=me[1],pe=(0,r.useState)("0"),ge=(0,a.Z)(pe,2),Ze=ge[0],je=ge[1],ve=(0,r.useState)("0"),be=(0,a.Z)(ve,2),ke=be[0],Ce=be[1],ye=(0,r.useState)(!1),Se=(0,a.Z)(ye,2),Ne=Se[0],Pe=Se[1],we=(0,r.useState)(null),Te=(0,a.Z)(we,2),Be=Te[0],Ee=Te[1];(0,r.useEffect)((function(){g&&f.Z.invoke("GET","/api/v1/admin/tiers").then((function(e){var n=Z()(e,"items",[]);if(null!==n&&n.length>=1){var t=n.map((function(e){var n=e.type,t=Z()(e,"".concat(n,".name"),"");return{label:t,value:t}}));C(t),t.length>0&&G(t[0].value)}j(!1)})).catch((function(e){j(!1),o((0,K.zb)(e))}))}),[g,o]),(0,r.useEffect)((function(){var e=!0;"expiry"!==xe&&""===H&&(e=!1),Pe(e)}),[xe,Ze,ke,H]);var _e=function(e){var n=e.errString;switch(n){case"":return(0,w.jsx)("div",{className:i.successIcon,children:(0,w.jsx)(_.Z,{})});case"n/a":return null;default:if(n)return(0,w.jsx)("div",{className:i.errorIcon,children:(0,w.jsx)(B.Z,{title:n,placement:"top-start",children:(0,w.jsx)(E.Z,{})})})}return null};return(0,w.jsx)(I.Z,{modalOpen:n,onClose:function(){t(!1)},title:"Set Lifecycle to multiple buckets",children:(0,w.jsx)(L.Z,{loadingStep:d||g,wizardSteps:[{label:"Lifecycle Configuration",componentRender:(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(F.Z,{label:"Local Buckets to replicate",content:c.join(", ")})}),(0,w.jsx)("h4",{children:"Remote Endpoint Configuration"}),(0,w.jsx)(h.ZP,{container:!0,children:(0,w.jsxs)(h.ZP,{item:!0,xs:12,className:i.formScrollable,children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsxs)("fieldset",{className:i.fieldGroup,children:[(0,w.jsx)("legend",{className:i.descriptionText,children:"Lifecycle Configuration"}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(V.Z,{currentSelection:xe,id:"quota_type",name:"quota_type",label:"ILM Rule",onChange:function(e){fe(e.target.value)},selectorOptions:[{value:"expiry",label:"Expiry"},{value:"transition",label:"Transition"}]})}),"expiry"===xe?(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsx)(R.Z,{type:"number",id:"expiry_days",name:"expiry_days",onChange:function(e){je(e.target.value)},label:"Expiry Days",value:Ze,min:"0"})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsx)(R.Z,{type:"number",id:"noncurrentversion_expiration_days",name:"noncurrentversion_expiration_days",onChange:function(e){ce(e.target.value)},label:"Non-current Expiration Days",value:re,min:"0"})})]}):(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsx)(R.Z,{type:"number",id:"transition_days",name:"transition_days",onChange:function(e){Ce(e.target.value)},label:"Transition Days",value:ke,min:"0"})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsx)(R.Z,{type:"number",id:"noncurrentversion_transition_days",name:"noncurrentversion_transition_days",onChange:function(e){de(e.target.value)},label:"Non-current Transition Days",value:ue,min:"0"})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsx)(R.Z,{id:"noncurrentversion_t_SC",name:"noncurrentversion_t_SC",onChange:function(e){J(e.target.value)},placeholder:"Set Non-current Version Transition Storage Class",label:"Non-current Version Transition Storage Class",value:$})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsx)(z.Z,{label:"Storage Class",id:"storage_class",name:"storage_class",value:H,onChange:function(e){G(e.target.value)},options:k})})]})]})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsxs)("fieldset",{className:i.fieldGroup,children:[(0,w.jsx)("legend",{className:i.descriptionText,children:"File Configuration"}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{id:"prefix",name:"prefix",onChange:function(e){P(e.target.value)},label:"Prefix",value:N})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(X.Z,{name:"tags",label:"Tags",elements:U,onChange:function(e){W(e)},keyPlaceholder:"Tag Key",valuePlaceholder:"Tag Value",withBorder:!0})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(M.Z,{value:"expired_delete_marker",id:"expired_delete_marker",name:"expired_delete_marker",checked:te,onChange:function(e){ie(e.target.checked)},label:"Expired Object Delete Marker"})})]})})]})})]}),buttons:[{type:"custom",label:"Create Rules",enabled:!g&&!d&&Ne,action:function(e){var n={};if("expiry"===xe){var t={expiry_days:parseInt(Ze)};n=(0,s.Z)((0,s.Z)({},t),{},{noncurrentversion_expiration_days:parseInt(re)})}else{var i={transition_days:parseInt(ke)};n=(0,s.Z)((0,s.Z)({},i),{},{noncurrentversion_transition_days:parseInt(ue),noncurrentversion_transition_storage_class:$,storage_class:H})}var a=(0,s.Z)({buckets:c,type:xe,prefix:N,tags:U,expired_object_delete_marker:te},n);f.Z.invoke("POST","/api/v1/buckets/multi-lifecycle",a).then((function(n){m(!1),Ee(n),e("++")})).catch((function(e){m(!1),o((0,K.zb)(e))}))}}]},{label:"Results",componentRender:(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)("h3",{children:"Multi Bucket lifecycle Assignments Results"}),(0,w.jsx)(h.ZP,{container:!0,children:(0,w.jsxs)(h.ZP,{item:!0,xs:12,className:i.formScrollable,children:[(0,w.jsx)("h4",{children:"Buckets Results"}),null===Be||void 0===Be?void 0:Be.results.map((function(e){return(0,w.jsxs)("div",{className:i.resultGrid,children:[_e({errString:e.error||""}),(0,w.jsx)("span",{children:e.bucketName})]})}))]})})]}),buttons:[{type:"custom",label:"Done",enabled:!d,action:function(){return t(!0)}}]}],forModal:!0})})})),J=t(49535),ee=t(60364),ne=t(46078),te=t(73996),ie=t(81806),ae=t(54756),se=(0,u.Z)((function(e){return(0,l.Z)((0,s.Z)({bulkSelect:{marginLeft:8,"&:hover":{backgroundColor:e.palette.primary.main},"&.MuiButton-contained":{backgroundColor:e.palette.primary.main}},bucketList:{marginTop:25,height:"calc(100vh - 211px)","&.isEmbedded":{height:"calc(100vh - 128px)"}},searchField:(0,s.Z)((0,s.Z)({},x.qg.searchField),{},{minWidth:380,"@media (max-width: 900px)":{minWidth:220}})},(0,x.Bz)(e.spacing(4))))}))((function(e){var n=e.classes,t=(0,D.TL)(),s=(0,c.s0)(),l=(0,r.useState)([]),u=(0,a.Z)(l,2),x=u[0],g=u[1],Z=(0,r.useState)(!0),j=(0,a.Z)(Z,2),v=j[0],b=j[1],k=(0,r.useState)(""),C=(0,a.Z)(k,2),N=C[0],B=C[1],E=(0,r.useState)([]),_=(0,a.Z)(E,2),R=_[0],I=_[1],F=(0,r.useState)(!1),L=(0,a.Z)(F,2),M=L[0],z=L[1],A=(0,r.useState)(!1),V=(0,a.Z)(A,2),X=V[0],se=V[1],re=(0,r.useState)(!1),ce=(0,a.Z)(re,2),oe=ce[0],le=ce[1],ue=(0,r.useState)(!1),de=(0,a.Z)(ue,2),he=de[0],me=de[1],xe=(0,ee.v9)(ne.$4),fe=!(null===xe||void 0===xe||!xe.includes("object-browser-only"));(0,r.useEffect)((function(){if(v){b(!0),f.Z.invoke("GET","/api/v1/buckets").then((function(e){b(!1),g(e.buckets||[]),t((0,ae.MU)(!0))})).catch((function(e){b(!1),t((0,K.Ih)(e))}))}}),[v,t]);var pe=x.filter((function(e){return""===N||e.name.indexOf(N)>=0})),ge=x.length>0,Ze=function(e){var n=e.target,t=n.value,a=n.checked,s=(0,i.Z)(R);return a?s.push(t):s=s.filter((function(e){return e!==t})),I(s),s};(0,r.useEffect)((function(){var e=!1;R.forEach((function(n){(0,J.Z)(n,y.D[y.EI.BUCKET_LIFECYCLE],!0)?le(!0):e=!0})),le(!e)}),[R]);var je=(0,J.Z)("*",[y.Ft.S3_CREATE_BUCKET]),ve=(0,J.Z)("*",[y.Ft.S3_LIST_BUCKET]);return(0,w.jsxs)(r.Fragment,{children:[M&&(0,w.jsx)(U,{open:M,buckets:R,closeModalAndRefresh:function(e){z(!1),e&&I([])}}),X&&(0,w.jsx)($,{buckets:R,closeModalAndRefresh:function(e){se(!1),e&&I([])},open:X}),!fe&&(0,w.jsx)(p.Z,{label:"Buckets"}),(0,w.jsxs)(G.Z,{children:[(0,w.jsxs)(h.ZP,{item:!0,xs:12,className:n.actionsTray,display:"flex",children:[fe&&(0,w.jsx)(h.ZP,{item:!0,xs:!0,children:(0,w.jsx)(te.Z,{marginRight:15,marginTop:10})}),ge&&(0,w.jsx)(Q.Z,{onChange:B,placeholder:"Search Buckets",overrideClass:n.searchField,value:N}),(0,w.jsxs)(h.ZP,{item:!0,xs:12,display:"flex",alignItems:"center",justifyContent:"flex-end",sx:{"& button":{marginLeft:"8px"}},children:[!fe&&(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)(P.Z,{tooltip:ge?he?"Unselect Buckets":"Select Multiple Buckets":"",children:(0,w.jsx)(o.zx,{id:"multiple-bucket-seection",onClick:function(){me(!he),I([])},icon:(0,w.jsx)(H.Z,{}),variant:he?"callAction":"regular",disabled:!ge})}),he&&(0,w.jsx)(P.Z,{tooltip:ge?R.length===pe.length?"Unselect All Buckets":"Select All Buckets":"",children:(0,w.jsx)(o.zx,{id:"select-all-buckets",onClick:function(){if(R.length!==pe.length){var e=pe.map((function(e){return e.name}));I(e)}else I([])},icon:(0,w.jsx)(m.QQb,{}),variant:"regular"})}),(0,w.jsx)(P.Z,{tooltip:ge?oe?0===R.length?he?"Please select at least one bucket on which to configure Lifecycle":"Use the Select Multiple Buckets button to choose buckets on which to configure Lifecycle":"Set Lifecycle":(0,y.MK)(y.D[y.EI.BUCKET_LIFECYCLE],"configure lifecycle for the selected buckets"):"",children:(0,w.jsx)(o.zx,{id:"set-lifecycle",onClick:function(){se(!0)},icon:(0,w.jsx)(m.QIv,{}),variant:"regular",disabled:0===R.length||!oe})}),(0,w.jsx)(P.Z,{tooltip:ge?0===R.length?he?"Please select at least one bucket on which to configure Replication":"Use the Select Multiple Buckets button to choose buckets on which to configure Replication":"Set Replication":"",children:(0,w.jsx)(o.zx,{id:"set-replication",onClick:function(){z(!0)},icon:(0,w.jsx)(q.Z,{}),variant:"regular",disabled:0===R.length})})]}),(0,w.jsx)(P.Z,{tooltip:"Refresh",children:(0,w.jsx)(o.zx,{id:"refresh-buckets",onClick:function(){b(!0)},icon:(0,w.jsx)(O.default,{}),variant:"regular"})}),!fe&&(0,w.jsx)(P.Z,{tooltip:je?"":(0,y.MK)([y.Ft.S3_CREATE_BUCKET],"create a bucket"),children:(0,w.jsx)(o.zx,{id:"create-bucket",onClick:function(){s(y.gA.ADD_BUCKETS)},icon:(0,w.jsx)(m.dtP,{}),variant:"callAction",disabled:!je,label:"Create Bucket"})})]})]}),v&&(0,w.jsx)(d.Z,{}),!v&&(0,w.jsxs)(h.ZP,{item:!0,xs:12,className:"".concat(n.bucketList," ").concat(fe?"isEmbedded":""),children:[0!==pe.length&&(0,w.jsx)(Y.Z,{rowRenderFunction:function(e){var n=pe[e]||null;return n?(0,w.jsx)(T,{bucket:n,onSelect:Ze,selected:R.includes(n.name),bulkSelect:he,noManage:fe}):null},totalItems:pe.length}),0===pe.length&&""!==N&&(0,w.jsx)(h.ZP,{container:!0,justifyContent:"center",alignContent:"center",alignItems:"center",children:(0,w.jsx)(h.ZP,{item:!0,xs:8,children:(0,w.jsx)(W.Z,{iconComponent:(0,w.jsx)(m.wNb,{}),title:"No Results",help:(0,w.jsx)(r.Fragment,{children:"No buckets match the filtering condition"})})})}),!ge&&(0,w.jsx)(h.ZP,{container:!0,justifyContent:"center",alignContent:"center",alignItems:"center",children:(0,w.jsx)(h.ZP,{item:!0,xs:8,children:(0,w.jsx)(W.Z,{iconComponent:(0,w.jsx)(m.wNb,{}),title:"Buckets",help:(0,w.jsxs)(r.Fragment,{children:["MinIO uses buckets to organize objects. A bucket is similar to a folder or directory in a filesystem, where each bucket can hold an arbitrary number of objects.",(0,w.jsx)("br",{}),ve?"":(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)("br",{}),(0,y.MK)([y.Ft.S3_LIST_BUCKET],"view the buckets on this server"),(0,w.jsx)("br",{})]}),(0,w.jsxs)(S.s,{scopes:[y.Ft.S3_CREATE_BUCKET],resource:y.C3,children:[(0,w.jsx)("br",{}),"To get started,\xa0",(0,w.jsx)(ie.Z,{onClick:function(){s(y.gA.ADD_BUCKETS)},children:"Create a Bucket."})]})]})})})})]})]})]})}))},81806:function(e,n,t){var i=t(1413),a=t(45987),s=(t(72791),t(11135)),r=t(25787),c=t(80184),o=["classes","children"];n.Z=(0,r.Z)((function(e){return(0,s.Z)({root:{padding:0,margin:0,border:0,backgroundColor:"transparent",textDecoration:"underline",cursor:"pointer",fontSize:"inherit",color:e.palette.info.main,fontFamily:"Lato, sans-serif"}})}))((function(e){var n=e.classes,t=e.children,s=(0,a.Z)(e,o);return(0,c.jsx)("button",(0,i.Z)((0,i.Z)({},s),{},{className:n.root,children:t}))}))},73996:function(e,n,t){t(72791);var i=t(56096),a=t(60364),s=t(80184);n.Z=function(e){var n=e.marginRight,r=e.marginTop,c=t(47045),o=(0,a.v9)((function(e){return e.system.overrideStyles})),l=c((null===o||void 0===o?void 0:o.backgroundColor)||"#fff").getBrightness()<=128;return(0,s.jsx)(i.BHR,{style:{width:105,marginRight:n,marginTop:r,fill:l?"#fff":"#081C42"}})}},34866:function(e,n,t){var i=t(1413),a=t(72791),s=t(61889),r=t(94454),c=t(30829),o=t(20068),l=t(11135),u=t(25787),d=t(23814),h=t(84570),m=t(80184);n.Z=(0,u.Z)((function(e){return(0,l.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},d.YI),d.Hr),d.lM),{},{fieldContainer:(0,i.Z)((0,i.Z)({},d.YI.fieldContainer),{},{display:"flex",justifyContent:"flex-start",alignItems:"center",margin:"15px 0",marginBottom:0,flexBasis:"initial",flexWrap:"nowrap"}),noTopMargin:{marginTop:0}}))}))((function(e){var n=e.label,t=e.onChange,i=e.value,l=e.id,u=e.name,d=e.checked,x=void 0!==d&&d,f=e.disabled,p=void 0!==f&&f,g=e.noTopMargin,Z=void 0!==g&&g,j=e.tooltip,v=void 0===j?"":j,b=e.overrideLabelClasses,k=void 0===b?"":b,C=e.overrideCheckboxStyles,y=e.classes,S=e.className;return(0,m.jsx)(a.Fragment,{children:(0,m.jsxs)(s.ZP,{item:!0,xs:12,className:"".concat(y.fieldContainer," ").concat(Z?y.noTopMargin:""," ").concat(S||""),children:[(0,m.jsx)("div",{children:(0,m.jsx)(r.Z,{name:u,id:l,value:i,color:"primary",inputProps:{"aria-label":"secondary checkbox"},checked:x,onChange:t,checkedIcon:(0,m.jsx)("span",{className:y.checkedIcon}),icon:(0,m.jsx)("span",{className:y.unCheckedIcon}),disabled:p,disableRipple:!0,disableFocusRipple:!0,focusRipple:!1,centerRipple:!1,disableTouchRipple:!0,style:C||{}})}),""!==n&&(0,m.jsxs)(c.Z,{htmlFor:l,className:"".concat(y.noMinWidthLabel," ").concat(k),children:[(0,m.jsx)("span",{children:n}),""!==v&&(0,m.jsx)("div",{className:y.tooltipContainer,children:(0,m.jsx)(o.Z,{title:v,placement:"top-start",children:(0,m.jsx)("div",{className:y.tooltip,children:(0,m.jsx)(h.Z,{})})})})]})]})})}))},64163:function(e,n,t){var i=t(1413),a=t(72791),s=t(61889),r=t(11135),c=t(25787),o=t(23814),l=t(80184);n.Z=(0,c.Z)((function(e){return(0,r.Z)((0,i.Z)({},o.xx))}))((function(e){var n=e.classes,t=e.label,i=void 0===t?"":t,r=e.content,c=e.multiLine,o=void 0!==c&&c,u=e.actionButton;return(0,l.jsx)(a.Fragment,{children:(0,l.jsxs)(s.ZP,{className:n.prefinedContainer,children:[""!==i&&(0,l.jsx)(s.ZP,{item:!0,xs:12,className:n.predefinedTitle,children:i}),(0,l.jsxs)(s.ZP,{item:!0,xs:12,className:"".concat(n.predefinedList," ").concat(u?n.includesActionButton:""),children:[(0,l.jsx)(s.ZP,{item:!0,xs:12,className:o?n.innerContentMultiline:n.innerContent,children:r}),u&&(0,l.jsx)("div",{className:n.overlayShareOption,children:u})]})]})})}))},17420:function(e,n,t){var i=t(93433),a=t(29439),s=t(1413),r=t(72791),c=t(26181),o=t.n(c),l=t(48573),u=t.n(l),d=t(11135),h=t(25787),m=t(61889),x=t(77961),f=t(30829),p=t(20068),g=t(23814),Z=t(21435),j=t(47919),v=t(80184);n.Z=(0,h.Z)((function(e){return(0,d.Z)((0,s.Z)((0,s.Z)((0,s.Z)({},g.YI),g.Hr),{},{inputWithBorder:{border:"1px solid #EAEAEA",padding:15,height:150,overflowY:"auto",position:"relative",marginTop:15},lineInputBoxes:{display:"flex",marginBottom:10},queryDiv:{alignSelf:"center",margin:"0 4px",fontWeight:600}}))}))((function(e){var n=e.elements,t=e.name,s=e.label,c=e.tooltip,l=void 0===c?"":c,d=e.keyPlaceholder,h=void 0===d?"":d,g=e.valuePlaceholder,b=void 0===g?"":g,k=e.onChange,C=e.withBorder,y=void 0!==C&&C,S=e.classes,N=(0,r.useState)([""]),P=(0,a.Z)(N,2),w=P[0],T=P[1],B=(0,r.useState)([""]),E=(0,a.Z)(B,2),_=E[0],R=E[1],I=(0,r.createRef)();(0,r.useEffect)((function(){if(1===w.length&&""===w[0]&&1===_.length&&""===_[0]&&n&&""!==n){var e=n.split("&"),t=[],i=[];e.forEach((function(e){var n=e.split("=");2===n.length&&(t.push(n[0]),i.push(n[1]))})),t.push(""),i.push(""),T(t),R(i)}}),[w,_,n]),(0,r.useEffect)((function(){var e=I.current;e&&w.length>1&&e.scrollIntoView(!1)}),[w]);var F=(0,r.useRef)(!0);(0,r.useLayoutEffect)((function(){F.current?F.current=!1:z()}),[w,_]);var L=function(e){e.persist();var n=(0,i.Z)(w);n[o()(e.target,"dataset.index",0)]=e.target.value,T(n)},M=function(e){e.persist();var n=(0,i.Z)(_);n[o()(e.target,"dataset.index",0)]=e.target.value,R(n)},z=u()((function(){var e="";w.forEach((function(n,t){if(w[t]&&_[t]){var i="".concat(n,"=").concat(_[t]);0!==t&&(i="&".concat(i)),e="".concat(e).concat(i)}})),k(e)}),500),A=_.map((function(e,n){return(0,v.jsxs)(m.ZP,{item:!0,xs:12,className:S.lineInputBoxes,children:[(0,v.jsx)(Z.Z,{id:"".concat(t,"-key-").concat(n.toString()),label:"",name:"".concat(t,"-").concat(n.toString()),value:w[n],onChange:L,index:n,placeholder:h}),(0,v.jsx)("span",{className:S.queryDiv,children:":"}),(0,v.jsx)(Z.Z,{id:"".concat(t,"-value-").concat(n.toString()),label:"",name:"".concat(t,"-").concat(n.toString()),value:_[n],onChange:M,index:n,placeholder:b,overlayIcon:n===_.length-1?(0,v.jsx)(j.Z,{}):null,overlayAction:function(){!function(){if(""!==w[w.length-1].trim()&&""!==_[_.length-1].trim()){var e=(0,i.Z)(w),n=(0,i.Z)(_);e.push(""),n.push(""),T(e),R(n)}}()}})]},"query-pair-".concat(t,"-").concat(n.toString()))}));return(0,v.jsx)(r.Fragment,{children:(0,v.jsxs)(m.ZP,{item:!0,xs:12,className:S.fieldContainer,children:[(0,v.jsxs)(f.Z,{className:S.inputLabel,children:[(0,v.jsx)("span",{children:s}),""!==l&&(0,v.jsx)("div",{className:S.tooltipContainer,children:(0,v.jsx)(p.Z,{title:l,placement:"top-start",children:(0,v.jsx)(x.Z,{className:S.tooltip})})})]}),(0,v.jsxs)(m.ZP,{item:!0,xs:12,className:"".concat(y?S.inputWithBorder:""),children:[A,(0,v.jsx)("div",{ref:I})]})]})})}))},56028:function(e,n,t){var i=t(29439),a=t(1413),s=t(72791),r=t(60364),c=t(13400),o=t(55646),l=t(5574),u=t(65661),d=t(39157),h=t(11135),m=t(25787),x=t(23814),f=t(25469),p=t(29823),g=t(28057),Z=t(87995),j=t(80184);n.Z=(0,m.Z)((function(e){return(0,h.Z)((0,a.Z)((0,a.Z)({},x.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},x.sN))}))((function(e){var n=e.onClose,t=e.modalOpen,h=e.title,m=e.children,x=e.classes,v=e.wideLimit,b=void 0===v||v,k=e.noContentPadding,C=e.titleIcon,y=void 0===C?null:C,S=(0,f.TL)(),N=(0,s.useState)(!1),P=(0,i.Z)(N,2),w=P[0],T=P[1],B=(0,r.v9)((function(e){return e.system.modalSnackBar}));(0,s.useEffect)((function(){S((0,Z.MK)(""))}),[S]),(0,s.useEffect)((function(){if(B){if(""===B.message)return void T(!1);"error"!==B.type&&T(!0)}}),[B]);var E=b?{classes:{paper:x.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},_="";return B&&(_=B.detailedErrorMsg,(""===B.detailedErrorMsg||B.detailedErrorMsg.length<5)&&(_=B.message)),(0,j.jsxs)(l.Z,(0,a.Z)((0,a.Z)({open:t,classes:x},E),{},{scroll:"paper",onClose:function(e,t){"backdropClick"!==t&&n()},className:x.root,children:[(0,j.jsxs)(u.Z,{className:x.title,children:[(0,j.jsxs)("div",{className:x.titleText,children:[y," ",h]}),(0,j.jsx)("div",{className:x.closeContainer,children:(0,j.jsx)(c.Z,{"aria-label":"close",id:"close",className:x.closeButton,onClick:n,disableRipple:!0,size:"small",children:(0,j.jsx)(p.Z,{})})})]}),(0,j.jsx)(g.Z,{isModal:!0}),(0,j.jsx)(o.Z,{open:w,className:x.snackBarModal,onClose:function(){T(!1),S((0,Z.MK)(""))},message:_,ContentProps:{className:"".concat(x.snackBar," ").concat(B&&"error"===B.type?x.errorSnackBar:"")},autoHideDuration:B&&"error"===B.type?1e4:5e3}),(0,j.jsx)(d.Z,{className:k?"":x.content,children:m})]}))}))},59114:function(e,n,t){var i=t(4942),a=t(1413),s=(t(72791),t(63466)),r=t(74900),c=t(27391),o=t(25787),l=t(11135),u=t(23814),d=t(80184);n.Z=(0,o.Z)((function(e){return(0,l.Z)({searchField:(0,a.Z)({},u.qg.searchField),adornment:{}})}))((function(e){var n=e.placeholder,t=void 0===n?"":n,a=e.classes,o=e.onChange,l=e.adornmentPosition,u=void 0===l?"end":l,h=e.overrideClass,m=e.value,x=(0,i.Z)({disableUnderline:!0},"".concat(u,"Adornment"),(0,d.jsx)(s.Z,{position:u,className:a.adornment,children:(0,d.jsx)(r.Z,{})}));return(0,d.jsx)(c.Z,{placeholder:t,className:h||a.searchField,id:"search-resource",label:"",InputProps:x,onChange:function(e){o(e.target.value)},variant:"standard",value:m})}))},98994:function(e,n,t){var i=t(72791),a=t(22338),s=t(79762),r=t(5171),c=t(80184),o={};n.Z=function(e){var n=e.rowRenderFunction,t=e.totalItems,l=e.defaultHeight,u=function(e){var t=e.index,i=e.style;return(0,c.jsx)("div",{style:i,children:n(t)})};return(0,c.jsx)(i.Fragment,{children:(0,c.jsx)(s.Z,{isItemLoaded:function(e){return!!o[e]},loadMoreItems:function(e,n){for(var t=e;t<=n;t++)o[t]=1;for(var i=e;i<=n;i++)o[i]=2},itemCount:t,children:function(e){var n=e.onItemsRendered,i=e.ref;return(0,c.jsx)(r.qj,{children:function(e){var s=e.width,r=e.height;return(0,c.jsx)(a.t7,{itemSize:l||220,height:r,itemCount:t,width:s,ref:i,onItemsRendered:n,children:u})}})}})})}},98946:function(e,n,t){var i=t(64836);n.Z=void 0;var a=i(t(45649)),s=t(80184),r=(0,a.default)((0,s.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"CheckCircleOutline");n.Z=r},15146:function(e,n,t){var i=t(64836);n.Z=void 0;var a=i(t(45649)),s=t(80184),r=(0,a.default)((0,s.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline");n.Z=r},77961:function(e,n,t){var i=t(64836);n.Z=void 0;var a=i(t(45649)),s=t(80184),r=(0,a.default)((0,s.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}),"Help");n.Z=r}}]);
-//# sourceMappingURL=9467.5b40a136.chunk.js.map
\ No newline at end of file
+"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[9467],{23804:function(e,n,t){t(72791);var i=t(11135),a=t(25787),s=t(61889),r=t(80184);n.Z=(0,a.Z)((function(e){return(0,i.Z)({root:{border:"1px solid #E2E2E2",borderRadius:2,backgroundColor:"#FBFAFA",paddingLeft:25,paddingTop:31,paddingBottom:21,paddingRight:30},leftItems:{fontSize:16,fontWeight:"bold",marginBottom:15,display:"flex",alignItems:"center","& .min-icon":{marginRight:15,height:28,width:38}},helpText:{fontSize:16,paddingLeft:5}})}))((function(e){var n=e.classes,t=e.iconComponent,i=e.title,a=e.help;return(0,r.jsx)("div",{className:n.root,children:(0,r.jsxs)(s.ZP,{container:!0,children:[(0,r.jsxs)(s.ZP,{item:!0,xs:12,className:n.leftItems,children:[t,i]}),(0,r.jsx)(s.ZP,{item:!0,xs:12,className:n.helpText,children:a})]})})}))},89467:function(e,n,t){t.r(n),t.d(n,{default:function(){return se}});var i=t(93433),a=t(29439),s=t(1413),r=t(72791),c=t(16871),o=t(75952),l=t(11135),u=t(25787),d=t(40986),h=t(61889),m=t(56096),x=t(23814),f=t(81207),p=t(32291),g=t(26181),Z=t.n(g),j=t(20890),v=t(64554),b=t(45248),k=t(34866),C=t(43504),y=t(56087),S=t(38442),N=t(28182),P=t(27454),w=t(80184),T=(0,u.Z)((function(e){return(0,l.Z)({root:{marginBottom:30,padding:20,color:e.palette.primary.main,border:"#E5E5E5 1px solid",borderRadius:2,"& .min-icon":{height:14,width:14},"& .MuiTypography-body2":{fontSize:14},"& .MuiCardHeader-content":{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-all",font:"normal normal bold 24px/27px Lato",color:e.palette.primary.main,"& .MuiTypography-root":{fontSize:19,fontWeight:"bold","& .min-icon":{position:"relative",top:4,marginRight:4,height:"24px !important"}}},"& .MuiCardHeader-root":{background:"transparent linear-gradient(0deg, #EEF1F44E 0%, #FFFFFF 100%) 0% 0% no-repeat padding-box"}},checkBoxElement:{width:32,height:32,float:"left",overflow:"hidden","& div":{position:"absolute"}},manageButton:{borderRadius:4,width:111,color:e.palette.grey[700],textTransform:"unset",fontSize:12,fontWeight:"normal","& .MuiButton-endIcon":{"& .min-icon":{fontSize:18}}},metric:{"& .min-icon":{color:"#000000",width:13,marginRight:5}},metricLabel:{fontSize:14,fontWeight:"bold",color:"#000000"},metricText:{fontSize:24,fontWeight:"bold"},unit:{fontSize:12,fontWeight:"normal"},bucketName:{padding:0,margin:0,fontSize:22},bucketIcon:{"& .min-icon":{height:48,width:48,color:e.palette.primary.main}},bucketInfo:{display:"flex","@media (max-width: 900px)":{flexFlow:"column-reverse"}},bucketStats:{marginTop:15,borderTop:"1px solid rgb(234,234,234, .7)",paddingTop:14},bucketActionButtons:{display:"flex",alignItems:"center",justifyContent:"flex-end","& button":{marginLeft:8},"@media (max-width: 900px)":{marginTop:"-33px"}}})}))((function(e){var n=e.classes,t=e.bucket,i=e.onSelect,a=e.selected,s=e.bulkSelect,l=e.noManage,u=void 0!==l&&l,d=(0,c.s0)(),x=(0,b.ae)("".concat(t.size)||"0"),f=x.split(" ")[0],p=x.split(" ")[1],g=Z()(t,"details.quota.quota","0"),T=(0,b.Am)(g,!0,!1),B=(0,S.F)(t.name,y.D[y.EI.BUCKET_ADMIN]);return(0,w.jsxs)(h.ZP,{container:!0,className:(0,N.Z)(n.root,"bucket-item"),children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsxs)(h.ZP,{container:!0,justifyContent:"space-between",children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,sm:7,children:(0,w.jsxs)(h.ZP,{container:!0,children:[(0,w.jsxs)(h.ZP,{item:!0,xs:12,children:[s&&(0,w.jsx)("div",{className:n.checkBoxElement,onClick:function(e){e.stopPropagation()},children:(0,w.jsx)(k.Z,{checked:a,id:"select-".concat(t.name),label:"",name:"select-".concat(t.name),onChange:function(e){i(e)},value:t.name})}),(0,w.jsx)("h1",{className:n.bucketName,children:t.name})]}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsxs)(h.ZP,{container:!0,className:n.bucketInfo,children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,sm:!0,paddingRight:5,children:(0,w.jsxs)(j.Z,{variant:"body2",children:["Created: ",new Date(t.creation_date).toString()]})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,sm:!0,children:(0,w.jsxs)(j.Z,{variant:"body2",children:["Access: ",function(e){var n,t,i,a,s,r;return null===(n=e.rw_access)||void 0===n||!n.read||null!==(t=e.rw_access)&&void 0!==t&&t.write?null!==(i=e.rw_access)&&void 0!==i&&i.read||null===(a=e.rw_access)||void 0===a||!a.write?null!==(s=e.rw_access)&&void 0!==s&&s.read&&null!==(r=e.rw_access)&&void 0!==r&&r.write?"R/W":"":"W":"R"}(t)]})})]})})]})}),(0,w.jsxs)(h.ZP,{item:!0,xs:12,sm:5,className:n.bucketActionButtons,children:[!u&&(0,w.jsx)(S.s,{scopes:y.D[y.EI.BUCKET_ADMIN],resource:t.name,children:(0,w.jsx)(P.Z,{tooltip:B?"Manage Bucket":(0,y.MK)(y.D[y.EI.BUCKET_ADMIN],"managing this bucket"),children:(0,w.jsx)(o.zx,{onClick:function(){return d("/buckets/".concat(t.name,"/admin"))},label:"Manage",icon:(0,w.jsx)(m.ewm,{}),color:"primary",variant:"regular",id:"manage-".concat(t.name),disabled:!B})})}),(0,w.jsx)(P.Z,{tooltip:"Browse",children:(0,w.jsx)(o.zx,{onClick:function(){return d("/buckets/".concat(t.name,"/browse"))},label:"Browse",icon:(0,w.jsx)(m.LZ3,{}),color:"primary",variant:"callAction",id:"browse-".concat(t.name)})}),(0,w.jsx)(v.Z,{display:{xs:"none",sm:"block"},children:(0,w.jsx)("div",{style:{marginBottom:10}})})]})]})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,className:n.bucketStats,children:(0,w.jsxs)(h.ZP,{container:!0,justifyContent:"flex-start",spacing:4,children:[(0,w.jsx)(h.ZP,{item:!0,className:n.bucketIcon,children:(0,w.jsx)(C.rU,{to:"/buckets/".concat(t.name,"/browse"),children:(0,w.jsx)(m.wNb,{})})}),(0,w.jsxs)(h.ZP,{item:!0,textAlign:"left",className:n.metric,children:[(0,w.jsx)(m.rHZ,{}),(0,w.jsx)("span",{className:n.metricLabel,children:"Usage"}),(0,w.jsxs)("div",{className:n.metricText,children:[f,(0,w.jsx)("span",{className:n.unit,children:p}),"0"!==g&&(0,w.jsxs)(r.Fragment,{children:[" ","/ ",T.total,(0,w.jsx)("span",{className:n.unit,children:T.unit})]})]})]}),(0,w.jsxs)(h.ZP,{item:!0,textAlign:"left",className:n.metric,children:[(0,w.jsx)(m.xpX,{}),(0,w.jsx)("span",{className:n.metricLabel,children:"Objects"}),(0,w.jsx)("div",{className:n.metricText,children:t.objects?(0,b.CE)(t.objects):0})]})]})})]})})),B=t(20068),E=t(15146),_=t(98946),R=t(21435),I=t(56028),F=t(64163),L=t(28371),M=t(37516),z=t(90673),A=t(56578),K=t(87995),D=t(25469),U=(0,u.Z)((function(e){return(0,l.Z)((0,s.Z)((0,s.Z)({remoteBucketList:{display:"grid",gridTemplateColumns:"auto auto 45px",alignItems:"center",justifyContent:"stretch"},errorIcon:{color:"#C72C48"},successIcon:{color:"#42C91A"},hide:{opacity:0,transitionDuration:"0.3s"}},x.oO),x.AK))}))((function(e){var n=e.open,t=e.closeModalAndRefresh,s=e.classes,c=e.buckets,o=(0,D.TL)(),l=(0,r.useState)([]),u=(0,a.Z)(l,2),d=u[0],m=u[1],x=(0,r.useState)(!1),p=(0,a.Z)(x,2),g=p[0],j=p[1],v=(0,r.useState)(!1),k=(0,a.Z)(v,2),C=k[0],y=k[1],S=(0,r.useState)(""),N=(0,a.Z)(S,2),P=N[0],T=N[1],U=(0,r.useState)(""),W=(0,a.Z)(U,2),O=W[0],q=W[1],H=(0,r.useState)(""),G=(0,a.Z)(H,2),Q=G[0],Y=G[1],V=(0,r.useState)(""),X=(0,a.Z)(V,2),$=X[0],J=X[1],ee=(0,r.useState)(!0),ne=(0,a.Z)(ee,2),te=ne[0],ie=ne[1],ae=(0,r.useState)("async"),se=(0,a.Z)(ae,2),re=se[0],ce=se[1],oe=(0,r.useState)("100"),le=(0,a.Z)(oe,2),ue=le[0],de=le[1],he=(0,r.useState)("Gi"),me=(0,a.Z)(he,2),xe=me[0],fe=me[1],pe=(0,r.useState)("60"),ge=(0,a.Z)(pe,2),Ze=ge[0],je=ge[1],ve=(0,r.useState)([]),be=(0,a.Z)(ve,2),ke=be[0],Ce=be[1],ye=(0,r.useState)([]),Se=(0,a.Z)(ye,2),Ne=Se[0],Pe=Se[1],we=(0,r.useState)([]),Te=(0,a.Z)(we,2),Be=Te[0],Ee=Te[1],_e=Ne.map((function(e){return{label:e,value:e}}));(0,r.useEffect)((function(){if(0===ke.length){var e=[],n=[];c.forEach((function(t){e.push(t),n.push("")})),Ce(n),m(e)}}),[c,ke.length]);var Re=function(e){var n=e.errString;switch(n){case"":return(0,w.jsx)("div",{className:s.successIcon,children:(0,w.jsx)(_.Z,{})});case"n/a":return null;default:if(n)return(0,w.jsx)("div",{className:s.errorIcon,children:(0,w.jsx)(B.Z,{title:n,placement:"top-start",children:(0,w.jsx)(E.Z,{})})})}return null},Ie=function(e,n){var t=(0,i.Z)(ke);t[e]=n,Ce(t)},Fe=function(e){var n=(0,i.Z)(d),t=(0,i.Z)(ke);e.forEach((function(e){var i=Z()(e,"errorString","");if(!i||""===i){var a=n.indexOf(e.originBucket);n.splice(a,1),t.splice(a,1)}})),m(n),Ce(t)};return(0,w.jsx)(I.Z,{modalOpen:n,onClose:function(){t(!1)},title:"Set Multiple Bucket Replication",children:(0,w.jsx)(L.Z,{loadingStep:g||C,wizardSteps:[{label:"Remote Configuration",componentRender:(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(F.Z,{label:"Local Buckets to replicate",content:d.join(", ")})}),(0,w.jsx)("h4",{children:"Remote Endpoint Configuration"}),(0,w.jsx)("span",{className:s.descriptionText,children:"Please avoid the use of root credentials for this feature"}),(0,w.jsx)("br",{}),(0,w.jsx)("br",{}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{id:"accessKey",name:"accessKey",onChange:function(e){T(e.target.value)},label:"Access Key",value:P})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{id:"secretKey",name:"secretKey",onChange:function(e){q(e.target.value)},label:"Secret Key",value:O})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{id:"targetURL",name:"targetURL",onChange:function(e){Y(e.target.value)},placeholder:"play.min.io:9000",label:"Target URL",value:Q})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(M.Z,{checked:te,id:"useTLS",name:"useTLS",label:"Use TLS",onChange:function(e){ie(e.target.checked)},value:"yes"})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{id:"region",name:"region",onChange:function(e){J(e.target.value)},label:"Region",value:$})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(z.Z,{id:"replication_mode",name:"replication_mode",onChange:function(e){ce(e.target.value)},label:"Replication Mode",value:re,options:[{label:"Asynchronous",value:"async"},{label:"Synchronous",value:"sync"}]})}),"async"===re&&(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{type:"number",id:"bandwidth_scalar",name:"bandwidth_scalar",onChange:function(e){e.target.validity.valid&&de(e.target.value)},label:"Bandwidth",value:ue,min:"0",pattern:"[0-9]*",overlayObject:(0,w.jsx)(A.Z,{id:"quota_unit",onUnitChange:function(e){fe(e)},unitSelected:xe,unitsList:(0,b.zQ)(["Ki"]),disabled:!1})})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{id:"healthCheck",name:"healthCheck",onChange:function(e){je(e.target.value)},label:"Health Check Duration",value:Ze})})]}),buttons:[{type:"custom",label:"Next",enabled:!C,action:function(e){var n={accessKey:P,secretKey:O,targetURL:Q,useTLS:te};y(!0),f.Z.invoke("POST","/api/v1/list-external-buckets",n).then((function(n){var t=Z()(n,"buckets",[]);if(t&&t.length>0){var i=t.map((function(e){return e.name}));Pe(i)}e("++"),y(!1)})).catch((function(e){y(!1),o((0,K.zb)(e))}))}}]},{label:"Bucket Assignments",componentRender:(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)("h3",{children:"Remote Bucket Assignments"}),(0,w.jsx)("span",{className:s.descriptionText,children:"Please select / type the desired remote bucket were you want the local data to be replicated."}),(0,w.jsx)("div",{className:s.remoteBucketList,children:d.map((function(e,n){var t,i=function(e){if(Be.length>0){var n=Be.find((function(n){return n.originBucket===e}));if(n)return Z()(n,"errorString","")||""}return"n/a"}(e);return(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)("div",{className:""===i?s.hide:"",children:e}),(0,w.jsx)("div",{className:""===i?s.hide:"",children:(t=n,Ne.length>0?(0,w.jsx)(r.Fragment,{children:(0,w.jsx)(z.Z,{label:"",id:"assign-bucket-".concat(t),name:"assign-bucket-".concat(t),value:ke[t],onChange:function(e){Ie(t,e.target.value)},options:_e,disabled:g})}):(0,w.jsx)(r.Fragment,{children:(0,w.jsx)(R.Z,{id:"assign-bucket-".concat(t),name:"assign-bucket-".concat(t),label:"",onChange:function(e){Ie(t,e.target.value)},value:ke[t],disabled:g})}))}),(0,w.jsx)("div",{className:""===i?s.hide:"",children:Be.length>0&&(0,w.jsx)(Re,{errString:i})})]},"buckets-assignation-".concat(n.toString(),"-").concat(e))}))})]}),buttons:[{type:"back",label:"Back",enabled:!0},{type:"next",label:"Create",enabled:!g,action:function(){j(!0);var e=d.map((function(e,n){return{originBucket:e,destinationBucket:ke[n]}})),n="".concat(te?"https://":"http://").concat(Q),i=parseInt(Ze),a={accessKey:P,secretKey:O,targetURL:n,region:$,bucketsRelation:e,syncMode:re,bandwidth:"async"===re?parseInt((0,b.Pw)(ue,xe,!0)):0,healthCheckPeriod:i};f.Z.invoke("POST","/api/v1/buckets-replication",a).then((function(e){j(!1);var n=e.replicationState;Ee(n),0===n.filter((function(e){return e.errorString&&""!==e.errorString})).length?t(!0):setTimeout((function(){Fe(n)}),500)})).catch((function(e){j(!1),o((0,K.zb)(e))}))}}]}],forModal:!0})})})),W=t(23804),O=t(28789),q=t(49818),H=t(2289),G=t(74794),Q=t(59114),Y=t(98994),V=t(83679),X=t(17420),$=(0,u.Z)((function(e){return(0,l.Z)((0,s.Z)((0,s.Z)((0,s.Z)((0,s.Z)({resultGrid:{display:"grid",gridTemplateColumns:"45px auto",alignItems:"center",justifyContent:"stretch"},errorIcon:{paddingTop:5,color:"#C72C48"},successIcon:{paddingTop:5,color:"#42C91A"}},x.bK),x.ID),x.DF),x.QV))}))((function(e){var n=e.open,t=e.closeModalAndRefresh,i=e.classes,c=e.buckets,o=(0,D.TL)(),l=(0,r.useState)(!1),u=(0,a.Z)(l,2),d=u[0],m=u[1],x=(0,r.useState)(!0),p=(0,a.Z)(x,2),g=p[0],j=p[1],v=(0,r.useState)([]),b=(0,a.Z)(v,2),k=b[0],C=b[1],y=(0,r.useState)(""),S=(0,a.Z)(y,2),N=S[0],P=S[1],T=(0,r.useState)(""),A=(0,a.Z)(T,2),U=A[0],W=A[1],O=(0,r.useState)(""),q=(0,a.Z)(O,2),H=q[0],G=q[1],Q=(0,r.useState)(""),Y=(0,a.Z)(Q,2),$=Y[0],J=Y[1],ee=(0,r.useState)(!1),ne=(0,a.Z)(ee,2),te=ne[0],ie=ne[1],ae=(0,r.useState)("0"),se=(0,a.Z)(ae,2),re=se[0],ce=se[1],oe=(0,r.useState)("0"),le=(0,a.Z)(oe,2),ue=le[0],de=le[1],he=(0,r.useState)("expiry"),me=(0,a.Z)(he,2),xe=me[0],fe=me[1],pe=(0,r.useState)("0"),ge=(0,a.Z)(pe,2),Ze=ge[0],je=ge[1],ve=(0,r.useState)("0"),be=(0,a.Z)(ve,2),ke=be[0],Ce=be[1],ye=(0,r.useState)(!1),Se=(0,a.Z)(ye,2),Ne=Se[0],Pe=Se[1],we=(0,r.useState)(null),Te=(0,a.Z)(we,2),Be=Te[0],Ee=Te[1];(0,r.useEffect)((function(){g&&f.Z.invoke("GET","/api/v1/admin/tiers").then((function(e){var n=Z()(e,"items",[]);if(null!==n&&n.length>=1){var t=n.map((function(e){var n=e.type,t=Z()(e,"".concat(n,".name"),"");return{label:t,value:t}}));C(t),t.length>0&&G(t[0].value)}j(!1)})).catch((function(e){j(!1),o((0,K.zb)(e))}))}),[g,o]),(0,r.useEffect)((function(){var e=!0;"expiry"!==xe&&""===H&&(e=!1),Pe(e)}),[xe,Ze,ke,H]);var _e=function(e){var n=e.errString;switch(n){case"":return(0,w.jsx)("div",{className:i.successIcon,children:(0,w.jsx)(_.Z,{})});case"n/a":return null;default:if(n)return(0,w.jsx)("div",{className:i.errorIcon,children:(0,w.jsx)(B.Z,{title:n,placement:"top-start",children:(0,w.jsx)(E.Z,{})})})}return null};return(0,w.jsx)(I.Z,{modalOpen:n,onClose:function(){t(!1)},title:"Set Lifecycle to multiple buckets",children:(0,w.jsx)(L.Z,{loadingStep:d||g,wizardSteps:[{label:"Lifecycle Configuration",componentRender:(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(F.Z,{label:"Local Buckets to replicate",content:c.join(", ")})}),(0,w.jsx)("h4",{children:"Remote Endpoint Configuration"}),(0,w.jsx)(h.ZP,{container:!0,children:(0,w.jsxs)(h.ZP,{item:!0,xs:12,className:i.formScrollable,children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsxs)("fieldset",{className:i.fieldGroup,children:[(0,w.jsx)("legend",{className:i.descriptionText,children:"Lifecycle Configuration"}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(V.Z,{currentSelection:xe,id:"quota_type",name:"quota_type",label:"ILM Rule",onChange:function(e){fe(e.target.value)},selectorOptions:[{value:"expiry",label:"Expiry"},{value:"transition",label:"Transition"}]})}),"expiry"===xe?(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsx)(R.Z,{type:"number",id:"expiry_days",name:"expiry_days",onChange:function(e){je(e.target.value)},label:"Expiry Days",value:Ze,min:"0"})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsx)(R.Z,{type:"number",id:"noncurrentversion_expiration_days",name:"noncurrentversion_expiration_days",onChange:function(e){ce(e.target.value)},label:"Non-current Expiration Days",value:re,min:"0"})})]}):(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsx)(R.Z,{type:"number",id:"transition_days",name:"transition_days",onChange:function(e){Ce(e.target.value)},label:"Transition Days",value:ke,min:"0"})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsx)(R.Z,{type:"number",id:"noncurrentversion_transition_days",name:"noncurrentversion_transition_days",onChange:function(e){de(e.target.value)},label:"Non-current Transition Days",value:ue,min:"0"})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsx)(R.Z,{id:"noncurrentversion_t_SC",name:"noncurrentversion_t_SC",onChange:function(e){J(e.target.value)},placeholder:"Set Non-current Version Transition Storage Class",label:"Non-current Version Transition Storage Class",value:$})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsx)(z.Z,{label:"Storage Class",id:"storage_class",name:"storage_class",value:H,onChange:function(e){G(e.target.value)},options:k})})]})]})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,className:i.formFieldRow,children:(0,w.jsxs)("fieldset",{className:i.fieldGroup,children:[(0,w.jsx)("legend",{className:i.descriptionText,children:"File Configuration"}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(R.Z,{id:"prefix",name:"prefix",onChange:function(e){P(e.target.value)},label:"Prefix",value:N})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(X.Z,{name:"tags",label:"Tags",elements:U,onChange:function(e){W(e)},keyPlaceholder:"Tag Key",valuePlaceholder:"Tag Value",withBorder:!0})}),(0,w.jsx)(h.ZP,{item:!0,xs:12,children:(0,w.jsx)(M.Z,{value:"expired_delete_marker",id:"expired_delete_marker",name:"expired_delete_marker",checked:te,onChange:function(e){ie(e.target.checked)},label:"Expired Object Delete Marker"})})]})})]})})]}),buttons:[{type:"custom",label:"Create Rules",enabled:!g&&!d&&Ne,action:function(e){var n={};if("expiry"===xe){var t={expiry_days:parseInt(Ze)};n=(0,s.Z)((0,s.Z)({},t),{},{noncurrentversion_expiration_days:parseInt(re)})}else{var i={transition_days:parseInt(ke)};n=(0,s.Z)((0,s.Z)({},i),{},{noncurrentversion_transition_days:parseInt(ue),noncurrentversion_transition_storage_class:$,storage_class:H})}var a=(0,s.Z)({buckets:c,type:xe,prefix:N,tags:U,expired_object_delete_marker:te},n);f.Z.invoke("POST","/api/v1/buckets/multi-lifecycle",a).then((function(n){m(!1),Ee(n),e("++")})).catch((function(e){m(!1),o((0,K.zb)(e))}))}}]},{label:"Results",componentRender:(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)("h3",{children:"Multi Bucket lifecycle Assignments Results"}),(0,w.jsx)(h.ZP,{container:!0,children:(0,w.jsxs)(h.ZP,{item:!0,xs:12,className:i.formScrollable,children:[(0,w.jsx)("h4",{children:"Buckets Results"}),null===Be||void 0===Be?void 0:Be.results.map((function(e){return(0,w.jsxs)("div",{className:i.resultGrid,children:[_e({errString:e.error||""}),(0,w.jsx)("span",{children:e.bucketName})]})}))]})})]}),buttons:[{type:"custom",label:"Done",enabled:!d,action:function(){return t(!0)}}]}],forModal:!0})})})),J=t(49535),ee=t(60364),ne=t(46078),te=t(73996),ie=t(81806),ae=t(54756),se=(0,u.Z)((function(e){return(0,l.Z)((0,s.Z)({bulkSelect:{marginLeft:8,"&:hover":{backgroundColor:e.palette.primary.main},"&.MuiButton-contained":{backgroundColor:e.palette.primary.main}},bucketList:{marginTop:25,height:"calc(100vh - 211px)","&.isEmbedded":{height:"calc(100vh - 128px)"}},searchField:(0,s.Z)((0,s.Z)({},x.qg.searchField),{},{minWidth:380,"@media (max-width: 900px)":{minWidth:220}})},(0,x.Bz)(e.spacing(4))))}))((function(e){var n=e.classes,t=(0,D.TL)(),s=(0,c.s0)(),l=(0,r.useState)([]),u=(0,a.Z)(l,2),x=u[0],g=u[1],Z=(0,r.useState)(!0),j=(0,a.Z)(Z,2),v=j[0],b=j[1],k=(0,r.useState)(""),C=(0,a.Z)(k,2),N=C[0],B=C[1],E=(0,r.useState)([]),_=(0,a.Z)(E,2),R=_[0],I=_[1],F=(0,r.useState)(!1),L=(0,a.Z)(F,2),M=L[0],z=L[1],A=(0,r.useState)(!1),V=(0,a.Z)(A,2),X=V[0],se=V[1],re=(0,r.useState)(!1),ce=(0,a.Z)(re,2),oe=ce[0],le=ce[1],ue=(0,r.useState)(!1),de=(0,a.Z)(ue,2),he=de[0],me=de[1],xe=(0,ee.v9)(ne.$4),fe=!(null===xe||void 0===xe||!xe.includes("object-browser-only"));(0,r.useEffect)((function(){if(v){b(!0),f.Z.invoke("GET","/api/v1/buckets").then((function(e){b(!1),g(e.buckets||[]),t((0,ae.Cn)(!0))})).catch((function(e){b(!1),t((0,K.Ih)(e))}))}}),[v,t]);var pe=x.filter((function(e){return""===N||e.name.indexOf(N)>=0})),ge=x.length>0,Ze=function(e){var n=e.target,t=n.value,a=n.checked,s=(0,i.Z)(R);return a?s.push(t):s=s.filter((function(e){return e!==t})),I(s),s};(0,r.useEffect)((function(){var e=!1;R.forEach((function(n){(0,J.Z)(n,y.D[y.EI.BUCKET_LIFECYCLE],!0)?le(!0):e=!0})),le(!e)}),[R]);var je=(0,J.Z)("*",[y.Ft.S3_CREATE_BUCKET]),ve=(0,J.Z)("*",[y.Ft.S3_LIST_BUCKET]);return(0,w.jsxs)(r.Fragment,{children:[M&&(0,w.jsx)(U,{open:M,buckets:R,closeModalAndRefresh:function(e){z(!1),e&&I([])}}),X&&(0,w.jsx)($,{buckets:R,closeModalAndRefresh:function(e){se(!1),e&&I([])},open:X}),!fe&&(0,w.jsx)(p.Z,{label:"Buckets"}),(0,w.jsxs)(G.Z,{children:[(0,w.jsxs)(h.ZP,{item:!0,xs:12,className:n.actionsTray,display:"flex",children:[fe&&(0,w.jsx)(h.ZP,{item:!0,xs:!0,children:(0,w.jsx)(te.Z,{marginRight:15,marginTop:10})}),ge&&(0,w.jsx)(Q.Z,{onChange:B,placeholder:"Search Buckets",overrideClass:n.searchField,value:N}),(0,w.jsxs)(h.ZP,{item:!0,xs:12,display:"flex",alignItems:"center",justifyContent:"flex-end",sx:{"& button":{marginLeft:"8px"}},children:[!fe&&(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)(P.Z,{tooltip:ge?he?"Unselect Buckets":"Select Multiple Buckets":"",children:(0,w.jsx)(o.zx,{id:"multiple-bucket-seection",onClick:function(){me(!he),I([])},icon:(0,w.jsx)(H.Z,{}),variant:he?"callAction":"regular",disabled:!ge})}),he&&(0,w.jsx)(P.Z,{tooltip:ge?R.length===pe.length?"Unselect All Buckets":"Select All Buckets":"",children:(0,w.jsx)(o.zx,{id:"select-all-buckets",onClick:function(){if(R.length!==pe.length){var e=pe.map((function(e){return e.name}));I(e)}else I([])},icon:(0,w.jsx)(m.QQb,{}),variant:"regular"})}),(0,w.jsx)(P.Z,{tooltip:ge?oe?0===R.length?he?"Please select at least one bucket on which to configure Lifecycle":"Use the Select Multiple Buckets button to choose buckets on which to configure Lifecycle":"Set Lifecycle":(0,y.MK)(y.D[y.EI.BUCKET_LIFECYCLE],"configure lifecycle for the selected buckets"):"",children:(0,w.jsx)(o.zx,{id:"set-lifecycle",onClick:function(){se(!0)},icon:(0,w.jsx)(m.QIv,{}),variant:"regular",disabled:0===R.length||!oe})}),(0,w.jsx)(P.Z,{tooltip:ge?0===R.length?he?"Please select at least one bucket on which to configure Replication":"Use the Select Multiple Buckets button to choose buckets on which to configure Replication":"Set Replication":"",children:(0,w.jsx)(o.zx,{id:"set-replication",onClick:function(){z(!0)},icon:(0,w.jsx)(q.Z,{}),variant:"regular",disabled:0===R.length})})]}),(0,w.jsx)(P.Z,{tooltip:"Refresh",children:(0,w.jsx)(o.zx,{id:"refresh-buckets",onClick:function(){b(!0)},icon:(0,w.jsx)(O.default,{}),variant:"regular"})}),!fe&&(0,w.jsx)(P.Z,{tooltip:je?"":(0,y.MK)([y.Ft.S3_CREATE_BUCKET],"create a bucket"),children:(0,w.jsx)(o.zx,{id:"create-bucket",onClick:function(){s(y.gA.ADD_BUCKETS)},icon:(0,w.jsx)(m.dtP,{}),variant:"callAction",disabled:!je,label:"Create Bucket"})})]})]}),v&&(0,w.jsx)(d.Z,{}),!v&&(0,w.jsxs)(h.ZP,{item:!0,xs:12,className:"".concat(n.bucketList," ").concat(fe?"isEmbedded":""),children:[0!==pe.length&&(0,w.jsx)(Y.Z,{rowRenderFunction:function(e){var n=pe[e]||null;return n?(0,w.jsx)(T,{bucket:n,onSelect:Ze,selected:R.includes(n.name),bulkSelect:he,noManage:fe}):null},totalItems:pe.length}),0===pe.length&&""!==N&&(0,w.jsx)(h.ZP,{container:!0,justifyContent:"center",alignContent:"center",alignItems:"center",children:(0,w.jsx)(h.ZP,{item:!0,xs:8,children:(0,w.jsx)(W.Z,{iconComponent:(0,w.jsx)(m.wNb,{}),title:"No Results",help:(0,w.jsx)(r.Fragment,{children:"No buckets match the filtering condition"})})})}),!ge&&(0,w.jsx)(h.ZP,{container:!0,justifyContent:"center",alignContent:"center",alignItems:"center",children:(0,w.jsx)(h.ZP,{item:!0,xs:8,children:(0,w.jsx)(W.Z,{iconComponent:(0,w.jsx)(m.wNb,{}),title:"Buckets",help:(0,w.jsxs)(r.Fragment,{children:["MinIO uses buckets to organize objects. A bucket is similar to a folder or directory in a filesystem, where each bucket can hold an arbitrary number of objects.",(0,w.jsx)("br",{}),ve?"":(0,w.jsxs)(r.Fragment,{children:[(0,w.jsx)("br",{}),(0,y.MK)([y.Ft.S3_LIST_BUCKET],"view the buckets on this server"),(0,w.jsx)("br",{})]}),(0,w.jsxs)(S.s,{scopes:[y.Ft.S3_CREATE_BUCKET],resource:y.C3,children:[(0,w.jsx)("br",{}),"To get started,\xa0",(0,w.jsx)(ie.Z,{onClick:function(){s(y.gA.ADD_BUCKETS)},children:"Create a Bucket."})]})]})})})})]})]})]})}))},81806:function(e,n,t){var i=t(1413),a=t(45987),s=(t(72791),t(11135)),r=t(25787),c=t(80184),o=["classes","children"];n.Z=(0,r.Z)((function(e){return(0,s.Z)({root:{padding:0,margin:0,border:0,backgroundColor:"transparent",textDecoration:"underline",cursor:"pointer",fontSize:"inherit",color:e.palette.info.main,fontFamily:"Lato, sans-serif"}})}))((function(e){var n=e.classes,t=e.children,s=(0,a.Z)(e,o);return(0,c.jsx)("button",(0,i.Z)((0,i.Z)({},s),{},{className:n.root,children:t}))}))},73996:function(e,n,t){t(72791);var i=t(56096),a=t(60364),s=t(80184);n.Z=function(e){var n=e.marginRight,r=e.marginTop,c=t(47045),o=(0,a.v9)((function(e){return e.system.overrideStyles})),l=c((null===o||void 0===o?void 0:o.backgroundColor)||"#fff").getBrightness()<=128;return(0,s.jsx)(i.BHR,{style:{width:105,marginRight:n,marginTop:r,fill:l?"#fff":"#081C42"}})}},34866:function(e,n,t){var i=t(1413),a=t(72791),s=t(61889),r=t(94454),c=t(30829),o=t(20068),l=t(11135),u=t(25787),d=t(23814),h=t(84570),m=t(80184);n.Z=(0,u.Z)((function(e){return(0,l.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},d.YI),d.Hr),d.lM),{},{fieldContainer:(0,i.Z)((0,i.Z)({},d.YI.fieldContainer),{},{display:"flex",justifyContent:"flex-start",alignItems:"center",margin:"15px 0",marginBottom:0,flexBasis:"initial",flexWrap:"nowrap"}),noTopMargin:{marginTop:0}}))}))((function(e){var n=e.label,t=e.onChange,i=e.value,l=e.id,u=e.name,d=e.checked,x=void 0!==d&&d,f=e.disabled,p=void 0!==f&&f,g=e.noTopMargin,Z=void 0!==g&&g,j=e.tooltip,v=void 0===j?"":j,b=e.overrideLabelClasses,k=void 0===b?"":b,C=e.overrideCheckboxStyles,y=e.classes,S=e.className;return(0,m.jsx)(a.Fragment,{children:(0,m.jsxs)(s.ZP,{item:!0,xs:12,className:"".concat(y.fieldContainer," ").concat(Z?y.noTopMargin:""," ").concat(S||""),children:[(0,m.jsx)("div",{children:(0,m.jsx)(r.Z,{name:u,id:l,value:i,color:"primary",inputProps:{"aria-label":"secondary checkbox"},checked:x,onChange:t,checkedIcon:(0,m.jsx)("span",{className:y.checkedIcon}),icon:(0,m.jsx)("span",{className:y.unCheckedIcon}),disabled:p,disableRipple:!0,disableFocusRipple:!0,focusRipple:!1,centerRipple:!1,disableTouchRipple:!0,style:C||{}})}),""!==n&&(0,m.jsxs)(c.Z,{htmlFor:l,className:"".concat(y.noMinWidthLabel," ").concat(k),children:[(0,m.jsx)("span",{children:n}),""!==v&&(0,m.jsx)("div",{className:y.tooltipContainer,children:(0,m.jsx)(o.Z,{title:v,placement:"top-start",children:(0,m.jsx)("div",{className:y.tooltip,children:(0,m.jsx)(h.Z,{})})})})]})]})})}))},64163:function(e,n,t){var i=t(1413),a=t(72791),s=t(61889),r=t(11135),c=t(25787),o=t(23814),l=t(80184);n.Z=(0,c.Z)((function(e){return(0,r.Z)((0,i.Z)({},o.xx))}))((function(e){var n=e.classes,t=e.label,i=void 0===t?"":t,r=e.content,c=e.multiLine,o=void 0!==c&&c,u=e.actionButton;return(0,l.jsx)(a.Fragment,{children:(0,l.jsxs)(s.ZP,{className:n.prefinedContainer,children:[""!==i&&(0,l.jsx)(s.ZP,{item:!0,xs:12,className:n.predefinedTitle,children:i}),(0,l.jsxs)(s.ZP,{item:!0,xs:12,className:"".concat(n.predefinedList," ").concat(u?n.includesActionButton:""),children:[(0,l.jsx)(s.ZP,{item:!0,xs:12,className:o?n.innerContentMultiline:n.innerContent,children:r}),u&&(0,l.jsx)("div",{className:n.overlayShareOption,children:u})]})]})})}))},17420:function(e,n,t){var i=t(93433),a=t(29439),s=t(1413),r=t(72791),c=t(26181),o=t.n(c),l=t(48573),u=t.n(l),d=t(11135),h=t(25787),m=t(61889),x=t(77961),f=t(30829),p=t(20068),g=t(23814),Z=t(21435),j=t(47919),v=t(80184);n.Z=(0,h.Z)((function(e){return(0,d.Z)((0,s.Z)((0,s.Z)((0,s.Z)({},g.YI),g.Hr),{},{inputWithBorder:{border:"1px solid #EAEAEA",padding:15,height:150,overflowY:"auto",position:"relative",marginTop:15},lineInputBoxes:{display:"flex",marginBottom:10},queryDiv:{alignSelf:"center",margin:"0 4px",fontWeight:600}}))}))((function(e){var n=e.elements,t=e.name,s=e.label,c=e.tooltip,l=void 0===c?"":c,d=e.keyPlaceholder,h=void 0===d?"":d,g=e.valuePlaceholder,b=void 0===g?"":g,k=e.onChange,C=e.withBorder,y=void 0!==C&&C,S=e.classes,N=(0,r.useState)([""]),P=(0,a.Z)(N,2),w=P[0],T=P[1],B=(0,r.useState)([""]),E=(0,a.Z)(B,2),_=E[0],R=E[1],I=(0,r.createRef)();(0,r.useEffect)((function(){if(1===w.length&&""===w[0]&&1===_.length&&""===_[0]&&n&&""!==n){var e=n.split("&"),t=[],i=[];e.forEach((function(e){var n=e.split("=");2===n.length&&(t.push(n[0]),i.push(n[1]))})),t.push(""),i.push(""),T(t),R(i)}}),[w,_,n]),(0,r.useEffect)((function(){var e=I.current;e&&w.length>1&&e.scrollIntoView(!1)}),[w]);var F=(0,r.useRef)(!0);(0,r.useLayoutEffect)((function(){F.current?F.current=!1:z()}),[w,_]);var L=function(e){e.persist();var n=(0,i.Z)(w);n[o()(e.target,"dataset.index",0)]=e.target.value,T(n)},M=function(e){e.persist();var n=(0,i.Z)(_);n[o()(e.target,"dataset.index",0)]=e.target.value,R(n)},z=u()((function(){var e="";w.forEach((function(n,t){if(w[t]&&_[t]){var i="".concat(n,"=").concat(_[t]);0!==t&&(i="&".concat(i)),e="".concat(e).concat(i)}})),k(e)}),500),A=_.map((function(e,n){return(0,v.jsxs)(m.ZP,{item:!0,xs:12,className:S.lineInputBoxes,children:[(0,v.jsx)(Z.Z,{id:"".concat(t,"-key-").concat(n.toString()),label:"",name:"".concat(t,"-").concat(n.toString()),value:w[n],onChange:L,index:n,placeholder:h}),(0,v.jsx)("span",{className:S.queryDiv,children:":"}),(0,v.jsx)(Z.Z,{id:"".concat(t,"-value-").concat(n.toString()),label:"",name:"".concat(t,"-").concat(n.toString()),value:_[n],onChange:M,index:n,placeholder:b,overlayIcon:n===_.length-1?(0,v.jsx)(j.Z,{}):null,overlayAction:function(){!function(){if(""!==w[w.length-1].trim()&&""!==_[_.length-1].trim()){var e=(0,i.Z)(w),n=(0,i.Z)(_);e.push(""),n.push(""),T(e),R(n)}}()}})]},"query-pair-".concat(t,"-").concat(n.toString()))}));return(0,v.jsx)(r.Fragment,{children:(0,v.jsxs)(m.ZP,{item:!0,xs:12,className:S.fieldContainer,children:[(0,v.jsxs)(f.Z,{className:S.inputLabel,children:[(0,v.jsx)("span",{children:s}),""!==l&&(0,v.jsx)("div",{className:S.tooltipContainer,children:(0,v.jsx)(p.Z,{title:l,placement:"top-start",children:(0,v.jsx)(x.Z,{className:S.tooltip})})})]}),(0,v.jsxs)(m.ZP,{item:!0,xs:12,className:"".concat(y?S.inputWithBorder:""),children:[A,(0,v.jsx)("div",{ref:I})]})]})})}))},56028:function(e,n,t){var i=t(29439),a=t(1413),s=t(72791),r=t(60364),c=t(13400),o=t(55646),l=t(5574),u=t(65661),d=t(39157),h=t(11135),m=t(25787),x=t(23814),f=t(25469),p=t(29823),g=t(28057),Z=t(87995),j=t(80184);n.Z=(0,m.Z)((function(e){return(0,h.Z)((0,a.Z)((0,a.Z)({},x.Qw),{},{content:{padding:25,paddingBottom:0},customDialogSize:{width:"100%",maxWidth:765}},x.sN))}))((function(e){var n=e.onClose,t=e.modalOpen,h=e.title,m=e.children,x=e.classes,v=e.wideLimit,b=void 0===v||v,k=e.noContentPadding,C=e.titleIcon,y=void 0===C?null:C,S=(0,f.TL)(),N=(0,s.useState)(!1),P=(0,i.Z)(N,2),w=P[0],T=P[1],B=(0,r.v9)((function(e){return e.system.modalSnackBar}));(0,s.useEffect)((function(){S((0,Z.MK)(""))}),[S]),(0,s.useEffect)((function(){if(B){if(""===B.message)return void T(!1);"error"!==B.type&&T(!0)}}),[B]);var E=b?{classes:{paper:x.customDialogSize}}:{maxWidth:"lg",fullWidth:!0},_="";return B&&(_=B.detailedErrorMsg,(""===B.detailedErrorMsg||B.detailedErrorMsg.length<5)&&(_=B.message)),(0,j.jsxs)(l.Z,(0,a.Z)((0,a.Z)({open:t,classes:x},E),{},{scroll:"paper",onClose:function(e,t){"backdropClick"!==t&&n()},className:x.root,children:[(0,j.jsxs)(u.Z,{className:x.title,children:[(0,j.jsxs)("div",{className:x.titleText,children:[y," ",h]}),(0,j.jsx)("div",{className:x.closeContainer,children:(0,j.jsx)(c.Z,{"aria-label":"close",id:"close",className:x.closeButton,onClick:n,disableRipple:!0,size:"small",children:(0,j.jsx)(p.Z,{})})})]}),(0,j.jsx)(g.Z,{isModal:!0}),(0,j.jsx)(o.Z,{open:w,className:x.snackBarModal,onClose:function(){T(!1),S((0,Z.MK)(""))},message:_,ContentProps:{className:"".concat(x.snackBar," ").concat(B&&"error"===B.type?x.errorSnackBar:"")},autoHideDuration:B&&"error"===B.type?1e4:5e3}),(0,j.jsx)(d.Z,{className:k?"":x.content,children:m})]}))}))},59114:function(e,n,t){var i=t(4942),a=t(1413),s=(t(72791),t(63466)),r=t(74900),c=t(27391),o=t(25787),l=t(11135),u=t(23814),d=t(80184);n.Z=(0,o.Z)((function(e){return(0,l.Z)({searchField:(0,a.Z)({},u.qg.searchField),adornment:{}})}))((function(e){var n=e.placeholder,t=void 0===n?"":n,a=e.classes,o=e.onChange,l=e.adornmentPosition,u=void 0===l?"end":l,h=e.overrideClass,m=e.value,x=(0,i.Z)({disableUnderline:!0},"".concat(u,"Adornment"),(0,d.jsx)(s.Z,{position:u,className:a.adornment,children:(0,d.jsx)(r.Z,{})}));return(0,d.jsx)(c.Z,{placeholder:t,className:h||a.searchField,id:"search-resource",label:"",InputProps:x,onChange:function(e){o(e.target.value)},variant:"standard",value:m})}))},98994:function(e,n,t){var i=t(72791),a=t(22338),s=t(79762),r=t(5171),c=t(80184),o={};n.Z=function(e){var n=e.rowRenderFunction,t=e.totalItems,l=e.defaultHeight,u=function(e){var t=e.index,i=e.style;return(0,c.jsx)("div",{style:i,children:n(t)})};return(0,c.jsx)(i.Fragment,{children:(0,c.jsx)(s.Z,{isItemLoaded:function(e){return!!o[e]},loadMoreItems:function(e,n){for(var t=e;t<=n;t++)o[t]=1;for(var i=e;i<=n;i++)o[i]=2},itemCount:t,children:function(e){var n=e.onItemsRendered,i=e.ref;return(0,c.jsx)(r.qj,{children:function(e){var s=e.width,r=e.height;return(0,c.jsx)(a.t7,{itemSize:l||220,height:r,itemCount:t,width:s,ref:i,onItemsRendered:n,children:u})}})}})})}},98946:function(e,n,t){var i=t(64836);n.Z=void 0;var a=i(t(45649)),s=t(80184),r=(0,a.default)((0,s.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"CheckCircleOutline");n.Z=r},15146:function(e,n,t){var i=t(64836);n.Z=void 0;var a=i(t(45649)),s=t(80184),r=(0,a.default)((0,s.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline");n.Z=r},77961:function(e,n,t){var i=t(64836);n.Z=void 0;var a=i(t(45649)),s=t(80184),r=(0,a.default)((0,s.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}),"Help");n.Z=r}}]);
+//# sourceMappingURL=9467.8e1b707f.chunk.js.map
\ No newline at end of file
diff --git a/portal-ui/build/static/js/9467.5b40a136.chunk.js.map b/portal-ui/build/static/js/9467.8e1b707f.chunk.js.map
similarity index 64%
rename from portal-ui/build/static/js/9467.5b40a136.chunk.js.map
rename to portal-ui/build/static/js/9467.8e1b707f.chunk.js.map
index f21091fd1..54168fbd6 100644
--- a/portal-ui/build/static/js/9467.5b40a136.chunk.js.map
+++ b/portal-ui/build/static/js/9467.8e1b707f.chunk.js.map
@@ -1 +1 @@
-{"version":3,"file":"static/js/9467.5b40a136.chunk.js","mappings":"sKA0EA,KAAeA,EAAAA,EAAAA,IApDA,SAACC,GAAD,OACbC,EAAAA,EAAAA,GAAa,CACXC,KAAM,CACJC,OAAQ,oBACRC,aAAc,EACdC,gBAAiB,UACjBC,YAAa,GACbC,WAAY,GACZC,cAAe,GACfC,aAAc,IAEhBC,UAAW,CACTC,SAAU,GACVC,WAAY,OACZC,aAAc,GACdC,QAAS,OACTC,WAAY,SACZ,cAAe,CACbC,YAAa,GACbC,OAAQ,GACRC,MAAO,KAGXC,SAAU,CACRR,SAAU,GACVL,YAAa,IAzBJ,GAoDf,EAhBgB,SAAC,GAAuD,IAArDc,EAAoD,EAApDA,QAASC,EAA2C,EAA3CA,cAAeC,EAA4B,EAA5BA,MAAOC,EAAqB,EAArBA,KAChD,OACE,gBAAKC,UAAWJ,EAAQlB,KAAxB,UACE,UAAC,KAAD,CAAMuB,WAAS,EAAf,WACE,UAAC,KAAD,CAAMC,MAAI,EAACC,GAAI,GAAIH,UAAWJ,EAAQV,UAAtC,UACGW,EACAC,MAEH,SAAC,KAAD,CAAMI,MAAI,EAACC,GAAI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AArB5b,EAAoB,EAApBA,MAAOD,EAAa,EAAbA,OACT,OACE,SAAC,KAAD,CACEue,SAAUR,GAAiB,IAC3B/d,OAAQA,EACRqe,UAAW/H,EACXrW,MAAOA,EACP4b,IAAKA,EACLyC,gBAAiBA,EANnB,SAQGN,GAGN,GAhBJ,KAsBR,C,4BC/EGQ,EAAyBtH,EAAQ,OAKrCuH,EAAQ,OAAU,EAElB,IAAIC,EAAiBF,EAAuBtH,EAAQ,QAEhDyH,EAAczH,EAAQ,OAEtB0H,GAAW,EAAIF,EAAeG,UAAuB,EAAIF,EAAYG,KAAK,OAAQ,CACpFC,EAAG,8KACD,sBAEJN,EAAQ,EAAUG,C,4BCfdJ,EAAyBtH,EAAQ,OAKrCuH,EAAQ,OAAU,EAElB,IAAIC,EAAiBF,EAAuBtH,EAAQ,QAEhDyH,EAAczH,EAAQ,OAEtB0H,GAAW,EAAIF,EAAeG,UAAuB,EAAIF,EAAYG,KAAK,OAAQ,CACpFC,EAAG,4KACD,gBAEJN,EAAQ,EAAUG,C,4BCfdJ,EAAyBtH,EAAQ,OAKrCuH,EAAQ,OAAU,EAElB,IAAIC,EAAiBF,EAAuBtH,EAAQ,QAEhDyH,EAAczH,EAAQ,OAEtB0H,GAAW,EAAIF,EAAeG,UAAuB,EAAIF,EAAYG,KAAK,OAAQ,CACpFC,EAAG,gRACD,QAEJN,EAAQ,EAAUG,C","sources":["common/HelpBox.tsx","screens/Console/Buckets/ListBuckets/BucketListItem.tsx","screens/Console/Buckets/ListBuckets/BulkReplicationModal.tsx","screens/Console/Buckets/ListBuckets/BulkLifecycleModal.tsx","screens/Console/Buckets/ListBuckets/ListBuckets.tsx","screens/Console/Common/AButton/AButton.tsx","screens/Console/Common/Components/AutoColorIcon.tsx","screens/Console/Common/FormComponents/CheckboxWrapper/CheckboxWrapper.tsx","screens/Console/Common/FormComponents/PredefinedList/PredefinedList.tsx","screens/Console/Common/FormComponents/QueryMultiSelector/QueryMultiSelector.tsx","screens/Console/Common/ModalWrapper/ModalWrapper.tsx","screens/Console/Common/SearchBox.tsx","screens/Console/Common/VirtualizedList/VirtualizedList.tsx","../node_modules/@mui/icons-material/CheckCircleOutline.js","../node_modules/@mui/icons-material/ErrorOutline.js","../node_modules/@mui/icons-material/Help.js"],"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 .\n\nimport React from \"react\";\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport Grid from \"@mui/material/Grid\";\n\nconst styles = (theme: Theme) =>\n createStyles({\n root: {\n border: \"1px solid #E2E2E2\",\n borderRadius: 2,\n backgroundColor: \"#FBFAFA\",\n paddingLeft: 25,\n paddingTop: 31,\n paddingBottom: 21,\n paddingRight: 30,\n },\n leftItems: {\n fontSize: 16,\n fontWeight: \"bold\",\n marginBottom: 15,\n display: \"flex\",\n alignItems: \"center\",\n \"& .min-icon\": {\n marginRight: 15,\n height: 28,\n width: 38,\n },\n },\n helpText: {\n fontSize: 16,\n paddingLeft: 5,\n },\n });\n\ninterface IHelpBox {\n classes: any;\n iconComponent: any;\n title: string | React.ReactNode;\n help: any;\n}\n\nconst HelpBox = ({ classes, iconComponent, title, help }: IHelpBox) => {\n return (\n
\n \n ),\n buttons: [\n {\n type: \"back\",\n label: \"Back\",\n enabled: true,\n },\n {\n type: \"next\",\n label: \"Create\",\n enabled: !addLoading,\n action: addRecord,\n },\n ],\n },\n ]}\n forModal\n />\n \n );\n};\n\nexport default withStyles(styles)(AddBulkReplicationModal);\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\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { SelectChangeEvent, Tooltip } from \"@mui/material\";\nimport get from \"lodash/get\";\nimport Grid from \"@mui/material/Grid\";\nimport ErrorOutlineIcon from \"@mui/icons-material/ErrorOutline\";\nimport CheckCircleOutlineIcon from \"@mui/icons-material/CheckCircleOutline\";\nimport {\n createTenantCommon,\n formFieldStyles,\n modalStyleUtils,\n spacingUtils,\n} from \"../../Common/FormComponents/common/styleLibrary\";\nimport InputBoxWrapper from \"../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper\";\nimport ModalWrapper from \"../../Common/ModalWrapper/ModalWrapper\";\nimport PredefinedList from \"../../Common/FormComponents/PredefinedList/PredefinedList\";\nimport api from \"../../../../common/api\";\nimport GenericWizard from \"../../Common/GenericWizard/GenericWizard\";\nimport FormSwitchWrapper from \"../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper\";\nimport SelectWrapper from \"../../Common/FormComponents/SelectWrapper/SelectWrapper\";\nimport RadioGroupSelector from \"../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport QueryMultiSelector from \"../../Common/FormComponents/QueryMultiSelector/QueryMultiSelector\";\nimport { ITiersDropDown } from \"../BucketDetails/AddLifecycleModal\";\nimport {\n ITierElement,\n ITierResponse,\n} from \"../../Configurations/TiersConfiguration/types\";\nimport { MultiBucketResult } from \"../types\";\nimport { setModalErrorSnackMessage } from \"../../../../systemSlice\";\nimport { useAppDispatch } from \"../../../../store\";\n\ninterface IBulkReplicationModal {\n open: boolean;\n closeModalAndRefresh: (clearSelection: boolean) => any;\n classes: any;\n buckets: string[];\n}\n\nconst styles = (theme: Theme) =>\n createStyles({\n resultGrid: {\n display: \"grid\",\n gridTemplateColumns: \"45px auto\",\n alignItems: \"center\",\n justifyContent: \"stretch\",\n },\n errorIcon: {\n paddingTop: 5,\n color: \"#C72C48\",\n },\n successIcon: {\n paddingTop: 5,\n color: \"#42C91A\",\n },\n ...spacingUtils,\n ...modalStyleUtils,\n ...formFieldStyles,\n ...createTenantCommon,\n });\n\nconst AddBulkReplicationModal = ({\n open,\n closeModalAndRefresh,\n classes,\n buckets,\n}: IBulkReplicationModal) => {\n const dispatch = useAppDispatch();\n const [addLoading, setAddLoading] = useState(false);\n const [loadingTiers, setLoadingTiers] = useState(true);\n const [tiersList, setTiersList] = useState([]);\n const [prefix, setPrefix] = useState(\"\");\n const [tags, setTags] = useState(\"\");\n const [storageClass, setStorageClass] = useState(\"\");\n const [NCTransitionSC, setNCTransitionSC] = useState(\"\");\n const [expiredObjectDM, setExpiredObjectDM] = useState(false);\n const [NCExpirationDays, setNCExpirationDays] = useState(\"0\");\n const [NCTransitionDays, setNCTransitionDays] = useState(\"0\");\n const [ilmType, setIlmType] = useState(\"expiry\");\n const [expiryDays, setExpiryDays] = useState(\"0\");\n const [transitionDays, setTransitionDays] = useState(\"0\");\n const [isFormValid, setIsFormValid] = useState(false);\n const [results, setResults] = useState(null);\n\n useEffect(() => {\n if (loadingTiers) {\n api\n .invoke(\"GET\", `/api/v1/admin/tiers`)\n .then((res: ITierResponse) => {\n const tiersList: ITierElement[] | null = get(res, \"items\", []);\n\n if (tiersList !== null && tiersList.length >= 1) {\n const objList = tiersList.map((tier: ITierElement) => {\n const tierType = tier.type;\n const value = get(tier, `${tierType}.name`, \"\");\n\n return { label: value, value: value };\n });\n\n setTiersList(objList);\n if (objList.length > 0) {\n setStorageClass(objList[0].value);\n }\n }\n setLoadingTiers(false);\n })\n .catch((err: ErrorResponseHandler) => {\n setLoadingTiers(false);\n dispatch(setModalErrorSnackMessage(err));\n });\n }\n }, [loadingTiers, dispatch]);\n\n useEffect(() => {\n let valid = true;\n\n if (ilmType !== \"expiry\") {\n if (storageClass === \"\") {\n valid = false;\n }\n }\n setIsFormValid(valid);\n }, [ilmType, expiryDays, transitionDays, storageClass]);\n\n const LogoToShow = ({ errString }: { errString: string }) => {\n switch (errString) {\n case \"\":\n return (\n
\n \n
\n );\n case \"n/a\":\n return null;\n default:\n if (errString) {\n return (\n