Update hardware.tsx

This commit is contained in:
MacRimi
2025-10-09 23:34:44 +02:00
parent f24f4ea8f9
commit 4562dd08dc

View File

@@ -76,7 +76,10 @@ export default function Hardware() {
const fetchRealtimeData = async () => {
try {
const response = await fetch(`http://localhost:8008/api/gpu/${fullSlot}/realtime`, {
const apiUrl = `http://${window.location.hostname}:8008/api/gpu/${fullSlot}/realtime`
console.log("[v0] Fetching GPU realtime data from:", apiUrl)
const response = await fetch(apiUrl, {
method: "GET",
headers: {
"Content-Type": "application/json",
@@ -89,6 +92,7 @@ export default function Hardware() {
}
const data = await response.json()
console.log("[v0] GPU realtime data received:", data)
setRealtimeGPUData(data)
setDetailsLoading(false)
} catch (error) {
@@ -684,7 +688,7 @@ export default function Hardware() {
<svg className="h-5 w-5 text-blue-500" fill="currentColor" viewBox="0 0 20 20">
<path
fillRule="evenodd"
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z"
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 100-2v-3a1 1 0 00-1-1H9z"
clipRule="evenodd"
/>
</svg>