playbooks/roles/ood-applications/files/bc_codeserver/form.yml.erb (31 lines of code) (raw):
<%-
node_arrays = YAML.load_file("/etc/ood/config/apps/bc_desktop/config/node_arrays.yml")
-%>
---
cluster: "ondemand"
form:
- bc_num_hours
- slot_type
- working_dir
attributes:
bc_num_hours:
widget: "number_field"
label: "Maximum duration of your remote session in hours"
value: 1
help: |
This is the maximum duration of your session.
min: 1
max: 48
step: 1
slot_type:
widget: select
options:
<%- node_arrays.each do |slot_type| %>
- '<%= slot_type["name"]%>'
<%- end %>
working_dir:
label: "Working Directory"
data-filepicker: true
data-target-file-type: dirs # Valid values are: files, dirs, or both
readonly: false
help: "Select your project directory; defaults to $HOME"