Skip to content

Commit d4fdaf9

Browse files
authored
Merge pull request #353 from kthcloud/maiaa-integration
Maiaa integration
2 parents 2c15a7b + 5c167e1 commit d4fdaf9

13 files changed

Lines changed: 282 additions & 22 deletions

File tree

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ public/_redirects
1111
package.json
1212
package-lock.json
1313
bun.lockb
14-
*.xcf
14+
*.xcf
15+
*.glb

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,30 @@ Welcome to the kthcloud/console repository! This project is the web console for
44

55
## Table of Contents
66

7-
- [☁️ kthcloud/console](#️-kthcloudconsole)
8-
- [Table of Contents](#table-of-contents)
9-
- [External dependencies](#external-dependencies)
10-
- [Setup](#setup)
11-
- [Contributing](#contributing)
12-
- [Locales and translations](#locales-and-translations)
13-
- [Other languages](#other-languages)
14-
- [Formatting](#formatting)
15-
- [License](#license)
7+
- [☁️ kthcloud/console](#️-kthcloudconsole)
8+
- [Table of Contents](#table-of-contents)
9+
- [External dependencies](#external-dependencies)
10+
- [Setup](#setup)
11+
- [Contributing](#contributing)
12+
- [Locales and translations](#locales-and-translations)
13+
- [Other languages](#other-languages)
14+
- [Formatting](#formatting)
15+
- [License](#license)
1616

1717
## External dependencies
1818

1919
console uses these services for its functionality.
2020

2121
kthcloud maintained:
2222

23-
- [go-deploy](https://github.com/kthcloud/go-deploy): Backend for creation, and management of resources
24-
- [alert](https://alert.app.cloud.cbh.kth.se/): Provides alerts
25-
- [kthcloud iam](https://iam.cloud.cbh.kth.se): Provides user auth
23+
- [go-deploy](https://github.com/kthcloud/go-deploy): Backend for creation, and management of resources
24+
- [alert](https://alert.app.cloud.cbh.kth.se/): Provides alerts
25+
- [kthcloud iam](https://iam.cloud.cbh.kth.se): Provides user auth
2626

2727
External:
2828

29-
- [Gravatar](https://gravatar.com): Provides user avatars
30-
- [Google Fonts](https://fonts.google.com): Provides fonts
29+
- [Gravatar](https://gravatar.com): Provides user avatars
30+
- [Google Fonts](https://fonts.google.com): Provides fonts
3131

3232
## Setup
3333

bun.lockb

29.6 KB
Binary file not shown.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"@types/punycode": "^2.1.4",
3030
"@types/three": "^0.164.1",
3131
"apexcharts": "^3.49.1",
32+
"bun": "^1.2.22",
3233
"change-case": "^5.4.4",
3334
"crypto-js": "^4.2.0",
3435
"http-status-codes": "^2.3.0",
@@ -65,13 +66,13 @@
6566
"@typescript-eslint/parser": "^7.13.0",
6667
"@vitejs/plugin-react": "^4.3.1",
6768
"@vitejs/plugin-react-swc": "^3.7.0",
68-
"eslint": "^9.4.0",
69+
"eslint": "^9.35.0",
6970
"eslint-plugin-react": "^7.34.2",
7071
"eslint-plugin-react-hooks": "^4.6.2",
7172
"eslint-plugin-react-refresh": "^0.4.7",
72-
"prettier": "^3.3.2",
73+
"prettier": "^3.6.2",
7374
"prettier-plugin-nginx": "^1.0.3",
7475
"typescript": "^5.4.5",
75-
"vite": "^5.3.0"
76+
"vite": "^7.1.6"
7677
}
77-
}
78+
}

public/static/models/Brain.glb

34 MB
Binary file not shown.

src/api/deploy/systemCapacities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ export const getSystemCapacities = async (
2525
throw res;
2626
}
2727
const cap = await res.json();
28-
return cap.length > 0 ? cap[0]?.capacities ?? undefined : undefined;
28+
return cap.length > 0 ? (cap[0]?.capacities ?? undefined) : undefined;
2929
};

src/locales/en.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,10 @@
555555
"unschedulable": "Unschedulable",
556556
"schedulable": "Schedulable",
557557
"schedulable-description": "The last time this node reported its status, it was schedulable in the Kubernetes cluster",
558-
"unschedulable-description": "The last time this node reported its status, it was unschedulable in the Kubernetes cluster"
558+
"unschedulable-description": "The last time this node reported its status, it was unschedulable in the Kubernetes cluster",
559+
"maia-intro-body": "Are you a researcher or student in biomedical engineering at KTH who needs state-of-the-art deep learning resources and compute? MAIA is the platform for developing, testing, and deploying medical AI, from early prototypes to real clinical workflows. You get straightforward access to compute via JupyterHub, SSH, or a virtual desktop. Our infrastructure, provided jointly with KTH Cloud, scales to different computational needs. Designed for collaboration and integration with hospital systems, MAIA lets you validate ideas and pilot your solutions in real-world clinical settings.",
560+
"maia-intro-footer": "Request a MAIA account today and register a project to start building your medical AI solution.",
561+
"maia-intro-header": "Discover ",
562+
"button-get-started-maia": "Get started with MAIA"
559563
}
560564
}

src/locales/se.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,8 @@
464464
"joinedAt": "Gick med",
465465
"addedAt": "Lades till",
466466
"jobRestarted": "Jobb startat om",
467+
"maia": "MAIA",
468+
"maia-text": "BLA BLA BLA",
467469
"funding-provided-by": "kthcloud samarbetar med och stöttas av många organisationer. Finansiellt stöd har vi fått från ",
468470
"the": " ",
469471
"program-and-the": "programmet och ",
@@ -554,6 +556,10 @@
554556
"unschedulable": "Oschemaläggningsbar",
555557
"schedulable": "Schemaläggningsbar",
556558
"schedulable-description": "Senast denna nod rapporterade sin status var den schemaläggningsbar i Kubernetes-klustret",
557-
"unschedulable-description": "Senast denna nod rapporterade sin status var den oschemaläggningsbar i Kubernetes-klustret"
559+
"unschedulable-description": "Senast denna nod rapporterade sin status var den oschemaläggningsbar i Kubernetes-klustret",
560+
"maia-intro-body": "Är du forskare eller student inom medicinsk teknik på KTH och behöver tillgång till datorresurser för deep learning och simuleringar? MAIA är en plattform för att utveckla, testa och implementera medicinsk AI, från tidiga prototyper till kliniska arbetsflöden. Du får åtkomst till beräkningsresurser via JupyterHub, SSH eller en virtual desktop. Vår infrastruktur, som tillhandahålls tillsammans med KTH Cloud, kan möta olika typer av behov för beräkningsresurser. MAIA är utformad för samarbete och integration med sjukhussystem och gör det möjligt för dig att validera idéer och testa dina lösningar även i kliniska miljöer.",
561+
"maia-intro-footer": "Skapa ett MAIA-konto redan idag och registrera ett projekt",
562+
"maia-intro-header": "Testa ",
563+
"button-get-started-maia": "Kom igång med MAIA"
558564
}
559565
}

src/pages/landing/Landing.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Box, Container } from "@mui/material";
55
import { useKeycloak } from "@react-keycloak/web";
66
import LoadingPage from "../../components/LoadingPage";
77
import Funding from "./components/funding/Funding";
8+
import Maia from "./components/maia/Maia";
89
import { AlertList } from "../../components/AlertList";
910
import { useContext, useEffect } from "react";
1011
import { AuthContextWrapper } from "../../contexts/AuthContextWrapper";
@@ -40,6 +41,7 @@ export function Landing() {
4041

4142
<Hero />
4243
<Intro />
44+
<Maia />
4345
<Funding />
4446
</Page>
4547
);
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* eslint-disable react/no-unknown-property */
2+
import { Canvas } from "@react-three/fiber";
3+
import { BrainMesh } from "./BrainMesh";
4+
import * as THREE from "three";
5+
6+
export function Brain({
7+
mobile,
8+
position,
9+
}: {
10+
mobile: boolean;
11+
position: number[];
12+
}) {
13+
return (
14+
<Canvas
15+
style={
16+
mobile
17+
? { height: "250px", width: "100%" }
18+
: {
19+
position: "absolute",
20+
top: "0",
21+
left: "0",
22+
height: "100%",
23+
width: "100%",
24+
}
25+
}
26+
>
27+
<ambientLight intensity={0.5} />
28+
<directionalLight position={[5, 5, 5]} intensity={2} color={"#fffecc"} />
29+
<directionalLight position={[5, -5, 5]} intensity={1} color={"#faa"} />
30+
<directionalLight position={[-5, 5, 5]} intensity={1} color={"#aaf"} />
31+
32+
<BrainMesh
33+
mobile={mobile}
34+
position={position}
35+
props={{
36+
material: new THREE.MeshBasicMaterial({
37+
color: "yellow",
38+
}),
39+
}}
40+
/>
41+
</Canvas>
42+
);
43+
}

0 commit comments

Comments
 (0)