📝 工作台前端.

This commit is contained in:
lijiahang
2024-12-27 11:19:52 +08:00
parent 95759adf91
commit cb5657c685
23 changed files with 1156 additions and 225 deletions

View File

@@ -0,0 +1,26 @@
import type { LineSingleChartData } from '@/types/global';
import type { TerminalConnectLogQueryResponse } from '@/api/asset/terminal-connect-log';
import type { ExecLogQueryResponse } from '@/api/exec/exec-log';
import axios from 'axios';
/**
* 资产模块工作台响应
*/
export interface AssetWorkplaceStatisticsResponse {
execJobCount: number;
todayTerminalConnectCount: number;
todayExecCommandCount: number;
weekTerminalConnectCount: number;
weekExecCommandCount: number;
execCommandChart: LineSingleChartData;
terminalConnectChart: LineSingleChartData;
terminalConnectList: Array<TerminalConnectLogQueryResponse>;
execLogList: Array<ExecLogQueryResponse>;
}
/**
* 查询资产模块工作台统计信息
*/
export function getAssetWorkplaceStatisticsData() {
return axios.get<AssetWorkplaceStatisticsResponse>('/asset/statistics/get-workplace');
}

View File

@@ -0,0 +1,24 @@
import type { LineSingleChartData } from '@/types/global';
import type { LoginHistoryQueryResponse } from '@/api/user/user';
import axios from 'axios';
/**
* 基建模块工作台响应
*/
export interface InfraWorkplaceStatisticsResponse {
userId: number;
username: string;
nickname: string;
unreadMessageCount: number;
lastLoginTime: number;
userSessionCount: number;
operatorChart: LineSingleChartData;
loginHistoryList: Array<LoginHistoryQueryResponse>;
}
/**
* 查询基建模块工作台统计信息
*/
export function getInfraWorkplaceStatisticsData() {
return axios.get<InfraWorkplaceStatisticsResponse>('/infra/statistics/get-workplace');
}