feat: Improve dashboard functionality and stability

This commit introduces several improvements to the dashboard:

- Refactored the component structure for consistency, defining callbacks within the `render` function.
- Added robust error handling to data loading and callbacks to prevent crashes.
- Implemented linking for SO and AIR columns in the source table.
- Added and improved filtering and display options for tables.
- Left-aligned columns in tables for better readability.
- Cleaned up unused component files.
This commit is contained in:
2025-09-18 05:20:13 +02:00
parent db30fa9b4e
commit 01da618733
11 changed files with 225 additions and 218 deletions

10
main.py
View File

@ -1,4 +1,3 @@
# initial commit
from dash import Dash
import dash_bootstrap_components as dbc
@ -20,7 +19,14 @@ def main() -> None:
print(os.getenv("MY_ENV_VAR"))
print(config["Startup"])
# load the data and create the data manager
data = load_mtbf_data(config["DATA_PATH"])
try:
data = load_mtbf_data(config["DATA_PATH"])
except FileNotFoundError:
print(f"Error: Data file not found at {config['DATA_PATH']}")
return
except Exception as e:
print(f"Error loading data: {e}")
return
app = Dash(external_stylesheets=[BS])
app.title = "Reliability Dashboard"