forked from lix-project/hydra
Bootstrapify the Hydra forms (except the project and jobset edit pages)
Plus lots of other tweaks.
This commit is contained in:
parent
8f31935ffa
commit
51b920c875
|
@ -15,6 +15,7 @@ use Email::Sender::Simple qw(sendmail);
|
||||||
use Email::Sender::Transport::SMTP;
|
use Email::Sender::Transport::SMTP;
|
||||||
use Config::General;
|
use Config::General;
|
||||||
|
|
||||||
|
|
||||||
sub nixMachines {
|
sub nixMachines {
|
||||||
my ($c) = @_;
|
my ($c) = @_;
|
||||||
my $result = "# GENERATED BY HYDRA\n";
|
my $result = "# GENERATED BY HYDRA\n";
|
||||||
|
@ -32,6 +33,7 @@ sub nixMachines {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub saveNixMachines {
|
sub saveNixMachines {
|
||||||
my ($c) = @_;
|
my ($c) = @_;
|
||||||
|
|
||||||
|
@ -42,12 +44,14 @@ sub saveNixMachines {
|
||||||
close (NIXMACHINES);
|
close (NIXMACHINES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub admin : Chained('/') PathPart('admin') CaptureArgs(0) {
|
sub admin : Chained('/') PathPart('admin') CaptureArgs(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
requireAdmin($c);
|
requireAdmin($c);
|
||||||
$c->stash->{admin} = 1;
|
$c->stash->{admin} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub index : Chained('admin') PathPart('') Args(0) {
|
sub index : Chained('admin') PathPart('') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
$c->stash->{machines} = [$c->model('DB::BuildMachines')->search(
|
$c->stash->{machines} = [$c->model('DB::BuildMachines')->search(
|
||||||
|
@ -62,7 +66,8 @@ sub index : Chained('admin') PathPart('') Args(0) {
|
||||||
, order_by => [ 'machine', 'stepnr' ]
|
, order_by => [ 'machine', 'stepnr' ]
|
||||||
} ) ];
|
} ) ];
|
||||||
$c->stash->{template} = 'admin.tt';
|
$c->stash->{template} = 'admin.tt';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub updateUser {
|
sub updateUser {
|
||||||
my ($c, $user) = @_;
|
my ($c, $user) = @_;
|
||||||
|
@ -88,6 +93,16 @@ sub updateUser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub create_user : Chained('admin') PathPart('create-user') Args(0) {
|
||||||
|
my ($self, $c) = @_;
|
||||||
|
|
||||||
|
requireAdmin($c);
|
||||||
|
|
||||||
|
error($c, "Not implemented yet!"); # FIXME
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
sub user : Chained('admin') PathPart('user') CaptureArgs(1) {
|
sub user : Chained('admin') PathPart('user') CaptureArgs(1) {
|
||||||
my ($self, $c, $username) = @_;
|
my ($self, $c, $username) = @_;
|
||||||
|
|
||||||
|
@ -99,6 +114,7 @@ sub user : Chained('admin') PathPart('user') CaptureArgs(1) {
|
||||||
$c->stash->{user} = $user;
|
$c->stash->{user} = $user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub users : Chained('admin') PathPart('users') Args(0) {
|
sub users : Chained('admin') PathPart('users') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
$c->stash->{users} = [$c->model('DB::Users')->search({}, {order_by => "username"})];
|
$c->stash->{users} = [$c->model('DB::Users')->search({}, {order_by => "username"})];
|
||||||
|
@ -106,6 +122,7 @@ sub users : Chained('admin') PathPart('users') Args(0) {
|
||||||
$c->stash->{template} = 'users.tt';
|
$c->stash->{template} = 'users.tt';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub user_edit : Chained('user') PathPart('edit') Args(0) {
|
sub user_edit : Chained('user') PathPart('edit') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
|
|
||||||
|
@ -113,16 +130,23 @@ sub user_edit : Chained('user') PathPart('edit') Args(0) {
|
||||||
$c->stash->{edit} = 1;
|
$c->stash->{edit} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub user_edit_submit : Chained('user') PathPart('submit') Args(0) {
|
sub user_edit_submit : Chained('user') PathPart('submit') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
requirePost($c);
|
requirePost($c);
|
||||||
|
|
||||||
txn_do($c->model('DB')->schema, sub {
|
txn_do($c->model('DB')->schema, sub {
|
||||||
updateUser($c, $c->stash->{user}) ;
|
if (($c->request->params->{submit} || "") eq "delete") {
|
||||||
|
$c->stash->{user}->delete;
|
||||||
|
} else {
|
||||||
|
updateUser($c, $c->stash->{user});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$c->res->redirect("/admin/users");
|
$c->res->redirect("/admin/users");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub sendemail {
|
sub sendemail {
|
||||||
my ($to, $subject, $body) = @_;
|
my ($to, $subject, $body) = @_;
|
||||||
|
|
||||||
|
@ -141,6 +165,7 @@ sub sendemail {
|
||||||
sendmail($email);
|
sendmail($email);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub reset_password : Chained('user') PathPart('reset-password') Args(0) {
|
sub reset_password : Chained('user') PathPart('reset-password') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
|
|
||||||
|
@ -168,6 +193,7 @@ sub reset_password : Chained('user') PathPart('reset-password') Args(0) {
|
||||||
$c->res->redirect("/admin/users");
|
$c->res->redirect("/admin/users");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub machines : Chained('admin') PathPart('machines') Args(0) {
|
sub machines : Chained('admin') PathPart('machines') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
$c->stash->{machines} = [$c->model('DB::BuildMachines')->search({}, {order_by => "hostname"})];
|
$c->stash->{machines} = [$c->model('DB::BuildMachines')->search({}, {order_by => "hostname"})];
|
||||||
|
@ -176,7 +202,8 @@ sub machines : Chained('admin') PathPart('machines') Args(0) {
|
||||||
$c->stash->{nixMachinesWritable} = (-e "/etc/nix.machines" && -w "/etc/nix.machines");
|
$c->stash->{nixMachinesWritable} = (-e "/etc/nix.machines" && -w "/etc/nix.machines");
|
||||||
|
|
||||||
$c->stash->{template} = 'machines.tt';
|
$c->stash->{template} = 'machines.tt';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub machine : Chained('admin') PathPart('machine') CaptureArgs(1) {
|
sub machine : Chained('admin') PathPart('machine') CaptureArgs(1) {
|
||||||
my ($self, $c, $machineName) = @_;
|
my ($self, $c, $machineName) = @_;
|
||||||
|
@ -189,6 +216,7 @@ sub machine : Chained('admin') PathPart('machine') CaptureArgs(1) {
|
||||||
$c->stash->{machine} = $machine;
|
$c->stash->{machine} = $machine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub machine_edit : Chained('machine') PathPart('edit') Args(0) {
|
sub machine_edit : Chained('machine') PathPart('edit') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
$c->stash->{template} = 'machine.tt';
|
$c->stash->{template} = 'machine.tt';
|
||||||
|
@ -196,19 +224,27 @@ sub machine_edit : Chained('machine') PathPart('edit') Args(0) {
|
||||||
$c->stash->{edit} = 1;
|
$c->stash->{edit} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub machine_edit_submit : Chained('machine') PathPart('submit') Args(0) {
|
sub machine_edit_submit : Chained('machine') PathPart('submit') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
requirePost($c);
|
requirePost($c);
|
||||||
|
|
||||||
txn_do($c->model('DB')->schema, sub {
|
txn_do($c->model('DB')->schema, sub {
|
||||||
updateMachine($c, $c->stash->{machine}) ;
|
if (($c->request->params->{submit} || "") eq "delete") {
|
||||||
|
$c->stash->{machine}->delete;
|
||||||
|
} else {
|
||||||
|
updateMachine($c, $c->stash->{machine});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
saveNixMachines($c);
|
saveNixMachines($c);
|
||||||
|
|
||||||
$c->res->redirect("/admin/machines");
|
$c->res->redirect("/admin/machines");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub updateMachine {
|
sub updateMachine {
|
||||||
my ($c, $machine) = @_;
|
my ($c, $machine) = @_;
|
||||||
|
|
||||||
my $hostname = trim $c->request->params->{"hostname"};
|
my $hostname = trim $c->request->params->{"hostname"};
|
||||||
my $username = trim $c->request->params->{"username"};
|
my $username = trim $c->request->params->{"username"};
|
||||||
|
@ -240,6 +276,7 @@ sub updateMachine {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub create_machine : Chained('admin') PathPart('create-machine') Args(0) {
|
sub create_machine : Chained('admin') PathPart('create-machine') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
|
|
||||||
|
@ -269,16 +306,6 @@ sub create_machine_submit : Chained('admin') PathPart('create-machine/submit') A
|
||||||
$c->res->redirect("/admin/machines");
|
$c->res->redirect("/admin/machines");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub machine_delete : Chained('machine') PathPart('delete') Args(0) {
|
|
||||||
my ($self, $c) = @_;
|
|
||||||
requirePost($c);
|
|
||||||
|
|
||||||
txn_do($c->model('DB')->schema, sub {
|
|
||||||
$c->stash->{machine}->delete;
|
|
||||||
});
|
|
||||||
saveNixMachines($c);
|
|
||||||
$c->res->redirect("/admin/machines");
|
|
||||||
}
|
|
||||||
|
|
||||||
sub machine_enable : Chained('machine') PathPart('enable') Args(0) {
|
sub machine_enable : Chained('machine') PathPart('enable') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
|
@ -287,6 +314,7 @@ sub machine_enable : Chained('machine') PathPart('enable') Args(0) {
|
||||||
$c->res->redirect("/admin/machines");
|
$c->res->redirect("/admin/machines");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub machine_disable : Chained('machine') PathPart('disable') Args(0) {
|
sub machine_disable : Chained('machine') PathPart('disable') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
$c->stash->{machine}->update({ enabled => 0});
|
$c->stash->{machine}->update({ enabled => 0});
|
||||||
|
@ -294,6 +322,7 @@ sub machine_disable : Chained('machine') PathPart('disable') Args(0) {
|
||||||
$c->res->redirect("/admin/machines");
|
$c->res->redirect("/admin/machines");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub clear_queue_non_current : Chained('admin') Path('clear-queue-non-current') Args(0) {
|
sub clear_queue_non_current : Chained('admin') Path('clear-queue-non-current') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
# !!! Mark the builds as cancelled instead.
|
# !!! Mark the builds as cancelled instead.
|
||||||
|
@ -301,6 +330,7 @@ sub clear_queue_non_current : Chained('admin') Path('clear-queue-non-current') A
|
||||||
$c->res->redirect("/admin");
|
$c->res->redirect("/admin");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub clear_queue : Chained('admin') Path('clear-queue') Args(0) {
|
sub clear_queue : Chained('admin') Path('clear-queue') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
# !!! Mark the builds as cancelled instead.
|
# !!! Mark the builds as cancelled instead.
|
||||||
|
@ -308,6 +338,7 @@ sub clear_queue : Chained('admin') Path('clear-queue') Args(0) {
|
||||||
$c->res->redirect("/admin");
|
$c->res->redirect("/admin");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub clearfailedcache : Chained('admin') Path('clear-failed-cache') Args(0) {
|
sub clearfailedcache : Chained('admin') Path('clear-failed-cache') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
|
|
||||||
|
@ -316,6 +347,7 @@ sub clearfailedcache : Chained('admin') Path('clear-failed-cache') Args(0) {
|
||||||
$c->res->redirect("/admin");
|
$c->res->redirect("/admin");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub clearvcscache : Chained('admin') Path('clear-vcs-cache') Args(0) {
|
sub clearvcscache : Chained('admin') Path('clear-vcs-cache') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
|
|
||||||
|
@ -334,6 +366,7 @@ sub clearvcscache : Chained('admin') Path('clear-vcs-cache') Args(0) {
|
||||||
$c->res->redirect("/admin");
|
$c->res->redirect("/admin");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub managenews : Chained('admin') Path('news') Args(0) {
|
sub managenews : Chained('admin') Path('news') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
|
|
||||||
|
@ -342,6 +375,7 @@ sub managenews : Chained('admin') Path('news') Args(0) {
|
||||||
$c->stash->{template} = 'news.tt';
|
$c->stash->{template} = 'news.tt';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub news_submit : Chained('admin') Path('news/submit') Args(0) {
|
sub news_submit : Chained('admin') Path('news/submit') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
|
|
||||||
|
@ -359,6 +393,7 @@ sub news_submit : Chained('admin') Path('news/submit') Args(0) {
|
||||||
$c->res->redirect("/admin/news");
|
$c->res->redirect("/admin/news");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub news_delete : Chained('admin') Path('news/delete') Args(1) {
|
sub news_delete : Chained('admin') Path('news/delete') Args(1) {
|
||||||
my ($self, $c, $id) = @_;
|
my ($self, $c, $id) = @_;
|
||||||
|
|
||||||
|
@ -371,6 +406,7 @@ sub news_delete : Chained('admin') Path('news/delete') Args(1) {
|
||||||
$c->res->redirect("/admin/news");
|
$c->res->redirect("/admin/news");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub force_eval : Chained('admin') Path('eval') Args(2) {
|
sub force_eval : Chained('admin') Path('eval') Args(2) {
|
||||||
my ($self, $c, $projectName, $jobsetName) = @_;
|
my ($self, $c, $projectName, $jobsetName) = @_;
|
||||||
|
|
||||||
|
@ -387,4 +423,5 @@ sub force_eval : Chained('admin') Path('eval') Args(2) {
|
||||||
$c->res->redirect("/project/$projectName");
|
$c->res->redirect("/project/$projectName");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
@ -45,6 +45,11 @@ sub submit : Chained('project') PathPart Args(0) {
|
||||||
requireProjectOwner($c, $c->stash->{project});
|
requireProjectOwner($c, $c->stash->{project});
|
||||||
requirePost($c);
|
requirePost($c);
|
||||||
|
|
||||||
|
if (($c->request->params->{submit} || "") eq "delete") {
|
||||||
|
$c->stash->{project}->delete;
|
||||||
|
$c->res->redirect($c->uri_for("/"));
|
||||||
|
}
|
||||||
|
|
||||||
txn_do($c->model('DB')->schema, sub {
|
txn_do($c->model('DB')->schema, sub {
|
||||||
updateProject($c, $c->stash->{project});
|
updateProject($c, $c->stash->{project});
|
||||||
});
|
});
|
||||||
|
@ -65,6 +70,7 @@ sub hide : Chained('project') PathPart Args(0) {
|
||||||
$c->res->redirect($c->uri_for("/"));
|
$c->res->redirect($c->uri_for("/"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub unhide : Chained('project') PathPart Args(0) {
|
sub unhide : Chained('project') PathPart Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
|
|
||||||
|
@ -77,19 +83,6 @@ sub unhide : Chained('project') PathPart Args(0) {
|
||||||
$c->res->redirect($c->uri_for("/"));
|
$c->res->redirect($c->uri_for("/"));
|
||||||
}
|
}
|
||||||
|
|
||||||
sub delete : Chained('project') PathPart Args(0) {
|
|
||||||
my ($self, $c) = @_;
|
|
||||||
|
|
||||||
requireProjectOwner($c, $c->stash->{project});
|
|
||||||
requirePost($c);
|
|
||||||
|
|
||||||
txn_do($c->model('DB')->schema, sub {
|
|
||||||
$c->stash->{project}->delete;
|
|
||||||
});
|
|
||||||
|
|
||||||
$c->res->redirect($c->uri_for("/"));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
sub requireMayCreateProjects {
|
sub requireMayCreateProjects {
|
||||||
my ($c) = @_;
|
my ($c) = @_;
|
||||||
|
@ -171,12 +164,7 @@ sub create_jobset_submit : Chained('project') PathPart('create-jobset/submit') A
|
||||||
|
|
||||||
sub updateProject {
|
sub updateProject {
|
||||||
my ($c, $project) = @_;
|
my ($c, $project) = @_;
|
||||||
my $projectName = trim $c->request->params->{name};
|
|
||||||
error($c, "Invalid project name: ‘$projectName’") if $projectName !~ /^$projectNameRE$/;
|
|
||||||
|
|
||||||
my $displayName = trim $c->request->params->{displayname};
|
|
||||||
error($c, "Invalid display name: $displayName") if $displayName eq "";
|
|
||||||
|
|
||||||
my $owner = $project->owner;
|
my $owner = $project->owner;
|
||||||
if ($c->check_user_roles('admin')) {
|
if ($c->check_user_roles('admin')) {
|
||||||
$owner = trim $c->request->params->{owner};
|
$owner = trim $c->request->params->{owner};
|
||||||
|
@ -184,6 +172,12 @@ sub updateProject {
|
||||||
unless defined $c->model('DB::Users')->find({username => $owner});
|
unless defined $c->model('DB::Users')->find({username => $owner});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $projectName = trim $c->request->params->{name};
|
||||||
|
error($c, "Invalid project name: ‘$projectName’") if $projectName !~ /^$projectNameRE$/;
|
||||||
|
|
||||||
|
my $displayName = trim $c->request->params->{displayname};
|
||||||
|
error($c, "Invalid display name: $displayName") if $displayName eq "";
|
||||||
|
|
||||||
$project->update(
|
$project->update(
|
||||||
{ name => $projectName
|
{ name => $projectName
|
||||||
, displayname => $displayName
|
, displayname => $displayName
|
||||||
|
|
|
@ -52,6 +52,8 @@ sub edit : Chained('release') PathPart('edit') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
requireProjectOwner($c, $c->stash->{project});
|
requireProjectOwner($c, $c->stash->{project});
|
||||||
$c->stash->{template} = 'edit-release.tt';
|
$c->stash->{template} = 'edit-release.tt';
|
||||||
|
$c->stash->{members} = [$c->stash->{release}->releasemembers->search({},
|
||||||
|
{order_by => ["description"]})];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -116,6 +116,11 @@ sub edit : Chained('view') PathPart('edit') Args(0) {
|
||||||
sub submit : Chained('view') PathPart('submit') Args(0) {
|
sub submit : Chained('view') PathPart('submit') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
requireProjectOwner($c, $c->stash->{project});
|
requireProjectOwner($c, $c->stash->{project});
|
||||||
|
if (($c->request->params->{submit} || "") eq "delete") {
|
||||||
|
$c->stash->{view}->delete;
|
||||||
|
$c->res->redirect($c->uri_for($c->controller('Project')->action_for('view'),
|
||||||
|
[$c->stash->{project}->name]));
|
||||||
|
}
|
||||||
txn_do($c->model('DB')->schema, sub {
|
txn_do($c->model('DB')->schema, sub {
|
||||||
updateView($c, $c->stash->{view});
|
updateView($c, $c->stash->{view});
|
||||||
});
|
});
|
||||||
|
@ -123,17 +128,6 @@ sub submit : Chained('view') PathPart('submit') Args(0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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]));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
sub latest : Chained('view') PathPart('latest') {
|
sub latest : Chained('view') PathPart('latest') {
|
||||||
my ($self, $c, @args) = @_;
|
my ($self, $c, @args) = @_;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[% WRAPPER layout.tt title="Admin" %]
|
[% WRAPPER layout.tt title="Admin" %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h2>Machine status</h2>
|
<div class="page-header"><h1>Machine status</h1></div>
|
||||||
|
|
||||||
<table class="table table-condensed table-striped">
|
<table class="table table-condensed table-striped">
|
||||||
[% FOREACH m IN machines %]
|
[% FOREACH m IN machines %]
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
[% WRAPPER layout.tt title="All Builds" %]
|
[% WRAPPER layout.tt title="All builds" %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h1>All Builds
|
<div class="page-header"><h1>All builds
|
||||||
[% IF job %]for Job [% project.name %]:[% jobset.name %]:[% job.name %]
|
[% IF job %]for Job [% project.name %]:[% jobset.name %]:[% job.name %]
|
||||||
[% ELSIF jobset %]for Jobset [% project.name %]:[% jobset.name %]
|
[% ELSIF jobset %]for Jobset [% project.name %]:[% jobset.name %]
|
||||||
[% ELSIF project %] for Project <tt>[% project.name %]</tt>[% END %]</h1>
|
[% ELSIF project %] for Project <tt>[% project.name %]</tt>[% END %]</h1></div>
|
||||||
|
|
||||||
<p>Showing builds [% (page - 1) * resultsPerPage + 1 %] - [% (page - 1) * resultsPerPage + builds.size %]
|
<p>Showing builds [% (page - 1) * resultsPerPage + 1 %] - [% (page - 1) * resultsPerPage + builds.size %]
|
||||||
out of [% total %] in order of descending timestamp.</p>
|
out of [% total %] in order of descending timestamp.</p>
|
||||||
|
|
|
@ -140,9 +140,14 @@
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
[% IF c.user_exists && available %]
|
[% IF c.user_exists && available %]
|
||||||
<form action="[% c.uri_for('/build' build.id 'add-to-release') %]" method="post">
|
<form class="form-horizontal" action="[% c.uri_for('/build' build.id 'add-to-release') %]" method="post">
|
||||||
<p>Add to release: <input type="text" class="string" name="name" />
|
<div class="control-group">
|
||||||
<button type="submit"><img src="/static/images/success.gif" />Apply</button></p>
|
<label class="control-label">Add to release</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" class="input" name="name"></input>
|
||||||
|
<button type="submit" class="btn btn-success">Apply</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
[% USE HTML %]
|
[% USE HTML %]
|
||||||
|
|
||||||
<h1>Channel <tt>[% channelName %]</tt></h1>
|
<div class="page-header"><h1>Channel <tt>[% channelName %]</tt></h1></div>
|
||||||
|
|
||||||
<p>This page provides a <em>channel</em> for the <a
|
<p>This page provides a <em>channel</em> for the <a
|
||||||
href="http://nixos.org/">Nix package manager</a>. If you have Nix
|
href="http://nixos.org/">Nix package manager</a>. If you have Nix
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
[% USE HTML %]
|
[% USE HTML %]
|
||||||
[% edit=1 %]
|
[% edit=1 %]
|
||||||
|
|
||||||
<h1>Clone Build</h1>
|
<div class="page-header"><h1>Clone Build</h1></div>
|
||||||
|
|
||||||
<p>Cloning allows you to perform a build with modified inputs.</p>
|
<p>Cloning allows you to perform a build with modified inputs.</p>
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,7 @@
|
||||||
|
|
||||||
|
|
||||||
[% BLOCK maybeLink -%]
|
[% BLOCK maybeLink -%]
|
||||||
[% IF uri %]<a [% HTML.attributes(href => uri) %][% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>[% content %]</a>[% ELSE; content; END -%]
|
[% IF uri %]<a [% HTML.attributes(href => uri, class => class) %][% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>[% content %]</a>[% ELSE; content; END -%]
|
||||||
[% END -%]
|
[% END -%]
|
||||||
|
|
||||||
[% BLOCK maybeButton -%]
|
[% BLOCK maybeButton -%]
|
||||||
|
@ -198,11 +198,24 @@
|
||||||
|
|
||||||
[% BLOCK renderSelection %]
|
[% BLOCK renderSelection %]
|
||||||
[% IF edit %]
|
[% IF edit %]
|
||||||
<select [% HTML.attributes(id => param, name => param) %]>
|
[% IF radiobuttons %]
|
||||||
[% FOREACH name IN options.keys.sort %]
|
<div class="controls">
|
||||||
<option [% HTML.attributes(value => name) %] [% IF name == curValue; "selected='selected'"; END %]>[% options.$name %]</option>
|
[% FOREACH name IN options.keys.sort %]
|
||||||
[% END %]
|
<label class="radio inline">
|
||||||
</select>
|
<input type="radio" [% HTML.attributes(id => param, name => param, value => name) %]
|
||||||
|
[% IF name == curValue; "checked='1'"; END %]>
|
||||||
|
[% options.$name %]
|
||||||
|
</input>
|
||||||
|
</label>
|
||||||
|
[% END %]
|
||||||
|
</div>
|
||||||
|
[% ELSE %]
|
||||||
|
<select [% HTML.attributes(id => param, name => param) %]>
|
||||||
|
[% FOREACH name IN options.keys.sort %]
|
||||||
|
<option [% HTML.attributes(value => name) %] [% IF name == curValue; "selected='selected'"; END %]>[% options.$name %]</option>
|
||||||
|
[% END %]
|
||||||
|
</select>
|
||||||
|
[% END %]
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
[% options.$curValue %]
|
[% options.$curValue %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
@ -1,57 +1,63 @@
|
||||||
[% WRAPPER layout.tt title=(create ? "New Release" : "Edit Release") %]
|
[% WRAPPER layout.tt title=(create ? "New release" : "Edit release") %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
[% USE HTML %]
|
[% USE HTML %]
|
||||||
|
|
||||||
<h1>[% IF create %]New Release[% ELSE %]Release <tt>[% release.name %]</tt>[% END %]</h1>
|
<div class="page-header"><h1>[% IF create %]New release[% ELSE %]Release <tt>[% release.name %]</tt>[% END %]</h1></div>
|
||||||
|
|
||||||
<form action="[% IF create %][% c.uri_for('/project' project.name 'create-release/submit') %][% ELSE %][% c.uri_for('/release' project.name release.name 'submit') %][% END %]" method="post">
|
<form class="form-horizontal" action="[% IF create %][% c.uri_for('/project' project.name 'create-release/submit') %][% ELSE %][% c.uri_for('/release' project.name release.name 'submit') %][% END %]" method="post">
|
||||||
|
|
||||||
<table class="layoutTable">
|
<fieldset>
|
||||||
<tr>
|
|
||||||
<th>Identifier:</th>
|
<div class="control-group">
|
||||||
<td><input type="text" class="string" name="name" [% HTML.attributes(value => release.name) %] /></td>
|
<label class="control-label">Identifier</label>
|
||||||
</tr>
|
<div class="controls">
|
||||||
<tr>
|
<input type="text" class="span3" name="name" [% HTML.attributes(value => release.name) %]></input>
|
||||||
<th>Description:</th>
|
</div>
|
||||||
<td><input type="text" class="string" name="description" [% HTML.attributes(value => release.description) %] /></td>
|
</div>
|
||||||
</tr>
|
|
||||||
</table>
|
<div class="control-group">
|
||||||
|
<label class="control-label">Description</label>
|
||||||
<h3>Release Members</h3>
|
<div class="controls">
|
||||||
|
<input type="text" class="span3" name="description" [% HTML.attributes(value => release.description) %]></input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>Release members</h3>
|
||||||
|
|
||||||
<p><em>Note:</em> to add a build to this release, go to the build’s
|
<p><em>Note:</em> to add a build to this release, go to the build’s
|
||||||
information page and click on “Add to release”.</p>
|
information page and click on “Add to release”.</p>
|
||||||
|
|
||||||
[% FOREACH m IN release.releasemembers %]
|
[% FOREACH m IN members %]
|
||||||
|
|
||||||
<div class="releaseMember">
|
|
||||||
|
|
||||||
<h4>Build [% m.build.id %] <button type="button" onclick='$(this).parents(".releaseMember").remove()'><img src="/static/images/failure.gif" alt="Delete input" /></button></h4>
|
|
||||||
|
|
||||||
<table class="layoutTable">
|
|
||||||
<tr>
|
|
||||||
<th>Label:</th>
|
|
||||||
<td><input type="text" class="string longString" name="member-[% m.build.id %]-description" [% HTML.attributes(value => m.description) %] /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
<div class="releaseMember control-group">
|
||||||
|
<label class="control-label">Build [% m.build.id %] Label</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" class="span3" name="member-[% m.build.id %]-description" [% HTML.attributes(value => m.description) %]></input>
|
||||||
|
<button class="btn btn-warning" type="button" onclick='$(this).parents(".releaseMember").remove()'><i class="icon-trash icon-white"></i></button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
<hr />
|
<div class="form-actions">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
<p>
|
<i class="icon-ok icon-white"></i>
|
||||||
<button type="submit"><img alt="Apply" src="/static/images/success.gif" />[%IF create %]Create[% ELSE %]Apply changes[% END %]</button>
|
[%IF create %]Create[% ELSE %]Apply changes[% END %]
|
||||||
|
</button>
|
||||||
[% IF !create %]
|
[% IF !create %]
|
||||||
<button id="delete-release" type="submit" name="action" value="delete"><img alt="Delete" src="/static/images/failure.gif" />Delete this release</button>
|
<button id="delete-release" type="submit" class="btn btn-danger" name="action" value="delete">
|
||||||
<script type="text/javascript">
|
<i class="icon-trash icon-white"></i>
|
||||||
$("#delete-release").click(function() {
|
Delete this release
|
||||||
return confirm("Are you sure you want to delete this release?");
|
</button>
|
||||||
});
|
<script type="text/javascript">
|
||||||
</script>
|
$("#delete-release").click(function() {
|
||||||
|
return confirm("Are you sure you want to delete this release?");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
[% END %]
|
[% END %]
|
||||||
</p>
|
</div>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
[% WRAPPER layout.tt title=(create ? "New View" : "View ‘$project.name:$view.name’") %]
|
[% WRAPPER layout.tt title=(create ? "New view" : "View ‘$project.name:$view.name’") %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
[% USE HTML %]
|
[% USE HTML %]
|
||||||
|
|
||||||
<h1>[% IF create %]New View[% ELSE %]View <tt>[% project.name %]:[% view.name %]</tt>[% END %]</h1>
|
<div class="page-header"><h1>[% IF create %]New view[% ELSE %]View <tt>[% project.name %]:[% view.name %]</tt>[% END %]</h1></div>
|
||||||
|
|
||||||
|
|
||||||
[% BLOCK renderJob %]
|
[% BLOCK renderJob %]
|
||||||
<tr id="[% id %]" >
|
<tr id="[% id %]" >
|
||||||
<td>
|
<td>
|
||||||
<button type="button" onclick='$(this).parents("tr").remove()'>
|
<button type="button" class="btn btn-warning" onclick='$(this).parents("tr").remove()'>
|
||||||
<img src="/static/images/failure.gif" alt="Delete job" />
|
<i class="icon-trash icon-white"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
<td><input type="radio" id="[% "$baseName-primary" %]" name="primary" [% IF job.isprimary %]
|
<td><input type="radio" id="[% "$baseName-primary" %]" name="primary" [% IF job.isprimary %]
|
||||||
|
@ -21,19 +21,24 @@
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
|
||||||
<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">
|
<form class="form-horizontal" 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">
|
||||||
|
|
||||||
<table class="layoutTable">
|
|
||||||
<tr>
|
|
||||||
<th>Identifier:</th>
|
|
||||||
<td><input type="text" class="string" name="name" [% HTML.attributes(value => view.name) %] /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Description:</th>
|
|
||||||
<td><input type="text" class="string" name="description" [% HTML.attributes(value => view.description) %] /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Identifier</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" class="span3" name="name" [% HTML.attributes(value => view.name) %]></input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Description</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" class="span3" name="description" [% HTML.attributes(value => view.description) %]></input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table class="tablesorter table table-condensed table-striped">
|
<table class="tablesorter table table-condensed table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -51,12 +56,28 @@
|
||||||
[% n = n + 1 %]
|
[% n = n + 1 %]
|
||||||
[% END %]
|
[% END %]
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="5"><button type="button" class="add-job">Add a new job</button></td>
|
<td colspan="5" style="text-align: center;"><button type="button" class="add-job btn btn-success"><i class="icon-plus icon-white"></i> Add a job</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p><button type="submit"><img src="/static/images/success.gif" />[%IF create %]Create[% ELSE %]Apply changes[% END %]</button></p>
|
<div class="form-actions">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
<i class="icon-ok icon-white"></i>
|
||||||
|
[%IF create %]Create[% ELSE %]Apply changes[% END %]
|
||||||
|
</button>
|
||||||
|
[% IF !create %]
|
||||||
|
<button id="delete-view" type="submit" class="btn btn-danger" name="submit" value="delete">
|
||||||
|
<i class="icon-trash icon-white"></i>
|
||||||
|
Delete this view
|
||||||
|
</button>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$("#delete-view").click(function() {
|
||||||
|
return confirm("Are you sure you want to delete this view?");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
[% END %]
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@ -83,20 +104,5 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
[% IF !create %]
|
|
||||||
|
|
||||||
<form action="[% c.uri_for('/view' project.name view.name 'delete') %]" method="post">
|
|
||||||
<p><button id="delete-project" type="submit"><img src="/static/images/failure.gif" />Delete this view</button></p>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$("#delete-project").click(function() {
|
|
||||||
return confirm("Are you sure you want to delete this view?");
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
[% END %]
|
|
||||||
|
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[% WRAPPER layout.tt title="Error" %]
|
[% WRAPPER layout.tt title="Error" %]
|
||||||
[% USE HTML %]
|
[% USE HTML %]
|
||||||
|
|
||||||
<h1>[% IF httpStatus %][% httpStatus %][% ELSE %]Error[% END %]</h1>
|
<div class="page-header"><h1>[% IF httpStatus %][% httpStatus %][% ELSE %]Error[% END %]</h1></div>
|
||||||
|
|
||||||
<p>I'm very sorry, but the following error(s) occurred:</p>
|
<p>I'm very sorry, but the following error(s) occurred:</p>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[% WRAPPER layout.tt title="Errors" %]
|
[% WRAPPER layout.tt title="Errors" %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h1>Errors</h1>
|
<div class="page-header"><h1>Errors</h1></div>
|
||||||
|
|
||||||
<p>This page provides a quick way to see how FUBARed your packages
|
<p>This page provides a quick way to see how FUBARed your packages
|
||||||
are. It shows job expressions that don’t evaluate properly and jobs
|
are. It shows job expressions that don’t evaluate properly and jobs
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[% WRAPPER layout.tt title="Jobset $project.name:$jobset.name evaluation $eval.id" %]
|
[% WRAPPER layout.tt title="Jobset $project.name:$jobset.name evaluation $eval.id" %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h2>Jobset <tt>[% project.name %]:[% jobset.name %]</tt> evaluation [% eval.id %]</h2>
|
<div class="page-header"><h1>Jobset <tt>[% project.name %]:[% jobset.name %]</tt> evaluation [% eval.id %]</h1></div>
|
||||||
|
|
||||||
[%- IF otherEval -%]
|
[%- IF otherEval -%]
|
||||||
<p>Comparisons are relative to [% INCLUDE renderFullJobsetName
|
<p>Comparisons are relative to [% INCLUDE renderFullJobsetName
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
[% WRAPPER layout.tt title="Jobset ‘$project.name:$jobset.name’ Evaluations" %]
|
[% WRAPPER layout.tt title="Jobset ‘$project.name:$jobset.name’ Evaluations" %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h2>Evaluations of Jobset <tt>[% INCLUDE renderLink
|
<div class="page-header"><h1>Evaluations of Jobset <tt>[% INCLUDE renderLink
|
||||||
uri = c.uri_for(c.controller('Project').action_for('view'), [project.name])
|
uri = c.uri_for(c.controller('Project').action_for('view'), [project.name])
|
||||||
title = project.name %]:[% jobset.name %]</tt></h2>
|
title = project.name %]:[% jobset.name %]</tt></h1></div>
|
||||||
|
|
||||||
<p>Showing evaluations [% (page - 1) * resultsPerPage + 1 %] - [%
|
<p>Showing evaluations [% (page - 1) * resultsPerPage + 1 %] - [%
|
||||||
(page - 1) * resultsPerPage + evals.size %] out of [% total %].</p>
|
(page - 1) * resultsPerPage + evals.size %] out of [% total %].</p>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
[% IF edit %]
|
[% IF edit %]
|
||||||
<form action="[% IF create %][% c.uri_for('/project' project.name 'create-jobset/submit') %][% ELSE %][% c.uri_for('/jobset' project.name jobset.name 'submit') %][% END %]" method="post">
|
<form class="form-horizontal" action="[% IF create %][% c.uri_for('/project' project.name 'create-jobset/submit') %][% ELSE %][% c.uri_for('/jobset' project.name jobset.name 'submit') %][% END %]" method="post">
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
[% BLOCK renderInputAlt %]
|
[% BLOCK renderInputAlt %]
|
||||||
[% IF edit %]
|
[% IF edit %]
|
||||||
<button type="button" onclick='$(this).parents(".inputalt").remove()'><img src="/static/images/failure.gif" alt="Delete value" /></button>
|
<button type="button" class="btn btn-warning" onclick='$(this).parents(".inputalt").remove()'><i class="icon-trash icon-white"></i></button>
|
||||||
[% INCLUDE maybeEditString param=param value=alt.value %]
|
[% INCLUDE maybeEditString param=param value=alt.value %]
|
||||||
<br />
|
<br />
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
<tr class="input [% extraClass %]" [% IF id %]id="[% id %]"[% END %]>
|
<tr class="input [% extraClass %]" [% IF id %]id="[% id %]"[% END %]>
|
||||||
<td>
|
<td>
|
||||||
[% IF edit %]<button type="button" onclick='$(this).parents(".input").remove()'><img src="/static/images/failure.gif" alt="Delete input" /></button>[% END -%]
|
[% IF edit %]<button type="button" class="btn btn-warning" onclick='$(this).parents(".input").remove()'><i class="icon-trash icon-white"></i></button>[% END -%]
|
||||||
<tt>[% INCLUDE maybeEditString param="$baseName-name" value=input.name extraClass="shortString" %]</tt>
|
<tt>[% INCLUDE maybeEditString param="$baseName-name" value=input.name extraClass="shortString" %]</tt>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
[% END %]
|
[% END %]
|
||||||
</tt>
|
</tt>
|
||||||
[% END %]
|
[% END %]
|
||||||
[% IF edit %]<button type="button" onclick='return false' class="add-inputalt">+</button>[% END %]
|
[% IF edit %]<button type="button" class="add-inputalt btn btn-success" onclick='return false'><i class="icon-plus icon-white"></i></button>[% END %]
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
[% END %]
|
[% END %]
|
||||||
[% IF edit %]
|
[% IF edit %]
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3"><button type="button" class="add-input">Add a new input</button></td>
|
<td colspan="3" style="text-align: center;"><button type="button" class="add-input btn btn-success"><i class="icon-plus icon-white"></i> Add a new input</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
[% END %]
|
[% END %]
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -79,6 +79,7 @@
|
||||||
[% END %]
|
[% END %]
|
||||||
<li><a href="#tabs-setup" data-toggle="tab">Setup</a></li>
|
<li><a href="#tabs-setup" data-toggle="tab">Setup</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div id="generic-tabs" class="tab-content">
|
<div id="generic-tabs" class="tab-content">
|
||||||
<div id="tabs-information" class="tab-pane active">
|
<div id="tabs-information" class="tab-pane active">
|
||||||
[% IF !edit && evals.size() > 0 -%]
|
[% IF !edit && evals.size() > 0 -%]
|
||||||
|
@ -151,13 +152,13 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>Enabled:</th>
|
<th>Enabled:</th>
|
||||||
<td>
|
<td>
|
||||||
[% INCLUDE renderSelection param="enabled" curValue=jobset.enabled options={"1" = "Yes", "0" = "No"} %]
|
[% INCLUDE renderSelection param="enabled" curValue=jobset.enabled radiobuttons=1 options={"1" = "Yes", "0" = "No"} %]
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Enable email notification:</th>
|
<th>Enable email notification:</th>
|
||||||
<td>
|
<td>
|
||||||
[% INCLUDE renderSelection param="enableemail" curValue=jobset.enableemail options={"1" = "Yes", "0" = "No"} %]
|
[% INCLUDE renderSelection param="enableemail" curValue=jobset.enableemail radiobuttons=1 options={"1" = "Yes", "0" = "No"} %]
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -254,7 +255,7 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<p><button type="submit"><img src="/static/images/success.gif" />[%IF create %]Create[% ELSE %]Apply changes[% END %]</button></p>
|
<p><button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> [%IF create %]Create[% ELSE %]Apply changes[% END %]</button></p>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[% WRAPPER layout.tt title="Job Status" %]
|
[% WRAPPER layout.tt title="Job status" %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h1>Job Status[% IF project %] of <tt>[% project.name %][% IF jobset %]:[% jobset.name%][% END %][% IF job %]:[% job.name%][% END %]</tt>[% END %]</h1>
|
<div class="page-header"><h1>Job status[% IF project %] of <tt>[% project.name %][% IF jobset %]:[% jobset.name%][% END %][% IF job %]:[% job.name%][% END %]</tt>[% END %]</h1></div>
|
||||||
|
|
||||||
<p>Below are the latest builds for each job. It is ordered by the status
|
<p>Below are the latest builds for each job. It is ordered by the status
|
||||||
change time (the timestamp of the last build that had a different
|
change time (the timestamp of the last build that had a different
|
||||||
|
|
|
@ -108,17 +108,16 @@
|
||||||
|
|
||||||
[% content %]
|
[% content %]
|
||||||
|
|
||||||
</div>
|
<footer class="navbar">
|
||||||
|
<hr />
|
||||||
<div class="navbar navbar-fixed-bottom">
|
<small>
|
||||||
<div id="footer" style="text-align: center;">
|
<em><a href="http://nixos.org/hydra" target="_new">Hydra</a> [% HTML.escape(version) %] (using [% HTML.escape(nixVersion) %]).</em>
|
||||||
<div id="last-modified">
|
Page generated on [% INCLUDE renderDateTime %].
|
||||||
<em><a href="http://nixos.org/hydra" target="_new">Hydra</a> [% HTML.escape(version) %] (using [% HTML.escape(nixVersion) %]).</em>
|
[% IF c.user_exists %]
|
||||||
Page generated on [% INCLUDE renderDateTime %].
|
You are logged in as <tt>[% c.user.username %]</tt>.
|
||||||
[% IF c.user_exists %]
|
[% END %]
|
||||||
You are logged in as <tt>[% c.user.username %]</tt>.
|
</small>
|
||||||
[% END %]
|
</footer>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[% WRAPPER layout.tt title="Logfile" %]
|
[% WRAPPER layout.tt title="Logfile" %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h1>Build log of [% INCLUDE renderFullJobNameOfBuild %] build <a href="[% c.uri_for('/build' build.id) %]">[% build.id %]</a>[%IF step %] step [% step.stepnr %][% END %]</h1>
|
<div class="page-header"><h1>Build log of [% INCLUDE renderFullJobNameOfBuild %] build <a href="[% c.uri_for('/build' build.id) %]">[% build.id %]</a>[%IF step %] step [% step.stepnr %][% END %]</h1></div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
This is the build log of path <tt>[% IF step; step.outpath; ELSE; build.outpath; END %]</tt>.
|
This is the build log of path <tt>[% IF step; step.outpath; ELSE; build.outpath; END %]</tt>.
|
||||||
|
|
|
@ -1,36 +1,39 @@
|
||||||
[% WRAPPER layout.tt title="Login to Hydra" %]
|
[% WRAPPER layout.tt title="Login to Hydra" %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h1>Login</h1>
|
<div class="page-header"><h1>Login</h1></div>
|
||||||
|
|
||||||
|
[% IF errorMsg %]
|
||||||
|
<p class="btn-warning btn-large">Error: [% errorMsg %]</p>
|
||||||
|
[% END %]
|
||||||
|
|
||||||
[% IF c.user_exists %]
|
[% IF c.user_exists %]
|
||||||
<p>
|
<p class="btn-info btn-large">
|
||||||
You are already logged in as <tt>[% c.user.username %]</tt>.
|
You are already logged in as <tt>[% c.user.username %]</tt>.
|
||||||
You can <a href="[% c.uri_for('/logout') %]">logout</a> here.
|
You can <a href="[% c.uri_for('/logout') %]">logout</a> here.
|
||||||
</p>
|
</p>
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
|
|
||||||
[% IF errorMsg %]
|
<form class="form-horizontal" method="post" action="[% c.uri_for('/login') %]">
|
||||||
<p class="error">Error: [% errorMsg %]</p>
|
|
||||||
[% END %]
|
|
||||||
|
|
||||||
<form method="post" action="[% c.uri_for('/login') %]">
|
<fieldset>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">User name</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" class="span3" name="username" value=""></input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table class="layoutTable">
|
<div class="control-group">
|
||||||
<tr>
|
<label class="control-label">Password</label>
|
||||||
<td>Username:</td>
|
<div class="controls">
|
||||||
<td><input type="text" name="username" /></td>
|
<input type="password" class="span3" name="password" value=""></input>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
</div>
|
||||||
<td>Password:</td>
|
|
||||||
<td><input type="password" name="password" /></td>
|
<div class="form-actions">
|
||||||
</tr>
|
<input type="submit" name="login" value="Login" class="btn btn-primary" />
|
||||||
<tr colspan="2">
|
</div>
|
||||||
<td>
|
|
||||||
<input type="submit" name="login" value="Login" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -1,77 +1,90 @@
|
||||||
[% WRAPPER layout.tt title=(create ? "New machine" : "Editing machine '$machine.hostname'") %]
|
[% WRAPPER layout.tt title=(create ? "New machine" : "Editing machine '$machine.hostname'") %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<form action="[% IF create %][% c.uri_for('/admin/create-machine/submit') %][% ELSE %][% c.uri_for('/admin/machine' machine.hostname 'submit') %][% END %]" method="post">
|
<div class="page-header"><h1>[% IF create %]New machine[% ELSE %]Machine <tt>[% machine.hostname %]</tt>[% END %]</h1></div>
|
||||||
|
|
||||||
|
<form class="form-horizontal" method="post"
|
||||||
|
action="[% IF create %][% c.uri_for('/admin/create-machine/submit') %][% ELSE %][% c.uri_for('/admin/machine' machine.hostname 'submit') %][% END %]">
|
||||||
|
|
||||||
<h2>Machine[% IF ! create %] '[% machine.hostname %]'[% END %]</h2>
|
<fieldset>
|
||||||
|
|
||||||
<table class="layoutTable">
|
|
||||||
[% IF create %]
|
[% IF create %]
|
||||||
<tr>
|
<div class="control-group">
|
||||||
<th>Hostname:</th>
|
<label class="control-label">Host name</label>
|
||||||
<td>[% INCLUDE maybeEditString param="hostname" value=machine.hostname %]</td>
|
<div class="controls">
|
||||||
</tr>
|
<input type="text" class="span3" name="hostname" value="[% machine.hostname %]"></input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
[% END %]
|
[% END %]
|
||||||
<tr>
|
|
||||||
<th>Username:</th>
|
<div class="control-group">
|
||||||
<td>[% INCLUDE maybeEditString param="username" value=machine.username %]</td>
|
<label class="control-label">User name</label>
|
||||||
</tr>
|
<div class="controls">
|
||||||
<tr>
|
<input type="text" class="span3" name="username" value="[% machine.username %]"></input>
|
||||||
<th>SSH key location:</th>
|
</div>
|
||||||
<td>[% INCLUDE maybeEditString param="ssh_key" value=machine.ssh_key %]</td>
|
</div>
|
||||||
</tr>
|
|
||||||
<tr>
|
<div class="control-group">
|
||||||
<th>Options:</th>
|
<label class="control-label">SSH key location</label>
|
||||||
<td>
|
<div class="controls">
|
||||||
[% INCLUDE maybeEditString param="options" value=machine.options %]
|
<input type="text" class="span3" name="ssh_key" value="[% machine.ssh_key %]"></input>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
|
||||||
<th>Max concurrent builds:</th>
|
<div class="control-group">
|
||||||
<td><tt>[% INCLUDE maybeEditString param="maxconcurrent" value=machine.maxconcurrent %]</tt></td>
|
<label class="control-label">Options</label>
|
||||||
</tr>
|
<div class="controls">
|
||||||
<tr>
|
<input type="text" class="span3" name="options" value="[% machine.options %]"></input>
|
||||||
<th>Speed factor:</th>
|
</div>
|
||||||
<td>
|
</div>
|
||||||
[% INCLUDE maybeEditString param="speedfactor" value=machine.speedfactor %]
|
|
||||||
</td>
|
<div class="control-group">
|
||||||
</tr>
|
<label class="control-label">Max concurrent builds</label>
|
||||||
<tr>
|
<div class="controls">
|
||||||
<th>Systems:</th>
|
<input type="text" class="span3" name="maxconcurrent" value="[% machine.maxconcurrent %]"></input>
|
||||||
<td>
|
</div>
|
||||||
<select multiple name="systems" style="width: 27em;">
|
</div>
|
||||||
[% FOREACH s IN systemtypes %]
|
|
||||||
<option value="[% s.system %]"
|
<div class="control-group">
|
||||||
[% checked = false %]
|
<label class="control-label">Speed factor</label>
|
||||||
[% FOREACH ms IN machine.buildmachinesystemtypes %]
|
<div class="controls">
|
||||||
[% checked = ms.system == s.system %]
|
<input type="text" class="span3" name="speedfactor" value="[% machine.speedfactor %]"></input>
|
||||||
[% BREAK IF checked %]
|
</div>
|
||||||
[% END %]
|
</div>
|
||||||
[% IF checked %]
|
|
||||||
SELECTED
|
<div class="control-group">
|
||||||
[% END %]
|
<label class="control-label">Systems</label>
|
||||||
>[% s.system %]</option>
|
<div class="controls">
|
||||||
[% END %]
|
<select class="span3" multiple="1" name="systems">
|
||||||
</select>
|
[% FOREACH s IN systemtypes;
|
||||||
</td>
|
checked = false;
|
||||||
</tr>
|
FOREACH ms IN machine.buildmachinesystemtypes;
|
||||||
</table>
|
checked = ms.system == s.system;
|
||||||
|
BREAK IF checked;
|
||||||
|
END %]
|
||||||
|
<option value="[% s.system %]" [% IF checked %]selected="1"[% END %]>[% s.system %]</option>
|
||||||
|
[% END %]
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p><button type="submit"><img src="/static/images/success.gif" />[%IF create %]Create[% ELSE %]Apply changes[% END %]</button></p>
|
<div class="form-actions">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
</form>
|
<i class="icon-ok icon-white"></i>
|
||||||
|
[%IF create %]Create[% ELSE %]Apply changes[% END %]
|
||||||
[% IF !create %]
|
</button>
|
||||||
|
[% IF !create %]
|
||||||
<form action="[% c.uri_for('/admin/machine' machine.hostname 'delete') %]" method="post">
|
<button id="delete-machine" type="submit" class="btn btn-danger" name="submit" value="delete">
|
||||||
<p><button id="delete-machine" type="submit"><img src="/static/images/failure.gif" />Remove this machine</button></p>
|
<i class="icon-trash icon-white"></i>
|
||||||
</form>
|
Delete this machine
|
||||||
|
</button>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#delete-machine").click(function() {
|
$("#delete-machine").click(function() {
|
||||||
return confirm("Are you sure you want to delete this machine?");
|
return confirm("Are you sure you want to delete this machine?");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[% WRAPPER layout.tt title="Machines" %]
|
[% WRAPPER layout.tt title="Machines" %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h1>Build machines</h1>
|
<div class="page-header"><h1>Build machines</h1></div>
|
||||||
|
|
||||||
<table class="table table-condensed table-striped">
|
<table class="table table-condensed table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
<th>Enabled</th>
|
<th>Enabled</th>
|
||||||
<th>Machine</th>
|
<th>Machine</th>
|
||||||
<th>Max concurrent</th>
|
<th>Max concurrent</th>
|
||||||
<th>Speedfactor</th>
|
<th>Speed factor</th>
|
||||||
[% FOREACH s IN systems %]<th>[% s.system %]</th>[% END %]
|
[% FOREACH s IN systems %]<th>[% s.system %]</th>[% END %]
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
[% FOREACH m IN machines %]
|
[% FOREACH m IN machines %]
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" name="enabled" [% IF m.enabled == 1 %]CHECKED[% END %] onclick="window.location='[% IF m.enabled == 1 %][%c.uri_for('/admin/machine' m.hostname 'disable' )%][% ELSE %][%c.uri_for('/admin/machine' m.hostname 'enable' )%][% END %]'"/></td>
|
<td><input type="checkbox" name="enabled" [% IF m.enabled == 1 %]CHECKED[% END %] onclick="window.location='[% IF m.enabled == 1 %][%c.uri_for('/admin/machine' m.hostname 'disable' )%][% ELSE %][%c.uri_for('/admin/machine' m.hostname 'enable' )%][% END %]'"/></td>
|
||||||
<td>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('machine_edit'), [m.hostname]) content = m.hostname %]</td>
|
<td><a href="[% c.uri_for(c.controller('Admin').action_for('machine_edit'), [m.hostname]) %]">[% m.hostname %]</a></td>
|
||||||
<td>[% m.maxconcurrent %]</td>
|
<td>[% m.maxconcurrent %]</td>
|
||||||
<td>[% m.speedfactor %]</td>
|
<td>[% m.speedfactor %]</td>
|
||||||
[% FOREACH s IN systems %]
|
[% FOREACH s IN systems %]
|
||||||
|
@ -36,8 +36,7 @@
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p>[ <a href="[% c.uri_for(c.controller('Admin').action_for('create_machine')) %]">Add a new machine</a> ]</p>
|
<p><a class="btn" href="[% c.uri_for(c.controller('Admin').action_for('create_machine')) %]"><i class="icon-plus"></i> Add a new machine</a></p>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Resulting <tt>/etc/nix.machines</tt> [% IF nixMachinesWritable == 0 %](note: file is not writable!)[% END%]:
|
Resulting <tt>/etc/nix.machines</tt> [% IF nixMachinesWritable == 0 %](note: file is not writable!)[% END%]:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
[% USE String %]
|
[% USE String %]
|
||||||
<h1>News items</h1>
|
<div class="page-header"><h1>News items</h1></div>
|
||||||
|
|
||||||
[% IF newsItems.size == 0 %]
|
[% IF newsItems.size == 0 %]
|
||||||
<p>No news items</p>
|
<p>No news items</p>
|
||||||
|
@ -15,25 +15,29 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>[% INCLUDE renderDateTime timestamp=i.createtime %]</td>
|
<td>[% INCLUDE renderDateTime timestamp=i.createtime %]</td>
|
||||||
<td>[% contents.replace('\n','<br />\n') %]</td>
|
<td>[% contents.replace('\n','<br />\n') %]</td>
|
||||||
<td>[ [% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('news_delete') i.id) content = "Delete" confirmmsg = "Are you sure you want to delete this news item?" %] ]</td>
|
<td>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('news_delete') i.id) content = "Delete" confirmmsg = "Are you sure you want to delete this news item?" class = "btn btn-mini btn-danger" %]</td>
|
||||||
</tr>
|
</tr>
|
||||||
[% END %]
|
[% END %]
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
<form action="[% c.uri_for('/admin/news/submit') %]" method="post">
|
<form class="form-horizontal" action="[% c.uri_for('/admin/news/submit') %]" method="post">
|
||||||
|
<fieldset>
|
||||||
<h2>Add news item</h2>
|
<legend>Add news item</legend>
|
||||||
<p>
|
<div class="control-group">
|
||||||
<textarea class="longString" name="contents"></textarea>
|
<label class="control-label">News text (HTML)</label>
|
||||||
</p>
|
<div class="controls">
|
||||||
<p>
|
<textarea class="span9" name="contents"></textarea>
|
||||||
<button type="submit">Post</button>
|
</div>
|
||||||
</p>
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<div class="form-actions">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
<i class="icon-ok icon-white"></i>
|
||||||
|
Post
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
[% jobset = build.jobset %]
|
[% jobset = build.jobset %]
|
||||||
[% job = build.job %]
|
[% job = build.job %]
|
||||||
|
|
||||||
<h1>[% title %]</h1>
|
<div class="page-header"><h1>[% title %]</h1></div>
|
||||||
|
|
||||||
<div class="buildlog">
|
<div class="buildlog">
|
||||||
[% contents -%]
|
[% contents -%]
|
||||||
|
|
|
@ -133,33 +133,35 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>Enabled:</th>
|
<th>Enabled:</th>
|
||||||
<td>
|
<td>
|
||||||
[% INCLUDE renderSelection param="enabled" curValue=project.enabled options={"1" = "Yes", "0" = "No"} %]
|
[% INCLUDE renderSelection param="enabled" curValue=project.enabled radiobuttons=1 options={"1" = "Yes", "0" = "No"} %]
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
[% IF edit %]
|
[% IF edit %]
|
||||||
|
|
||||||
<p><button type="submit"><img src="/static/images/success.gif" />[%IF create %]Create[% ELSE %]Apply changes[% END %]</button></p>
|
<p>
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
<i class="icon-ok icon-white"></i>
|
||||||
|
[%IF create %]Create[% ELSE %]Apply changes[% END %]
|
||||||
|
</button>
|
||||||
|
[% IF !create %]
|
||||||
|
<button id="delete-project" type="submit" class="btn btn-danger" name="submit" value="delete">
|
||||||
|
<i class="icon-trash icon-white"></i>
|
||||||
|
Delete this project
|
||||||
|
</button>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$("#delete-project").click(function() {
|
||||||
|
return confirm("Are you sure you want to delete this project?");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
[% END %]
|
||||||
|
</p>
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
[% IF !create %]
|
|
||||||
|
|
||||||
<form action="[% c.uri_for('/project' project.name 'delete') %]" method="post">
|
|
||||||
<p><button id="delete-project" type="submit"><img src="/static/images/failure.gif" />Delete this project</button></p>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$("#delete-project").click(function() {
|
|
||||||
return confirm("Are you sure you want to delete this project?");
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
[% END %]
|
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
[% IF !edit %]
|
[% IF !edit %]
|
||||||
|
@ -175,7 +177,7 @@
|
||||||
[% FOREACH view IN views %]
|
[% FOREACH view IN views %]
|
||||||
<li>
|
<li>
|
||||||
<a href="[% c.uri_for('/view' project.name view.name) %]"><tt>[% view.name %]</tt></a>
|
<a href="[% c.uri_for('/view' project.name view.name) %]"><tt>[% view.name %]</tt></a>
|
||||||
[<a href="[% c.uri_for('/view' project.name view.name "edit") %]">Edit</a>]
|
<a class="btn btn-mini" href="[% c.uri_for('/view' project.name view.name "edit") %]">Edit</a>
|
||||||
</li>
|
</li>
|
||||||
[% END %]
|
[% END %]
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -186,7 +188,9 @@
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
<p><a href="[% c.uri_for('/project' project.name 'create-view') %]">[Create a new view]</a></p>
|
<p><a class="btn" href="[% c.uri_for('/project' project.name 'create-view') %]">
|
||||||
|
<i class="icon-plus"></i> Create a new view
|
||||||
|
</a></p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
[% WRAPPER layout.tt title="Queue" %]
|
[% WRAPPER layout.tt title="Queue" %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h1>Hydra Queue</h1>
|
<div class="page-header"><h1>Hydra queue</h1></div>
|
||||||
|
|
||||||
<p>[ <a href="[% c.uri_for('/status') %]">Running build steps</a> ]</p>
|
<p><a class="btn" href="[% c.uri_for('/status') %]">Running build steps</a></p>
|
||||||
|
|
||||||
[% IF flashMsg %]
|
[% IF flashMsg %]
|
||||||
<p class="btn-info btn-large">[% flashMsg %]</p>
|
<p class="btn-info btn-large">[% flashMsg %]</p>
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
[% PROCESS "product-list.tt" %]
|
[% PROCESS "product-list.tt" %]
|
||||||
[% USE HTML %]
|
[% USE HTML %]
|
||||||
|
|
||||||
<h1>Release <tt>[% release.name %]</tt> <a
|
<div class="page-header"><h1>Release <tt>[% release.name %]</tt>
|
||||||
class="smallLink" href="[% c.uri_for('/release' project.name release.name "edit") %]">[Edit]</a></h1>
|
<a class="btn" href="[% c.uri_for('/release' project.name release.name "edit") %]"><i class="icon-edit"></i></a></h1></div>
|
||||||
|
|
||||||
<p><em>Released on [% INCLUDE renderDateTime timestamp =
|
<p><em>Released on [% INCLUDE renderDateTime timestamp =
|
||||||
release.timestamp %].</em></p>
|
release.timestamp %].</em></p>
|
||||||
|
@ -17,11 +17,11 @@ release.timestamp %].</em></p>
|
||||||
|
|
||||||
[% FOREACH m IN members %]
|
[% FOREACH m IN members %]
|
||||||
|
|
||||||
<h2>
|
<h3>
|
||||||
<a href="[% c.uri_for('/build' m.build.id) %]">
|
<a href="[% c.uri_for('/build' m.build.id) %]">
|
||||||
[% HTML.escape(m.description) %]
|
[% HTML.escape(m.description) %]
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h3>
|
||||||
|
|
||||||
[% INCLUDE renderProductList build=m.build %]
|
[% INCLUDE renderProductList build=m.build %]
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
[% USE HTML %]
|
[% USE HTML %]
|
||||||
|
|
||||||
<h1>Releases for Project <tt>[% project.name %]</tt></h1>
|
<div class="page-header"><h1>Releases for Project <tt>[% project.name %]</tt></h1></div>
|
||||||
|
|
||||||
[% IF releases.size == 0 %]
|
[% IF releases.size == 0 %]
|
||||||
|
|
||||||
|
@ -33,9 +33,9 @@
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% IF c.user_exists %]
|
[% IF c.user_exists %]
|
||||||
<p>
|
<p><a class="btn" href="[% c.uri_for('/project' project.name 'create-release') %]">
|
||||||
[<a href="[% c.uri_for('/project' project.name 'create-release') %]">Create a release</a>]
|
<i class="icon-plus"></i> Create a release
|
||||||
</p>
|
</a></p>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[% WRAPPER layout.tt title="Hydra status" %]
|
[% WRAPPER layout.tt title="Hydra status" %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h1>Hydra Status</h1>
|
<div class="page-header"><h1>Hydra status</h1></div>
|
||||||
|
|
||||||
[% INCLUDE hydraStatus %]
|
[% INCLUDE hydraStatus %]
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h1>Hydra timeline of last 24 hours</h1>
|
<div class="page-header"><h1>Hydra timeline of last 24 hours</h1></div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Timeline_urlPrefix="http://simile.mit.edu/timeline/api/";
|
Timeline_urlPrefix="http://simile.mit.edu/timeline/api/";
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'clone') title="Clone jobset" %]
|
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'clone') title="Clone jobset" %]
|
||||||
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'edit') title="Edit jobset" %]
|
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'edit') title="Edit jobset" %]
|
||||||
[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('force_eval'), project.name, jobset.name) content = "Evaluate" confirmmsg = ("Are you sure you want to force evaluation of jobset " _ project.name _ ":" _ jobset.name _ "?") %]
|
[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('force_eval'), project.name, jobset.name) content = "Evaluate" confirmmsg = ("Are you sure you want to force evaluation of jobset " _ project.name _ ":" _ jobset.name _ "?") class = "" %]
|
||||||
[% IF jobset.hidden %]
|
[% IF jobset.hidden %]
|
||||||
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'unhide') title = "Unhide" %]
|
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'unhide') title = "Unhide" %]
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
|
@ -114,8 +114,8 @@
|
||||||
[% INCLUDE makeLink
|
[% INCLUDE makeLink
|
||||||
uri = c.uri_for(c.controller('Job').action_for('errors'), [project.name, jobset.name, job.name])
|
uri = c.uri_for(c.controller('Job').action_for('errors'), [project.name, jobset.name, job.name])
|
||||||
title = "Errors" %]
|
title = "Errors" %]
|
||||||
<li>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('users')) content = "Manage users" %]</li>
|
<li>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('users')) content = "Manage users" class = "" %]</li>
|
||||||
<li>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('news')) content = "Manage news" %]</li>
|
<li>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('news')) content = "Manage news" class = "" %]</li>
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
[% END %]
|
[% END %]
|
||||||
|
@ -174,11 +174,13 @@
|
||||||
[% INCLUDE maybeLink
|
[% INCLUDE maybeLink
|
||||||
uri = c.uri_for(c.controller('Admin').action_for('clearfailedcache'))
|
uri = c.uri_for(c.controller('Admin').action_for('clearfailedcache'))
|
||||||
content = "Clear failed builds cache"
|
content = "Clear failed builds cache"
|
||||||
confirmmsg = "Are you sure you want to clear the failed builds cache?" %]
|
confirmmsg = "Are you sure you want to clear the failed builds cache?"
|
||||||
|
class = "" %]
|
||||||
[% INCLUDE maybeLink
|
[% INCLUDE maybeLink
|
||||||
uri = c.uri_for(c.controller('Admin').action_for('clear_queue_non_current'))
|
uri = c.uri_for(c.controller('Admin').action_for('clear_queue_non_current'))
|
||||||
content = "Clear all non-running old builds from queue."
|
content = "Clear all non-running old builds from queue."
|
||||||
confirmmsg = "Are you sure you want to clear the queue?"
|
confirmmsg = "Are you sure you want to clear the queue?"
|
||||||
|
class = ""
|
||||||
%]
|
%]
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
[% IF c.check_user_roles('admin') %]
|
[% IF c.check_user_roles('admin') %]
|
||||||
|
|
|
@ -14,57 +14,64 @@
|
||||||
>[% role %]</option>
|
>[% role %]</option>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
<form action="[% IF create %][% c.uri_for('/admin/create-user/submit') %][% ELSE %][% c.uri_for('/admin/user' user.username 'submit') %][% END %]" method="post">
|
<div class="page-header"><h1>[% IF create %]New user[% ELSE %]User <tt>[% user.username %]</tt>[% END %]</h1></div>
|
||||||
|
|
||||||
<h2>User[% IF ! create %] '[% user.username %]'[% END %]</h2>
|
<form class="form-horizontal" action="[% IF create %][% c.uri_for('/admin/create-user/submit') %][% ELSE %][% c.uri_for('/admin/user' user.username 'submit') %][% END %]" method="post">
|
||||||
|
|
||||||
<table class="layoutTable">
|
<fieldset>
|
||||||
[% IF create %]
|
[% IF create %]
|
||||||
<tr>
|
<div class="control-group">
|
||||||
<th>Username:</th>
|
<label class="control-label">User name</label>
|
||||||
<td>[% INCLUDE maybeEditString param="username" value=user.username %]</td>
|
<div class="controls">
|
||||||
</tr>
|
<input type="text" class="span3" name="username" value=""></input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
[% END %]
|
[% END %]
|
||||||
<tr>
|
<div class="control-group">
|
||||||
<th>Full name:</th>
|
<label class="control-label">Full name</label>
|
||||||
<td>[% INCLUDE maybeEditString param="fullname" value=user.fullname %]</td>
|
<div class="controls">
|
||||||
</tr>
|
<input type="text" class="span3" name="fullname" [% HTML.attributes(value => user.fullname) %]></input>
|
||||||
<tr>
|
</div>
|
||||||
<th>Email:</th>
|
</div>
|
||||||
<td>[% INCLUDE maybeEditString param="emailaddress" value=user.emailaddress %]</td>
|
<div class="control-group">
|
||||||
</tr>
|
<label class="control-label">Email</label>
|
||||||
<tr>
|
<div class="controls">
|
||||||
<th>Evaluation error notifications:</th>
|
<input type="text" class="span3" name="emailaddress" [% HTML.attributes(value => user.emailaddress) %]></input>
|
||||||
<td>
|
</div>
|
||||||
[% INCLUDE renderSelection param="emailonerror" curValue=user.emailonerror options={"1" = "Yes", "0" = "No"} %]
|
</div>
|
||||||
</td>
|
<div class="control-group">
|
||||||
</tr>
|
<label class="control-label">Evaluation error notifications</label>
|
||||||
<tr>
|
[% INCLUDE renderSelection param="emailonerror" curValue=user.emailonerror radiobuttons=1 options={"1" = "Yes", "0" = "No"} %]
|
||||||
<th>Roles:</th>
|
</div>
|
||||||
<td>
|
<div class="control-group">
|
||||||
<select multiple name="roles" style="width: 27em;">
|
<label class="control-label">Roles</label>
|
||||||
[% INCLUDE roleoption role="admin" %]
|
<div class="controls">
|
||||||
[% INCLUDE roleoption role="create-project" %]
|
<select multiple name="roles" class="span3">
|
||||||
</select>
|
[% INCLUDE roleoption role="admin" %]
|
||||||
</td>
|
[% INCLUDE roleoption role="create-project" %]
|
||||||
</tr>
|
</select>
|
||||||
</table>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p><button type="submit"><img src="/static/images/success.gif" />[%IF create %]Create[% ELSE %]Apply changes[% END %]</button></p>
|
<div class="form-actions">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
<i class="icon-ok icon-white"></i>
|
||||||
|
[%IF create %]Create[% ELSE %]Apply changes[% END %]
|
||||||
|
</button>
|
||||||
|
[% IF !create %]
|
||||||
|
<button id="delete-user" type="submit" class="btn btn-danger" name="submit" value="delete">
|
||||||
|
<i class="icon-trash icon-white"></i>
|
||||||
|
Delete this user
|
||||||
|
</button>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$("#delete-user").click(function() {
|
||||||
|
return confirm("Are you sure you want to delete this user?");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
[% END %]
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
[% IF !create %]
|
|
||||||
|
|
||||||
<form action="[% c.uri_for('/admin/user' user.hostname 'delete') %]" method="post">
|
|
||||||
<p><button id="delete-user" type="submit"><img src="/static/images/failure.gif" />Remove this user</button></p>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$("#delete-user").click(function() {
|
|
||||||
return confirm("Are you sure you want to delete this user?");
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
[% END %]
|
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[% WRAPPER layout.tt title="Users" %]
|
[% WRAPPER layout.tt title="Users" %]
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h1>Users</h1>
|
<div class="page-header"><h1>Users</h1></div>
|
||||||
|
|
||||||
<table class="table table-striped table-condensed">
|
<table class="table table-striped table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -17,18 +17,20 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
[% FOREACH u IN users %]
|
[% FOREACH u IN users %]
|
||||||
<tr>
|
<tr>
|
||||||
<td>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('user_edit'), [u.username]) content = u.username %]</td>
|
<td><a href="[% c.uri_for(c.controller('Admin').action_for('user_edit'), [u.username]) %]">[% u.username %]</a></td>
|
||||||
<td>[% u.fullname %]</td>
|
<td>[% u.fullname %]</td>
|
||||||
<td>[% u.emailaddress %]</td>
|
<td>[% u.emailaddress %]</td>
|
||||||
<td>[% FOREACH r IN u.userroles %]<i>[% r.role %]</i> [% END %]</td>
|
<td>[% FOREACH r IN u.userroles %]<i>[% r.role %]</i> [% END %]</td>
|
||||||
<td>[% IF u.emailonerror %]Yes[% ELSE %]No[% END %]</td>
|
<td>[% IF u.emailonerror %]Yes[% ELSE %]No[% END %]</td>
|
||||||
<td>[ [% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('reset_password'), [u.username]) content = "Reset password" confirmmsg = "Are you sure you want to reset the password for this user?" %] ]</td>
|
<td>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('reset_password'), [u.username]) content = "Reset password" confirmmsg = "Are you sure you want to reset the password for this user?" class = "btn btn-mini" %]</td>
|
||||||
</tr>
|
</tr>
|
||||||
[% END %]
|
[% END %]
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p>[ <a href="[% c.uri_for(c.controller('Admin').action_for('create_user')) %]">Add a new user</a> ]</p>
|
<p><a class="btn" href="[% c.uri_for(c.controller('Admin').action_for('create_user')) %]">
|
||||||
|
<i class="icon-plus"></i> Add a new user
|
||||||
|
</a></p>
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
[% PROCESS "product-list.tt" %]
|
[% PROCESS "product-list.tt" %]
|
||||||
[% USE HTML %]
|
[% USE HTML %]
|
||||||
|
|
||||||
<h1>View <tt>[% view.project.name %]:[% view.name %]</tt> result [% result.id %][% IF result.releasename %] (<tt>[% result.releasename %]</tt>)[% END %]</h1>
|
<div class="page-header"><h1>View <tt>[% view.project.name %]:[% view.name %]</tt> result [% result.id %][% IF result.releasename %] (<tt>[% result.releasename %]</tt>)[% END %]</h1></div>
|
||||||
|
|
||||||
<p><em>Finished building on [% INCLUDE renderDateTime timestamp = result.timestamp %].</em></p>
|
<p><em>Finished building on [% INCLUDE renderDateTime timestamp = result.timestamp %].</em></p>
|
||||||
|
|
||||||
|
@ -46,11 +46,13 @@
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% IF c.user_exists %]
|
[% IF c.user_exists %]
|
||||||
<p>
|
<p>
|
||||||
[<a href="[% c.uri_for('/view' project.name view.name result.id 'release') %]">Release</a>]
|
<a class="btn" href="[% c.uri_for('/view' project.name view.name result.id 'release') %]">Release</a>
|
||||||
</p>
|
</p>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
[% USE HTML %]
|
[% USE HTML %]
|
||||||
|
|
||||||
<h1>View <tt>[% view.project.name %]:[% view.name %]</tt></h1>
|
<div class="page-header"><h1>View <tt>[% view.project.name %]:[% view.name %]</tt></h1></div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
[<a href="[% c.uri_for('/view' project.name view.name "edit") %]">Edit</a>]
|
<a class="btn" href="[% c.uri_for('/view' project.name view.name "edit") %]"><i class="icon-edit"></i> Edit</a>
|
||||||
[<a href="[% c.uri_for('/view' project.name view.name "latest") %]">Latest</a>]
|
<a class="btn" href="[% c.uri_for('/view' project.name view.name "latest") %]"><i class="icon-share-alt"></i> Latest</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>Showing results [% (page - 1) * resultsPerPage + 1 %] - [% (page - 1) * resultsPerPage + results.size %] out of [% totalResults %].</p>
|
<p>Showing results [% (page - 1) * resultsPerPage + 1 %] - [% (page - 1) * resultsPerPage + results.size %] out of [% totalResults %].</p>
|
||||||
|
@ -65,8 +65,12 @@
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pager">
|
<ul class="pager">
|
||||||
|
[% IF page > 1 %]
|
||||||
<li class="previous"><a href="[% "$baseUri?page="; (page - 1) %]">Prev</a></li>
|
<li class="previous"><a href="[% "$baseUri?page="; (page - 1) %]">Prev</a></li>
|
||||||
|
[% END %]
|
||||||
|
[% IF page * resultsPerPage < totalResults %]
|
||||||
<li class="next"><a href="[% "$baseUri?page="; (page + 1) %]">Next</a></li>
|
<li class="next"><a href="[% "$baseUri?page="; (page + 1) %]">Next</a></li>
|
||||||
|
[% END %]
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
Loading…
Reference in a new issue