mirror of
https://github.com/continew-org/continew-admin.git
synced 2026-01-11 18:57:10 +08:00
新增:新增系统监控/登录日志功能,优化日志表结构,并新增记录错误信息(非未知异常不记录异常详情,只记录错误信息)
This commit is contained in:
33
continew-admin-ui/src/api/monitor/login-log.ts
Normal file
33
continew-admin-ui/src/api/monitor/login-log.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import axios from 'axios';
|
||||
import qs from 'query-string';
|
||||
|
||||
export interface LoginLogRecord {
|
||||
logId: string;
|
||||
status: number;
|
||||
clientIp: string;
|
||||
location: string;
|
||||
browser: string;
|
||||
errorMsg: string;
|
||||
createUserString: string;
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface LoginLogParams extends Partial<LoginLogRecord> {
|
||||
page: number;
|
||||
size: number;
|
||||
sort: Array<string>;
|
||||
}
|
||||
|
||||
export interface LoginLogListRes {
|
||||
list: LoginLogRecord[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
export function queryLoginLogList(params: LoginLogParams) {
|
||||
return axios.get<LoginLogListRes>('/monitor/log/login', {
|
||||
params,
|
||||
paramsSerializer: (obj) => {
|
||||
return qs.stringify(obj);
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -4,10 +4,11 @@ import qs from 'query-string';
|
||||
export interface OperationLogRecord {
|
||||
logId: string;
|
||||
description: string;
|
||||
status: number,
|
||||
clientIp: string,
|
||||
location: string,
|
||||
browser: string,
|
||||
status: number;
|
||||
clientIp: string;
|
||||
location: string;
|
||||
browser: string;
|
||||
errorMsg: string;
|
||||
createUserString: string;
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user