Commit 3eb9a0d3 authored by Philip ABBET's avatar Philip ABBET
Browse files

[experiments] Always propose the highest version of an execution Python environment by default

parent 3dc343b5
......@@ -1509,7 +1509,8 @@ beat.experiments.panels.Parameters.prototype.initialize = function(configuration
var iterator = this.environments.iterator();
var selected_environment_index = null;
var first_python_environment_index = null;
var python_environment_index = null;
var python_environment = null;
var default_environment = this.configuration.defaultEnvironment();
if (default_environment !== null)
......@@ -1533,8 +1534,17 @@ beat.experiments.panels.Parameters.prototype.initialize = function(configuration
selected_environment_index = environment_selector.children.length;
}
if ((first_python_environment_index === null) && (environment.languages.indexOf('python') >= 0))
first_python_environment_index = environment_selector.children.length;
if ((python_environment_index === null) && (environment.languages.indexOf('python') >= 0))
{
python_environment_index = environment_selector.children.length;
python_environment = environment;
}
else if ((python_environment_index !== null) && (python_environment.name == environment.name) &&
(python_environment.version < environment.version))
{
python_environment_index = environment_selector.children.length;
python_environment = environment;
}
environment_selector.appendChild(option);
selector_counter += 1;
......@@ -1542,8 +1552,8 @@ beat.experiments.panels.Parameters.prototype.initialize = function(configuration
if (selected_environment_index === null)
{
if (first_python_environment_index !== null)
selected_environment_index = first_python_environment_index;
if (python_environment_index !== null)
selected_environment_index = python_environment_index;
else
selected_environment_index = 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment