Skip to content

Commit 8bc371b

Browse files
author
Adam Paulen
committed
changes to other hub interfaces
1 parent adecdfb commit 8bc371b

File tree

21 files changed

+1393
-267
lines changed

21 files changed

+1393
-267
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ npm run storybook
5858
To build the project for production, use the following command:
5959

6060
```bash
61-
npm run build
61+
npm run build:{build_target}
6262
```
6363

6464
## Creating ConfigMaps
@@ -73,7 +73,7 @@ You can also modify the script if you only want to generate files locally instea
7373
Then execute the script:
7474

7575
```bash
76-
./create_config_maps.sh
76+
./create_config_maps.sh {build_target} or {namespace}
7777
```
7878

7979

c9088/js/FormPage.jsx

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,11 @@ const StepOne = ({ setFormData }) => {
8484
title="Persistent Notebook Home"
8585
infoText="Persistent home means that even when notebook is deleted, the data will persist and can be used again."
8686
>
87-
<DropDownButton
88-
key={0}
89-
isActive={true}
90-
primary={false}
91-
title="New"
92-
>
93-
<SliderCheckBox
94-
title="Erase if home exists"
95-
onChange={handleErase}
96-
id="phCheckId"
97-
></SliderCheckBox>
98-
<div>
99-
Mounted to
100-
<code>/home/jovyan</code>
101-
</div>
102-
</DropDownButton>
87+
<SliderCheckBox
88+
title="Erase if home exists"
89+
onChange={handleErase}
90+
id="phCheckId"
91+
> Take care of checking this button, it removes whole home directory and previous data will be lost. Use in case only when notebook is broken so it does not start, in other cases, remove data from terminal. </SliderCheckBox>
10392
</FieldHeader>
10493
</div>
10594
);
@@ -139,7 +128,7 @@ const StepThree = ({ setFormData }) => {
139128
setFormData={handleMemSelect}
140129
title="Memory"
141130
selectionText={"Select memory limit (in GB):"}
142-
numberOptions={[4, 8, 16, 32, 64, 128, 256]}
131+
numberOptions={[4, 8, 12, 16, 32, 64]}
143132
></TileSelector>
144133
</div>
145134
);

cas/custom-images/bioconductor_logo.svg

Lines changed: 247 additions & 0 deletions
Loading

cas/js/FormPage.jsx

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,11 @@ const StepOne = ({ setFormData }) => {
8484
title="Persistent Notebook Home"
8585
infoText="Persistent home means that even when notebook is deleted, the data will persist and can be used again."
8686
>
87-
<DropDownButton
88-
key={0}
89-
isActive={true}
90-
primary={false}
91-
title="New"
92-
>
93-
<SliderCheckBox
94-
title="Erase if home exists"
95-
onChange={handleErase}
96-
id="phCheckId"
97-
></SliderCheckBox>
98-
<div>
99-
Mounted to
100-
<code>/home/jovyan</code>
101-
</div>
102-
</DropDownButton>
87+
<SliderCheckBox
88+
title="Erase if home exists"
89+
onChange={handleErase}
90+
id="phCheckId"
91+
> Consider thoroughly checking this option - it removes whole home directory and all data located there (/home/jovyan/). Use only when notebook is broken so it does not start. In other cases, remove data from terminal inside the notebook. </SliderCheckBox>
10392
</FieldHeader>
10493
</div>
10594
);

