diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index a758d1c38..4474093d3 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -652,6 +652,10 @@ }, "route": { "": "", + "CreateEndpoint": "Create endpoint", + "UpdateEndpoint": "Update endpoint", + "CreateEndpointRule": "Create endpoint rule", + "UpdateEndpointRule": "Update endpoint rule", "SystemSetting": "System setting", "Index": "Index", "Role": "Role", @@ -1436,6 +1440,8 @@ "License": "License", "LicenseDetail": "License detail", "ComponentMonitor": "System Monitor", + "Endpoint": "Endpoint", + "EndpointRule": "Endpoint rule", "ServiceRatio": "Service ratio", "LoadStatus":"Status", "NormalLoad":"Normal", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index 74548f200..43b7977a0 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -662,6 +662,10 @@ }, "route": { "": "", + "CreateEndpoint": "エンドポイントを作成する", + "UpdateEndpoint": "エンドポイントを更新", + "CreateEndpointRule": "エンドポイントルールを作成する", + "UpdateEndpointRule": "エンドポイントルールを更新する", "Index": "トップページ", "SystemSetting": "システム設定", "WorkBench": "作業台", @@ -1481,6 +1485,8 @@ "InterfaceSettings": "インターフェース設定", "License": "ライセンス", "ComponentMonitor": "コンポーネントモニタリング", + "Endpoint": "ターミナルエンドポイント", + "EndpointRule": "エンドポイントエンドポイントルール", "ServiceRatio": "コンポーネント負荷統計", "LoadStatus": "コンポーネントステータス", "NormalLoad": "正常", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 8178ff6de..329f905df 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -663,6 +663,10 @@ }, "route": { "": "", + "CreateEndpoint": "创建端点", + "UpdateEndpoint": "更新端点", + "CreateEndpointRule": "创建端点规则", + "UpdateEndpointRule": "更新端点规则", "Index": "首页", "SystemSetting": "系统设置", "WorkBench": "工作台", @@ -1482,6 +1486,8 @@ "InterfaceSettings": "界面设置", "License": "许可证", "ComponentMonitor": "组件监控", + "Endpoint": "终端节点", + "EndpointRule": "终端节点规则", "ServiceRatio": "组件负载统计", "LoadStatus":"组件状态", "NormalLoad":"正常", diff --git a/src/router/settings/index.js b/src/router/settings/index.js index 2737d11f9..ac9de5c95 100644 --- a/src/router/settings/index.js +++ b/src/router/settings/index.js @@ -152,6 +152,50 @@ export default { permissions: ['terminal.change_commandstorage'] }, hidden: true + }, + { + path: 'endpoint/create', + name: 'EndpointCreate', + component: () => import('@/views/settings/Terminal/Endpoint/EndpointCreateUpdate'), + meta: { + title: i18n.t('route.CreateEndpoint'), + activeMenu: '/settings/terminal', + permissions: ['terminal.add_endpoint'] + }, + hidden: true + }, + { + path: 'endpoint/:id/update', + name: 'EndpointUpdate', + component: () => import('@/views/settings/Terminal/Endpoint/EndpointCreateUpdate'), + meta: { + title: i18n.t('route.UpdateEndpoint'), + activeMenu: '/settings/terminal', + permissions: ['terminal.change_endpoint'] + }, + hidden: true + }, + { + path: 'endpoint-rule/create', + name: 'EndpointRuleCreate', + component: () => import('@/views/settings/Terminal/EndpointRule/EndpointRuleCreateUpdate'), + meta: { + title: i18n.t('route.CreateEndpointRule'), + activeMenu: '/settings/terminal', + permissions: ['terminal.add_endpointrule'] + }, + hidden: true + }, + { + path: 'endpoint-rule/:id/update', + name: 'EndpointRuleUpdate', + component: () => import('@/views/settings/Terminal/EndpointRule/EndpointRuleCreateUpdate'), + meta: { + title: i18n.t('route.UpdateEndpointRule'), + activeMenu: '/settings/terminal', + permissions: ['terminal.change_endpointrule'] + }, + hidden: true } ] }, diff --git a/src/views/settings/Terminal/Base.vue b/src/views/settings/Terminal/Base.vue index 415ef4f35..02664cf36 100644 --- a/src/views/settings/Terminal/Base.vue +++ b/src/views/settings/Terminal/Base.vue @@ -21,21 +21,20 @@ export default { `SSH ${comp}(KoKo)`, [ 'TERMINAL_PASSWORD_AUTH', 'TERMINAL_PUBLIC_KEY_AUTH', - 'TERMINAL_ASSET_LIST_SORT_BY', 'TERMINAL_KOKO_HOST', 'TERMINAL_KOKO_SSH_PORT', + 'TERMINAL_ASSET_LIST_SORT_BY', 'TERMINAL_ASSET_LIST_PAGE_SIZE', 'TERMINAL_TELNET_REGEX' ] ], [ `RDP ${comp}(XRDP)`, [ - 'XRDP_ENABLED', 'TERMINAL_RDP_ADDR' + 'XRDP_ENABLED' ] ], [ `DB ${comp}(Magnus)`, [ - 'TERMINAL_MAGNUS_ENABLED', 'TERMINAL_MAGNUS_HOST', 'TERMINAL_MAGNUS_MYSQL_PORT', - 'TERMINAL_MAGNUS_POSTGRE_PORT', 'TERMINAL_MAGNUS_MARIADB_PORT' + 'TERMINAL_MAGNUS_ENABLED' ] ] ], @@ -43,11 +42,6 @@ export default { TERMINAL_TELNET_REGEX: { type: 'input' }, - TERMINAL_RDP_ADDR: { - hidden: () => { - return !this.$store.getters.hasValidLicense - } - }, XRDP_ENABLED: { hidden: () => { return !this.$store.getters.hasValidLicense diff --git a/src/views/settings/Terminal/Endpoint/EndpointCreateUpdate.vue b/src/views/settings/Terminal/Endpoint/EndpointCreateUpdate.vue new file mode 100644 index 000000000..394788c11 --- /dev/null +++ b/src/views/settings/Terminal/Endpoint/EndpointCreateUpdate.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/src/views/settings/Terminal/Endpoint/EndpointList.vue b/src/views/settings/Terminal/Endpoint/EndpointList.vue new file mode 100644 index 000000000..467726a82 --- /dev/null +++ b/src/views/settings/Terminal/Endpoint/EndpointList.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/src/views/settings/Terminal/EndpointRule/EndpointRuleCreateUpdate.vue b/src/views/settings/Terminal/EndpointRule/EndpointRuleCreateUpdate.vue new file mode 100644 index 000000000..1a666e6d0 --- /dev/null +++ b/src/views/settings/Terminal/EndpointRule/EndpointRuleCreateUpdate.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/src/views/settings/Terminal/EndpointRule/EndpointRuleList.vue b/src/views/settings/Terminal/EndpointRule/EndpointRuleList.vue new file mode 100644 index 000000000..7b2e7599d --- /dev/null +++ b/src/views/settings/Terminal/EndpointRule/EndpointRuleList.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/src/views/settings/Terminal/index.vue b/src/views/settings/Terminal/index.vue index f4c86336e..03c5340bd 100644 --- a/src/views/settings/Terminal/index.vue +++ b/src/views/settings/Terminal/index.vue @@ -13,6 +13,8 @@ import TerminalList from './TerminalList' import ReplayStorage from './Storage/ReplayStorage' import CommandStorage from './Storage/CommandStorage' import Monitor from './Monitor' +import EndpointList from './Endpoint/EndpointList' +import EndpointRuleList from './EndpointRule/EndpointRuleList' export default { components: { @@ -21,7 +23,9 @@ export default { Monitor, TerminalList, ReplayStorage, - CommandStorage + CommandStorage, + EndpointList, + EndpointRuleList }, data() { return { @@ -53,6 +57,20 @@ export default { hidden: () => { return !(this.$hasPerm('terminal.view_status') && this.$store.getters.hasValidLicense) } + }, + { + title: this.$t('xpack.Endpoint'), + name: 'EndpointList', + hidden: () => { + return !this.$hasPerm('terminal.view_endpoint') + } + }, + { + title: this.$t('xpack.EndpointRule'), + name: 'EndpointRuleList', + hidden: () => { + return !this.$hasPerm('terminal.view_endpointrule') + } } ] }