From 4d747686cd0e56a769a1991665dd78b53d4d73cc Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 17 May 2021 14:24:21 +0800 Subject: [PATCH 01/20] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=B5=84?= =?UTF-8?q?=E4=BA=A7=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=EF=BC=8CtoLowerCa?= =?UTF-8?q?se=20=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/TabPage/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layout/components/TabPage/index.vue b/src/layout/components/TabPage/index.vue index 839771208..4488cbeb4 100644 --- a/src/layout/components/TabPage/index.vue +++ b/src/layout/components/TabPage/index.vue @@ -89,7 +89,7 @@ export default { for (const preTab of preActiveTabs) { for (const tabName in this.tabIndices) { - if (preTab.toLowerCase() === tabName.toLowerCase()) { + if (preTab && tabName && preTab.toLowerCase() === tabName.toLowerCase()) { return tabName } } From e7815f528c6a8352fd4e6ec4c0a5396bacaa562f Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 17 May 2021 11:04:04 +0800 Subject: [PATCH 02/20] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=94=A8=E6=88=B7=E8=AF=A6=E6=83=85=E4=B8=AD=EF=BC=8C?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=9B=B4=E5=A4=9A=E6=93=8D=E4=BD=9C=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/assets/SystemUser/SystemUserDetail/AssetList.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/views/assets/SystemUser/SystemUserDetail/AssetList.vue b/src/views/assets/SystemUser/SystemUserDetail/AssetList.vue index 2058016ac..5e9d54c66 100644 --- a/src/views/assets/SystemUser/SystemUserDetail/AssetList.vue +++ b/src/views/assets/SystemUser/SystemUserDetail/AssetList.vue @@ -91,15 +91,9 @@ export default { ] }, headerActions: { - hasLeftActions: true, hasBulkDelete: false, hasImport: false, - hasExport: true, hasCreate: false, - hasSearch: true, - hasMoreActions: false, - moreActionsTitle: this.$t('common.More'), - moreActionsType: 'primary', extraMoreActions: [ { title: this.$t('common.PushSelected'), From 31e46a3ede0a05923dffa8731e612f6784ad46ab Mon Sep 17 00:00:00 2001 From: xinwen Date: Mon, 17 May 2021 14:32:17 +0800 Subject: [PATCH 03/20] fix: oauth2 i18n --- src/i18n/langs/cn.json | 2 +- src/i18n/langs/en.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index 02a2ba2d0..723752b1c 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -269,7 +269,7 @@ "MFAConfirm": "MFA 认证", "MFARequireForSecurity": "为了安全请输入MFA", "PasswordConfirm": "密码认证", - "PasswordRequireForSecurity": "为了安全请输入MFA", + "PasswordRequireForSecurity": "为了安全请输入密码", "Members": "成员", "More": "更多", "Message": "消息", diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index c85042a1d..c0bde9543 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -265,8 +265,8 @@ "Info": "Info", "MFAConfirm": "MFA Confirm", "MFARequireForSecurity": "MFA required for security", - "PasswordConfirm": "MFA Confirm", - "PasswordRequireForSecurity": "MFA required for security", + "PasswordConfirm": "Password Confirm", + "PasswordRequireForSecurity": "Password required for security", "Members": "Members", "More": "More", "Message": "Message", From 35814d3d5c0695167c566fb5a3d67c45a28826b6 Mon Sep 17 00:00:00 2001 From: Bai Date: Mon, 17 May 2021 14:59:11 +0800 Subject: [PATCH 04/20] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=9B=91=E6=8E=A7=E7=BB=84=E4=BB=B6=E5=90=8D=E7=A7=B0?= =?UTF-8?q?(lion)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xpack/SystemMonitor/component/MonitorCard.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/xpack/SystemMonitor/component/MonitorCard.vue b/src/views/xpack/SystemMonitor/component/MonitorCard.vue index 3cd23cc29..45c5d59a3 100644 --- a/src/views/xpack/SystemMonitor/component/MonitorCard.vue +++ b/src/views/xpack/SystemMonitor/component/MonitorCard.vue @@ -70,7 +70,7 @@ export default { components: { }, props: { - // koko/guacamole/omnidb/core + // koko/guacamole/omnidb/lion/core type: { type: String, default: 'koko', @@ -86,7 +86,8 @@ export default { const nameMapper = { koko: 'KoKo', guacamole: 'Guacamole', - omnidb: 'OmniDB' + omnidb: 'OmniDB', + lion: 'Lion' } return nameMapper[this.componentMetric.type] } From 552b26e163b031d9702c3c7c459545dce1bba2dc Mon Sep 17 00:00:00 2001 From: Bai Date: Mon, 17 May 2021 15:45:10 +0800 Subject: [PATCH 05/20] =?UTF-8?q?fix:=20=E7=94=B3=E8=AF=B7=E8=B5=84?= =?UTF-8?q?=E4=BA=A7=E8=AF=A6=E6=83=85=E6=B7=BB=E5=8A=A0=20action=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/cn.json | 1 + src/i18n/langs/en.json | 1 + .../RequestAssetPerm/Detail/TicketDetail.vue | 16 ++++++++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index 723752b1c..75148414a 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -859,6 +859,7 @@ "setting": "设置" }, "tickets": { + "PermissionName": "授权规则名称", "Accept": "同意", "AssignedMe": "待我审批", "Assignee": "处理人", diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index c0bde9543..d0f0e651d 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -855,6 +855,7 @@ }, "tickets": { + "PermissionName": "Permission name", "Accept": "Accept", "AssignedMe": "Assigned me", "Assignee": "Assignee", diff --git a/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue b/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue index b22e4567e..560edb569 100644 --- a/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue +++ b/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue @@ -154,6 +154,10 @@ export default { key: this.$t('tickets.SystemUser'), value: this.object.meta.apply_system_user_group.toString() }, + { + key: this.$t('assets.Action'), + value: this.object.meta.apply_actions_display.toString() + }, { key: this.$t('common.dateStart'), value: toSafeLocalDateStr(this.object.meta.apply_date_start) @@ -166,13 +170,21 @@ export default { }, assignedCardItems() { return [ + { + key: this.$t('tickets.PermissionName'), + value: this.object.meta.approve_permission_name + }, { key: this.$t('assets.Asset'), - value: this.object.meta.approve_assets_display + value: this.object.meta.approve_assets_display.toString() }, { key: this.$t('tickets.SystemUser'), - value: this.object.meta.approve_system_users_display + value: this.object.meta.approve_system_users_display.toString() + }, + { + key: this.$t('assets.Action'), + value: this.object.meta.approve_actions_display.toString() }, { key: this.$t('common.dateStart'), From d01e9918859cdf395e98e518d9964811be20fa08 Mon Sep 17 00:00:00 2001 From: Bai Date: Mon, 17 May 2021 15:51:46 +0800 Subject: [PATCH 06/20] =?UTF-8?q?fix:=20=E7=94=B3=E8=AF=B7=E8=B5=84?= =?UTF-8?q?=E4=BA=A7=E5=B7=A5=E5=8D=95=E8=AF=A6=E6=83=85=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=B5=84=E4=BA=A7=E6=8E=88=E6=9D=83=E8=AF=A6=E6=83=85=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue b/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue index 560edb569..671569467 100644 --- a/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue +++ b/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue @@ -169,10 +169,15 @@ export default { ] }, assignedCardItems() { + const vm = this return [ { key: this.$t('tickets.PermissionName'), - value: this.object.meta.approve_permission_name + value: this.object.meta.approve_permission_name, + formatter: function(item, value) { + const to = { name: 'AssetPermissionDetail', params: { id: vm.object.id }} + return { value } + } }, { key: this.$t('assets.Asset'), From 5b6e2970bfdea73ba26538a47d9c5f1003d73e01 Mon Sep 17 00:00:00 2001 From: Bai Date: Mon, 17 May 2021 16:34:52 +0800 Subject: [PATCH 07/20] =?UTF-8?q?fix:=20=E5=8E=BB=E6=8E=89RemoteApp?= =?UTF-8?q?=E7=9A=84=E5=AF=BC=E5=85=A5/=E5=AF=BC=E5=87=BA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/applications/RemoteApp/RemoteAppList.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/applications/RemoteApp/RemoteAppList.vue b/src/views/applications/RemoteApp/RemoteAppList.vue index 7752559e6..ecb752d9f 100644 --- a/src/views/applications/RemoteApp/RemoteAppList.vue +++ b/src/views/applications/RemoteApp/RemoteAppList.vue @@ -64,6 +64,8 @@ export default { hasCreate: false, hasMoreActions: false, hasBulkDelete: false, + hasExport: false, + hasImport: false, // createRoute: 'RemoteAppCreate', moreCreates: { dropdown: this.getCreateAppType(), From 0b821ffc0423b0fe2d8a49540f6bd312c0a5ab0e Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 17 May 2021 16:51:40 +0800 Subject: [PATCH 08/20] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96profile?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/userviews/users/UserProfile/SSHUpdate.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/userviews/users/UserProfile/SSHUpdate.vue b/src/userviews/users/UserProfile/SSHUpdate.vue index e238ee257..7e5fa9a23 100644 --- a/src/userviews/users/UserProfile/SSHUpdate.vue +++ b/src/userviews/users/UserProfile/SSHUpdate.vue @@ -38,7 +38,7 @@ export default { ], fieldsMeta: { public_key_comment: { - label: this.$t('users.Name'), + label: this.$t('common.Name'), disabled: true }, public_key_hash_md5: { From ebb8af42f2e40acd06ecf97a9563bc9242df8a27 Mon Sep 17 00:00:00 2001 From: xinwen Date: Mon, 17 May 2021 14:32:17 +0800 Subject: [PATCH 09/20] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1&=E9=92=89?= =?UTF-8?q?=E9=92=89=E7=9A=84=E4=B8=80=E4=BA=9B=E9=97=AE=E9=A2=98?= 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 | 2 ++ src/views/settings/DingTalk.vue | 17 +++++++++++++++++ src/views/settings/WeCom.vue | 17 +++++++++++++++++ 4 files changed, 38 insertions(+) diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index 75148414a..f46a24d96 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -856,6 +856,8 @@ "Expire": " 过期", "WeCom": "企业微信", "DingTalk": "钉钉", + "dingTalkTest": "测试", + "weComTest": "测试", "setting": "设置" }, "tickets": { diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index d0f0e651d..97cf4600b 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -851,6 +851,8 @@ "Expire": "", "WeCom": "WeCom", "DingTalk": "DingTalk", + "dingTalkTest": "Test", + "weComTest": "Test", "setting": "Setting" }, diff --git a/src/views/settings/DingTalk.vue b/src/views/settings/DingTalk.vue index 735327d76..805140ddb 100644 --- a/src/views/settings/DingTalk.vue +++ b/src/views/settings/DingTalk.vue @@ -5,6 +5,7 @@ :url="url" :get-method="getMethod" :fields-meta="fieldsMeta" + :more-buttons="moreButtons" :has-detail-in-msg="false" /> @@ -21,8 +22,24 @@ export default { GenericCreateUpdateForm }, data() { + const vm = this return { url: '/api/v1/settings/setting/?category=dingtalk', + moreButtons: [ + { + title: this.$t('setting.dingTalkTest'), + callback: function(value, form) { + vm.$axios.post( + '/api/v1/settings/dingtalk/testing/', + value + ).then(res => { + vm.$message.success(res['msg']) + }).catch(err => { + vm.$message.error(err['response']['data']['error']) + }) + } + } + ], fields: [ [ this.$t('common.BasicInfo'), diff --git a/src/views/settings/WeCom.vue b/src/views/settings/WeCom.vue index e91425fbb..27326a1f8 100644 --- a/src/views/settings/WeCom.vue +++ b/src/views/settings/WeCom.vue @@ -5,6 +5,7 @@ :url="url" :get-method="getMethod" :fields-meta="fieldsMeta" + :more-buttons="moreButtons" :has-detail-in-msg="false" /> @@ -21,8 +22,24 @@ export default { GenericCreateUpdateForm }, data() { + const vm = this return { url: '/api/v1/settings/setting/?category=wecom', + moreButtons: [ + { + title: this.$t('setting.weComTest'), + callback: function(value, form) { + vm.$axios.post( + '/api/v1/settings/wecom/testing/', + value + ).then(res => { + vm.$message.success(res['msg']) + }).catch(err => { + vm.$message.error(err['response']['data']['error']) + }) + } + } + ], fields: [ [ this.$t('common.BasicInfo'), From 65c6922621bcaaee8f751ad6e1ede173daa86922 Mon Sep 17 00:00:00 2001 From: Bai Date: Mon, 17 May 2021 18:18:32 +0800 Subject: [PATCH 10/20] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=94=B6?= =?UTF-8?q?=E9=9B=86=E7=94=A8=E6=88=B7=E4=BB=BB=E5=8A=A1=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E4=B8=8D=E5=A1=AB=E5=86=99interval=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xpack/GatheredUser/TaskCreateUpdate.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/xpack/GatheredUser/TaskCreateUpdate.vue b/src/views/xpack/GatheredUser/TaskCreateUpdate.vue index a058f8b8a..5b41dd6f5 100644 --- a/src/views/xpack/GatheredUser/TaskCreateUpdate.vue +++ b/src/views/xpack/GatheredUser/TaskCreateUpdate.vue @@ -17,10 +17,6 @@ export default { [this.$t('common.Other'), ['comment']] ], url: '/api/v1/xpack/gathered-user/tasks/', - initial: { - is_periodic: true, - interval: 24 - }, hasDetailInMsg: false, fieldsMeta: { crontab: { @@ -48,12 +44,16 @@ export default { } } }, - 'is_periodic': { + is_periodic: { type: 'switch' } }, createSuccessNextRoute: { name: 'GatherUserListIndex' }, - updateSuccessNextRoute: { name: 'GatherUserListIndex' } + updateSuccessNextRoute: { name: 'GatherUserListIndex' }, + cleanFormValue(values) { + values.interval = values.interval || null + return values + } } } } From 328e068aca0f230ca0743cded9dc59c8894c8d5b Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 17 May 2021 18:01:18 +0800 Subject: [PATCH 11/20] =?UTF-8?q?fix(xpack):=20=E4=BF=AE=E5=A4=8D=E6=94=B6?= =?UTF-8?q?=E9=9B=86=E4=BB=BB=E5=8A=A1=E8=A1=A8=E5=A4=B4=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AutoDataTable/index.vue | 6 ++++-- src/views/xpack/GatheredUser/GatheredUserList.vue | 3 ++- src/views/xpack/GatheredUser/TaskList.vue | 7 ++++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/AutoDataTable/index.vue b/src/components/AutoDataTable/index.vue index 5a0070b80..685672c06 100644 --- a/src/components/AutoDataTable/index.vue +++ b/src/components/AutoDataTable/index.vue @@ -228,7 +228,8 @@ export default { const _tableConfig = localStorage.getItem('tableConfig') ? JSON.parse(localStorage.getItem('tableConfig')) : {} - const configShowColumnsNames = _.get(_tableConfig[this.$route.name], 'showColumns', null) + const tableName = this.config.name || this.$route.name + const configShowColumnsNames = _.get(_tableConfig[tableName], 'showColumns', null) let showColumnsNames = configShowColumnsNames || defaultColumnsNames if (showColumnsNames.length === 0) { showColumnsNames = totalColumnsNames @@ -270,7 +271,8 @@ export default { const _tableConfig = localStorage.getItem('tableConfig') ? JSON.parse(localStorage.getItem('tableConfig')) : {} - _tableConfig[this.$route.name] = { + const tableName = this.config.name || this.$route.name + _tableConfig[tableName] = { 'showColumns': columns } localStorage.setItem('tableConfig', JSON.stringify(_tableConfig)) diff --git a/src/views/xpack/GatheredUser/GatheredUserList.vue b/src/views/xpack/GatheredUser/GatheredUserList.vue index e6a1be356..a2924f5c3 100644 --- a/src/views/xpack/GatheredUser/GatheredUserList.vue +++ b/src/views/xpack/GatheredUser/GatheredUserList.vue @@ -24,7 +24,8 @@ export default { url: '/api/v1/assets/gathered-users/', hasTree: true, columns: [ - 'hostname', 'ip', 'username', 'date_last_login', 'present', 'ip_last_login', 'date_updated' + 'hostname', 'ip', 'username', 'date_last_login', 'present', + 'ip_last_login', 'date_updated' ], columnsMeta: { hostname: { diff --git a/src/views/xpack/GatheredUser/TaskList.vue b/src/views/xpack/GatheredUser/TaskList.vue index 1f5e245f2..4d241b1e8 100644 --- a/src/views/xpack/GatheredUser/TaskList.vue +++ b/src/views/xpack/GatheredUser/TaskList.vue @@ -14,10 +14,14 @@ export default { return { tableConfig: { + name: 'TaskListTable', url: '/api/v1/xpack/gathered-user/tasks/', columns: [ 'name', 'nodes', 'periodic_display', 'executed_times', 'actions' ], + columnsShow: { + min: ['name', 'nodes', 'periodic_display', 'executed_times', 'actions'] + }, columnsMeta: { name: { formatter: null @@ -61,7 +65,8 @@ export default { hasRefresh: false, hasExport: false, hasMoreActions: false, - createRoute: 'GatherUserTaskCreate' + createRoute: 'GatherUserTaskCreate', + hasColumnSetting: false } } } From b03af2c9958b0590f8e0353ef48e02306f8cab04 Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 17 May 2021 18:18:12 +0800 Subject: [PATCH 12/20] =?UTF-8?q?perf(users):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E7=BB=84=E7=BB=87=E7=94=A8=E6=88=B7=E7=BB=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/users/User/UserCreateUpdate.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/views/users/User/UserCreateUpdate.vue b/src/views/users/User/UserCreateUpdate.vue index 4b2763475..aa4e43c1a 100644 --- a/src/views/users/User/UserCreateUpdate.vue +++ b/src/views/users/User/UserCreateUpdate.vue @@ -150,6 +150,9 @@ export default { const method = this.getMethod() if (method === 'post' && !value.password_strategy) { delete value['password'] + if (this.currentOrgIsRoot) { + delete value['groups'] + } } if (value.update_password !== undefined) { delete value.update_password @@ -166,6 +169,9 @@ export default { }, afterGetUser(user) { this.user = user + if (this.$route.query.clone_from) { + this.user.groups = [] + } } } } From 4509970f7d1787bad748fdfe161b35d6ceeccfbc Mon Sep 17 00:00:00 2001 From: Bai Date: Mon, 17 May 2021 19:07:55 +0800 Subject: [PATCH 13/20] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E8=AF=A6=E6=83=85=E5=85=B3=E8=81=94=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Org/OrganizationDetail/OrganizationMembershipList.vue | 2 +- src/views/xpack/Org/OrganizationDetail/index.vue | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/xpack/Org/OrganizationDetail/OrganizationMembershipList.vue b/src/views/xpack/Org/OrganizationDetail/OrganizationMembershipList.vue index cc5d82359..551506995 100644 --- a/src/views/xpack/Org/OrganizationDetail/OrganizationMembershipList.vue +++ b/src/views/xpack/Org/OrganizationDetail/OrganizationMembershipList.vue @@ -108,7 +108,7 @@ export default { that.iHasObjects = [...that.iHasObjects, ...objects] that.$refs.select2.clearSelected() this.$message.success(this.$t('common.updateSuccessMsg')) - this.$refs.GenericListTable.reloadTable() + this.$refs.GenericListTable.$refs.ListTable.reloadTable() window.location.reload() } } diff --git a/src/views/xpack/Org/OrganizationDetail/index.vue b/src/views/xpack/Org/OrganizationDetail/index.vue index 0495957a0..c47192c42 100644 --- a/src/views/xpack/Org/OrganizationDetail/index.vue +++ b/src/views/xpack/Org/OrganizationDetail/index.vue @@ -51,10 +51,12 @@ export default { try { await performDelete.bind(this)() this.$message.success(this.$t('common.deleteSuccessMsg')) + this.$router.push('/xpack/orgs/') // 返回列表 return done() + } catch (error) { + this.$log.error(error) } finally { instance.confirmButtonLoading = false - this.$router.push('/xpack/orgs/') // 返回列表 } } }).catch(() => { From d2aa4e99da6cb88a80937fa5edaa670607efc04b Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 18 May 2021 14:09:49 +0800 Subject: [PATCH 14/20] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=94=B9?= =?UTF-8?q?=E5=AF=86=E8=AE=A1=E5=88=92=E9=A1=B5=E9=9D=A2=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=B5=84=E4=BA=A7/=E8=8A=82=E7=82=B9=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChangeAuthPlanDetail/ChangeAuthPlanAsset/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanAsset/index.vue b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanAsset/index.vue index 6838888f7..586b2c9df 100644 --- a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanAsset/index.vue +++ b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanAsset/index.vue @@ -87,7 +87,7 @@ export default { onAddSuccess: (items, that) => { this.$log.debug('AssetSelect value', that.assets) this.$message.success(this.$t('common.updateSuccessMsg')) - this.$refs.listTable.reloadTable() + this.$refs.listTable.$refs.ListTable.reloadTable() that.$refs.assetSelect.$refs.select2.clearSelected() } }, @@ -115,7 +115,7 @@ export default { that.iHasObjects = [...that.iHasObjects, ...objects] that.$refs.select2.clearSelected() this.$message.success(this.$t('common.updateSuccessMsg')) - this.$refs.listTable.reloadTable() + this.$refs.listTable.$refs.ListTable.reloadTable() }, performDelete: (item) => { const nodes = this.object.nodes From 703eadf292228ad49501411e83896d90092928ca Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 18 May 2021 11:59:04 +0800 Subject: [PATCH 15/20] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=B7=A5?= =?UTF-8?q?=E5=8D=95=EF=BC=8C=E5=A4=84=E7=90=86=E4=BA=BA=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=9A=84=E6=8C=89=E9=92=AE=EF=BC=8C=E5=8F=AA?= =?UTF-8?q?=E8=83=BD=E5=90=8C=E6=84=8F=E6=88=96=E6=8B=92=E7=BB=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tickets/components/Comments.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/views/tickets/components/Comments.vue b/src/views/tickets/components/Comments.vue index 89b7a1b52..27343c8a9 100644 --- a/src/views/tickets/components/Comments.vue +++ b/src/views/tickets/components/Comments.vue @@ -45,6 +45,7 @@ Date: Tue, 18 May 2021 10:51:22 +0800 Subject: [PATCH 16/20] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=94=A8=E6=88=B7=E7=94=A8=E6=88=B7=E5=90=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit perf: 优化系统用户用户名隐藏与禁用 --- .../assets/SystemUser/SystemUserCreate/fields.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/views/assets/SystemUser/SystemUserCreate/fields.js b/src/views/assets/SystemUser/SystemUserCreate/fields.js index b4713c597..a947bac8f 100644 --- a/src/views/assets/SystemUser/SystemUserCreate/fields.js +++ b/src/views/assets/SystemUser/SystemUserCreate/fields.js @@ -28,15 +28,15 @@ function getFields() { hidden: (form) => { if (['mysql', 'postgresql', 'mariadb', 'oracle'].includes(form.protocol)) { this.fieldsMeta.username.rules[0].required = true - return - } - if (['vnc'].includes(form.protocol)) { + } else if (['vnc'].includes(form.protocol)) { this.fieldsMeta.username.rules[0].required = false - return + } else { + this.fieldsMeta.username.rules[0].required = !(form.login_mode === 'manual' || form.username_same_with_user) + } + if (form.username_same_with_user) { + this.fieldsMeta.username.el.disabled = true + form.username = '' } - this.fieldsMeta.username.rules[0].required = !(form.login_mode === 'manual' || form.username_same_with_user) - - this.fieldsMeta.username.el.disabled = !!form.username_same_with_user } } From 6dc71fe612b7dc11be073ca693ffbd2615ba36b7 Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 17 May 2021 19:29:06 +0800 Subject: [PATCH 17/20] =?UTF-8?q?perf(assets):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=94=A8=E6=88=B7=E8=AF=A6=E6=83=85=E4=B8=AD?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8C=89=E9=92=AE=E5=9C=B0=E5=9D=80=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SystemUser/SystemUserDetail/index.vue | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/views/assets/SystemUser/SystemUserDetail/index.vue b/src/views/assets/SystemUser/SystemUserDetail/index.vue index 9eb3c0800..98f574b2d 100644 --- a/src/views/assets/SystemUser/SystemUserDetail/index.vue +++ b/src/views/assets/SystemUser/SystemUserDetail/index.vue @@ -1,7 +1,7 @@ @@ -20,8 +20,9 @@ export default { AccountList }, data() { + const vm = this return { - TaskDetail: {}, + systemUser: {}, config: { activeMenu: 'Detail', submenu: [ @@ -37,9 +38,19 @@ export default { title: this.$t('assets.AccountList'), name: 'AccountList' } - ], - hasRightSide: true + hasRightSide: true, + actions: { + updateCallback: () => { + const id = this.$route.params.id + const routeName = 'SystemUserUpdate' + this.$router.push({ + name: routeName, + params: { id: id }, + query: { protocol: vm.systemUser.protocol } + }) + } + } } } } From b04cf80201075eb1e9e73d7677f2aa54056e775f Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 18 May 2021 16:00:23 +0800 Subject: [PATCH 18/20] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=91?= =?UTF-8?q?=E7=AE=A1=E8=B4=A6=E5=8F=B7=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=9B=B4=E6=96=B0=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xpack/Cloud/Account/AccountDetail/index.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/views/xpack/Cloud/Account/AccountDetail/index.vue b/src/views/xpack/Cloud/Account/AccountDetail/index.vue index b9aaeda3a..71e14edb5 100644 --- a/src/views/xpack/Cloud/Account/AccountDetail/index.vue +++ b/src/views/xpack/Cloud/Account/AccountDetail/index.vue @@ -17,9 +17,11 @@ export default { TabPage }, data() { + const vm = this return { Account: { - name: '', provider_display: '', validity_display: '', comment: '', date_created: '', created_by: '' }, + name: '', provider: '', provider_display: '', validity_display: '', comment: '', date_created: '', created_by: '' + }, config: { activeMenu: 'AccountDetail', submenu: [ @@ -29,7 +31,16 @@ export default { } ], actions: { - deleteSuccessRoute: 'CloudCenter' + deleteSuccessRoute: 'CloudCenter', + updateCallback: () => { + const id = this.$route.params.id + const routeName = 'AccountUpdate' + this.$router.push({ + name: routeName, + params: { id: id }, + query: { provider: vm.Account.provider } + }) + } } } } From f17ec57b3afd4de68ed9b7a3e73749f43ddbc116 Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 18 May 2021 17:40:47 +0800 Subject: [PATCH 19/20] =?UTF-8?q?feat:=20=E6=94=B6=E9=9B=86=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BB=BB=E5=8A=A1=E6=B7=BB=E5=8A=A0=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=92=8C=E6=89=A7=E8=A1=8C=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/cn.json | 4 +- src/i18n/langs/en.json | 4 +- .../xpack/GatheredUser/TaskDetail/Detail.vue | 70 +++++++++++++++++++ .../TaskDetail/TaskExecutionList.vue | 64 +++++++++++++++++ .../xpack/GatheredUser/TaskDetail/index.vue | 45 ++++++++++++ src/views/xpack/GatheredUser/TaskList.vue | 18 ++++- src/views/xpack/router.js | 19 +++-- 7 files changed, 215 insertions(+), 9 deletions(-) create mode 100644 src/views/xpack/GatheredUser/TaskDetail/Detail.vue create mode 100644 src/views/xpack/GatheredUser/TaskDetail/TaskExecutionList.vue create mode 100644 src/views/xpack/GatheredUser/TaskDetail/index.vue diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index f46a24d96..1a363ca73 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -1139,7 +1139,9 @@ "GatherUserList": "收集用户", "GatherUserTaskCreate": "创建任务", "GatherUserTaskList": "任务列表", - "GatherUserTaskUpdate": "更新任务" + "GatherUserTaskUpdate": "更新任务", + "GatherUserTaskDetail": "任务详情", + "GatherUserTaskExecutionList": "任务执行列表" }, "Import": "导入", "ImportLicense": "导入许可证", diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 97cf4600b..cd7e931fe 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -1133,7 +1133,9 @@ "GatherUserList": "Gather user", "GatherUserTaskCreate": "Create gather user task", "GatherUserTaskList": "Gather user task list", - "GatherUserTaskUpdate": "Update gather user task" + "GatherUserTaskUpdate": "Update gather user task", + "GatherUserTaskDetail": "Gather user detail", + "GatherUserTaskExecutionList": "Gather user task execution list" }, "Import": "Import", "ImportLicense": "Import license", diff --git a/src/views/xpack/GatheredUser/TaskDetail/Detail.vue b/src/views/xpack/GatheredUser/TaskDetail/Detail.vue new file mode 100644 index 000000000..c4c9e43bc --- /dev/null +++ b/src/views/xpack/GatheredUser/TaskDetail/Detail.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/src/views/xpack/GatheredUser/TaskDetail/TaskExecutionList.vue b/src/views/xpack/GatheredUser/TaskDetail/TaskExecutionList.vue new file mode 100644 index 000000000..0c97fa8b6 --- /dev/null +++ b/src/views/xpack/GatheredUser/TaskDetail/TaskExecutionList.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/src/views/xpack/GatheredUser/TaskDetail/index.vue b/src/views/xpack/GatheredUser/TaskDetail/index.vue new file mode 100644 index 000000000..f8b2fe1fe --- /dev/null +++ b/src/views/xpack/GatheredUser/TaskDetail/index.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/src/views/xpack/GatheredUser/TaskList.vue b/src/views/xpack/GatheredUser/TaskList.vue index 4d241b1e8..e35c6ac32 100644 --- a/src/views/xpack/GatheredUser/TaskList.vue +++ b/src/views/xpack/GatheredUser/TaskList.vue @@ -4,6 +4,7 @@