Skip to content

Commit

Permalink
fix: Update rendering and returned data
Browse files Browse the repository at this point in the history
  • Loading branch information
hiro-v committed Jan 7, 2024
1 parent ab13630 commit 62bec27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions web/containers/Layout/BottomBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ const BottomBar = () => {
<div className="flex items-center gap-x-2">
<SystemItem name="CPU:" value={`${cpu}%`} />
<SystemItem name="Mem:" value={`${ram}%`} />
{nvidiaGpuUtilization && <SystemItem name="N-GPU:" value={`${nvidiaGpuUtilization}%`} />}
{nvidiaVramUtilization && <SystemItem name="N-GPU:" value={`${nvidiaVramUtilization}%`} />}
<SystemItem name="N-GPU:" value={`${nvidiaGpuUtilization}%`} />
<SystemItem name="N-VRAM:" value={`${nvidiaVramUtilization}%`} />
</div>
{/* VERSION is defined by webpack, please see next.config.js */}
<span className="text-xs">Jan v{VERSION ?? ''}</span>
Expand Down
2 changes: 1 addition & 1 deletion web/hooks/useGetSystemResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function useGetSystemResources() {
Math.round(currentLoadInfor?.nvidia?.gpu_utilization ?? 0)
)
setNvidiaVramUtilization(
Math.round(currentLoadInfor?.nvidia?.vram_utilization * 100)
Math.round(currentLoadInfor?.nvidia?.vram_utilization ?? 0)
)
}

Expand Down

0 comments on commit 62bec27

Please sign in to comment.