Skip to content

Commit 13d28c3

Browse files
committed
Fix missing cells for nodes with no IO/timing in Grid
In plans with I/O Timings, some nodes may not have I/O Timings but the cells for the corresponding still need to be displayed even if empty. This change has been forgotten in cbda727.
1 parent 98fee77 commit 13d28c3

File tree

2 files changed

+42
-30
lines changed

2 files changed

+42
-30
lines changed

src/components/Grid.vue

+6
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ const columnsLeft = computed<string[]>(() => {
249249
if (hasTime.value) {
250250
cols.push("time")
251251
}
252+
if (hasIORead.value) {
253+
cols.push("ioread")
254+
}
255+
if (hasIOWrite.value) {
256+
cols.push("iowrite")
257+
}
252258
if (hasRows.value) {
253259
cols.push("rows")
254260
}

src/components/GridRow.vue

+36-30
Original file line numberDiff line numberDiff line change
@@ -136,43 +136,49 @@ function formattedProp(propName: keyof typeof NodeProp) {
136136
</td>
137137
<td
138138
class="text-end grid-progress-cell text-nowrap"
139-
v-if="node[NodeProp.IO_READ_TIME]"
139+
v-if="columns.includes('ioread')"
140140
v-tippy="{ content: ioTooltip, allowHTML: true }"
141141
>
142-
<GridProgressBar
143-
:percentage="
144-
(node[NodeProp.EXCLUSIVE_IO_READ_TIME] /
145-
(plan.content.Plan[NodeProp.IO_READ_TIME] +
146-
plan.content.Plan[NodeProp.IO_WRITE_TIME])) *
147-
100
148-
"
149-
></GridProgressBar>
150-
{{ Math.round(node[NodeProp.EXCLUSIVE_IO_READ_TIME]).toLocaleString() }}
151-
<div v-if="showDetails" class="small text-body-secondary">
152-
{{ duration(node[NodeProp.EXCLUSIVE_IO_READ_TIME]) }}
153-
<br />
154-
{{ transferRate(node[NodeProp.AVERAGE_IO_READ_SPEED]) }}
155-
</div>
142+
<template v-if="node[NodeProp.IO_READ_TIME]">
143+
<GridProgressBar
144+
:percentage="
145+
(node[NodeProp.EXCLUSIVE_IO_READ_TIME] /
146+
(plan.content.Plan[NodeProp.IO_READ_TIME] +
147+
plan.content.Plan[NodeProp.IO_WRITE_TIME])) *
148+
100
149+
"
150+
></GridProgressBar>
151+
{{ Math.round(node[NodeProp.EXCLUSIVE_IO_READ_TIME]).toLocaleString() }}
152+
<div v-if="showDetails" class="small text-body-secondary">
153+
{{ duration(node[NodeProp.EXCLUSIVE_IO_READ_TIME]) }}
154+
<br />
155+
{{ transferRate(node[NodeProp.AVERAGE_IO_READ_SPEED]) }}
156+
</div>
157+
</template>
156158
</td>
157159
<td
158160
class="text-end grid-progress-cell text-nowrap"
159-
v-if="node[NodeProp.IO_WRITE_TIME]"
161+
v-if="columns.includes('iowrite')"
160162
v-tippy="{ content: ioTooltip, allowHTML: true }"
161163
>
162-
<GridProgressBar
163-
:percentage="
164-
(node[NodeProp.EXCLUSIVE_IO_WRITE_TIME] /
165-
(plan.content.Plan[NodeProp.IO_READ_TIME] +
166-
plan.content.Plan[NodeProp.IO_WRITE_TIME])) *
167-
100
168-
"
169-
></GridProgressBar>
170-
{{ Math.round(node[NodeProp.EXCLUSIVE_IO_WRITE_TIME]).toLocaleString() }}
171-
<div v-if="showDetails" class="small text-body-secondary">
172-
{{ duration(node[NodeProp.EXCLUSIVE_IO_WRITE_TIME]) }}
173-
<br />
174-
{{ transferRate(node[NodeProp.AVERAGE_IO_WRITE_SPEED]) }}
175-
</div>
164+
<template v-if="node[NodeProp.IO_WRITE_TIME]">
165+
<GridProgressBar
166+
:percentage="
167+
(node[NodeProp.EXCLUSIVE_IO_WRITE_TIME] /
168+
(plan.content.Plan[NodeProp.IO_READ_TIME] +
169+
plan.content.Plan[NodeProp.IO_WRITE_TIME])) *
170+
100
171+
"
172+
></GridProgressBar>
173+
{{
174+
Math.round(node[NodeProp.EXCLUSIVE_IO_WRITE_TIME]).toLocaleString()
175+
}}
176+
<div v-if="showDetails" class="small text-body-secondary">
177+
{{ duration(node[NodeProp.EXCLUSIVE_IO_WRITE_TIME]) }}
178+
<br />
179+
{{ transferRate(node[NodeProp.AVERAGE_IO_WRITE_SPEED]) }}
180+
</div>
181+
</template>
176182
</td>
177183
<td
178184
class="text-end grid-progress-cell text-nowrap"

0 commit comments

Comments
 (0)