- Add GET /api/clients/crashed endpoint (process_status=crashed or stale heartbeat) - Add restart_app command action with same lifecycle + lockout as reboot_host - Scheduler: crash auto-recovery loop (CRASH_RECOVERY_ENABLED flag, lockout, MQTT publish) - Scheduler: unconditional command expiry sweep per poll cycle (sweep_expired_commands) - Listener: subscribe to infoscreen/+/service_failed; persist service_failed_at + unit - Listener: extract broker_connection block from health payload; persist reconnect_count + last_disconnect_at - DB migration b1c2d3e4f5a6: service_failed_at, service_failed_unit, mqtt_reconnect_count, mqtt_last_disconnect_at on clients - Add GET /api/clients/service_failed and POST /api/clients/<uuid>/clear_service_failed - Monitoring overview API: include mqtt_reconnect_count + mqtt_last_disconnect_at per client - Frontend: orange service-failed alert panel (hidden when empty, auto-refresh, quittieren action) - Frontend: MQTT reconnect count + last disconnect in client detail panel - MQTT auth hardening: listener/scheduler/server use env credentials; broker enforces allow_anonymous false - Client command lifecycle foundation: ClientCommand model, reboot_host/shutdown_host, full ACK lifecycle - Docs: TECH-CHANGELOG, DEV-CHANGELOG, MQTT_EVENT_PAYLOAD_GUIDE, copilot-instructions updated - Add implementation-plans/, RESTART_VALIDATION_CHECKLIST.md, TODO.md
65 lines
1.7 KiB
TypeScript
65 lines
1.7 KiB
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
// import path from 'path';
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
cacheDir: './.vite',
|
|
plugins: [react()],
|
|
define: {
|
|
__BUILD_DATE__: JSON.stringify(new Date().toISOString()),
|
|
__NODE_VERSION__: JSON.stringify(process.version),
|
|
__BUILD_ENV__: JSON.stringify(process.env.NODE_ENV ?? 'development'),
|
|
},
|
|
resolve: {
|
|
// 🔧 KORRIGIERT: Entferne die problematischen Aliases komplett
|
|
// Diese verursachen das "not an absolute path" Problem
|
|
// alias: {
|
|
// '@syncfusion/ej2-react-navigations': '@syncfusion/ej2-react-navigations/index.js',
|
|
// '@syncfusion/ej2-react-buttons': '@syncfusion/ej2-react-buttons/index.js',
|
|
// },
|
|
},
|
|
optimizeDeps: {
|
|
// 🔧 NEU: Force pre-bundling der Syncfusion Module
|
|
include: [
|
|
'@syncfusion/ej2-react-navigations',
|
|
'@syncfusion/ej2-react-buttons',
|
|
'@syncfusion/ej2-react-splitbuttons',
|
|
'@syncfusion/ej2-react-grids',
|
|
'@syncfusion/ej2-react-schedule',
|
|
'@syncfusion/ej2-react-filemanager',
|
|
'@syncfusion/ej2-base',
|
|
'@syncfusion/ej2-navigations',
|
|
'@syncfusion/ej2-buttons',
|
|
'@syncfusion/ej2-splitbuttons',
|
|
'@syncfusion/ej2-react-base',
|
|
],
|
|
// 🔧 NEU: Force dependency re-optimization
|
|
force: true,
|
|
esbuildOptions: {
|
|
target: 'es2020',
|
|
},
|
|
},
|
|
build: {
|
|
target: 'es2020',
|
|
commonjsOptions: {
|
|
include: [/node_modules/],
|
|
transformMixedEsModules: true,
|
|
},
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 5173,
|
|
watch: {
|
|
usePolling: true,
|
|
},
|
|
fs: {
|
|
strict: false,
|
|
},
|
|
proxy: {
|
|
'/api': 'http://server:8000',
|
|
'/screenshots': 'http://server:8000',
|
|
},
|
|
},
|
|
});
|