Rework some of the bindAttrs that can cause problems
This commit is contained in:
parent
4a16f7a142
commit
7037c6a62a
|
@ -28,11 +28,11 @@ require 'travis/model'
|
|||
|
||||
requiredJobs: (->
|
||||
@get('jobs').filter (data) -> !data.get('allowFailure')
|
||||
).property()
|
||||
).property('jobs.@each.allowFailure')
|
||||
|
||||
allowedFailureJobs: (->
|
||||
@get('jobs').filter (data) -> data.get('allowFailure')
|
||||
).property()
|
||||
).property('jobs.@each.allowFailure')
|
||||
|
||||
configKeys: (->
|
||||
return [] unless config = @get('config')
|
||||
|
|
|
@ -13,30 +13,28 @@
|
|||
<tbody>
|
||||
{{#each build in builds}}
|
||||
{{#view Travis.BuildsItemView contextBinding="build"}}
|
||||
<tr {{bindAttr class="view.color"}}>
|
||||
<td class="number">
|
||||
<span class="status"></span>
|
||||
{{#if id}}
|
||||
<a {{action showBuild this href=true}}>
|
||||
{{number}}
|
||||
</a>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="commit">
|
||||
<a {{bindAttr href="view.urlGithubCommit"}}>
|
||||
{{formatCommit commit}}
|
||||
<td class="number">
|
||||
<span class="status"></span>
|
||||
{{#if id}}
|
||||
<a {{action showBuild this href=true}}>
|
||||
{{number}}
|
||||
</a>
|
||||
</td>
|
||||
<td class="message">
|
||||
{{{formatMessage commit.message short="true"}}}
|
||||
</td>
|
||||
<td class="duration" {{bindAttr title="duration"}}>
|
||||
{{formatDuration duration}}
|
||||
</td>
|
||||
<td class="finished_at timeago" {{bindAttr title="finishedAt"}}>
|
||||
{{formatTime finishedAt}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="commit">
|
||||
<a {{bindAttr href="view.urlGithubCommit"}}>
|
||||
{{formatCommit commit}}
|
||||
</a>
|
||||
</td>
|
||||
<td class="message">
|
||||
{{{formatMessage commit.message short="true"}}}
|
||||
</td>
|
||||
<td class="duration" {{bindAttr title="duration"}}>
|
||||
{{formatDuration duration}}
|
||||
</td>
|
||||
<td class="finished_at timeago" {{bindAttr title="finishedAt"}}>
|
||||
{{formatTime finishedAt}}
|
||||
</td>
|
||||
{{/view}}
|
||||
{{/each}}
|
||||
</tbody>
|
||||
|
|
|
@ -1,47 +1,47 @@
|
|||
{{#with view}}
|
||||
{{#if build.isLoaded}}
|
||||
<div id="build" {{bindAttr class="color"}}>
|
||||
<dl id="summary">
|
||||
<div class="left">
|
||||
<dt>{{t builds.name}}</dt>
|
||||
<dd class="number">
|
||||
<span class="status"></span>
|
||||
{{#if build.id}}
|
||||
<a {{action showBuild build href=true}}>{{build.number}}</a>
|
||||
{{/if}}
|
||||
</dd>
|
||||
<dt class="finished_at_label">{{t builds.finished_at}}</dt>
|
||||
<dd class="finished_at timeago" {{bindAttr title="finishedAt"}}>{{formatTime build.finishedAt}}</dd>
|
||||
<dt>{{t builds.duration}}</dt>
|
||||
<dd class="duration" {{bindAttr title="startedAt"}}>{{formatDuration build.duration}}</dd>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<dt>{{t builds.commit}}</dt>
|
||||
<dd class="commit"><a {{bindAttr href="urlGithubCommit"}}>{{formatCommit build.commit}}</a></dd>
|
||||
{{#if commit.compareUrl}}
|
||||
<dt>{{t builds.compare}}</dt>
|
||||
<dd class="compare"><a {{bindAttr href="commit.compareUrl"}}>{{pathFrom build.commit.compareUrl}}</a></dd>
|
||||
{{#if loading}}
|
||||
<span>Loading</span>
|
||||
{{else}}
|
||||
<dl id="summary">
|
||||
<div class="left">
|
||||
<dt>{{t builds.name}}</dt>
|
||||
<dd class="number">
|
||||
<span class="status"></span>
|
||||
{{#if build.id}}
|
||||
<a {{action showBuild build href=true}}>{{build.number}}</a>
|
||||
{{/if}}
|
||||
{{#if commit.authorName}}
|
||||
<dt>{{t builds.author}}</dt>
|
||||
<dd class="author"><a {{bindAttr href="urlAuthor"}}>{{build.commit.authorName}}</a></dd>
|
||||
{{/if}}
|
||||
{{#if commit.committerName}}
|
||||
<dt>{{t builds.committer}}</dt>
|
||||
<dd class="committer"><a {{bindAttr href="urlCommitter"}}>{{build.commit.committerName}}</a></dd>
|
||||
{{/if}}
|
||||
</div>
|
||||
</dd>
|
||||
<dt class="finished_at_label">{{t builds.finished_at}}</dt>
|
||||
<dd class="finished_at timeago" {{bindAttr title="finishedAt"}}>{{formatTime build.finishedAt}}</dd>
|
||||
<dt>{{t builds.duration}}</dt>
|
||||
<dd class="duration" {{bindAttr title="startedAt"}}>{{formatDuration build.duration}}</dd>
|
||||
</div>
|
||||
|
||||
<dt>{{t builds.message}}</dt>
|
||||
<dd class="message">{{{formatMessage build.commit.message}}}</dd>
|
||||
<div class="right">
|
||||
<dt>{{t builds.commit}}</dt>
|
||||
<dd class="commit"><a href="{{unbound urlGithubCommit}}">{{formatCommit build.commit}}</a></dd>
|
||||
{{#if commit.compareUrl}}
|
||||
<dt>{{t builds.compare}}</dt>
|
||||
<dd class="compare"><a href="{{unbound commit.compareUrl}}">{{pathFrom build.commit.compareUrl}}</a></dd>
|
||||
{{/if}}
|
||||
{{#if commit.authorName}}
|
||||
<dt>{{t builds.author}}</dt>
|
||||
<dd class="author"><a href="{{unbound urlAuthor}}">{{build.commit.authorName}}</a></dd>
|
||||
{{/if}}
|
||||
{{#if commit.committerName}}
|
||||
<dt>{{t builds.committer}}</dt>
|
||||
<dd class="committer"><a href="{{unbound urlCommitter}}">{{build.commit.committerName}}</a></dd>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{#unless isMatrix}}
|
||||
<dt>{{t builds.config}}</dt>
|
||||
<dd class="config">{{formatConfig build.config}}</dd>
|
||||
{{/unless}}
|
||||
</dl>
|
||||
</div>
|
||||
<dt>{{t builds.message}}</dt>
|
||||
<dd class="message">{{{formatMessage build.commit.message}}}</dd>
|
||||
|
||||
{{#unless isMatrix}}
|
||||
<dt>{{t builds.config}}</dt>
|
||||
<dd class="config">{{formatConfig build.config}}</dd>
|
||||
{{/unless}}
|
||||
</dl>
|
||||
|
||||
{{#if build.isMatrix}}
|
||||
{{view Travis.JobsView jobsBinding="build.requiredJobs" required="true"}}
|
||||
|
@ -49,9 +49,5 @@
|
|||
{{else}}
|
||||
{{view Travis.LogView contextBinding="build.jobs.firstObject"}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<div id="build" class="loading">
|
||||
<span>Loading</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/with}}
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
Travis.Build.olderThanNumber(id, number)
|
||||
|
||||
BuildsItemView: Travis.View.extend
|
||||
tagName: 'tr'
|
||||
classNameBindings: ['color']
|
||||
repositoryBinding: 'controller.repository'
|
||||
buildBinding: 'context'
|
||||
commitBinding: 'build.commit'
|
||||
|
@ -27,11 +29,17 @@
|
|||
|
||||
BuildView: Travis.View.extend
|
||||
templateName: 'builds/show'
|
||||
elementId: 'build'
|
||||
classNameBindings: ['color', 'loading']
|
||||
|
||||
repositoryBinding: 'controller.repository'
|
||||
buildBinding: 'controller.build'
|
||||
commitBinding: 'build.commit'
|
||||
|
||||
loading: (->
|
||||
!@get('build.isLoaded')
|
||||
).property('build.isLoaded')
|
||||
|
||||
color: (->
|
||||
Travis.Helpers.colorForResult(@get('build.result'))
|
||||
).property('build.result')
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user