Skip to content

Commit 4629716

Browse files
authored
Merge branch 'master' into add_bucket_replication_screen
2 parents 2b621f4 + 36d96a1 commit 4629716

File tree

21 files changed

+1108
-677
lines changed

21 files changed

+1108
-677
lines changed

Dockerfile.release

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
FROM --platform=linux/amd64 registry.access.redhat.com/ubi8/ubi-minimal:8.7 as build
1+
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.2 as build
22

33
RUN microdnf update --nodocs && microdnf install ca-certificates --nodocs
4-
RUN curl -s -q https://raw.githubusercontent.com/minio/kes/master/LICENSE -o LICENSE
5-
RUN curl -s -q https://raw.githubusercontent.com/minio/kes/master/CREDITS -o CREDITS
64

7-
FROM registry.access.redhat.com/ubi8/ubi-micro:8.7
5+
FROM registry.access.redhat.com/ubi9/ubi-micro:9.2
86

9-
# On RHEL the certificate bundle is located at:
10-
# - /etc/pki/tls/certs/ca-bundle.crt (RHEL 6)
11-
# - /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem (RHEL 7)
12-
COPY --from=build /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /etc/pki/ca-trust/extracted/pem/
13-
COPY --from=build LICENSE /LICENSE
14-
COPY --from=build CREDITS /CREDITS
7+
ARG TAG
158

169
LABEL name="MinIO" \
1710
vendor="MinIO Inc <dev@min.io>" \
@@ -21,7 +14,14 @@ LABEL name="MinIO" \
2114
summary="A graphical user interface for MinIO" \
2215
description="MinIO object storage is fundamentally different. Designed for performance and the S3 API, it is 100% open-source. MinIO is ideal for large, private cloud environments with stringent security requirements and delivers mission-critical availability across a diverse range of workloads."
2316

24-
EXPOSE 9090
17+
# On RHEL the certificate bundle is located at:
18+
# - /etc/pki/tls/certs/ca-bundle.crt (RHEL 6)
19+
# - /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem (RHEL 7)
20+
COPY --from=build /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /etc/pki/ca-trust/extracted/pem/
21+
COPY LICENSE /LICENSE
22+
COPY CREDITS /CREDITS
2523
COPY console /console
2624

25+
EXPOSE 9090
26+
2727
ENTRYPOINT ["/console"]

portal-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"local-storage-fallback": "^4.1.1",
1818
"lodash": "^4.17.21",
1919
"luxon": "^3.4.3",
20-
"mds": "https://github.com/minio/mds.git#v0.10.1",
20+
"mds": "https://github.com/minio/mds.git#v0.11.0",
2121
"react": "^18.1.0",
2222
"react-component-export-image": "^1.0.6",
2323
"react-copy-to-clipboard": "^5.0.2",

portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ObjectDetails/SetRetention.tsx

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ const SetRetention = ({
179179
onSubmit(e);
180180
}}
181181
>
182-
<FormLayout>
182+
<FormLayout withBorders={false} containerPadding={false}>
183183
<Box className={"inputItem"}>
184184
<strong>Selected Object</strong>: {objectName}
185185
</Box>
@@ -212,22 +212,20 @@ const SetRetention = ({
212212
{ label: "Compliance", value: ObjectRetentionMode.Compliance },
213213
]}
214214
/>
215-
<Box className={"inputItem"}>
216-
<DateSelector
217-
id="date"
218-
label="Date"
219-
disableOptions={dateFieldDisabled()}
220-
ref={dateElement}
221-
value={date}
222-
borderBottom={true}
223-
onDateChange={(date: string, isValid: boolean) => {
224-
setIsDateValid(isValid);
225-
if (isValid) {
226-
setDate(date);
227-
}
228-
}}
229-
/>
230-
</Box>
215+
<DateSelector
216+
id="date"
217+
label="Date"
218+
disableOptions={dateFieldDisabled()}
219+
ref={dateElement}
220+
value={date}
221+
borderBottom={true}
222+
onDateChange={(date: string, isValid: boolean) => {
223+
setIsDateValid(isValid);
224+
if (isValid) {
225+
setDate(date);
226+
}
227+
}}
228+
/>
231229
<Grid item xs={12} sx={modalStyleUtils.modalButtonBar}>
232230
<Button
233231
id={"reset"}

portal-ui/src/screens/Console/Buckets/ListBuckets/UploadFilesButton.tsx

Lines changed: 40 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,8 @@
1515
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

