Project: add declfile, decltype, declvalue to API
[?]
May 2, 2021, 6:27 AM
3NGONGQ7MXUUH2RR4LQGY7FP5ALNCYYIF64RU6IM7ESO5MY6EUNQCDependencies
- [2]
IQBLO5PWProjects: serialize `enabled` and `hidden` as boolean - [3]
2XGJ54SFToJSON: serialize string_columns to JSON - [4]
T5BIOVJEAdd support for tracking custom metrics - [5]
A6XVP6FEMake the hide/unhide actions a checkbox in the project settings - [6]
LZVO64YGMerge in the first bits of the API work - [7]
N74SRHS6Remove the "releases" feature - [8]
X27GNHDV* Basic job info in the database. - [9]
7ECJWNVXCleanup Project model - [10]
LN3E2P4Et: Test Projects JSON serialization and deserialization - [11]
BXHG3HYLWhen renaming a jobset, add a redirect from the old name - [12]
PCD3ZH6ZPartially revert 1c20cfdf2403feb78cef515faf15c04d5c9f17bd - [13]
W5OAZWPDDrop the errorMsg column in the Jobs table - [14]
MB5INTIQNormalize nixexpr{input,path} from builds to jobsetevals. - [15]
7RRDNLP3Add homepage to Projects schema - [16]
KSBB33REAdd a dashboard - [17]
6WRGCITDEnable declarative projects. - [18]
IGR322YPsql: Generate models from postgresql - [19]
NZXX6PLDRemove the Jobs table - [20]
ODNCGFQ5* Improved the navigation bar: don't include all projects (since that - [21]
NIX2TKYVUse redirectJSON - [22]
TQVKZQUGUse the REST API in the web interface for editing jobsets - [23]
BMGYDRNKjobsetevals: refer to jobset by ID - [24]
YU6CND7CRemove support for views - [*]
LX326CB7Add hydra OpenAPI description (#750) - [*]
FPK5LF53* Put the project-related actions in a separate controller. Put the - [*]
JY7BXXOPSplit viewing and editing a project
Change contents
- edit in hydra-api.yaml at line 184
declarative:description: declarative input configured for this projecttype: object$ref: '#/components/schemas/DeclarativeInput' - edit in hydra-api.yaml at line 584
declarative:description: declarative input configured for this projecttype: object$ref: '#/components/schemas/DeclarativeInput' - edit in hydra-api.yaml at line 594
DeclarativeInput:type: objectproperties:file:description: The file in `value` which contains the declarative spec file. Relative to the root of `value`.type: stringtype:description: The type of the declarative input.type: stringvalue:description: The value of the declarative input.type: string - replacement in src/lib/Hydra/Controller/Project.pm at line 160
, declfile => trim($c->stash->{params}->{declfile}), decltype => trim($c->stash->{params}->{decltype}), declvalue => trim($c->stash->{params}->{declvalue}), declfile => trim($c->stash->{params}->{declarative}->{file}), decltype => trim($c->stash->{params}->{declarative}->{type}), declvalue => trim($c->stash->{params}->{declarative}->{value}) - replacement in src/lib/Hydra/Schema/Projects.pm at line 249[4.172]→[4.172:185](∅→∅),[4.185]→[3.119:143](∅→∅),[3.143]→[4.202:264](∅→∅),[4.202]→[4.202:264](∅→∅),[4.264]→[4.89:109](∅→∅),[4.301]→[4.301:317](∅→∅),[4.317]→[2.0:64](∅→∅),[2.64]→[4.317:343](∅→∅),[4.317]→[4.317:343](∅→∅),[4.371]→[4.371:406](∅→∅)
my %hint = (string_columns => ["name","displayname","description","homepage","owner"],boolean_columns => ["enabled","hidden"],relations => {jobsets => "name"});sub as_json {my $self = shift; - replacement in src/lib/Hydra/Schema/Projects.pm at line 252
sub json_hint {return \%hint;my %json = (# string_columns"name" => $self->get_column("name") // "","displayname" => $self->get_column("displayname") // "","description" => $self->get_column("description") // "","homepage" => $self->get_column("homepage") // "","owner" => $self->get_column("owner") // "",# boolean_columns"enabled" => $self->get_column("enabled") ? JSON::true : JSON::false,"hidden" => $self->get_column("hidden") ? JSON::true : JSON::false,"declarative" => {"file" => $self->get_column("declfile") // "","type" => $self->get_column("decltype") // "","value" => $self->get_column("declvalue") // ""},"jobsets" => [ map { $_->name } $self->jobsets ]);return \%json; - edit in src/root/edit-project.tt at line 82
var formElements = $(this).parents("form").serializeArray();var data = { 'declarative': {} };var decl = {};for (var i = 0; formElements.length > i; i++) {var elem = formElements[i];var match = elem.name.match(/^decl(file|type|value)$/);if (match === null) {data[elem.name] = elem.value;} else {var param = match[1];decl[param] = elem.value;}}data.declarative = decl; - replacement in src/root/edit-project.tt at line 102
data: $(this).parents("form").serialize(),data: JSON.stringify(data),contentType: 'application/json', - replacement in t/Controller/projects.t at line 35
owner => "root"owner => "root",declarative => {file => "",type => "",value => ""}