From e1f7943419695bd7b76f49b59f596fcc9ccceee5 Mon Sep 17 00:00:00 2001 From: lipenghui Date: Mon, 15 Apr 2024 15:55:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=97=A5=E5=BF=97=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/log/index.ts | 23 ++++++ src/api/system/log/types.ts | 70 ++++++++++++++++ src/views/system/log/api/DetailModal.vue | 81 ++++++++++++++++++ src/views/system/log/api/data.ts | 51 ++++++++++++ src/views/system/log/api/index.vue | 58 +++++++++++++ src/views/system/log/error/DetailModal.vue | 96 ++++++++++++++++++++++ src/views/system/log/error/data.ts | 51 ++++++++++++ src/views/system/log/error/index.vue | 58 +++++++++++++ src/views/system/log/usual/DetailModal.vue | 73 ++++++++++++++++ src/views/system/log/usual/data.ts | 51 ++++++++++++ src/views/system/log/usual/index.vue | 58 +++++++++++++ 11 files changed, 670 insertions(+) create mode 100644 src/api/system/log/index.ts create mode 100644 src/api/system/log/types.ts create mode 100644 src/views/system/log/api/DetailModal.vue create mode 100644 src/views/system/log/api/data.ts create mode 100644 src/views/system/log/api/index.vue create mode 100644 src/views/system/log/error/DetailModal.vue create mode 100644 src/views/system/log/error/data.ts create mode 100644 src/views/system/log/error/index.vue create mode 100644 src/views/system/log/usual/DetailModal.vue create mode 100644 src/views/system/log/usual/data.ts create mode 100644 src/views/system/log/usual/index.vue diff --git a/src/api/system/log/index.ts b/src/api/system/log/index.ts new file mode 100644 index 00000000..7e12e9e2 --- /dev/null +++ b/src/api/system/log/index.ts @@ -0,0 +1,23 @@ +import type { GetAplListParams, GetErrorListParams, GetUsualListParams, SystemErrorApi, SystemLogApi, SystemLogUsual } from './types' +import { defHttp } from '@/utils/http/axios' + +export function getLogUsualList(params: GetUsualListParams) { + return defHttp.get>({ + url: '/hulk-log/usual/list', + params, + }) +} + +export function getLogApiList(params: GetAplListParams) { + return defHttp.get>({ + url: '/hulk-log/api/list', + params, + }) +} + +export function getLogErrorList(params: GetErrorListParams) { + return defHttp.get>({ + url: '/hulk-log/error/list', + params, + }) +} diff --git a/src/api/system/log/types.ts b/src/api/system/log/types.ts new file mode 100644 index 00000000..9b9a9ea5 --- /dev/null +++ b/src/api/system/log/types.ts @@ -0,0 +1,70 @@ +export interface GetUsualListParams extends PageParam { +} +export interface GetAplListParams extends PageParam { +} +export interface GetErrorListParams extends PageParam { +} + +export interface SystemLogUsual { + id: string + createTime: string + env: string + logData: string + logId: string + logLevel: string + method: string + methodClass: string + methodName: string + params: string + remoteIp: string + requestUri: string + serverHost: string + serverIp: string + serviceId: string + tenantId: string + userAgent: string +} + +export interface SystemLogApi { + id: string + createTime: string + env: string + method: string + methodClass: string + methodName: string + params: string + remoteIp: string + requestUri: string + serverHost: string + serverIp: string + serviceId: string + tenantId: string + userAgent: string + title: string + type: string +} + +export interface SystemErrorApi { + id: string + createTime: string + env: string + exceptionName: string + fileName: string + lineNumber: number + message: string + logData: string + logId: string + logLevel: string + method: string + methodClass: string + methodName: string + params: string + remoteIp: string + requestUri: string + serverHost: string + serverIp: string + serviceId: string + tenantId: string + userAgent: string + stackTrace: string +} diff --git a/src/views/system/log/api/DetailModal.vue b/src/views/system/log/api/DetailModal.vue new file mode 100644 index 00000000..d861692f --- /dev/null +++ b/src/views/system/log/api/DetailModal.vue @@ -0,0 +1,81 @@ + + + diff --git a/src/views/system/log/api/data.ts b/src/views/system/log/api/data.ts new file mode 100644 index 00000000..f87b25a9 --- /dev/null +++ b/src/views/system/log/api/data.ts @@ -0,0 +1,51 @@ +import type { BasicColumn, FormSchema } from '@/components/Table' + +export const columns: BasicColumn[] = [ + { + title: '服务id', + dataIndex: 'serviceId', + }, + { + title: '服务host', + dataIndex: 'serverHost', + }, + { + title: '服务ip', + dataIndex: 'serverIp', + }, + { + title: '软件环境', + dataIndex: 'env', + }, + { + title: '日志名', + dataIndex: 'title', + }, + { + title: '请求方法', + dataIndex: 'method', + }, + { + title: '请求接口', + dataIndex: 'requestUri', + }, + { + title: '日志时间', + dataIndex: 'createTime', + }, +] + +export const searchFormSchema: FormSchema[] = [ + { + label: '服务id', + field: 'serviceId', + component: 'Input', + colProps: { span: 5 }, + }, + { + label: '服务host', + field: 'serverHost', + component: 'Input', + colProps: { span: 5 }, + }, +] diff --git a/src/views/system/log/api/index.vue b/src/views/system/log/api/index.vue new file mode 100644 index 00000000..7fc09d9d --- /dev/null +++ b/src/views/system/log/api/index.vue @@ -0,0 +1,58 @@ + + + diff --git a/src/views/system/log/error/DetailModal.vue b/src/views/system/log/error/DetailModal.vue new file mode 100644 index 00000000..55b1ad46 --- /dev/null +++ b/src/views/system/log/error/DetailModal.vue @@ -0,0 +1,96 @@ + + + diff --git a/src/views/system/log/error/data.ts b/src/views/system/log/error/data.ts new file mode 100644 index 00000000..7a47a4b3 --- /dev/null +++ b/src/views/system/log/error/data.ts @@ -0,0 +1,51 @@ +import type { BasicColumn, FormSchema } from '@/components/Table' + +export const columns: BasicColumn[] = [ + { + title: '服务id', + dataIndex: 'serviceId', + }, + { + title: '服务host', + dataIndex: 'serverHost', + }, + { + title: '服务ip', + dataIndex: 'serverIp', + }, + { + title: '软件环境', + dataIndex: 'env', + }, + { + title: '错误信息', + dataIndex: 'message', + }, + { + title: '请求方法', + dataIndex: 'method', + }, + { + title: '请求接口', + dataIndex: 'requestUri', + }, + { + title: '日志时间', + dataIndex: 'createTime', + }, +] + +export const searchFormSchema: FormSchema[] = [ + { + label: '服务id', + field: 'serviceId', + component: 'Input', + colProps: { span: 5 }, + }, + { + label: '服务host', + field: 'serverHost', + component: 'Input', + colProps: { span: 5 }, + }, +] diff --git a/src/views/system/log/error/index.vue b/src/views/system/log/error/index.vue new file mode 100644 index 00000000..ab8c78a9 --- /dev/null +++ b/src/views/system/log/error/index.vue @@ -0,0 +1,58 @@ + + + diff --git a/src/views/system/log/usual/DetailModal.vue b/src/views/system/log/usual/DetailModal.vue new file mode 100644 index 00000000..dbc84a8d --- /dev/null +++ b/src/views/system/log/usual/DetailModal.vue @@ -0,0 +1,73 @@ + + + diff --git a/src/views/system/log/usual/data.ts b/src/views/system/log/usual/data.ts new file mode 100644 index 00000000..89c0939c --- /dev/null +++ b/src/views/system/log/usual/data.ts @@ -0,0 +1,51 @@ +import type { BasicColumn, FormSchema } from '@/components/Table' + +export const columns: BasicColumn[] = [ + { + title: '服务id', + dataIndex: 'serviceId', + }, + { + title: '服务host', + dataIndex: 'serverHost', + }, + { + title: '服务ip', + dataIndex: 'serverIp', + }, + { + title: '软件环境', + dataIndex: 'env', + }, + { + title: '日志级别', + dataIndex: 'logLevel', + }, + { + title: '日志id', + dataIndex: 'id', + }, + { + title: '请求接口', + dataIndex: 'requestUri', + }, + { + title: '日志时间', + dataIndex: 'createTime', + }, +] + +export const searchFormSchema: FormSchema[] = [ + { + label: '服务id', + field: 'serviceId', + component: 'Input', + colProps: { span: 5 }, + }, + { + label: '服务host', + field: 'serverHost', + component: 'Input', + colProps: { span: 5 }, + }, +] diff --git a/src/views/system/log/usual/index.vue b/src/views/system/log/usual/index.vue new file mode 100644 index 00000000..6fdcde6e --- /dev/null +++ b/src/views/system/log/usual/index.vue @@ -0,0 +1,58 @@ + + +