Skip to content

Commit

Permalink
[ci skip] Autodoc commit for 01b8de6dc2ed3ca033d000b238e551176ec941f3.
Browse files Browse the repository at this point in the history
  • Loading branch information
oscwiag committed Nov 20, 2024
1 parent e131be7 commit 4a6e187
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 3 deletions.
44 changes: 44 additions & 0 deletions develop/_sources/how-tos/app-development/interactive/form.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ This is the full list of items with details, you may supply to this yaml file to

whether or not the application is cacheable or not. Defaults to true.

.. _bc_form_attributes:

Attributes
----------

Expand Down Expand Up @@ -811,5 +813,47 @@ The last option is to :ref:`configure the cluster in the submit file <configurin
When using this option, there's no need to add any cluster configuration to the
form.yml.

.. _global_bc_form_items:

Global Batch Connect Form Items
-------------------------------

Since version 4.0, you can define form items once in an ``ondemand.d`` file
that can be used in all batch connect applications.

.. warning::

Global batch connect items need to have the prefix ``global_`` otherwise
OnDemand won't recognize it as a global configuration.


Defining a global batch connect form item is just like specifying :ref:`bc_form_attributes`
above. Only the location is in an ``ondemand.d`` file in ``/etc/ood/config/ondemand.d``
under the ``global_bc_form_items`` key.

Here's an example of defining a select widget with options called ``global_queues``.
Note the appropriate previx of ``global``.

.. code-block:: yaml
# /etc/ood/config/ondemand.d/global_bc_items.yml
global_bc_form_items:
global_queues:
widget: select
options:
- [ 'any', 'any' ]
- [ 'gpu', 'gpu' ]
- [ 'special', 'special', data-option-for-cluster-not-special: false ]
Then to use this form item, one simply needs to specify it in the ``form`` section
of the file and it will display the select widget defined above.

.. code-block:: yaml
# form.yml
form:
- global_queues
.. _markdown: https://en.wikipedia.org/wiki/Markdown
.. _html form: https://en.wikipedia.org/wiki/Form_(HTML)
11 changes: 11 additions & 0 deletions develop/_sources/release-notes/v4.0-release-notes.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Administrative changes
New Features
------------

- `Global Batch Connect items`_

Thanks!
-------

Expand Down Expand Up @@ -92,3 +94,12 @@ Upgrade directions

Details of new features
-----------------------

Global Batch Connect items
..........................

In 4.0 you can now define batch connect form items
in ondemand.d files to be used in any batch connect
application.

See :ref:`global_bc_form_items` for more details.
1 change: 1 addition & 0 deletions develop/how-tos/app-development/interactive.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="interactive/form.html#configuring-which-cluster-to-submit-to">Configuring which cluster to submit to</a></li>
<li class="toctree-l2"><a class="reference internal" href="interactive/form.html#global-batch-connect-form-items">Global Batch Connect Form Items</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="interactive/form-widgets.html">Form Widgets</a></li>
Expand Down
36 changes: 35 additions & 1 deletion develop/how-tos/app-development/interactive/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
<li class="toctree-l4"><a class="reference internal" href="#attributes">Attributes</a></li>
<li class="toctree-l4"><a class="reference internal" href="#examples">Examples</a></li>
<li class="toctree-l4"><a class="reference internal" href="#configuring-which-cluster-to-submit-to">Configuring which cluster to submit to</a></li>
<li class="toctree-l4"><a class="reference internal" href="#global-batch-connect-form-items">Global Batch Connect Form Items</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="form-widgets.html">Form Widgets</a></li>
Expand Down Expand Up @@ -330,7 +331,7 @@ <h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to

</div>
<div class="section" id="attributes">
<h2>Attributes<a class="headerlink" href="#attributes" title="Permalink to this headline"></a></h2>
<span id="bc-form-attributes"></span><h2>Attributes<a class="headerlink" href="#attributes" title="Permalink to this headline"></a></h2>
<p>Attributes are <em>variables</em> whose values can be set either by the user from
within an HTML form or hard-coded to a specific value in the form
configuration. These attributes and their corresponding values are then made
Expand Down Expand Up @@ -956,6 +957,39 @@ <h3>Customize User-defined Attributes<a class="headerlink" href="#customize-user
When using this option, there’s no need to add any cluster configuration to the
form.yml.</p>
</div>
<div class="section" id="global-batch-connect-form-items">
<span id="global-bc-form-items"></span><h2>Global Batch Connect Form Items<a class="headerlink" href="#global-batch-connect-form-items" title="Permalink to this headline"></a></h2>
<p>Since version 4.0, you can define form items once in an <code class="docutils literal notranslate"><span class="pre">ondemand.d</span></code> file
that can be used in all batch connect applications.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Global batch connect items need to have the prefix <code class="docutils literal notranslate"><span class="pre">global_</span></code> otherwise
OnDemand won’t recognize it as a global configuration.</p>
</div>
<p>Defining a global batch connect form item is just like specifying <a class="reference internal" href="#bc-form-attributes"><span class="std std-ref">Attributes</span></a>
above. Only the location is in an <code class="docutils literal notranslate"><span class="pre">ondemand.d</span></code> file in <code class="docutils literal notranslate"><span class="pre">/etc/ood/config/ondemand.d</span></code>
under the <code class="docutils literal notranslate"><span class="pre">global_bc_form_items</span></code> key.</p>
<p>Here’s an example of defining a select widget with options called <code class="docutils literal notranslate"><span class="pre">global_queues</span></code>.
Note the appropriate previx of <code class="docutils literal notranslate"><span class="pre">global</span></code>.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># /etc/ood/config/ondemand.d/global_bc_items.yml</span><span class="w"></span>

<span class="nt">global_bc_form_items</span><span class="p">:</span><span class="w"></span>
<span class="w"> </span><span class="nt">global_queues</span><span class="p">:</span><span class="w"></span>
<span class="w"> </span><span class="nt">widget</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">select</span><span class="w"></span>
<span class="w"> </span><span class="nt">options</span><span class="p">:</span><span class="w"></span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="w"> </span><span class="s">&#39;any&#39;</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">&#39;any&#39;</span><span class="w"> </span><span class="p p-Indicator">]</span><span class="w"></span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="w"> </span><span class="s">&#39;gpu&#39;</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">&#39;gpu&#39;</span><span class="w"> </span><span class="p p-Indicator">]</span><span class="w"></span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="w"> </span><span class="s">&#39;special&#39;</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">&#39;special&#39;</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">data-option-for-cluster-not-special</span><span class="p p-Indicator">:</span><span class="w"> </span><span class="nv">false</span><span class="w"> </span><span class="p p-Indicator">]</span><span class="w"></span>
</pre></div>
</div>
<p>Then to use this form item, one simply needs to specify it in the <code class="docutils literal notranslate"><span class="pre">form</span></code> section
of the file and it will display the select widget defined above.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># form.yml</span><span class="w"></span>
<span class="nt">form</span><span class="p">:</span><span class="w"></span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">global_queues</span><span class="w"></span>
</pre></div>
</div>
</div>
</div>


Expand Down
Binary file modified develop/objects.inv
Binary file not shown.
15 changes: 14 additions & 1 deletion develop/release-notes/v4.0-release-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@
<li class="toctree-l4"><a class="reference internal" href="#upgrade-directions">Upgrade directions</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#details-of-new-features">Details of new features</a></li>
<li class="toctree-l3"><a class="reference internal" href="#details-of-new-features">Details of new features</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#global-batch-connect-items">Global Batch Connect items</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="v3.1-release-notes.html">v3.1 Release Notes</a></li>
Expand Down Expand Up @@ -236,6 +239,9 @@ <h2>Administrative changes<a class="headerlink" href="#administrative-changes" t
</div>
<div class="section" id="new-features">
<h2>New Features<a class="headerlink" href="#new-features" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p><a class="reference internal" href="#global-batch-connect-items">Global Batch Connect items</a></p></li>
</ul>
</div>
<div class="section" id="thanks">
<h2>Thanks!<a class="headerlink" href="#thanks" title="Permalink to this headline"></a></h2>
Expand Down Expand Up @@ -334,6 +340,13 @@ <h3>Upgrade directions<a class="headerlink" href="#upgrade-directions" title="Pe
</div>
<div class="section" id="details-of-new-features">
<h2>Details of new features<a class="headerlink" href="#details-of-new-features" title="Permalink to this headline"></a></h2>
<div class="section" id="global-batch-connect-items">
<h3>Global Batch Connect items<a class="headerlink" href="#global-batch-connect-items" title="Permalink to this headline"></a></h3>
<p>In 4.0 you can now define batch connect form items
in ondemand.d files to be used in any batch connect
application.</p>
<p>See <a class="reference internal" href="../how-tos/app-development/interactive/form.html#global-bc-form-items"><span class="std std-ref">Global Batch Connect Form Items</span></a> for more details.</p>
</div>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion develop/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 4a6e187

Please sign in to comment.