diff --git a/frontend/package.json b/frontend/package.json index 6e13b14..450ebe5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -39,5 +39,6 @@ "vite-plugin-vuetify": "^2.0.0", "vue-router": "^4.2.0", "vue-tsc": "^1.8.0" - } + }, + "packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72" } diff --git a/frontend/src/pages/workers/index.vue b/frontend/src/pages/workers/index.vue index 338410d..fa55f1e 100644 --- a/frontend/src/pages/workers/index.vue +++ b/frontend/src/pages/workers/index.vue @@ -43,6 +43,10 @@ # {{ (item as Worker).running_job_id }} + {{ + (item as Worker).running_job_assign_time !== null && (item as Worker).running_job_assign_time !== undefined ? + " since " + new TimeAgo('en-US').format(new Date((item as Worker).running_job_assign_time)) : "" + }} @@ -78,6 +82,7 @@ memory_bytes: number; disk_free_space_bytes: number; running_job_id: number; + running_job_assign_time: string; } export default { diff --git a/server/src/routes/worker.rs b/server/src/routes/worker.rs index cedcc0d..073ddb9 100644 --- a/server/src/routes/worker.rs +++ b/server/src/routes/worker.rs @@ -49,6 +49,7 @@ pub struct WorkerListResponseItem { last_heartbeat_time: DateTime, // status running_job_id: Option, + running_job_assign_time: Option>, } #[derive(Serialize)] @@ -114,7 +115,8 @@ pub async fn worker_list( disk_free_space_bytes: worker.disk_free_space_bytes, is_live: worker.last_heartbeat_time > deadline, last_heartbeat_time: worker.last_heartbeat_time, - running_job_id: job.map(|job| job.id), + running_job_id: job.as_ref().map(|job| job.id), + running_job_assign_time: job.and_then(|job| job.assign_time), }); }