Skip to content

Commit

Permalink
feat: display arch for each job in pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Mar 14, 2024
1 parent 6159c9d commit d415746
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions frontend/src/pages/pipelines/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<router-link :to="{ path: `/jobs/${job.job_id}` }">
#{{ job.job_id }}
</router-link>
for {{ job.arch }}
</div>
</v-card-text>
</v-card>
Expand All @@ -38,6 +39,7 @@
interface PipelineInfoResponseJob {
job_id: number;
arch: string;
}
interface PipelineInfoResponse {
Expand Down
6 changes: 5 additions & 1 deletion server/src/routes/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ pub struct PipelineInfoRequest {
#[derive(Serialize)]
pub struct PipelineInfoResponseJob {
job_id: i32,
arch: String,
}

#[derive(Serialize)]
Expand Down Expand Up @@ -105,7 +106,10 @@ pub async fn pipeline_info(
.filter(crate::schema::jobs::dsl::pipeline_id.eq(pipeline.id))
.load::<Job>(conn)?
.into_iter()
.map(|job| PipelineInfoResponseJob { job_id: job.id })
.map(|job| PipelineInfoResponseJob {
job_id: job.id,
arch: job.arch,
})
.collect();

Ok(PipelineInfoResponse {
Expand Down

0 comments on commit d415746

Please sign in to comment.