Files
telemt-api/web
Denozordec b89bd7b632
Publish telemt-api gateway Docker image / test (push) Successful in 26s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 2m14s
Add unique IP count by user in the user traffic table
- Introduced a derived state to calculate the count of unique IPs associated with each user, enhancing the data presented in the user traffic table.
- Replaced the previous unordered list with a structured table format for better readability and organization of user traffic and IP data.
- Updated the user interface to display the number of unique IPs alongside user traffic metrics, improving the overall user experience and data clarity.
2026-03-30 14:10:26 +07:00
..

Telemt Panel (Web UI)

SvelteKit + shadcn-svelte. В production статика собирается и встраивается в образ шлюза (Dockerfile в корне репозитория): панель и API на одном порту (например http://127.0.0.1:8080/ — UI, /api/… — шлюз).

Переменная PUBLIC_TELEMT_GATEWAY_URL

Значение Когда
(пусто) Тот же хост и порт, что у страницы (Docker-образ шлюза, npm run build в Dockerfile с ENV PUBLIC_TELEMT_GATEWAY_URL=)
http://127.0.0.1:8080 Локальная разработка: Vite на :5173, шлюз на :8080

Скопируйте .env.example в .env и при необходимости задайте URL.

Разработка (Vite отдельно от Go)

cd web
npm install
npm run dev

Откройте http://localhost:5173. В конфиге шлюза включите CORS для этого origin:

cors_allowed_origins:
  - "http://localhost:5173"

Сборка только фронта

npm run build

Артефакт — каталог build/, при сборке Docker-образа шлюза он копируется в internal/webui/static/ и попадает в бинарник через embed.

Типы из OpenAPI агрегатов

npm run gen:api

Источник: ../docs/AGGREGATE_OPENAPI.yaml.

Ограничения

  • Секреты upstream к Telemt задаются на шлюзе (authorization_env), не в браузере.
  • Для мутаций из другого origin шлюз отдаёт нужные заголовки CORS (в т.ч. методы POST, PATCH, DELETE).