feat: Enhance frontend loading experience and service status handling
Some checks failed
Integration Tests / integration-tests (push) Failing after 20s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 23s
Frontend (React) / test (20) (push) Failing after 1m3s
Frontend (React) / build (push) Has been skipped
Frontend (React) / lighthouse (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 23s
Service Adapters (Python FastAPI) / test (3.13) (push) Failing after 20s
Service Adapters (Python FastAPI) / build (push) Has been skipped
Some checks failed
Integration Tests / integration-tests (push) Failing after 20s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 23s
Frontend (React) / test (20) (push) Failing after 1m3s
Frontend (React) / build (push) Has been skipped
Frontend (React) / lighthouse (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 23s
Service Adapters (Python FastAPI) / test (3.13) (push) Failing after 20s
Service Adapters (Python FastAPI) / build (push) Has been skipped
### Summary of Changes - Removed proxy configuration in `rsbuild.config.js` as the API Gateway is not running. - Added smooth transitions and gentle loading overlays in CSS for improved user experience during data loading. - Updated `Dashboard` component to conditionally display loading spinner and gentle loading overlay based on data fetching state. - Enhanced `useOfflineAwareServiceStatus` and `useOfflineAwareSystemData` hooks to manage loading states and service status more effectively. - Increased refresh intervals for service status and system data to reduce API call frequency. ### Expected Results - Improved user experience with smoother loading transitions and better feedback during data refreshes. - Enhanced handling of service status checks, providing clearer information when services are unavailable. - Streamlined code for managing loading states, making it easier to maintain and extend in the future.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from operator import truediv
|
||||
import os
|
||||
|
||||
from dotenv import load_dotenv
|
||||
@@ -8,23 +9,32 @@ load_dotenv()
|
||||
# Service configurations
|
||||
SERVICES = {
|
||||
"home_assistant": {
|
||||
"url": os.getenv("HOME_ASSISTANT_URL", "https://homeassistant.local:8123"),
|
||||
"token": os.getenv("HOME_ASSISTANT_TOKEN", ""),
|
||||
"enabled": bool(os.getenv("HOME_ASSISTANT_TOKEN")),
|
||||
"url": os.getenv("HOME_ASSISTANT_URL", "http://192.168.2.158:8123"),
|
||||
"token": os.getenv("HOME_ASSISTANT_TOKEN", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI3MjdiY2QwMjNkNmM0NzgzYmRiMzg2ZDYxYzQ3N2NmYyIsImlhdCI6MTc1ODE4MDg2MiwiZXhwIjoyMDczNTQwODYyfQ.rN_dBtYmXIo4J1DffgWb6G0KLsgaQ6_kH-kiWJeQQQM"),
|
||||
"enabled": True,
|
||||
"health_check_type": "sensor", # Use sensor-based health checking
|
||||
"sensor_entity": "sensor.uptime_34", # Check uptime sensor
|
||||
"health_endpoint": "/api/", # Fallback API endpoint
|
||||
},
|
||||
"frigate": {
|
||||
"url": os.getenv("FRIGATE_URL", "http://frigate.local:5000"),
|
||||
"token": os.getenv("FRIGATE_TOKEN", ""),
|
||||
"enabled": bool(os.getenv("FRIGATE_TOKEN")),
|
||||
"health_check_type": "api",
|
||||
"health_endpoint": "/api/version",
|
||||
},
|
||||
"immich": {
|
||||
"url": os.getenv("IMMICH_URL", "http://immich.local:2283"),
|
||||
"api_key": os.getenv("IMMICH_API_KEY", ""),
|
||||
"enabled": bool(os.getenv("IMMICH_API_KEY")),
|
||||
"health_check_type": "api",
|
||||
"health_endpoint": "/api/server-info/ping",
|
||||
},
|
||||
"n8n": {
|
||||
"url": os.getenv("N8N_URL", "http://n8n.local:5678"),
|
||||
"webhook_url": os.getenv("N8N_WEBHOOK_URL", ""),
|
||||
"enabled": bool(os.getenv("N8N_WEBHOOK_URL")),
|
||||
"health_check_type": "api",
|
||||
"health_endpoint": "/healthz",
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user