refactor: 修改权限规范.

This commit is contained in:
lijiahang
2023-12-27 15:09:23 +08:00
parent 6fdd29b3fe
commit fda6085cc8
18 changed files with 118 additions and 65 deletions

View File

@@ -72,15 +72,15 @@ public class ServerTemplate extends Template {
return this;
}
/**
* 生成导出
*
* @return this
*/
public ServerTemplate enableExport() {
table.enableExport = false;
return this;
}
// /**
// * 生成导出
// *
// * @return this
// */
// public ServerTemplate enableExport() {
// table.enableExport = true;
// return this;
// }
/**
* 不生成单元测试

View File

@@ -25,6 +25,8 @@ VALUES
(@TMP_SUB_ID, '查询$table.comment', '${package.ModuleName}:${typeHyphen}:query', 3, 10),
(@TMP_SUB_ID, '创建$table.comment', '${package.ModuleName}:${typeHyphen}:create', 3, 20),
(@TMP_SUB_ID, '修改$table.comment', '${package.ModuleName}:${typeHyphen}:update', 3, 30),
(@TMP_SUB_ID, '删除$table.comment', '${package.ModuleName}:${typeHyphen}:delete', 3, 40),
(@TMP_SUB_ID, '删除$table.comment', '${package.ModuleName}:${typeHyphen}:delete', 3, 40);
#if(false)
(@TMP_SUB_ID, '导出$table.comment', '${package.ModuleName}:${typeHyphen}:export', 3, 50),
(@TMP_SUB_ID, '导入$table.comment', '${package.ModuleName}:${typeHyphen}:import', 3, 60);
#end

View File

@@ -47,10 +47,5 @@ public class HostConnectLogController {
return hostConnectLogService.getHostConnectLogPage(request);
}
// FIXME management 菜单一键全选
// 前端选择
// 前端用户
// sql 元数据/菜单
}

View File

@@ -75,7 +75,7 @@ public class DictKeyController {
@PutMapping("/refresh-cache")
@Operation(summary = "刷新字典缓存")
@PreAuthorize("@ss.hasPermission('infra:dict-key:refresh-cache')")
@PreAuthorize("@ss.hasPermission('infra:dict-key:management:refresh-cache')")
public HttpWrapper<?> refreshCache() {
dictKeyService.refreshCache();
return HttpWrapper.ok();

View File

@@ -14,4 +14,9 @@ Authorization: {{token}}
"endTime": ""
}
### 查询登录日志
GET {{baseUrl}}/infra/operator-log/login-history?username=admin
Content-Type: application/json
Authorization: {{token}}
###

View File

@@ -50,7 +50,7 @@ public class OperatorLogController {
@IgnoreLog(IgnoreLogMode.RET)
@GetMapping("/login-history")
@Operation(summary = "查询用户登录日志")
@PreAuthorize("@ss.hasPermission('infra:operator-log:query')")
@PreAuthorize("@ss.hasPermission('infra:system-user:login-history')")
public List<LoginHistoryVO> getLoginHistory(@RequestParam("username") String username) {
return operatorLogService.getLoginHistory(username);
}

View File

@@ -41,7 +41,7 @@ public class PermissionController {
@PutMapping("/refresh-cache")
@Operation(summary = "刷新角色权限缓存")
@PreAuthorize("@ss.hasPermission('infra:system-menu:refresh-cache')")
@PreAuthorize("@ss.hasPermission('infra:system-menu:management:refresh-cache')")
public HttpWrapper<?> refreshCache() {
permissionService.initPermissionCache();
return HttpWrapper.ok();

View File

@@ -94,7 +94,7 @@ public class SystemUserController {
@OperatorLog(SystemUserOperatorType.RESET_PASSWORD)
@PutMapping("/reset-password")
@Operation(summary = "重置用户密码")
@PreAuthorize("@ss.hasPermission('infra:system-user:reset-password')")
@PreAuthorize("@ss.hasPermission('infra:system-user:management:reset-password')")
public HttpWrapper<?> resetUserPassword(@Validated @RequestBody UserResetPasswordRequest request) {
systemUserService.resetPassword(request);
return HttpWrapper.ok();
@@ -153,7 +153,7 @@ public class SystemUserController {
@OperatorLog(SystemUserOperatorType.OFFLINE)
@PutMapping("/session/offline")
@Operation(summary = "下线用户会话")
@PreAuthorize("@ss.hasPermission('infra:system-user:offline-session')")
@PreAuthorize("@ss.hasPermission('infra:system-user:management:offline-session')")
public HttpWrapper<?> offlineUserSession(@Validated @RequestBody UserSessionOfflineRequest request) {
systemUserManagementService.offlineUserSession(request);
return HttpWrapper.ok();

View File

@@ -8,7 +8,7 @@
</tr>
</thead>
<tbody>
<a-checkbox-group v-model="checkedKeys" style="display: contents">
<a-checkbox-group v-model="checkedKeys" style="display: contents;">
<template v-for="parentMenu in menuData" :key="parentMenu.id">
<template v-for="(childrenMenu, index) in parentMenu.children" :key="childrenMenu.id">
<tr>
@@ -79,13 +79,13 @@
};
// 通过规则 选择/取消选择
const checkOrUncheckByRule = (rule: undefined | ((s: string) => boolean), check: boolean) => {
const checkOrUncheckByFilter = (filter: undefined | ((perm: string) => boolean), check: boolean) => {
unTriggerChange.value = true;
const nodes: Array<MenuQueryResponse> = [];
flatNodes(menuData.value, nodes);
if (rule) {
if (filter) {
const ruleNodes = nodes.filter(s => s.permission)
.filter(s => rule(s?.permission))
.filter(s => filter(s?.permission))
.map(s => s.id)
.filter(Boolean);
if (check) {
@@ -106,7 +106,7 @@
}
};
defineExpose({ init, getValue, checkOrUncheckByRule });
defineExpose({ init, getValue, checkOrUncheckByFilter });
// 监听级联变化
watch(checkedKeys, (after: Array<number>, before: Array<number>) => {
@@ -170,6 +170,7 @@
tbody {
td {
padding: 6px 16px;
border: 1px solid var(--color-fill-3);
}
}
}

View File

@@ -44,7 +44,7 @@
type="warning"
@ok="doRefreshCache">
<a-button type="primary" status="warning"
v-permission="['infra:dict-key:refresh-cache']">
v-permission="['infra:dict-key:management:refresh-cache']">
刷新缓存
<template #icon>
<icon-sync />

View File

@@ -67,7 +67,7 @@
type="warning"
@ok="doRefreshCache">
<a-button type="primary" status="warning"
v-permission="['infra:system-menu:refresh-cache']">
v-permission="['infra:system-menu:management:refresh-cache']">
刷新缓存
<template #icon>
<icon-sync />

View File

@@ -33,7 +33,7 @@
<span>{{ item.address }}</span>
<span>{{ item.location }}</span>
<a-tag v-if="item.current" color="arcoblue">当前会话</a-tag>
<a-button v-else-if="hasPermission('infra:system-user:offline-session')"
<a-button v-else-if="!user || hasPermission('infra:system-user:management:offline-session')"
style="font-weight: 600;"
type="text"
size="mini"
@@ -76,7 +76,7 @@
import { isMobile } from '@/utils/is';
import { Message } from '@arco-design/web-vue';
import usePermission from '@/hooks/permission';
import { getUserSessionList } from '@/api/user/user';
import { getUserSessionList, offlineUserSession } from '@/api/user/user';
const props = defineProps({
user: Object as PropType<UserQueryResponse>,
@@ -91,9 +91,18 @@
const offline = async (item: UserSessionQueryResponse) => {
try {
setLoading(true);
await offlineCurrentUserSession({
timestamp: item.loginTime
});
if (props.user) {
// 下线其他用户
await offlineUserSession({
userId: props.user?.id,
timestamp: item.loginTime
});
} else {
// 下线当前用户
await offlineCurrentUserSession({
timestamp: item.loginTime
});
}
Message.success('操作成功');
item.visible = false;
} catch (e) {

View File

@@ -14,7 +14,7 @@
</a-tab-pane>
<!-- 登录日志 -->
<a-tab-pane key="loginHistory"
v-if="!user || hasPermission('infra:operator-log:query')"
v-if="!user || hasPermission('infra:system-user:login-history')"
title="登录日志">
<login-history :user="user" />
</a-tab-pane>
@@ -48,8 +48,6 @@
</script>
<script lang="ts" setup>
import UserBaseInfo from './components/user-base-info.vue';
import LoginHistory from './components/login-history.vue';
import UserSession from './components/user-session.vue';
import OperatorLogList from './components/operator-log-list.vue';
import { useRoute, useRouter } from 'vue-router';
@@ -57,6 +55,8 @@
import usePermission from '@/hooks/permission';
import { useUserStore } from '@/store';
import { getUser, UserQueryResponse } from '@/api/user/user';
import UserBaseInfo from './components/user-base-info.vue';
import LoginHistory from './components/login-history.vue';
const route = useRoute();
const router = useRouter();

View File

@@ -5,7 +5,7 @@
title="分配菜单"
width="80%"
:top="40"
:body-style="{padding: '16px 16px 0 16px', 'margin-bottom': '16px'}"
:body-style="{ padding: '16px 16px 0 16px', 'margin-bottom': '16px' }"
:align-center="false"
:draggable="true"
:mask-closable="false"
@@ -22,18 +22,22 @@
</a-alert>
<div class="usn mb8">
<a-space>
<a-tag color="arcoblue">全选操作</a-tag>
<!-- 全选操作 -->
<template v-for="opt of quickGrantMenuOperator" :key="opt.name">
<a-button size="mini" type="text" @click="() => { table.checkOrUncheckByRule(opt.rule, true) }">
{{ '全选' + opt.name }}
<a-button size="mini" type="text" @click="() => { table.checkOrUncheckByFilter(opt.filter, true) }">
{{ opt.name }}
</a-button>
</template>
</a-space>
</div>
<div class="usn mb8">
<a-space>
<a-tag color="arcoblue">反选操作</a-tag>
<!-- 反选操作 -->
<template v-for="opt of quickGrantMenuOperator" :key="opt.name">
<a-button size="mini" type="text" @click="() => { table.checkOrUncheckByRule(opt.rule, false) }">
{{ '反选' + opt.name }}
<a-button size="mini" type="text" @click="() => { table.checkOrUncheckByFilter(opt.filter, false) }">
{{ opt.name }}
</a-button>
</template>
</a-space>
@@ -124,5 +128,4 @@
width: 100%;
max-height: calc(100vh - 230px);
}
</style>

View File

@@ -17,47 +17,47 @@ const standardWrite = [...addType, ...updateType];
// 快速分配菜单操作
export const quickGrantMenuOperator = [
{
name: '',
rule: undefined
name: '全部',
filter: undefined
}, {
name: '常规读操作',
rule: (perm: string) => {
name: '常规读',
filter: (perm: string) => {
return !!standardRead.find(s => perm.includes(s));
}
}, {
name: '常规写操作',
rule: (perm: string) => {
name: '常规写',
filter: (perm: string) => {
return !!standardWrite.find(s => perm.includes(s));
}
}, {
name: '查询',
rule: (perm: string) => {
filter: (perm: string) => {
return !!queryType.find(s => perm.includes(s));
}
}, {
name: '新增',
rule: (perm: string) => {
filter: (perm: string) => {
return !!addType.find(s => perm.includes(s));
}
}, {
name: '修改',
rule: (perm: string) => {
filter: (perm: string) => {
return !!updateType.find(s => perm.includes(s));
}
}, {
name: '删除',
rule: (perm: string) => {
filter: (perm: string) => {
return !!deleteType.find(s => perm.includes(s));
}
}, {
name: '导入',
rule: (perm: string) => {
return perm.includes('import');
name: '管理',
filter: (perm: string) => {
return perm.includes('management');
}
}, {
name: '导出',
rule: (perm: string) => {
return perm.includes('export');
name: '授权',
filter: (perm: string) => {
return perm.includes('grant');
}
},
];

View File

@@ -120,7 +120,7 @@
<a-button type="text"
size="mini"
:disabled="record.id === userStore.id"
v-permission="['infra:system-user:reset-password']"
v-permission="['infra:system-user:management:reset-password']"
@click="emits('openResetPassword', record)">
重置密码
</a-button>

View File

@@ -309,6 +309,37 @@ CREATE TABLE `host_config`
COLLATE = utf8mb4_general_ci COMMENT = '主机配置'
ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for host_connect_log
-- ----------------------------
DROP TABLE IF EXISTS `host_connect_log`;
CREATE TABLE `host_connect_log`
(
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
`user_id` bigint(0) NULL DEFAULT NULL COMMENT '用户id',
`username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
`host_id` bigint(0) NULL DEFAULT NULL COMMENT '主机id',
`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 '状态',
`start_time` datetime(0) NULL DEFAULT NULL COMMENT '开始时间',
`end_time` datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
`extra_info` json 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 '修改时间',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '是否删除 0未删除 1已删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_user_id` (`user_id`) USING BTREE,
INDEX `idx_host_type` (`host_id`, `type`) USING BTREE,
INDEX `idx_token` (`token`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 1
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '主机连接日志'
ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for host_identity
-- ----------------------------

View File

@@ -33,24 +33,22 @@ INSERT INTO `system_menu` VALUES (49, 48, '创建用户', 'infra:system-user:cre
INSERT INTO `system_menu` VALUES (50, 48, '修改用户', 'infra:system-user:update', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 10:19:24', '2023-10-27 01:20:46', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (51, 48, '查询用户', 'infra:system-user:query', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 10:19:24', '2023-10-27 01:20:46', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (52, 48, '删除用户', 'infra:system-user:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 10:19:24', '2023-10-27 01:20:46', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (53, 13, '刷新缓存', 'infra:system-menu:refresh-cache', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 10:29:10', '2023-10-27 15:52:13', '1', '1', 0);
INSERT INTO `system_menu` VALUES (53, 13, '刷新缓存', 'infra:system-menu:management:refresh-cache', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 10:29:10', '2023-12-27 12:39:48', '1', '1', 0);
INSERT INTO `system_menu` VALUES (60, 48, '修改用户状态', 'infra:system-user:update-status', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 11:49:04', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (61, 48, '分配用户角色', 'infra:system-user:grant-role', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 11:49:23', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (62, 48, '重置用户密码', 'infra:system-user:reset-password', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 11:49:50', '2023-10-27 01:20:46', '1', '1', 0);
INSERT INTO `system_menu` VALUES (62, 48, '重置用户密码', 'infra:system-user:management:reset-password', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-08-16 11:49:50', '2023-12-27 12:42:10', '1', '1', 0);
INSERT INTO `system_menu` VALUES (63, 0, '资产管理', NULL, 1, 300, 1, 1, 1, 0, 'IconStorage', NULL, 'asset', '2023-09-11 14:17:31', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (64, 63, '主机管理', NULL, 2, 40, 1, 1, 1, 0, 'IconDesktop', NULL, 'assetHostList', '2023-09-11 14:17:31', '2023-11-30 23:56:21', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (65, 64, '查询主机', 'asset:host:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-11 14:17:31', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (66, 64, '创建主机', 'asset:host:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-11 14:17:31', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (67, 64, '修改主机', 'asset:host:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-11 14:17:31', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (68, 64, '删除主机', 'asset:host:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-11 14:17:31', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (69, 64, '导出主机', 'asset:host:export', 3, 50, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-11 14:17:31', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (70, 64, '修改配置', 'asset:host:update-config', 3, 60, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-14 16:27:18', '2023-10-27 01:15:14', '1', '1', 0);
INSERT INTO `system_menu` VALUES (72, 63, '主机身份', NULL, 2, 60, 1, 1, 1, 0, 'IconIdcard', NULL, 'assetHostIdentity', '2023-09-20 11:47:18', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (73, 72, '查询主机身份', 'asset:host-identity:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (74, 72, '创建主机身份', 'asset:host-identity:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (75, 72, '修改主机身份', 'asset:host-identity:update', 3, 30, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (76, 72, '删除主机身份', 'asset:host-identity:delete', 3, 40, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (77, 72, '导出主机身份', 'asset:host-identity:export', 3, 50, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (79, 63, '主机秘钥', NULL, 2, 50, 1, 1, 1, 0, 'IconLock', NULL, 'assetHostKey', '2023-09-20 11:47:18', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (80, 79, '查询主机秘钥', 'asset:host-key:query', 3, 10, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', NULL, '1', 0);
INSERT INTO `system_menu` VALUES (81, 79, '创建主机秘钥', 'asset:host-key:create', 3, 20, 1, 1, 1, 0, NULL, NULL, NULL, '2023-09-20 11:47:18', '2023-10-27 01:15:14', NULL, '1', 0);
@@ -68,11 +66,12 @@ INSERT INTO `system_menu` VALUES (107, 105, '创建字典配置值', 'infra:dict
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:create', 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 (121, 97, '刷新缓存', 'infra:dict-key:refresh-cache', 3, 140, 1, 1, 1, 0, NULL, NULL, NULL, '2023-10-27 15:50:04', '2023-10-27 15:54:36', '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:offline-session', 3, 60, 1, 1, 1, 0, NULL, NULL, NULL, '2023-11-02 11:24:37', '2023-11-02 11:24:37', '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 (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);
@@ -80,6 +79,8 @@ INSERT INTO `system_menu` VALUES (143, 144, '主机身份授权', 'asset:host-id
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 (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 (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 `dict_key` VALUES (1, 'operatorLogModule', 'STRING', '[]', '操作日志模块', '2023-10-21 02:04:22', '2023-10-30 14:11:38', '1', '1', 0);
@@ -102,6 +103,8 @@ INSERT INTO `dict_key` VALUES (23, 'terminalFontWeight', 'STRING', '[]', '终端
INSERT INTO `dict_key` VALUES (24, 'terminalCursorStyle', 'STRING', '[]', '终端光标样式', '2023-12-11 18:24:47', '2023-12-11 18:26:11', '1', '1', 0);
INSERT INTO `dict_key` VALUES (25, 'terminalNewConnectionType', 'STRING', '[]', '终端新建连接类型', '2023-12-14 17:24:19', '2023-12-14 17:24:19', '1', '1', 0);
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_value` VALUES (3, 4, 'systemMenuType', '1', '父菜单', '{}', 10, '2023-10-26 15:58:59', '2023-10-26 15:58:59', '1', '1', 0);
@@ -127,7 +130,7 @@ INSERT INTO `dict_value` VALUES (22, 11, 'hostSshAuthType', 'PASSWORD', '密码
INSERT INTO `dict_value` VALUES (23, 11, 'hostSshAuthType', 'KEY', '秘钥验证', '{}', 20, '2023-10-27 14:29:35', '2023-12-25 15:40:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (24, 11, 'hostSshAuthType', 'IDENTITY', '身份验证', '{}', 30, '2023-10-27 14:29:42', '2023-12-25 15:40:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (55, 1, 'operatorLogModule', 'infra:authentication', '身份认证', '{}', 1000, '2023-10-31 10:47:48', '2023-10-31 10:55:12', '1', '1', 0);
INSERT INTO `dict_value` VALUES (56, 1, 'operatorLogModule', 'i nfra:system-user', '系统用户', '{}', 1010, '2023-10-31 10:47:51', '2023-10-31 11:00:59', '1', '1', 0);
INSERT INTO `dict_value` VALUES (56, 1, 'operatorLogModule', 'infra:system-user', '系统用户', '{}', 1010, '2023-10-31 10:47:51', '2023-10-31 11:00:59', '1', '1', 0);
INSERT INTO `dict_value` VALUES (57, 1, 'operatorLogModule', 'infra:system-role', '系统角色', '{}', 1020, '2023-10-31 10:47:52', '2023-10-31 10:54:59', '1', '1', 0);
INSERT INTO `dict_value` VALUES (58, 1, 'operatorLogModule', 'infra:system-menu', '系统菜单', '{}', 1030, '2023-10-31 10:47:53', '2023-10-31 10:54:51', '1', '1', 0);
INSERT INTO `dict_value` VALUES (59, 1, 'operatorLogModule', 'infra:dict-key', '字典配置项', '{}', 1040, '2023-10-31 10:48:03', '2023-10-31 10:54:44', '1', '1', 0);
@@ -232,3 +235,7 @@ INSERT INTO `dict_value` VALUES (172, 25, 'terminalNewConnectionType', 'latest',
INSERT INTO `dict_value` VALUES (173, 26, 'hostExtraSshAuthType', 'DEFAULT', '主机默认配置', '{}', 10, '2023-12-25 15:48:26', '2023-12-25 15:48:26', '1', '1', 0);
INSERT INTO `dict_value` VALUES (174, 26, 'hostExtraSshAuthType', 'CUSTOM_KEY', '自定义秘钥', '{}', 20, '2023-12-25 15:48:42', '2023-12-25 16:05:36', '1', '1', 0);
INSERT INTO `dict_value` VALUES (175, 26, 'hostExtraSshAuthType', 'CUSTOM_IDENTITY', '自定义身份', '{}', 30, '2023-12-25 15:48:52', '2023-12-25 16:05:31', '1', '1', 0);
INSERT INTO `dict_value` VALUES (176, 27, 'hostConnectType', 'SSH', 'SSH', '{}', 10, '2023-12-26 23:23:18', '2023-12-26 23:23:18', '1', '1', 0);
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);