'init_again'
Change-Id: Ib7ecdb9f5baeab1e4681152a57b936edf7475b35
diff --git a/src/services/monitor/cache.ts b/src/services/monitor/cache.ts
new file mode 100644
index 0000000..244368e
--- /dev/null
+++ b/src/services/monitor/cache.ts
@@ -0,0 +1,17 @@
+import { request } from '@umijs/max';
+
+
+/* *
+ *
+ * @author whiteshader@163.com
+ * @datetime 2021/09/16
+ *
+ * */
+
+
+// 获取服务器信息
+export async function getCacheInfo() {
+ return request<API.Monitor.CacheInfoResult>('/api/monitor/cache', {
+ method: 'GET',
+ });
+}
diff --git a/src/services/monitor/cachelist.ts b/src/services/monitor/cachelist.ts
new file mode 100644
index 0000000..d348d4b
--- /dev/null
+++ b/src/services/monitor/cachelist.ts
@@ -0,0 +1,51 @@
+import { request } from '@umijs/max';
+
+/* *
+ *
+ * @author whiteshader@163.com
+ * @datetime 2022/06/27
+ *
+ * */
+
+
+// 查询缓存名称列表
+export function listCacheName() {
+ return request<API.Monitor.CacheNamesResponse>('/api/monitor/cache/getNames', {
+ method: 'get'
+ })
+}
+
+// 查询缓存键名列表
+export function listCacheKey(cacheName: string) {
+ return request<API.Monitor.CacheKeysResponse>('/api/monitor/cache/getKeys/' + cacheName, {
+ method: 'get'
+ })
+}
+
+// 查询缓存内容
+export function getCacheValue(cacheName: string, cacheKey: string) {
+ return request<API.Monitor.CacheValueResponse>('/api/monitor/cache/getValue/' + cacheName + '/' + cacheKey, {
+ method: 'get'
+ })
+}
+
+// 清理指定名称缓存
+export function clearCacheName(cacheName: string) {
+ return request<API.Result>('/api/monitor/cache/clearCacheName/' + cacheName, {
+ method: 'delete'
+ })
+}
+
+// 清理指定键名缓存
+export function clearCacheKey(cacheKey: string) {
+ return request<API.Result>('/api/monitor/cache/clearCacheKey/' + cacheKey, {
+ method: 'delete'
+ })
+}
+
+// 清理全部缓存
+export function clearCacheAll() {
+ return request<API.Result>('/api/monitor/cache/clearCacheAll', {
+ method: 'delete'
+ })
+}
diff --git a/src/services/monitor/job.ts b/src/services/monitor/job.ts
new file mode 100644
index 0000000..192f819
--- /dev/null
+++ b/src/services/monitor/job.ts
@@ -0,0 +1,73 @@
+import { request } from '@umijs/max';
+import { downLoadXlsx } from '@/utils/downloadfile';
+
+/**
+ * 定时任务调度 API
+ *
+ * @author whiteshader@163.com
+ * @date 2023-02-07
+ */
+
+// 查询定时任务调度列表
+export async function getJobList(params?: API.Monitor.JobListParams) {
+ return request<API.Monitor.JobPageResult>('/api/monitor/job/list', {
+ method: 'GET',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8',
+ },
+ params
+ });
+}
+
+// 查询定时任务调度详细
+export function getJob(jobId: number) {
+ return request<API.Monitor.JobInfoResult>(`/api/monitor/job/${jobId}`, {
+ method: 'GET'
+ });
+}
+
+// 新增定时任务调度
+export async function addJob(params: API.Monitor.Job) {
+ return request<API.Result>('/api/monitor/job', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8',
+ },
+ data: params
+ });
+}
+
+// 修改定时任务调度
+export async function updateJob(params: API.Monitor.Job) {
+ return request<API.Result>('/api/monitor/job', {
+ method: 'PUT',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8',
+ },
+ data: params
+ });
+}
+
+// 删除定时任务调度
+export async function removeJob(ids: string) {
+ return request<API.Result>(`/api/monitor/job/${ids}`, {
+ method: 'DELETE'
+ });
+}
+
+// 导出定时任务调度
+export function exportJob(params?: API.Monitor.JobListParams) {
+ return downLoadXlsx(`/api/monitor/job/export`, { params }, `job_${new Date().getTime()}.xlsx`);
+}
+
+// 定时任务立即执行一次
+export async function runJob(jobId: number, jobGroup: string) {
+ const job = {
+ jobId,
+ jobGroup,
+ };
+ return request('/api/monitor/job/run', {
+ method: 'PUT',
+ data: job,
+ });
+}
diff --git a/src/services/monitor/jobLog.ts b/src/services/monitor/jobLog.ts
new file mode 100644
index 0000000..9885aa7
--- /dev/null
+++ b/src/services/monitor/jobLog.ts
@@ -0,0 +1,40 @@
+import { request } from '@umijs/max';
+import { downLoadXlsx } from '@/utils/downloadfile';
+
+/**
+ * 定时任务调度日志 API
+ *
+ * @author whiteshader
+ * @date 2023-02-07
+ */
+
+// 查询定时任务调度日志列表
+export async function getJobLogList(params?: API.Monitor.JobLogListParams) {
+ return request<API.Monitor.JobLogPageResult>('/api/schedule/job/log/list', {
+ method: 'GET',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8',
+ },
+ params
+ });
+}
+
+
+// 删除定时任务调度日志
+export async function removeJobLog(jobLogId: string) {
+ return request<API.Result>(`/api/schedule/job/log/${jobLogId}`, {
+ method: 'DELETE'
+ });
+}
+
+// 清空调度日志
+export function cleanJobLog() {
+ return request('/api/schedule/job/log/clean', {
+ method: 'delete'
+ })
+}
+
+// 导出定时任务调度日志
+export function exportJobLog(params?: API.Monitor.JobLogListParams) {
+ return downLoadXlsx(`/api/monitor/jobLog/export`, { params }, `joblog_${new Date().getTime()}.xlsx`);
+}
diff --git a/src/services/monitor/logininfor.ts b/src/services/monitor/logininfor.ts
new file mode 100644
index 0000000..ea1864a
--- /dev/null
+++ b/src/services/monitor/logininfor.ts
@@ -0,0 +1,68 @@
+import { request } from '@umijs/max';
+import { downLoadXlsx } from '@/utils/downloadfile';
+
+// 查询系统访问记录列表
+export async function getLogininforList(params?: API.Monitor.LogininforListParams) {
+ return request<API.Monitor.LogininforPageResult>('/api/monitor/logininfor/list', {
+ method: 'GET',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8',
+ },
+ params
+ });
+}
+
+// 查询系统访问记录详细
+export function getLogininfor(infoId: number) {
+ return request<API.Monitor.LogininforInfoResult>(`/api/monitor/logininfor/${infoId}`, {
+ method: 'GET'
+ });
+}
+
+// 新增系统访问记录
+export async function addLogininfor(params: API.Monitor.Logininfor) {
+ return request<API.Result>('/api/monitor/logininfor', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8',
+ },
+ data: params
+ });
+}
+
+// 修改系统访问记录
+export async function updateLogininfor(params: API.Monitor.Logininfor) {
+ return request<API.Result>('/api/monitor/logininfor', {
+ method: 'PUT',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8',
+ },
+ data: params
+ });
+}
+
+// 删除系统访问记录
+export async function removeLogininfor(ids: string) {
+ return request<API.Result>(`/api/monitor/logininfor/${ids}`, {
+ method: 'DELETE'
+ });
+}
+
+// 导出系统访问记录
+export function exportLogininfor(params?: API.Monitor.LogininforListParams) {
+ return downLoadXlsx(`/api/monitor/logininfor/export`, { params }, `logininfor_${new Date().getTime()}.xlsx`);
+}
+
+// 解锁用户登录状态
+export function unlockLogininfor(userName: string) {
+ return request<API.Result>('/api/monitor/logininfor/unlock/' + userName, {
+ method: 'get'
+ })
+}
+
+// 清空登录日志
+export function cleanLogininfor() {
+ return request<API.Result>('/api/monitor/logininfor/clean', {
+ method: 'delete'
+ })
+}
diff --git a/src/services/monitor/online.ts b/src/services/monitor/online.ts
new file mode 100644
index 0000000..ae2a6ac
--- /dev/null
+++ b/src/services/monitor/online.ts
@@ -0,0 +1,23 @@
+import { request } from '@umijs/max';
+
+/* *
+ *
+ * @author whiteshader@163.com
+ * @datetime 2021/09/16
+ *
+ * */
+
+// 查询在线用户列表
+export async function getOnlineUserList(params?: API.Monitor.OnlineUserListParams) {
+ return request<API.Monitor.OnlineUserPageResult>('/api/monitor/online/list', {
+ method: 'GET',
+ params,
+ });
+}
+
+// 强退用户
+export async function forceLogout(tokenId: string) {
+ return request(`/api/monitor/online/${tokenId}`, {
+ method: 'DELETE',
+ });
+}
diff --git a/src/services/monitor/operlog.ts b/src/services/monitor/operlog.ts
new file mode 100644
index 0000000..004863a
--- /dev/null
+++ b/src/services/monitor/operlog.ts
@@ -0,0 +1,60 @@
+import { request } from '@umijs/max';
+import { downLoadXlsx } from '@/utils/downloadfile';
+
+// 查询操作日志记录列表
+export async function getOperlogList(params?: API.Monitor.OperlogListParams) {
+ return request<API.Monitor.OperlogPageResult>('/api/monitor/operlog/list', {
+ method: 'GET',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8',
+ },
+ params
+ });
+}
+
+// 查询操作日志记录详细
+export function getOperlog(operId: number) {
+ return request<API.Monitor.OperlogInfoResult>(`/api/monitor/operlog/${operId}`, {
+ method: 'GET'
+ });
+}
+
+// 新增操作日志记录
+export async function addOperlog(params: API.Monitor.Operlog) {
+ return request<API.Result>('/api/monitor/operlog', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8',
+ },
+ data: params
+ });
+}
+
+// 修改操作日志记录
+export async function updateOperlog(params: API.Monitor.Operlog) {
+ return request<API.Result>('/api/monitor/operlog', {
+ method: 'PUT',
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8',
+ },
+ data: params
+ });
+}
+
+// 删除操作日志记录
+export async function removeOperlog(ids: string) {
+ return request<API.Result>(`/api/monitor/operlog/${ids}`, {
+ method: 'DELETE'
+ });
+}
+
+export async function cleanAllOperlog() {
+ return request<API.Result>(`/api/monitor/operlog/clean`, {
+ method: 'DELETE'
+ });
+}
+
+// 导出操作日志记录
+export function exportOperlog(params?: API.Monitor.OperlogListParams) {
+ return downLoadXlsx(`/api/monitor/operlog/export`, { params }, `operlog_${new Date().getTime()}.xlsx`);
+}
diff --git a/src/services/monitor/server.ts b/src/services/monitor/server.ts
new file mode 100644
index 0000000..24a849f
--- /dev/null
+++ b/src/services/monitor/server.ts
@@ -0,0 +1,16 @@
+import { request } from '@umijs/max';
+
+/* *
+ *
+ * @author whiteshader@163.com
+ * @datetime 2023/02/07
+ *
+ * */
+
+
+// 获取服务器信息
+export async function getServerInfo() {
+ return request('/api/monitor/server', {
+ method: 'GET',
+ });
+}