Skip to content

Commit c0c3c2f

Browse files
committed
upgrade react, mui etc + signifigant reduction in glb size of brain model + smaller updates
1 parent db444e8 commit c0c3c2f

27 files changed

Lines changed: 345 additions & 134 deletions

File tree

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ VITE_DNS_URL="https://dns.cloud.cbh.kth.se"
88
VITE_MAIA_URL="https://maia.app.cloud.cbh.kth.se/maia"
99
# can be comma separated to add more
1010
VITE_SERVER_PLATFORM="linux/amd64"
11+
VITE_DEPLOYMENT_SSH_BASE="deploy.cloud.cbh.kth.se"
1112
GENERATE_SOURCEMAP=false

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ ENV DNS_URL="https://dns.cloud.cbh.kth.se"
4949
ENV MAIA_URL="https://maia.app.cloud.cbh.kth.se/maia"
5050
# can be comma separated to add more
5151
ENV SERVER_PLATFORM="linux/amd64"
52+
ENV DEPLOYMENT_SSH_BASE="deploy.cloud.cbh.kth.se"
5253

5354
EXPOSE 3000
5455
ENTRYPOINT ["/entrypoint.sh"]

bun.lockb

20.2 KB
Binary file not shown.

index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
</head>
3434

3535
<body>
36+
<!-- paste this BEFORE any scripts -->
37+
<script
38+
crossOrigin="anonymous"
39+
src="//unpkg.com/react-scan/dist/auto.global.js"
40+
></script>
3641
<noscript>
3742
<h1>cbhcloud</h1>
3843
Welcome to kthcloud. The console is built in React, meaning you have to enable JavaScript to use it.<br />

