Skip to content

Commit

Permalink
#327 add parameters for manual scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
gruberroland committed Oct 14, 2024
1 parent 9e235bf commit 6612dde
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
1 change: 1 addition & 0 deletions lam/HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ December 2024 9.0
-> Request access: added comment field for owners/approvers (339)
-> Custom scripts: support custom label for module (329)
-> Custom scripts: support grouping of manual scripts (329)
-> Custom scripts: allow interactive parameters for manual scripts (327)
- Fixed bugs:
-> Windows: show more than 1000 LDAP entries when paged results is activated in server profile
-> WebAuthn: support DNs larger than 64 bytes (358)
Expand Down
66 changes: 66 additions & 0 deletions lam/docs/manual-sources/chapter-modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6265,6 +6265,72 @@ user manual LAMLABEL="Some app" /bin/myscripts/syncWithSomeApp -u $uid$

</literallayout>

<para><emphasis role="bold">Interactive parameters for manual
scripts</emphasis></para>

<para>You can define parameters that are specified by the user on the
script execution page. E.g., this can be used to specify a target
environment (dev/qa/prod).</para>

<para>Interactive parameters allow the user to select the right value
instead of having the need to duplicate script entries.</para>

<para>Format: LAM_{TYPE}_{NAME}: {label}={value(s)}</para>

<para>Possible input types:</para>

<itemizedlist>
<listitem>
<para>Selection</para>

<itemizedlist>
<listitem>
<para>Parameter name needs to start with "LAM_SELECTION_", e.g.
"LAM_SELECTION_ENV".</para>
</listitem>

<listitem>
<para>Values must be separated by semicolons (e.g.
"dev;qa;prod")</para>
</listitem>
</itemizedlist>
</listitem>

<listitem>
<para>Text input</para>

<itemizedlist>
<listitem>
<para>Parameter name needs to start with "LAM_TEXT_", e.g.
"LAM_TEXT_COMMENT".</para>
</listitem>

<listitem>
<para>Value is optional, will be used as default if
present.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>

<para>The parameters can then be used as wildcards in the commands similar
to attribute values.</para>

<para>Example:</para>

<literallayout>LAM_SELECTION_ENV: Environment=dev;qa;prod
LAM_SELECTION_TENANT: Tenant=foo;bar
LAM_TEXT_COMMENT: Comment=no comment
LAM_TEXT_AMOUNT: Amount
user manual LAMLABEL="Clean" /bin/myscripts/cleanMailbox -u $uid$ -e $LAM_SELECTION_ENV$
user manual LAMLABEL="Extend" /bin/myscripts/extendMailbox -u $uid$ -e $LAM_SELECTION_TENANT$
user manual /bin/myscripts/syncWithCRM -u $uid$ -c $LAM_TEXT_COMMENT$
user manual LAMLABEL="Some app" /bin/myscripts/syncWithSomeApp -u $uid$ -a $LAM_TEXT_AMOUNT$</literallayout>

<screenshot>
<graphic fileref="images/customScripts4.png"/>
</screenshot>

<para><emphasis role="bold">Output may contain HTML:</emphasis> If your
scripts generate HTML output then activate this option.</para>

Expand Down
Binary file added lam/docs/manual-sources/images/customScripts4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6612dde

Please sign in to comment.