mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-10-11 12:26:18 +00:00
Update AppImage
This commit is contained in:
@@ -126,26 +126,8 @@ export default function Hardware() {
|
|||||||
const hasRealtimeData = (): boolean => {
|
const hasRealtimeData = (): boolean => {
|
||||||
if (!realtimeGPUData) return false
|
if (!realtimeGPUData) return false
|
||||||
|
|
||||||
if (realtimeGPUData.has_monitoring_tool === true) {
|
// Esto permite mostrar datos incluso cuando la GPU está inactiva (valores en 0 o null)
|
||||||
return true
|
return realtimeGPUData.has_monitoring_tool === true
|
||||||
}
|
|
||||||
|
|
||||||
// Fallback: check if there's actual data
|
|
||||||
const result = !!(
|
|
||||||
(realtimeGPUData.temperature !== undefined && realtimeGPUData.temperature > 0) ||
|
|
||||||
(realtimeGPUData.utilization_gpu !== undefined && realtimeGPUData.utilization_gpu > 0) ||
|
|
||||||
realtimeGPUData.memory_total ||
|
|
||||||
realtimeGPUData.power_draw ||
|
|
||||||
realtimeGPUData.engine_render !== undefined ||
|
|
||||||
realtimeGPUData.engine_blitter !== undefined ||
|
|
||||||
realtimeGPUData.engine_video !== undefined ||
|
|
||||||
realtimeGPUData.engine_video_enhance !== undefined ||
|
|
||||||
realtimeGPUData.clock_graphics ||
|
|
||||||
realtimeGPUData.clock_memory ||
|
|
||||||
realtimeGPUData.utilization_memory !== undefined ||
|
|
||||||
(realtimeGPUData.processes !== undefined && realtimeGPUData.processes.length > 0)
|
|
||||||
)
|
|
||||||
return result
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -484,7 +466,7 @@ export default function Hardware() {
|
|||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<h3 className="font-semibold text-sm">Real-Time Metrics</h3>
|
<h3 className="font-semibold text-sm">Real-Time Metrics</h3>
|
||||||
<div className="grid gap-2">
|
<div className="grid gap-2">
|
||||||
{realtimeGPUData.temperature !== undefined && (
|
{realtimeGPUData.temperature !== undefined && realtimeGPUData.temperature !== null ? (
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<span className="text-sm text-muted-foreground">Temperature</span>
|
<span className="text-sm text-muted-foreground">Temperature</span>
|
||||||
@@ -494,8 +476,15 @@ export default function Hardware() {
|
|||||||
</div>
|
</div>
|
||||||
<Progress value={(realtimeGPUData.temperature / 100) * 100} className="h-2" />
|
<Progress value={(realtimeGPUData.temperature / 100) * 100} className="h-2" />
|
||||||
</div>
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="flex justify-between border-b border-border/50 pb-2">
|
||||||
|
<span className="text-sm text-muted-foreground">Temperature</span>
|
||||||
|
<span className="text-sm font-medium text-muted-foreground">N/A</span>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
{realtimeGPUData.utilization_gpu !== undefined && (
|
|
||||||
|
{realtimeGPUData.utilization_gpu !== undefined &&
|
||||||
|
realtimeGPUData.utilization_gpu !== null ? (
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<span className="text-sm text-muted-foreground">GPU Utilization</span>
|
<span className="text-sm text-muted-foreground">GPU Utilization</span>
|
||||||
@@ -514,7 +503,16 @@ export default function Hardware() {
|
|||||||
className="h-2"
|
className="h-2"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="space-y-1">
|
||||||
|
<div className="flex justify-between">
|
||||||
|
<span className="text-sm text-muted-foreground">GPU Utilization</span>
|
||||||
|
<span className="text-sm font-medium">0.0%</span>
|
||||||
|
</div>
|
||||||
|
<Progress value={0} className="h-2" />
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{realtimeGPUData.clock_graphics && (
|
{realtimeGPUData.clock_graphics && (
|
||||||
<div className="flex justify-between border-b border-border/50 pb-2">
|
<div className="flex justify-between border-b border-border/50 pb-2">
|
||||||
<span className="text-sm text-muted-foreground">Graphics Clock</span>
|
<span className="text-sm text-muted-foreground">Graphics Clock</span>
|
||||||
|
@@ -1756,11 +1756,13 @@ def get_detailed_gpu_info(gpu):
|
|||||||
busy_value = engines_data[engine_name].get('busy', 0)
|
busy_value = engines_data[engine_name].get('busy', 0)
|
||||||
detailed_info[key] = float(busy_value)
|
detailed_info[key] = float(busy_value)
|
||||||
engine_values.append(busy_value)
|
engine_values.append(busy_value)
|
||||||
data_retrieved = True
|
|
||||||
|
|
||||||
# Calculate overall GPU utilization
|
# Calculate overall GPU utilization
|
||||||
if engine_values:
|
if engine_values:
|
||||||
avg_utilization = sum(engine_values) / len(engine_values)
|
avg_utilization = sum(engine_values) / len(engine_values)
|
||||||
|
else:
|
||||||
|
avg_utilization = 0.0
|
||||||
|
|
||||||
detailed_info['utilization_gpu'] = f"{avg_utilization:.1f}%"
|
detailed_info['utilization_gpu'] = f"{avg_utilization:.1f}%"
|
||||||
data_retrieved = True
|
data_retrieved = True
|
||||||
|
|
||||||
@@ -3009,3 +3011,4 @@ if __name__ == '__main__':
|
|||||||
print("API endpoints available at: /api/system, /api/storage, /api/network, /api/vms, /api/logs, /api/health, /api/hardware")
|
print("API endpoints available at: /api/system, /api/storage, /api/network, /api/vms, /api/logs, /api/health, /api/hardware")
|
||||||
|
|
||||||
app.run(host='0.0.0.0', port=8008, debug=False)
|
app.run(host='0.0.0.0', port=8008, debug=False)
|
||||||
|
port=8008, debug=False)
|
||||||
|
Reference in New Issue
Block a user