diff --git a/web/src/components/item-components/job-item/job-item.component.ts b/web/src/components/item-components/job-item/job-item.component.ts index 5575d679..39bb4bd7 100644 --- a/web/src/components/item-components/job-item/job-item.component.ts +++ b/web/src/components/item-components/job-item/job-item.component.ts @@ -1,5 +1,10 @@ import { Component, OnInit, Input } from '@angular/core'; -import { JobItem, dashboardTypeToSlider } from 'src/models/job-items'; +import { + JobItem, + dashboardTypeToSlider, + Job, + JobToJobItem, +} from 'src/models/job-items'; import { SliderItem } from 'src/components/base-components/slider-view/slider-view.component'; import { Dayjs } from 'dayjs'; @@ -9,11 +14,15 @@ import { Dayjs } from 'dayjs'; styleUrls: ['./job-item.component.styl'], }) export class JobItemComponent implements OnInit { - @Input() item: JobItem; + @Input() job: Job; @Input() compact: boolean = false; constructor() {} + public get item(): JobItem { + return JobToJobItem(this.job); + } + public get slider(): SliderItem[] { return this.item.status.map((st) => { return { diff --git a/web/src/services/test_suite_cacher.ts b/web/src/services/test_suite_cacher.ts index b7544d47..47298ed2 100644 --- a/web/src/services/test_suite_cacher.ts +++ b/web/src/services/test_suite_cacher.ts @@ -113,7 +113,10 @@ export class TestSuiteAndJobCache { job.stage = msg.stage; } if (msg.testResult !== undefined) { - assign(job.results, msg.testResult); + Object.assign(job.results, msg.testResult); + } + if (msg.buildOutputFile !== undefined) { + job.buildOutputFile = msg.buildOutputFile; } } } @@ -182,12 +185,12 @@ export class TestSuiteAndJobCache { .pipe( tap({ next: (jobs) => { - if (opt.tracking) { - this.startTrackingJob(...jobs.map((j) => j.id)); - } if (opt.tracking || opt.cache) { jobs.forEach((j) => this.cacheJob(j)); } + if (opt.tracking) { + this.startTrackingJob(...jobs.map((j) => j.id)); + } }, }) ); diff --git a/web/src/views/default/test-suite-view/test-suite-view.component.html b/web/src/views/default/test-suite-view/test-suite-view.component.html index b0c331da..bf9f318a 100644 --- a/web/src/views/default/test-suite-view/test-suite-view.component.html +++ b/web/src/views/default/test-suite-view/test-suite-view.component.html @@ -60,10 +60,10 @@

提交评测

-
+

评测记录

没有评测记录
@@ -71,9 +71,9 @@

评测记录