Merge branch 'master' of github.com:travis-ci/travis-ember
This commit is contained in:
commit
2273e64560
|
@ -2,6 +2,19 @@ require 'travis/model'
|
||||||
|
|
||||||
@Travis.Artifact = Travis.Model.extend
|
@Travis.Artifact = Travis.Model.extend
|
||||||
body: DS.attr('string')
|
body: DS.attr('string')
|
||||||
|
init: ->
|
||||||
|
@_super.apply this, arguments
|
||||||
|
@set 'queue', Ember.A([])
|
||||||
|
|
||||||
append: (body) ->
|
append: (body) ->
|
||||||
|
if @get('isLoaded')
|
||||||
@set('body', @get('body') + body)
|
@set('body', @get('body') + body)
|
||||||
|
else
|
||||||
|
@get('queue').pushObject(body)
|
||||||
|
|
||||||
|
recordDidLoad: (->
|
||||||
|
if @get('isLoaded')
|
||||||
|
queue = @get('queue')
|
||||||
|
if queue.get('length') > 0
|
||||||
|
@append queue.toArray().join('')
|
||||||
|
).observes('isLoaded')
|
||||||
|
|
|
@ -28,11 +28,11 @@ require 'travis/model'
|
||||||
|
|
||||||
requiredJobs: (->
|
requiredJobs: (->
|
||||||
@get('jobs').filter (data) -> !data.get('allowFailure')
|
@get('jobs').filter (data) -> !data.get('allowFailure')
|
||||||
).property()
|
).property('jobs.@each.allowFailure')
|
||||||
|
|
||||||
allowedFailureJobs: (->
|
allowedFailureJobs: (->
|
||||||
@get('jobs').filter (data) -> data.get('allowFailure')
|
@get('jobs').filter (data) -> data.get('allowFailure')
|
||||||
).property()
|
).property('jobs.@each.allowFailure')
|
||||||
|
|
||||||
configKeys: (->
|
configKeys: (->
|
||||||
return [] unless config = @get('config')
|
return [] unless config = @get('config')
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#each build in builds}}
|
{{#each build in builds}}
|
||||||
{{#view Travis.BuildsItemView contextBinding="build"}}
|
{{#view Travis.BuildsItemView contextBinding="build"}}
|
||||||
<tr {{bindAttr class="view.color"}}>
|
|
||||||
<td class="number">
|
<td class="number">
|
||||||
<span class="status"></span>
|
<span class="status"></span>
|
||||||
{{#if id}}
|
{{#if id}}
|
||||||
|
@ -36,7 +35,6 @@
|
||||||
<td class="finished_at timeago" {{bindAttr title="finishedAt"}}>
|
<td class="finished_at timeago" {{bindAttr title="finishedAt"}}>
|
||||||
{{formatTime finishedAt}}
|
{{formatTime finishedAt}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
|
||||||
{{/view}}
|
{{/view}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{{#with view}}
|
{{#with view}}
|
||||||
{{#if build.isLoaded}}
|
{{#if loading}}
|
||||||
<div id="build" {{bindAttr class="color"}}>
|
<span>Loading</span>
|
||||||
|
{{else}}
|
||||||
<dl id="summary">
|
<dl id="summary">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<dt>{{t builds.name}}</dt>
|
<dt>{{t builds.name}}</dt>
|
||||||
|
@ -18,18 +19,18 @@
|
||||||
|
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<dt>{{t builds.commit}}</dt>
|
<dt>{{t builds.commit}}</dt>
|
||||||
<dd class="commit"><a {{bindAttr href="urlGithubCommit"}}>{{formatCommit build.commit}}</a></dd>
|
<dd class="commit"><a href="{{unbound urlGithubCommit}}">{{formatCommit build.commit}}</a></dd>
|
||||||
{{#if commit.compareUrl}}
|
{{#if commit.compareUrl}}
|
||||||
<dt>{{t builds.compare}}</dt>
|
<dt>{{t builds.compare}}</dt>
|
||||||
<dd class="compare"><a {{bindAttr href="commit.compareUrl"}}>{{pathFrom build.commit.compareUrl}}</a></dd>
|
<dd class="compare"><a href="{{unbound commit.compareUrl}}">{{pathFrom build.commit.compareUrl}}</a></dd>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if commit.authorName}}
|
{{#if commit.authorName}}
|
||||||
<dt>{{t builds.author}}</dt>
|
<dt>{{t builds.author}}</dt>
|
||||||
<dd class="author"><a {{bindAttr href="urlAuthor"}}>{{build.commit.authorName}}</a></dd>
|
<dd class="author"><a href="{{unbound urlAuthor}}">{{build.commit.authorName}}</a></dd>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if commit.committerName}}
|
{{#if commit.committerName}}
|
||||||
<dt>{{t builds.committer}}</dt>
|
<dt>{{t builds.committer}}</dt>
|
||||||
<dd class="committer"><a {{bindAttr href="urlCommitter"}}>{{build.commit.committerName}}</a></dd>
|
<dd class="committer"><a href="{{unbound urlCommitter}}">{{build.commit.committerName}}</a></dd>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -41,7 +42,6 @@
|
||||||
<dd class="config">{{formatConfig build.config}}</dd>
|
<dd class="config">{{formatConfig build.config}}</dd>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
|
||||||
|
|
||||||
{{#if build.isMatrix}}
|
{{#if build.isMatrix}}
|
||||||
{{view Travis.JobsView jobsBinding="build.requiredJobs" required="true"}}
|
{{view Travis.JobsView jobsBinding="build.requiredJobs" required="true"}}
|
||||||
|
@ -49,9 +49,5 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{view Travis.LogView contextBinding="build.jobs.firstObject"}}
|
{{view Travis.LogView contextBinding="build.jobs.firstObject"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
|
||||||
<div id="build" class="loading">
|
|
||||||
<span>Loading</span>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/with}}
|
{{/with}}
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
Travis.Build.olderThanNumber(id, number)
|
Travis.Build.olderThanNumber(id, number)
|
||||||
|
|
||||||
BuildsItemView: Travis.View.extend
|
BuildsItemView: Travis.View.extend
|
||||||
|
tagName: 'tr'
|
||||||
|
classNameBindings: ['color']
|
||||||
repositoryBinding: 'controller.repository'
|
repositoryBinding: 'controller.repository'
|
||||||
buildBinding: 'context'
|
buildBinding: 'context'
|
||||||
commitBinding: 'build.commit'
|
commitBinding: 'build.commit'
|
||||||
|
@ -27,11 +29,17 @@
|
||||||
|
|
||||||
BuildView: Travis.View.extend
|
BuildView: Travis.View.extend
|
||||||
templateName: 'builds/show'
|
templateName: 'builds/show'
|
||||||
|
elementId: 'build'
|
||||||
|
classNameBindings: ['color', 'loading']
|
||||||
|
|
||||||
repositoryBinding: 'controller.repository'
|
repositoryBinding: 'controller.repository'
|
||||||
buildBinding: 'controller.build'
|
buildBinding: 'controller.build'
|
||||||
commitBinding: 'build.commit'
|
commitBinding: 'build.commit'
|
||||||
|
|
||||||
|
loading: (->
|
||||||
|
!@get('build.isLoaded')
|
||||||
|
).property('build.isLoaded')
|
||||||
|
|
||||||
color: (->
|
color: (->
|
||||||
Travis.Helpers.colorForResult(@get('build.result'))
|
Travis.Helpers.colorForResult(@get('build.result'))
|
||||||
).property('build.result')
|
).property('build.result')
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user