Skip to content

Commit

Permalink
deploy: c5b5688
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardusrendy committed Aug 6, 2024
1 parent 8d90bf0 commit 1ca9257
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 47 deletions.
25 changes: 21 additions & 4 deletions _modules/alab_management/lab_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,16 @@ <h1>Source code for alab_management.lab_view</h1><div class="highlight"><pre>
<div class="viewcode-block" id="LabView.request_user_input">
<a class="viewcode-back" href="../../alab_management.lab_view.html#alab_management.lab_view.LabView.request_user_input">[docs]</a>
<span class="k">def</span> <span class="nf">request_user_input</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">prompt</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">options</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Request user input from the user. This function will block until the user inputs something. Returns the</span>
<span class="sd"> value returned by the user.</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Request user input from the user. This function will block until the user inputs something.</span>

<span class="sd"> Args:</span>
<span class="sd"> prompt (str): The prompt to display to the user.</span>
<span class="sd"> options (list[str]): A list of options to display to the user.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> response (str): The value returned by the user (from the buttons).</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">request_user_input</span><span class="p">(</span><span class="n">task_id</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">task_id</span><span class="p">,</span> <span class="n">prompt</span><span class="o">=</span><span class="n">prompt</span><span class="p">,</span> <span class="n">options</span><span class="o">=</span><span class="n">options</span><span class="p">)</span></div>

Expand All @@ -689,8 +697,17 @@ <h1>Source code for alab_management.lab_view</h1><div class="highlight"><pre>
<span class="k">def</span> <span class="nf">request_user_input_with_note</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span> <span class="n">prompt</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">options</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Request user input from the user. This function will block until the user inputs something. Returns the</span>
<span class="sd"> value returned by the user and the note.</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Request user input from the user. This function will block until the user inputs something.</span>

<span class="sd"> Args:</span>
<span class="sd"> prompt (str): The prompt to display to the user.</span>
<span class="sd"> options (list[str]): A list of options to display to the user.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> response (str): The value returned by the user (from the buttons).</span>
<span class="sd"> note (str): The note returned by the user.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">request_user_input_with_note</span><span class="p">(</span>
<span class="n">task_id</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">task_id</span><span class="p">,</span> <span class="n">prompt</span><span class="o">=</span><span class="n">prompt</span><span class="p">,</span> <span class="n">options</span><span class="o">=</span><span class="n">options</span>
Expand Down
43 changes: 27 additions & 16 deletions _modules/alab_management/user_input.html
Original file line number Diff line number Diff line change
Expand Up @@ -554,12 +554,15 @@ <h1>Source code for alab_management.user_input</h1><div class="highlight"><pre>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Request user input through the dashboard. Blocks until response is given.</span>

<span class="sd"> task_id (ObjectId): task id requesting user input</span>
<span class="sd"> prompt (str): prompt to give user</span>
<span class="sd"> options (List[str]): response options to give user</span>
<span class="sd"> maintenance (bool): if true, mark this as a request for overall system maintenance</span>

