From 586e98bbeadbbff4508ad2b1fb2b0ba7401a2da5 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Wed, 30 Jan 2019 22:44:43 -0800 Subject: [PATCH] Apply new date and timestamp helpers e'rywhere --- .../allocations/allocation/task/index.hbs | 6 ++-- ui/app/templates/clients/client.hbs | 6 ++-- .../templates/components/allocation-row.hbs | 4 +-- .../freestyle/sg-inline-definitions.hbs | 10 +++---- .../components/freestyle/sg-timeline.hbs | 28 +++++++++---------- .../templates/components/job-deployment.hbs | 2 +- .../components/job-deployment/task-groups.hbs | 2 +- .../components/job-deployments-stream.hbs | 2 +- .../job-page/parts/latest-deployment.hbs | 2 +- ui/app/templates/components/job-version.hbs | 2 +- .../components/job-versions-stream.hbs | 2 +- .../components/reschedule-event-row.hbs | 2 +- .../components/reschedule-event-timeline.hbs | 2 +- ui/app/templates/components/task-row.hbs | 2 +- 14 files changed, 36 insertions(+), 36 deletions(-) diff --git a/ui/app/templates/allocations/allocation/task/index.hbs b/ui/app/templates/allocations/allocation/task/index.hbs index ae6523c01..a5496391a 100644 --- a/ui/app/templates/allocations/allocation/task/index.hbs +++ b/ui/app/templates/allocations/allocation/task/index.hbs @@ -10,12 +10,12 @@ Task Details Started At - {{moment-format model.startedAt "MM/DD/YY HH:mm:ss"}} + {{format-ts model.startedAt}} {{#if model.finishedAt}} Finished At - {{moment-format model.finishedAt "MM/DD/YY HH:mm:ss"}} + {{format-ts model.finishedAt}} {{/if}} @@ -89,7 +89,7 @@ {{/t.head}} {{#t.body as |row|}} - {{moment-format row.model.time "MM/DD/YY HH:mm:ss"}} + {{format-ts row.model.time}} {{row.model.type}} {{#if row.model.message}} diff --git a/ui/app/templates/clients/client.hbs b/ui/app/templates/clients/client.hbs index 278f21495..99e36f697 100644 --- a/ui/app/templates/clients/client.hbs +++ b/ui/app/templates/clients/client.hbs @@ -65,7 +65,7 @@ {{#if model.drainStrategy.forceDeadline}} Forced Deadline - {{moment-format model.drainStrategy.forceDeadline "MM/DD/YY HH:mm:ss"}} + {{format-ts model.drainStrategy.forceDeadline}} ({{moment-from-now model.drainStrategy.forceDeadline interval=1000}}) {{/if}} @@ -159,7 +159,7 @@ {{/t.head}} {{#t.body as |row|}} - {{moment-format row.model.time "MM/DD/YY HH:mm:ss"}} + {{format-ts row.model.time}} {{row.model.subsystem}} {{#if row.model.message}} @@ -204,7 +204,7 @@ Last Updated - + {{moment-from-now a.item.updateTime interval=1000}} diff --git a/ui/app/templates/components/allocation-row.hbs b/ui/app/templates/components/allocation-row.hbs index 8ee1900fc..1bd6c4ec3 100644 --- a/ui/app/templates/components/allocation-row.hbs +++ b/ui/app/templates/components/allocation-row.hbs @@ -22,9 +22,9 @@ {{/link-to}} {{/if}} -{{moment-format allocation.createTime "MM/DD HH:mm:ss"}} +{{format-month-ts allocation.createTime}} - + {{moment-from-now allocation.modifyTime}} diff --git a/ui/app/templates/components/freestyle/sg-inline-definitions.hbs b/ui/app/templates/components/freestyle/sg-inline-definitions.hbs index efca1ec81..ca51f9c01 100644 --- a/ui/app/templates/components/freestyle/sg-inline-definitions.hbs +++ b/ui/app/templates/components/freestyle/sg-inline-definitions.hbs @@ -12,7 +12,7 @@ Last Updated - {{moment-format (now)}} + {{format-ts (now)}} @@ -31,7 +31,7 @@ Last Updated - {{moment-format (now)}} + {{format-ts (now)}} @@ -44,7 +44,7 @@ Last Updated - {{moment-format (now)}} + {{format-ts (now)}} @@ -57,7 +57,7 @@ Last Updated - {{moment-format (now)}} + {{format-ts (now)}} @@ -70,7 +70,7 @@ Last Updated - {{moment-format (now)}} + {{format-ts (now)}} diff --git a/ui/app/templates/components/freestyle/sg-timeline.hbs b/ui/app/templates/components/freestyle/sg-timeline.hbs index c789e5bdb..aa340515c 100644 --- a/ui/app/templates/components/freestyle/sg-timeline.hbs +++ b/ui/app/templates/components/freestyle/sg-timeline.hbs @@ -1,7 +1,7 @@ {{#freestyle-usage 'timeline' title="Simple Timeline"}}
  1. - {{moment-format yesterday "MMMM D, YYYY"}} + {{format-date yesterday}}
  2. @@ -18,7 +18,7 @@
  3. - {{moment-format today "MMMM D, YYYY"}} + {{format-date today}}
  4. @@ -38,7 +38,7 @@ {{#freestyle-usage 'timeline-intricate' title="Detailed Timeline"}}
    1. - {{moment-format today "MMMM D, YYYY"}} + {{format-date today}}
    2. @@ -50,7 +50,7 @@ Submitted - {{moment-from-now (now)}} + {{moment-from-now (now)}}
    @@ -65,13 +65,13 @@ Submitted - {{moment-format yesterday "MM/DD HH:mm:ss"}} + {{format-month-ts yesterday}}
  5. - {{moment-format yesterday "MMMM D, YYYY"}} + {{format-date yesterday}}
  6. @@ -83,7 +83,7 @@ Submitted - {{moment-format yesterday "MM/DD HH:mm:ss"}} + {{format-month-ts yesterday}}
    @@ -94,7 +94,7 @@ {{#freestyle-usage 'timeline-toggles' title='Toggling Timeline Objects'}}
    1. - {{moment-format today "MMMM D, YYYY"}} + {{format-date today}}
    2. @@ -118,7 +118,7 @@
    3. - {{moment-format yesterday "MMMM D, YYYY"}} + {{format-date yesterday}}
    4. @@ -147,7 +147,7 @@ {{#freestyle-usage 'timeline-emphasis' title='Emphasizing a Timeline Object'}}
      1. - {{moment-format today "MMMM D, YYYY"}} + {{format-date today}}
      2. @@ -158,7 +158,7 @@ Submitted - {{moment-from-now (now)}} + {{moment-from-now (now)}}
      @@ -175,13 +175,13 @@ Submitted - {{moment-format yesterday}} + {{format-ts yesterday}}
    5. - {{moment-format yesterday "MMMM D, YYYY"}} + {{format-date yesterday}}
    6. @@ -192,7 +192,7 @@ Submitted - {{moment-format yesterday}} + {{format-ts yesterday}}
      diff --git a/ui/app/templates/components/job-deployment.hbs b/ui/app/templates/components/job-deployment.hbs index 157e88ff9..e67c0b0e9 100644 --- a/ui/app/templates/components/job-deployment.hbs +++ b/ui/app/templates/components/job-deployment.hbs @@ -9,7 +9,7 @@ Version #{{deployment.version.number}} | - + {{moment-from-now deployment.version.submitTime}} diff --git a/ui/app/templates/components/job-deployment/task-groups.hbs b/ui/app/templates/components/job-deployment/task-groups.hbs index 9657b95f1..bc59f1080 100644 --- a/ui/app/templates/components/job-deployment/task-groups.hbs +++ b/ui/app/templates/components/job-deployment/task-groups.hbs @@ -32,7 +32,7 @@ {{row.model.healthyAllocs}} {{row.model.unhealthyAllocs}} - {{moment-format row.model.requireProgressBy "MM/DD/YY HH:mm:ss"}} + {{format-ts row.model.requireProgressBy}} {{/t.body}} diff --git a/ui/app/templates/components/job-deployments-stream.hbs b/ui/app/templates/components/job-deployments-stream.hbs index 347987787..f0e6ee290 100644 --- a/ui/app/templates/components/job-deployments-stream.hbs +++ b/ui/app/templates/components/job-deployments-stream.hbs @@ -2,7 +2,7 @@ {{#if record.meta.showDate}}
    7. {{#if record.deployment.version.submitTime}} - {{moment-format record.deployment.version.submitTime "MMMM D, YYYY"}} + {{format-date record.deployment.version.submitTime}} {{else}} Unknown time {{/if}} diff --git a/ui/app/templates/components/job-page/parts/latest-deployment.hbs b/ui/app/templates/components/job-page/parts/latest-deployment.hbs index f26982483..ffaef7112 100644 --- a/ui/app/templates/components/job-page/parts/latest-deployment.hbs +++ b/ui/app/templates/components/job-page/parts/latest-deployment.hbs @@ -5,7 +5,7 @@ {{if job.latestDeployment.isRunning "Active" "Latest"}} Deployment {{job.latestDeployment.shortId}} {{#if job.latestDeployment.version.submitTime}} - + {{moment-from-now job.latestDeployment.version.submitTime}} {{/if}} diff --git a/ui/app/templates/components/job-version.hbs b/ui/app/templates/components/job-version.hbs index 45912ecd4..1ea2970e5 100644 --- a/ui/app/templates/components/job-version.hbs +++ b/ui/app/templates/components/job-version.hbs @@ -6,7 +6,7 @@ Submitted - {{moment-format version.submitTime "MM/DD/YY HH:mm:ss"}} + {{format-ts version.submitTime}} {{#if version.diff}} diff --git a/ui/app/templates/components/job-versions-stream.hbs b/ui/app/templates/components/job-versions-stream.hbs index 052b6a30b..ac346a65d 100644 --- a/ui/app/templates/components/job-versions-stream.hbs +++ b/ui/app/templates/components/job-versions-stream.hbs @@ -1,7 +1,7 @@ {{#each annotatedVersions key="version.id" as |record|}} {{#if record.meta.showDate}}
    8. - {{moment-format record.version.submitTime "MMMM D, YYYY"}} + {{format-date record.version.submitTime}}
    9. {{/if}}
    10. diff --git a/ui/app/templates/components/reschedule-event-row.hbs b/ui/app/templates/components/reschedule-event-row.hbs index 733358b3d..f1c9c3f91 100644 --- a/ui/app/templates/components/reschedule-event-row.hbs +++ b/ui/app/templates/components/reschedule-event-row.hbs @@ -2,7 +2,7 @@ {{#if label}} {{label}} {{/if}} - {{moment-format time "MMMM D, YYYY HH:mm:ss"}} + {{format-ts time}}
    11. diff --git a/ui/app/templates/components/reschedule-event-timeline.hbs b/ui/app/templates/components/reschedule-event-timeline.hbs index d411974c5..fcbecbb34 100644 --- a/ui/app/templates/components/reschedule-event-timeline.hbs +++ b/ui/app/templates/components/reschedule-event-timeline.hbs @@ -13,7 +13,7 @@ {{#if (and allocation.followUpEvaluation.waitUntil (not allocation.nextAllocation))}}
    12. {{x-icon "clock" class="is-info is-text"}} Nomad will attempt to reschedule - + {{moment-from-now allocation.followUpEvaluation.waitUntil interval=1000}}
    13. diff --git a/ui/app/templates/components/task-row.hbs b/ui/app/templates/components/task-row.hbs index 55961a778..03d83201c 100644 --- a/ui/app/templates/components/task-row.hbs +++ b/ui/app/templates/components/task-row.hbs @@ -18,7 +18,7 @@ No message {{/if}} -{{moment-format task.events.lastObject.time "MM/DD/YY HH:mm:ss"}} +{{format-ts task.events.lastObject.time}}
        {{#with task.resources.networks.firstObject as |network|}}