From c883280661ae3e17f2420abae31f78c975e56c1b Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Tue, 27 Feb 2018 14:57:19 -0800 Subject: [PATCH] Fix preexisting bugs that only surfaced once live updating started --- ui/app/components/job-versions-stream.js | 4 +++- ui/app/serializers/job-version.js | 1 + ui/app/templates/components/job-versions-stream.hbs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/app/components/job-versions-stream.js b/ui/app/components/job-versions-stream.js index b2a92d71a..460d0b9a2 100644 --- a/ui/app/components/job-versions-stream.js +++ b/ui/app/components/job-versions-stream.js @@ -12,7 +12,9 @@ export default Component.extend({ verbose: true, annotatedVersions: computed('versions.[]', function() { - const versions = this.get('versions'); + const versions = this.get('versions') + .sortBy('submitTime') + .reverse(); return versions.map((version, index) => { const meta = {}; diff --git a/ui/app/serializers/job-version.js b/ui/app/serializers/job-version.js index f05809b3f..4e250d5d8 100644 --- a/ui/app/serializers/job-version.js +++ b/ui/app/serializers/job-version.js @@ -11,6 +11,7 @@ export default ApplicationSerializer.extend({ assign({}, version, { Diff: hash.Diffs && hash.Diffs[index], ID: `${version.ID}-${version.Version}`, + JobID: JSON.stringify([version.ID, version.Namespace || 'default']), SubmitTime: Math.floor(version.SubmitTime / 1000000), SubmitTimeNanos: version.SubmitTime % 1000000, }) diff --git a/ui/app/templates/components/job-versions-stream.hbs b/ui/app/templates/components/job-versions-stream.hbs index 30f3dabdc..052b6a30b 100644 --- a/ui/app/templates/components/job-versions-stream.hbs +++ b/ui/app/templates/components/job-versions-stream.hbs @@ -1,4 +1,4 @@ -{{#each annotatedVersions as |record|}} +{{#each annotatedVersions key="version.id" as |record|}} {{#if record.meta.showDate}}
  • {{moment-format record.version.submitTime "MMMM D, YYYY"}}