forked from lix-project/hydra
Project: enable enabling dynamic runcommand per project
This commit is contained in:
parent
1affb1cfb1
commit
8a96f07f58
|
@ -157,6 +157,7 @@ sub updateProject {
|
||||||
, enabled => defined $c->stash->{params}->{enabled} ? 1 : 0
|
, enabled => defined $c->stash->{params}->{enabled} ? 1 : 0
|
||||||
, hidden => defined $c->stash->{params}->{visible} ? 0 : 1
|
, hidden => defined $c->stash->{params}->{visible} ? 0 : 1
|
||||||
, owner => $owner
|
, owner => $owner
|
||||||
|
, enable_dynamic_run_command => defined $c->stash->{params}->{enable_dynamic_run_command} ? 1 : 0
|
||||||
, declfile => trim($c->stash->{params}->{declarative}->{file})
|
, declfile => trim($c->stash->{params}->{declarative}->{file})
|
||||||
, decltype => trim($c->stash->{params}->{declarative}->{type})
|
, decltype => trim($c->stash->{params}->{declarative}->{type})
|
||||||
, declvalue => trim($c->stash->{params}->{declarative}->{value})
|
, declvalue => trim($c->stash->{params}->{declarative}->{value})
|
||||||
|
|
|
@ -259,6 +259,7 @@ sub as_json {
|
||||||
|
|
||||||
# boolean_columns
|
# boolean_columns
|
||||||
"enabled" => $self->get_column("enabled") ? JSON::MaybeXS::true : JSON::MaybeXS::false,
|
"enabled" => $self->get_column("enabled") ? JSON::MaybeXS::true : JSON::MaybeXS::false,
|
||||||
|
"enable_dynamic_run_command" => $self->get_column("enable_dynamic_run_command") ? JSON::MaybeXS::true : JSON::MaybeXS::false,
|
||||||
"hidden" => $self->get_column("hidden") ? JSON::MaybeXS::true : JSON::MaybeXS::false,
|
"hidden" => $self->get_column("hidden") ? JSON::MaybeXS::true : JSON::MaybeXS::false,
|
||||||
|
|
||||||
"jobsets" => [ map { $_->name } $self->jobsets ]
|
"jobsets" => [ map { $_->name } $self->jobsets ]
|
||||||
|
|
|
@ -52,6 +52,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-sm-3" for="editprojectenable_dynamic_run_command">Enable Dynamic RunCommand Hooks for Jobsets</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="checkbox" id="editprojectenable_dynamic_run_command" name="enable_dynamic_run_command" [% IF jobset.enable_dynamic_run_command %]checked[% END %]/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label class="col-sm-3" for="editprojectdeclfile">
|
<label class="col-sm-3" for="editprojectdeclfile">
|
||||||
Declarative spec file
|
Declarative spec file
|
||||||
|
|
|
@ -92,6 +92,10 @@
|
||||||
<th>Enabled:</th>
|
<th>Enabled:</th>
|
||||||
<td>[% project.enabled ? "Yes" : "No" %]</td>
|
<td>[% project.enabled ? "Yes" : "No" %]</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Enable Dynamic RunCommand Hooks:</th>
|
||||||
|
<td>[% project.enable_dynamic_run_command ? "Yes" : "No" %]</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue