Skip to content

Commit

Permalink
SwanSpawner: Fix nxcals spark cluster not being sent to backend
Browse files Browse the repository at this point in the history
If a user selects the NXCALS software stack, keep the spark cluster form
field enabled, so that the cluster is propagated to the backend and the
session is initialized with spark.
  • Loading branch information
PMax5 authored and etejedor committed Jun 26, 2024
1 parent e4705de commit deeeb5a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SwanSpawner/swanspawner/templates/options_form_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,19 @@
var hiddenPlatformOptions = document.getElementById('hiddenPlatformOptions');

var isAlma = platformOptions.selectedOptions[0].text.startsWith('AlmaLinux 9');
var isNXCALS = clusterOptions.selectedOptions[0].text.startsWith('BE NXCALS (NXCals)');

if (isAlma) {
/* On Alma9, make sure cluster selection is enabled and that users can
select the JupyterLab interface */
clusterOptions.removeAttribute('disabled');
jupyterLabOption.removeAttribute('disabled');
} else {
clusterOptions.setAttribute('disabled', '');
clusterOptions.selectedIndex = 0;
if (!isNXCALS) {
clusterOptions.setAttribute('disabled', '');
clusterOptions.selectedIndex = 0;
}

jupyterLabOption.setAttribute('disabled', '');
}

Expand Down

0 comments on commit deeeb5a

Please sign in to comment.