cas/js/LoginPage.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ function LoginPage({ buttonText, imagePath, link }) {
77
<div className="wrapper">
88
<div className="login">
99
{imagePath && <img src={imagePath} height={"100px"} />}
10+
<p> It is necessary to be a valid member of bioconductor group to access the service. If you are not a member, you will be automatically presented an application upon login. The application will be reviewed by course professors or instructors. </p>
1011
<Button title={buttonText} link={link}></Button>
1112
</div>
1213
</div>

cas/js/login.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import AnouncmentMessage from "../../src/components/AnouncmentMessage/Anouncment
44
import { createRoot } from "react-dom/client";
55
import "@fontsource/montserrat/600.css";
66
import "./index.css";
7+
import bio_logo from "../custom-images/bioconductor_logo.svg"
78

89
const root = createRoot(document.getElementById("root"));
910
root.render(
@@ -19,6 +20,7 @@ root.render(
1920
{/*</AnouncmentMessage>*/}
2021
<LoginPage
2122
buttonText="Sign in with MUNI"
23+
imagePath={bio_logo}
2224
link="/hub/oauth_login?next="
2325
/>
2426
</div>,

create_config_maps.sh

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,55 @@
11
#!/bin/bash
22

33
if [ "$#" -ne 1 ]; then
4-
echo "Usage: $0 namespace_of_hub"
4+
echo "Usage: $0 namespace_or_build_target"
5+
echo "Example: $0 jupyterhub-dev-ns"
56
exit 1
67
fi
78

8-
NAMESPACE=$1
9+
INPUT=$1
910

10-
npm install
11-
npm run build
11+
# Define default namespace and valid build targets
12+
DEFAULT_NAMESPACE="jupyterhub-dev-ns"
13+
VALID_BUILD_TARGETS=("cas" "c9088" "hub" "elter")
1214

13-
#NAMESPACE="jupyterhub-dev-ns"
14-
BASE_DIR="./dist"
15+
# Determine if the input is a namespace or build target
16+
if [[ " ${VALID_BUILD_TARGETS[@]} " =~ " $INPUT " ]]; then
17+
BUILD_TARGET=$INPUT
18+
NAMESPACE=$DEFAULT_NAMESPACE
19+
else
20+
BUILD_TARGET="hub"
21+
NAMESPACE=$INPUT
22+
fi
23+
24+
25+
BASE_DIR="./dist_$BUILD_TARGET"
1526

27+
# Run npm commands
28+
if [ -n "$BUILD_TARGET" ]; then
29+
echo "Running build for target: $BUILD_TARGET"
30+
npm install
31+
npm run build:$BUILD_TARGET
32+
else
33+
echo "Using namespace: $NAMESPACE"
34+
npm install
35+
npm run build
36+
fi
37+
38+
# Create ConfigMaps
1639
create_configmap() {
1740
local name=$1
1841
local path=$2
1942

20-
# don't delete configmaps from cluster automatically! if ns changes, it could lead to catastrophe
21-
if [ "$NAMESPACE" = "jupyterhub-dev-ns" ]; then
43+
# Don't delete ConfigMaps from the cluster automatically
44+
if [ "$NAMESPACE" = "$DEFAULT_NAMESPACE" ]; then
2245
kubectl delete configmap $name --namespace $NAMESPACE --ignore-not-found
2346
kubectl create configmap $name --from-file=$path --namespace $NAMESPACE
2447
else
25-
# creating the ConfigMaps locally
48+
# Creating the ConfigMaps locally
2649
kubectl create configmap $name --from-file=$path --dry-run=client -o json > $name.json
2750
kubectl patch --local -f $name.json --type=json -p='[{"op": "remove", "path": "/metadata/creationTimestamp"}]' -o yaml > $name.yaml
2851
rm $name.json
2952
fi
30-
3153
}
3254

3355
create_configmap "static-files" "$BASE_DIR"

elter-ri/data/formData.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
export const images = {
22
simple: {
3-
"cerit.io/hubs/minimalnb:31-08-2023": "Minimal NB",
4-
"cerit.io/hubs/minimalnb:26-09-2024-ssh": "Minimal NB with SSH access",
5-
"cerit.io/hubs/datasciencenb:31-08-2023": "DataScience NB",
3+
"minimalnb:31-08-2023": "Minimal NB",
4+
"minimalnb:26-09-2024-ssh": "Minimal NB with SSH access",
5+
"datasciencenb:31-08-2023": "DataScience NB",
66
},
77
r: {
8-
"cerit.io/hubs/jupyterhubronly:05-02-2024": "Python 3.11 and R 4.3.1 kernels",
9-
"cerit.io/hubs/rstudio:11-08-2022-7": "RStudio with R 4.2.1",
10-
"cerit.io/hubs/rstudio:4.2.1-rsat": "RStudio with R 4.2.1 and RSAT",
11-
"cerit.io/hubs/rstudio:4.3.1": "RStudio with R 4.3.1",
12-
"cerit.io/hubs/rstudio:4.4.0": "RStudio with R 4.4.0",
8+
"jupyterhubronly:05-02-2024": "Python 3.11 and R 4.3.1 kernels",
9+
"rstudio:11-08-2022-7": "RStudio with R 4.2.1",
10+
"rstudio:4.2.1-rsat": "RStudio with R 4.2.1 and RSAT",
11+
"rstudio:4.3.1": "RStudio with R 4.3.1",
12+
"rstudio:4.4.0": "RStudio with R 4.4.0",
1313
},
1414
tf: {
15-
"cerit.io/hubs/tensorflownb:31-08-2023": "TensorFlow 2.10 (CPU only)",
16-
"cerit.io/hubs/tensorflowgpu:2.11.1": "TensorFlow 2.11.1 with GPU and TensorBoard",
17-
"cerit.io/hubs/tensorflowgpu:2.12.1": "TensorFlow 2.12.1 with GPU and TensorBoard",
18-
"cerit.io/hubs/tensorflowgpu:2.15.0": "TensorFlow 2.15.1 with GPU and TensorBoard",
15+
"tensorflownb:31-08-2023": "TensorFlow 2.10 (CPU only)",
16+
"tensorflowgpu:2.11.1": "TensorFlow 2.11.1 with GPU and TensorBoard",
17+
"tensorflowgpu:2.12.1": "TensorFlow 2.12.1 with GPU and TensorBoard",
18+
"tensorflowgpu:2.15.0": "TensorFlow 2.15.1 with GPU and TensorBoard",
1919
},
2020
matlab: {
21-
"cerit.io/hubs/matlab:r2022b": "MATLAB R2022b",
22-
"cerit.io/hubs/matlab:r2023a": "MATLAB R2023a",
21+
"matlab:r2022b": "MATLAB R2022b",
22+
"matlab:r2023a": "MATLAB R2023a",
2323
},
2424
various: {
25-
"cerit.io/hubs/cuda-ubuntu:12.0-24.04": "CUDA 12.0",
25+
"cuda-ubuntu:12.0-24.04": "CUDA 12.0",
2626
},
2727
};
2828

0 commit comments

Comments
 (0)