Apply new date and timestamp helpers e'rywhere

This commit is contained in:
Michael Lange 2019-01-30 22:44:43 -08:00
parent 50bf9d392a
commit dfd3b097d1
14 changed files with 36 additions and 36 deletions

View File

@ -10,12 +10,12 @@
<span class="label">Task Details</span>
<span class="pair" data-test-started-at>
<span class="term">Started At</span>
{{moment-format model.startedAt "MM/DD/YY HH:mm:ss"}}
{{format-ts model.startedAt}}
</span>
{{#if model.finishedAt}}
<span class="pair">
<span class="term">Finished At</span>
{{moment-format model.finishedAt "MM/DD/YY HH:mm:ss"}}
{{format-ts model.finishedAt}}
</span>
{{/if}}
<span class="pair">
@ -89,7 +89,7 @@
{{/t.head}}
{{#t.body as |row|}}
<tr data-test-task-event>
<td data-test-task-event-time>{{moment-format row.model.time "MM/DD/YY HH:mm:ss"}}</td>
<td data-test-task-event-time>{{format-ts row.model.time}}</td>
<td data-test-task-event-type>{{row.model.type}}</td>
<td data-test-task-event-message>
{{#if row.model.message}}

View File

@ -65,7 +65,7 @@
{{#if model.drainStrategy.forceDeadline}}
<span class="pair" data-test-drain-forced-deadline>
<span class="term">Forced Deadline</span>
{{moment-format model.drainStrategy.forceDeadline "MM/DD/YY HH:mm:ss"}}
{{format-ts model.drainStrategy.forceDeadline}}
({{moment-from-now model.drainStrategy.forceDeadline interval=1000}})
</span>
{{/if}}
@ -159,7 +159,7 @@
{{/t.head}}
{{#t.body as |row|}}
<tr data-test-client-event>
<td data-test-client-event-time>{{moment-format row.model.time "MM/DD/YY HH:mm:ss"}}</td>
<td data-test-client-event-time>{{format-ts row.model.time}}</td>
<td data-test-client-event-subsystem>{{row.model.subsystem}}</td>
<td data-test-client-event-message>
{{#if row.model.message}}
@ -204,7 +204,7 @@
<span class="is-pulled-right">
<span class="pair">
<span class="term">Last Updated</span>
<span data-test-last-updated class="tooltip" aria-label="{{moment-format a.item.updateTime "MM/DD/YY HH:mm:ss"}}">
<span data-test-last-updated class="tooltip" aria-label="{{format-ts a.item.updateTime}}">
{{moment-from-now a.item.updateTime interval=1000}}
</span>
</span>

View File

@ -22,9 +22,9 @@
{{/link-to}}
</td>
{{/if}}
<td data-test-create-time>{{moment-format allocation.createTime "MM/DD HH:mm:ss"}}</td>
<td data-test-create-time>{{format-month-ts allocation.createTime}}</td>
<td data-test-modify-time>
<span class="tooltip" aria-label="{{moment-format allocation.modifyTime "MM/DD HH:mm:ss"}}">
<span class="tooltip" aria-label="{{format-month-ts allocation.modifyTime}}">
{{moment-from-now allocation.modifyTime}}
</span>
</td>

View File

@ -12,7 +12,7 @@
</span>
<span class="pair">
<span class="term">Last Updated</span>
<span>{{moment-format (now)}}</span>
<span>{{format-ts (now)}}</span>
</span>
</div>
</div>
@ -31,7 +31,7 @@
</span>
<span class="pair">
<span class="term">Last Updated</span>
<span>{{moment-format (now)}}</span>
<span>{{format-ts (now)}}</span>
</span>
</div>
</div>
@ -44,7 +44,7 @@
</span>
<span class="pair">
<span class="term">Last Updated</span>
<span>{{moment-format (now)}}</span>
<span>{{format-ts (now)}}</span>
</span>
</div>
</div>
@ -57,7 +57,7 @@
</span>
<span class="pair">
<span class="term">Last Updated</span>
<span>{{moment-format (now)}}</span>
<span>{{format-ts (now)}}</span>
</span>
</div>
</div>
@ -70,7 +70,7 @@
</span>
<span class="pair">
<span class="term">Last Updated</span>
<span>{{moment-format (now)}}</span>
<span>{{format-ts (now)}}</span>
</span>
</div>
</div>

View File

@ -1,7 +1,7 @@
{{#freestyle-usage 'timeline' title="Simple Timeline"}}
<ol class="timeline">
<li class="timeline-note">
{{moment-format yesterday "MMMM D, YYYY"}}
{{format-date yesterday}}
</li>
<li class="timeline-object">
<div class="boxed-section">
@ -18,7 +18,7 @@
</div>
</li>
<li class="timeline-note">
{{moment-format today "MMMM D, YYYY"}}
{{format-date today}}
</li>
<li class="timeline-object">
<div class="boxed-section">
@ -38,7 +38,7 @@
{{#freestyle-usage 'timeline-intricate' title="Detailed Timeline"}}
<ol class="timeline">
<li class="timeline-note">
{{moment-format today "MMMM D, YYYY"}}
{{format-date today}}
</li>
<li class="timeline-object">
<div class="boxed-section">
@ -50,7 +50,7 @@
</span>
<span class="bumper-left pair is-faded">
<span class="term">Submitted</span>
<span class="tooltip" aria-label="{{moment-format (now) "MM/DD HH:mm:ss"}}">{{moment-from-now (now)}}</span>
<span class="tooltip" aria-label="{{format-month-ts (now)}}">{{moment-from-now (now)}}</span>
</span>
</div>
</div>
@ -65,13 +65,13 @@
</span>
<span class="bumper-left pair is-faded">
<span class="term">Submitted</span>
<span>{{moment-format yesterday "MM/DD HH:mm:ss"}}</span>
<span>{{format-month-ts yesterday}}</span>
</span>
</div>
</div>
</li>
<li class="timeline-note">
{{moment-format yesterday "MMMM D, YYYY"}}
{{format-date yesterday}}
</li>
<li class="timeline-object">
<div class="boxed-section">
@ -83,7 +83,7 @@
</span>
<span class="bumper-left pair is-faded">
<span class="term">Submitted</span>
<span>{{moment-format yesterday "MM/DD HH:mm:ss"}}</span>
<span>{{format-month-ts yesterday}}</span>
</span>
</div>
</div>
@ -94,7 +94,7 @@
{{#freestyle-usage 'timeline-toggles' title='Toggling Timeline Objects'}}
<ol class="timeline">
<li class="timeline-note">
{{moment-format today "MMMM D, YYYY"}}
{{format-date today}}
</li>
<li class="timeline-object">
<div class="boxed-section">
@ -118,7 +118,7 @@
</div>
</li>
<li class="timeline-note">
{{moment-format yesterday "MMMM D, YYYY"}}
{{format-date yesterday}}
</li>
<li class="timeline-object">
<div class="boxed-section">
@ -147,7 +147,7 @@
{{#freestyle-usage 'timeline-emphasis' title='Emphasizing a Timeline Object'}}
<ol class="timeline">
<li class="timeline-note">
{{moment-format today "MMMM D, YYYY"}}
{{format-date today}}
</li>
<li class="timeline-object">
<div class="boxed-section">
@ -158,7 +158,7 @@
</span>
<span class="bumper-left pair is-faded">
<span class="term">Submitted</span>
<span>{{moment-from-now (now)}}</span>
<span class="tooltip" aria-label="{{format-ts (now)}}">{{moment-from-now (now)}}</span>
</span>
</div>
</div>
@ -175,13 +175,13 @@
</span>
<span class="bumper-left pair is-faded">
<span class="term">Submitted</span>
<span>{{moment-format yesterday}}</span>
<span>{{format-ts yesterday}}</span>
</span>
</div>
</div>
</li>
<li class="timeline-note">
{{moment-format yesterday "MMMM D, YYYY"}}
{{format-date yesterday}}
</li>
<li class="timeline-object">
<div class="boxed-section">
@ -192,7 +192,7 @@
</span>
<span class="bumper-left pair is-faded">
<span class="term">Submitted</span>
<span>{{moment-format yesterday}}</span>
<span>{{format-ts yesterday}}</span>
</span>
</div>
</div>

View File

@ -9,7 +9,7 @@
<span class="term">Version</span>
<span class="has-emphasis" data-test-deployment-version>#{{deployment.version.number}}</span>
<span data-test-deployment-submit-time>|
<span class="tooltip" aria-label="{{moment-format deployment.version.submitTime "MM/DD/YY HH:mm:ss"}}">
<span class="tooltip" aria-label="{{format-ts deployment.version.submitTime}}">
{{moment-from-now deployment.version.submitTime}}
</span>
</span>

View File

@ -32,7 +32,7 @@
<td data-test-deployment-task-group-healthy>{{row.model.healthyAllocs}}</td>
<td data-test-deployment-task-group-unhealthy>{{row.model.unhealthyAllocs}}</td>
<td data-test-deployment-task-group-progress-deadline>
<span class="nowrap">{{moment-format row.model.requireProgressBy "MM/DD/YY HH:mm:ss"}}</span>
<span class="nowrap">{{format-ts row.model.requireProgressBy}}</span>
</td>
</tr>
{{/t.body}}

View File

@ -2,7 +2,7 @@
{{#if record.meta.showDate}}
<li data-test-deployment-time class="timeline-note">
{{#if record.deployment.version.submitTime}}
{{moment-format record.deployment.version.submitTime "MMMM D, YYYY"}}
{{format-date record.deployment.version.submitTime}}
{{else}}
Unknown time
{{/if}}

View File

@ -5,7 +5,7 @@
{{if job.latestDeployment.isRunning "Active" "Latest"}} Deployment
<span class="badge is-white {{if job.latestDeployment.isRunning "is-subtle"}} bumper-left" data-test-active-deployment-stat="id">{{job.latestDeployment.shortId}}</span>
{{#if job.latestDeployment.version.submitTime}}
<span class="pull-right submit-time tooltip" data-test-active-deployment-stat="submit-time" aria-label="{{moment-format job.latestDeployment.version.submitTime "MM/DD/YY HH:mm:ss"}}">
<span class="pull-right submit-time tooltip" data-test-active-deployment-stat="submit-time" aria-label="{{format-ts job.latestDeployment.version.submitTime}}">
{{moment-from-now job.latestDeployment.version.submitTime}}
</span>
{{/if}}

View File

@ -6,7 +6,7 @@
</span>
<span class="pair is-faded">
<span class="term">Submitted</span>
<span data-test-version-submit-time class="submit-date">{{moment-format version.submitTime "MM/DD/YY HH:mm:ss"}}</span>
<span data-test-version-submit-time class="submit-date">{{format-ts version.submitTime}}</span>
</span>
{{#if version.diff}}
<button class="button is-light is-compact pull-right" {{action "toggleDiff"}}>{{changeCount}} {{pluralize "Change" changeCount}}</button>

View File

@ -1,7 +1,7 @@
{{#each annotatedVersions key="version.id" as |record|}}
{{#if record.meta.showDate}}
<li data-test-version-time class="timeline-note">
{{moment-format record.version.submitTime "MMMM D, YYYY"}}
{{format-date record.version.submitTime}}
</li>
{{/if}}
<li data-test-version class="timeline-object">

View File

@ -2,7 +2,7 @@
{{#if label}}
<strong data-test-reschedule-label>{{label}}</strong>
{{/if}}
{{moment-format time "MMMM D, YYYY HH:mm:ss"}}
{{format-ts time}}
</li>
<li class="timeline-object" data-test-allocation={{allocation.id}}>
<div class="boxed-section">

View File

@ -13,7 +13,7 @@
{{#if (and allocation.followUpEvaluation.waitUntil (not allocation.nextAllocation))}}
<li class="timeline-note" data-test-attempt-notice>
{{x-icon "clock" class="is-info is-text"}} Nomad will attempt to reschedule
<span class="tooltip" aria-label="{{moment-format allocation.followUpEvaluation.waitUntil "MM/DD HH:mm:ss"}}">
<span class="tooltip" aria-label="{{format-ts allocation.followUpEvaluation.waitUntil}}">
{{moment-from-now allocation.followUpEvaluation.waitUntil interval=1000}}
</span>
</li>

View File

@ -18,7 +18,7 @@
<em>No message</em>
{{/if}}
</td>
<td data-test-time>{{moment-format task.events.lastObject.time "MM/DD/YY HH:mm:ss"}}</td>
<td data-test-time>{{format-ts task.events.lastObject.time}}</td>
<td data-test-ports>
<ul>
{{#with task.resources.networks.firstObject as |network|}}