Skip to content

Commit

Permalink
Updated material-ui dependency (#88)
Browse files Browse the repository at this point in the history
Updated material-ui dependency and fixed a couple os issues that could cause the application to crash
  • Loading branch information
bexsoft committed May 1, 2020
1 parent 526c0f4 commit f3d7e61
Show file tree
Hide file tree
Showing 7 changed files with 603 additions and 514 deletions.
268 changes: 134 additions & 134 deletions portal-ui/bindata_assetfs.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion portal-ui/package.json
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"@babel/helper-create-regexp-features-plugin": "^7.7.4",
"@babel/plugin-transform-react-jsx-development": "^7.9.0",
"@material-ui/core": "^4.9.8",
"@material-ui/core": "^4.9.12",
"@material-ui/icons": "^4.9.1",
"@types/history": "^4.7.3",
"@types/jest": "24.0.23",
Expand Down
Expand Up @@ -15,6 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import get from "lodash/get";
import { createStyles, Theme, withStyles } from "@material-ui/core/styles";
import Grid from "@material-ui/core/Grid";
import api from "../../../../common/api";
Expand Down Expand Up @@ -123,12 +124,13 @@ class ViewBucket extends React.Component<IViewBucketProps, IViewBucketState> {
api
.invoke("GET", `/api/v1/buckets/${bucketName}/events`)
.then((res: BucketEventList) => {
const events = res.events;
const events = get(res, "events", []);
const total = get(res, "total", 0);

this.setState({
loading: false,
records: events || [],
totalRecords: res.total,
totalRecords: total,
error: ""
});
// if we get 0 results, and page > 0 , go down 1 page
Expand Down
Expand Up @@ -61,7 +61,7 @@ const CSVMultiSelector = ({
elements,
name,
label,
tooltip,
tooltip = "",
onChange,
classes
}: ICSVMultiSelector) => {
Expand Down
37 changes: 18 additions & 19 deletions portal-ui/src/screens/Console/Permissions/AddPermission.tsx
Expand Up @@ -483,7 +483,6 @@ class AddPermissionContent extends React.Component<
count={buckets.length}
rowsPerPage={rowsPerPage}
page={page}
labelRowsPerPage={null}
onChangePage={handleChangePage}
onChangeRowsPerPage={handleChangeRowsPerPage}
/>
Expand Down Expand Up @@ -521,28 +520,28 @@ class AddPermissionContent extends React.Component<
label="Write Only"
/>
<FormControlLabel
value="trace"
control={<Radio />}
label="Trace"
value="trace"
control={<Radio />}
label="Trace"
/>
</RadioGroup>
</FormControl>
</Grid>
{action === 'trace' && (
<React.Fragment>
<Grid item xs={12}>
<br />
</Grid>
<Grid item xs={12}>
<Typography
component="p"
variant="body1"
className={classes.errorBlock}
>
Trace displays tracing information for all buckets.
</Typography>
</Grid>
</React.Fragment>
{action === "trace" && (
<React.Fragment>
<Grid item xs={12}>
<br />
</Grid>
<Grid item xs={12}>
<Typography
component="p"
variant="body1"
className={classes.errorBlock}
>
Trace displays tracing information for all buckets.
</Typography>
</Grid>
</React.Fragment>
)}
<Grid item xs={12}>
<br />
Expand Down
Expand Up @@ -472,7 +472,6 @@ class AddServiceAccountContent extends React.Component<
count={permissions.length}
rowsPerPage={rowsPerPage}
page={page}
labelRowsPerPage={null}
onChangePage={handleChangePage}
onChangeRowsPerPage={handleChangeRowsPerPage}
/>
Expand Down

0 comments on commit f3d7e61

Please sign in to comment.