Files
chatballs/apps/backend/hub_platform/integrations/admin.py
T
AndreyandClaude Opus 4.8 12227cd448 feat(integrations): M0 — integrations section (providers + connections)
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>
2026-06-28 00:21:23 +03:00

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")