⚡ 重构终端功能.
This commit is contained in:
@@ -43,7 +43,7 @@ public enum OutputTypeEnum {
|
||||
/**
|
||||
* SFTP 文件列表
|
||||
*/
|
||||
SFTP_LIST("ls", "${type}|${sessionId}|${path}|${result}|${body}"),
|
||||
SFTP_LIST("ls", "${type}|${sessionId}|${path}|${result}|${msg}|${body}"),
|
||||
|
||||
/**
|
||||
* SFTP 创建文件夹
|
||||
@@ -78,12 +78,12 @@ public enum OutputTypeEnum {
|
||||
/**
|
||||
* SFTP 下载文件夹展开文件
|
||||
*/
|
||||
SFTP_DOWNLOAD_FLAT_DIRECTORY("df", "${type}|${sessionId}|${currentPath}|${body}"),
|
||||
SFTP_DOWNLOAD_FLAT_DIRECTORY("df", "${type}|${sessionId}|${currentPath}|${result}|${msg}|${body}"),
|
||||
|
||||
/**
|
||||
* SFTP 获取文件内容
|
||||
*/
|
||||
SFTP_GET_CONTENT("gc", "${type}|${sessionId}|${path}|${result}|${content}"),
|
||||
SFTP_GET_CONTENT("gc", "${type}|${sessionId}|${path}|${result}|${msg}|${content}"),
|
||||
|
||||
/**
|
||||
* SFTP 修改文件内容
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.orion.visor.module.asset.dao.HostConfigDAO">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.orion.visor.module.asset.entity.domain.HostConfigDO">
|
||||
<id column="id" property="id"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="updater" property="updater"/>
|
||||
<result column="deleted" property="deleted"/>
|
||||
<result column="host_id" property="hostId"/>
|
||||
<result column="type" property="type"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="config" property="config"/>
|
||||
<result column="version" property="version"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, host_id, type, status, config, version, create_time, update_time, creator, updater, deleted
|
||||
</sql>
|
||||
|
||||
<update id="setKeyIdWithNull">
|
||||
UPDATE host_config
|
||||
SET version = version + 1,
|
||||
config = JSON_REMOVE(config, '$.keyId')
|
||||
WHERE deleted = 0
|
||||
<foreach collection="keyIdList" item="item" separator="OR" open="AND (" close=")">
|
||||
JSON_CONTAINS(config, JSON_OBJECT('keyId', #{item}))
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="setIdentityIdWithNull">
|
||||
UPDATE host_config
|
||||
SET version = version + 1,
|
||||
config = JSON_REMOVE(config, '$.identityId')
|
||||
WHERE deleted = 0
|
||||
<foreach collection="identityIdList" item="item" separator="OR" open="AND (" close=")">
|
||||
JSON_CONTAINS(config, JSON_OBJECT('identityId', #{item}))
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -119,12 +119,12 @@
|
||||
margin-right: 8px;
|
||||
|
||||
.extra-icon {
|
||||
color: var(--color-panel-text-2);
|
||||
color: var(--color-panel-text-1);
|
||||
transition: 0.2s;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -149,6 +149,18 @@
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.arco-tabs-content-list {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.arco-tabs-content-item {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.arco-tabs-pane {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,9 +119,10 @@
|
||||
import type { TerminalDisplaySetting } from '@/store/modules/terminal/types';
|
||||
import { ref, watch, onMounted } from 'vue';
|
||||
import { useDictStore, useTerminalStore } from '@/store';
|
||||
import { fontFamilyKey, fontSizeKey, fontWeightKey, fontFamilySuffix, cursorStyleKey } from '../../../types/terminal.const';
|
||||
import { fontFamilyKey, fontSizeKey, fontWeightKey, cursorStyleKey } from '../../../types/terminal.const';
|
||||
import { labelFilter } from '@/types/form';
|
||||
import { TerminalPreferenceItem } from '@/store/modules/terminal';
|
||||
import { defaultFontFamily } from '@/types/xterm';
|
||||
import TerminalExample from '../terminal-example.vue';
|
||||
|
||||
const { toOptions, toRadioOptions } = useDictStore();
|
||||
@@ -142,7 +143,8 @@
|
||||
// 修改预览终端配置
|
||||
Object.keys(v).forEach(key => {
|
||||
if (key === 'fontFamily') {
|
||||
options[key] = (formModel.value as any)[key] + fontFamilySuffix;
|
||||
const fontFamily = (formModel.value as any)[key];
|
||||
options[key] = fontFamily === '_' ? defaultFontFamily : `${fontFamily}, ${defaultFontFamily}`;
|
||||
} else {
|
||||
options[key] = (formModel.value as any)[key];
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
|
||||
.ssh-container {
|
||||
width: 100%;
|
||||
height: calc(100vh - var(--header-height) - var(--panel-nav-height));
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -183,6 +183,7 @@
|
||||
height: 100%;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
|
||||
.address-copy {
|
||||
display: none;
|
||||
@@ -207,6 +208,7 @@
|
||||
|
||||
.command-input {
|
||||
width: 36%;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user