🎉 重构前端代码.
This commit is contained in:
@@ -1,26 +1,9 @@
|
||||
import type { LineSingleChartData } from '@/types/global';
|
||||
import type { TerminalConnectLogQueryResponse } from '@/api/asset/terminal-connect-log';
|
||||
import type { ExecLogQueryResponse } from '@/api/exec/exec-log';
|
||||
import type { PieChartData } from '@/types/global';
|
||||
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');
|
||||
export function getHostTypeChart() {
|
||||
return axios.get<PieChartData>('/asset/statistics/host-type-chart');
|
||||
}
|
||||
|
||||
21
orion-visor-ui/src/api/statistics/exec-statistics.ts
Normal file
21
orion-visor-ui/src/api/statistics/exec-statistics.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { LineSingleChartData } from '@/types/global';
|
||||
import type { ExecLogQueryResponse } from '@/api/exec/exec-log';
|
||||
import axios from 'axios';
|
||||
|
||||
/**
|
||||
* 执行模块工作台响应
|
||||
*/
|
||||
export interface ExecWorkplaceStatisticsResponse {
|
||||
execJobCount: number;
|
||||
todayExecCommandCount: number;
|
||||
weekExecCommandCount: number;
|
||||
execCommandChart: LineSingleChartData;
|
||||
execLogList: Array<ExecLogQueryResponse>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询执行模块工作台统计信息
|
||||
*/
|
||||
export function getExecWorkplaceStatisticsData() {
|
||||
return axios.get<ExecWorkplaceStatisticsResponse>('/exec/statistics/get-workplace');
|
||||
}
|
||||
23
orion-visor-ui/src/api/statistics/terminal-statistics.ts
Normal file
23
orion-visor-ui/src/api/statistics/terminal-statistics.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { LineSingleChartData } from '@/types/global';
|
||||
import type { TerminalConnectLogQueryResponse } from '@/api/terminal/terminal-connect-log';
|
||||
import axios from 'axios';
|
||||
|
||||
/**
|
||||
* 终端模块工作台响应
|
||||
*/
|
||||
export interface TerminalWorkplaceStatisticsResponse {
|
||||
todayTerminalConnectCount: number;
|
||||
todayTerminalCommandCount: number;
|
||||
weekTerminalConnectCount: number;
|
||||
weekTerminalCommandCount: number;
|
||||
terminalConnectChart: LineSingleChartData;
|
||||
terminalCommandChart: LineSingleChartData;
|
||||
terminalConnectList: Array<TerminalConnectLogQueryResponse>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询终端模块工作台统计信息
|
||||
*/
|
||||
export function getTerminalWorkplaceStatisticsData() {
|
||||
return axios.get<TerminalWorkplaceStatisticsResponse>('/terminal/statistics/get-workplace');
|
||||
}
|
||||
Reference in New Issue
Block a user