mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-15 00:11:15 +03:00
Cleanup
This commit is contained in:
parent
6f266256c6
commit
67d9f7d6ae
@ -1,5 +1,5 @@
|
|||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { FrigateStats, GpuInfo } from "@/types/stats";
|
import { FrigateStats, GpuInfo, GpuStats } from "@/types/stats";
|
||||||
import { startTransition, useEffect, useMemo, useState } from "react";
|
import { startTransition, useEffect, useMemo, useState } from "react";
|
||||||
import { useFrigateStats } from "@/api/ws";
|
import { useFrigateStats } from "@/api/ws";
|
||||||
import {
|
import {
|
||||||
@ -288,8 +288,9 @@ export default function GeneralMetrics({
|
|||||||
|
|
||||||
// Intel doesn't expose VRAM usage, so hide the memory section
|
// Intel doesn't expose VRAM usage, so hide the memory section
|
||||||
// entirely when every reporting GPU is Intel.
|
// entirely when every reporting GPU is Intel.
|
||||||
const firstUsages = statsHistory[0]?.gpu_usages ?? {};
|
const firstEntries: GpuStats[] = Object.values(
|
||||||
const firstEntries = Object.values(firstUsages);
|
statsHistory[0]?.gpu_usages ?? {},
|
||||||
|
);
|
||||||
if (
|
if (
|
||||||
firstEntries.length > 0 &&
|
firstEntries.length > 0 &&
|
||||||
firstEntries.every((s) => s.vendor === "intel")
|
firstEntries.every((s) => s.vendor === "intel")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user