mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-27 08:31:28 +00:00
fix: Node disk column respects Trends view mode. Related to #904
The disk column for Proxmox nodes was always showing bars even when
Trends (sparklines) view mode was selected. Memory column was correctly
checking viewMode() but disk was not.
Added the same Show when={viewMode() === 'sparklines'} conditional
to the disk column rendering in NodeSummaryTable.
This commit is contained in:
parent
0feb039775
commit
2b58722906
1 changed files with 21 additions and 8 deletions
|
|
@ -653,14 +653,27 @@ export const NodeSummaryTable: Component<NodeSummaryTableProps> = (props) => {
|
|||
showMobile={false}
|
||||
/>
|
||||
}>
|
||||
<StackedDiskBar
|
||||
aggregateDisk={{
|
||||
total: node!.disk?.total || 0,
|
||||
used: node!.disk?.used || 0,
|
||||
free: (node!.disk?.total || 0) - (node!.disk?.used || 0),
|
||||
usage: node!.disk?.total ? (node!.disk.used / node!.disk.total) : 0
|
||||
}}
|
||||
/>
|
||||
<Show
|
||||
when={viewMode() === 'sparklines'}
|
||||
fallback={
|
||||
<StackedDiskBar
|
||||
aggregateDisk={{
|
||||
total: node!.disk?.total || 0,
|
||||
used: node!.disk?.used || 0,
|
||||
free: (node!.disk?.total || 0) - (node!.disk?.used || 0),
|
||||
usage: node!.disk?.total ? (node!.disk.used / node!.disk.total) : 0
|
||||
}}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<ResponsiveMetricCell
|
||||
value={diskPercentValue}
|
||||
type="disk"
|
||||
resourceId={metricsKey}
|
||||
isRunning={online}
|
||||
showMobile={false}
|
||||
/>
|
||||
</Show>
|
||||
</Show>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue