diff --git a/SwanSpawner/swanspawner/templates/options_form_template.html b/SwanSpawner/swanspawner/templates/options_form_template.html index acb28b8..c9199c0 100644 --- a/SwanSpawner/swanspawner/templates/options_form_template.html +++ b/SwanSpawner/swanspawner/templates/options_form_template.html @@ -144,6 +144,10 @@ for( var i = 0 ; i < lcgData.clusters.length ; i++ ){ var lcgCluster = lcgData.clusters[i]; + if (lcgCluster.value === "k8s" && lcgCluster.value === "hadoop-qa") { + continue; + } + var selectClusterOption = document.createElement("option"); selectClusterOption.value = lcgCluster.value; selectClusterOption.text = lcgCluster.text; @@ -177,19 +181,36 @@ */ function adjust_spark() { var platformOptions = document.getElementById('platformOptions'); - var clusterOptions = document.getElementById('clusterOptions'); + + function removeCluster(cluster) { + var clusterOptions = document.getElementById('clusterOptions'); + for (var i = 0; i < clusterOptions.options.length; i++) { + if (clusterOptions.options[i].value === cluster) { + clusterOptions.remove(i); + break; + } + } + } + + function addCluster(clusterValue, clusterName) { + var selectClusterOption = document.createElement("option"); + selectClusterOption.value = clusterValue; + selectClusterOption.text = clusterName; + clusterOptions.add(selectClusterOption); + } var isAlma = platformOptions.selectedOptions[0].text.startsWith('AlmaLinux 9'); if (isAlma) { - // Disable Spark cluster selection, since Spark is still not supported - // on Alma9 - clusterOptions.setAttribute('disabled', ''); clusterOptions.selectedIndex = 0; + removeCluster("analytix") + addCluster("k8s", "Cloud Containers (K8s)") + addCluster("hadoop-qa", "QA") } else { - // On CentOS7, make sure cluster selection is enabled - clusterOptions.removeAttribute('disabled'); + addCluster("analytix", "General Purpose (Analytix)") + removeCluster("k8s") + removeCluster("hadoop-qa") } }