HTTP/Jobset: support setting / reading enable_dynamic_run_command

This commit is contained in:
Graham Christensen
2021-12-15 12:37:35 -05:00
parent 1802bd0113
commit 726ea80e99
5 changed files with 16 additions and 0 deletions

View File

@ -268,6 +268,7 @@ sub updateJobset {
, nixexprinput => $nixExprInput
, enabled => $enabled
, enableemail => defined $c->stash->{params}->{enableemail} ? 1 : 0
, enable_dynamic_run_command => defined $c->stash->{params}->{enable_dynamic_run_command} ? 1 : 0
, emailoverride => trim($c->stash->{params}->{emailoverride}) || ""
, hidden => defined $c->stash->{params}->{visible} ? 0 : 1
, keepnr => int(trim($c->stash->{params}->{keepnr} // "0"))

View File

@ -157,6 +157,13 @@
</div>
</div>
<div class="form-group row">
<label class="col-sm-3" for="editjobsetenable_dynamic_run_command">Enable Dynamic RunCommand Hooks</label>
<div class="col-sm-9">
<input type="checkbox" id="editjobsetenable_dynamic_run_command" name="enable_dynamic_run_command" [% IF jobset.enable_dynamic_run_command %]checked[% END %]/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3" for="editjobsetenableemail">Email notification</label>
<div class="col-sm-9">

View File

@ -160,6 +160,10 @@
<th>Scheduling shares:</th>
<td>[% jobset.schedulingshares %] [% IF totalShares %] ([% f = format("%.2f"); f(jobset.schedulingshares / totalShares * 100) %]% out of [% totalShares %] shares)[% END %]</td>
</tr>
<tr>
<th>Enable Dynamic RunCommand Hooks:</th>
<td>[% jobset.enable_dynamic_run_command ? "Yes" : "No" %]</td>
</tr>
[% IF emailNotification %]
<tr>
<th>Enable email notification:</th>