Add a dashboard
[?]
Oct 14, 2013, 6:07 PM
KSBB33RE2PK5SFN7ZMOTZJQHZB4JYIIUUKWDSD3LSZ5GD465AJHQCDependencies
- [2]
N4ODPYP7Job page: Remove channel tab - [3]
FTPCV25MStore aggregate members in the database - [4]
SS4TZXNUDistinguish between permanent evaluation errors and transient input errors - [5]
JATC3WQYMake actions dropdown easier to find by making the dropdown title bold - [6]
C3AG65SWAdd one-shot jobsets - [7]
X27GNHDV* Basic job info in the database. - [8]
FGQPXZIXhydra: make nr of build to keep configurable per jobset - [9]
Y6AHH4THRemove the logfile and logSize columns from the database - [10]
ODNCGFQ5* Improved the navigation bar: don't include all projects (since that - [11]
3HCBU2FA - [12]
P5X4P6VK* Renaming "release sets" to "views" (not finished yet). Having - [13]
OEPUOUNBUsing twitter bootstrap for more consistent looks for Hydra - [14]
JTRG7RDQadd support for git as jobinput - [15]
S5PV6IIM* Represent jobs explicitly in the DB. - [16]
QTFVCDIFadded hide feature for project/jobset - [17]
YTIDBFGUDrop unused "disabled" columns - [18]
LZVO64YGMerge in the first bits of the API work - [19]
PCKLFRT5Support push notification of repository changes - [20]
EVYSAFB2Transpose the aggregate constituents table - [21]
E7M2WP7ARemove unused Jobs columns - [22]
JM3DPYOMgenerated schema with new dbix class schema loader, grrrrrr - [23]
4D4U5IPY* Allow jobsets to be disabled. - [24]
RFE6T5LG* Store jobset evaluations in the database explicitly. This includes - [25]
S6OISBQ3* Mark the "current" builds in a jobset, i.e. those corresponding to - [26]
SB2V735VKeep track of the database schema version - [27]
RBNQKATL* Adding persistant releases. A release is a named set of builds. - [28]
KN3VYE5P* Cleaned up the foreign key constraints. - [29]
AHTEIK7G* Added a maintainers field to the Builds table. - [30]
S5GCSCNSUpdate bootstrap to 2.3.1 - [31]
ZWCTAZGLadded newsitems, added some admin options to clear various caches. - [32]
PZL3SZM3Give every page a consistent title - [33]
GEADFVZ5hydra-queue-runner: Improved scheduling - [34]
7ZQAHJQMFix indentation - [35]
QLOLZHRXAllow a per-jobset check interval - [*]
DEMSSSB2* Controller for jobs which inherits all actions in ListBuilds. So - [*]
CQQSJLONOn aggregate job pages, show a matrix showing all the constituent builds - [*]
UWVMQIAC* Refactoring. - [*]
XJRJ4J7MAdd user registration - [*]
D5QIOJGP* Move everything up one directory. - [*]
S66BOMVU* Added authentication. - [*]
IK53RV4V - [*]
JIJDYWPYRemove the Build menu from the top bar - [*]
OIBSCXGIUse a popover to show how to use the build reproduction script - [*]
QCGCX2BRGeneralize lazy tabs - [*]
J5UVLXOK* Start of a basic Catalyst web interface. - [*]
2P7VNAACMove common Javascript code into a separate file - [*]
QL55ECJ6- adapted ui for hydra, more in line with nixos.org website - [*]
2G63HKCHFix some wellformedness issues - [*]
JZVRK5QJGroup some menu items together under a "Status" menu - [*]
N22GPKYT* Put info about logs / build products in the DB. - [*]
FANTYCR7Materialize the number of finished builds
Change contents
- edit in src/lib/Hydra/Controller/Job.pm at line 63
$c->stash->{starred} = $c->user->starredjobs({ project => $c->stash->{project}->name, jobset => $c->stash->{jobset}->name, job => $c->stash->{job}->name})->count == 1 if $c->user_exists; - edit in src/lib/Hydra/Controller/Job.pm at line 80
}sub star : Chained('job') PathPart('star') Args(0) {my ($self, $c) = @_;requirePost($c);requireUser($c);my $args ={ project => $c->stash->{project}->name, jobset => $c->stash->{jobset}->name, job => $c->stash->{job}->name};if ($c->request->params->{star} eq "1") {$c->user->starredjobs->update_or_create($args);} else {$c->user->starredjobs->find($args)->delete;}$c->stash->{resource}->{success} = 1; - edit in src/lib/Hydra/Controller/User.pm at line 270
- edit in src/lib/Hydra/Controller/User.pm at line 272
sub dashboard :Chained('user') :Args(0) {my ($self, $c) = @_;$c->stash->{template} = 'dashboard.tt'; - edit in src/lib/Hydra/Controller/User.pm at line 276
# Get the N most recent builds for each starred job.$c->stash->{starredJobs} = [];foreach my $j ($c->stash->{user}->starredjobs->search({}, { order_by => ['project', 'jobset', 'job'] })) {my @builds = $j->job->builds->search({ },{ rows => 20, order_by => "id desc" });push $c->stash->{starredJobs}, { job => $j->job, builds => [@builds] };}} - edit in src/lib/Hydra/Schema/Jobs.pm at line 139
=head2 starredjobsType: has_manyRelated object: L<Hydra::Schema::StarredJobs> - edit in src/lib/Hydra/Schema/Jobs.pm at line 146
=cut - replacement in src/lib/Hydra/Schema/Jobs.pm at line 148
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-06-13 01:54:50# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:t2CCfUjFEz/lO4szROz1AQ__PACKAGE__->has_many("starredjobs","Hydra::Schema::StarredJobs",{"foreign.job" => "self.name","foreign.jobset" => "self.jobset","foreign.project" => "self.project",},undef,);# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-10-14 15:46:29# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uYKWjewvKBEAuK53u7vKuw - edit in src/lib/Hydra/Schema/Jobsets.pm at line 288
=head2 starredjobsType: has_many - edit in src/lib/Hydra/Schema/Jobsets.pm at line 293
Related object: L<Hydra::Schema::StarredJobs> - replacement in src/lib/Hydra/Schema/Jobsets.pm at line 295
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-09-25 14:10:28# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cAZ4+c7OhqGW8ATru8Foiw=cut__PACKAGE__->has_many("starredjobs","Hydra::Schema::StarredJobs",{"foreign.jobset" => "self.name","foreign.project" => "self.project",},undef,); - edit in src/lib/Hydra/Schema/Jobsets.pm at line 307
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-10-14 15:46:29# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DTAGxP5RFvcNxP/ciJGo4Q - edit in src/lib/Hydra/Schema/Projects.pm at line 228
=head2 starredjobsType: has_manyRelated object: L<Hydra::Schema::StarredJobs> - edit in src/lib/Hydra/Schema/Projects.pm at line 235
=cut__PACKAGE__->has_many("starredjobs","Hydra::Schema::StarredJobs",{ "foreign.project" => "self.name" },undef,); - replacement in src/lib/Hydra/Schema/Projects.pm at line 285
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-06-13 01:54:50# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RffghAo9jAaqYk41y1Sdqw# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-10-14 15:46:29# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PdNQ2mf5azBB6nI+iAm8fQ - file addition: StarredJobs.pm[41.477]
use utf8;package Hydra::Schema::StarredJobs;# Created by DBIx::Class::Schema::Loader# DO NOT MODIFY THE FIRST PART OF THIS FILE=head1 NAMEHydra::Schema::StarredJobs=cutuse strict;use warnings;use base 'DBIx::Class::Core';=head1 COMPONENTS LOADED=over 4=item * L<Hydra::Component::ToJSON>=back=cut__PACKAGE__->load_components("+Hydra::Component::ToJSON");=head1 TABLE: C<StarredJobs>=cut__PACKAGE__->table("StarredJobs");=head1 ACCESSORS=head2 usernamedata_type: 'text'is_foreign_key: 1is_nullable: 0=head2 projectdata_type: 'text'is_foreign_key: 1is_nullable: 0=head2 jobsetdata_type: 'text'is_foreign_key: 1is_nullable: 0=head2 jobdata_type: 'text'is_foreign_key: 1is_nullable: 0=cut__PACKAGE__->add_columns("username",{ data_type => "text", is_foreign_key => 1, is_nullable => 0 },"project",{ data_type => "text", is_foreign_key => 1, is_nullable => 0 },"jobset",{ data_type => "text", is_foreign_key => 1, is_nullable => 0 },"job",{ data_type => "text", is_foreign_key => 1, is_nullable => 0 },);=head1 PRIMARY KEY=over 4=item * L</username>=item * L</project>=item * L</jobset>=item * L</job>=back=cut__PACKAGE__->set_primary_key("username", "project", "jobset", "job");=head1 RELATIONS=head2 jobType: belongs_toRelated object: L<Hydra::Schema::Jobs>=cut__PACKAGE__->belongs_to("job","Hydra::Schema::Jobs",{ jobset => "jobset", name => "job", project => "project" },{ is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },);=head2 jobsetType: belongs_toRelated object: L<Hydra::Schema::Jobsets>=cut__PACKAGE__->belongs_to("jobset","Hydra::Schema::Jobsets",{ name => "jobset", project => "project" },{ is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },);=head2 projectType: belongs_toRelated object: L<Hydra::Schema::Projects>=cut__PACKAGE__->belongs_to("project","Hydra::Schema::Projects",{ name => "project" },{ is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },);=head2 usernameType: belongs_toRelated object: L<Hydra::Schema::Users>=cut__PACKAGE__->belongs_to("username","Hydra::Schema::Users",{ username => "username" },{ is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },);# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-10-14 15:46:29# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:naj5aKWuw8hLE6klmvW9Eg# You can replace this text with custom code or comments, and it will be preserved on regeneration1; - edit in src/lib/Hydra/Schema/Users.pm at line 137
=head2 starredjobsType: has_manyRelated object: L<Hydra::Schema::StarredJobs> - edit in src/lib/Hydra/Schema/Users.pm at line 144
=cut__PACKAGE__->has_many("starredjobs","Hydra::Schema::StarredJobs",{ "foreign.username" => "self.username" },undef,); - replacement in src/lib/Hydra/Schema/Users.pm at line 179
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-06-13 01:54:50# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hy3MKvFxfL+1bTc7Hcb1zA# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-10-14 15:46:29# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Hv9Ukqud0d3uIUot0ErKeg - edit in src/root/common.tt at line 461
- edit in src/root/common.tt at line 463
BLOCK makeStar %]<span class="star" data-post="[% starUri %]">[% IF starred; "★"; ELSE; "☆"; END %]</span>[% END; - file addition: dashboard.tt[41.1486]
[% WRAPPER layout.tt title="Dashboard" %][% PROCESS common.tt %]<ul class="nav nav-tabs"><li class="active"><a href="#tabs-starred-jobs" data-toggle="tab">Starred jobs</a></li></ul><div id="generic-tabs" class="tab-content"><div id="tabs-starred-jobs" class="tab-pane active">[% IF starredJobs.size > 0 %]<p>Below are the 20 most recent builds of your starred jobs.</p><table class="table table-striped table-condensed"><thead><tr><th>Job</th></tr></thead><tdata>[% FOREACH j IN starredJobs %]<tr><td>[% INCLUDE renderFullJobName project=j.job.get_column('project') jobset=j.job.get_column('jobset') job=j.job.name %]</td>[% FOREACH b IN j.builds %]<td><a href="[% c.uri_for('/build' b.id) %]">[% INCLUDE renderBuildStatusIcon size=16 build=b %]</a></td>[% END %]</tr>[% END %]</tdata></table>[% ELSE %]<div class="alert alert-warning">You have no starred jobs. You can add them by visiting a job page and clicking on the ☆ icon.</div>[% END %]</div></div>[% END %] - replacement in src/root/job.tt at line 1
[% WRAPPER layout.tt title="Job $project.name:$jobset.name:$job.name" %][% WRAPPER layout.tttitle="Job $project.name:$jobset.name:$job.name"starUri=c.uri_for(c.controller('Job').action_for('star'), c.req.captures)%] - replacement in src/root/layout.tt at line 85
<h1><small>[% HTML.escape(title) %]</small></h1><h1><small>[% IF c.user_exists && starUri; INCLUDE makeStar; " "; END; HTML.escape(title) %]</small></h1> - replacement in src/root/static/css/hydra.css at line 100
font-weight:bold;font-weight: bold;}.star {color: black;font-size: 110%; - edit in src/root/static/css/hydra.css at line 107[7.298]
.star:hover {cursor: pointer;} - edit in src/root/static/js/common.js at line 83
$(".star").click(function(event) {var star = $(this);var active = star.text() != '★';requestJSON({url: star.attr("data-post"),data: active ? "star=1" : "star=0",type: 'POST',success: function(res) {if (active) {star.text('★');} else {star.text('☆');}}});}); - edit in src/root/topbar.tt at line 11
[% IF c.user_exists %][% INCLUDE menuItem uri = c.uri_for(c.controller('User').action_for('dashboard'), [c.user.username]) title = "Dashboard" %][% END %] - edit in src/sql/hydra.sql at line 535[3.6000][53.1368]
create table StarredJobs (userName text not null,project text not null,jobset text not null,job text not null,primary key (userName, project, jobset, job),foreign key (userName) references Users(userName) on update cascade on delete cascade,foreign key (project) references Projects(name) on update cascade on delete cascade,foreign key (project, jobset) references Jobsets(project, name) on update cascade on delete cascade,foreign key (project, jobset, job) references Jobs(project, jobset, name) on update cascade on delete cascade); - file addition: upgrade-23.sql[41.3004]
create table StarredJobs (userName text not null,project text not null,jobset text not null,job text not null,primary key (userName, project, jobset, job),foreign key (userName) references Users(userName) on update cascade on delete cascade,foreign key (project) references Projects(name) on update cascade on delete cascade,foreign key (project, jobset) references Jobsets(project, name) on update cascade on delete cascade,foreign key (project, jobset, job) references Jobs(project, jobset, name) on update cascade on delete cascade);