Skip to content

Commit f3d7e61

Browse files
authored
Updated material-ui dependency (#88)
Updated material-ui dependency and fixed a couple os issues that could cause the application to crash
1 parent 526c0f4 commit f3d7e61

File tree

7 files changed

+603
-514
lines changed

7 files changed

+603
-514
lines changed

portal-ui/bindata_assetfs.go

Lines changed: 134 additions & 134 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

portal-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dependencies": {
66
"@babel/helper-create-regexp-features-plugin": "^7.7.4",
77
"@babel/plugin-transform-react-jsx-development": "^7.9.0",
8-
"@material-ui/core": "^4.9.8",
8+
"@material-ui/core": "^4.9.12",
99
"@material-ui/icons": "^4.9.1",
1010
"@types/history": "^4.7.3",
1111
"@types/jest": "24.0.23",

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

Lines changed: 4 additions & 2 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 React from "react";
18+
import get from "lodash/get";
1819
import { createStyles, Theme, withStyles } from "@material-ui/core/styles";
1920
import Grid from "@material-ui/core/Grid";
2021
import api from "../../../../common/api";
@@ -123,12 +124,13 @@ class ViewBucket extends React.Component<IViewBucketProps, IViewBucketState> {
123124
api
124125
.invoke("GET", `/api/v1/buckets/${bucketName}/events`)
125126
.then((res: BucketEventList) => {
126-
const events = res.events;
127+
const events = get(res, "events", []);
128+
const total = get(res, "total", 0);
127129

128130
this.setState({
129131
loading: false,
130132
records: events || [],
131-
totalRecords: res.total,
133+
totalRecords: total,
132134
error: ""
133135
});
134136
// if we get 0 results, and page > 0 , go down 1 page

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const CSVMultiSelector = ({
6161
elements,
6262
name,
6363
label,
64-
tooltip,
64+
tooltip = "",
6565
onChange,
6666
classes
6767
}: ICSVMultiSelector) => {

portal-ui/src/screens/Console/Permissions/AddPermission.tsx

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,6 @@ class AddPermissionContent extends React.Component<
483483
count={buckets.length}
484484
rowsPerPage={rowsPerPage}
485485
page={page}
486-
labelRowsPerPage={null}
487486
onChangePage={handleChangePage}
488487
onChangeRowsPerPage={handleChangeRowsPerPage}
489488
/>
@@ -521,28 +520,28 @@ class AddPermissionContent extends React.Component<
521520
label="Write Only"
522521
/>
523522
<FormControlLabel
524-
value="trace"
525-
control={<Radio />}
526-
label="Trace"
523+
value="trace"
524+
control={<Radio />}
525+
label="Trace"
527526
/>
528527
</RadioGroup>
529528
</FormControl>
530529
</Grid>
531-
{action === 'trace' && (
532-
<React.Fragment>
533-
<Grid item xs={12}>
534-
<br />
535-
</Grid>
536-
<Grid item xs={12}>
537-
<Typography
538-
component="p"
539-
variant="body1"
540-
className={classes.errorBlock}
541-
>
542-
Trace displays tracing information for all buckets.
543-
</Typography>
544-
</Grid>
545-
</React.Fragment>
530+
{action === "trace" && (
531+
<React.Fragment>
532+
<Grid item xs={12}>
533+
<br />
534+
</Grid>
535+
<Grid item xs={12}>
536+
<Typography
537+
component="p"
538+
variant="body1"
539+
className={classes.errorBlock}
540+
>
541+
Trace displays tracing information for all buckets.
542+
</Typography>
543+
</Grid>
544+
</React.Fragment>
546545
)}
547546
<Grid item xs={12}>
548547
<br />

portal-ui/src/screens/Console/ServiceAccounts/AddServiceAccount.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,6 @@ class AddServiceAccountContent extends React.Component<
472472
count={permissions.length}
473473
rowsPerPage={rowsPerPage}
474474
page={page}
475-
labelRowsPerPage={null}
476475
onChangePage={handleChangePage}
477476
onChangeRowsPerPage={handleChangeRowsPerPage}
478477
/>

0 commit comments

Comments
 (0)