mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-10-10 20:06:18 +00:00
Update AppImage
This commit is contained in:
@@ -126,26 +126,8 @@ export default function Hardware() {
|
||||
const hasRealtimeData = (): boolean => {
|
||||
if (!realtimeGPUData) return false
|
||||
|
||||
if (realtimeGPUData.has_monitoring_tool === true) {
|
||||
return 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
|
||||
// Esto permite mostrar datos incluso cuando la GPU está inactiva (valores en 0 o null)
|
||||
return realtimeGPUData.has_monitoring_tool === true
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -484,7 +466,7 @@ export default function Hardware() {
|
||||
<div className="space-y-2">
|
||||
<h3 className="font-semibold text-sm">Real-Time Metrics</h3>
|
||||
<div className="grid gap-2">
|
||||
{realtimeGPUData.temperature !== undefined && (
|
||||
{realtimeGPUData.temperature !== undefined && realtimeGPUData.temperature !== null ? (
|
||||
<div className="space-y-1">
|
||||
<div className="flex justify-between">
|
||||
<span className="text-sm text-muted-foreground">Temperature</span>
|
||||
@@ -494,8 +476,15 @@ export default function Hardware() {
|
||||
</div>
|
||||
<Progress value={(realtimeGPUData.temperature / 100) * 100} className="h-2" />
|
||||
</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="flex justify-between">
|
||||
<span className="text-sm text-muted-foreground">GPU Utilization</span>
|
||||
@@ -514,7 +503,16 @@ export default function Hardware() {
|
||||
className="h-2"
|
||||
/>
|
||||
</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 && (
|
||||
<div className="flex justify-between border-b border-border/50 pb-2">
|
||||
<span className="text-sm text-muted-foreground">Graphics Clock</span>
|
||||
|
@@ -1756,13 +1756,15 @@ def get_detailed_gpu_info(gpu):
|
||||
busy_value = engines_data[engine_name].get('busy', 0)
|
||||
detailed_info[key] = float(busy_value)
|
||||
engine_values.append(busy_value)
|
||||
data_retrieved = True
|
||||
|
||||
# Calculate overall GPU utilization
|
||||
if engine_values:
|
||||
avg_utilization = sum(engine_values) / len(engine_values)
|
||||
detailed_info['utilization_gpu'] = f"{avg_utilization:.1f}%"
|
||||
data_retrieved = True
|
||||
else:
|
||||
avg_utilization = 0.0
|
||||
|
||||
detailed_info['utilization_gpu'] = f"{avg_utilization:.1f}%"
|
||||
data_retrieved = True
|
||||
|
||||
# Parse client processes
|
||||
if 'clients' in json_data:
|
||||
@@ -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")
|
||||
|
||||
app.run(host='0.0.0.0', port=8008, debug=False)
|
||||
port=8008, debug=False)
|
||||
|
Reference in New Issue
Block a user