feat: Implement Homelab Automation API v2, introducing a new dashboard, comprehensive backend models, and API routes.
Tests / Backend Tests (Python) (3.10) (push) Has been cancelled
Tests / Backend Tests (Python) (3.11) (push) Has been cancelled
Tests / Backend Tests (Python) (3.12) (push) Has been cancelled
Tests / Frontend Tests (JS) (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / All Tests Passed (push) Has been cancelled

This commit is contained in:
2026-03-06 09:31:08 -05:00
parent 984d06a223
commit 817f8b4ee7
37 changed files with 18141 additions and 10109 deletions
-1
View File
@@ -1,4 +1,3 @@
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -1,4 +1,3 @@
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -1,4 +1,3 @@
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -1,4 +1,3 @@
from __future__ import annotations
from datetime import datetime
from typing import Optional
+9 -1
View File
@@ -1,7 +1,6 @@
"""Database configuration and session management for Homelab Automation.
Uses SQLAlchemy 2.x async engine with SQLite + aiosqlite driver.
"""
from __future__ import annotations
import asyncio
import os
@@ -173,11 +172,20 @@ async def init_db() -> None:
import sqlalchemy as sa
sync_engine = sa.create_engine(sync_url)
with sync_engine.connect() as conn:
# Case 1: Table doesn't exist
conn.execute(sa.text(
"CREATE TABLE IF NOT EXISTS alembic_version "
"(version_num VARCHAR(255) NOT NULL, "
"PRIMARY KEY (version_num))"
))
# Case 2: Table exists but column might be too short (VARCHAR(32))
# Descriptive revisions like '0011_add_docker_management_tables' are > 30 chars
try:
conn.execute(sa.text(
"ALTER TABLE alembic_version MODIFY version_num VARCHAR(255) NOT NULL"
))
except Exception:
pass # Might fail if not MySQL or column already long (SQLite has no MODIFY)
conn.commit()
sync_engine.dispose()
print("[DB] MySQL: alembic_version table ensured with VARCHAR(255)")
-1
View File
@@ -1,5 +1,4 @@
"""Docker Alert model for Homelab Automation."""
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -1,5 +1,4 @@
"""Docker Container model for Homelab Automation."""
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -1,5 +1,4 @@
"""Docker Image model for Homelab Automation."""
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -1,5 +1,4 @@
"""Docker Volume model for Homelab Automation."""
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -1,4 +1,3 @@
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -1,4 +1,3 @@
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -1,4 +1,3 @@
from __future__ import annotations
from datetime import datetime
from typing import List, Optional
-1
View File
@@ -1,4 +1,3 @@
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -1,4 +1,3 @@
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -1,4 +1,3 @@
from __future__ import annotations
"""
Model for storing ansible-lint results per playbook.
"""
-1
View File
@@ -1,4 +1,3 @@
from __future__ import annotations
from datetime import datetime
from typing import Any, Dict, List, Optional
-1
View File
@@ -1,4 +1,3 @@
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -1,4 +1,3 @@
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -6,7 +6,6 @@ Security notes:
- Commands are masked to remove sensitive values before storage
- Never stores raw commands that were blocked
"""
from __future__ import annotations
from datetime import datetime
from typing import Optional
-2
View File
@@ -1,8 +1,6 @@
"""
Model for terminal sessions - stores SSH terminal session metadata.
"""
from __future__ import annotations
from datetime import datetime
from typing import Optional
-1
View File
@@ -2,7 +2,6 @@
Designed for single-user now but prepared for multi-user with roles in the future.
"""
from __future__ import annotations
from datetime import datetime
from enum import Enum