I’m trying to design a customized VNC application based on the bc_desktop that has two features:
A user selects a queue from a drop-down
Based on the queue selected, the user can then select a specific node name to launch a VNC session on.
I’ve modified my form.yml as follows, but I’m wondering if there are any examples that are similar or if this is even possible. The challenge is that if we let the user pick the queue and node name it is likely that they would pick an incompatible combination.
You can add data- attributes. One allows you to hide custom_nodeentirely (data-hide-) and another allows you to hide some of custom_node’s options (data-option-for-)
Thanks, Jeff - that’s very helpful! Just one quick clarification from my example above. If I want to do an attribute for a specific node to only be available in the “devel” queue, do I need to specify both the true and false states as I’ve done here for hawksbill1?
custom_queue:
label: Queue
help: Please select a queue from the drop-down.
widget: select
options:
- [ "devel", "devel" ]
- [ "production", "prod" ]
custom_node:
label: Node
help: Please select a node from the drop-down.
widget: select
options:
- [ "hawksbill1", "hawksbill1", data-option-for-custom-queue-devel: true, data-option-for-custom-queue-prod: false ]
- [ "hawksbill2", "hawksbill2", data-option-for-custom-queue-prod: true ]
submit: "submit/submit.yml.erb"
Setting data-option-for- to true doesn’t do anything, so no. By default, everything is an option for everything else (true) so there’s no need to set it.
Hi @jeff.ohrstrom - apologies for the late reply. I did implement this but I’m not seeing the switching behavior, as I might expect. Is there any log I can check to see what is happening behind the scenes? The updated form.yml looks as follows: