Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Box, Grid } from "@mui/material";
import { HelpBox } from "mds";
import { HelpBox, Box, Grid, breakPoints } from "mds";

interface IDistributedOnly {
iconComponent: any;
Expand All @@ -25,7 +24,7 @@ interface IDistributedOnly {

const DistributedOnly = ({ iconComponent, entity }: IDistributedOnly) => {
return (
<Grid container alignItems={"center"}>
<Grid container>
<Grid item xs={12}>
<HelpBox
title={`${entity} not available`}
Expand All @@ -34,21 +33,16 @@ const DistributedOnly = ({ iconComponent, entity }: IDistributedOnly) => {
<Box
sx={{
fontSize: "14px",
display: "flex",
border: "none",
flexFlow: {
xs: "column",
md: "row",
},
"& a": {
color: (theme) => theme.colors.link,
textDecoration: "underline",
[`@media (max-width: ${breakPoints.sm}px)`]: {
display: "flex",
flexFlow: "column",
},
}}
>
<div>This feature is not available for a single-disk setup.</div>

<div>
<span>
This feature is not available for a single-disk setup.&nbsp;
</span>
<span>
Please deploy a server in{" "}
<a
href="https://min.io/docs/minio/linux/operations/install-deploy-manage/deploy-minio-multi-node-multi-drive.html?ref=con"
Expand All @@ -58,7 +52,7 @@ const DistributedOnly = ({ iconComponent, entity }: IDistributedOnly) => {
Distributed Mode
</a>{" "}
to use this feature.
</div>
</span>
</Box>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

import React, { useState } from "react";
import get from "lodash/get";
import { Grid, InputLabel, Tooltip } from "@mui/material";
import IconButton from "@mui/material/IconButton";
import { Grid, InputLabel, Tooltip, IconButton } from "mds";
import AttachFileIcon from "@mui/icons-material/AttachFile";
import CancelIcon from "@mui/icons-material/Cancel";
import { Theme } from "@mui/material/styles";
Expand Down Expand Up @@ -96,24 +95,24 @@ const FileSelector = ({
<Grid
item
xs={12}
className={`${classes.fileInputField} ${classes.fieldBottom} ${
classes.fieldContainer
} ${error !== "" ? classes.errorInField : ""}`}
className={`inputItem ${classes.fileInputField} ${
classes.fieldBottom
} ${classes.fieldContainer} ${
error !== "" ? classes.errorInField : ""
}`}
>
{label !== "" && (
<InputLabel
htmlFor={id}
className={`${error !== "" ? classes.fieldLabelError : ""} ${
classes.inputLabel
}`}
className={`${error !== "" ? classes.fieldLabelError : ""}`}
>
<span>
{label}
{required ? "*" : ""}
</span>
{tooltip !== "" && (
<div className={classes.tooltipContainer}>
<Tooltip title={tooltip} placement="top-start">
<Tooltip tooltip={tooltip} placement="top">
<div className={classes.tooltip}>
<HelpIcon />
</div>
Expand Down Expand Up @@ -144,12 +143,9 @@ const FileSelector = ({
<IconButton
color="primary"
aria-label="upload picture"
component="span"
onClick={() => {
setShowSelector(false);
}}
disableRipple={false}
disableFocusRipple={false}
size="small"
>
<CancelIcon />
Expand All @@ -164,12 +160,9 @@ const FileSelector = ({
<IconButton
color="primary"
aria-label="upload picture"
component="span"
onClick={() => {
setShowSelector(true);
}}
disableRipple={false}
disableFocusRipple={false}
size="small"
>
<AttachFileIcon />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,25 @@ import React, { Fragment, useCallback, useEffect, useState } from "react";

import { useNavigate, useParams } from "react-router-dom";
import get from "lodash/get";
import Grid from "@mui/material/Grid";
import { Theme } from "@mui/material/styles";
import { BackLink, Button, PageLayout } from "mds";
import {
BackLink,
breakPoints,
Button,
Grid,
PageLayout,
InputBox,
SectionTitle,
} from "mds";
import createStyles from "@mui/styles/createStyles";
import withStyles from "@mui/styles/withStyles";
import { Box } from "@mui/material";
import {
fileInputStyles,
formFieldStyles,
modalBasic,
modalStyleUtils,
settingsCommon,
} from "../../Common/FormComponents/common/styleLibrary";
import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
import FileSelector from "../../Common/FormComponents/FileSelector/FileSelector";
import {
azureServiceName,
Expand Down Expand Up @@ -348,53 +354,28 @@ const AddTierConfiguration = ({ classes }: IAddNotificationEndpointProps) => {
>
<form noValidate onSubmit={submitForm}>
{type !== "" && targetElement ? (
<Grid
item
xs={12}
key={`icon-${targetElement.targetTitle}`}
sx={{
display: "flex",
alignItems: "center",
justifyContent: "start",
marginBottom: "20px",
}}
>
{targetElement.logo ? (
<Box
sx={{
"& .min-icon": {
height: "60px",
width: "60px",
},
}}
>
{targetElement.logo}
</Box>
) : null}

<div className={classes.lambdaNotifTitle}>
<b>
{titleSelection ? titleSelection : ""} - Add Tier
Configuration
</b>
</div>
</Grid>
<SectionTitle icon={targetElement.logo} sx={{ marginBottom: 20 }}>
{titleSelection ? titleSelection : ""} - Add Tier Configuration
</SectionTitle>
) : null}

<Grid
item
xs={12}
sx={{
display: "grid",
gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr" },
gridAutoFlow: { xs: "dense", sm: "row" },
gridRowGap: 25,
gridTemplateColumns: "1fr 1fr",
gridAutoFlow: "row",
gridRowGap: 20,
gridColumnGap: 50,
[`@media (max-width: ${breakPoints.sm}px)`]: {
gridTemplateColumns: "1fr",
gridAutoFlow: "dense",
},
}}
>
{type !== "" && (
<Fragment>
<InputBoxWrapper
<InputBox
id="name"
name="name"
label="Name"
Expand All @@ -404,7 +385,7 @@ const AddTierConfiguration = ({ classes }: IAddNotificationEndpointProps) => {
error={nameInputError}
required
/>
<InputBoxWrapper
<InputBox
id="endpoint"
name="endpoint"
label="Endpoint"
Expand All @@ -417,7 +398,7 @@ const AddTierConfiguration = ({ classes }: IAddNotificationEndpointProps) => {
/>
{(type === s3ServiceName || type === minioServiceName) && (
<Fragment>
<InputBoxWrapper
<InputBox
id="accessKey"
name="accessKey"
label="Access Key"
Expand All @@ -428,7 +409,7 @@ const AddTierConfiguration = ({ classes }: IAddNotificationEndpointProps) => {
}}
required
/>
<InputBoxWrapper
<InputBox
id="secretKey"
name="secretKey"
label="Secret Key"
Expand Down Expand Up @@ -462,7 +443,7 @@ const AddTierConfiguration = ({ classes }: IAddNotificationEndpointProps) => {
)}
{type === azureServiceName && (
<Fragment>
<InputBoxWrapper
<InputBox
id="accountName"
name="accountName"
label="Account Name"
Expand All @@ -473,7 +454,7 @@ const AddTierConfiguration = ({ classes }: IAddNotificationEndpointProps) => {
}}
required
/>
<InputBoxWrapper
<InputBox
id="accountKey"
name="accountKey"
label="Account Key"
Expand All @@ -486,7 +467,7 @@ const AddTierConfiguration = ({ classes }: IAddNotificationEndpointProps) => {
/>
</Fragment>
)}
<InputBoxWrapper
<InputBox
id="bucket"
name="bucket"
label="Bucket"
Expand All @@ -497,7 +478,7 @@ const AddTierConfiguration = ({ classes }: IAddNotificationEndpointProps) => {
}}
required
/>
<InputBoxWrapper
<InputBox
id="prefix"
name="prefix"
label="Prefix"
Expand All @@ -519,7 +500,7 @@ const AddTierConfiguration = ({ classes }: IAddNotificationEndpointProps) => {
type={type as "azure" | "s3" | "minio" | "gcs"}
/>
{type === s3ServiceName && (
<InputBoxWrapper
<InputBox
id="storageClass"
name="storageClass"
label="Storage Class"
Expand All @@ -533,7 +514,7 @@ const AddTierConfiguration = ({ classes }: IAddNotificationEndpointProps) => {
</Fragment>
)}
</Grid>
<Grid item xs={12} className={classes.settingsButtonContainer}>
<Grid item xs={12} sx={modalStyleUtils.modalButtonBar}>
<Button
id={"save-tier-configuration"}
type="submit"
Expand Down
Loading