<span class="sd"> Returns user response as string.</span>
<span class="sd"> Args:</span>
<span class="sd"> task_id (ObjectId): task id requesting user input</span>
<span class="sd"> prompt (str): prompt to give user</span>
<span class="sd"> options (List[str]): response options to give user</span>
<span class="sd"> maintenance (bool): if true, mark this as a request for overall system maintenance</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> response (str): user response as string</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">user_input_view</span> <span class="o">=</span> <span class="n">UserInputView</span><span class="p">()</span>
<span class="n">request_id</span> <span class="o">=</span> <span class="n">user_input_view</span><span class="o">.</span><span class="n">insert_request</span><span class="p">(</span>
Expand All @@ -577,11 +580,15 @@ <h1>Source code for alab_management.user_input</h1><div class="highlight"><pre>
<a class="viewcode-back" href="../../alab_management.user_input.html#alab_management.user_input.request_maintenance_input">[docs]</a>
<span class="k">def</span> <span class="nf">request_maintenance_input</span><span class="p">(</span><span class="n">prompt</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">options</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Request user input through the dashboard. Blocks until response is given.</span>
<span class="sd"> Request user input for maintenance through the dashboard. Blocks until response is given.</span>

<span class="sd"> Args:</span>
<span class="sd"> prompt: prompt to give user</span>
<span class="sd"> options: response options to give user</span>
<span class="sd"> prompt (str): prompt to give user</span>
<span class="sd"> options (List[str]): response options to give user</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> response (str): user response as string</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">request_user_input</span><span class="p">(</span>
<span class="n">task_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
Expand All @@ -603,14 +610,18 @@ <h1>Source code for alab_management.user_input</h1><div class="highlight"><pre>
<span class="n">category</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;Unknown Category&quot;</span><span class="p">,</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Request user input through the dashboard. Blocks until response is given.</span>

<span class="sd"> task_id (ObjectId): task id requesting user input</span>
<span class="sd"> prompt (str): prompt to give user</span>
<span class="sd"> options (List[str]): response options to give user</span>
<span class="sd"> maintenance (bool): if true, mark this as a request for overall system maintenance</span>
<span class="sd"> Request user input through the dashboard. Blocks until response. Returns response and note.</span>

<span class="sd"> Returns user response as string.</span>
<span class="sd"> Args:</span>
<span class="sd"> task_id (ObjectId): task id requesting user input</span>
<span class="sd"> prompt (str): prompt to give user</span>
<span class="sd"> options (List[str]): response options to give user</span>
<span class="sd"> maintenance (bool): if true, mark this as a request for overall system maintenance</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> response (str): user response as string</span>
<span class="sd"> note (str): note from the user</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">user_input_view</span> <span class="o">=</span> <span class="n">UserInputView</span><span class="p">()</span>
<span class="n">request_id</span> <span class="o">=</span> <span class="n">user_input_view</span><span class="o">.</span><span class="n">insert_request</span><span class="p">(</span>
Expand Down
33 changes: 25 additions & 8 deletions alab_management.lab_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -518,23 +518,40 @@ <h2> Contents </h2>
<dl class="py method">
<dt class="sig sig-object py" id="alab_management.lab_view.LabView.request_user_input">
<span class="sig-name descname"><span class="pre">request_user_input</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prompt</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/alab_management/lab_view.html#LabView.request_user_input"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#alab_management.lab_view.LabView.request_user_input" title="Link to this definition">#</a></dt>
<dd><p>Request user input from the user. This function will block until the user inputs something. Returns the
value returned by the user.</p>
<dd><p>Request user input from the user. This function will block until the user inputs something.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span></p>
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>prompt</strong> (<em>str</em>) – The prompt to display to the user.</p></li>
<li><p><strong>options</strong> (<em>list</em><em>[</em><em>str</em><em>]</em>) – A list of options to display to the user.</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></span></p>
</dd>
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>response (str): The value returned by the user (from the buttons).</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="alab_management.lab_view.LabView.request_user_input_with_note">
<span class="sig-name descname"><span class="pre">request_user_input_with_note</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prompt</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">options</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/alab_management/lab_view.html#LabView.request_user_input_with_note"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#alab_management.lab_view.LabView.request_user_input_with_note" title="Link to this definition">#</a></dt>
<dd><p>Request user input from the user. This function will block until the user inputs something. Returns the
value returned by the user and the note.</p>
<dd><p>Request user input from the user. This function will block until the user inputs something.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</span></p>
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>prompt</strong> (<em>str</em>) – The prompt to display to the user.</p></li>
<li><p><strong>options</strong> (<em>list</em><em>[</em><em>str</em><em>]</em>) – A list of options to display to the user.</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><span class="sphinx_autodoc_typehints-type"><code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</span></p>
</dd>
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>response (str): The value returned by the user (from the buttons).
note (str): The note returned by the user.</p>
</dd>
</dl>
</dd></dl>
Expand Down
Loading

0 comments on commit 1ca9257

Please sign in to comment.