Merge pull request #124 from dromara/dev

Dev
This commit is contained in:
李佳航
2025-07-10 03:50:05 +08:00
committed by GitHub
20 changed files with 62 additions and 35 deletions

View File

@@ -5,7 +5,7 @@ services:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
privileged: true
ports:
- 9200:9200
- "9200:9200"
environment:
SPRING_PROFILES_ACTIVE: prod
MYSQL_HOST: mysql
@@ -37,7 +37,7 @@ services:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
privileged: true
ports:
- 3307:3306
- "3307:3306"
environment:
MYSQL_DATABASE: orion_visor
MYSQL_USER: orion
@@ -59,7 +59,7 @@ services:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
privileged: true
ports:
- 6380:6379
- "6380:6379"
environment:
REDIS_PASSWORD: Data@123456
volumes:

View File

@@ -1,6 +1,6 @@
version: '3.3'
# latest = 2.4.2
# latest = 2.4.3
# 支持以下源
# lijiahangmax/*
@@ -23,7 +23,7 @@ services:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
privileged: true
ports:
- 9200:9200
- "9200:9200"
environment:
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-prod}
MYSQL_HOST: ${MYSQL_HOST:-mysql}
@@ -61,7 +61,7 @@ services:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
privileged: true
ports:
- 3307:3306
- "3307:3306"
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE:-orion_visor}
MYSQL_USER: ${MYSQL_USER:-orion}
@@ -84,7 +84,7 @@ services:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
privileged: true
ports:
- 6380:6379
- "6380:6379"
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD:-Data@123456}
volumes:
@@ -103,7 +103,7 @@ services:
guacd:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-guacd:latest
ports:
- 4822:4822
- "4822:4822"
environment:
GUACD_LOG_LEVEL: info
GUACD_LOG_FILE: /var/log/guacd.log
@@ -125,7 +125,7 @@ services:
adminer:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-adminer:latest
ports:
- 8081:8080
- "8081:8080"
environment:
ADMINER_DEFAULT_SERVER: ${MYSQL_HOST:-mysql}
depends_on:

View File

@@ -7,7 +7,7 @@ set -e
source ./project-build.sh "$@"
# 版本号
version=2.4.2
version=2.4.3
# 是否推送镜像
push_image=false
# 是否构建 latest

View File

@@ -4,7 +4,7 @@ set -e
# DockerContext: orion-visor
# 版本号
version=2.4.2
version=2.4.3
# 是否构建 service
export build_service=false
# 是否构建 ui

View File

@@ -36,7 +36,7 @@ public interface AppConst extends OrionConst {
/**
* 同 ${orion.version} 迭代时候需要手动更改
*/
String VERSION = "2.4.2";
String VERSION = "2.4.3";
/**
* 同 ${spring.application.name}

View File

@@ -14,7 +14,7 @@
<url>https://github.com/dromara/orion-visor</url>
<properties>
<revision>2.4.2</revision>
<revision>2.4.3</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>

View File

@@ -13,7 +13,7 @@ spring:
host: ${REDIS_HOST:127.0.0.1}
port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:Data@123456}
database: ${REDIS_DATABASE:10}
database: ${REDIS_DATABASE:1}
data-version: ${REDIS_DATA_VERSION:1}
mock: false
redisson:

View File

@@ -39,9 +39,9 @@ import java.util.function.Function;
*/
public class ReplaceVersion {
private static final String TARGET_VERSION = "2.4.1";
private static final String TARGET_VERSION = "2.4.2";
private static final String REPLACE_VERSION = "2.4.2";
private static final String REPLACE_VERSION = "2.4.3";
private static final String PATH = new File("").getAbsolutePath();

View File

@@ -62,6 +62,7 @@ public class HostVncConfigStrategy extends AbstractHostConfigStrategy<HostVncCon
.authType(HostAuthTypeEnum.PASSWORD.name())
.noUsername(false)
.noPassword(false)
.timezone("Asia/Shanghai")
.clipboardEncoding(Const.UTF_8)
.build();
}
@@ -94,7 +95,11 @@ public class HostVncConfigStrategy extends AbstractHostConfigStrategy<HostVncCon
afterModel.setAuthType(HostAuthTypeEnum.PASSWORD.name());
}
// 加密密码
this.checkEncryptPassword(afterModel.getAuthType(), beforeModel, afterModel);
if (Booleans.isTrue(afterModel.getNoPassword())) {
afterModel.setPassword(beforeModel.getPassword());
} else {
this.checkEncryptPassword(afterModel.getAuthType(), beforeModel, afterModel);
}
afterModel.setHasPassword(null);
afterModel.setUseNewPassword(null);
}

View File

