Skip to content

Commit

Permalink
feat: display and check pushpkg_success
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Mar 16, 2024
1 parent 6c41529 commit f9d2a94
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
4 changes: 4 additions & 0 deletions frontend/src/pages/jobs/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
</router-link>
<br/>
</div>
<div v-if="job.pushpkg_success === false">
Failed to push package to repo
<br/>
</div>
</v-card-text>
</v-card>
</v-container>
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/pages/jobs/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
color="green"
variant="flat"
density="comfortable"
v-if="(item as Job).status === 'finished' && (item as Job).build_success"
v-if="(item as Job).status === 'finished' && (item as Job).build_success && (item as Job).pushpkg_success"
prepend-icon="mdi:mdi-check-circle"
:to="{ path: `/jobs/${(item as Job).id}` }"
>
Expand All @@ -27,7 +27,7 @@
color="red"
variant="flat"
density="comfortable"
v-else-if="(item as Job).status === 'finished' && !(item as Job).build_success"
v-else-if="(item as Job).status === 'finished'"
prepend-icon="mdi:mdi-close-circle"
:to="{ path: `/jobs/${(item as Job).id}` }"
>
Expand Down Expand Up @@ -195,6 +195,7 @@
id: number;
pipeline_id: number;
build_success: boolean;
pushpkg_success: boolean;
status: string;
packages: string;
arch: string;
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/pages/pipelines/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@
<router-link
style="text-decoration: none; color: inherit;"
:to="{ path: `/jobs/${(job as Job).job_id}` }">
<v-icon v-if="(job as Job).status === 'finished'">
<v-icon v-if="(job as Job).status === 'finished' && (job as Job).build_success && (job as Job).pushpkg_success">
mdi:mdi-check-circle-outline
</v-icon>
<v-icon v-else-if="(job as Job).status === 'finished'">
mdi:mdi-close-circle-outline
</v-icon>
<v-icon v-else-if="(job as Job).status === 'assigned'">
mdi:mdi-progress-question
</v-icon>
Expand Down Expand Up @@ -121,6 +124,8 @@
job_id: number;
arch: string;
status: string;
build_success: boolean;
pushpkg_success: boolean;
}
interface Pipeline {
Expand All @@ -138,7 +143,7 @@
export default {
data: () => ({
itemsPerPage: 10,
itemsPerPage: 25,
headers: [
{ title: 'Status', key: 'status', sortable: false },
{ title: 'Pipeline', key: 'pipeline', sortable: false },
Expand Down
4 changes: 4 additions & 0 deletions server/src/routes/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ pub struct PipelineListResponseJob {
job_id: i32,
arch: String,
status: String,
build_success: Option<bool>,
pushpkg_success: Option<bool>,
}

#[derive(Serialize)]
Expand Down Expand Up @@ -226,6 +228,8 @@ pub async fn pipeline_list(
job_id: job.id,
arch: job.arch,
status: job.status,
build_success: job.build_success,
pushpkg_success: job.pushpkg_success,
})
.collect(),
});
Expand Down

0 comments on commit f9d2a94

Please sign in to comment.