Add admin configs endpoint and related UI components
- Introduced a new endpoint to list all admin configs, enhancing the admin interface for better management. - Updated API documentation to include the new `/configs` endpoint with pagination and search capabilities. - Added routing and UI elements for the configs section in the admin panel, improving navigation and accessibility. - Enhanced localization for the configs feature in both Russian and English, ensuring a user-friendly experience.
This commit is contained in:
@@ -59,6 +59,23 @@ export type VpnConfigDto = {
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
/** Строка админского списка «Все конфиги» — в отличие от VpnConfigDto содержит владельца и ноду. */
|
||||
export type AdminVpnConfigDto = {
|
||||
id: string
|
||||
userId: string
|
||||
userName: string
|
||||
label: string | null
|
||||
clientEmail: string
|
||||
protocol: VpnProtocol
|
||||
location: string
|
||||
nodeName: string
|
||||
usedUpBytes: number
|
||||
usedDownBytes: number
|
||||
expiresAt: string | null
|
||||
status: ConfigStatus
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export type AvailableInboundDto = {
|
||||
inboundId: string
|
||||
displayName: string
|
||||
|
||||
@@ -154,6 +154,7 @@ const resources = {
|
||||
overview: 'Обзор',
|
||||
activation: 'Запросы на активацию',
|
||||
users: 'Пользователи',
|
||||
configs: 'Все конфиги',
|
||||
roles: 'Роли',
|
||||
nodes: 'Ноды',
|
||||
apps: 'Приложения',
|
||||
@@ -187,6 +188,19 @@ const resources = {
|
||||
confirmDelete: 'Удалить пользователя? Все его конфиги будут отозваны в 3x-ui, действие необратимо.',
|
||||
deleted: 'Пользователь удалён.',
|
||||
},
|
||||
configs: {
|
||||
searchPlaceholder: 'Поиск по email в панели или метке',
|
||||
owner: 'Владелец',
|
||||
node: 'Нода',
|
||||
location: 'Локация',
|
||||
protocol: 'Протокол',
|
||||
traffic: 'Трафик',
|
||||
statusLabel: 'Статус',
|
||||
allStatuses: 'Все статусы',
|
||||
created: 'Создан',
|
||||
empty: 'Конфиги не найдены.',
|
||||
total: 'Всего: {{count}}',
|
||||
},
|
||||
activation: {
|
||||
empty: 'Нет ожидающих запросов на активацию.',
|
||||
approved: 'Пользователь активирован.',
|
||||
@@ -447,6 +461,7 @@ const resources = {
|
||||
overview: 'Overview',
|
||||
activation: 'Activation requests',
|
||||
users: 'Users',
|
||||
configs: 'All configs',
|
||||
roles: 'Roles',
|
||||
nodes: 'Nodes',
|
||||
apps: 'Apps',
|
||||
@@ -480,6 +495,19 @@ const resources = {
|
||||
confirmDelete: 'Delete this user? All their configs will be revoked in 3x-ui — this cannot be undone.',
|
||||
deleted: 'User deleted.',
|
||||
},
|
||||
configs: {
|
||||
searchPlaceholder: 'Search by panel email or label',
|
||||
owner: 'Owner',
|
||||
node: 'Node',
|
||||
location: 'Location',
|
||||
protocol: 'Protocol',
|
||||
traffic: 'Traffic',
|
||||
statusLabel: 'Status',
|
||||
allStatuses: 'All statuses',
|
||||
created: 'Created',
|
||||
empty: 'No configs found.',
|
||||
total: 'Total: {{count}}',
|
||||
},
|
||||
activation: {
|
||||
empty: 'No pending activation requests.',
|
||||
approved: 'User activated.',
|
||||
|
||||
Reference in New Issue
Block a user