@@ -277,6 +277,9 @@ public class TerminalConnectHandler extends AbstractTerminalHandler<ITerminalSen
} else if (TerminalConnectTypeEnum.RDP.name().equals(connectType)) {
// RDP
connectConfig = hostConnectApi.getRdpConnectConfig(host, userId);
} else if (TerminalConnectTypeEnum.VNC.name().equals(connectType)) {
// VNC
connectConfig = hostConnectApi.getVncConnectConfig(host, userId);
} else {
throw Exceptions.unsupported();
}

View File

@@ -3,4 +3,4 @@ VITE_API_BASE_URL=http://127.0.0.1:9200/orion-visor/api
# websocket 路径
VITE_WS_BASE_URL=ws://127.0.0.1:9200/orion-visor/keep-alive
# 版本号
VITE_APP_VERSION=2.4.2
VITE_APP_VERSION=2.4.3

View File

@@ -3,4 +3,4 @@ VITE_API_BASE_URL=/orion-visor/api
# websocket 路径
VITE_WS_BASE_URL=/orion-visor/keep-alive
# 版本号
VITE_APP_VERSION=2.4.2
VITE_APP_VERSION=2.4.3

View File

@@ -1,7 +1,7 @@
{
"name": "orion-visor-ui",
"description": "Orion Visor UI",
"version": "2.4.2",
"version": "2.4.3",
"private": true,
"author": "Jiahang Li",
"license": "Apache 2.0",

View File

@@ -632,7 +632,7 @@ body[terminal-theme='dark'] .arco-modal-container {
align-items: center;
justify-content: center;
:deep(> div) {
& > div {
position: relative;
z-index: 8;
}
@@ -647,7 +647,7 @@ body[terminal-theme='dark'] .arco-modal-container {
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
z-index: 30;
}
// guacd 工具栏

View File

@@ -96,12 +96,10 @@ export function formatSecond(second: number, p = 'HH:mm') {
/**
* 格式化持续时间
* @param start
* @param end
*/
export function formatDuration(start: number, end?: number): string {
export function formatDuration(start: number, end?: number, none: string = ''): string {
if (!end) {
return '';
return none;
}
const duration = (end - start) / 1000;
if (duration < 1) {

View File

@@ -1,4 +1,5 @@
import type { TableColumnData } from '@arco-design/web-vue';
import { formatDuration } from '@/utils';
export const logColumns = [
{
@@ -46,6 +47,16 @@ export const logColumns = [
align: 'left',
ellipsis: true,
default: true,
}, {
title: '持续时间',
dataIndex: 'duration',
slotName: 'duration',
align: 'left',
width: 142,
render: ({ record }) => {
return formatDuration(record.startTime, record.endTime, '-');
},
default: true,
}, {
title: '连接时间',
dataIndex: 'connectTime',

View File

@@ -11,10 +11,18 @@
</a-button>
<a-button type="primary"
size="small"
title="仅将文本发送到远程剪切板"
:disabled="!clipboardData"
@click="sendClipboardData">
@click="sendClipboardData(false)">
发送
</a-button>
<a-button type="primary"
size="small"
title="将文本发送到远程剪切板并执行粘贴操作"
:disabled="!clipboardData"
@click="sendClipboardData(true)">
粘贴
</a-button>
</a-space>
</template>
@@ -38,8 +46,8 @@
const clipboardData = ref('');
// 发送剪切板数据
const sendClipboardData = () => {
props.session.paste(clipboardData.value);
const sendClipboardData = (sendPaste: boolean) => {
props.session.paste(clipboardData.value, sendPaste);
emits('close');
};

View File

@@ -176,7 +176,7 @@ export interface IGuacdSession extends ITerminalSession<GuacdReactiveSessionStat
// 发送键
sendKeys: (keys: Array<number>) => void;
// 粘贴
paste: (data: string) => void;
paste: (data: string, sendPaste: boolean) => void;
}
// RDP 会话定义

View File

@@ -141,16 +141,18 @@ export default abstract class BaseGuacdSession extends BaseSession<GuacdReactive
}
// 粘贴
paste(data: string): void {
paste(data: string, sendPaste: boolean): void {
if (!this.isWriteable()) {
return;
}
// 发送至远程剪切板
this.clipboardHandler?.sendDataToRemoteClipboard(data);
// 发送粘贴命令
setTimeout(() => {
this.sendKeys([65507, 118]);
}, 100);
if (sendPaste) {
setTimeout(() => {
this.sendKeys([65507, 118]);
}, 100);
}
}
// 聚焦

View File

@@ -22,7 +22,7 @@
</modules>
<properties>
<revision>2.4.2</revision>
<revision>2.4.3</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>