* UI for cloning builds (not functional yet).
This commit is contained in:
@ -385,4 +385,28 @@ sub add_to_release : Chained('build') PathPart('add-to-release') Args(0) {
|
||||
}
|
||||
|
||||
|
||||
sub clone : Chained('build') PathPart('clone') Args(0) {
|
||||
my ($self, $c) = @_;
|
||||
|
||||
my $build = $c->stash->{build};
|
||||
|
||||
requireProjectOwner($c, $build->project);
|
||||
|
||||
$c->stash->{template} = 'clone-build.tt';
|
||||
}
|
||||
|
||||
|
||||
sub clone_submit : Chained('build') PathPart('clone/submit') Args(0) {
|
||||
my ($self, $c) = @_;
|
||||
|
||||
my $build = $c->stash->{build};
|
||||
|
||||
requireProjectOwner($c, $build->project);
|
||||
|
||||
$c->flash->{buildMsg} = "Build XXX added to the queue.";
|
||||
|
||||
$c->res->redirect($c->uri_for($c->controller('Root')->action_for('queue')));
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
@ -60,6 +60,7 @@ sub queue :Local {
|
||||
$c->stash->{template} = 'queue.tt';
|
||||
$c->stash->{queue} = [$c->model('DB::Builds')->search(
|
||||
{finished => 0}, {join => 'schedulingInfo', order_by => ["priority DESC", "timestamp"]})];
|
||||
$c->stash->{flashMsg} = $c->flash->{buildMsg};
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user