-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.1 rns #922
Merged
3.1 rns #922
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
dce3fc5
add globus to rns
johrstrom db2bfbf
add docs for path_selector. Also change form-widgets file format to unix
johrstrom f0363ae
add ga4 to rns
johrstrom 7aa6159
add dynamic checkboxes to rns
johrstrom 4e6a441
add docs and rns for disabling uploads & downloads
johrstrom b16ce13
add custom_javascript_files to rns
johrstrom f6b3691
add docs for completed.html.erb and restructure this a bit to accomid…
johrstrom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
source/how-tos/app-development/interactive/additional-info.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.. _app-development-interactive-additional-info: | ||
|
||
Adding Additional Information to the session cards | ||
================================================== | ||
|
||
.. _bc_info_html_md_erb: | ||
|
||
info.{md,html}.erb | ||
------------------ | ||
|
||
It's possible for you to add additional information to this session's card. | ||
|
||
You can do so by creating a Markdown file ``info.md.erb`` or an html file | ||
``info.html.erb`` in the applications folder. Markdown files get generated | ||
into html with # turning into an <h1> and ## turning into an <h2> and so on. | ||
|
||
Again, they're `eRuby (Embedded Ruby)`_ files so you can add some dynamic behavior | ||
to them. Along with any library you may choose to use you can also access these | ||
variables directly. | ||
|
||
id | ||
The session UUID of the job | ||
cluster_id | ||
The cluster the job was submitted to | ||
job_id | ||
The job id from the scheduler | ||
created_at | ||
The time the session was created | ||
|
||
|
||
.. _bc_completed_html_md_erb: | ||
|
||
completed.{md,html}.erb | ||
------------------------ | ||
|
||
:ref:`bc_info_html_md_erb` above will display on the session's card | ||
regardless of the state of the job - it will always be displayed. | ||
|
||
``completed.{md,html}.erb`` on the other hand, will only display | ||
once the job has reached the ``completed`` state. | ||
|
||
You may want to add this to the session's card to display information | ||
to the user when the job is completed. Again, as it's `eRuby (Embedded Ruby)`_ | ||
files so you can add some dynamic behavior to them. | ||
|
||
|
||
.. _eruby (embedded ruby): https://en.wikipedia.org/wiki/ERuby |
285 changes: 157 additions & 128 deletions
285
source/how-tos/app-development/interactive/form-widgets.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,128 +1,157 @@ | ||
.. _form-widgets: | ||
|
||
Form Widgets | ||
============ | ||
Checkbox (check_box) | ||
A checkbox. Note that you can change the checked and unchecked values. For example changing | ||
them from ``1`` and ``0`` to ``yes`` and ``no``. | ||
|
||
.. code-block:: yaml | ||
|
||
test_checkbox: | ||
widget: check_box | ||
checked_value: 1 | ||
unchecked_value: 0 | ||
label: "Test Checkbox" | ||
help: | | ||
Your help message | ||
|
||
================================================================== | ||
|
||
Hidden Field (hidden_field) | ||
A hidden field that will not be shown, but will still be in the HTML. | ||
|
||
.. code-block:: yaml | ||
|
||
test_hidden_field: | ||
widget: "hidden_field" | ||
value: "Test Hidden Field Value" | ||
|
||
================================================================== | ||
|
||
Number Field (number_field) | ||
A number field. | ||
|
||
.. code-block:: yaml | ||
|
||
num_cores: | ||
widget: "number_field" | ||
label: "Number of cores" | ||
value: 1 | ||
help: | | ||
Your help message | ||
min: 1 | ||
max: 28 | ||
step: 1 | ||
|
||
================================================================== | ||
|
||
Radio Button (radio_button) | ||
Note that in the options below, the text to display is on the left of the comma, and the select value is on the right of the comma. | ||
The value: key represents the default selection. | ||
|
||
.. code-block:: yaml | ||
|
||
mode: | ||
widget: "radio_button" | ||
value: "1" | ||
help: | | ||
Your help message | ||
options: | ||
- ["Jupyter Lab", "1"] | ||
- ["Jupyter Notebook", "0"] | ||
|
||
================================================================== | ||
|
||
Resolution Field (resolution_field) | ||
Change the resolution for interactive applications that use VNC. | ||
|
||
.. code-block:: yaml | ||
|
||
test_resolution_field: | ||
widget: "resolution_field" | ||
label: "Test Resolution Field" | ||
required: true | ||
help: | | ||
Your help message | ||
|
||
================================================================== | ||
|
||
Select Field (select) | ||
Note that in the options below, the text to display is on the left of the comma, and the select value is on the right of the comma. | ||
|
||
.. code-block:: yaml | ||
|
||
version: | ||
widget: "select" | ||
label: "JupyterLab Version" | ||
options: | ||
- [ "3.0", "app_jupyter/3.0.17" ] | ||
- [ "2.3", "app_jupyter/2.3.2" ] | ||
- [ "2.2", "app_jupyter/2.2.10" ] | ||
- [ "1.2", "app_jupyter/1.2.21" ] | ||
help: | | ||
Your help message | ||
|
||
================================================================== | ||
|
||
TextArea Field (text_area) | ||
A text area. This allows for multiple lines of text input. | ||
|
||
.. code-block:: yaml | ||
|
||
test_text_area: | ||
widget: "text_area" | ||
label: "Test Text Area" | ||
value: "Test Text Area Value" | ||
help: | | ||
Your help message | ||
|
||
================================================================== | ||
|
||
Text Field (text_field) | ||
A text field. This only allows for a single line of text input. | ||
|
||
.. code-block:: yaml | ||
|
||
test_text_field: | ||
widget: "text_field" | ||
label: "Test Text Field" | ||
value: "Test Text Value" | ||
help: | | ||
Your help message | ||
|
||
================================================================== | ||
|
||
|
||
|
||
.. _markdown: https://en.wikipedia.org/wiki/Markdown | ||
.. _form-widgets: | ||
|
||
Form Widgets | ||
============ | ||
Checkbox (check_box) | ||
A checkbox. Note that you can change the checked and unchecked values. For example changing | ||
them from ``1`` and ``0`` to ``yes`` and ``no``. | ||
|
||
.. code-block:: yaml | ||
|
||
test_checkbox: | ||
widget: check_box | ||
checked_value: 1 | ||
unchecked_value: 0 | ||
label: "Test Checkbox" | ||
help: | | ||
Your help message | ||
|
||
================================================================== | ||
|
||
Hidden Field (hidden_field) | ||
A hidden field that will not be shown, but will still be in the HTML. | ||
|
||
.. code-block:: yaml | ||
|
||
test_hidden_field: | ||
widget: "hidden_field" | ||
value: "Test Hidden Field Value" | ||
|
||
================================================================== | ||
|
||
Number Field (number_field) | ||
A number field. | ||
|
||
.. code-block:: yaml | ||
|
||
num_cores: | ||
widget: "number_field" | ||
label: "Number of cores" | ||
value: 1 | ||
help: | | ||
Your help message | ||
min: 1 | ||
max: 28 | ||
step: 1 | ||
|
||
================================================================== | ||
|
||
Radio Button (radio_button) | ||
Note that in the options below, the text to display is on the left of the comma, and the select value is on the right of the comma. | ||
The value: key represents the default selection. | ||
|
||
.. code-block:: yaml | ||
|
||
mode: | ||
widget: "radio_button" | ||
value: "1" | ||
help: | | ||
Your help message | ||
options: | ||
- ["Jupyter Lab", "1"] | ||
- ["Jupyter Notebook", "0"] | ||
|
||
================================================================== | ||
|
||
Resolution Field (resolution_field) | ||
Change the resolution for interactive applications that use VNC. | ||
|
||
.. code-block:: yaml | ||
|
||
test_resolution_field: | ||
widget: "resolution_field" | ||
label: "Test Resolution Field" | ||
required: true | ||
help: | | ||
Your help message | ||
|
||
================================================================== | ||
|
||
Select Field (select) | ||
Note that in the options below, the text to display is on the left of the comma, and the select value is on the right of the comma. | ||
|
||
.. code-block:: yaml | ||
|
||
version: | ||
widget: "select" | ||
label: "JupyterLab Version" | ||
options: | ||
- [ "3.0", "app_jupyter/3.0.17" ] | ||
- [ "2.3", "app_jupyter/2.3.2" ] | ||
- [ "2.2", "app_jupyter/2.2.10" ] | ||
- [ "1.2", "app_jupyter/1.2.21" ] | ||
help: | | ||
Your help message | ||
|
||
================================================================== | ||
|
||
TextArea Field (text_area) | ||
A text area. This allows for multiple lines of text input. | ||
|
||
.. code-block:: yaml | ||
|
||
test_text_area: | ||
widget: "text_area" | ||
label: "Test Text Area" | ||
value: "Test Text Area Value" | ||
help: | | ||
Your help message | ||
|
||
================================================================== | ||
|
||
Text Field (text_field) | ||
A text field. This only allows for a single line of text input. | ||
|
||
.. code-block:: yaml | ||
|
||
test_text_field: | ||
widget: "text_field" | ||
label: "Test Text Field" | ||
value: "Test Text Value" | ||
help: | | ||
Your help message | ||
|
||
.. _path_selector: | ||
|
||
================================================================== | ||
|
||
Path Selector (path_selector) | ||
Comment on lines
+124
to
+128
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
A Path Selector. This is a special OnDemand feature that is not | ||
directly an HTML input type. It builds a ``text_field`` input | ||
type, but also provides a button that will provide a modal that | ||
allows users to navigate through directories to select a path. | ||
|
||
This is useful in forms where a path must be selected and you | ||
want to allow your users to choose an arbirary path. | ||
|
||
``directory`` is the initial directory the path selector will open | ||
to when the users opens the modal. This defaults to the users' HOME. | ||
|
||
``show_hidden`` is a boolean flag to show hidden files or not. This | ||
defaults to false - it will not show hidden files. | ||
|
||
``show_files`` is a boolean flag to show files or not. This defaults | ||
to true - it will show files. | ||
|
||
.. code-block:: yaml | ||
|
||
path: | ||
widget: "path_selector" | ||
directory: "/fs/ess/project" | ||
show_hidden: true | ||
show_files: false | ||
|
||
================================================================== | ||
|
||
|
||
.. _markdown: https://en.wikipedia.org/wiki/Markdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was dos encoded, so that's why it looks like it has so many changes.