Fix finishedAt tooltips and show dates in local time zone
This commit is contained in:
parent
6d086d7b3e
commit
4bb331686c
|
@ -77,6 +77,9 @@ require 'travis/model'
|
|||
else
|
||||
@_super(key)
|
||||
|
||||
formattedFinishedAt: (->
|
||||
moment(@get('finishedAt')).format('lll')
|
||||
).property('finishedAt')
|
||||
|
||||
@Travis.Build.reopenClass
|
||||
byRepoId: (id, parameters) ->
|
||||
|
|
|
@ -102,6 +102,13 @@ require 'travis/model'
|
|||
@get('state') in ['passed', 'failed', 'errored', 'canceled']
|
||||
).property('state')
|
||||
|
||||
# TODO: such formattings should be done in controller, but in order
|
||||
# to use it there easily, I would have to refactor job and build
|
||||
# controllers
|
||||
formattedFinishedAt: (->
|
||||
moment(@get('finishedAt')).format('lll')
|
||||
).property('finishedAt')
|
||||
|
||||
@Travis.Job.reopenClass
|
||||
queued: ->
|
||||
filtered = Ember.FilteredRecordArray.create(
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<td class="duration" {{bindAttr title="duration"}}>
|
||||
{{formatDuration duration}}
|
||||
</td>
|
||||
<td class="finished_at timeago" {{bindAttr title="finishedAt"}}>
|
||||
<td class="finished_at timeago" {{bindAttr title="formattedFinishedAt"}}>
|
||||
{{formatTime finishedAt}}
|
||||
</td>
|
||||
{{/view}}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<dt>{{t builds.state}}</dt>
|
||||
<dd class="state">{{capitalize build.state}}</dd>
|
||||
<dt class="finished_at_label">{{t builds.finished_at}}</dt>
|
||||
<dd class="finished_at timeago" {{bindAttr title="finishedAt"}}>{{formatTime build.finishedAt}}</dd>
|
||||
<dd class="finished_at timeago" {{bindAttr title="build.formattedFinishedAt"}}>{{formatTime build.finishedAt}}</dd>
|
||||
<dt>{{t builds.duration}}</dt>
|
||||
<dd class="duration" {{bindAttr title="startedAt"}}>{{formatDuration build.duration}}</dd>
|
||||
</div>
|
||||
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
{{/with}}
|
||||
|
||||
|
||||
|
||||
<dt>{{t builds.message}}</dt>
|
||||
<dd class="message">{{formatMessage build.commit.message repoBinding=build.repo}}</dd>
|
||||
</dl>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<td class="duration" {{bindAttr title="startedAt"}}>
|
||||
{{formatDuration duration}}
|
||||
</td>
|
||||
<td class="finished_at timeago" {{bindAttr title="finishedAt"}}>
|
||||
<td class="finished_at timeago" {{bindAttr title="formattedFinishedAt"}}>
|
||||
{{formatTime finishedAt}}
|
||||
</td>
|
||||
{{#each value in configValues}}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<dt>{{t jobs.state}}</dt>
|
||||
<dd class="state">{{capitalize job.state}}</dd>
|
||||
<dt class="finished_at_label">{{t jobs.finished_at}}</dt>
|
||||
<dd class="finished_at timeago" {{bindAttr title="finishedAt"}}>{{formatTime job.finishedAt}}</dd>
|
||||
<dd class="finished_at timeago" {{bindAttr title="job.formattedFinishedAt"}}>{{formatTime job.finishedAt}}</dd>
|
||||
<dt>{{t jobs.duration}}</dt>
|
||||
<dd class="duration" {{bindAttr title="startedAt"}}>{{formatDuration job.duration}}</dd>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user