1717
import React, { Fragment, useState } from "react";
18-
import { Theme } from "@mui/material/styles";
1918
import { CSSObject } from "styled-components";
20-
import { Menu, MenuItem } from "@mui/material";
21-
import createStyles from "@mui/styles/createStyles";
22-
import withStyles from "@mui/styles/withStyles";
23-
import ListItemText from "@mui/material/ListItemText";
24-
import ListItemIcon from "@mui/material/ListItemIcon";
25-
import { Button, UploadFolderIcon, UploadIcon } from "mds";
19+
import { Button, DropdownSelector, UploadFolderIcon, UploadIcon } from "mds";
2620
import {
2721
IAM_SCOPES,
2822
permissionTooltipHelper,
@@ -39,30 +33,20 @@ interface IUploadFilesButton {
3933
forceDisable?: boolean;
4034
uploadFileFunction: (closeFunction: () => void) => void;
4135
uploadFolderFunction: (closeFunction: () => void) => void;
42-
classes: any;
4336
overrideStyles?: CSSObject;
4437
}
4538

46-
const styles = (theme: Theme) =>
47-
createStyles({
48-
listUploadIcons: {
49-
height: 20,
50-
"& .min-icon": {
51-
width: 18,
52-
fill: "rgba(0,0,0,0.87)",
53-
},
54-
},
55-
});
56-
5739
const UploadFilesButton = ({
5840
uploadPath,
5941
bucketName,
6042
forceDisable = false,
6143
uploadFileFunction,
6244
uploadFolderFunction,
63-
classes,
6445
overrideStyles = {},
6546
}: IUploadFilesButton) => {
47+
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
48+
const [uploadOptionsOpen, uploadOptionsSetOpen] = useState<boolean>(false);
49+
6650
const anonymousMode = useSelector(
6751
(state: AppState) => state.system.anonymousMode,
6852
);
@@ -82,9 +66,9 @@ const UploadFilesButton = ({
8266
putObjectPermScopes,
8367
);
8468

85-
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
8669
const openUploadMenu = Boolean(anchorEl);
8770
const handleClick = (event: React.MouseEvent<HTMLElement>) => {
71+
uploadOptionsSetOpen(!uploadOptionsOpen);
8872
setAnchorEl(event.currentTarget);
8973
};
9074
const handleCloseUpload = () => {
@@ -104,6 +88,15 @@ const UploadFilesButton = ({
10488
true,
10589
);
10690

91+
const uploadFolderAction = (action: string) => {
92+
if (action === "folder") {
93+
uploadFolderFunction(handleCloseUpload);
94+
return;
95+
}
96+
97+
uploadFileFunction(handleCloseUpload);
98+
};
99+
107100
const uploadEnabled: boolean = uploadObjectAllowed || uploadFolderAllowed;
108101

109102
return (
@@ -131,48 +124,34 @@ const UploadFilesButton = ({
131124
sx={overrideStyles}
132125
/>
133126
</TooltipWrapper>
134-
<Menu
135-
id={`upload-main-menu`}
136-
aria-labelledby={`upload-main`}
137-
anchorEl={anchorEl}
138-
open={openUploadMenu}
139-
onClose={() => {
140-
handleCloseUpload();
141-
}}
142-
anchorOrigin={{
143-
vertical: "bottom",
144-
horizontal: "center",
127+
<DropdownSelector
128+
id={"upload-main-menu"}
129+
options={[
130+
{
131+
label: "Upload File",
132+
icon: <UploadIcon />,
133+
value: "file",
134+
disabled: !uploadObjectAllowed || forceDisable,
135+
},
136+
{
137+
label: "Upload Folder",
138+
icon: <UploadFolderIcon />,
139+
value: "folder",
140+
disabled: !uploadFolderAllowed || forceDisable,
141+
},
142+
]}
143+
selectedOption={""}
144+
onSelect={(nValue) => uploadFolderAction(nValue)}
145+
hideTriggerAction={() => {
146+
uploadOptionsSetOpen(false);
145147
}}
146-
transformOrigin={{
147-
vertical: "top",
148-
horizontal: "center",
149-
}}
150-
>
151-
<MenuItem
152-
onClick={() => {
153-
uploadFileFunction(handleCloseUpload);
154-
}}
155-
disabled={!uploadObjectAllowed || forceDisable}
156-
>
157-
<ListItemIcon className={classes.listUploadIcons}>
158-
<UploadIcon />
159-
</ListItemIcon>
160-
<ListItemText>Upload File</ListItemText>
161-
</MenuItem>
162-
<MenuItem
163-
onClick={() => {
164-
uploadFolderFunction(handleCloseUpload);
165-
}}
166-
disabled={!uploadFolderAllowed || forceDisable}
167-
>
168-
<ListItemIcon className={classes.listUploadIcons}>
169-
<UploadFolderIcon />
170-
</ListItemIcon>
171-
<ListItemText>Upload Folder</ListItemText>
172-
</MenuItem>
173-
</Menu>
148+
open={uploadOptionsOpen}
149+
anchorEl={anchorEl}
150+
anchorOrigin={"end"}
151+
useAnchorWidth={false}
152+
/>
174153
</Fragment>
175154
);
176155
};
177156

178-
export default withStyles(styles)(UploadFilesButton);
157+
export default UploadFilesButton;

0 commit comments

Comments
 (0)