3
.github/workflows/e2e.yaml
vendored
3
.github/workflows/e2e.yaml
vendored
@@ -4,9 +4,8 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
|
||||
concurrency:
|
||||
concurrency:
|
||||
group: ${{github.workflow}} - ${{github.ref}}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
7
NOTICE
Normal file
7
NOTICE
Normal file
@@ -0,0 +1,7 @@
|
||||
* 在使用本项目前,请您仔细阅读免责声明,确保您已充分理解其中的内容
|
||||
|
||||
* 本项目采用 APACHE LICENSE 2.0 开源协议,如您需要源码的开发方式,需要遵循以下几点
|
||||
|
||||
1. 禁止修改或删除 LICENSE 文件。
|
||||
2. 不可二次开发或参与同类竞品的开发。
|
||||
3. 本项目可免费商业使用,商业使用请保留项目源码、出处、描述文件和作者声明等。
|
||||
@@ -1,7 +1,7 @@
|
||||
version: '3.3'
|
||||
services:
|
||||
orion-visor-service:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.0.10
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.0.11
|
||||
privileged: true
|
||||
ports:
|
||||
- 1081:80
|
||||
@@ -32,7 +32,7 @@ services:
|
||||
- orion-visor-mysql
|
||||
- orion-visor-redis
|
||||
orion-visor-mysql:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.0.10
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.0.11
|
||||
privileged: true
|
||||
ports:
|
||||
- 3307:3306
|
||||
@@ -52,7 +52,7 @@ services:
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
orion-visor-redis:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.0.10
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.0.11
|
||||
privileged: true
|
||||
ports:
|
||||
- 6380:6379
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version: '3.3'
|
||||
services:
|
||||
orion-visor-service:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.0.10
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.0.11
|
||||
privileged: true
|
||||
ports:
|
||||
- 1081:80
|
||||
@@ -32,7 +32,7 @@ services:
|
||||
- orion-visor-mysql
|
||||
- orion-visor-redis
|
||||
orion-visor-mysql:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.0.10
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.0.11
|
||||
privileged: true
|
||||
ports:
|
||||
- 3307:3306
|
||||
@@ -52,7 +52,7 @@ services:
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
orion-visor-redis:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.0.10
|
||||
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.0.11
|
||||
privileged: true
|
||||
ports:
|
||||
- 6380:6379
|
||||
|
||||
@@ -4,4 +4,4 @@ docker compose down
|
||||
if [ "$1" == "demo" ]; then
|
||||
sed -i 's/DEMO_MODE=false/DEMO_MODE=true/g' docker-compose.yml
|
||||
fi
|
||||
docker compose up -d
|
||||
docker compose up -d --remove-orphans
|
||||
|
||||
@@ -36,22 +36,14 @@ items:
|
||||
- name: haveUnRead
|
||||
request:
|
||||
api: /orion-visor/api/infra/system-message/has-unread
|
||||
header:
|
||||
Authorization: Bearer {{.login.data.token}}
|
||||
- name: queryOperatorLog
|
||||
request:
|
||||
api: /orion-visor/api/infra/mine/query-operator-log
|
||||
method: POST
|
||||
header:
|
||||
Authorization: Bearer {{.login.data.token}}
|
||||
- name: hostList
|
||||
request:
|
||||
api: /orion-visor/api/infra/tag/list?type=HOST
|
||||
header:
|
||||
Authorization: Bearer {{.login.data.token}}
|
||||
- name: queryHost
|
||||
request:
|
||||
api: /orion-visor/api/asset/host/query
|
||||
method: POST
|
||||
header:
|
||||
Authorization: Bearer {{.login.data.token}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#/bin/bash
|
||||
version=2.0.10
|
||||
version=2.0.11
|
||||
cp -r ../../sql ./sql
|
||||
docker build -t orion-visor-mysql:${version} .
|
||||
rm -rf ./sql
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#/bin/bash
|
||||
version=2.0.10
|
||||
version=2.0.11
|
||||
docker build -t orion-visor-redis:${version} .
|
||||
docker tag orion-visor-redis:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:${version}
|
||||
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:${version}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#/bin/bash
|
||||
version=2.0.10
|
||||
version=2.0.11
|
||||
mv ../../orion-visor-launch/target/orion-visor-launch.jar ./orion-visor-launch.jar
|
||||
mv ../../orion-visor-ui/dist ./dist
|
||||
docker build -t orion-visor-service:${version} .
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<url>https://github.com/dromara/orion-visor</url>
|
||||
|
||||
<properties>
|
||||
<revision>2.0.10</revision>
|
||||
<revision>2.0.11</revision>
|
||||
<spring.boot.version>2.7.17</spring.boot.version>
|
||||
<spring.boot.admin.version>2.7.15</spring.boot.admin.version>
|
||||
<flatten.maven.plugin.version>1.5.0</flatten.maven.plugin.version>
|
||||
|
||||
@@ -14,7 +14,7 @@ public interface AppConst extends OrionConst {
|
||||
/**
|
||||
* 同 ${orion.version} 迭代时候需要手动更改
|
||||
*/
|
||||
String VERSION = "2.0.10";
|
||||
String VERSION = "2.0.11";
|
||||
|
||||
/**
|
||||
* 同 ${spring.application.name}
|
||||
|
||||
@@ -43,4 +43,6 @@ public interface ExtraFieldConst extends FieldConst {
|
||||
|
||||
String LOG_ID = "logId";
|
||||
|
||||
String DARK = "dark";
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ public interface FieldConst {
|
||||
|
||||
String INFO = "info";
|
||||
|
||||
String EXTRA = "extra";
|
||||
|
||||
String REL_ID = "relId";
|
||||
|
||||
String BEFORE = "before";
|
||||
@@ -59,10 +61,24 @@ public interface FieldConst {
|
||||
|
||||
String TIME = "time";
|
||||
|
||||
String ISSUE = "issue";
|
||||
|
||||
String EXPIRE = "expire";
|
||||
|
||||
String LOCATION = "location";
|
||||
|
||||
String USER_AGENT = "userAgent";
|
||||
|
||||
String ERROR_MESSAGE = "errorMessage";
|
||||
|
||||
String UUID = "uuid";
|
||||
|
||||
String REDIRECT = "redirect";
|
||||
|
||||
String SCHEMA = "schema";
|
||||
|
||||
String FILTER = "filter";
|
||||
|
||||
String LICENSE = "license";
|
||||
|
||||
}
|
||||
|
||||
@@ -38,13 +38,13 @@ public class CustomFileFilter {
|
||||
public List<CustomFile> doFilter() {
|
||||
// 生成文件副本
|
||||
List<CustomFile> files = originCustomerFile.stream().map(s ->
|
||||
new CustomFile.Builder()
|
||||
.enableFileOverride()
|
||||
.templatePath(s.getTemplatePath())
|
||||
.filePath(s.getFilePath())
|
||||
.fileName(s.getFileName())
|
||||
.packageName(s.getPackageName())
|
||||
.build())
|
||||
new CustomFile.Builder()
|
||||
.enableFileOverride()
|
||||
.templatePath(s.getTemplatePath())
|
||||
.filePath(s.getFilePath())
|
||||
.fileName(s.getFileName())
|
||||
.packageName(s.getPackageName())
|
||||
.build())
|
||||
.collect(Collectors.toList());
|
||||
// 不生成对外 api 文件
|
||||
if (!table.isEnableProviderApi()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<a-modal v-model:visible="visible"
|
||||
body-class="modal-form-large"
|
||||
modal-class="modal-form-large"
|
||||
title-align="start"
|
||||
:title="title"
|
||||
:top="80"
|
||||
|
||||
@@ -6,7 +6,7 @@ const columns = [
|
||||
title: 'id',
|
||||
dataIndex: 'id',
|
||||
slotName: 'id',
|
||||
width: 100,
|
||||
width: 80,
|
||||
align: 'left',
|
||||
fixed: 'left',
|
||||
}, #foreach($field in ${table.fields})#if("$!field.propertyName" != "id"){
|
||||
@@ -15,6 +15,7 @@ const columns = [
|
||||
slotName: '${field.propertyName}',
|
||||
align: 'left',
|
||||
#if(${field.propertyType} == 'String')
|
||||
minWidth: 238,
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
#elseif(${field.propertyType} == 'Date')
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.orion.visor.module.asset.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
|
||||
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
|
||||
import com.orion.visor.framework.web.core.annotation.RestWrapper;
|
||||
import com.orion.visor.module.asset.entity.vo.HostTerminalThemeVO;
|
||||
import com.orion.visor.module.asset.service.HostTerminalService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 主机终端 api
|
||||
@@ -38,7 +39,7 @@ public class HostTerminalController {
|
||||
@IgnoreLog(IgnoreLogMode.ALL)
|
||||
@GetMapping("/themes")
|
||||
@Operation(summary = "获取主机终端主题")
|
||||
public JSONArray getTerminalThemes() {
|
||||
public List<HostTerminalThemeVO> getTerminalThemes() {
|
||||
return hostTerminalService.getTerminalThemes();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,16 +20,13 @@ import lombok.NoArgsConstructor;
|
||||
@Schema(name = "ExecParameterSchemaDTO", description = "命令执行参数 schema 对象")
|
||||
public class ExecParameterSchemaDTO {
|
||||
|
||||
@Schema(description = "参数名称")
|
||||
@Schema(description = "参数名")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "参数描述")
|
||||
private String desc;
|
||||
|
||||
@Schema(description = "默认值")
|
||||
private Object defaultValue;
|
||||
|
||||
@Schema(description = "值")
|
||||
@Schema(description = "参数值")
|
||||
private Object value;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.orion.visor.module.asset.entity.vo;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 主机终端主题 视图响应对象
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2024/7/4 19:27
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(name = "HostTerminalThemeVO", description = "主机终端主题 视图响应对象")
|
||||
public class HostTerminalThemeVO {
|
||||
|
||||
@Schema(description = "主题名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "是否为暗色")
|
||||
private Boolean dark;
|
||||
|
||||
@Schema(description = "主题 schema")
|
||||
private JSONObject schema;
|
||||
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class HostTerminalManager {
|
||||
*
|
||||
* @param channelId channelId
|
||||
* @param sessionId sessionId
|
||||
* @param T T
|
||||
* @param <T> T
|
||||
* @return session
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.orion.visor.module.asset.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.orion.net.host.SessionStore;
|
||||
import com.orion.visor.module.asset.entity.domain.HostDO;
|
||||
import com.orion.visor.module.asset.entity.dto.HostTerminalAccessDTO;
|
||||
import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO;
|
||||
import com.orion.visor.module.asset.entity.vo.HostTerminalThemeVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 主机终端服务
|
||||
@@ -20,7 +22,7 @@ public interface HostTerminalService {
|
||||
*
|
||||
* @return themes
|
||||
*/
|
||||
JSONArray getTerminalThemes();
|
||||
List<HostTerminalThemeVO> getTerminalThemes();
|
||||
|
||||
/**
|
||||
* 获取主机终端访问 accessToken
|
||||
|
||||
@@ -51,7 +51,7 @@ public class CommandSnippetServiceImpl implements CommandSnippetService {
|
||||
@Override
|
||||
public Long createCommandSnippet(CommandSnippetCreateRequest request) {
|
||||
Long userId = SecurityUtils.getLoginUserId();
|
||||
log.info("CommandSnippetService-createCommandSnippet request: {}" , JSON.toJSONString(request));
|
||||
log.info("CommandSnippetService-createCommandSnippet request: {}", JSON.toJSONString(request));
|
||||
// 转换
|
||||
CommandSnippetDO record = CommandSnippetConvert.MAPPER.to(request);
|
||||
record.setUserId(userId);
|
||||
@@ -60,7 +60,7 @@ public class CommandSnippetServiceImpl implements CommandSnippetService {
|
||||
// 插入
|
||||
int effect = commandSnippetDAO.insert(record);
|
||||
Long id = record.getId();
|
||||
log.info("CommandSnippetService-createCommandSnippet id: {}, effect: {}" , id, effect);
|
||||
log.info("CommandSnippetService-createCommandSnippet id: {}, effect: {}", id, effect);
|
||||
// 删除缓存
|
||||
RedisMaps.delete(CommandSnippetCacheKeyDefine.SNIPPET.format(userId));
|
||||
return id;
|
||||
@@ -70,7 +70,7 @@ public class CommandSnippetServiceImpl implements CommandSnippetService {
|
||||
public Integer updateCommandSnippetById(CommandSnippetUpdateRequest request) {
|
||||
Long id = Valid.notNull(request.getId(), ErrorMessage.ID_MISSING);
|
||||
Long userId = SecurityUtils.getLoginUserId();
|
||||
log.info("CommandSnippetService-updateCommandSnippetById id: {}, request: {}" , id, JSON.toJSONString(request));
|
||||
log.info("CommandSnippetService-updateCommandSnippetById id: {}, request: {}", id, JSON.toJSONString(request));
|
||||
// 查询
|
||||
CommandSnippetDO record = commandSnippetDAO.selectById(id);
|
||||
Valid.notNull(record, ErrorMessage.DATA_ABSENT);
|
||||
@@ -85,7 +85,7 @@ public class CommandSnippetServiceImpl implements CommandSnippetService {
|
||||
.eq(CommandSnippetDO::getId, id)
|
||||
.eq(CommandSnippetDO::getUserId, userId);
|
||||
int effect = commandSnippetDAO.update(null, update);
|
||||
log.info("CommandSnippetService-updateCommandSnippetById effect: {}" , effect);
|
||||
log.info("CommandSnippetService-updateCommandSnippetById effect: {}", effect);
|
||||
// 删除缓存
|
||||
RedisMaps.delete(CommandSnippetCacheKeyDefine.SNIPPET.format(userId));
|
||||
return effect;
|
||||
@@ -154,13 +154,13 @@ public class CommandSnippetServiceImpl implements CommandSnippetService {
|
||||
@Override
|
||||
public Integer deleteCommandSnippetById(Long id) {
|
||||
Long userId = SecurityUtils.getLoginUserId();
|
||||
log.info("CommandSnippetService-deleteCommandSnippetById id: {}" , id);
|
||||
log.info("CommandSnippetService-deleteCommandSnippetById id: {}", id);
|
||||
// 检查数据是否存在
|
||||
CommandSnippetDO record = commandSnippetDAO.selectById(id);
|
||||
Valid.notNull(record, ErrorMessage.DATA_ABSENT);
|
||||
// 删除
|
||||
int effect = commandSnippetDAO.deleteById(id);
|
||||
log.info("CommandSnippetService-deleteCommandSnippetById id: {}, effect: {}" , id, effect);
|
||||
log.info("CommandSnippetService-deleteCommandSnippetById id: {}, effect: {}", id, effect);
|
||||
// 删除缓存
|
||||
RedisMaps.delete(CommandSnippetCacheKeyDefine.SNIPPET.format(userId), id);
|
||||
return effect;
|
||||
|
||||
@@ -335,9 +335,6 @@ public class ExecCommandServiceImpl implements ExecCommandService {
|
||||
.collect(Collectors.toMap(ExecParameterSchemaDTO::getName,
|
||||
s -> {
|
||||
Object value = s.getValue();
|
||||
if (value == null) {
|
||||
value = s.getDefaultValue();
|
||||
}
|
||||
if (value == null) {
|
||||
value = Const.EMPTY;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package com.orion.visor.module.asset.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.orion.lang.exception.AuthenticationException;
|
||||
import com.orion.lang.id.UUIds;
|
||||
import com.orion.lang.utils.Exceptions;
|
||||
import com.orion.lang.utils.Strings;
|
||||
import com.orion.lang.utils.io.StreamReaders;
|
||||
import com.orion.net.host.SessionHolder;
|
||||
import com.orion.net.host.SessionStore;
|
||||
import com.orion.visor.framework.common.constant.Const;
|
||||
import com.orion.visor.framework.common.constant.ErrorMessage;
|
||||
import com.orion.visor.framework.common.constant.ExtraFieldConst;
|
||||
import com.orion.visor.framework.common.security.LoginUser;
|
||||
import com.orion.visor.framework.common.utils.CryptoUtils;
|
||||
import com.orion.visor.framework.common.utils.Valid;
|
||||
@@ -24,6 +24,7 @@ import com.orion.visor.module.asset.entity.domain.HostIdentityDO;
|
||||
import com.orion.visor.module.asset.entity.domain.HostKeyDO;
|
||||
import com.orion.visor.module.asset.entity.dto.HostTerminalAccessDTO;
|
||||
import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO;
|
||||
import com.orion.visor.module.asset.entity.vo.HostTerminalThemeVO;
|
||||
import com.orion.visor.module.asset.enums.*;
|
||||
import com.orion.visor.module.asset.handler.host.config.model.HostSshConfigModel;
|
||||
import com.orion.visor.module.asset.handler.host.extra.model.HostSshExtraModel;
|
||||
@@ -31,14 +32,15 @@ import com.orion.visor.module.asset.service.HostConfigService;
|
||||
import com.orion.visor.module.asset.service.HostExtraService;
|
||||
import com.orion.visor.module.asset.service.HostTerminalService;
|
||||
import com.orion.visor.module.infra.api.DataPermissionApi;
|
||||
import com.orion.visor.module.infra.api.DictValueApi;
|
||||
import com.orion.visor.module.infra.enums.DataPermissionTypeEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 主机连接服务
|
||||
@@ -51,7 +53,7 @@ import java.util.Optional;
|
||||
@Service
|
||||
public class HostTerminalServiceImpl implements HostTerminalService {
|
||||
|
||||
private static final String TERMINAL_PATH = "/theme/terminal.theme.json";
|
||||
private static final String THEME_DICT_KEY = "terminalTheme";
|
||||
|
||||
@Resource
|
||||
private HostConfigService hostConfigService;
|
||||
@@ -74,20 +76,24 @@ public class HostTerminalServiceImpl implements HostTerminalService {
|
||||
@Resource
|
||||
private DataPermissionApi dataPermissionApi;
|
||||
|
||||
@Resource
|
||||
private DictValueApi dictValueApi;
|
||||
|
||||
@Override
|
||||
public JSONArray getTerminalThemes() {
|
||||
try (InputStream in = HostTerminalService.class.getResourceAsStream(TERMINAL_PATH)) {
|
||||
Valid.notNull(in, ErrorMessage.CONFIG_ABSENT);
|
||||
byte[] bytes = StreamReaders.readAllBytes(in);
|
||||
return JSONArray.parseArray(new String(bytes));
|
||||
} catch (Exception e) {
|
||||
throw Exceptions.ioRuntime(e);
|
||||
}
|
||||
public List<HostTerminalThemeVO> getTerminalThemes() {
|
||||
List<JSONObject> themes = dictValueApi.getDictValue(THEME_DICT_KEY);
|
||||
return themes.stream()
|
||||
.map(s -> HostTerminalThemeVO.builder()
|
||||
.name(s.getString(ExtraFieldConst.LABEL))
|
||||
.dark(s.getBoolean(ExtraFieldConst.DARK))
|
||||
.schema(s.getJSONObject(ExtraFieldConst.VALUE))
|
||||
.build())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTerminalAccessToken() {
|
||||
LoginUser user = SecurityUtils.getLoginUser();
|
||||
LoginUser user = Valid.notNull(SecurityUtils.getLoginUser());
|
||||
log.info("HostConnectService.getHostAccessToken userId: {}", user.getId());
|
||||
String accessToken = UUIds.random19();
|
||||
HostTerminalAccessDTO access = HostTerminalAccessDTO.builder()
|
||||
|
||||
@@ -14,8 +14,8 @@ import com.orion.lang.utils.time.Dates;
|
||||
import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs;
|
||||
import com.orion.visor.framework.common.annotation.Keep;
|
||||
import com.orion.visor.framework.common.constant.Const;
|
||||
import com.orion.visor.framework.common.enums.EndpointDefine;
|
||||
import com.orion.visor.framework.common.constant.ErrorMessage;
|
||||
import com.orion.visor.framework.common.enums.EndpointDefine;
|
||||
import com.orion.visor.framework.common.file.FileClient;
|
||||
import com.orion.visor.framework.common.security.LoginUser;
|
||||
import com.orion.visor.framework.common.utils.Valid;
|
||||
@@ -39,8 +39,8 @@ import com.orion.visor.module.asset.enums.HostConfigTypeEnum;
|
||||
import com.orion.visor.module.asset.enums.UploadTaskFileStatusEnum;
|
||||
import com.orion.visor.module.asset.enums.UploadTaskStatusEnum;
|
||||
import com.orion.visor.module.asset.handler.host.upload.FileUploadTasks;
|
||||
import com.orion.visor.module.asset.handler.host.upload.model.FileUploadFileItemDTO;
|
||||
import com.orion.visor.module.asset.handler.host.upload.manager.FileUploadTaskManager;
|
||||
import com.orion.visor.module.asset.handler.host.upload.model.FileUploadFileItemDTO;
|
||||
import com.orion.visor.module.asset.handler.host.upload.task.IFileUploadTask;
|
||||
import com.orion.visor.module.asset.handler.host.upload.uploader.IFileUploader;
|
||||
import com.orion.visor.module.asset.service.AssetAuthorizedDataService;
|
||||
|
||||
@@ -1,338 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "Dracula",
|
||||
"dark": true,
|
||||
"schema": {
|
||||
"background": "#1E1F29",
|
||||
"foreground": "#F8F8F2",
|
||||
"cursor": "#BBBBBB",
|
||||
"selectionBackground": "#44475A",
|
||||
"black": "#000000",
|
||||
"red": "#FF5555",
|
||||
"green": "#50FA7B",
|
||||
"yellow": "#F1FA8C",
|
||||
"blue": "#BD93F9",
|
||||
"cyan": "#8BE9FD",
|
||||
"white": "#BBBBBB",
|
||||
"brightBlack": "#555555",
|
||||
"brightRed": "#FF5555",
|
||||
"brightGreen": "#50FA7B",
|
||||
"brightYellow": "#F1FA8C",
|
||||
"brightBlue": "#BD93F9",
|
||||
"brightCyan": "#8BE9FD",
|
||||
"brightWhite": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Atom",
|
||||
"dark": true,
|
||||
"schema": {
|
||||
"background": "#161719",
|
||||
"foreground": "#C5C8C6",
|
||||
"cursor": "#D0D0D0",
|
||||
"selectionBackground": "#444444",
|
||||
"black": "#000000",
|
||||
"red": "#FD5FF1",
|
||||
"green": "#87C38A",
|
||||
"yellow": "#FFD7B1",
|
||||
"blue": "#85BEFD",
|
||||
"cyan": "#85BEFD",
|
||||
"white": "#E0E0E0",
|
||||
"brightBlack": "#000000",
|
||||
"brightRed": "#FD5FF1",
|
||||
"brightGreen": "#94FA36",
|
||||
"brightYellow": "#F5FFA8",
|
||||
"brightBlue": "#96CBFE",
|
||||
"brightCyan": "#85BEFD",
|
||||
"brightWhite": "#E0E0E0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "catppuccin-mocha",
|
||||
"dark": true,
|
||||
"schema": {
|
||||
"background": "#1E1E2E",
|
||||
"foreground": "#CDD6F4",
|
||||
"cursor": "#F5E0DC",
|
||||
"selectionBackground": "#585B70",
|
||||
"black": "#45475A",
|
||||
"red": "#F38BA8",
|
||||
"green": "#A6E3A1",
|
||||
"yellow": "#F9E2AF",
|
||||
"blue": "#89B4FA",
|
||||
"cyan": "#94E2D5",
|
||||
"white": "#BAC2DE",
|
||||
"brightBlack": "#585B70",
|
||||
"brightRed": "#F38BA8",
|
||||
"brightGreen": "#A6E3A1",
|
||||
"brightYellow": "#F9E2AF",
|
||||
"brightBlue": "#89B4FA",
|
||||
"brightCyan": "#94E2D5",
|
||||
"brightWhite": "#A6ADC8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MaterialDesignColors",
|
||||
"dark": true,
|
||||
"schema": {
|
||||
"background": "#1D262A",
|
||||
"foreground": "#E7EBED",
|
||||
"cursor": "#EAEAEA",
|
||||
"selectionBackground": "#4E6A78",
|
||||
"black": "#435B67",
|
||||
"red": "#FC3841",
|
||||
"green": "#5CF19E",
|
||||
"yellow": "#FED032",
|
||||
"blue": "#37B6FF",
|
||||
"cyan": "#59FFD1",
|
||||
"white": "#FFFFFF",
|
||||
"brightBlack": "#A1B0B8",
|
||||
"brightRed": "#FC746D",
|
||||
"brightGreen": "#ADF7BE",
|
||||
"brightYellow": "#FEE16C",
|
||||
"brightBlue": "#70CFFF",
|
||||
"brightCyan": "#9AFFE6",
|
||||
"brightWhite": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "catppuccin-macchiato",
|
||||
"dark": true,
|
||||
"schema": {
|
||||
"background": "#24273A",
|
||||
"foreground": "#CAD3F5",
|
||||
"cursor": "#F4DBD6",
|
||||
"selectionBackground": "#5B6078",
|
||||
"black": "#494D64",
|
||||
"red": "#ED8796",
|
||||
"green": "#A6DA95",
|
||||
"yellow": "#EED49F",
|
||||
"blue": "#8AADF4",
|
||||
"cyan": "#8BD5CA",
|
||||
"white": "#B8C0E0",
|
||||
"brightBlack": "#5B6078",
|
||||
"brightRed": "#ED8796",
|
||||
"brightGreen": "#A6DA95",
|
||||
"brightYellow": "#EED49F",
|
||||
"brightBlue": "#8AADF4",
|
||||
"brightCyan": "#8BD5CA",
|
||||
"brightWhite": "#A5ADCB"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OneHalfDark",
|
||||
"dark": true,
|
||||
"schema": {
|
||||
"background": "#282C34",
|
||||
"foreground": "#DCDFE4",
|
||||
"cursor": "#A3B3CC",
|
||||
"selectionBackground": "#474E5D",
|
||||
"black": "#282C34",
|
||||
"red": "#E06C75",
|
||||
"green": "#98C379",
|
||||
"yellow": "#E5C07B",
|
||||
"blue": "#61AFEF",
|
||||
"cyan": "#56B6C2",
|
||||
"white": "#DCDFE4",
|
||||
"brightBlack": "#282C34",
|
||||
"brightRed": "#E06C75",
|
||||
"brightGreen": "#98C379",
|
||||
"brightYellow": "#E5C07B",
|
||||
"brightBlue": "#61AFEF",
|
||||
"brightCyan": "#56B6C2",
|
||||
"brightWhite": "#DCDFE4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Apple System Colors",
|
||||
"dark": true,
|
||||
"schema": {
|
||||
"background": "#1E1E1E",
|
||||
"foreground": "#FFFFFF",
|
||||
"cursor": "#98989D",
|
||||
"selectionBackground": "#3F638B",
|
||||
"black": "#1A1A1A",
|
||||
"red": "#CC372E",
|
||||
"green": "#26A439",
|
||||
"yellow": "#CDAC08",
|
||||
"blue": "#0869CB",
|
||||
"cyan": "#479EC2",
|
||||
"white": "#98989D",
|
||||
"brightBlack": "#464646",
|
||||
"brightRed": "#FF453A",
|
||||
"brightGreen": "#32D74B",
|
||||
"brightYellow": "#FFD60A",
|
||||
"brightBlue": "#0A84FF",
|
||||
"brightCyan": "#76D6FF",
|
||||
"brightWhite": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Builtin Tango Light",
|
||||
"dark": false,
|
||||
"schema": {
|
||||
"background": "#FFFFFF",
|
||||
"foreground": "#000000",
|
||||
"cursor": "#000000",
|
||||
"selectionBackground": "#B5D5FF",
|
||||
"black": "#000000",
|
||||
"red": "#CC0000",
|
||||
"green": "#4E9A06",
|
||||
"yellow": "#C4A000",
|
||||
"blue": "#3465A4",
|
||||
"cyan": "#06989A",
|
||||
"white": "#D3D7CF",
|
||||
"brightBlack": "#555753",
|
||||
"brightRed": "#EF2929",
|
||||
"brightGreen": "#8AE234",
|
||||
"brightYellow": "#FCE94F",
|
||||
"brightBlue": "#729FCF",
|
||||
"brightCyan": "#34E2E2",
|
||||
"brightWhite": "#EEEEEC"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Duotone Dark",
|
||||
"dark": true,
|
||||
"schema": {
|
||||
"background": "#1F1D27",
|
||||
"foreground": "#B7A1FF",
|
||||
"cursor": "#FF9839",
|
||||
"selectionBackground": "#353147",
|
||||
"black": "#1F1D27",
|
||||
"red": "#D9393E",
|
||||
"green": "#2DCD73",
|
||||
"yellow": "#D9B76E",
|
||||
"blue": "#FFC284",
|
||||
"cyan": "#2488FF",
|
||||
"white": "#B7A1FF",
|
||||
"brightBlack": "#353147",
|
||||
"brightRed": "#D9393E",
|
||||
"brightGreen": "#2DCD73",
|
||||
"brightYellow": "#D9B76E",
|
||||
"brightBlue": "#FFC284",
|
||||
"brightCyan": "#2488FF",
|
||||
"brightWhite": "#EAE5FF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "BlulocoLight",
|
||||
"dark": false,
|
||||
"schema": {
|
||||
"background": "#F9F9F9",
|
||||
"foreground": "#373A41",
|
||||
"cursor": "#F32759",
|
||||
"selectionBackground": "#DAF0FF",
|
||||
"black": "#373A41",
|
||||
"red": "#D52753",
|
||||
"green": "#23974A",
|
||||
"yellow": "#DF631C",
|
||||
"blue": "#275FE4",
|
||||
"cyan": "#27618D",
|
||||
"white": "#BABBC2",
|
||||
"brightBlack": "#676A77",
|
||||
"brightRed": "#FF6480",
|
||||
"brightGreen": "#3CBC66",
|
||||
"brightYellow": "#C5A332",
|
||||
"brightBlue": "#0099E1",
|
||||
"brightCyan": "#6D93BB",
|
||||
"brightWhite": "#D3D3D3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Chester",
|
||||
"dark": true,
|
||||
"schema": {
|
||||
"background": "#2C3643",
|
||||
"foreground": "#FFFFFF",
|
||||
"cursor": "#B4B1B1",
|
||||
"selectionBackground": "#67747C",
|
||||
"black": "#080200",
|
||||
"red": "#FA5E5B",
|
||||
"green": "#16C98D",
|
||||
"yellow": "#FFC83F",
|
||||
"blue": "#288AD6",
|
||||
"cyan": "#28DDDE",
|
||||
"white": "#E7E7E7",
|
||||
"brightBlack": "#6F6B68",
|
||||
"brightRed": "#FA5E5B",
|
||||
"brightGreen": "#16C98D",
|
||||
"brightYellow": "#FEEF6D",
|
||||
"brightBlue": "#278AD6",
|
||||
"brightCyan": "#27DEDE",
|
||||
"brightWhite": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CLRS",
|
||||
"dark": false,
|
||||
"schema": {
|
||||
"background": "#FFFFFF",
|
||||
"foreground": "#262626",
|
||||
"cursor": "#6FD3FC",
|
||||
"selectionBackground": "#6FD3FC",
|
||||
"black": "#000000",
|
||||
"red": "#F8282A",
|
||||
"green": "#328A5D",
|
||||
"yellow": "#FA701D",
|
||||
"blue": "#135CD0",
|
||||
"cyan": "#33C3C1",
|
||||
"white": "#B3B3B3",
|
||||
"brightBlack": "#555753",
|
||||
"brightRed": "#FB0416",
|
||||
"brightGreen": "#2CC631",
|
||||
"brightYellow": "#FDD727",
|
||||
"brightBlue": "#1670FF",
|
||||
"brightCyan": "#3AD5CE",
|
||||
"brightWhite": "#EEEEEC"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Calamity",
|
||||
"dark": true,
|
||||
"schema": {
|
||||
"background": "#2F2833",
|
||||
"foreground": "#D5CED9",
|
||||
"cursor": "#D5CED9",
|
||||
"selectionBackground": "#7E6C88",
|
||||
"black": "#2F2833",
|
||||
"red": "#FC644D",
|
||||
"green": "#A5F69C",
|
||||
"yellow": "#E9D7A5",
|
||||
"blue": "#3B79C7",
|
||||
"cyan": "#74D3DE",
|
||||
"white": "#D5CED9",
|
||||
"brightBlack": "#7E6C88",
|
||||
"brightRed": "#FC644D",
|
||||
"brightGreen": "#A5F69C",
|
||||
"brightYellow": "#E9D7A5",
|
||||
"brightBlue": "#3B79C7",
|
||||
"brightCyan": "#74D3DE",
|
||||
"brightWhite": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Tomorrow",
|
||||
"dark": false,
|
||||
"schema": {
|
||||
"background": "#FFFFFF",
|
||||
"foreground": "#4D4D4C",
|
||||
"cursor": "#4D4D4C",
|
||||
"selectionBackground": "#D6D6D6",
|
||||
"black": "#000000",
|
||||
"red": "#C82829",
|
||||
"green": "#718C00",
|
||||
"yellow": "#EAB700",
|
||||
"blue": "#4271AE",
|
||||
"cyan": "#3E999F",
|
||||
"white": "#FFFFFF",
|
||||
"brightBlack": "#000000",
|
||||
"brightRed": "#C82829",
|
||||
"brightGreen": "#718C00",
|
||||
"brightYellow": "#EAB700",
|
||||
"brightBlue": "#4271AE",
|
||||
"brightCyan": "#3E999F",
|
||||
"brightWhite": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -66,8 +66,15 @@ public class TerminalThemeGenerator {
|
||||
arr.sort(Comparator.comparing(s -> schemaFilter.indexOf(s.getName())));
|
||||
}
|
||||
// 打印 json
|
||||
String json = JSON.toJSONString(arr, colorFilter);
|
||||
System.out.println("\n\n" + json);
|
||||
System.out.println();
|
||||
for (TerminalTheme theme : arr) {
|
||||
System.out.println("name: " + theme.name);
|
||||
System.out.println("dark: " + theme.dark);
|
||||
System.out.println("value: \n" + JSON.toJSONString(theme.schema, colorFilter));
|
||||
System.out.println();
|
||||
}
|
||||
// String json = JSON.toJSONString(arr, colorFilter);
|
||||
// System.out.println("\n" + json);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.orion.visor.module.infra.api;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 字典配置值 对外服务
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2024/7/4 18:54
|
||||
*/
|
||||
public interface DictValueApi {
|
||||
|
||||
/**
|
||||
* 查询字典配置值
|
||||
*
|
||||
* @param key key
|
||||
* @return rows
|
||||
*/
|
||||
List<JSONObject> getDictValue(String key);
|
||||
|
||||
/**
|
||||
* 查询字典配置值
|
||||
*
|
||||
* @param keys keys
|
||||
* @return rows
|
||||
*/
|
||||
Map<String, List<JSONObject>> getDictValueList(List<String> keys);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.orion.visor.module.infra.api.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.orion.visor.module.infra.api.DictValueApi;
|
||||
import com.orion.visor.module.infra.service.DictValueService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 字典配置值 对外服务实现类
|
||||
*
|
||||
* @author Jiahang Li
|
||||
* @version 1.0.0
|
||||
* @since 2024/7/4 18:55
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DictValueApiImpl implements DictValueApi {
|
||||
|
||||
@Resource
|
||||
private DictValueService dictValueService;
|
||||
|
||||
@Override
|
||||
public List<JSONObject> getDictValue(String key) {
|
||||
return dictValueService.getDictValue(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<JSONObject>> getDictValueList(List<String> keys) {
|
||||
return dictValueService.getDictValueList(keys);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,8 +25,8 @@ public class DictValueOperatorType extends InitializingOperatorTypes {
|
||||
@Override
|
||||
public OperatorType[] types() {
|
||||
return new OperatorType[]{
|
||||
new OperatorType(L, CREATE, "创建字典配置值 <sb>${keyName}</sb>: <sb>${label}</sb> | <sb>${value}</sb>"),
|
||||
new OperatorType(M, UPDATE, "更新字典配置值 <sb>${keyName}</sb>: <sb>${label}</sb> | <sb>${value}</sb>"),
|
||||
new OperatorType(L, CREATE, "创建字典配置值 <sb>${keyName}</sb> - <sb>${label}</sb> | <sb>${value}</sb>"),
|
||||
new OperatorType(M, UPDATE, "更新字典配置值 <sb>${keyName}</sb> - <sb>${label}</sb> | <sb>${value}</sb>"),
|
||||
new OperatorType(H, DELETE, "删除字典配置值 <sb>${value}</sb>"),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ public class DictValueCreateRequest implements Serializable {
|
||||
private Long keyId;
|
||||
|
||||
@NotBlank
|
||||
@Size(max = 512)
|
||||
@Schema(description = "配置值")
|
||||
private String value;
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ public class DictValueQueryRequest extends PageRequest {
|
||||
@Schema(description = "配置项名称")
|
||||
private String keyName;
|
||||
|
||||
@Size(max = 512)
|
||||
@Schema(description = "配置值")
|
||||
private String value;
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ public class DictValueUpdateRequest implements Serializable {
|
||||
private Long keyId;
|
||||
|
||||
@NotBlank
|
||||
@Size(max = 512)
|
||||
@Schema(description = "配置值")
|
||||
private String value;
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.orion.visor.module.infra.enums;
|
||||
|
||||
import com.orion.lang.utils.convert.Converts;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
@@ -53,7 +51,7 @@ public enum DictValueTypeEnum {
|
||||
@Override
|
||||
public Object parse(String s) {
|
||||
try {
|
||||
return Converts.toBoolean(s);
|
||||
return Boolean.valueOf(s);
|
||||
} catch (Exception e) {
|
||||
return super.parse(s);
|
||||
}
|
||||
|
||||
@@ -324,11 +324,6 @@ public class TerminalPreferenceModel implements GenericsDataModel {
|
||||
*/
|
||||
private Boolean disconnect;
|
||||
|
||||
/**
|
||||
* 关闭终端
|
||||
*/
|
||||
private Boolean closeTab;
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
|
||||
@@ -115,7 +115,6 @@ public class TerminalPreferenceStrategy extends AbstractGenericsDataStrategy<Ter
|
||||
.openSftp(true)
|
||||
.clear(true)
|
||||
.disconnect(false)
|
||||
.closeTab(true)
|
||||
.build()
|
||||
.toJsonString();
|
||||
// 默认配置
|
||||
|
||||
@@ -44,6 +44,14 @@ public interface DictValueService {
|
||||
*/
|
||||
Integer rollbackDictValueById(DictValueRollbackRequest request);
|
||||
|
||||
/**
|
||||
* 查询字典配置值
|
||||
*
|
||||
* @param key key
|
||||
* @return rows
|
||||
*/
|
||||
List<JSONObject> getDictValue(String key);
|
||||
|
||||
/**
|
||||
* 查询字典配置值
|
||||
*
|
||||
|
||||
@@ -73,7 +73,7 @@ public class DictValueServiceImpl implements DictValueService {
|
||||
// 查询数据是否冲突
|
||||
this.checkDictValuePresent(record);
|
||||
// 插入
|
||||
OperatorLogs.add(OperatorLogs.KEY_NAME, dictKey);
|
||||
OperatorLogs.add(OperatorLogs.KEY_NAME, dictKey.getKeyName());
|
||||
record.setKeyName(key);
|
||||
int effect = dictValueDAO.insert(record);
|
||||
Long id = record.getId();
|
||||
@@ -98,7 +98,7 @@ public class DictValueServiceImpl implements DictValueService {
|
||||
// 查询数据是否冲突
|
||||
this.checkDictValuePresent(updateRecord);
|
||||
// 更新
|
||||
OperatorLogs.add(OperatorLogs.KEY_NAME, dictKey);
|
||||
OperatorLogs.add(OperatorLogs.KEY_NAME, dictKey.getKeyName());
|
||||
OperatorLogs.add(OperatorLogs.VALUE, this.getDictValueJson(updateRecord));
|
||||
updateRecord.setKeyName(key);
|
||||
int effect = dictValueDAO.updateById(updateRecord);
|
||||
@@ -142,6 +142,18 @@ public class DictValueServiceImpl implements DictValueService {
|
||||
return effect;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> getDictValue(String key) {
|
||||
// 查询字典值
|
||||
Map<String, List<JSONObject>> values = this.getDictValueList(Lists.singleton(key));
|
||||
List<JSONObject> value = values.get(key);
|
||||
if (value == null) {
|
||||
return Lists.newList();
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<JSONObject>> getDictValueList(List<String> keys) {
|
||||
Map<String, List<JSONObject>> result = new HashMap<>();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
VITE_API_BASE_URL= 'http://127.0.0.1:9200/orion-visor/api'
|
||||
VITE_WS_BASE_URL= 'ws://127.0.0.1:9200/orion-visor/keep-alive'
|
||||
VITE_APP_VERSION= '2.0.10'
|
||||
VITE_APP_VERSION= '2.0.11'
|
||||
VITE_APP_RELEASE= 'community'
|
||||
VITE_SFTP_PREVIEW_MB= 2
|
||||
VITE_DEMO_MODE= false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
VITE_API_BASE_URL= '/orion-visor/api'
|
||||
VITE_WS_BASE_URL= '/orion-visor/keep-alive'
|
||||
VITE_APP_VERSION= '2.0.10'
|
||||
VITE_APP_VERSION= '2.0.11'
|
||||
VITE_APP_RELEASE= 'community'
|
||||
VITE_SFTP_PREVIEW_MB= 2
|
||||
VITE_DEMO_MODE= false
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "orion-visor-ui",
|
||||
"description": "Orion Visor UI",
|
||||
"version": "2.0.10",
|
||||
"version": "2.0.11",
|
||||
"private": true,
|
||||
"author": "Jiahang Li",
|
||||
"license": "Apache 2.0",
|
||||
|
||||
@@ -3,7 +3,22 @@
|
||||
:options="optionData"
|
||||
:loading="loading"
|
||||
placeholder="请选择主机身份"
|
||||
allow-clear />
|
||||
allow-clear>
|
||||
<!-- label -->
|
||||
<template #label="{ data }">
|
||||
<span class="option-wrapper">
|
||||
<span class="label">{{ data.label }}</span>
|
||||
<span class="username">{{ data.username }}</span>
|
||||
</span>
|
||||
</template>
|
||||
<!-- 选项 -->
|
||||
<template #option="{ data }">
|
||||
<span class="option-wrapper">
|
||||
<span class="label">{{ data.label }}</span>
|
||||
<span class="username">{{ data.username }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</a-select>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -53,8 +68,9 @@
|
||||
: await cacheStore.loadHostIdentities();
|
||||
optionData.value = hostIdentities.map(s => {
|
||||
return {
|
||||
label: `${s.name} (${s.username})`,
|
||||
label: s.name,
|
||||
value: s.id,
|
||||
username: s.username,
|
||||
};
|
||||
});
|
||||
} catch (e) {
|
||||
@@ -66,5 +82,18 @@
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.option-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.label {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.username {
|
||||
font-size: 12px;
|
||||
color: var(--color-text-3);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
:allow-clear="true"
|
||||
:data="filterOptions"
|
||||
:filter-option="tagLabelFilter">
|
||||
<!-- 选项 -->
|
||||
<template #option="{ data: { raw: { label, isTag } } }">
|
||||
<!-- tag -->
|
||||
<a-tag v-if="isTag" :color="dataColor(label, tagColor)">
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
@exceed-limit="() => { emits('onLimited', limit, `最多选择${limit}个tag`) }"
|
||||
multiple
|
||||
allow-clear>
|
||||
<!-- 选项 -->
|
||||
<template #option="{ data: { label } }">
|
||||
<a-tag :color="dataColor(label, tagColor)">
|
||||
{{ label }}
|
||||
|
||||
@@ -87,7 +87,7 @@ export const createDefaultOptions = (): Options => {
|
||||
showFoldingControls: 'always',
|
||||
renderLineHighlight: 'line',
|
||||
selectOnLineNumbers: true,
|
||||
lineNumbersMinChars: 2,
|
||||
lineNumbersMinChars: 3,
|
||||
disableLayerHinting: true,
|
||||
minimap: {
|
||||
enabled: false,
|
||||
|
||||
@@ -11,7 +11,6 @@ export const templateSuffix = ' }}';
|
||||
export interface TemplateParam {
|
||||
name?: string;
|
||||
desc?: string;
|
||||
defaultValue?: any;
|
||||
value?: any;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
readonly: boolean;
|
||||
}>>(), {
|
||||
width: '60%',
|
||||
height: 'calc(100vh - 240px)',
|
||||
height: 'calc(100vh - 242px)',
|
||||
readonly: true,
|
||||
});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<a-drawer v-model:visible="visible"
|
||||
title="主机连接日志详情"
|
||||
:width="428"
|
||||
:width="442"
|
||||
:mask-closable="false"
|
||||
:unmount-on-close="true"
|
||||
ok-text="关闭"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<a-card class="general-card table-search-card">
|
||||
<query-header :model="formModel"
|
||||
label-align="left"
|
||||
:itemOptions="{ 5: { span: 2 } }"
|
||||
:itemOptions="{ 6: { span: 2 } }"
|
||||
@submit="fetchTableData"
|
||||
@reset="fetchTableData"
|
||||
@keyup.enter="() => fetchTableData()">
|
||||
@@ -30,6 +30,10 @@
|
||||
<a-form-item field="hostAddress" label="主机地址">
|
||||
<a-input v-model="formModel.hostAddress" placeholder="请输入主机地址" allow-clear />
|
||||
</a-form-item>
|
||||
<!-- id -->
|
||||
<a-form-item field="id" label="id">
|
||||
<a-input-number v-model="formModel.id" placeholder="请输入日志id" allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 类型 -->
|
||||
<a-form-item field="type" label="类型">
|
||||
<a-select v-model="formModel.type"
|
||||
@@ -139,13 +143,22 @@
|
||||
{{ record.extra?.address }}
|
||||
</span>
|
||||
</template>
|
||||
<!-- 连接时间 -->
|
||||
<template #connectTime="{ record }">
|
||||
<div>
|
||||
从: {{ record.startTime && dateFormat(new Date(record.startTime)) }}
|
||||
</div>
|
||||
<div class="mt4">
|
||||
至: {{ (record.endTime && dateFormat(new Date(record.endTime)) || '现在') }}
|
||||
</div>
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #handle="{ record }">
|
||||
<div class="table-handle-wrapper">
|
||||
<!-- 详情 -->
|
||||
<a-button type="text"
|
||||
size="mini"
|
||||
@click="openDetail(record)">
|
||||
@click="emits('openDetail', record)">
|
||||
详情
|
||||
</a-button>
|
||||
<!-- 下线 -->
|
||||
@@ -177,11 +190,6 @@
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
<!-- 清空模态框 -->
|
||||
<connect-log-clear-modal ref="clearModal"
|
||||
@clear="fetchTableData" />
|
||||
<!-- 详情模态框 -->
|
||||
<connect-log-detail-drawer ref="detailModal" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -201,22 +209,22 @@
|
||||
import columns from '../types/table.columns';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import { dateFormat } from '@/utils';
|
||||
import UserSelector from '@/components/user/user/selector/index.vue';
|
||||
import HostSelector from '@/components/asset/host/selector/index.vue';
|
||||
import ConnectLogClearModal from './connect-log-clear-modal.vue';
|
||||
import ConnectLogDetailDrawer from './connect-log-detail-drawer.vue';
|
||||
|
||||
const tableRenderData = ref<HostConnectLogQueryResponse[]>([]);
|
||||
const selectedKeys = ref<number[]>([]);
|
||||
const clearModal = ref();
|
||||
const detailModal = ref();
|
||||
const emits = defineEmits(['openClear', 'openDetail']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
|
||||
const tableRenderData = ref<Array<HostConnectLogQueryResponse>>([]);
|
||||
const selectedKeys = ref<Array<number>>([]);
|
||||
|
||||
const formModel = reactive<HostConnectLogQueryRequest>({
|
||||
id: undefined,
|
||||
userId: undefined,
|
||||
hostId: undefined,
|
||||
hostAddress: undefined,
|
||||
@@ -246,14 +254,11 @@
|
||||
doFetchTableData({ page, limit, ...form });
|
||||
};
|
||||
|
||||
defineExpose({ fetchTableData });
|
||||
|
||||
// 打开清空
|
||||
const openClear = () => {
|
||||
clearModal.value?.open({ ...formModel });
|
||||
};
|
||||
|
||||
// 打开详情
|
||||
const openDetail = (record: HostConnectLogQueryResponse) => {
|
||||
detailModal.value?.open(record);
|
||||
emits('openClear', { ...formModel, id: undefined });
|
||||
};
|
||||
|
||||
// 强制下线
|
||||
@@ -287,13 +292,11 @@
|
||||
};
|
||||
|
||||
// 删除当前行
|
||||
const deleteRow = async ({ id }: {
|
||||
id: number
|
||||
}) => {
|
||||
const deleteRow = async (record: HostConnectLogQueryResponse) => {
|
||||
try {
|
||||
setLoading(true);
|
||||
// 调用删除接口
|
||||
await deleteHostConnectLog([id]);
|
||||
await deleteHostConnectLog([record.id]);
|
||||
Message.success('删除成功');
|
||||
selectedKeys.value = [];
|
||||
// 重新加载数据
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<div class="layout-container" v-if="render">
|
||||
<!-- 列表-表格 -->
|
||||
<connect-log-table />
|
||||
<connect-log-table ref="table"
|
||||
@open-clear="(s) => clearModal.open(s)"
|
||||
@open-detail="(s) => detailModal.open(s)" />
|
||||
<!-- 清空模态框 -->
|
||||
<connect-log-clear-modal ref="clearModal"
|
||||
@clear="() => table.fetchTableData()" />
|
||||
<!-- 详情模态框 -->
|
||||
<connect-log-detail-drawer ref="detailModal" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -16,8 +23,13 @@
|
||||
import { useCacheStore, useDictStore } from '@/store';
|
||||
import { dictKeys } from './types/const';
|
||||
import ConnectLogTable from './components/connect-log-table.vue';
|
||||
import ConnectLogClearModal from './components/connect-log-clear-modal.vue';
|
||||
import ConnectLogDetailDrawer from './components/connect-log-detail-drawer.vue';
|
||||
|
||||
const render = ref(false);
|
||||
const table = ref();
|
||||
const clearModal = ref();
|
||||
const detailModal = ref();
|
||||
|
||||
// 加载字典配置
|
||||
onBeforeMount(async () => {
|
||||
|
||||
@@ -46,12 +46,7 @@ const columns = [
|
||||
dataIndex: 'connectTime',
|
||||
slotName: 'connectTime',
|
||||
align: 'left',
|
||||
width: 318,
|
||||
render: ({ record }) => {
|
||||
return (record.startTime && dateFormat(new Date(record.startTime)))
|
||||
+ ' - '
|
||||
+ (record.endTime && dateFormat(new Date(record.endTime)) || '现在');
|
||||
},
|
||||
width: 192,
|
||||
}, {
|
||||
title: '操作',
|
||||
slotName: 'handle',
|
||||
|
||||
@@ -34,6 +34,7 @@ const columns = [
|
||||
dataIndex: 'paths',
|
||||
slotName: 'paths',
|
||||
align: 'left',
|
||||
minWidth: 238,
|
||||
}, {
|
||||
title: '执行结果',
|
||||
dataIndex: 'result',
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
:hide-asterisk="true">
|
||||
<host-identity-selector v-model="formModel.identityId" />
|
||||
</a-form-item>
|
||||
<!-- 用户名 -->
|
||||
<!-- 连接超时时间 -->
|
||||
<a-form-item field="connectTimeout"
|
||||
label="连接超时时间"
|
||||
:hide-asterisk="true">
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
</template>
|
||||
<a-spin :loading="loading" class="host-config-container">
|
||||
<!-- SSH 配置 -->
|
||||
<ssh-config-form :host-id="record.id"
|
||||
<ssh-config-form class="host-config-wrapper"
|
||||
:host-id="record.id"
|
||||
:content="config.ssh"
|
||||
@submitted="(e) => config.ssh = e" />
|
||||
</a-spin>
|
||||
@@ -111,11 +112,12 @@
|
||||
|
||||
.host-config-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
background-color: var(--color-fill-2);
|
||||
}
|
||||
|
||||
.arco-card {
|
||||
margin: 18px 18px 0 18px;
|
||||
.host-config-wrapper {
|
||||
margin: 18px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -179,13 +179,15 @@
|
||||
|
||||
// 选择公钥文件
|
||||
const selectPublicFile = async (fileList: FileItem[]) => {
|
||||
formModel.value.publicKey = await readFileText(fileList[0].file as File);
|
||||
formModel.value.publicKey = await readFileText(fileList[fileList.length - 1].file as File);
|
||||
fileList.length = 0;
|
||||
formRef.value.clearValidate('publicKey');
|
||||
};
|
||||
|
||||
// 选择私钥文件
|
||||
const selectPrivateFile = async (fileList: FileItem[]) => {
|
||||
formModel.value.privateKey = await readFileText(fileList[0].file as File);
|
||||
formModel.value.privateKey = await readFileText(fileList[fileList.length - 1].file as File);
|
||||
fileList.length = 0;
|
||||
formRef.value.clearValidate('privateKey');
|
||||
};
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ const columns = [
|
||||
slotName: 'command',
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
minWidth: 238,
|
||||
}, {
|
||||
title: '执行用户',
|
||||
dataIndex: 'username',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<a-drawer v-model:visible="visible"
|
||||
title="执行命令"
|
||||
width="66%"
|
||||
width="70%"
|
||||
:esc-to-close="false"
|
||||
:mask-closable="false"
|
||||
:unmount-on-close="true"
|
||||
@@ -180,7 +180,7 @@
|
||||
parameterSchema.value = JSON.parse(record.parameterSchema);
|
||||
const params = {} as any;
|
||||
for (let param of parameterSchema.value) {
|
||||
params[param.name as keyof any] = param.defaultValue;
|
||||
params[param.name as keyof any] = param.value;
|
||||
}
|
||||
parameterFormModel.value = params;
|
||||
} else {
|
||||
@@ -275,7 +275,7 @@
|
||||
|
||||
.command-editor {
|
||||
width: 100%;
|
||||
height: 62vh;
|
||||
height: 56vh;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<a-drawer v-model:visible="visible"
|
||||
width="66%"
|
||||
width="70%"
|
||||
:title="title"
|
||||
:esc-to-close="false"
|
||||
:mask-closable="false"
|
||||
@@ -9,7 +9,7 @@
|
||||
:cancel-button-props="{ disabled: loading }"
|
||||
:on-before-ok="handlerOk"
|
||||
@cancel="handleClose">
|
||||
<a-spin class="full drawer-form-small" :loading="loading">
|
||||
<a-spin class="form-container drawer-form-small" :loading="loading">
|
||||
<a-form :model="formModel"
|
||||
ref="formRef"
|
||||
label-align="right"
|
||||
@@ -103,18 +103,35 @@
|
||||
:key="i"
|
||||
class="parameter-item"
|
||||
:class="[ i === parameter.length - 1 ? 'parameter-item-last' : '' ]">
|
||||
<!-- 参数名 -->
|
||||
<a-input class="parameter-item-name"
|
||||
v-model="item.name"
|
||||
placeholder="参数名称 (必填)"
|
||||
allow-clear />
|
||||
<a-input class="parameter-item-default"
|
||||
v-model="item.defaultValue"
|
||||
placeholder="默认值 (非必填)"
|
||||
allow-clear />
|
||||
placeholder="必填"
|
||||
:max-length="24"
|
||||
allow-clear>
|
||||
<template #prepend>
|
||||
<span>参数名</span>
|
||||
</template>
|
||||
</a-input>
|
||||
<!-- 参数值 -->
|
||||
<a-input class="parameter-item-value"
|
||||
v-model="item.value"
|
||||
placeholder="非必填"
|
||||
allow-clear>
|
||||
<template #prepend>
|
||||
<span>参数值</span>
|
||||
</template>
|
||||
</a-input>
|
||||
<!-- 描述 -->
|
||||
<a-input class="parameter-item-description"
|
||||
v-model="item.desc"
|
||||
placeholder="描述 (非必填)"
|
||||
allow-clear />
|
||||
placeholder="非必填"
|
||||
:max-length="64"
|
||||
allow-clear>
|
||||
<template #prepend>
|
||||
<span>描述</span>
|
||||
</template>
|
||||
</a-input>
|
||||
<span class="parameter-item-close click-icon-wrapper"
|
||||
title="移除"
|
||||
@click="removeParameter(i)">
|
||||
@@ -312,6 +329,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.form-container {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.parameter-form-item {
|
||||
user-select: none;
|
||||
margin-top: 4px;
|
||||
@@ -336,15 +358,15 @@
|
||||
}
|
||||
|
||||
&-name {
|
||||
width: 29%;
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
&-default {
|
||||
width: 29%;
|
||||
&-value {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
&-description {
|
||||
width: calc(39% - 44px);
|
||||
width: calc(30% - 44px);
|
||||
}
|
||||
|
||||
&-close {
|
||||
|
||||
@@ -31,6 +31,7 @@ const columns = [
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
minWidth: 238,
|
||||
}, {
|
||||
title: '上传状态',
|
||||
dataIndex: 'status',
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
:allow-clear="true"
|
||||
:data="filterOptions"
|
||||
:filter-option="tagLabelFilter">
|
||||
<!-- 选项 -->
|
||||
<template #option="{ data: { raw: { label, isTag } } }">
|
||||
<!-- tag -->
|
||||
<a-tag v-if="isTag" :color="dataColor(label, tagColor)">
|
||||
@@ -107,7 +108,7 @@
|
||||
|
||||
.host-view-container {
|
||||
width: 100%;
|
||||
height: calc(100vh - 240px);
|
||||
height: calc(100vh - 242px);
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,10 +22,12 @@
|
||||
:options="toOptions(fontFamilyKey)"
|
||||
:allow-create="true"
|
||||
:filter-option="labelFilter">
|
||||
<template #option="{ data }">
|
||||
<!-- label -->
|
||||
<template #label="{ data }">
|
||||
<span :style="{ fontFamily: data.value }">{{ data.label }}</span>
|
||||
</template>
|
||||
<template #label="{ data }">
|
||||
<!-- 选项 -->
|
||||
<template #option="{ data }">
|
||||
<span :style="{ fontFamily: data.value }">{{ data.label }}</span>
|
||||
</template>
|
||||
</a-select>
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
<a-skeleton v-if="loading"
|
||||
class="skeleton-wrapper"
|
||||
:animation="true">
|
||||
<a-skeleton-line :rows="8" />
|
||||
<a-skeleton-line :rows="6"
|
||||
:line-height="64"
|
||||
:line-spacing="24" />
|
||||
</a-skeleton>
|
||||
<!-- 内容区域 -->
|
||||
<div v-else class="terminal-setting-body terminal-theme-container">
|
||||
@@ -18,9 +20,9 @@
|
||||
<a-alert class="mb16">选择后会立刻保存, 刷新页面后生效</a-alert>
|
||||
<!-- 终端主题 -->
|
||||
<div class="theme-row"
|
||||
v-for="rowIndex in themes.length / 2"
|
||||
:key="rowIndex">
|
||||
<a-card v-for="(theme, colIndex) in [themes[(rowIndex - 1) * 2], themes[(rowIndex - 1) * 2 + 1]]"
|
||||
v-for="(themeArr, index) in themes"
|
||||
:key="index">
|
||||
<a-card v-for="(theme, colIndex) in themeArr"
|
||||
:key="theme.name"
|
||||
class="terminal-theme-card simple-card"
|
||||
:class="{
|
||||
@@ -67,7 +69,7 @@
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
const currentThemeName = ref();
|
||||
const themes = ref<Array<TerminalTheme>>([]);
|
||||
const themes = ref<Array<Array<TerminalTheme>>>([]);
|
||||
|
||||
// 选择主题
|
||||
const selectTheme = async (theme: TerminalTheme) => {
|
||||
@@ -90,7 +92,12 @@
|
||||
try {
|
||||
// 加载全部主题
|
||||
const { data } = await getTerminalThemes();
|
||||
themes.value = data;
|
||||
const result = [];
|
||||
for (let i = 0; i < data.length; i += 2) {
|
||||
const subArray = data.slice(i, i + 2);
|
||||
result.push(subArray);
|
||||
}
|
||||
themes.value = result;
|
||||
} catch (e) {
|
||||
} finally {
|
||||
setLoading(false);
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
}
|
||||
// 获取会话
|
||||
const session = sessionManager.getSession<ISftpSession>(sessionId.value);
|
||||
if (session.type === PanelSessionType.SFTP.type) {
|
||||
if (session?.type === PanelSessionType.SFTP.type) {
|
||||
session.chmod(formModel.value.path, formModel.value.mod);
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
}
|
||||
// 获取会话
|
||||
const session = sessionManager.getSession<ISftpSession>(sessionId.value);
|
||||
if (session.type === PanelSessionType.SFTP.type) {
|
||||
if (session?.type === PanelSessionType.SFTP.type) {
|
||||
if (touch.value) {
|
||||
// 创建文件
|
||||
session.touch(formModel.value.path);
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
}
|
||||
// 获取会话
|
||||
const session = sessionManager.getSession<ISftpSession>(sessionId.value);
|
||||
if (session.type === PanelSessionType.SFTP.type) {
|
||||
if (session?.type === PanelSessionType.SFTP.type) {
|
||||
session.move(formModel.value.path, formModel.value.target);
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@@ -201,10 +201,10 @@ export default class TerminalOutputProcessor implements ITerminalOutputProcessor
|
||||
private processWithType(session: ITerminalSession,
|
||||
sshProcess: (ssh: ISshSession) => any | void,
|
||||
sftpProcess: (ssh: ISftpSession) => any | void) {
|
||||
if (session.type === PanelSessionType.SSH.type) {
|
||||
if (session?.type === PanelSessionType.SSH.type) {
|
||||
// SSH 操作
|
||||
return sshProcess(session as ISshSession);
|
||||
} else if (session.type === PanelSessionType.SFTP.type) {
|
||||
} else if (session?.type === PanelSessionType.SFTP.type) {
|
||||
// SFTP 操作
|
||||
return sftpProcess(session as ISftpSession);
|
||||
}
|
||||
|
||||
@@ -135,9 +135,8 @@ export default class TerminalSessionManager implements ITerminalSessionManager {
|
||||
private dispatchResize() {
|
||||
// 对所有已连接的会话重置大小
|
||||
Object.values(this.sessions)
|
||||
.filter(s => s.type === PanelSessionType.SSH.type)
|
||||
.filter(s => s?.type === PanelSessionType.SSH.type)
|
||||
.map(s => s as SshSession)
|
||||
.filter(h => h.connected)
|
||||
.forEach(h => h.fit());
|
||||
}
|
||||
|
||||
|
||||
@@ -177,10 +177,6 @@ export const ActionBarItems = [
|
||||
item: 'disconnect',
|
||||
icon: 'icon-poweroff',
|
||||
content: '断开连接',
|
||||
}, {
|
||||
item: 'closeTab',
|
||||
icon: 'icon-close',
|
||||
content: '关闭终端',
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ const columns = [
|
||||
dataIndex: 'command',
|
||||
slotName: 'command',
|
||||
align: 'left',
|
||||
minWidth: 238,
|
||||
ellipsis: true,
|
||||
}, {
|
||||
title: '执行状态',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<a-drawer v-model:visible="visible"
|
||||
title="计划任务详情"
|
||||
width="66%"
|
||||
width="70%"
|
||||
:mask-closable="false"
|
||||
:unmount-on-close="true"
|
||||
ok-text="关闭"
|
||||
@@ -75,6 +75,17 @@
|
||||
:readonly="true"
|
||||
:suggestions="false" />
|
||||
</a-descriptions-item>
|
||||
<!-- 执行参数 -->
|
||||
<a-descriptions-item v-if="record.parameterSchema"
|
||||
label="执行参数"
|
||||
:span="3">
|
||||
<editor v-model="record.parameterSchema"
|
||||
language="json"
|
||||
theme="vs-dark"
|
||||
container-class="json-editor"
|
||||
:readonly="true"
|
||||
:suggestions="false" />
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</a-drawer>
|
||||
</template>
|
||||
@@ -105,11 +116,20 @@
|
||||
|
||||
// 打开
|
||||
const open = async (id: any) => {
|
||||
// 查询计划任务
|
||||
try {
|
||||
// 查询计划任务
|
||||
setLoading(true);
|
||||
const { data } = await getExecJob(id);
|
||||
record.value = data;
|
||||
// 设置参数值
|
||||
if (data.parameterSchema) {
|
||||
const value = JSON.parse(data.parameterSchema);
|
||||
if (value?.length) {
|
||||
data.parameterSchema = JSON.stringify(value, undefined, 4);
|
||||
} else {
|
||||
data.parameterSchema = undefined as unknown as string;
|
||||
}
|
||||
}
|
||||
setVisible(true);
|
||||
} catch (e) {
|
||||
} finally {
|
||||
@@ -146,7 +166,13 @@
|
||||
}
|
||||
|
||||
.command-editor {
|
||||
height: calc(100vh - 384px);
|
||||
width: 100%;
|
||||
height: calc(100vh - 396px);
|
||||
}
|
||||
|
||||
.json-editor {
|
||||
width: 100%;
|
||||
height: 328px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<a-drawer v-model:visible="visible"
|
||||
:title="title"
|
||||
width="66%"
|
||||
width="70%"
|
||||
:esc-to-close="false"
|
||||
:mask-closable="false"
|
||||
:unmount-on-close="true"
|
||||
@@ -9,7 +9,7 @@
|
||||
:cancel-button-props="{ disabled: loading }"
|
||||
:on-before-ok="handlerOk"
|
||||
@cancel="handleClose">
|
||||
<a-spin class="full drawer-form-small" :loading="loading">
|
||||
<a-spin class="form-container drawer-form-small" :loading="loading">
|
||||
<a-form :model="formModel"
|
||||
ref="formRef"
|
||||
label-align="right"
|
||||
@@ -117,7 +117,66 @@
|
||||
<exec-editor v-model="formModel.command"
|
||||
container-class="command-editor"
|
||||
theme="vs-dark"
|
||||
:parameter="jobBuiltinParams" />
|
||||
:parameter="[...jobBuiltinParams, ...parameter]" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 命令参数 -->
|
||||
<a-col :span="24">
|
||||
<a-form-item field="parameter"
|
||||
class="parameter-form-item"
|
||||
label="命令参数">
|
||||
<!-- label -->
|
||||
<template #label>
|
||||
<span class="span-blue pointer" @click="addParameter">添加参数</span>
|
||||
</template>
|
||||
<!-- 参数 -->
|
||||
<template v-if="parameter.length">
|
||||
<a-input-group v-for="(item, i) in parameter"
|
||||
:key="i"
|
||||
class="parameter-item"
|
||||
:class="[ i === parameter.length - 1 ? 'parameter-item-last' : '' ]">
|
||||
<!-- 参数名 -->
|
||||
<a-input class="parameter-item-name"
|
||||
v-model="item.name"
|
||||
placeholder="必填"
|
||||
:max-length="24"
|
||||
allow-clear>
|
||||
<template #prepend>
|
||||
<span>参数名</span>
|
||||
</template>
|
||||
</a-input>
|
||||
<!-- 参数值 -->
|
||||
<a-input class="parameter-item-value"
|
||||
v-model="item.value"
|
||||
placeholder="必填"
|
||||
allow-clear>
|
||||
<template #prepend>
|
||||
<span>参数值</span>
|
||||
</template>
|
||||
</a-input>
|
||||
<!-- 描述 -->
|
||||
<a-input class="parameter-item-description"
|
||||
v-model="item.desc"
|
||||
placeholder="非必填"
|
||||
:max-length="64"
|
||||
allow-clear>
|
||||
<template #prepend>
|
||||
<span>描述</span>
|
||||
</template>
|
||||
</a-input>
|
||||
<span class="parameter-item-close click-icon-wrapper"
|
||||
title="移除"
|
||||
@click="removeParameter(i)">
|
||||
<icon-close />
|
||||
</span>
|
||||
</a-input-group>
|
||||
</template>
|
||||
<!-- 无参数 -->
|
||||
<template v-else>
|
||||
<span class="no-parameter">
|
||||
<icon-empty class="mr4" />无参数
|
||||
</span>
|
||||
</template>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -135,6 +194,7 @@
|
||||
<script lang="ts" setup>
|
||||
import type { ExecJobUpdateRequest } from '@/api/job/exec-job';
|
||||
import type { ExecTemplateQueryResponse } from '@/api/exec/exec-template';
|
||||
import type { TemplateParam } from '@/components/view/exec-editor/const';
|
||||
import { onUnmounted, ref } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import useVisible from '@/hooks/visible';
|
||||
@@ -157,6 +217,7 @@
|
||||
const isAddHandle = ref<boolean>(true);
|
||||
const formRef = ref<any>();
|
||||
const formModel = ref<ExecJobUpdateRequest>({});
|
||||
const parameter = ref<Array<TemplateParam>>([]);
|
||||
|
||||
const defaultForm = (): ExecJobUpdateRequest => {
|
||||
return {
|
||||
@@ -208,6 +269,21 @@
|
||||
parameterSchema: record.parameterSchema,
|
||||
hostIdList: record.hostIdList,
|
||||
};
|
||||
if (record.parameterSchema) {
|
||||
parameter.value = JSON.parse(record.parameterSchema);
|
||||
} else {
|
||||
parameter.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
// 添加参数
|
||||
const addParameter = () => {
|
||||
parameter.value.push({});
|
||||
};
|
||||
|
||||
// 移除参数
|
||||
const removeParameter = (index: number) => {
|
||||
parameter.value.splice(index, 1);
|
||||
};
|
||||
|
||||
// 设置表达式
|
||||
@@ -221,11 +297,11 @@
|
||||
};
|
||||
|
||||
// 通过模板设置
|
||||
const setWithTemplate = async ({ id }: ExecTemplateQueryResponse) => {
|
||||
const setWithTemplate = async (record: ExecTemplateQueryResponse) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
// 查询模板信息
|
||||
const { data } = await getExecTemplateWithAuthorized(id);
|
||||
const { data } = await getExecTemplateWithAuthorized(record.id);
|
||||
formModel.value = {
|
||||
...formModel.value,
|
||||
name: data.name,
|
||||
@@ -235,6 +311,11 @@
|
||||
parameterSchema: data.parameterSchema,
|
||||
hostIdList: data.hostIdList,
|
||||
};
|
||||
if (record.parameterSchema) {
|
||||
parameter.value = JSON.parse(record.parameterSchema);
|
||||
} else {
|
||||
parameter.value = [];
|
||||
}
|
||||
} catch (e) {
|
||||
} finally {
|
||||
setLoading(false);
|
||||
@@ -257,6 +338,14 @@
|
||||
if (error) {
|
||||
return false;
|
||||
}
|
||||
// 验证并设置命令参数
|
||||
for (const p of parameter.value) {
|
||||
if (!p.name || !p.value) {
|
||||
Message.warning('请补全命令参数');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
formModel.value.parameterSchema = JSON.stringify(parameter.value);
|
||||
if (isAddHandle.value) {
|
||||
// 新增
|
||||
await createExecJob(formModel.value);
|
||||
@@ -317,6 +406,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.form-container {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.command-item {
|
||||
:deep(.arco-form-item-extra) {
|
||||
margin-top: -18px;
|
||||
@@ -327,7 +421,7 @@
|
||||
|
||||
.command-editor {
|
||||
width: 100%;
|
||||
height: calc(100vh - 264px);
|
||||
height: calc(100vh - 318px);
|
||||
}
|
||||
|
||||
:deep(.arco-input-append) {
|
||||
@@ -352,4 +446,67 @@
|
||||
}
|
||||
}
|
||||
|
||||
.parameter-form-item {
|
||||
user-select: none;
|
||||
margin-top: 4px;
|
||||
|
||||
:deep(.arco-form-item-content) {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.parameter-item-last {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.parameter-item {
|
||||
width: 100%;
|
||||
margin-bottom: 12px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
& > span {
|
||||
border-radius: 2px;
|
||||
border-right-color: transparent;
|
||||
}
|
||||
|
||||
&-name {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
&-value {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
&-description {
|
||||
width: calc(30% - 44px);
|
||||
}
|
||||
|
||||
&-close {
|
||||
cursor: pointer;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
font-size: 16px;
|
||||
background: var(--color-fill-2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&:hover {
|
||||
background: var(--color-fill-3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.no-parameter {
|
||||
background: var(--color-fill-2);
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
border-radius: 2px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--color-text-2);
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -29,6 +29,7 @@ const columns = [
|
||||
dataIndex: 'command',
|
||||
slotName: 'command',
|
||||
align: 'left',
|
||||
minWidth: 238,
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
label="配置项">
|
||||
<dict-key-selector v-model="formModel.keyId" @change="changeKey" />
|
||||
</a-form-item>
|
||||
<!-- 配置值 -->
|
||||
<a-form-item field="value" label="配置值">
|
||||
<a-input v-model="formModel.value" placeholder="请输入配置值" allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 配置描述 -->
|
||||
<a-form-item field="label" label="配置描述">
|
||||
<a-input v-model="formModel.label" placeholder="请输入配置描述" allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 配置值 -->
|
||||
<a-form-item field="value" label="配置值">
|
||||
<a-input v-model="formModel.value" placeholder="请输入配置值" allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 排序 -->
|
||||
<a-form-item field="sort" label="排序">
|
||||
<a-input-number v-model="formModel.sort"
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<span class="copy-left" title="复制" @click="copy(record.value)">
|
||||
<icon-copy />
|
||||
</span>
|
||||
<a-tooltip :content="record.value">
|
||||
<a-tooltip position="tl" :content="record.value">
|
||||
<span>{{ record.value }}</span>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
@@ -146,13 +146,13 @@
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openHistory']);
|
||||
|
||||
const selectedKeys = ref<number[]>([]);
|
||||
const tableRenderData = ref<DictValueQueryResponse[]>([]);
|
||||
|
||||
const pagination = usePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
const selectedKeys = ref<Array<number>>([]);
|
||||
const tableRenderData = ref<Array<DictValueQueryResponse>>([]);
|
||||
|
||||
const formModel = reactive<DictValueQueryRequest>({
|
||||
keyId: undefined,
|
||||
keyName: undefined,
|
||||
@@ -178,13 +178,11 @@
|
||||
};
|
||||
|
||||
// 删除当前行
|
||||
const deleteRow = async ({ id }: {
|
||||
id: number
|
||||
}) => {
|
||||
const deleteRow = async (record: DictValueQueryResponse) => {
|
||||
try {
|
||||
setLoading(true);
|
||||
// 调用删除接口
|
||||
await deleteDictValue(id);
|
||||
await deleteDictValue(record.id);
|
||||
Message.success('删除成功');
|
||||
// 重新加载数据
|
||||
fetchTableData();
|
||||
|
||||
@@ -17,8 +17,8 @@ export const value = [{
|
||||
required: true,
|
||||
message: '请输入配置值'
|
||||
}, {
|
||||
maxLength: 512,
|
||||
message: '配置值长度不能大于512位'
|
||||
maxLength: 1024,
|
||||
message: '配置值长度不能大于1024位'
|
||||
}] as FieldRule[];
|
||||
|
||||
export const label = [{
|
||||
|
||||
@@ -32,12 +32,14 @@ const columns = [
|
||||
title: '权限标识',
|
||||
dataIndex: 'permission',
|
||||
slotName: 'permission',
|
||||
minWidth: 138,
|
||||
ellipsis: true,
|
||||
tooltip: true
|
||||
}, {
|
||||
title: '组件名称',
|
||||
dataIndex: 'component',
|
||||
slotName: 'component',
|
||||
minWidth: 138,
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
<!-- 查询头 -->
|
||||
<a-card class="general-card table-search-card">
|
||||
<!-- 查询头组件 -->
|
||||
<operator-log-query-header :visible-user="false"
|
||||
@submit="(e) => table.fetchTableData(undefined, undefined, e)" />
|
||||
<operator-log-query-header :model="formModel"
|
||||
:visible-user="false"
|
||||
@submit="() => table.fetchTableData()" />
|
||||
</a-card>
|
||||
<!-- 表格 -->
|
||||
<a-card class="general-card table-card">
|
||||
@@ -20,7 +21,8 @@
|
||||
<!-- 表格组件 -->
|
||||
<operator-log-simple-table ref="table"
|
||||
:current="!user"
|
||||
:base-params="{ userId: user?.id }" />
|
||||
:base-params="{ userId: user?.id }"
|
||||
:model="formModel"/>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -33,11 +35,12 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { UserQueryResponse } from '@/api/user/user';
|
||||
import { ref, onBeforeMount } from 'vue';
|
||||
import { ref, reactive, onBeforeMount } from 'vue';
|
||||
import { useCacheStore, useDictStore } from '@/store';
|
||||
import { dictKeys } from '@/views/user/operator-log/types/const';
|
||||
import OperatorLogQueryHeader from '@/views/user/operator-log/components/operator-log-query-header.vue';
|
||||
import OperatorLogSimpleTable from '@/views/user/operator-log/components/operator-log-simple-table.vue';
|
||||
import { OperatorLogQueryRequest } from '@/api/user/operator-log';
|
||||
|
||||
const props = defineProps<{
|
||||
user?: UserQueryResponse;
|
||||
@@ -47,6 +50,13 @@
|
||||
|
||||
const render = ref();
|
||||
const table = ref();
|
||||
const formModel = reactive<OperatorLogQueryRequest>({
|
||||
module: undefined,
|
||||
type: undefined,
|
||||
riskLevel: undefined,
|
||||
result: undefined,
|
||||
startTimeRange: undefined,
|
||||
});
|
||||
|
||||
onBeforeMount(async () => {
|
||||
// 加载字典值
|
||||
|
||||
@@ -105,8 +105,8 @@
|
||||
const emits = defineEmits(['clear']);
|
||||
|
||||
// 打开
|
||||
const open = () => {
|
||||
renderForm({ ...defaultForm() });
|
||||
const open = (record: OperatorLogQueryRequest) => {
|
||||
renderForm({ ...defaultForm(), ...record });
|
||||
setVisible(true);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<query-header :model="formModel"
|
||||
<query-header :model="model"
|
||||
label-align="left"
|
||||
:itemOptions="{ [visibleUser ? 5 : 4]: { span: 2 } }"
|
||||
@submit="submit"
|
||||
@@ -9,13 +9,13 @@
|
||||
<a-form-item v-if="visibleUser"
|
||||
field="userId"
|
||||
label="操作用户">
|
||||
<user-selector v-model="formModel.userId"
|
||||
<user-selector v-model="model.userId"
|
||||
placeholder="请选择操作用户"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 操作模块 -->
|
||||
<a-form-item field="module" label="操作模块">
|
||||
<a-select v-model="formModel.module"
|
||||
<a-select v-model="model.module"
|
||||
:options="toOptions(operatorLogModuleKey)"
|
||||
:allow-search="true"
|
||||
:filter-option="labelFilter"
|
||||
@@ -24,7 +24,7 @@
|
||||
</a-form-item>
|
||||
<!-- 操作类型 -->
|
||||
<a-form-item field="type" label="操作类型">
|
||||
<a-select v-model="formModel.type"
|
||||
<a-select v-model="model.type"
|
||||
:options="typeOptions"
|
||||
:allow-search="true"
|
||||
:filter-option="labelFilter"
|
||||
@@ -33,21 +33,21 @@
|
||||
</a-form-item>
|
||||
<!-- 风险等级 -->
|
||||
<a-form-item field="riskLevel" label="风险等级">
|
||||
<a-select v-model="formModel.riskLevel"
|
||||
<a-select v-model="model.riskLevel"
|
||||
:options="toOptions(operatorRiskLevelKey)"
|
||||
placeholder="请选择风险等级"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 执行结果 -->
|
||||
<a-form-item field="result" label="执行结果">
|
||||
<a-select v-model="formModel.result"
|
||||
<a-select v-model="model.result"
|
||||
:options="toOptions(operatorLogResultKey)"
|
||||
placeholder="请选择执行结果"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 执行时间 -->
|
||||
<a-form-item field="startTimeRange" label="执行时间">
|
||||
<a-range-picker v-model="formModel.startTimeRange"
|
||||
<a-range-picker v-model="model.startTimeRange"
|
||||
:time-picker-props="{ defaultValue: ['00:00:00', '23:59:59'] }"
|
||||
show-time
|
||||
format="YYYY-MM-DD HH:mm:ss" />
|
||||
@@ -64,34 +64,31 @@
|
||||
<script lang="ts" setup>
|
||||
import type { OperatorLogQueryRequest } from '@/api/user/operator-log';
|
||||
import type { SelectOptionData } from '@arco-design/web-vue/es/select/interface';
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import { ref, watch } from 'vue';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { useDictStore } from '@/store';
|
||||
import { operatorLogModuleKey, operatorLogTypeKey, operatorRiskLevelKey, operatorLogResultKey } from '../types/const';
|
||||
import { labelFilter } from '@/types/form';
|
||||
import UserSelector from '@/components/user/user/selector/index.vue';
|
||||
|
||||
const emits = defineEmits(['submit']);
|
||||
const emits = defineEmits(['submit', 'update:modelValue']);
|
||||
const props = withDefaults(defineProps<Partial<{
|
||||
visibleUser: boolean;
|
||||
model: OperatorLogQueryRequest;
|
||||
}>>(), {
|
||||
visibleUser: true,
|
||||
model: () => {
|
||||
return {};
|
||||
},
|
||||
});
|
||||
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { $state: dictState, toOptions } = useDictStore();
|
||||
|
||||
const typeOptions = ref<SelectOptionData[]>(toOptions(operatorLogTypeKey));
|
||||
const formModel = reactive<OperatorLogQueryRequest>({
|
||||
module: undefined,
|
||||
type: undefined,
|
||||
riskLevel: undefined,
|
||||
result: undefined,
|
||||
startTimeRange: undefined,
|
||||
});
|
||||
|
||||
// 监听类型变化
|
||||
watch(() => formModel.module, (module: string | undefined) => {
|
||||
watch(() => props.model?.module, (module: string | undefined) => {
|
||||
if (!module) {
|
||||
// 不选择则重置 options
|
||||
typeOptions.value = toOptions(operatorLogTypeKey);
|
||||
@@ -102,14 +99,14 @@
|
||||
// 渲染 options
|
||||
typeOptions.value = dictState[operatorLogTypeKey].filter(s => (s.value as string).startsWith(modulePrefix));
|
||||
// 渲染输入框
|
||||
if (formModel.type && !formModel.type.startsWith(modulePrefix)) {
|
||||
formModel.type = undefined;
|
||||
if (props.model.type && !props.model.type.startsWith(modulePrefix)) {
|
||||
props.model.type = undefined;
|
||||
}
|
||||
});
|
||||
|
||||
// 切换页码
|
||||
const submit = () => {
|
||||
emits('submit', { ...formModel });
|
||||
emits('submit');
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
@@ -84,11 +84,15 @@
|
||||
const props = withDefaults(defineProps<Partial<{
|
||||
handleColumn: boolean;
|
||||
current: boolean;
|
||||
baseParams: object;
|
||||
baseParams: OperatorLogQueryRequest;
|
||||
model: OperatorLogQueryRequest;
|
||||
}>>(), {
|
||||
baseParams: () => {
|
||||
return {};
|
||||
},
|
||||
model: () => {
|
||||
return {};
|
||||
},
|
||||
});
|
||||
|
||||
const pagination = usePagination();
|
||||
@@ -131,7 +135,7 @@
|
||||
};
|
||||
|
||||
// 切换页码
|
||||
const fetchTableData = (page = 1, limit = pagination.pageSize, form = {}) => {
|
||||
const fetchTableData = (page = 1, limit = pagination.pageSize, form = props.model) => {
|
||||
doFetchTableData({ page, limit, ...form });
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<!-- 查询头 -->
|
||||
<a-card class="general-card table-search-card">
|
||||
<!-- 查询头组件 -->
|
||||
<operator-log-query-header @submit="(e) => fetchTableData(undefined, undefined, e)" />
|
||||
<operator-log-query-header :model="formModel"
|
||||
@submit="fetchTableData" />
|
||||
</a-card>
|
||||
<!-- 表格 -->
|
||||
<a-card class="general-card table-card">
|
||||
@@ -97,7 +98,7 @@
|
||||
<!-- 详情 -->
|
||||
<a-button type="text"
|
||||
size="mini"
|
||||
@click="openLogDetail(record)">
|
||||
@click="emits('openDetail', record)">
|
||||
详情
|
||||
</a-button>
|
||||
<!-- 删除 -->
|
||||
@@ -116,11 +117,6 @@
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
<!-- 清理模态框 -->
|
||||
<operator-log-clear-modal ref="clearModal"
|
||||
@clear="fetchTableData" />
|
||||
<!-- json 查看器模态框 -->
|
||||
<json-editor-modal ref="jsonView" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -131,8 +127,8 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { OperatorLogQueryRequest, OperatorLogQueryResponse } from '@/api/user/operator-log';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { operatorLogModuleKey, operatorLogTypeKey, operatorRiskLevelKey, operatorLogResultKey, getLogDetail } from '../types/const';
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { operatorLogModuleKey, operatorLogTypeKey, operatorRiskLevelKey, operatorLogResultKey } from '../types/const';
|
||||
import columns from '../types/table.columns';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import useLoading from '@/hooks/loading';
|
||||
@@ -142,27 +138,27 @@
|
||||
import { replaceHtmlTag, clearHtmlTag } from '@/utils';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import OperatorLogQueryHeader from './operator-log-query-header.vue';
|
||||
import OperatorLogClearModal from './operator-log-clear-modal.vue';
|
||||
import JsonEditorModal from '@/components/view/json-editor/modal/index.vue';
|
||||
|
||||
const emits = defineEmits(['openClear', 'openDetail']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { getDictValue } = useDictStore();
|
||||
|
||||
const clearModal = ref();
|
||||
const jsonView = ref();
|
||||
const tableRenderData = ref<OperatorLogQueryResponse[]>([]);
|
||||
const selectedKeys = ref<number[]>([]);
|
||||
|
||||
// 查看详情
|
||||
const openLogDetail = (record: OperatorLogQueryResponse) => {
|
||||
jsonView.value.open(getLogDetail(record));
|
||||
};
|
||||
const selectedKeys = ref<Array<number>>([]);
|
||||
const tableRenderData = ref<Array<OperatorLogQueryResponse>>([]);
|
||||
const formModel = reactive<OperatorLogQueryRequest>({
|
||||
module: undefined,
|
||||
type: undefined,
|
||||
riskLevel: undefined,
|
||||
result: undefined,
|
||||
startTimeRange: undefined,
|
||||
});
|
||||
|
||||
// 打开清空
|
||||
const openClear = () => {
|
||||
clearModal.value?.open();
|
||||
emits('openClear', { ...formModel });
|
||||
};
|
||||
|
||||
// 删除选中行
|
||||
@@ -182,13 +178,11 @@
|
||||
};
|
||||
|
||||
// 删除当前行
|
||||
const deleteRow = async ({ id }: {
|
||||
id: number
|
||||
}) => {
|
||||
const deleteRow = async (record: OperatorLogQueryResponse) => {
|
||||
try {
|
||||
setLoading(true);
|
||||
// 调用删除接口
|
||||
await deleteOperatorLog([id]);
|
||||
await deleteOperatorLog([record.id]);
|
||||
Message.success('删除成功');
|
||||
selectedKeys.value = [];
|
||||
// 重新加载数据
|
||||
@@ -218,10 +212,12 @@
|
||||
};
|
||||
|
||||
// 切换页码
|
||||
const fetchTableData = (page = 1, limit = pagination.pageSize, form = {}) => {
|
||||
const fetchTableData = (page = 1, limit = pagination.pageSize, form = formModel) => {
|
||||
doFetchTableData({ page, limit, ...form });
|
||||
};
|
||||
|
||||
defineExpose({ fetchTableData });
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
fetchTableData();
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
<template>
|
||||
<div class="layout-container" v-if="render">
|
||||
<operator-log-table />
|
||||
<!-- 表格 -->
|
||||
<operator-log-table ref="table"
|
||||
@open-detail="openLogDetail"
|
||||
@open-clear="(s) => clearModal.open(s)" />
|
||||
<!-- 清理模态框 -->
|
||||
<operator-log-clear-modal ref="clearModal"
|
||||
@clear="() => table.fetchTableData()" />
|
||||
<!-- json 查看器模态框 -->
|
||||
<json-editor-modal ref="jsonView" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -11,14 +19,25 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { OperatorLogQueryResponse } from '@/api/user/operator-log';
|
||||
import { ref, onUnmounted, onBeforeMount } from 'vue';
|
||||
import { useCacheStore, useDictStore } from '@/store';
|
||||
import { dictKeys } from './types/const';
|
||||
import { dictKeys, getLogDetail } from './types/const';
|
||||
import OperatorLogTable from './components/operator-log-table.vue';
|
||||
import OperatorLogClearModal from './components/operator-log-clear-modal.vue';
|
||||
import JsonEditorModal from '@/components/view/json-editor/modal/index.vue';
|
||||
|
||||
const cacheStore = useCacheStore();
|
||||
|
||||
const render = ref(false);
|
||||
const table = ref();
|
||||
const clearModal = ref();
|
||||
const jsonView = ref();
|
||||
|
||||
// 查看详情
|
||||
const openLogDetail = (record: OperatorLogQueryResponse) => {
|
||||
jsonView.value.open(getLogDetail(record));
|
||||
};
|
||||
|
||||
// 加载字典值
|
||||
onBeforeMount(async () => {
|
||||
|
||||
@@ -30,6 +30,8 @@ const columns = [
|
||||
title: '操作日志',
|
||||
dataIndex: 'originLogInfo',
|
||||
slotName: 'originLogInfo',
|
||||
minWidth: 238,
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
|
||||
@@ -144,13 +144,12 @@
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openGrant']);
|
||||
|
||||
const tableRenderData = ref<RoleQueryResponse[]>([]);
|
||||
|
||||
const pagination = usePagination();
|
||||
const { hasPermission } = usePermission();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
|
||||
const tableRenderData = ref<Array<RoleQueryResponse>>([]);
|
||||
const formModel = reactive<RoleQueryRequest>({
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
@@ -168,13 +167,11 @@
|
||||
};
|
||||
|
||||
// 删除当前行
|
||||
const deleteRow = async ({ id }: {
|
||||
id: number
|
||||
}) => {
|
||||
const deleteRow = async (record: RoleQueryResponse) => {
|
||||
try {
|
||||
setLoading(true);
|
||||
// 调用删除接口
|
||||
await deleteRole(id);
|
||||
await deleteRole(record.id);
|
||||
Message.success('删除成功');
|
||||
// 重新加载数据
|
||||
fetchTableData();
|
||||
|
||||
@@ -196,8 +196,8 @@
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
|
||||
const selectedKeys = ref<number[]>([]);
|
||||
const tableRenderData = ref<UserQueryResponse[]>([]);
|
||||
const selectedKeys = ref<Array<number>>([]);
|
||||
const tableRenderData = ref<Array<UserQueryResponse>>([]);
|
||||
const formModel = reactive<UserQueryRequest>({
|
||||
id: undefined,
|
||||
username: undefined,
|
||||
@@ -211,13 +211,11 @@
|
||||
});
|
||||
|
||||
// 删除当前行
|
||||
const deleteRow = async ({ id }: {
|
||||
id: number
|
||||
}) => {
|
||||
const deleteRow = async (record: UserQueryResponse) => {
|
||||
try {
|
||||
setLoading(true);
|
||||
// 调用删除接口
|
||||
await deleteUser(id);
|
||||
await deleteUser(record.id);
|
||||
Message.success('删除成功');
|
||||
// 重新加载数据
|
||||
fetchTableData();
|
||||
|
||||
@@ -6,31 +6,35 @@ const columns = [
|
||||
title: 'id',
|
||||
dataIndex: 'id',
|
||||
slotName: 'id',
|
||||
width: 100,
|
||||
width: 80,
|
||||
align: 'left',
|
||||
fixed: 'left',
|
||||
}, {
|
||||
title: '用户名',
|
||||
dataIndex: 'username',
|
||||
slotName: 'username',
|
||||
minWidth: 138,
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
title: '花名',
|
||||
dataIndex: 'nickname',
|
||||
slotName: 'nickname',
|
||||
minWidth: 138,
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
title: '手机号',
|
||||
dataIndex: 'mobile',
|
||||
slotName: 'mobile',
|
||||
minWidth: 88,
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
title: '邮箱',
|
||||
dataIndex: 'email',
|
||||
slotName: 'email',
|
||||
minWidth: 88,
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -22,7 +22,7 @@
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<revision>2.0.10</revision>
|
||||
<revision>2.0.11</revision>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<maven.surefire.plugin.version>3.0.0-M5</maven.surefire.plugin.version>
|
||||
|
||||
@@ -177,18 +177,18 @@ CREATE TABLE `dict_key`
|
||||
DROP TABLE IF EXISTS `dict_value`;
|
||||
CREATE TABLE `dict_value`
|
||||
(
|
||||
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`key_id` bigint(0) NOT NULL COMMENT '配置项id',
|
||||
`key_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '配置项',
|
||||
`value` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '配置值',
|
||||
`label` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '配置描述',
|
||||
`extra` json NULL COMMENT '额外参数',
|
||||
`sort` int(0) NULL DEFAULT NULL COMMENT '排序',
|
||||
`create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
|
||||
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '是否删除 0未删除 1已删除',
|
||||
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`key_id` bigint(0) NOT NULL COMMENT '配置项id',
|
||||
`key_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '配置项',
|
||||
`value` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '配置值',
|
||||
`label` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '配置描述',
|
||||
`extra` json NULL COMMENT '额外参数',
|
||||
`sort` int(0) NULL DEFAULT NULL COMMENT '排序',
|
||||
`create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
|
||||
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '更新人',
|
||||
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '是否删除 0未删除 1已删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_key_id` (`key_id`) USING BTREE
|
||||
) ENGINE = InnoDB
|
||||
|
||||
@@ -45,6 +45,7 @@ INSERT INTO `dict_key` VALUES (41, 'uploadTaskStatus', 'STRING', '[{\"name\": \"
|
||||
INSERT INTO `dict_key` VALUES (42, 'uploadTaskFileStatus', 'STRING', '[{\"name\": \"status\", \"type\": \"STRING\"}]', '上传任务文件状态', '2024-05-08 10:30:29', '2024-05-10 17:34:13', '1', '1', 0);
|
||||
INSERT INTO `dict_key` VALUES (43, 'messageType', 'STRING', '[{\"name\": \"tagLabel\", \"type\": \"STRING\"}, {\"name\": \"tagVisible\", \"type\": \"STRING\"}, {\"name\": \"tagColor\", \"type\": \"STRING\"}, {\"name\": \"redirectComponent\", \"type\": \"STRING\"}]', '消息类型', '2024-05-13 12:07:56', '2024-05-31 17:31:37', '1', '1', 0);
|
||||
INSERT INTO `dict_key` VALUES (44, 'messageClassify', 'STRING', '[]', '消息分类', '2024-05-13 15:06:27', '2024-05-31 17:31:37', '1', '1', 0);
|
||||
INSERT INTO `dict_key` VALUES (53, 'terminalTheme', 'STRING', '[{\"name\": \"dark\", \"type\": \"BOOLEAN\"}]', '终端主题', '2024-07-04 19:14:34', '2024-07-04 19:14:34', '1', '1', 0);
|
||||
|
||||
-- 字典值
|
||||
INSERT INTO `dict_value` VALUES (3, 4, 'systemMenuType', '1', '父菜单', '{}', 10, '2023-10-26 15:58:59', '2023-10-26 15:58:59', '1', '1', 0);
|
||||
@@ -289,6 +290,20 @@ INSERT INTO `dict_value` VALUES (295, 43, 'messageType', 'EXEC_FAILED', '执行
|
||||
INSERT INTO `dict_value` VALUES (296, 43, 'messageType', 'UPLOAD_FAILED', '上传失败', '{\"tagColor\": \"red\", \"tagLabel\": \"部分失败\", \"tagVisible\": \"true\", \"redirectComponent\": \"batchUpload\"}', 20, '2024-05-13 12:07:56', '2024-05-31 17:31:18', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (297, 44, 'messageClassify', 'NOTICE', '通知', '{}', 10, '2024-05-13 15:06:27', '2024-05-31 17:31:18', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (298, 44, 'messageClassify', 'TODO', '待办', '{}', 20, '2024-05-13 15:06:27', '2024-05-31 17:31:18', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (353, 53, 'terminalTheme', '{\"background\":\"#1E1F29\",\"foreground\":\"#F8F8F2\",\"cursor\":\"#BBBBBB\",\"selectionBackground\":\"#44475A\",\"black\":\"#000000\",\"red\":\"#FF5555\",\"green\":\"#50FA7B\",\"yellow\":\"#F1FA8C\",\"blue\":\"#BD93F9\",\"cyan\":\"#8BE9FD\",\"white\":\"#BBBBBB\",\"brightBlack\":\"#555555\",\"brightRed\":\"#FF5555\",\"brightGreen\":\"#50FA7B\",\"brightYellow\":\"#F1FA8C\",\"brightBlue\":\"#BD93F9\",\"brightCyan\":\"#8BE9FD\",\"brightWhite\":\"#FFFFFF\"}', 'Dracula', '{\"dark\": true}', 10, '2024-07-04 19:15:42', '2024-07-04 19:15:42', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (354, 53, 'terminalTheme', '{\"background\":\"#161719\",\"foreground\":\"#C5C8C6\",\"cursor\":\"#D0D0D0\",\"selectionBackground\":\"#444444\",\"black\":\"#000000\",\"red\":\"#FD5FF1\",\"green\":\"#87C38A\",\"yellow\":\"#FFD7B1\",\"blue\":\"#85BEFD\",\"cyan\":\"#85BEFD\",\"white\":\"#E0E0E0\",\"brightBlack\":\"#000000\",\"brightRed\":\"#FD5FF1\",\"brightGreen\":\"#94FA36\",\"brightYellow\":\"#F5FFA8\",\"brightBlue\":\"#96CBFE\",\"brightCyan\":\"#85BEFD\",\"brightWhite\":\"#E0E0E0\"}', 'Atom', '{\"dark\": true}', 20, '2024-07-04 19:21:38', '2024-07-04 19:21:38', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (355, 53, 'terminalTheme', '{\"background\":\"#1E1E2E\",\"foreground\":\"#CDD6F4\",\"cursor\":\"#F5E0DC\",\"selectionBackground\":\"#585B70\",\"black\":\"#45475A\",\"red\":\"#F38BA8\",\"green\":\"#A6E3A1\",\"yellow\":\"#F9E2AF\",\"blue\":\"#89B4FA\",\"cyan\":\"#94E2D5\",\"white\":\"#BAC2DE\",\"brightBlack\":\"#585B70\",\"brightRed\":\"#F38BA8\",\"brightGreen\":\"#A6E3A1\",\"brightYellow\":\"#F9E2AF\",\"brightBlue\":\"#89B4FA\",\"brightCyan\":\"#94E2D5\",\"brightWhite\":\"#A6ADC8\"}', 'catppuccin-mocha', '{\"dark\": true}', 30, '2024-07-04 19:21:49', '2024-07-04 19:21:49', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (356, 53, 'terminalTheme', '{\"background\":\"#1D262A\",\"foreground\":\"#E7EBED\",\"cursor\":\"#EAEAEA\",\"selectionBackground\":\"#4E6A78\",\"black\":\"#435B67\",\"red\":\"#FC3841\",\"green\":\"#5CF19E\",\"yellow\":\"#FED032\",\"blue\":\"#37B6FF\",\"cyan\":\"#59FFD1\",\"white\":\"#FFFFFF\",\"brightBlack\":\"#A1B0B8\",\"brightRed\":\"#FC746D\",\"brightGreen\":\"#ADF7BE\",\"brightYellow\":\"#FEE16C\",\"brightBlue\":\"#70CFFF\",\"brightCyan\":\"#9AFFE6\",\"brightWhite\":\"#FFFFFF\"}', 'MaterialDesignColors', '{\"dark\": true}', 40, '2024-07-04 19:22:02', '2024-07-04 19:22:02', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (357, 53, 'terminalTheme', '{\"background\":\"#24273A\",\"foreground\":\"#CAD3F5\",\"cursor\":\"#F4DBD6\",\"selectionBackground\":\"#5B6078\",\"black\":\"#494D64\",\"red\":\"#ED8796\",\"green\":\"#A6DA95\",\"yellow\":\"#EED49F\",\"blue\":\"#8AADF4\",\"cyan\":\"#8BD5CA\",\"white\":\"#B8C0E0\",\"brightBlack\":\"#5B6078\",\"brightRed\":\"#ED8796\",\"brightGreen\":\"#A6DA95\",\"brightYellow\":\"#EED49F\",\"brightBlue\":\"#8AADF4\",\"brightCyan\":\"#8BD5CA\",\"brightWhite\":\"#A5ADCB\"}', 'catppuccin-macchiato', '{\"dark\": true}', 50, '2024-07-04 19:22:16', '2024-07-04 19:22:16', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (358, 53, 'terminalTheme', '{\"background\":\"#282C34\",\"foreground\":\"#DCDFE4\",\"cursor\":\"#A3B3CC\",\"selectionBackground\":\"#474E5D\",\"black\":\"#282C34\",\"red\":\"#E06C75\",\"green\":\"#98C379\",\"yellow\":\"#E5C07B\",\"blue\":\"#61AFEF\",\"cyan\":\"#56B6C2\",\"white\":\"#DCDFE4\",\"brightBlack\":\"#282C34\",\"brightRed\":\"#E06C75\",\"brightGreen\":\"#98C379\",\"brightYellow\":\"#E5C07B\",\"brightBlue\":\"#61AFEF\",\"brightCyan\":\"#56B6C2\",\"brightWhite\":\"#DCDFE4\"}', 'OneHalfDark', '{\"dark\": true}', 60, '2024-07-04 19:22:26', '2024-07-04 19:22:26', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (359, 53, 'terminalTheme', '{\"background\":\"#1E1E1E\",\"foreground\":\"#FFFFFF\",\"cursor\":\"#98989D\",\"selectionBackground\":\"#3F638B\",\"black\":\"#1A1A1A\",\"red\":\"#CC372E\",\"green\":\"#26A439\",\"yellow\":\"#CDAC08\",\"blue\":\"#0869CB\",\"cyan\":\"#479EC2\",\"white\":\"#98989D\",\"brightBlack\":\"#464646\",\"brightRed\":\"#FF453A\",\"brightGreen\":\"#32D74B\",\"brightYellow\":\"#FFD60A\",\"brightBlue\":\"#0A84FF\",\"brightCyan\":\"#76D6FF\",\"brightWhite\":\"#FFFFFF\"}', 'Apple System Colors', '{\"dark\": true}', 70, '2024-07-04 19:22:45', '2024-07-04 19:22:45', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (360, 53, 'terminalTheme', '{\"background\":\"#FFFFFF\",\"foreground\":\"#000000\",\"cursor\":\"#000000\",\"selectionBackground\":\"#B5D5FF\",\"black\":\"#000000\",\"red\":\"#CC0000\",\"green\":\"#4E9A06\",\"yellow\":\"#C4A000\",\"blue\":\"#3465A4\",\"cyan\":\"#06989A\",\"white\":\"#D3D7CF\",\"brightBlack\":\"#555753\",\"brightRed\":\"#EF2929\",\"brightGreen\":\"#8AE234\",\"brightYellow\":\"#FCE94F\",\"brightBlue\":\"#729FCF\",\"brightCyan\":\"#34E2E2\",\"brightWhite\":\"#EEEEEC\"}', 'Builtin Tango Light', '{\"dark\": false}', 80, '2024-07-04 19:22:57', '2024-07-04 19:22:57', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (361, 53, 'terminalTheme', '{\"background\":\"#1F1D27\",\"foreground\":\"#B7A1FF\",\"cursor\":\"#FF9839\",\"selectionBackground\":\"#353147\",\"black\":\"#1F1D27\",\"red\":\"#D9393E\",\"green\":\"#2DCD73\",\"yellow\":\"#D9B76E\",\"blue\":\"#FFC284\",\"cyan\":\"#2488FF\",\"white\":\"#B7A1FF\",\"brightBlack\":\"#353147\",\"brightRed\":\"#D9393E\",\"brightGreen\":\"#2DCD73\",\"brightYellow\":\"#D9B76E\",\"brightBlue\":\"#FFC284\",\"brightCyan\":\"#2488FF\",\"brightWhite\":\"#EAE5FF\"}', 'Duotone Dark', '{\"dark\": true}', 90, '2024-07-04 19:23:13', '2024-07-04 19:23:13', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (362, 53, 'terminalTheme', '{\"background\":\"#F9F9F9\",\"foreground\":\"#373A41\",\"cursor\":\"#F32759\",\"selectionBackground\":\"#DAF0FF\",\"black\":\"#373A41\",\"red\":\"#D52753\",\"green\":\"#23974A\",\"yellow\":\"#DF631C\",\"blue\":\"#275FE4\",\"cyan\":\"#27618D\",\"white\":\"#BABBC2\",\"brightBlack\":\"#676A77\",\"brightRed\":\"#FF6480\",\"brightGreen\":\"#3CBC66\",\"brightYellow\":\"#C5A332\",\"brightBlue\":\"#0099E1\",\"brightCyan\":\"#6D93BB\",\"brightWhite\":\"#D3D3D3\"}', 'BlulocoLight', '{\"dark\": false}', 100, '2024-07-04 19:23:32', '2024-07-04 19:23:32', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (363, 53, 'terminalTheme', '{\"background\":\"#2C3643\",\"foreground\":\"#FFFFFF\",\"cursor\":\"#B4B1B1\",\"selectionBackground\":\"#67747C\",\"black\":\"#080200\",\"red\":\"#FA5E5B\",\"green\":\"#16C98D\",\"yellow\":\"#FFC83F\",\"blue\":\"#288AD6\",\"cyan\":\"#28DDDE\",\"white\":\"#E7E7E7\",\"brightBlack\":\"#6F6B68\",\"brightRed\":\"#FA5E5B\",\"brightGreen\":\"#16C98D\",\"brightYellow\":\"#FEEF6D\",\"brightBlue\":\"#278AD6\",\"brightCyan\":\"#27DEDE\",\"brightWhite\":\"#FFFFFF\"}', 'Chester', '{\"dark\": true}', 110, '2024-07-04 19:23:41', '2024-07-04 19:23:41', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (364, 53, 'terminalTheme', '{\"background\":\"#FFFFFF\",\"foreground\":\"#262626\",\"cursor\":\"#6FD3FC\",\"selectionBackground\":\"#6FD3FC\",\"black\":\"#000000\",\"red\":\"#F8282A\",\"green\":\"#328A5D\",\"yellow\":\"#FA701D\",\"blue\":\"#135CD0\",\"cyan\":\"#33C3C1\",\"white\":\"#B3B3B3\",\"brightBlack\":\"#555753\",\"brightRed\":\"#FB0416\",\"brightGreen\":\"#2CC631\",\"brightYellow\":\"#FDD727\",\"brightBlue\":\"#1670FF\",\"brightCyan\":\"#3AD5CE\",\"brightWhite\":\"#EEEEEC\"}', 'CLRS', '{\"dark\": false}', 120, '2024-07-04 19:24:06', '2024-07-04 19:24:06', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (365, 53, 'terminalTheme', '{\"background\":\"#2F2833\",\"foreground\":\"#D5CED9\",\"cursor\":\"#D5CED9\",\"selectionBackground\":\"#7E6C88\",\"black\":\"#2F2833\",\"red\":\"#FC644D\",\"green\":\"#A5F69C\",\"yellow\":\"#E9D7A5\",\"blue\":\"#3B79C7\",\"cyan\":\"#74D3DE\",\"white\":\"#D5CED9\",\"brightBlack\":\"#7E6C88\",\"brightRed\":\"#FC644D\",\"brightGreen\":\"#A5F69C\",\"brightYellow\":\"#E9D7A5\",\"brightBlue\":\"#3B79C7\",\"brightCyan\":\"#74D3DE\",\"brightWhite\":\"#FFFFFF\"}', 'Calamity', '{\"dark\": true}', 130, '2024-07-04 19:24:17', '2024-07-04 19:24:17', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (366, 53, 'terminalTheme', '{\"background\":\"#FFFFFF\",\"foreground\":\"#4D4D4C\",\"cursor\":\"#4D4D4C\",\"selectionBackground\":\"#D6D6D6\",\"black\":\"#000000\",\"red\":\"#C82829\",\"green\":\"#718C00\",\"yellow\":\"#EAB700\",\"blue\":\"#4271AE\",\"cyan\":\"#3E999F\",\"white\":\"#FFFFFF\",\"brightBlack\":\"#000000\",\"brightRed\":\"#C82829\",\"brightGreen\":\"#718C00\",\"brightYellow\":\"#EAB700\",\"brightBlue\":\"#4271AE\",\"brightCyan\":\"#3E999F\",\"brightWhite\":\"#FFFFFF\"}', 'Tomorrow', '{\"dark\": false}', 140, '2024-07-04 19:24:27', '2024-07-04 21:07:57', '1', '1', 0);
|
||||
|
||||
-- 菜单配置
|
||||
INSERT INTO `system_menu` VALUES (1, 0, '工作台', NULL, 1, 10, 1, 1, 1, 0, 'IconComputer', NULL, 'workplace', '2023-07-28 10:51:50', '2023-09-11 15:27:52', '1', '1', 0);
|
||||
@@ -392,7 +407,7 @@ INSERT INTO `system_menu` VALUES (181, 177, '修改任务状态', 'asset:exec-jo
|
||||
INSERT INTO `system_menu` VALUES (182, 177, '删除计划任务', 'asset:exec-job:delete', 3, 50, 1, 1, 1, 0, NULL, NULL, NULL, '2024-04-10 16:13:27', '2024-04-10 16:13:27', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (183, 177, '手动执行任务', 'asset:exec-job:trigger', 3, 60, 1, 1, 1, 0, NULL, NULL, NULL, '2024-04-10 16:13:27', '2024-04-10 16:13:27', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (184, 193, '任务日志', NULL, 2, 20, 1, 1, 1, 0, 'icon-history', '', 'execJobLog', '2024-04-11 13:40:47', '2024-04-28 15:34:27', '2', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (185, 193, '计划任务日志新页面', NULL, 2, 30, 0, 1, 0, 1, NULL, NULL, 'execJobLogView', '2024-04-11 13:41:47', '2024-04-28 15:33:33', '2', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (185, 193, '计划任务日志', NULL, 2, 30, 0, 1, 0, 1, NULL, NULL, 'execJobLogView', '2024-04-11 13:41:47', '2024-07-08 18:22:28', '2', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (186, 184, '查询任务日志', 'asset:exec-job-log:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-13 15:08:23', '2024-04-12 13:52:02', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (187, 184, '删除任务日志', 'asset:exec-job-log:delete', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-13 15:08:23', '2024-04-12 13:51:59', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (189, 184, '清理任务日志', 'asset:exec-job-log:management:clear', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2024-03-13 15:08:23', '2024-04-12 13:51:58', '1', '1', 0);
|
||||
|
||||
Reference in New Issue
Block a user