fix: Add disk tooltip to Proxmox node overview. Related to #862
This commit is contained in:
parent
688d34beeb
commit
a4b5ce4b25
1 changed files with 27 additions and 8 deletions
|
|
@ -12,6 +12,7 @@ import { StatusDot } from '@/components/shared/StatusDot';
|
||||||
import { getNodeStatusIndicator, getPBSStatusIndicator } from '@/utils/status';
|
import { getNodeStatusIndicator, getPBSStatusIndicator } from '@/utils/status';
|
||||||
import { ResponsiveMetricCell, MetricText } from '@/components/shared/responsive';
|
import { ResponsiveMetricCell, MetricText } from '@/components/shared/responsive';
|
||||||
import { StackedMemoryBar } from '@/components/Dashboard/StackedMemoryBar';
|
import { StackedMemoryBar } from '@/components/Dashboard/StackedMemoryBar';
|
||||||
|
import { StackedDiskBar } from '@/components/Dashboard/StackedDiskBar';
|
||||||
import { EnhancedCPUBar } from '@/components/Dashboard/EnhancedCPUBar';
|
import { EnhancedCPUBar } from '@/components/Dashboard/EnhancedCPUBar';
|
||||||
import { TemperatureGauge } from '@/components/shared/TemperatureGauge';
|
import { TemperatureGauge } from '@/components/shared/TemperatureGauge';
|
||||||
import { useBreakpoint } from '@/hooks/useBreakpoint';
|
import { useBreakpoint } from '@/hooks/useBreakpoint';
|
||||||
|
|
@ -636,14 +637,32 @@ export const NodeSummaryTable: Component<NodeSummaryTableProps> = (props) => {
|
||||||
|
|
||||||
{/* Disk */}
|
{/* Disk */}
|
||||||
<td class={tdClass} style={metricColumnStyle}>
|
<td class={tdClass} style={metricColumnStyle}>
|
||||||
<ResponsiveMetricCell
|
<Show when={isMobile()}>
|
||||||
value={diskPercentValue}
|
<div class="md:hidden h-4 flex items-center justify-center">
|
||||||
type="disk"
|
<MetricText value={diskPercentValue} type="disk" />
|
||||||
resourceId={metricsKey}
|
</div>
|
||||||
sublabel={diskSublabel}
|
</Show>
|
||||||
isRunning={online}
|
<div class="hidden md:block h-4">
|
||||||
showMobile={isMobile()}
|
<Show when={isPVEItem} fallback={
|
||||||
/>
|
<ResponsiveMetricCell
|
||||||
|
value={diskPercentValue}
|
||||||
|
type="disk"
|
||||||
|
resourceId={metricsKey}
|
||||||
|
sublabel={diskSublabel}
|
||||||
|
isRunning={online}
|
||||||
|
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>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
{/* Temperature */}
|
{/* Temperature */}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue