Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d0eadc3bf | ||
|
|
ab430d8934 | ||
|
|
edcc2cf0c8 | ||
|
|
2913ddb2e0 | ||
|
|
7d35f839df | ||
|
|
ef9c34f7d9 | ||
|
|
f1a4e049ca | ||
|
|
8ee1e6acf1 | ||
|
|
d0eddf1e15 | ||
|
|
b42645b0ce |
8
.github/workflows/docker-publish.yml
vendored
8
.github/workflows/docker-publish.yml
vendored
@@ -117,11 +117,15 @@ jobs:
|
|||||||
type=semver,pattern={{major}}
|
type=semver,pattern={{major}}
|
||||||
|
|
||||||
- name: 🛠️ Build and push Docker image for orion-visor-${{ matrix.service }}
|
- name: 🛠️ Build and push Docker image for orion-visor-${{ matrix.service }}
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ./docker
|
context: ./docker
|
||||||
file: ./docker/${{ matrix.service }}/Dockerfile
|
file: ./docker/${{ matrix.service }}/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
tags: |
|
tags: |
|
||||||
${{ env.DOCKERHUB_NAMESPACE }}/orion-visor-${{ matrix.service }}:${{ steps.meta.outputs.version }}
|
${{ env.DOCKERHUB_NAMESPACE }}/orion-visor-${{ matrix.service }}:${{ steps.meta.outputs.version }}
|
||||||
${{ env.DOCKERHUB_NAMESPACE }}/orion-visor-${{ matrix.service }}:latest
|
${{ env.DOCKERHUB_NAMESPACE }}/orion-visor-${{ matrix.service }}:latest
|
||||||
@@ -129,5 +133,3 @@ jobs:
|
|||||||
${{ env.GITHUB_REGISTRY }}/${{ github.repository_owner }}/orion-visor-${{ matrix.service }}:latest
|
${{ env.GITHUB_REGISTRY }}/${{ github.repository_owner }}/orion-visor-${{ matrix.service }}:latest
|
||||||
${{ env.ALIYUN_REGISTRY }}/${{ env.ALIYUN_NAMESPACE }}/orion-visor-${{ matrix.service }}:${{ steps.meta.outputs.version }}
|
${{ env.ALIYUN_REGISTRY }}/${{ env.ALIYUN_NAMESPACE }}/orion-visor-${{ matrix.service }}:${{ steps.meta.outputs.version }}
|
||||||
${{ env.ALIYUN_REGISTRY }}/${{ env.ALIYUN_NAMESPACE }}/orion-visor-${{ matrix.service }}:latest
|
${{ env.ALIYUN_REGISTRY }}/${{ env.ALIYUN_NAMESPACE }}/orion-visor-${{ matrix.service }}:latest
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ services:
|
|||||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
|
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
|
||||||
privileged: true
|
privileged: true
|
||||||
ports:
|
ports:
|
||||||
- 9200:9200
|
- "9200:9200"
|
||||||
environment:
|
environment:
|
||||||
SPRING_PROFILES_ACTIVE: prod
|
SPRING_PROFILES_ACTIVE: prod
|
||||||
MYSQL_HOST: mysql
|
MYSQL_HOST: mysql
|
||||||
@@ -37,7 +37,7 @@ services:
|
|||||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
|
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
|
||||||
privileged: true
|
privileged: true
|
||||||
ports:
|
ports:
|
||||||
- 3307:3306
|
- "3307:3306"
|
||||||
environment:
|
environment:
|
||||||
MYSQL_DATABASE: orion_visor
|
MYSQL_DATABASE: orion_visor
|
||||||
MYSQL_USER: orion
|
MYSQL_USER: orion
|
||||||
@@ -59,7 +59,7 @@ services:
|
|||||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
|
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
|
||||||
privileged: true
|
privileged: true
|
||||||
ports:
|
ports:
|
||||||
- 6380:6379
|
- "6380:6379"
|
||||||
environment:
|
environment:
|
||||||
REDIS_PASSWORD: Data@123456
|
REDIS_PASSWORD: Data@123456
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
version: '3.3'
|
version: '3.3'
|
||||||
|
|
||||||
# latest = 2.4.2
|
# latest = 2.4.3
|
||||||
|
|
||||||
# 支持以下源
|
# 支持以下源
|
||||||
# lijiahangmax/*
|
# lijiahangmax/*
|
||||||
@@ -23,7 +23,7 @@ services:
|
|||||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
|
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
|
||||||
privileged: true
|
privileged: true
|
||||||
ports:
|
ports:
|
||||||
- 9200:9200
|
- "9200:9200"
|
||||||
environment:
|
environment:
|
||||||
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-prod}
|
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-prod}
|
||||||
MYSQL_HOST: ${MYSQL_HOST:-mysql}
|
MYSQL_HOST: ${MYSQL_HOST:-mysql}
|
||||||
@@ -61,7 +61,7 @@ services:
|
|||||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
|
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
|
||||||
privileged: true
|
privileged: true
|
||||||
ports:
|
ports:
|
||||||
- 3307:3306
|
- "3307:3306"
|
||||||
environment:
|
environment:
|
||||||
MYSQL_DATABASE: ${MYSQL_DATABASE:-orion_visor}
|
MYSQL_DATABASE: ${MYSQL_DATABASE:-orion_visor}
|
||||||
MYSQL_USER: ${MYSQL_USER:-orion}
|
MYSQL_USER: ${MYSQL_USER:-orion}
|
||||||
@@ -84,7 +84,7 @@ services:
|
|||||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
|
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
|
||||||
privileged: true
|
privileged: true
|
||||||
ports:
|
ports:
|
||||||
- 6380:6379
|
- "6380:6379"
|
||||||
environment:
|
environment:
|
||||||
REDIS_PASSWORD: ${REDIS_PASSWORD:-Data@123456}
|
REDIS_PASSWORD: ${REDIS_PASSWORD:-Data@123456}
|
||||||
volumes:
|
volumes:
|
||||||
@@ -103,7 +103,7 @@ services:
|
|||||||
guacd:
|
guacd:
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-guacd:latest
|
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-guacd:latest
|
||||||
ports:
|
ports:
|
||||||
- 4822:4822
|
- "4822:4822"
|
||||||
environment:
|
environment:
|
||||||
GUACD_LOG_LEVEL: info
|
GUACD_LOG_LEVEL: info
|
||||||
GUACD_LOG_FILE: /var/log/guacd.log
|
GUACD_LOG_FILE: /var/log/guacd.log
|
||||||
@@ -125,7 +125,7 @@ services:
|
|||||||
adminer:
|
adminer:
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-adminer:latest
|
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-adminer:latest
|
||||||
ports:
|
ports:
|
||||||
- 8081:8080
|
- "8081:8080"
|
||||||
environment:
|
environment:
|
||||||
ADMINER_DEFAULT_SERVER: ${MYSQL_HOST:-mysql}
|
ADMINER_DEFAULT_SERVER: ${MYSQL_HOST:-mysql}
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
FROM --platform=$BUILDPLATFORM adminer:latest
|
FROM --platform=$TARGETPLATFORM adminer:latest
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
FROM maven:3.9.10-eclipse-temurin-8-alpine AS builder
|
#FROM --platform=$BUILDPLATFORM maven:3.9-amazoncorretto-8 AS builder
|
||||||
|
FROM maven:3.9-amazoncorretto-8 AS builder
|
||||||
|
|
||||||
# 设置阿里云镜像加速
|
# 设置阿里云镜像加速
|
||||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#FROM --platform=$BUILDPLATFORM node:18-alpine AS builder
|
||||||
FROM node:18-alpine AS builder
|
FROM node:18-alpine AS builder
|
||||||
|
|
||||||
# 设置阿里云镜像加速
|
# 设置阿里云镜像加速
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ set -e
|
|||||||
source ./project-build.sh "$@"
|
source ./project-build.sh "$@"
|
||||||
|
|
||||||
# 版本号
|
# 版本号
|
||||||
version=2.4.2
|
version=2.4.3
|
||||||
# 是否推送镜像
|
# 是否推送镜像
|
||||||
push_image=false
|
push_image=false
|
||||||
# 是否构建 latest
|
# 是否构建 latest
|
||||||
@@ -115,7 +115,7 @@ function modify_dockerfiles() {
|
|||||||
if [ -f "$file" ]; then
|
if [ -f "$file" ]; then
|
||||||
echo "备份并修改: $file"
|
echo "备份并修改: $file"
|
||||||
cp "$file" "$file$backup_suffix"
|
cp "$file" "$file$backup_suffix"
|
||||||
sed -i 's/--platform=\$BUILDPLATFORM//g' "$file"
|
sed -i 's/--platform=\TARGETPLATFORM//g' "$file"
|
||||||
else
|
else
|
||||||
echo "文件不存在 -> $file"
|
echo "文件不存在 -> $file"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM --platform=$BUILDPLATFORM guacamole/guacd:1.6.0
|
FROM --platform=$TARGETPLATFORM guacamole/guacd:1.6.0
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM --platform=$BUILDPLATFORM mysql:8.0.28
|
FROM --platform=$TARGETPLATFORM mysql:8.0.39
|
||||||
|
|
||||||
# 系统时区
|
# 系统时区
|
||||||
ARG TZ=Asia/Shanghai
|
ARG TZ=Asia/Shanghai
|
||||||
@@ -12,3 +12,7 @@ COPY ./mysql/my.cnf /etc/mysql/conf.d/my.cnf
|
|||||||
|
|
||||||
# 复制初始化脚本
|
# 复制初始化脚本
|
||||||
COPY ./mysql/sql/init-*.sql /docker-entrypoint-initdb.d/
|
COPY ./mysql/sql/init-*.sql /docker-entrypoint-initdb.d/
|
||||||
|
|
||||||
|
# 心跳检测
|
||||||
|
HEALTHCHECK --interval=10s --timeout=3s --start-period=3s --retries=3 \
|
||||||
|
CMD mysqladmin ping -h localhost -u root --password=${MYSQL_ROOT_PASSWORD} || exit 1
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ set -e
|
|||||||
# DockerContext: orion-visor
|
# DockerContext: orion-visor
|
||||||
|
|
||||||
# 版本号
|
# 版本号
|
||||||
version=2.4.2
|
version=2.4.3
|
||||||
# 是否构建 service
|
# 是否构建 service
|
||||||
export build_service=false
|
export build_service=false
|
||||||
# 是否构建 ui
|
# 是否构建 ui
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM --platform=$BUILDPLATFORM redis:6.0.16-alpine
|
FROM --platform=$TARGETPLATFORM redis:6.0.16-alpine
|
||||||
|
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM --platform=$BUILDPLATFORM openjdk:8-jdk-alpine
|
FROM --platform=$TARGETPLATFORM openjdk:8-jdk-alpine
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
@@ -20,5 +20,9 @@ RUN \
|
|||||||
# 复制 jar 包
|
# 复制 jar 包
|
||||||
COPY ./service/orion-visor-launch.jar /app/app.jar
|
COPY ./service/orion-visor-launch.jar /app/app.jar
|
||||||
|
|
||||||
|
# 启动检测
|
||||||
|
HEALTHCHECK --interval=15s --timeout=5s --retries=5 --start-period=10s \
|
||||||
|
CMD wget -T5 -qO- http://127.0.0.1:9200/orion-visor/api/server/bootstrap/health | grep ok || exit 1
|
||||||
|
|
||||||
# 启动
|
# 启动
|
||||||
CMD ["java", "-jar", "/app/app.jar"]
|
CMD ["java", "-jar", "/app/app.jar"]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM --platform=$BUILDPLATFORM nginx:alpine
|
FROM --platform=$TARGETPLATFORM nginx:alpine
|
||||||
|
|
||||||
# 系统时区
|
# 系统时区
|
||||||
ARG TZ=Asia/Shanghai
|
ARG TZ=Asia/Shanghai
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public interface AppConst extends OrionConst {
|
|||||||
/**
|
/**
|
||||||
* 同 ${orion.version} 迭代时候需要手动更改
|
* 同 ${orion.version} 迭代时候需要手动更改
|
||||||
*/
|
*/
|
||||||
String VERSION = "2.4.2";
|
String VERSION = "2.4.3";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同 ${spring.application.name}
|
* 同 ${spring.application.name}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<url>https://github.com/dromara/orion-visor</url>
|
<url>https://github.com/dromara/orion-visor</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>2.4.2</revision>
|
<revision>2.4.3</revision>
|
||||||
<spring.boot.version>2.7.17</spring.boot.version>
|
<spring.boot.version>2.7.17</spring.boot.version>
|
||||||
<spring.boot.admin.version>2.7.15</spring.boot.admin.version>
|
<spring.boot.admin.version>2.7.15</spring.boot.admin.version>
|
||||||
<flatten.maven.plugin.version>1.5.0</flatten.maven.plugin.version>
|
<flatten.maven.plugin.version>1.5.0</flatten.maven.plugin.version>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ spring:
|
|||||||
host: ${REDIS_HOST:127.0.0.1}
|
host: ${REDIS_HOST:127.0.0.1}
|
||||||
port: ${REDIS_PORT:6379}
|
port: ${REDIS_PORT:6379}
|
||||||
password: ${REDIS_PASSWORD:Data@123456}
|
password: ${REDIS_PASSWORD:Data@123456}
|
||||||
database: ${REDIS_DATABASE:10}
|
database: ${REDIS_DATABASE:1}
|
||||||
data-version: ${REDIS_DATA_VERSION:1}
|
data-version: ${REDIS_DATA_VERSION:1}
|
||||||
mock: false
|
mock: false
|
||||||
redisson:
|
redisson:
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ import java.util.function.Function;
|
|||||||
*/
|
*/
|
||||||
public class ReplaceVersion {
|
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();
|
private static final String PATH = new File("").getAbsolutePath();
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ public class HostVncConfigStrategy extends AbstractHostConfigStrategy<HostVncCon
|
|||||||
.authType(HostAuthTypeEnum.PASSWORD.name())
|
.authType(HostAuthTypeEnum.PASSWORD.name())
|
||||||
.noUsername(false)
|
.noUsername(false)
|
||||||
.noPassword(false)
|
.noPassword(false)
|
||||||
|
.timezone("Asia/Shanghai")
|
||||||
.clipboardEncoding(Const.UTF_8)
|
.clipboardEncoding(Const.UTF_8)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
@@ -94,7 +95,11 @@ public class HostVncConfigStrategy extends AbstractHostConfigStrategy<HostVncCon
|
|||||||
afterModel.setAuthType(HostAuthTypeEnum.PASSWORD.name());
|
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.setHasPassword(null);
|
||||||
afterModel.setUseNewPassword(null);
|
afterModel.setUseNewPassword(null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -277,6 +277,9 @@ public class TerminalConnectHandler extends AbstractTerminalHandler<ITerminalSen
|
|||||||
} else if (TerminalConnectTypeEnum.RDP.name().equals(connectType)) {
|
} else if (TerminalConnectTypeEnum.RDP.name().equals(connectType)) {
|
||||||
// RDP
|
// RDP
|
||||||
connectConfig = hostConnectApi.getRdpConnectConfig(host, userId);
|
connectConfig = hostConnectApi.getRdpConnectConfig(host, userId);
|
||||||
|
} else if (TerminalConnectTypeEnum.VNC.name().equals(connectType)) {
|
||||||
|
// VNC
|
||||||
|
connectConfig = hostConnectApi.getVncConnectConfig(host, userId);
|
||||||
} else {
|
} else {
|
||||||
throw Exceptions.unsupported();
|
throw Exceptions.unsupported();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ VITE_API_BASE_URL=http://127.0.0.1:9200/orion-visor/api
|
|||||||
# websocket 路径
|
# websocket 路径
|
||||||
VITE_WS_BASE_URL=ws://127.0.0.1:9200/orion-visor/keep-alive
|
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
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ VITE_API_BASE_URL=/orion-visor/api
|
|||||||
# websocket 路径
|
# websocket 路径
|
||||||
VITE_WS_BASE_URL=/orion-visor/keep-alive
|
VITE_WS_BASE_URL=/orion-visor/keep-alive
|
||||||
# 版本号
|
# 版本号
|
||||||
VITE_APP_VERSION=2.4.2
|
VITE_APP_VERSION=2.4.3
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "orion-visor-ui",
|
"name": "orion-visor-ui",
|
||||||
"description": "Orion Visor UI",
|
"description": "Orion Visor UI",
|
||||||
"version": "2.4.2",
|
"version": "2.4.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"author": "Jiahang Li",
|
"author": "Jiahang Li",
|
||||||
"license": "Apache 2.0",
|
"license": "Apache 2.0",
|
||||||
|
|||||||
@@ -632,7 +632,7 @@ body[terminal-theme='dark'] .arco-modal-container {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
:deep(> div) {
|
& > div {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 8;
|
z-index: 8;
|
||||||
}
|
}
|
||||||
@@ -647,7 +647,7 @@ body[terminal-theme='dark'] .arco-modal-container {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
z-index: 9999;
|
z-index: 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
// guacd 工具栏
|
// guacd 工具栏
|
||||||
|
|||||||
@@ -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) {
|
if (!end) {
|
||||||
return '';
|
return none;
|
||||||
}
|
}
|
||||||
const duration = (end - start) / 1000;
|
const duration = (end - start) / 1000;
|
||||||
if (duration < 1) {
|
if (duration < 1) {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import type { TableColumnData } from '@arco-design/web-vue';
|
import type { TableColumnData } from '@arco-design/web-vue';
|
||||||
|
import { formatDuration } from '@/utils';
|
||||||
|
|
||||||
export const logColumns = [
|
export const logColumns = [
|
||||||
{
|
{
|
||||||
@@ -46,6 +47,16 @@ export const logColumns = [
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
default: true,
|
default: true,
|
||||||
|
}, {
|
||||||
|
title: '持续时间',
|
||||||
|
dataIndex: 'duration',
|
||||||
|
slotName: 'duration',
|
||||||
|
align: 'left',
|
||||||
|
width: 142,
|
||||||
|
render: ({ record }) => {
|
||||||
|
return formatDuration(record.startTime, record.endTime, '-');
|
||||||
|
},
|
||||||
|
default: true,
|
||||||
}, {
|
}, {
|
||||||
title: '连接时间',
|
title: '连接时间',
|
||||||
dataIndex: 'connectTime',
|
dataIndex: 'connectTime',
|
||||||
|
|||||||
@@ -11,10 +11,18 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
<a-button type="primary"
|
<a-button type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
|
title="仅将文本发送到远程剪切板"
|
||||||
:disabled="!clipboardData"
|
:disabled="!clipboardData"
|
||||||
@click="sendClipboardData">
|
@click="sendClipboardData(false)">
|
||||||
发送
|
发送
|
||||||
</a-button>
|
</a-button>
|
||||||
|
<a-button type="primary"
|
||||||
|
size="small"
|
||||||
|
title="将文本发送到远程剪切板并执行粘贴操作"
|
||||||
|
:disabled="!clipboardData"
|
||||||
|
@click="sendClipboardData(true)">
|
||||||
|
粘贴
|
||||||
|
</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -38,8 +46,8 @@
|
|||||||
const clipboardData = ref('');
|
const clipboardData = ref('');
|
||||||
|
|
||||||
// 发送剪切板数据
|
// 发送剪切板数据
|
||||||
const sendClipboardData = () => {
|
const sendClipboardData = (sendPaste: boolean) => {
|
||||||
props.session.paste(clipboardData.value);
|
props.session.paste(clipboardData.value, sendPaste);
|
||||||
emits('close');
|
emits('close');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ export interface IGuacdSession extends ITerminalSession<GuacdReactiveSessionStat
|
|||||||
// 发送键
|
// 发送键
|
||||||
sendKeys: (keys: Array<number>) => void;
|
sendKeys: (keys: Array<number>) => void;
|
||||||
// 粘贴
|
// 粘贴
|
||||||
paste: (data: string) => void;
|
paste: (data: string, sendPaste: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
// RDP 会话定义
|
// RDP 会话定义
|
||||||
|
|||||||
@@ -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()) {
|
if (!this.isWriteable()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 发送至远程剪切板
|
// 发送至远程剪切板
|
||||||
this.clipboardHandler?.sendDataToRemoteClipboard(data);
|
this.clipboardHandler?.sendDataToRemoteClipboard(data);
|
||||||
// 发送粘贴命令
|
// 发送粘贴命令
|
||||||
setTimeout(() => {
|
if (sendPaste) {
|
||||||
this.sendKeys([65507, 118]);
|
setTimeout(() => {
|
||||||
}, 100);
|
this.sendKeys([65507, 118]);
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 聚焦
|
// 聚焦
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -22,7 +22,7 @@
|
|||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>2.4.2</revision>
|
<revision>2.4.3</revision>
|
||||||
<maven.compiler.source>8</maven.compiler.source>
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
<maven.compiler.target>8</maven.compiler.target>
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
<maven.surefire.plugin.version>3.0.0-M5</maven.surefire.plugin.version>
|
<maven.surefire.plugin.version>3.0.0-M5</maven.surefire.plugin.version>
|
||||||
|
|||||||
Reference in New Issue
Block a user