package.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,22 @@
1717
"@emotion/styled": "^11.14.1",
1818
"@iconify/react": "^4.1.1",
1919
"@kthcloud/go-deploy-types": "^1.0.25",
20-
"@mui/icons-material": "^5.18.0",
20+
"@mui/icons-material": "^7.3.9",
2121
"@mui/lab": "^5.0.0-alpha.177",
22-
"@mui/material": "^5.18.0",
22+
"@mui/material": "^7.3.9",
2323
"@mui/material-next": "^6.0.0-alpha.126",
2424
"@mui/x-tree-view": "^7.29.10",
2525
"@react-keycloak/web": "^3.4.0",
26-
"@react-three/fiber": "^8.18.0",
26+
"@react-three/drei": "^10.7.7",
27+
"@react-three/fiber": "^9.5.0",
2728
"@sanity/eventsource": "^5.0.2",
2829
"@types/crypto-js": "^4.2.2",
29-
"@types/lodash": "^4.17.23",
30+
"@types/lodash": "^4.17.24",
3031
"@types/numeral": "^2.0.5",
3132
"@types/punycode": "^2.1.4",
3233
"@types/three": "^0.164.1",
3334
"apexcharts": "^3.54.1",
34-
"bun": "^1.3.9",
35+
"bun": "^1.3.10",
3536
"change-case": "^5.4.4",
3637
"crypto-js": "^4.2.0",
3738
"http-status-codes": "^2.3.0",
@@ -44,11 +45,11 @@
4445
"notistack": "^3.0.2",
4546
"numeral": "^2.0.6",
4647
"punycode": "^2.3.1",
47-
"react": "^18.3.1",
48+
"react": "^19.2.0",
4849
"react-apexcharts": "^1.9.0",
4950
"react-cookie": "^7.2.2",
50-
"react-copy-to-clipboard": "^5.1.0",
51-
"react-dom": "^18.3.1",
51+
"react-copy-to-clipboard": "^5.1.1",
52+
"react-dom": "^19.2.0",
5253
"react-helmet-async": "^2.0.5",
5354
"react-i18next": "^14.1.3",
5455
"react-router-dom": "^6.30.3",
@@ -60,15 +61,16 @@
6061
},
6162
"devDependencies": {
6263
"@faker-js/faker": "^8.4.1",
63-
"@types/bun": "^1.3.9",
64+
"@types/bun": "^1.3.10",
6465
"@types/react": "^18.3.28",
6566
"@types/react-copy-to-clipboard": "^5.0.7",
6667
"@types/react-dom": "^18.3.7",
6768
"@typescript-eslint/eslint-plugin": "^7.18.0",
6869
"@typescript-eslint/parser": "^7.18.0",
6970
"@vitejs/plugin-react": "^4.7.0",
7071
"@vitejs/plugin-react-swc": "^3.11.0",
71-
"eslint": "^9.39.2",
72+
"babel-plugin-react-compiler": "^1.0.0",
73+
"eslint": "^9.39.4",
7274
"eslint-plugin-react": "^7.37.5",
7375
"eslint-plugin-react-hooks": "^4.6.2",
7476
"eslint-plugin-react-refresh": "^0.4.26",

public/static/models/Brain.glb

-34 MB
Binary file not shown.

public/static/models/brain.glb

1.7 MB
Binary file not shown.

src/components/LoadingPage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ const LoadingPage = () => {
5858
direction="column"
5959
alignItems="center"
6060
justifyContent="center"
61-
style={{ minHeight: "100vh" }}
61+
sx={{ minHeight: "100vh", textAlign: "center" }}
6262
>
63-
<Grid item xs={3} m={1}>
63+
<Grid size={{ xs: 3 }} m={1}>
6464
<CircularProgress />
6565
</Grid>
66-
<Grid item xs={3} m={1}>
66+
<Grid size={{ xs: 3 }} m={1}>
6767
<div>{getLoadingMessage()}</div>
6868
</Grid>
6969
{connectionError && retryIn > 0 && (
70-
<Grid item xs={3} m={1}>
70+
<Grid size={{ xs: 3 }} m={1}>
7171
<div>{`${t("retrying-in")} ${retryIn} ${t("seconds")}`}</div>
7272
</Grid>
7373
)}

src/components/admin/HostsTab.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default function HostsTab() {
5353
{hosts === undefined ? (
5454
<Grid container spacing={2}>
5555
{Array.from({ length: 9 }).map((_, index) => (
56-
<Grid item xs={12} sm={6} md={4} key={index}>
56+
<Grid size={{ xs: 12, sm: 6, md: 4 }} key={index}>
5757
<Box sx={{ p: 2, borderRadius: 2 }}>
5858
<Skeleton variant="rectangular" height={140} />
5959
</Box>
@@ -73,7 +73,7 @@ export default function HostsTab() {
7373
</Typography>
7474
<Grid container spacing={2}>
7575
{enabled.map((host) => (
76-
<Grid item xs={12} sm={6} md={4} key={host.name}>
76+
<Grid size={{ xs: 12, sm: 6, md: 4 }} key={host.name}>
7777
<HostMachine
7878
host={host}
7979
specs={hostsMap[`${host.name}_${host.zone}`]}
@@ -90,7 +90,7 @@ export default function HostsTab() {
9090
</Typography>
9191
<Grid container spacing={2}>
9292
{disabled.map((host) => (
93-
<Grid item xs={12} sm={6} md={4} key={host.name}>
93+
<Grid size={{ xs: 12, sm: 6, md: 4 }} key={host.name}>
9494
<HostMachine host={host} />
9595
</Grid>
9696
))}

src/components/admin/TimeAgo.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import React, { useState, useEffect } from "react";
2-
import { Typography } from "@mui/material";
3-
import { Variant } from "@mui/material/styles/createTypography";
2+
import { Typography, TypographyVariant } from "@mui/material";
43

54
const TimeAgo: React.FC<{
65
createdAt: string | undefined;
7-
variant?: Variant | undefined;
6+
variant?: TypographyVariant | undefined;
87
}> = ({ createdAt, variant }) => {
98
const [timeAgo, setTimeAgo] = useState<string>("");
109
variant = variant != undefined ? variant : "body2";

0 commit comments

Comments
 (0)