From 92620510da84d0fb302f9ba01a20ccbbff896842 Mon Sep 17 00:00:00 2001 From: Michael Bai Date: Fri, 5 Nov 2021 11:44:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E8=87=B3=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/cn.json | 2 + src/i18n/langs/en.json | 4 +- .../SystemUserDetail/SwitchToUserList.vue | 73 +++++++++++++++++++ .../SystemUser/SystemUserDetail/index.vue | 11 ++- 4 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 src/views/assets/SystemUser/SystemUserDetail/SwitchToUserList.vue diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index f502019e8..c19a9a21d 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -157,6 +157,8 @@ "NoInputCommand": "未输入命令", "NoSystemUserWasSelected": "未选择系统用户", "Node": "节点", + "SwitchUser": "切换用户", + "SwitchToUserList": "切换至用户", "NodeInformation": "节点信息", "OnlyLatestVersion": "仅最新版本", "Os": "操作系统", diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index f12546615..f8588b205 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -155,6 +155,8 @@ "NoInputCommand": "No input command", "NoSystemUserWasSelected": "No system user was selected", "Node": "Node", + "SwitchUser": "Switch user", + "SwitchToUserList": "Switch to user", "NodeInformation": "Node information", "OnlyLatestVersion": "Only latest version", "Os": "Os", @@ -459,7 +461,7 @@ "WeekCronSelect": { "Monday": "Monday", "Tuesday": "Tuesday", - "Wednesday": "Wednesday", + "Wednesday": "Wednesday", "Thursday": "Thursday", "Friday": "Friday", "Saturday": "Saturday", diff --git a/src/views/assets/SystemUser/SystemUserDetail/SwitchToUserList.vue b/src/views/assets/SystemUser/SystemUserDetail/SwitchToUserList.vue new file mode 100644 index 000000000..1f4f5ee8c --- /dev/null +++ b/src/views/assets/SystemUser/SystemUserDetail/SwitchToUserList.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/src/views/assets/SystemUser/SystemUserDetail/index.vue b/src/views/assets/SystemUser/SystemUserDetail/index.vue index 021b1c6a1..1335c72be 100644 --- a/src/views/assets/SystemUser/SystemUserDetail/index.vue +++ b/src/views/assets/SystemUser/SystemUserDetail/index.vue @@ -13,6 +13,7 @@ import AssetList from './AssetList.vue' import AccountList from './AccountList.vue' import AppList from './AppList' import AppAccountList from './AppAccountList' +import SwitchToUserList from './SwitchToUserList' export default { components: { @@ -22,7 +23,8 @@ export default { AssetList, AccountList, AppList, - AppAccountList + AppAccountList, + SwitchToUserList }, data() { const vm = this @@ -62,6 +64,13 @@ export default { hidden: () => { return vm.systemUser['is_asset_protocol'] } + }, + { + title: this.$t('assets.SwitchToUserList'), + name: 'SwitchToUserList', + hidden: () => { + return vm.systemUser['protocol'] !== 'ssh' + } } ], hasRightSide: true,