Skip to content

Commit

Permalink
Merge pull request #5177 from Countly/SER-1139
Browse files Browse the repository at this point in the history
[SER-1139] Make sure there is a correct job referenced in the jobs ta…
  • Loading branch information
Cookiezaurs committed May 13, 2024
2 parents d91eccd + b69eb96 commit ec5d4bc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions api/parts/data/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -2019,8 +2019,26 @@ fetch.alljobs = async function(metric, params) {
]).toArray();
total = total.length > 0 ? total[0].total : 0;
const pipeline = [
{
$addFields: {
sortKey: {
$cond: {
if: { $eq: ["$status", 0] },
then: 0,
else: {
$cond: {
if: { $eq: ["$status", 7] },
then: 1,
else: 2
}
}
}
}
}
},
{
$sort: {
sortKey: 1,
finished: -1
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</el-table-column>
<el-table-column prop="dataAsString" :label="i18n('jobs.job-data')">
<template slot-scope="scope">
<pre>{{scope.row.dataAsString}}</pre>
<pre class="has-ellipsis" v-tooltip="scope.row.dataAsString">{{scope.row.dataAsString}}</pre>
</template>
</el-table-column>
<el-table-column sortable="custom" prop="duration" :label="i18n('jobs.run-duration')">
Expand Down

0 comments on commit ec5d4bc

Please sign in to comment.