Skip to content

Commit cd5f5cb

Browse files
bexsoftBenjamin Perez
andauthored
Updated project dependencies (#571)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
1 parent e17a371 commit cd5f5cb

File tree

10 files changed

+3473
-2989
lines changed

10 files changed

+3473
-2989
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ public.crt
3737
.vscode/
3838
*.code-workspace
3939
*~
40+
.eslintcache

portal-ui/bindata_assetfs.go

Lines changed: 212 additions & 258 deletions
Large diffs are not rendered by default.

portal-ui/package.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"dependencies": {
66
"@date-io/moment": "1.x",
77
"@hot-loader/react-dom": "17.0.1",
8-
"@material-ui/core": "^4.9.12",
9-
"@material-ui/icons": "^4.9.1",
8+
"@material-ui/core": "^4.11.2",
9+
"@material-ui/icons": "^4.11.2",
1010
"@material-ui/pickers": "^3.2.10",
1111
"@types/history": "^4.7.3",
1212
"@types/jest": "24.0.23",
@@ -20,7 +20,7 @@
2020
"@types/react-router": "^5.1.3",
2121
"@types/react-router-dom": "^5.1.2",
2222
"@types/react-virtualized": "^9.21.10",
23-
"@types/recharts": "^1.8.9",
23+
"@types/recharts": "^1.8.19",
2424
"@types/superagent": "^4.1.4",
2525
"@types/webpack-env": "^1.14.1",
2626
"@types/websocket": "^1.0.0",
@@ -41,14 +41,14 @@
4141
"react-dom": "17.0.1",
4242
"react-grid-layout": "^1.2.0",
4343
"react-hot-loader": "^4.13.0",
44-
"react-moment": "^0.9.7",
44+
"react-moment": "^1.1.1",
4545
"react-redux": "^7.1.3",
4646
"react-router-dom": "^5.1.2",
47-
"react-scripts": "3.4.4",
47+
"react-scripts": "4.0.1",
4848
"react-virtualized": "^9.22.2",
4949
"react-window-infinite-loader": "^1.0.5",
50-
"recharts": "^1.8.5",
51-
"redux": "^4.0.4",
50+
"recharts": "^2.0.3",
51+
"redux": "^4.0.5",
5252
"redux-thunk": "^2.3.0",
5353
"superagent": "^5.1.0",
5454
"typeface-roboto": "^0.0.75",
@@ -78,8 +78,7 @@
7878
},
7979
"proxy": "http://localhost:9090/",
8080
"devDependencies": {
81-
"jest": "^24.9.0",
8281
"prettier": "2.2.1",
83-
"typescript": "^4.1.2"
82+
"typescript": "^4.1.3"
8483
}
8584
}

portal-ui/src/screens/Console/Dashboard/Chart.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export default function Chart() {
4545
<XAxis dataKey="time" stroke={theme.palette.text.secondary} />
4646
<YAxis stroke={theme.palette.text.secondary}>
4747
<Label
48-
angle={270}
4948
position="left"
5049
style={{ textAnchor: "middle", fill: theme.palette.text.primary }}
5150
>

portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/LinearGraphWidget.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ const LinearGraphWidget = ({
9696
/>
9797
<XAxis
9898
dataKey="name"
99-
tickFormatter={xAxisFormatter}
99+
tickFormatter={(value: any) => xAxisFormatter(value)}
100100
interval={5}
101101
tick={{ fontSize: "70%" }}
102102
tickCount={10}
103103
/>
104104
<YAxis
105-
domain={[0, (dataMax) => dataMax * 4]}
105+
domain={[0, (dataMax: number) => dataMax * 4]}
106106
hide={hideYAxis}
107-
tickFormatter={yAxisFormatter}
107+
tickFormatter={(value: any) => yAxisFormatter(value)}
108108
tick={{ fontSize: "70%" }}
109109
/>
110110
{linearConfiguration.map((section, index) => {

portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/SingleRepWidget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const SingleRepWidget = ({
4848
<div className={classes.contentContainer}>
4949
<ResponsiveContainer>
5050
<AreaChart data={data}>
51-
<YAxis domain={[0, (dataMax) => dataMax * 2]} hide={true} />
51+
<YAxis domain={[0, (dataMax: number) => dataMax * 2]} hide={true} />
5252
<Area
5353
type="monotone"
5454
dataKey={"value"}

portal-ui/src/screens/Console/Tenants/ListTenants/AddTenant.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// You should have received a copy of the GNU Affero General Public License
1515
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
import React, { useCallback, useEffect, useState } from "react";
17+
import React, { useCallback, useEffect, useMemo, useState } from "react";
1818
import debounce from "lodash/debounce";
1919
import get from "lodash/get";
2020
import ModalWrapper from "../../Common/ModalWrapper/ModalWrapper";
@@ -309,7 +309,7 @@ const AddTenant = ({
309309
/*Debounce functions*/
310310

311311
// Storage Quotas
312-
const getNamespaceInformation = () => {
312+
const getNamespaceInformation = useCallback(() => {
313313
setSelectedStorageClass("");
314314
setStorageClassesList([]);
315315
api
@@ -338,7 +338,7 @@ const AddTenant = ({
338338
.catch((err: any) => {
339339
console.log(err);
340340
});
341-
};
341+
}, [namespace]);
342342

343343
const validateMemorySize = useCallback(() => {
344344
const memSize = parseInt(memoryNode) || 0;
@@ -381,9 +381,9 @@ const AddTenant = ({
381381
validateMemorySize();
382382
}, [maxAllocableMemo, validateMemorySize]);
383383

384-
const debounceNamespace = useCallback(
385-
debounce(getNamespaceInformation, 500),
386-
[namespace]
384+
const debounceNamespace = useMemo(
385+
() => debounce(getNamespaceInformation, 500),
386+
[getNamespaceInformation]
387387
);
388388

389389
useEffect(() => {

portal-ui/src/screens/LoginPage/LoginPage.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import React, { useEffect, useState } from "react";
1818
import request from "superagent";
19-
import { connect, ConnectedProps } from "react-redux";
19+
import { connect } from "react-redux";
2020
import ErrorIcon from "@material-ui/icons/Error";
2121
import Button from "@material-ui/core/Button";
2222
import TextField from "@material-ui/core/TextField";
@@ -171,8 +171,6 @@ const connector = connect(mapState, { userLoggedIn });
171171

172172
// The inferred type will look like:
173173
// {isOn: boolean, toggleOn: () => void}
174-
type PropsFromRedux = ConnectedProps<typeof connector>;
175-
type Props = PropsFromRedux & {};
176174

177175
interface ILoginProps {
178176
userLoggedIn: typeof userLoggedIn;

portal-ui/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"isolatedModules": true,
1515
"noEmit": true,
1616
"jsx": "react-jsx",
17-
"downlevelIteration": true
17+
"downlevelIteration": true,
18+
"noFallthroughCasesInSwitch": true
1819
},
1920
"include": ["src"]
2021
}

0 commit comments

Comments
 (0)