mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-10-02 16:16:19 +00:00
Update AppImge
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
@tailwind base;
|
@import "tailwindcss";
|
||||||
@tailwind components;
|
@import "tw-animate-css";
|
||||||
@tailwind utilities;
|
|
||||||
|
@custom-variant dark (&:is(.dark *));
|
||||||
|
|
||||||
/* === Design tokens (CSS variables) === */
|
|
||||||
:root {
|
:root {
|
||||||
--background: oklch(1 0 0);
|
--background: oklch(1 0 0);
|
||||||
--foreground: oklch(0.145 0 0);
|
--foreground: oklch(0.145 0 0);
|
||||||
@@ -74,7 +74,45 @@
|
|||||||
--sidebar-ring: oklch(0.439 0 0);
|
--sidebar-ring: oklch(0.439 0 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Base: ahora ya sin @theme inline (v4) */
|
@theme inline {
|
||||||
|
--color-background: var(--background);
|
||||||
|
--color-foreground: var(--foreground);
|
||||||
|
--color-card: var(--card);
|
||||||
|
--color-card-foreground: var(--card-foreground);
|
||||||
|
--color-popover: var(--popover);
|
||||||
|
--color-popover-foreground: var(--popover-foreground);
|
||||||
|
--color-primary: var(--primary);
|
||||||
|
--color-primary-foreground: var(--primary-foreground);
|
||||||
|
--color-secondary: var(--secondary);
|
||||||
|
--color-secondary-foreground: var(--secondary-foreground);
|
||||||
|
--color-muted: var(--muted);
|
||||||
|
--color-muted-foreground: var(--muted-foreground);
|
||||||
|
--color-accent: var(--accent);
|
||||||
|
--color-accent-foreground: var(--accent-foreground);
|
||||||
|
--color-destructive: var(--destructive);
|
||||||
|
--color-destructive-foreground: var(--destructive-foreground);
|
||||||
|
--color-border: var(--border);
|
||||||
|
--color-input: var(--input);
|
||||||
|
--color-ring: var(--ring);
|
||||||
|
--color-chart-1: var(--chart-1);
|
||||||
|
--color-chart-2: var(--chart-2);
|
||||||
|
--color-chart-3: var(--chart-3);
|
||||||
|
--color-chart-4: var(--chart-4);
|
||||||
|
--color-chart-5: var(--chart-5);
|
||||||
|
--radius-sm: calc(var(--radius) - 4px);
|
||||||
|
--radius-md: calc(var(--radius) - 2px);
|
||||||
|
--radius-lg: var(--radius);
|
||||||
|
--radius-xl: calc(var(--radius) + 4px);
|
||||||
|
--color-sidebar: var(--sidebar);
|
||||||
|
--color-sidebar-foreground: var(--sidebar-foreground);
|
||||||
|
--color-sidebar-primary: var(--sidebar-primary);
|
||||||
|
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
||||||
|
--color-sidebar-accent: var(--sidebar-accent);
|
||||||
|
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
||||||
|
--color-sidebar-border: var(--sidebar-border);
|
||||||
|
--color-sidebar-ring: var(--sidebar-ring);
|
||||||
|
}
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
* {
|
* {
|
||||||
@apply border-border outline-ring/50;
|
@apply border-border outline-ring/50;
|
||||||
|
@@ -46,18 +46,18 @@ export function ProxmoxDashboard() {
|
|||||||
const fetchSystemData = useCallback(async () => {
|
const fetchSystemData = useCallback(async () => {
|
||||||
console.log("[v0] Fetching system data from Flask server...")
|
console.log("[v0] Fetching system data from Flask server...")
|
||||||
console.log("[v0] Current window location:", window.location.href)
|
console.log("[v0] Current window location:", window.location.href)
|
||||||
console.log("[v0] Window host:", window.location.host)
|
|
||||||
console.log("[v0] Window hostname:", window.location.hostname)
|
|
||||||
console.log("[v0] Window port:", window.location.port)
|
|
||||||
|
|
||||||
// Esto permite que los clientes se conecten usando la IP del servidor (ej: 192.168.0.52:8008)
|
const apiUrl = "/api/system"
|
||||||
// en lugar de localhost
|
|
||||||
const apiUrl = `/api/system` // Siempre usar ruta relativa
|
|
||||||
|
|
||||||
console.log("[v0] API URL:", apiUrl)
|
console.log("[v0] API URL:", apiUrl)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(apiUrl)
|
const response = await fetch(apiUrl, {
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
})
|
||||||
console.log("[v0] Response status:", response.status)
|
console.log("[v0] Response status:", response.status)
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
@@ -169,7 +169,6 @@ export function ProxmoxDashboard() {
|
|||||||
<header className="border-b border-border bg-card sticky top-0 z-50 shadow-sm">
|
<header className="border-b border-border bg-card sticky top-0 z-50 shadow-sm">
|
||||||
<div className="container mx-auto px-6 py-4">
|
<div className="container mx-auto px-6 py-4">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex items-center space-x-4">
|
|
||||||
<div className="flex items-center space-x-3">
|
<div className="flex items-center space-x-3">
|
||||||
<div className="w-10 h-10 relative flex items-center justify-center bg-primary/10 overflow-hidden">
|
<div className="w-10 h-10 relative flex items-center justify-center bg-primary/10 overflow-hidden">
|
||||||
<Image
|
<Image
|
||||||
@@ -196,17 +195,16 @@ export function ProxmoxDashboard() {
|
|||||||
<p className="text-sm text-muted-foreground">Proxmox System Dashboard</p>
|
<p className="text-sm text-muted-foreground">Proxmox System Dashboard</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="hidden md:flex items-center ml-6">
|
|
||||||
<div className="server-info flex items-center space-x-2">
|
<div className="flex items-center space-x-4">
|
||||||
|
<div className="hidden md:flex items-center space-x-2">
|
||||||
<Server className="h-4 w-4 text-muted-foreground" />
|
<Server className="h-4 w-4 text-muted-foreground" />
|
||||||
<div className="text-sm">
|
<div className="text-sm">
|
||||||
<div className="font-medium text-foreground">{systemStatus.nodeId}</div>
|
<div className="font-medium text-foreground">{systemStatus.serverName}</div>
|
||||||
</div>
|
<div className="text-xs text-muted-foreground">{systemStatus.nodeId}</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center space-x-4">
|
|
||||||
<Badge variant="outline" className={statusColor}>
|
<Badge variant="outline" className={statusColor}>
|
||||||
{statusIcon}
|
{statusIcon}
|
||||||
<span className="ml-1 capitalize">{systemStatus.status}</span>
|
<span className="ml-1 capitalize">{systemStatus.status}</span>
|
||||||
|
@@ -50,7 +50,6 @@ const fetchSystemData = async (): Promise<SystemData | null> => {
|
|||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
signal: AbortSignal.timeout(5000),
|
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
@@ -88,7 +87,6 @@ const fetchVMData = async (): Promise<VMData[]> => {
|
|||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
signal: AbortSignal.timeout(5000),
|
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
Reference in New Issue
Block a user