Refactor: Java-Klassen aus Services entfernt + kritische Bugs gefixt
- AuthService, SystemInfo, IdentitiesManager Klassen → Modul-Funktionen
- grp.getall() → grp.getgrall() (Bug: Methode existierte nie)
- open('/proc/loadavg') ohne context manager gefixt (File-Handle-Leak)
- rx_packets/tx_packets null-check im Frontend (toLocaleString auf undefined)
- PoolCard onClick: /pools/{name} → /zfs (Route existierte nicht, löste Seitenreload aus)
- Alle Router-Imports auf Modul-Aliase umgestellt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ from fastapi import APIRouter, Depends, HTTPException, status
|
||||
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
|
||||
from pydantic import BaseModel
|
||||
|
||||
from services.auth import auth_service
|
||||
from services import auth as auth_service
|
||||
from models import Token
|
||||
|
||||
router = APIRouter(prefix="/api/auth", tags=["auth"])
|
||||
|
||||
@@ -8,7 +8,7 @@ from typing import List, Optional
|
||||
from pydantic import BaseModel
|
||||
|
||||
from services.zfs_runner import zfs_runner
|
||||
from services.auth import auth_service
|
||||
from services import auth as auth_service
|
||||
from models import Dataset, DatasetType
|
||||
|
||||
router = APIRouter(prefix="/api/datasets", tags=["datasets"])
|
||||
|
||||
@@ -7,8 +7,8 @@ from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
|
||||
from services.identities import identities_manager
|
||||
from services.auth import auth_service
|
||||
from services import identities as identities_manager
|
||||
from services import auth as auth_service
|
||||
|
||||
router = APIRouter(prefix="/api/identities", tags=["identities"])
|
||||
security = HTTPBearer()
|
||||
|
||||
@@ -14,7 +14,7 @@ import jwt
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from services.file_manager import file_manager
|
||||
from services.auth import auth_service
|
||||
from services import auth as auth_service
|
||||
|
||||
router = APIRouter(prefix="/api/navigator", tags=["navigator"])
|
||||
security = HTTPBearer()
|
||||
|
||||
@@ -8,7 +8,7 @@ from typing import List
|
||||
import re
|
||||
|
||||
from services.zfs_runner import zfs_runner
|
||||
from services.auth import auth_service
|
||||
from services import auth as auth_service
|
||||
from models import Pool, PoolStatus, PoolHealth
|
||||
|
||||
router = APIRouter(prefix="/api/pools", tags=["pools"])
|
||||
|
||||
@@ -8,7 +8,7 @@ from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
|
||||
from services.shares import share_manager
|
||||
from services.auth import auth_service
|
||||
from services import auth as auth_service
|
||||
|
||||
router = APIRouter(prefix="/api/shares", tags=["shares"])
|
||||
security = HTTPBearer()
|
||||
|
||||
@@ -9,7 +9,7 @@ from pydantic import BaseModel
|
||||
from datetime import datetime
|
||||
|
||||
from services.zfs_runner import zfs_runner
|
||||
from services.auth import auth_service
|
||||
from services import auth as auth_service
|
||||
from models import Snapshot
|
||||
|
||||
router = APIRouter(prefix="/api/snapshots", tags=["snapshots"])
|
||||
|
||||
@@ -6,8 +6,8 @@ from fastapi import APIRouter, Depends, HTTPException, status
|
||||
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
|
||||
from pydantic import BaseModel
|
||||
|
||||
from services.system_info import system_info
|
||||
from services.auth import auth_service
|
||||
from services import system_info
|
||||
from services import auth as auth_service
|
||||
|
||||
router = APIRouter(prefix="/api/system", tags=["system"])
|
||||
security = HTTPBearer()
|
||||
|
||||
Reference in New Issue
Block a user