Skip to content

Commit a5f89bb

Browse files
authored
Improve Tier status accessibility (#2409)
1 parent a53b569 commit a5f89bb

File tree

3 files changed

+95
-23
lines changed

3 files changed

+95
-23
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// This file is part of MinIO Console Server
2+
// Copyright (c) 2022 MinIO, Inc.
3+
//
4+
// This program is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU Affero General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// This program is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU Affero General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU Affero General Public License
15+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
import * as React from "react";
18+
import { SVGProps } from "react";
19+
20+
const TierOfflineIcon = (props: SVGProps<SVGSVGElement>) => (
21+
<svg
22+
xmlns="http://www.w3.org/2000/svg"
23+
width="14"
24+
height="14"
25+
viewBox="0 0 14 14"
26+
>
27+
<path
28+
id="offline-icon"
29+
d="M91.4,4.551l-.825-.825-2.44,2.439L85.7,3.726l-.825.825L87.312,6.99,84.873,9.429l.825.825,2.439-2.439,2.44,2.439.825-.825L88.961,6.99Zm-.155,9.44H85.027l-3.89-4.279V4.269L85.027-.01h6.219l3.89,4.279V9.711Z"
30+
transform="translate(-81.136 0.01)"
31+
fill="#c83b51"
32+
fill-rule="evenodd"
33+
/>
34+
</svg>
35+
);
36+
37+
export default TierOfflineIcon;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// This file is part of MinIO Console Server
2+
// Copyright (c) 2022 MinIO, Inc.
3+
//
4+
// This program is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU Affero General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// This program is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU Affero General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU Affero General Public License
15+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
import * as React from "react";
18+
import { SVGProps } from "react";
19+
20+
const TierOnlineIcon = (props: SVGProps<SVGSVGElement>) => (
21+
<svg
22+
xmlns="http://www.w3.org/2000/svg"
23+
width="14"
24+
height="14"
25+
viewBox="0 0 14 14"
26+
>
27+
<path
28+
id="online-icon"
29+
d="M7,14a7.052,7.052,0,0,1-1.411-.142,6.962,6.962,0,0,1-2.5-1.053A7.02,7.02,0,0,1,.55,9.725,6.965,6.965,0,0,1,.142,8.411a7.068,7.068,0,0,1,0-2.821A6.962,6.962,0,0,1,1.2,3.086,7.02,7.02,0,0,1,4.275.55,6.965,6.965,0,0,1,5.589.142a7.068,7.068,0,0,1,2.821,0,6.962,6.962,0,0,1,2.5,1.053,7.02,7.02,0,0,1,2.536,3.08,6.965,6.965,0,0,1,.408,1.314,7.068,7.068,0,0,1,0,2.821,6.962,6.962,0,0,1-1.053,2.5,7.02,7.02,0,0,1-3.08,2.536,6.965,6.965,0,0,1-1.314.408A7.052,7.052,0,0,1,7,14ZM3.958,6h0L2.953,7.008l3.016,3.016L10.995,5,9.99,3.992,5.969,8.013,3.958,6Z"
30+
fill="#4ccb92"
31+
/>
32+
</svg>
33+
);
34+
35+
export default TierOnlineIcon;

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,7 @@ import {
3131
tableStyles,
3232
typesSelection,
3333
} from "../../Common/FormComponents/common/styleLibrary";
34-
import {
35-
AddIcon,
36-
CircleIcon,
37-
TiersIcon,
38-
TiersNotAvailableIcon,
39-
} from "../../../../icons";
34+
import { AddIcon, TiersIcon, TiersNotAvailableIcon } from "../../../../icons";
4035

4136
import { ITierElement, ITierResponse } from "./types";
4237
import { ErrorResponseHandler } from "../../../../common/types";
@@ -65,7 +60,8 @@ import { useNavigate } from "react-router-dom";
6560
import { useAppDispatch } from "../../../../store";
6661
import { hasPermission } from "../../../../common/SecureComponent";
6762
import TooltipWrapper from "../../Common/TooltipWrapper/TooltipWrapper";
68-
63+
import TierOnlineIcon from "../../../../icons/TierOnlineIcon";
64+
import TierOfflineIcon from "../../../../icons/TierOfflineIcon";
6965
const UpdateTierCredentialsModal = withSuspense(
7066
React.lazy(() => import("./UpdateTierCredentialsModal"))
7167
);
@@ -233,35 +229,38 @@ const ListTiersConfiguration = ({ classes }: IListTiersConfig) => {
233229
const renderTierStatus = (item: boolean) => {
234230
if (item) {
235231
return (
236-
<Box
232+
<Grid
233+
container
237234
sx={{
238235
display: "flex",
239236
alignItems: "center",
240-
"& .min-icon": {
241-
width: "18px",
242-
height: "22px",
243-
fill: "#4CCB92",
244-
},
237+
justifyItems: "start",
238+
color: "#4CCB92",
239+
fontSize: "8px",
245240
}}
241+
flexDirection={"column"}
242+
display={"flex"}
246243
>
247-
<CircleIcon />
248-
</Box>
244+
<TierOnlineIcon />
245+
ONLINE
246+
</Grid>
249247
);
250248
}
251249
return (
252-
<Box
250+
<Grid
251+
container
253252
sx={{
254253
display: "flex",
255254
alignItems: "center",
256-
"& .min-icon": {
257-
width: "18px",
258-
height: "22px",
259-
fill: "#C83B51",
260-
},
255+
color: "#C83B51",
256+
fontSize: "8px",
261257
}}
258+
flexDirection={"column"}
259+
display={"flex"}
262260
>
263-
<CircleIcon />
264-
</Box>
261+
<TierOfflineIcon />
262+
OFFLINE
263+
</Grid>
265264
);
266265
};
267266

@@ -364,6 +363,7 @@ const ListTiersConfiguration = ({ classes }: IListTiersConfig) => {
364363
overrideClass={classes.searchField}
365364
value={filter}
366365
/>
366+
367367
<div className={classes.rightActionButtons}>
368368
<Button
369369
id={"refresh-list"}

0 commit comments

Comments
 (0)