Skip to content

Commit a46b703

Browse files
mathis-marcotteMathis Marcotte
andauthored
added serverType check for custom image (#213)
* added serverType check for custom image --------- Co-authored-by: Mathis Marcotte <[email protected]>
1 parent 2e8cadf commit a46b703

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

frontend/jupyter/src/app/pages/form/form-default/form-default.component.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,19 @@ export class FormDefaultComponent implements OnInit, OnDestroy {
127127
notebook.image = notebook.imageGroupThree;
128128
}
129129

130+
// Set serverType for custom image
131+
if (notebook.customImageCheck) {
132+
if(notebook.image.match(/\/rstudio:/)){
133+
notebook.serverType = 'group-one';
134+
}else if(notebook.image.match(/\/remote-desktop:/)){
135+
notebook.serverType = 'group-two';
136+
}else if(notebook.image.match(/\/sas:/)){
137+
notebook.serverType = 'group-three';
138+
}else{
139+
notebook.serverType = 'jupyter';
140+
}
141+
}
142+
130143
// Remove unnecessary images from the request sent to the backend
131144
delete notebook.imageGroupOne;
132145
delete notebook.imageGroupTwo;

0 commit comments

Comments
 (0)