From d41574691d8c325d84d87725ba04a8610c3744a8 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Thu, 14 Mar 2024 11:22:54 +0800 Subject: [PATCH] feat: display arch for each job in pipeline --- frontend/src/pages/pipelines/[id].vue | 2 ++ server/src/routes/pipeline.rs | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/pipelines/[id].vue b/frontend/src/pages/pipelines/[id].vue index b889339..3e02d23 100644 --- a/frontend/src/pages/pipelines/[id].vue +++ b/frontend/src/pages/pipelines/[id].vue @@ -22,6 +22,7 @@ #{{ job.job_id }} + for {{ job.arch }} @@ -38,6 +39,7 @@ interface PipelineInfoResponseJob { job_id: number; + arch: string; } interface PipelineInfoResponse { diff --git a/server/src/routes/pipeline.rs b/server/src/routes/pipeline.rs index 5aa4f1b..0dfec36 100644 --- a/server/src/routes/pipeline.rs +++ b/server/src/routes/pipeline.rs @@ -70,6 +70,7 @@ pub struct PipelineInfoRequest { #[derive(Serialize)] pub struct PipelineInfoResponseJob { job_id: i32, + arch: String, } #[derive(Serialize)] @@ -105,7 +106,10 @@ pub async fn pipeline_info( .filter(crate::schema::jobs::dsl::pipeline_id.eq(pipeline.id)) .load::(conn)? .into_iter() - .map(|job| PipelineInfoResponseJob { job_id: job.id }) + .map(|job| PipelineInfoResponseJob { + job_id: job.id, + arch: job.arch, + }) .collect(); Ok(PipelineInfoResponse {