Backend (Django 4.2 + DRF): - Admin auth with SimpleJWT - Volcengine API client with HMAC-SHA256 signing - IAM user management (create/sync/import/disable/enable) - Billing query with pagination - Feishu webhook notifications (async) - APScheduler for periodic spending checks - AES-256 encrypted credential storage - API key auth for external system integration Frontend (Vue 3 + Element Plus): - Login page - Dashboard with stats overview - IAM user list with per-user threshold config - Billing view with spending progress bars - Alert history with type filtering - Settings page for global config and Volcengine account management Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
15 lines
476 B
Python
15 lines
476 B
Python
from django.apps import AppConfig
|
|
|
|
|
|
class MonitorConfig(AppConfig):
|
|
default_auto_field = 'django.db.models.BigAutoField'
|
|
name = 'apps.monitor'
|
|
verbose_name = 'IAM 监控管理'
|
|
|
|
def ready(self):
|
|
from utils.scheduler import start_scheduler
|
|
import os
|
|
# Only start scheduler in the main process (not in migrate/shell/etc)
|
|
if os.environ.get('RUN_MAIN') == 'true' or os.environ.get('GUNICORN_RUNNING'):
|
|
start_scheduler()
|