Skip to content

Commit

Permalink
change recent build style, apply setting show instructions on now builds
Browse files Browse the repository at this point in the history
  • Loading branch information
shanzi committed Jun 1, 2015
1 parent bc13154 commit 06f1068
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
7 changes: 7 additions & 0 deletions www/md_base/src/app/home/home.route.coffee
Expand Up @@ -27,6 +27,13 @@ class State extends Config
name: 'lock_panels'
caption: 'Lock panels'
default_value: true
,
type: 'integer'
name: 'n_recent_builds'
caption: 'Number of recent builds'
default_value: 6
max_value: 20
min_value: 3
,
type: 'hidden'
name: 'panels'
Expand Down
Expand Up @@ -12,10 +12,12 @@ class RecentBuilds extends Directive
class _RecentBuilds extends Controller
showBuilders: true
builds: []
constructor: ($scope, buildbotService) ->
constructor: ($scope, buildbotService, bbSettingsService) ->
homeSetting = bbSettingsService.getSettingsGroup 'home'

buildbotService.all('builds').getList(
complete: true
order:'-complete_at'
limit: 8
limit: homeSetting.n_recent_builds.value
).then (data) =>
@builds = data
10 changes: 10 additions & 0 deletions www/md_base/src/app/home/panels/recent_builds/recent_builds.less
@@ -0,0 +1,10 @@
recent-builds {
display: block;
padding: 12px 0;

.no-build {
color: #666;
font-size: 14;
text-align: center;
}
}
@@ -1,2 +1,6 @@
div.no-build(ng-if="recent.builds.length == 0")
| No completed builds yet. Go to
a(ui-sref="builds") panel
| to trigger a build.
div.build(ng-repeat="build in recent.builds")
build-item(build="build", show-builder="recent.showBuilders")

0 comments on commit 06f1068

Please sign in to comment.