Skip to content

Commit d713dc4

Browse files
authored
Add Helpbox to Tier Type selector screen and adjust formatting (#2519)
1 parent 0c9a6bf commit d713dc4

File tree

2 files changed

+78
-23
lines changed

2 files changed

+78
-23
lines changed

portal-ui/src/screens/Console/Configurations/TiersConfiguration/TierTypeCard.tsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,22 @@ const TierTypeCard = ({ onClick, icon, name }: TierTypeCardProps) => {
2828
const styles = {
2929
tierTypeCard: {
3030
height: "80px",
31-
width: "300px",
31+
width: "auto",
3232
display: "flex",
3333
alignItems: "center",
34-
justifyContent: "start",
34+
justifyContent: "flex-start",
3535
padding: 5,
3636
border: "1px solid #E5E5E5",
3737
borderRadius: 2,
3838
cursor: "pointer",
39+
overflow: "hidden",
3940
"&:hover": { background: "#ebebeb" },
4041
},
42+
tierTypeTitle: {
43+
fontWeight: 600,
44+
fontSize: 14,
45+
justifyContent: "center",
46+
},
4147
};
4248
return (
4349
<Button
@@ -49,7 +55,7 @@ const TierTypeCard = ({ onClick, icon, name }: TierTypeCardProps) => {
4955
>
5056
<Grid container alignItems={"center"}>
5157
{icon ? (
52-
<Grid item padding={5}>
58+
<Grid item padding={1} xs={4}>
5359
<Box
5460
sx={{
5561
"& .min-icon": {
@@ -62,16 +68,8 @@ const TierTypeCard = ({ onClick, icon, name }: TierTypeCardProps) => {
6268
</Box>
6369
</Grid>
6470
) : null}
65-
<Grid item>
66-
<div
67-
style={{
68-
fontWeight: 600,
69-
marginLeft: 10,
70-
fontSize: 14,
71-
}}
72-
>
73-
{name}
74-
</div>
71+
<Grid item xs={8} style={styles.tierTypeTitle} paddingLeft={1}>
72+
{name}
7573
</Grid>
7674
</Grid>
7775
</Button>

portal-ui/src/screens/Console/Configurations/TiersConfiguration/TierTypeSelector.tsx

Lines changed: 67 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ import PageHeader from "../../Common/PageHeader/PageHeader";
2323
import BackLink from "../../../../common/BackLink";
2424
import PageLayout from "../../Common/Layout/PageLayout";
2525
import TierTypeCard from "./TierTypeCard";
26-
import ContentBox from "../../Common/ContentBox";
26+
import HelpBox from "../../../../common/HelpBox";
27+
import { TiersIcon } from "../../../../icons";
28+
import FormLayout from "../../Common/FormLayout";
2729

2830
const TierTypeSelector = () => {
2931
const navigate = useNavigate();
@@ -44,20 +46,75 @@ const TierTypeSelector = () => {
4446
/>
4547

4648
<PageLayout>
47-
<ContentBox>
48-
<div style={{ fontSize: 16, fontWeight: 600, paddingBottom: 15 }}>
49-
Select Tier Type
50-
</div>
49+
<FormLayout
50+
title={"Select Tier Type"}
51+
icon={<TiersIcon />}
52+
helpbox={
53+
<HelpBox
54+
iconComponent={<TiersIcon />}
55+
title={"Tier Types"}
56+
help={
57+
<Fragment>
58+
MinIO supports creating object transition lifecycle management
59+
rules, where MinIO can automatically move an object to a
60+
remote storage “tier”.
61+
<br />
62+
<br />
63+
MinIO supports the following Tier types:
64+
<br />
65+
<ul>
66+
<li>
67+
<a
68+
href="https://min.io/docs/minio/kubernetes/upstream/administration/object-management/transition-objects-to-s3.html#minio-lifecycle-management-transition-to-s3?ref=con"
69+
target="_blank"
70+
rel="noreferrer"
71+
>
72+
MinIO or other S3-compatible storage
73+
</a>
74+
</li>
75+
<li>
76+
<a
77+
href="https://min.io/docs/minio/kubernetes/upstream/administration/object-management/transition-objects-to-s3.html#minio-lifecycle-management-transition-to-s3?ref=con"
78+
target="_blank"
79+
rel="noreferrer"
80+
>
81+
Amazon S3
82+
</a>
83+
</li>
84+
<li>
85+
<a
86+
href="https://min.io/docs/minio/kubernetes/upstream/administration/object-management/transition-objects-to-gcs.html#minio-lifecycle-management-transition-to-gcs?ref=con"
87+
target="_blank"
88+
rel="noreferrer"
89+
>
90+
Google Cloud Storage
91+
</a>
92+
</li>
93+
<li>
94+
<a
95+
href="https://min.io/docs/minio/kubernetes/upstream/administration/object-management/transition-objects-to-azure.html#minio-lifecycle-management-transition-to-azure?ref=con"
96+
target="_blank"
97+
rel="noreferrer"
98+
>
99+
Microsoft Azure Blob Storage
100+
</a>
101+
</li>
102+
</ul>
103+
</Fragment>
104+
}
105+
/>
106+
}
107+
>
51108
<Box
52109
sx={{
53-
margin: "0 auto",
110+
margin: "15px",
54111
display: "grid",
55112
gridGap: "20px",
56113
gridTemplateColumns: {
57114
xs: "repeat(1, 1fr)",
58-
sm: "repeat(2, 1fr)",
59-
md: "repeat(3, 1fr)",
60-
lg: "repeat(4, 1fr)",
115+
sm: "repeat(1, 1fr)",
116+
md: "repeat(2, 1fr)",
117+
lg: "repeat(2, 1fr)",
61118
},
62119
}}
63120
>
@@ -72,7 +129,7 @@ const TierTypeSelector = () => {
72129
/>
73130
))}
74131
</Box>
75-
</ContentBox>
132+
</FormLayout>
76133
</PageLayout>
77134
</Fragment>
78135
);

0 commit comments

Comments
 (0)