2BUX775ILK47LEDXNPSVUAKVLEKG54ODCXRG3474DHY5PHJJBNBQC
P5X4P6VKS5CJOOLJRVL66GRJLDLVC3EKAVAHP2RJOXQJ7WTYAUBQC
UWVMQIAC2HQNSG2JQOPZGUOCQ5V2JFP2F7RCTF3WJLK7NHSD5PAAC
FPK5LF53CFUEKFYJ3IYXT4UTVC6IITWJOCFATMC4PLHEUP5SIEAAC
IE3SRMWZ4YT6EYKAOG2HH54MXG5TYYBW7OEBHNYJUGW7KILFXX2AC
JFZNAYJXKCMXYHGCLTRH7Q6TOFGJ4BT6332GONCWVYRLNMDDG3KAC
IK53RV4VGOHLCZGQCCIKPB45M3C7M7YMNBOJFBGZJ4LWIZNU4QNQC
QU5I5GCLSKUEKWPQBFPEHHLH3OODK6KSFHDAIDN52U45U6FNTFNAC
G6HJY2V4CSSZF6BPIMRMRAJYRKPLTCBUFTJWZWK3BSNT235CZQ6QC
D5QIOJGPKQJIYBUCSC3MFJ3TXLPNZ2XMI37GXMFRVRFWWR2VMTFAC
H5REHM3MZKP6SZPMSTMO7SHAVS6W756Q6P2AEJ27R4FZB2IZ2HVAC
ODNCGFQ5FPKFI624BVMLW7PJ2EFJOR3TY66OCZM42UNNTWBCF2TQC
H3DLVNCJYUJDCILB5LEQDMQDHPRS7ZU66EW3FWXDRBX6WSBUXJTAC
FHF6IZJQPUQHY5QWQYRPZVDBRLHREWRHGNKVQDT7F3GQKKLZXJKQC
}
sub create_view_submit : Chained('project') PathPart('create-view/submit') Args(0) {
my ($self, $c) = @_;
requireProjectOwner($c, $c->stash->{project});
my $viewName = $c->request->params->{name};
my $view;
txn_do($c->model('DB')->schema, sub {
# Note: $viewName is validated in updateView, which will abort
# the transaction if the name isn't valid.
$view = $c->stash->{project}->views->create({name => $viewName});
Hydra::Controller::View::updateView($c, $view);
});
$c->res->redirect($c->uri_for($c->controller('View')->action_for('view_view'),
[$c->stash->{project}->name, $view->name]));
my $releaseSetName = trim $c->request->params->{name};
error($c, "Invalid release set name: $releaseSetName")
unless $releaseSetName =~ /^[[:alpha:]][\w\-]*$/;
my $viewName = trim $c->request->params->{name};
error($c, "Invalid view name: $viewName")
unless $viewName =~ /^[[:alpha:]][\w\-]*$/;
}
sub submit : Chained('view') PathPart('submit') Args(0) {
my ($self, $c) = @_;
requireProjectOwner($c, $c->stash->{project});
txn_do($c->model('DB')->schema, sub {
updateView($c, $c->stash->{view});
});
$c->res->redirect($c->uri_for($self->action_for("view_view"), $c->req->captures));
sub delete : Chained('view') PathPart('delete') Args(0) {
my ($self, $c) = @_;
requireProjectOwner($c, $c->stash->{project});
txn_do($c->model('DB')->schema, sub {
$c->stash->{view}->delete;
});
$c->res->redirect($c->uri_for($c->controller('Project')->action_for('view'), [$c->stash->{project}->name]));
}
# Provide a redirect to the specified job of this release. !!!
# This isn't uniquely defined if there are multiple jobs with the
# same name (e.g. builds for different platforms). However, this
# mechanism is primarily to allow linking to resources of which
# there is only one build, such as the manual of the latest
# release.
# Provide a redirect to the specified job of this view result.
# !!! This isn't uniquely defined if there are multiple jobs with
# the same name (e.g. builds for different platforms). However,
# this mechanism is primarily to allow linking to resources of
# which there is only one build, such as the manual of the latest
# view result.
(my $build, my @others) = grep { $_->{job}->job eq $jobName } @{$c->stash->{release}->{jobs}};
notFound($c, "Release doesn't have a job named `$jobName'")
(my $build, my @others) = grep { $_->{job}->job eq $jobName } @{$c->stash->{result}->{jobs}};
notFound($c, "View doesn't have a job named `$jobName'")
<form action="[% IF create %][% c.uri_for('/create-view' project.name 'submit') %][% ELSE %][% c.uri_for('/view' project.name view.name 'submit') %][% END %]" method="post">
<form action="[% IF create %][% c.uri_for('/project' project.name 'create-view/submit') %][% ELSE %][% c.uri_for('/view' project.name view.name 'submit') %][% END %]" method="post">
[% IF release.status == 1 %]
<p class="error">This is a failed release. One of its jobs has failed. See below for details.</p>
[% ELSIF release.status == 2 %]
<p class="error">This is an incomplete release. One of its jobs has not been built (yet). See below for details.</p>
[% IF result.status == 1 %]
<p class="error">Note: One or more of the jobs in the view did not build correctly. See below for details.</p>
[% ELSIF result.status == 2 %]
<p class="error">Note: One or more of the jobs in the view have not been built (yet). See below for details.</p>