From 5ce80932539f7326562fef8aa290560d3433c95f Mon Sep 17 00:00:00 2001 From: Henrik Hodne Date: Wed, 10 Jul 2013 18:52:07 -0700 Subject: [PATCH] Show annotations on the job page --- assets/scripts/app/controllers/job.coffee | 1 + assets/scripts/app/templates/jobs/show.hbs | 6 ++++++ assets/scripts/app/views/job.coffee | 1 + assets/styles/main/annotations.sass | 16 ++++++++++++++++ 4 files changed, 24 insertions(+) create mode 100644 assets/styles/main/annotations.sass diff --git a/assets/scripts/app/controllers/job.coffee b/assets/scripts/app/controllers/job.coffee index 3f94343c..262081fd 100644 --- a/assets/scripts/app/controllers/job.coffee +++ b/assets/scripts/app/controllers/job.coffee @@ -5,6 +5,7 @@ Travis.JobController = Em.Controller.extend repoBinding: 'controllers.repo.repo' commitBinding: 'job.commit' lineNumberBinding: 'controllers.repo.lineNumber' + annotationsBinding: 'job.annotations' currentItemBinding: 'job' diff --git a/assets/scripts/app/templates/jobs/show.hbs b/assets/scripts/app/templates/jobs/show.hbs index a3c62f4d..ff06f46b 100644 --- a/assets/scripts/app/templates/jobs/show.hbs +++ b/assets/scripts/app/templates/jobs/show.hbs @@ -48,6 +48,12 @@
{{formatConfig job.config}}
+
+ {{#each annotation in view.annotations}} +
{{annotation.providerName}}: {{annotation.description}}
+ {{/each}} +
+ {{view Travis.LogView jobBinding="job"}} {{else}} diff --git a/assets/scripts/app/views/job.coffee b/assets/scripts/app/views/job.coffee index 9027ebf7..81ab5ed6 100644 --- a/assets/scripts/app/views/job.coffee +++ b/assets/scripts/app/views/job.coffee @@ -19,6 +19,7 @@ Travis.reopen repoBinding: 'controller.repo' jobBinding: 'controller.job' commitBinding: 'job.commit' + annotationsBinding: 'job.annotations' currentItemBinding: 'job' diff --git a/assets/styles/main/annotations.sass b/assets/styles/main/annotations.sass new file mode 100644 index 00000000..35b8c562 --- /dev/null +++ b/assets/styles/main/annotations.sass @@ -0,0 +1,16 @@ +@import "_mixins/all" + +#annotations + margin: 0 0 0 12px + padding: 12px 0 0 0 + border-top: 1px solid $gray-dark-3 + @include clearfix + + a + text-decoration: underline + + .annotation + float: left + min-height: 25px + margin: 0 +