The table should be loaded with the tasks already assigned to the Dev Env. This can happen if the user reaches the Dev Env Settings window using the dem modify command.
The status of the table should not be saved to the dev_env.json file until the user selects the save button. If the user selects the save button the current status should be written to the dev_env.json file and the Dev Env Settings window should be closed.
The user should be able to navigate the table entries by rows. The navigation should be controlled by the arrow keys and the ‘j' and 'k’ keys.
If a task is selected and the user presses the delete key, the task should be deleted.
The lowest row’s purpose is to add new tasks. It contains 4 cells:
Task name input field: The user can enter the name for the task. This name must be unique for the Dev Env. If the user enters a name that has already been taken, an error message should be presented in the error field.
Tool Image select field: The user can select which tool image to use for the task. The available tool images should be the ones assigned to the Dev Env.
Host select field: The user can select on which host the task should run. The list of available hosts can be loaded from the platform class’s hosts variable.
Command input field: The user can enter the command to run in the container.
When the cursor selects the row to add a new task only the first cell should be highlighted. In the new task row, the user should be able to navigate horizontally using the arrow keys or vi mode. In the list, only one of the input/select fields should be selectable. If a cell is selected it doesn’t mean the user can modify it’s content. The user should press the enter key to enter modification mode. In modify mode, the user can make their modifications by either entering the text or choosing from the drop-down menu. The user has two options to exit the modification mode: pressing enter saves their modification, or pressing esc clears their modification and reloads the original value (if no previous value was selected then the default text). By returning from modification mode the user should be able to navigate again with the arrows or vi mode.
If the user selects the back button the entered tasks should be stored, but not saved to the dev_env.json file. Pressing the back button should load the Tool Image Selection tab. After returning to the Task Settings tab the stored tasks should be loaded.
Pressing cancel should close the Dev Env Settings window without saving any entered information.
Pressing save should write the Dev Env’s descriptor to the dev_env.json file and close the Dev Env Settings window.
Testing
The Task Settings window should work with both the create and modify commands.
create command
When first loaded the Task Settings should have an empty table.
modify command
When first loaded the Task Settings should load the already available tasks. The tasks are available from the dev_env class’s tasks variable.
Create the Task settings tab UI.
The layout should look like this:
Requirements
dem modify
command.save
button. If the user selects the save button the current status should be written to the dev_env.json file and the Dev Env Settings window should be closed.delete
key, the task should be deleted.enter
key to enter modification mode. In modify mode, the user can make their modifications by either entering the text or choosing from the drop-down menu. The user has two options to exit the modification mode: pressing enter saves their modification, or pressingesc
clears their modification and reloads the original value (if no previous value was selected then the default text). By returning from modification mode the user should be able to navigate again with the arrows or vi mode.back
button the entered tasks should be stored, but not saved to the dev_env.json file. Pressing theback
button should load theTool Image Selection
tab. After returning to theTask Settings
tab the stored tasks should be loaded.cancel
should close the Dev Env Settings window without saving any entered information.save
should write the Dev Env’s descriptor to the dev_env.json file and close the Dev Env Settings window.Testing
The Task Settings window should work with both the
create
andmodify
commands.create
commandWhen first loaded the Task Settings should have an empty table.
modify
commandWhen first loaded the Task Settings should load the already available tasks. The tasks are available from the dev_env class’s tasks variable.
For axem internal use only: Jira: https://axem.atlassian.net/browse/DEM-295