Skip to content

Commit 636d12d

Browse files
authored
Replaced LinearProgress as loader in favor of ProgressBar from mds (#3020)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
1 parent 5e9383d commit 636d12d

39 files changed

+146
-100
lines changed

portal-ui/src/screens/Console/Account/ChangePasswordModal.tsx

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

1717
import React, { useState } from "react";
18-
import { Button, ChangePasswordIcon, InputBox, Grid, FormLayout } from "mds";
18+
import {
19+
Button,
20+
ChangePasswordIcon,
21+
InputBox,
22+
Grid,
23+
FormLayout,
24+
ProgressBar,
25+
} from "mds";
1926
import ModalWrapper from "../Common/ModalWrapper/ModalWrapper";
20-
import { LinearProgress } from "@mui/material";
27+
2128
import { modalStyleUtils } from "../Common/FormComponents/common/styleLibrary";
2229
import { setModalErrorSnackMessage } from "../../../systemSlice";
2330
import { useAppDispatch } from "../../../store";
@@ -167,7 +174,7 @@ const ChangePassword = ({ open, closeModal }: IChangePasswordProps) => {
167174
</Grid>
168175
{loading && (
169176
<Grid item xs={12}>
170-
<LinearProgress />
177+
<ProgressBar />
171178
</Grid>
172179
)}
173180
</Grid>

portal-ui/src/screens/Console/Account/ChangeUserPasswordModal.tsx

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

1717
import React, { useState } from "react";
18-
import { Box, Button, ChangePasswordIcon, FormLayout, InputBox } from "mds";
19-
import { LinearProgress } from "@mui/material";
18+
import {
19+
Box,
20+
Button,
21+
ChangePasswordIcon,
22+
FormLayout,
23+
InputBox,
24+
ProgressBar,
25+
} from "mds";
2026
import { modalStyleUtils } from "../Common/FormComponents/common/styleLibrary";
2127
import { setModalErrorSnackMessage } from "../../../systemSlice";
2228
import { useAppDispatch } from "../../../store";
@@ -138,7 +144,7 @@ const ChangeUserPassword = ({
138144
</Box>
139145
{loading && (
140146
<Box>
141-
<LinearProgress />
147+
<ProgressBar />
142148
</Box>
143149
)}
144150
</FormLayout>

portal-ui/src/screens/Console/Buckets/BucketDetails/AddLifecycleModal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
RadioGroup,
2525
Select,
2626
Grid,
27+
ProgressBar,
2728
} from "mds";
2829
import { useSelector } from "react-redux";
2930
import { api } from "api";
@@ -33,7 +34,6 @@ import {
3334
Accordion,
3435
AccordionDetails,
3536
AccordionSummary,
36-
LinearProgress,
3737
Typography,
3838
} from "@mui/material";
3939
import { modalStyleUtils } from "../../Common/FormComponents/common/styleLibrary";
@@ -198,7 +198,7 @@ const AddLifecycleModal = ({
198198
{loadingTiers && (
199199
<Grid container>
200200
<Grid item xs={12}>
201-
<LinearProgress />
201+
<ProgressBar />
202202
</Grid>
203203
</Grid>
204204
)}
@@ -362,7 +362,7 @@ const AddLifecycleModal = ({
362362
</Grid>
363363
{addLoading && (
364364
<Grid item xs={12}>
365-
<LinearProgress />
365+
<ProgressBar />
366366
</Grid>
367367
)}
368368
</FormLayout>

portal-ui/src/screens/Console/Buckets/BucketDetails/EditLifecycleConfiguration.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
Grid,
2323
InputBox,
2424
LifecycleConfigIcon,
25+
ProgressBar,
2526
RadioGroup,
2627
Select,
2728
Switch,
@@ -30,7 +31,6 @@ import {
3031
Accordion,
3132
AccordionDetails,
3233
AccordionSummary,
33-
LinearProgress,
3434
Typography,
3535
} from "@mui/material";
3636
import { api } from "api";
@@ -525,7 +525,7 @@ const EditLifecycleConfiguration = ({
525525
</Grid>
526526
{addLoading && (
527527
<Grid item xs={12}>
528-
<LinearProgress />
528+
<ProgressBar />
529529
</Grid>
530530
)}
531531
</FormLayout>

portal-ui/src/screens/Console/Buckets/BucketDetails/EnableBucketEncryption.tsx

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

1717
import React, { Fragment, useEffect, useState } from "react";
18-
import { LinearProgress } from "@mui/material";
18+
1919
import {
2020
AddIcon,
2121
Box,
2222
BucketEncryptionIcon,
2323
Button,
2424
FormLayout,
2525
Grid,
26+
ProgressBar,
2627
Select,
2728
} from "mds";
2829
import {
@@ -241,7 +242,7 @@ const EnableBucketEncryption = ({
241242
</Grid>
242243
{loading && (
243244
<Grid item xs={12}>
244-
<LinearProgress />
245+
<ProgressBar />
245246
</Grid>
246247
)}
247248
</FormLayout>

portal-ui/src/screens/Console/Buckets/BucketDetails/EnableQuota.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
InputBox,
2323
Switch,
2424
Grid,
25+
ProgressBar,
2526
} from "mds";
2627
import {
2728
calculateBytes,
@@ -38,7 +39,6 @@ import { useAppDispatch } from "../../../../store";
3839
import { BucketQuota } from "api/consoleApi";
3940
import { api } from "api";
4041
import { errorToHandler } from "api/errors";
41-
import { LinearProgress } from "@mui/material";
4242

4343
interface IEnableQuotaProps {
4444
open: boolean;
@@ -187,7 +187,7 @@ const EnableQuota = ({
187187
</Grid>
188188
{loading && (
189189
<Grid item xs={12}>
190-
<LinearProgress />
190+
<ProgressBar />
191191
</Grid>
192192
)}
193193
</FormLayout>

portal-ui/src/screens/Console/Buckets/BucketDetails/SetRetentionConfig.tsx

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

1717
import React, { useEffect, useState } from "react";
18-
import { Button, Loader, Grid, FormLayout, RadioGroup, InputBox } from "mds";
18+
import {
19+
Button,
20+
Loader,
21+
Grid,
22+
FormLayout,
23+
RadioGroup,
24+
InputBox,
25+
ProgressBar,
26+
} from "mds";
1927
import { api } from "api";
2028
import { ObjectRetentionMode, ObjectRetentionUnit } from "api/consoleApi";
2129
import { errorToHandler } from "api/errors";
22-
import { LinearProgress } from "@mui/material";
30+
2331
import { modalStyleUtils } from "../../Common/FormComponents/common/styleLibrary";
2432
import { setModalErrorSnackMessage } from "../../../../systemSlice";
2533
import { useAppDispatch } from "../../../../store";
@@ -177,7 +185,7 @@ const SetRetentionConfig = ({
177185
</Grid>
178186
{addLoading && (
179187
<Grid item xs={12}>
180-
<LinearProgress />
188+
<ProgressBar />
181189
</Grid>
182190
)}
183191
</FormLayout>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import React, { Fragment, useEffect, useState } from "react";
1818
import styled from "styled-components";
1919
import get from "lodash/get";
20-
import { LinearProgress } from "@mui/material";
20+
2121
import { useNavigate } from "react-router-dom";
2222
import {
2323
BackLink,
@@ -33,6 +33,7 @@ import {
3333
RadioGroup,
3434
Switch,
3535
SectionTitle,
36+
ProgressBar,
3637
} from "mds";
3738
import { k8sScalarUnitsExcluding } from "../../../../../common/utils";
3839
import { AppState, useAppDispatch } from "../../../../../store";
@@ -557,7 +558,7 @@ const AddBucket = () => {
557558
</Grid>
558559
{addLoading && (
559560
<Grid item xs={12}>
560-
<LinearProgress />
561+
<ProgressBar />
561562
</Grid>
562563
)}
563564
</form>

portal-ui/src/screens/Console/Buckets/ListBuckets/AddBucket/BucketNamingRules.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +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 { Grid, ExpandOptionsButton } from "mds";
19-
import { LinearProgress } from "@mui/material";
18+
import { Grid, ExpandOptionsButton, ProgressBar } from "mds";
19+
2020
import { AppState } from "../../../../../store";
2121
import { useSelector } from "react-redux";
2222
import ValidRule from "./ValidRule";
@@ -129,7 +129,7 @@ const BucketNamingRules = ({ errorList }: { errorList: boolean[] }) => {
129129

130130
{addLoading && (
131131
<Grid item xs={12}>
132-
<LinearProgress />
132+
<ProgressBar />
133133
</Grid>
134134
)}
135135
</Fragment>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ import {
2929
SelectMultipleIcon,
3030
Grid,
3131
breakPoints,
32+
ProgressBar,
3233
} from "mds";
33-
import { LinearProgress } from "@mui/material";
34+
3435
import { actionsTray } from "../../Common/FormComponents/common/styleLibrary";
3536
import { SecureComponent } from "../../../../common/SecureComponent";
3637
import {
@@ -371,7 +372,7 @@ const ListBuckets = () => {
371372
</Grid>
372373
</Grid>
373374

374-
{loading && <LinearProgress />}
375+
{loading && <ProgressBar />}
375376
{!loading && (
376377
<Grid
377378
item

0 commit comments

Comments
 (0)