[Collab-qa-commits] r1129 - in svnbuildstat/trunk: lib/SvnBuildStat/Controller root/src root/src/maintainers
goneri at alioth.debian.org
goneri at alioth.debian.org
Mon Aug 25 20:57:59 UTC 2008
Author: goneri
Date: 2008-08-25 20:57:57 +0000 (Mon, 25 Aug 2008)
New Revision: 1129
Modified:
svnbuildstat/trunk/lib/SvnBuildStat/Controller/Packages.pm
svnbuildstat/trunk/root/src/maintainers/main.tt2
svnbuildstat/trunk/root/src/ttsite.css
Log:
Modified: svnbuildstat/trunk/lib/SvnBuildStat/Controller/Packages.pm
===================================================================
--- svnbuildstat/trunk/lib/SvnBuildStat/Controller/Packages.pm 2008-08-25 20:10:43 UTC (rev 1128)
+++ svnbuildstat/trunk/lib/SvnBuildStat/Controller/Packages.pm 2008-08-25 20:57:57 UTC (rev 1129)
@@ -82,7 +82,49 @@
}
+sub listByTeam : Local {
+ my ( $self, $c, $team_id ) = @_;
+ die unless $team_id =~ /^\d+$/;
+
+ my $dbh = $c->model('DB')->storage->dbh;
+
+ my $package_hashref = $dbh->selectall_hashref("
+SELECT
+ sourcepackage.name AS name, sourcepackage.id AS sourcepackage_id, changelogentry.id AS changelogentry_id, changelogentry.dscuri, changelogentry.isnative, changelogentry.isindebian, count(buildall.id) AS buildallcount, count(buildok.isbuildok) AS buildokcount, repositoryentry.issyncedwithupstream, repositoryentry.iswatchfilebroken
+FROM
+ repository, sourcepackage, changelogentry, repositoryentry
+ LEFT OUTER JOIN build AS buildall
+ ON
+ repositoryentry.changelogentry_id=buildall.changelogentry_id
+ LEFT OUTER JOIN build AS buildok
+ ON
+ repositoryentry.changelogentry_id=buildok.changelogentry_id AND buildok.isbuildok=true
+WHERE
+ repositoryentry.repository_id=repository.id
+ AND
+ repository.team_id=4
+ AND
+ repositoryentry.changelogentry_id=changelogentry.id
+ AND
+ repositoryentry.sourcepackage_id=sourcepackage.id
+ GROUP BY sourcepackage.name, sourcepackage.id, changelogentry.id, changelogentry.dscuri, changelogentry.isnative, changelogentry.isindebian, repositoryentry.issyncedwithupstream, repositoryentry.iswatchfilebroken
+
+ ", 1);
+
+ # TODO find a way to merge the Team view and the par Maintainer view related to the team
+ # TODO maybe by adding a team.email entry
+ my $name_arrayref = $dbh->selectall_arrayref("SELECT name FROM team WHERE id='$team_id'");
+ $c->stash->{maintainer}->{name} = $name_arrayref->[0][0];
+
+ $c->stash->{packages} = preparePackages($dbh, $package_hashref);
+
+ $c->stash->{template} = 'packages/listByMaintainer.tt2';
+
+
+ }
+
+
sub preparePackages : Private {
my ($dbh, $package_hashref) = @_;
@@ -252,7 +294,6 @@
$c->stash->{"changelogs"} = [];
foreach my $changelogentry_id (keys %$changelogsinfo) {
my %h;
- $h{builds} = [];
foreach (keys %{$changelogsinfo->{$changelogentry_id}}) {
$h{$_} = $changelogsinfo->{$changelogentry_id}->{$_};
}
@@ -288,6 +329,10 @@
foreach my $qaresultentry_id (keys %{$qaresultentrysinfo}) {
push @{$buildsinfo->{$build_id}->{qaresultentrys}}, $qaresultentrysinfo->{$qaresultentry_id};
}
+ if ($buildsinfo->{$build_id} and !exists($h{builds})) {
+ $h{builds} = [];
+
+ }
push @{$h{builds}}, $buildsinfo->{$build_id};
}
Modified: svnbuildstat/trunk/root/src/maintainers/main.tt2
===================================================================
--- svnbuildstat/trunk/root/src/maintainers/main.tt2 2008-08-25 20:10:43 UTC (rev 1128)
+++ svnbuildstat/trunk/root/src/maintainers/main.tt2 2008-08-25 20:57:57 UTC (rev 1129)
@@ -12,7 +12,7 @@
[% # Display each book in a table row %]
[% FOREACH maintainer IN maintainers -%]
<tr>
- <td><a href="[% Catalyst.uri_for('/packages/listByMaintainer/') _ maintainer.email %]"><strong>[% maintainer.name %]</strong></a></td>
+ <td><a href="[% Catalyst.uri_for('/packages/list/') _ maintainer.email %]"><strong>[% maintainer.name %]</strong></a></td>
<td><a href="http://qa.debian.org/developer.php?login=[% maintainer.email %]">QA</a></td>
</tr>
[% END -%]
Modified: svnbuildstat/trunk/root/src/ttsite.css
===================================================================
--- svnbuildstat/trunk/root/src/ttsite.css 2008-08-25 20:10:43 UTC (rev 1128)
+++ svnbuildstat/trunk/root/src/ttsite.css 2008-08-25 20:57:57 UTC (rev 1129)
@@ -265,10 +265,7 @@
.changelogentry
{
-
- padding: 0.5ex;
- border: 1px dotted;
- margin: 3ex;
+ max-width:800px;
}
.changelogtext
@@ -277,6 +274,7 @@
padding: 0.5ex;
margin: 3ex;
+ border: 0.1px dotted;
background: #e6dede;
}
More information about the Collab-qa-commits
mailing list