mirror of
https://github.com/dartdavros/chatballs.git
synced 2026-10-07 18:04:59 +03:00
Backend integrations app (ADR-HUB-0020): Integration model (LLM provider / messenger connection) with Fernet-encrypted secret, config (base_url, default model), status + last check. DRF CRUD (IsOwner, org-scoped) plus a Проверить action that validates connectivity — OpenRouter via GET /key, MAX via /me, Telegram via getMe — and records OK/ERROR with a message. Secret is never returned by the serializer. Internal UI: enable the Интеграции section — list grouped by providers / connections, create/edit modal, test and delete. Wire route, sidebar, titles. Channel binding of connections and provider-from-DB wiring land in M1. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
12 lines
404 B
Python
12 lines
404 B
Python
from django.contrib import admin
|
|
|
|
from hub_platform.integrations.models import Integration
|
|
|
|
|
|
@admin.register(Integration)
|
|
class IntegrationAdmin(admin.ModelAdmin):
|
|
list_display = ("name", "provider", "kind", "status", "last_checked_at")
|
|
list_filter = ("provider", "kind", "status")
|
|
search_fields = ("name",)
|
|
readonly_fields = ("last_checked_at", "last_error", "created_at", "updated_at")
|