feat: 终端头部指令.
This commit is contained in:
@@ -252,7 +252,7 @@ body {
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: var(--color-neutral-1);
|
||||
background-color: var(--color-fill-1);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
@@ -260,9 +260,13 @@ body {
|
||||
border: 1px solid transparent;
|
||||
background-clip: padding-box;
|
||||
border-radius: 8px;
|
||||
background-color: var(--color-neutral-5);
|
||||
background-color: var(--color-fill-4);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-neutral-6);
|
||||
}
|
||||
//&:hover {
|
||||
// background-color: var(--color-neutral-6);
|
||||
//}
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,12 @@ body[terminal-theme='dark'] .host-layout {
|
||||
&:hover {
|
||||
background: var(--color-sidebar-icon-bg);
|
||||
}
|
||||
|
||||
&.disabled-item {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 终端设置容器
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
content-class="terminal-tooltip-content"
|
||||
arrow-class="terminal-tooltip-arrow"
|
||||
:content="action.content">
|
||||
<div class="terminal-sidebar-icon-wrapper">
|
||||
<div class="terminal-sidebar-icon-wrapper" v-if="action.visible !== false">
|
||||
<div class="terminal-sidebar-icon"
|
||||
:class="iconClass"
|
||||
@click="action.click">
|
||||
:class="[iconClass, action.disabled !== false ? '' : 'disabled-item']"
|
||||
@click="action.disabled !== false ? action.click() : false">
|
||||
<component :is="action.icon" :style="action?.iconStyle" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- 头部 -->
|
||||
<div class="terminal-header"
|
||||
:style="{
|
||||
background: adjustColor(preference.themeSchema.background, -10)
|
||||
background: adjustColor(themeSchema.background, -12)
|
||||
}">
|
||||
<!-- 左侧操作 -->
|
||||
<div class="terminal-header-left">
|
||||
@@ -17,16 +17,27 @@
|
||||
</div>
|
||||
<!-- 右侧操作 -->
|
||||
<div class="terminal-header-right">
|
||||
<!-- 代码输入框 -->
|
||||
<a-textarea class="command-input mr8"
|
||||
v-model="commandInput"
|
||||
:auto-size="{ minRows: 1, maxRows: 1 }"
|
||||
placeholder="F8 发送命令"
|
||||
allow-clear
|
||||
@keyup="writeCommandInput" />
|
||||
<!-- 操作按钮 -->
|
||||
<icon-actions class="terminal-header-right-icon-actions"
|
||||
:actions="rightActions"
|
||||
position="bottom" />
|
||||
<!-- 状态 -->
|
||||
<a-badge style="margin: 0 2px 0 8px;"
|
||||
:status="getDictValue(connectStatusKey, session ? session.status : 0, 'status')"
|
||||
:text="getDictValue(connectStatusKey, session ? session.status : 0)" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- 终端 -->
|
||||
<div class="terminal-wrapper"
|
||||
:style="{
|
||||
background: preference.themeSchema.background
|
||||
background: themeSchema.background
|
||||
}">
|
||||
<div class="terminal-inst" ref="terminalRef" />
|
||||
</div>
|
||||
@@ -41,11 +52,11 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { ITerminalSession, TerminalTabItem } from '../../types/terminal.type';
|
||||
import { onMounted, onUnmounted, ref } from 'vue';
|
||||
import { useTerminalStore } from '@/store';
|
||||
import { computed, onMounted, onUnmounted, ref } from 'vue';
|
||||
import { useDictStore, useTerminalStore } from '@/store';
|
||||
import useCopy from '@/hooks/copy';
|
||||
import IconActions from '@/views/host/terminal/components/layout/icon-actions.vue';
|
||||
import { SidebarAction } from '@/views/host/terminal/types/terminal.const';
|
||||
import { connectStatusKey, SidebarAction } from '@/views/host/terminal/types/terminal.const';
|
||||
import { adjustColor } from '@/utils';
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -53,79 +64,127 @@
|
||||
}>();
|
||||
|
||||
const { copy, readText } = useCopy();
|
||||
const { getDictValue } = useDictStore();
|
||||
const { preference, sessionManager } = useTerminalStore();
|
||||
|
||||
const commandInput = ref();
|
||||
const themeSchema = preference.themeSchema;
|
||||
const terminalRef = ref();
|
||||
const session = ref<ITerminalSession>();
|
||||
|
||||
// FIXME
|
||||
// 最近连接记录
|
||||
// 防止 background 自动变更
|
||||
// 去顶部 去底部 ctrl+c 重新连接 command-input 状态
|
||||
// (未连接禁用点击)
|
||||
// (改成可配置)
|
||||
// 命令编辑器 搜索
|
||||
// (改成可配置/拆分)
|
||||
// 自定义 font siderBar 颜色, 集成到主题里面, 现在的问题是切换主题字体颜色就变了
|
||||
// 右键菜单补充
|
||||
// 搜索插件, link插件
|
||||
|
||||
// 发送命令
|
||||
const writeCommandInput = async (e: KeyboardEvent) => {
|
||||
const value = commandInput.value;
|
||||
if (value && e.code === 'F8' && session.value?.canWrite) {
|
||||
session.value.paste(value);
|
||||
commandInput.value = undefined;
|
||||
}
|
||||
};
|
||||
|
||||
// 右侧操作
|
||||
const rightActions: Array<SidebarAction> = [
|
||||
const rightActions = computed<Array<SidebarAction>>(() => [
|
||||
{
|
||||
icon: 'icon-up',
|
||||
content: '去顶部',
|
||||
click: () => {
|
||||
session.value?.toTop();
|
||||
}
|
||||
}, {
|
||||
icon: 'icon-down',
|
||||
content: '去底部',
|
||||
click: () => {
|
||||
session.value?.toBottom();
|
||||
}
|
||||
}, {
|
||||
icon: 'icon-expand',
|
||||
content: '全选',
|
||||
click: () => {
|
||||
session.value?.selectAll();
|
||||
session.value?.focus();
|
||||
}
|
||||
}, {
|
||||
icon: 'icon-copy',
|
||||
content: '复制选中部分',
|
||||
click: () => {
|
||||
copy(session.value?.getSelection(), '已复制');
|
||||
session.value?.focus();
|
||||
}
|
||||
}, {
|
||||
icon: 'icon-paste',
|
||||
content: '粘贴',
|
||||
disabled: session.value?.canWrite,
|
||||
click: async () => {
|
||||
if (session.value?.canWrite) {
|
||||
session.value?.paste(await readText());
|
||||
}
|
||||
session.value?.paste(await readText());
|
||||
}
|
||||
}, {
|
||||
icon: 'icon-formula',
|
||||
content: 'ctrl + c',
|
||||
disabled: session.value?.canWrite,
|
||||
click: () => {
|
||||
session.value?.paste(String.fromCharCode(3));
|
||||
}
|
||||
}, {
|
||||
icon: 'icon-play-arrow-fill',
|
||||
content: '回车',
|
||||
disabled: session.value?.canWrite,
|
||||
click: () => {
|
||||
session.value?.paste(String.fromCharCode(13));
|
||||
}
|
||||
}, {
|
||||
icon: 'icon-code-square',
|
||||
content: '命令编辑器',
|
||||
disabled: session.value?.canWrite,
|
||||
click: () => {
|
||||
}
|
||||
}, {
|
||||
icon: 'icon-search',
|
||||
content: '搜索',
|
||||
click: () => {
|
||||
}
|
||||
}, {
|
||||
icon: 'icon-zoom-in',
|
||||
content: '增大字号',
|
||||
click: () => {
|
||||
if (session.value?.connected) {
|
||||
if (session.value) {
|
||||
session.value.setOption('fontSize', session.value.getOption('fontSize') + 1);
|
||||
session.value.fit();
|
||||
session.value.focus();
|
||||
if (session.value.connected) {
|
||||
session.value.fit();
|
||||
session.value.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
icon: 'icon-zoom-out',
|
||||
content: '减小字号',
|
||||
click: () => {
|
||||
if (session.value?.connected) {
|
||||
if (session.value) {
|
||||
session.value.setOption('fontSize', session.value.getOption('fontSize') - 1);
|
||||
session.value.fit();
|
||||
session.value.focus();
|
||||
if (session.value.connected) {
|
||||
session.value.fit();
|
||||
session.value.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
icon: 'icon-eraser',
|
||||
icon: 'icon-delete',
|
||||
content: '清空',
|
||||
click: () => {
|
||||
session.value?.clear();
|
||||
session.value?.focus();
|
||||
}
|
||||
}, {
|
||||
icon: 'icon-poweroff',
|
||||
content: '关闭',
|
||||
disabled: session.value?.connected,
|
||||
click: () => {
|
||||
if (session.value?.connected) {
|
||||
session.value.logout();
|
||||
}
|
||||
session.value?.logout();
|
||||
}
|
||||
},
|
||||
];
|
||||
]);
|
||||
|
||||
// 初始化会话
|
||||
onMounted(async () => {
|
||||
@@ -190,6 +249,10 @@
|
||||
|
||||
&-right {
|
||||
justify-content: flex-end;
|
||||
|
||||
.command-input {
|
||||
width: 36%;
|
||||
}
|
||||
}
|
||||
|
||||
&-right-icon-actions {
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
OutputPayload
|
||||
} from '../types/terminal.type';
|
||||
import { InputProtocol } from '../types/terminal.protocol';
|
||||
import { TerminalStatus } from '../types/terminal.const';
|
||||
|
||||
// 终端输出消息体处理器实现
|
||||
export default class TerminalOutputProcessor implements ITerminalOutputProcessor {
|
||||
@@ -25,6 +26,7 @@ export default class TerminalOutputProcessor implements ITerminalOutputProcessor
|
||||
// 未成功展示错误信息
|
||||
if (!success) {
|
||||
session.write(`[91m${msg || ''}[0m`);
|
||||
session.status = TerminalStatus.CLOSED;
|
||||
return;
|
||||
}
|
||||
// 发送 connect 命令
|
||||
@@ -38,6 +40,7 @@ export default class TerminalOutputProcessor implements ITerminalOutputProcessor
|
||||
// 未成功展示错误信息
|
||||
if (!success) {
|
||||
session.write(`[91m${msg || ''}[0m`);
|
||||
session.status = TerminalStatus.CLOSED;
|
||||
return;
|
||||
}
|
||||
// 设置可写
|
||||
@@ -54,6 +57,7 @@ export default class TerminalOutputProcessor implements ITerminalOutputProcessor
|
||||
// 提示消息
|
||||
session.write(`\r\n[91m${msg || ''}[0m`);
|
||||
// 设置状态
|
||||
session.status = TerminalStatus.CLOSED;
|
||||
session.connected = false;
|
||||
// 设置不可写
|
||||
session.setCanWrite(false);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ITerminalChannel, ITerminalSession } from '../types/terminal.type';
|
||||
import { useTerminalStore } from '@/store';
|
||||
import { fontFamilySuffix } from '../types/terminal.const';
|
||||
import { fontFamilySuffix, TerminalStatus } from '../types/terminal.const';
|
||||
import { InputProtocol } from '../types/terminal.protocol';
|
||||
import { ITerminalOptions, Terminal } from 'xterm';
|
||||
import { FitAddon } from 'xterm-addon-fit';
|
||||
@@ -23,6 +23,8 @@ export default class TerminalSession implements ITerminalSession {
|
||||
|
||||
public canWrite: boolean;
|
||||
|
||||
public status: number;
|
||||
|
||||
private readonly sessionId: string;
|
||||
|
||||
private readonly channel: ITerminalChannel;
|
||||
@@ -37,6 +39,7 @@ export default class TerminalSession implements ITerminalSession {
|
||||
this.channel = channel;
|
||||
this.connected = false;
|
||||
this.canWrite = false;
|
||||
this.status = TerminalStatus.CONNECTING;
|
||||
this.inst = undefined as unknown as Terminal;
|
||||
this.addons = {} as TerminalAddons;
|
||||
}
|
||||
@@ -65,6 +68,7 @@ export default class TerminalSession implements ITerminalSession {
|
||||
|
||||
// 设置已连接
|
||||
connect(): void {
|
||||
this.status = TerminalStatus.CONNECTED;
|
||||
this.connected = true;
|
||||
// 注册输入事件
|
||||
this.inst.onData(s => {
|
||||
@@ -98,7 +102,7 @@ export default class TerminalSession implements ITerminalSession {
|
||||
}
|
||||
|
||||
// 写入数据
|
||||
write(value: string): void {
|
||||
write(value: string | Uint8Array): void {
|
||||
this.inst.write(value);
|
||||
}
|
||||
|
||||
@@ -128,11 +132,26 @@ export default class TerminalSession implements ITerminalSession {
|
||||
// 选中全部
|
||||
selectAll(): void {
|
||||
this.inst.selectAll();
|
||||
this.inst.focus();
|
||||
}
|
||||
|
||||
// 获取选中
|
||||
getSelection(): string {
|
||||
return this.inst.getSelection();
|
||||
const selection = this.inst.getSelection();
|
||||
this.inst.focus();
|
||||
return selection;
|
||||
}
|
||||
|
||||
// 去顶部
|
||||
toTop(): void {
|
||||
this.inst.scrollToTop();
|
||||
this.inst.focus();
|
||||
}
|
||||
|
||||
// 去底部
|
||||
toBottom(): void {
|
||||
this.inst.scrollToBottom();
|
||||
this.inst.focus();
|
||||
}
|
||||
|
||||
// 获取配置
|
||||
|
||||
@@ -5,6 +5,8 @@ import { getUUID } from '@/utils';
|
||||
export interface SidebarAction {
|
||||
icon: string;
|
||||
content: string;
|
||||
visible?: boolean;
|
||||
disabled?: boolean;
|
||||
iconStyle?: CSSProperties;
|
||||
click: () => void;
|
||||
}
|
||||
@@ -60,6 +62,16 @@ export const ExtraSshAuthType = {
|
||||
CUSTOM_IDENTITY: 'CUSTOM_IDENTITY',
|
||||
};
|
||||
|
||||
// 终端状态
|
||||
export const TerminalStatus = {
|
||||
// 连接中
|
||||
CONNECTING: 0,
|
||||
// 已连接
|
||||
CONNECTED: 1,
|
||||
// 已断开
|
||||
CLOSED: 2
|
||||
};
|
||||
|
||||
// 获取会话id
|
||||
export const nextSessionId = (): string => {
|
||||
return getUUID().replaceAll('-', '').substring(0, 10);
|
||||
@@ -87,15 +99,18 @@ export const fontWeightKey = 'terminalFontWeight';
|
||||
export const cursorStyleKey = 'terminalCursorStyle';
|
||||
|
||||
// 终端新建连接类型
|
||||
export const NewConnectionTypeKey = 'terminalNewConnectionType';
|
||||
export const newConnectionTypeKey = 'terminalNewConnectionType';
|
||||
|
||||
// 终端新建连接类型
|
||||
export const extraSshAuthTypeKey = 'hostExtraSshAuthType';
|
||||
|
||||
// 终端状态
|
||||
export const connectStatusKey = 'terminalConnectStatus';
|
||||
|
||||
// 加载的字典值
|
||||
export const dictKeys = [
|
||||
darkThemeKey, fontFamilyKey,
|
||||
fontSizeKey, fontWeightKey,
|
||||
cursorStyleKey, NewConnectionTypeKey,
|
||||
extraSshAuthTypeKey
|
||||
cursorStyleKey, newConnectionTypeKey,
|
||||
extraSshAuthTypeKey, connectStatusKey
|
||||
];
|
||||
|
||||
@@ -97,6 +97,8 @@ export interface ITerminalSession {
|
||||
connected: boolean;
|
||||
// 是否可写
|
||||
canWrite: boolean;
|
||||
// 状态
|
||||
status: number;
|
||||
|
||||
// 初始化
|
||||
init: (dom: HTMLElement) => void;
|
||||
@@ -105,7 +107,7 @@ export interface ITerminalSession {
|
||||
// 设置是否可写
|
||||
setCanWrite: (canWrite: boolean) => void;
|
||||
// 写入数据
|
||||
write: (value: string) => void;
|
||||
write: (value: string | Uint8Array) => void;
|
||||
// 自适应
|
||||
fit: () => void;
|
||||
// 聚焦
|
||||
@@ -118,6 +120,10 @@ export interface ITerminalSession {
|
||||
selectAll: () => void;
|
||||
// 获取选中
|
||||
getSelection: () => string;
|
||||
// 去顶部
|
||||
toTop: () => void;
|
||||
// 去底部
|
||||
toBottom: () => void;
|
||||
// 获取配置
|
||||
getOption: (option: string) => any;
|
||||
// 设置配置
|
||||
|
||||
@@ -322,8 +322,8 @@ CREATE TABLE `host_connect_log`
|
||||
`host_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主机名称',
|
||||
`host_address` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主机地址',
|
||||
`type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
|
||||
`token` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'token',
|
||||
`status` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态',
|
||||
`token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'token',
|
||||
`start_time` datetime(0) NULL DEFAULT NULL COMMENT '开始时间',
|
||||
`end_time` datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
|
||||
`extra_info` json NULL COMMENT '额外信息',
|
||||
|
||||
@@ -65,22 +65,24 @@ INSERT INTO `system_menu` VALUES (106, 105, '查询字典配置值', 'infra:dict
|
||||
INSERT INTO `system_menu` VALUES (107, 105, '创建字典配置值', 'infra:dict-value:create', 3, 220, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-17 11:38:18', '2023-10-27 01:16:10', NULL, '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (108, 105, '修改字典配置值', 'infra:dict-value:update', 3, 230, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-17 11:38:18', '2023-10-27 01:16:10', NULL, '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (109, 105, '删除字典配置值', 'infra:dict-value:delete', 3, 240, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-17 11:38:18', '2023-10-27 01:16:10', NULL, '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (120, 97, '查询字典配置项', 'infra:dict-key:query', 3, 100, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-20 11:27:12', '2023-10-27 01:16:10', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (120, 97, '查询字典配置项', 'infra:dict-key:query', 3, 100, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-20 11:27:12', '2023-12-27 18:39:22', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (121, 97, '刷新缓存', 'infra:dict-key:management:refresh-cache', 3, 140, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-27 15:50:04', '2023-12-27 12:40:12', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (122, 5, '操作日志', NULL, 2, 30, 1, 1, 1, 0, 'IconCalendarClock', NULL, 'userOperatorLog', '2023-11-01 14:09:36', '2023-11-01 14:09:36', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (123, 122, '查询操作日志', 'infra:operator-log:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-02 11:22:54', '2023-11-02 11:22:54', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (124, 48, '查询用户会话', 'infra:system-user:query-session', 3, 50, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-02 11:24:14', '2023-11-02 11:24:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (125, 48, '下线用户会话', 'infra:system-user:management:offline-session', 3, 60, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-02 11:24:37', '2023-12-27 12:39:17', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (126, 48, '查询用户登录日志', 'infra:system-user:login-history', 3, 70, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-27 15:05:37', '2023-12-27 15:05:37', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (126, 48, '查询用户登录日志', 'infra:system-user:login-history', 3, 70, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-27 15:05:37', '2023-12-27 15:07:19', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (129, 64, '编辑主机分组', 'asset:host-group:update', 3, 100, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-13 18:16:32', '2023-12-01 01:47:58', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (133, 144, '主机分组授权', 'asset:host-group:grant', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-23 18:08:57', '2023-11-30 22:39:53', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (142, 144, '主机秘钥授权', 'asset:host-key:grant', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-30 21:06:13', '2023-11-30 22:39:47', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (143, 144, '主机身份授权', 'asset:host-identity:grant', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-30 21:06:26', '2023-11-30 22:40:11', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (144, 63, '资产授权', NULL, 2, 70, 1, 1, 1, 0, 'icon-safe', NULL, 'assetGrant', '2023-11-30 22:38:57', '2023-11-30 22:39:06', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (145, 0, '主机运维', NULL, 1, 400, 1, 1, 1, 1, 'IconDesktop', NULL, 'hostOps', '2023-12-04 23:33:25', '2023-12-05 14:51:46', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (145, 0, '主机运维', NULL, 1, 400, 1, 1, 1, 1, 'IconDesktop', NULL, 'host', '2023-12-04 23:33:25', '2024-01-04 17:35:14', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (146, 145, 'Terminal', NULL, 2, 10, 1, 1, 1, 1, 'icon-code-square', NULL, 'hostTerminal', '2023-12-04 23:38:01', '2023-12-13 21:09:13', '1', '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (148, 63, '连接日志', NULL, 2, 80, 1, 1, 1, 0, 'IconLink', NULL, 'assetHostConnectLog', '2023-12-26 22:53:07', '2023-12-26 23:12:18', NULL, '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (148, 152, '连接日志', NULL, 2, 10, 1, 1, 1, 0, 'IconLink', NULL, 'hostReviewConnectLog', '2023-12-26 22:53:07', '2024-01-04 17:55:14', NULL, '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (149, 148, '查询主机连接日志', 'asset:host-connect-log:management:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-26 22:53:08', '2023-12-26 22:54:24', NULL, '1', 0);
|
||||
INSERT INTO `system_menu` VALUES (151, 146, '连接终端', 'asset:host-terminal:access', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-12-27 18:56:33', '2023-12-27 18:56:33', '2', '2', 0);
|
||||
INSERT INTO `system_menu` VALUES (152, 0, '运维审计', NULL, 1, 410, 1, 1, 1, 0, 'IconSafe', NULL, 'hostReview', '2024-01-04 17:54:56', '2024-01-04 17:57:31', '1', '1', 0);
|
||||
|
||||
-- 字典项
|
||||
INSERT INTO `dict_key` VALUES (1, 'operatorLogModule', 'STRING', '[]', '操作日志模块', '2023-10-21 02:04:22', '2023-10-30 14:11:38', '1', '1', 0);
|
||||
@@ -105,6 +107,7 @@ INSERT INTO `dict_key` VALUES (25, 'terminalNewConnectionType', 'STRING', '[]',
|
||||
INSERT INTO `dict_key` VALUES (26, 'hostExtraSshAuthType', 'STRING', '[]', '主机额外配置ssh认证方式', '2023-12-25 15:41:22', '2023-12-25 15:41:22', '1', '1', 0);
|
||||
INSERT INTO `dict_key` VALUES (27, 'hostConnectType', 'STRING', '[]', '主机连接类型', '2023-12-26 23:23:08', '2023-12-26 23:23:08', '1', '1', 0);
|
||||
INSERT INTO `dict_key` VALUES (28, 'hostConnectStatus', 'STRING', '[{\"name\": \"color\", \"type\": \"COLOR\"}]', '主机连接状态', '2023-12-26 23:23:51', '2023-12-26 23:28:15', '1', '1', 0);
|
||||
INSERT INTO `dict_key` VALUES (29, 'terminalConnectStatus', 'INTEGER', '[{\"name\": \"status\", \"type\": \"STRING\"}]', '终端连接状态', '2024-01-09 00:32:00', '2024-01-09 00:32:16', '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);
|
||||
@@ -179,7 +182,7 @@ INSERT INTO `dict_value` VALUES (103, 16, 'operatorRiskLevel', 'L', '低风险',
|
||||
INSERT INTO `dict_value` VALUES (104, 16, 'operatorRiskLevel', 'M', '中风险', '{\"color\": \"orangered\"}', 20, '2023-11-01 16:04:24', '2023-11-01 16:04:24', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (105, 16, 'operatorRiskLevel', 'H', '高风险', '{\"color\": \"red\"}', 30, '2023-11-01 16:04:41', '2023-11-01 16:04:41', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (106, 2, 'operatorLogType', 'system-user:offline', '下线用户会话', '{}', 10, '2023-11-02 11:32:39', '2023-11-02 11:32:39', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (107, 1, 'operatorLogModule', 'asset:host-group', '主机分组', '{}', 10, '2023-11-13 18:26:13', '2023-11-13 18:26:13', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (107, 1, 'operatorLogModule', 'asset:host-group', '主机分组', '{}', 2040, '2023-11-13 18:26:13', '2023-12-27 18:42:48', '1', '2', 0);
|
||||
INSERT INTO `dict_value` VALUES (108, 2, 'operatorLogType', 'host-group:create', '创建主机分组', '{}', 10, '2023-11-13 18:27:05', '2023-11-13 18:27:28', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (109, 2, 'operatorLogType', 'host-group:rename', '重命名主机分组', '{}', 20, '2023-11-13 18:27:51', '2023-11-13 18:27:51', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (110, 2, 'operatorLogType', 'host-group:move', '移动主机分组', '{}', 30, '2023-11-13 18:28:02', '2023-11-13 18:28:02', '1', '1', 0);
|
||||
@@ -239,3 +242,8 @@ INSERT INTO `dict_value` VALUES (176, 27, 'hostConnectType', 'SSH', 'SSH', '{}',
|
||||
INSERT INTO `dict_value` VALUES (177, 28, 'hostConnectStatus', 'CONNECTING', '连接中', '{\"color\": \"rgb(var(--green-6))\"}', 10, '2023-12-26 23:29:00', '2023-12-26 23:29:00', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (178, 28, 'hostConnectStatus', 'COMPLETE', '完成', '{\"color\": \"rgb(var(--blue-6))\"}', 20, '2023-12-26 23:29:15', '2023-12-26 23:29:15', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (179, 28, 'hostConnectStatus', 'FAILED', '失败', '{\"color\": \"rgb(var(--red-6))\"}', 30, '2023-12-26 23:29:34', '2023-12-26 23:29:34', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (180, 1, 'operatorLogModule', 'asset:host-terminal', '主机终端', '{}', 2050, '2023-12-27 18:42:39', '2023-12-27 18:42:39', '2', '2', 0);
|
||||
INSERT INTO `dict_value` VALUES (181, 2, 'operatorLogType', 'host-terminal:connect', '连接主机终端', '{}', 10, '2023-12-27 18:43:17', '2023-12-28 18:44:20', '2', '2', 0);
|
||||
INSERT INTO `dict_value` VALUES (182, 29, 'terminalConnectStatus', '0', '连接中', '{\"status\": \"normal\"}', 10, '2024-01-09 00:32:47', '2024-01-09 00:32:47', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (183, 29, 'terminalConnectStatus', '1', '已连接', '{\"status\": \"processing\"}', 20, '2024-01-09 00:32:59', '2024-01-09 00:32:59', '1', '1', 0);
|
||||
INSERT INTO `dict_value` VALUES (184, 29, 'terminalConnectStatus', '2', '已断开', '{\"status\": \"danger\"}', 30, '2024-01-09 00:33:09', '2024-01-09 00:37:35', '1', '1', 0);
|
||||
|
||||
Reference in New Issue
Block a user