# HG changeset patch # User osimons # Date 1287650476 0 # Node ID a68027e2245d2f458056fb3546095b866130e37e # Parent e695efec5b2817c26572cb069607d6d524fdbf69 Add 'Platform' name to build report for web display and notifications. Fixes #541 and #633. diff --git a/bitten/notify.py b/bitten/notify.py --- a/bitten/notify.py +++ b/bitten/notify.py @@ -12,7 +12,7 @@ from trac.config import BoolOption from trac.notification import NotifyEmail from bitten.api import IBuildListener -from bitten.model import Build, BuildStep, BuildLog +from bitten.model import Build, BuildStep, BuildLog, TargetPlatform class BittenNotify(Component): @@ -123,6 +123,7 @@ def template_data(self): failed_steps = BuildStep.select(self.env, build=self.build.id, status=BuildStep.FAILURE) + platform = TargetPlatform.fetch(self.env, id=self.build.platform) change = self.get_changeset() return { 'build': { @@ -130,6 +131,7 @@ 'status': self.readable_states[self.build.status], 'link': self.build_link(), 'config': self.build.config, + 'platform': getattr(platform, 'name', 'unknown'), 'slave': self.build.slave, 'failed_steps': [{ 'name': step.name, diff --git a/bitten/templates/bitten_build.html b/bitten/templates/bitten_build.html --- a/bitten/templates/bitten_build.html +++ b/bitten/templates/bitten_build.html @@ -28,6 +28,10 @@