Skip to content

Commit 173af9c

Browse files
committed
Include preparing tasks in submitted task state badge total
1 parent 6a6b9df commit 173af9c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/components/cylc/TaskStateBadge.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ const props = defineProps({
3939
},
4040
})
4141
42+
const displayName = computed(
43+
() => props.state === 'submitted' ? 'preparing/submitted' : props.state
44+
)
45+
4246
const tooltip = computed(
43-
() => `${props.value} ${props.state} task${props.value > 1 ? 's' : ''}`
47+
() => `${props.value} ${displayName.value} task${props.value > 1 ? 's' : ''}`
4448
)
4549
</script>

src/components/cylc/tree/GScanTreeItem.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ function getStateTotals (node, stateTotals = {}) {
115115
116116
// the non-zero state totals from this node with all the others from the tree
117117
for (const state of taskStatesOrdered) {
118-
const value = node.node.stateTotals[state]
118+
let value = node.node.stateTotals[state]
119+
if (state === TaskState.SUBMITTED.name) { // include preparing tasks
120+
value += node.node.stateTotals.preparing
121+
}
119122
if (value) {
120123
stateTotals[state] = (stateTotals[state] ?? 0) + value
121124
}

0 commit comments

Comments
 (0)