Quota allocation system: - Replace monthly budget with one-time quota allocation (prepaid model) - Support both adding (+) and deducting (-) quota with underflow protection - Stepped alerts at configurable percentages (e.g., 50%/80%/90%) - Auto-disable when quota exhausted (100%), alert state resets on new allocation - Quota allocation history with operator audit trail IAM management: - Create new IAM sub-accounts directly from AirGate (auto-generates API keys) - SecretKey shown once in dialog with copy-to-clipboard - Attach/detach IAM policies via UI (ArkFullAccess, TOSFullAccess, etc.) - Sync existing users from Volcengine - Project list pulled from Volcengine API for dropdown selection Security & auth: - API Key authentication for external systems (AirDrama integration) - SECRET_KEY enforced in production (raises error if missing with DEBUG=False) - APIKeyUser with proper pk/is_staff attributes for DRF compatibility Infrastructure: - Docker + docker-compose for backend and frontend - Nginx reverse proxy for frontend with /api/ forwarding - Entrypoint with auto-migrate and default admin creation - SQLite data persisted via Docker volume at /app/data/ Bug fixes from audit: - Fix frontend referencing non-existent fields (current_month_spending, effective_budget, budget_usage_percent) - Fix scheduler using naive datetime.now() → timezone.now() - Fix scheduler reading interval from settings instead of GlobalConfig DB - Fix docker-compose SQLite volume mounting as directory - Fix CORS origin with explicit port 80 - Remove dead config (VOLC_ACCESS_KEY/SK, MONITOR_INTERVAL from settings) - Remove unused imports Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
42 lines
1.6 KiB
Python
42 lines
1.6 KiB
Python
from django.urls import path
|
|
from . import views
|
|
|
|
urlpatterns = [
|
|
# Dashboard
|
|
path('dashboard/', views.dashboard_view),
|
|
|
|
# Volcengine account management
|
|
path('volc-accounts/', views.volc_account_view),
|
|
path('volc-accounts/<int:pk>/', views.volc_account_detail_view),
|
|
path('volc-accounts/<int:pk>/test/', views.volc_account_test_view),
|
|
|
|
# IAM user management
|
|
path('iam-users/', views.iam_user_list_view),
|
|
path('iam-users/create/', views.iam_user_create_view),
|
|
path('iam-users/sync/', views.iam_user_sync_view),
|
|
path('iam-users/import/', views.iam_user_import_view),
|
|
path('iam-users/<int:pk>/', views.iam_user_detail_view),
|
|
path('iam-users/<int:pk>/update/', views.iam_user_update_view),
|
|
path('iam-users/<int:pk>/disable/', views.iam_user_disable_view),
|
|
path('iam-users/<int:pk>/enable/', views.iam_user_enable_view),
|
|
path('iam-users/<int:pk>/policies/', views.iam_user_policies_view),
|
|
path('iam-users/<int:pk>/policies/attach/', views.iam_user_attach_policy_view),
|
|
path('iam-users/<int:pk>/policies/detach/', views.iam_user_detach_policy_view),
|
|
path('iam-users/<int:pk>/allocate/', views.quota_allocate_view),
|
|
path('iam-users/<int:pk>/quota-history/', views.quota_history_view),
|
|
|
|
# Billing
|
|
path('billing/overview/', views.spending_overview_view),
|
|
path('billing/refresh/', views.spending_refresh_view),
|
|
path('billing/balance/', views.balance_view),
|
|
|
|
# Global config
|
|
path('config/', views.global_config_view),
|
|
|
|
# Alerts
|
|
path('alerts/', views.alert_list_view),
|
|
|
|
# Projects
|
|
path('projects/', views.project_list_view),
|
|
]
|