Skip to content

Commit 1eafc87

Browse files
authored
Merge branch 'master' into support-replicate-ilm-expiry
2 parents 3a1e0a2 + 36d96a1 commit 1eafc87

File tree

14 files changed

+676
-165
lines changed

14 files changed

+676
-165
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/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;

portal-ui/src/screens/Console/Common/FormComponents/InputUnitMenu/InputUnitMenu.tsx

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

1717
import React, { Fragment } from "react";
18-
import { Theme } from "@mui/material/styles";
19-
import createStyles from "@mui/styles/createStyles";
20-
import withStyles from "@mui/styles/withStyles";
21-
import { SelectorType } from "mds";
22-
import { Menu, MenuItem } from "@mui/material";
18+
import { DropdownSelector, SelectorType } from "mds";
19+
import styled from "styled-components";
20+
import get from "lodash/get";
2321

2422
interface IInputUnitBox {
25-
classes: any;
2623
id: string;
2724
unitSelected: string;
2825
unitsList: SelectorType[];
2926
disabled?: boolean;
3027
onUnitChange?: (newValue: string) => void;
3128
}
3229

33-
const styles = (theme: Theme) =>
34-
createStyles({
35-
buttonTrigger: {
36-
border: "#F0F2F2 1px solid",
37-
borderRadius: 3,
38-
color: "#838383",
39-
backgroundColor: "#fff",
40-
fontSize: 12,
41-
},
42-
});
30+
const UnitMenuButton = styled.button(({ theme }) => ({
31+
border: `1px solid ${get(theme, "borderColor", "#E2E2E2")}`,
32+
borderRadius: 3,
33+
color: get(theme, "secondaryText", "#5B5C5C"),
34+
backgroundColor: get(theme, "boxBackground", "#FBFAFA"),
35+
fontSize: 12,
36+
}));
4337

4438
const InputUnitMenu = ({
45-
classes,
4639
id,
4740
unitSelected,
4841
unitsList,
@@ -63,46 +56,31 @@ const InputUnitMenu = ({
6356

6457
return (
6558
<Fragment>
66-
<button
59+
<UnitMenuButton
6760
id={`${id}-button`}
6861
aria-controls={`${id}-menu`}
6962
aria-haspopup="true"
7063
aria-expanded={open ? "true" : undefined}
7164
onClick={handleClick}
72-
className={classes.buttonTrigger}
7365
disabled={disabled}
7466
type={"button"}
7567
>
7668
{unitSelected}
77-
</button>
78-
<Menu
79-
id={`${id}-menu`}
80-
aria-labelledby={`${id}-button`}
81-
anchorEl={anchorEl}
82-
open={open}
83-
onClose={() => {
69+
</UnitMenuButton>
70+
<DropdownSelector
71+
id={"upload-main-menu"}
72+
options={unitsList}
73+
selectedOption={""}
74+
onSelect={(value) => handleClose(value)}
75+
hideTriggerAction={() => {
8476
handleClose("");
8577
}}
86-
anchorOrigin={{
87-
vertical: "bottom",
88-
horizontal: "center",
89-
}}
90-
transformOrigin={{
91-
vertical: "top",
92-
horizontal: "center",
93-
}}
94-
>
95-
{unitsList.map((unit) => (
96-
<MenuItem
97-
onClick={() => handleClose(unit.value)}
98-
key={`itemUnit-${unit.value}-${unit.label}`}
99-
>
100-
{unit.label}
101-
</MenuItem>
102-
))}
103-
</Menu>
78+
open={open}
79+
anchorEl={anchorEl}
80+
anchorOrigin={"end"}
81+
/>
10482
</Fragment>
10583
);
10684
};
10785

108-
export default withStyles(styles)(InputUnitMenu);
86+
export default InputUnitMenu;

portal-ui/src/screens/Console/Configurations/types.ts

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

1717
import { SelectorTypes } from "../../../common/types";
18+
import { EnvOverride } from "../../../api/consoleApi";
1819

1920
export type KVFieldType =
2021
| "string"
@@ -51,15 +52,10 @@ export interface IConfigurationElement {
5152
url?: string;
5253
}
5354

54-
export interface IEnvOverride {
55-
name: string;
56-
value: string;
57-
}
58-
5955
export interface IElementValue {
6056
key: string;
6157
value: string;
62-
env_override?: IEnvOverride;
58+
env_override?: EnvOverride;
6359
}
6460

6561
export interface IConfigurationSys {

portal-ui/src/screens/Console/Configurations/utils.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ export const overrideFields = (formFields: IElementValue[]): IOverrideEnv => {
429429
// it has override values, we construct the value
430430
if (envItem.env_override) {
431431
const value: OverrideValue = {
432-
value: envItem.env_override.value,
433-
overrideEnv: envItem.env_override.name,
432+
value: envItem.env_override.value || "",
433+
overrideEnv: envItem.env_override.name || "",
434434
};
435435

436436
overrideReturn = { ...overrideReturn, [envItem.key]: value };

0 commit comments

Comments
 (0)