diff --git a/hydra-api.yaml b/hydra-api.yaml
index a0b56822..6b67a9fe 100644
--- a/hydra-api.yaml
+++ b/hydra-api.yaml
@@ -642,8 +642,8 @@ components:
enableemail:
description: when true the jobset sends emails when previously-successful builds fail
type: boolean
- hidden:
- description: when false the jobset is visible in the web frontend
+ visible:
+ description: when true the jobset is visible in the web frontend
type: boolean
emailoverride:
description: email address to send notices to instead of the package maintainer (can be a comma separated list)
@@ -667,12 +667,12 @@ components:
type: integer
type:
description: the type of the jobset
- type: string
+ type: integer
flake:
nullable: true
description: the flake uri to evaluate
type: string
- jobsetinputs:
+ inputs:
description: inputs configured for this jobset
type: object
additionalProperties:
diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm
index b391e231..24776994 100644
--- a/src/lib/Hydra/Controller/Jobset.pm
+++ b/src/lib/Hydra/Controller/Jobset.pm
@@ -270,8 +270,8 @@ sub updateJobset {
$jobset->jobsetinputs->delete;
if ($type == 0) {
- foreach my $name (keys %{$c->stash->{params}->{jobsetinputs}}) {
- my $inputData = $c->stash->{params}->{jobsetinputs}->{$name};
+ foreach my $name (keys %{$c->stash->{params}->{inputs}}) {
+ my $inputData = $c->stash->{params}->{inputs}->{$name};
my $type = $inputData->{type};
my $value = $inputData->{value};
my $emailresponsible = defined $inputData->{emailresponsible} ? 1 : 0;
diff --git a/src/lib/Hydra/Schema/Jobsets.pm b/src/lib/Hydra/Schema/Jobsets.pm
index ee93f349..fcb5772e 100644
--- a/src/lib/Hydra/Schema/Jobsets.pm
+++ b/src/lib/Hydra/Schema/Jobsets.pm
@@ -410,40 +410,40 @@ __PACKAGE__->add_column(
"+id" => { retrieve_on_insert => 1 }
);
-my %hint = (
- columns => [
- "errortime",
- "lastcheckedtime",
- "triggertime",
- "enabled",
- "keepnr",
- "checkinterval",
- "schedulingshares",
- "starttime"
- ],
- string_columns => [
- "name",
- "project",
- "description",
- "nixexprinput",
- "nixexprpath",
- "errormsg",
- "emailoverride",
- "fetcherrormsg",
- "type",
- "flake"
- ],
- boolean_columns => [
- "enableemail",
- "hidden"
- ],
- eager_relations => {
- jobsetinputs => "name"
- }
-);
+sub as_json {
+ my $self = shift;
-sub json_hint {
- return \%hint;
+ my %json = (
+ # columns
+ "errortime" => $self->get_column("errortime"),
+ "lastcheckedtime" => $self->get_column("lastcheckedtime"),
+ "triggertime" => $self->get_column("triggertime"),
+ "enabled" => $self->get_column("enabled"),
+ "keepnr" => $self->get_column("keepnr"),
+ "checkinterval" => $self->get_column("checkinterval"),
+ "schedulingshares" => $self->get_column("schedulingshares"),
+ "starttime" => $self->get_column("starttime"),
+
+ # string_columns
+ "name" => $self->get_column("name") // "",
+ "project" => $self->get_column("project") // "",
+ "description" => $self->get_column("description") // "",
+ "nixexprinput" => $self->get_column("nixexprinput") // "",
+ "nixexprpath" => $self->get_column("nixexprpath") // "",
+ "errormsg" => $self->get_column("errormsg") // "",
+ "emailoverride" => $self->get_column("emailoverride") // "",
+ "fetcherrormsg" => $self->get_column("fetcherrormsg") // "",
+ "type" => $self->get_column("type") // "",
+ "flake" => $self->get_column("flake") // "",
+
+ # boolean_columns
+ "enableemail" => $self->get_column("enableemail") ? JSON::true : JSON::false,
+ "visible" => $self->get_column("hidden") ? JSON::false : JSON::true,
+
+ "inputs" => { map { $_->name => $_ } $self->jobsetinputs }
+ );
+
+ return \%json;
}
1;
diff --git a/src/root/edit-jobset.tt b/src/root/edit-jobset.tt
index 4243f1fa..22874815 100644
--- a/src/root/edit-jobset.tt
+++ b/src/root/edit-jobset.tt
@@ -46,8 +46,8 @@
- Input name Type Value Notify committers