mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
feat: add Traffic tab with per-inbound breakdown in admin remnawave
- Add NodeRealtimeStats and InboundTraffic TypeScript interfaces - Type getNodesRealtime return as NodeRealtimeStats[] - Add new Traffic tab to AdminRemnawave page showing per-node inbound/outbound traffic sorted by total bytes - Display download/upload/total per inbound tag for each node
This commit is contained in:
@@ -159,6 +159,25 @@ export interface NodeActionResponse {
|
||||
is_disabled?: boolean;
|
||||
}
|
||||
|
||||
// Realtime Traffic
|
||||
export interface InboundTraffic {
|
||||
tag: string;
|
||||
downloadBytes: number;
|
||||
uploadBytes: number;
|
||||
totalBytes: number;
|
||||
}
|
||||
|
||||
export interface NodeRealtimeStats {
|
||||
nodeUuid: string;
|
||||
nodeName: string;
|
||||
downloadBytes: number;
|
||||
uploadBytes: number;
|
||||
totalBytes: number;
|
||||
usersOnline: number;
|
||||
inbounds: InboundTraffic[];
|
||||
outbounds: InboundTraffic[];
|
||||
}
|
||||
|
||||
// Squads
|
||||
export interface SquadWithLocalInfo {
|
||||
uuid: string;
|
||||
@@ -282,7 +301,7 @@ export const adminRemnawaveApi = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
getNodesRealtime: async (): Promise<Record<string, unknown>[]> => {
|
||||
getNodesRealtime: async (): Promise<NodeRealtimeStats[]> => {
|
||||
const response = await apiClient.get('/cabinet/admin/remnawave/nodes/realtime');
|
||||
return response.data;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user