From a6012eba4aabd3575a15bf79de948000a56ba760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E6=80=80=E7=A3=8A=E2=80=9D?= <2280131253@qq.com> Date: Tue, 18 Jan 2022 11:00:37 +0800 Subject: [PATCH 01/11] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=B5=84?= =?UTF-8?q?=E4=BA=A7=E6=8E=88=E6=9D=83=E8=AF=A6=E6=83=85=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=BB=84=E6=B7=BB=E5=8A=A0=E4=BC=9A=E6=98=BE=E7=A4=BA=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssetPermissionDetail/AssetPermissionUser.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/perms/AssetPermission/AssetPermissionDetail/AssetPermissionUser.vue b/src/views/perms/AssetPermission/AssetPermissionDetail/AssetPermissionUser.vue index 78893c6f6..bb4723825 100644 --- a/src/views/perms/AssetPermission/AssetPermissionDetail/AssetPermissionUser.vue +++ b/src/views/perms/AssetPermission/AssetPermissionDetail/AssetPermissionUser.vue @@ -70,6 +70,7 @@ export default { return { label: item.name + '(' + item.username + ')', value: item.id } } }, + showHasMore: false, hasObjectsId: this.object.users, showHasObjects: false, performAdd: (items) => { From 96206f10a2efced25a3693dc3a83876eec0194e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E6=80=80=E7=A3=8A=E2=80=9D?= <2280131253@qq.com> Date: Tue, 18 Jan 2022 14:00:49 +0800 Subject: [PATCH 02/11] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96table=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=A1=86=E5=88=87=E6=8D=A2=E6=90=9C=E7=B4=A2=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=90=8E=E4=B8=8D=E8=83=BD=E5=9B=9E=E8=BD=A6=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TagSearch/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/TagSearch/index.vue b/src/components/TagSearch/index.vue index 22fc5abb1..23e97b8d8 100644 --- a/src/components/TagSearch/index.vue +++ b/src/components/TagSearch/index.vue @@ -34,6 +34,7 @@ @blur="focus = false" @focus="focus = true" @change="handleConfirm" + @keyup.enter.native="handleConfirm" /> From 848bdcba3664860c90c0a535d7c444ed4a317d3c Mon Sep 17 00:00:00 2001 From: Michael Bai Date: Tue, 18 Jan 2022 14:31:35 +0800 Subject: [PATCH 03/11] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=AE=A1?= =?UTF-8?q?=E8=AE=A1=E6=97=A5=E5=BF=97=E4=B8=AD=E6=94=AF=E6=8C=81i18n?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5display?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/audits/LoginLogList.vue | 2 +- src/views/audits/OperateLogList.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/audits/LoginLogList.vue b/src/views/audits/LoginLogList.vue index a62890393..63a2d44e5 100644 --- a/src/views/audits/LoginLogList.vue +++ b/src/views/audits/LoginLogList.vue @@ -18,7 +18,7 @@ export default { tableConfig: { url: '/api/v1/audits/login-logs/', columns: [ - 'username', 'type', 'backend', 'ip', 'city', + 'username', 'type', 'backend_display', 'ip', 'city', 'user_agent', 'mfa', 'reason_display', 'status', 'datetime' ], columnsMeta: { diff --git a/src/views/audits/OperateLogList.vue b/src/views/audits/OperateLogList.vue index bd049abaf..8a0d73f0e 100644 --- a/src/views/audits/OperateLogList.vue +++ b/src/views/audits/OperateLogList.vue @@ -17,7 +17,7 @@ export default { return { tableConfig: { url: '/api/v1/audits/operate-logs/', - columns: ['user', 'action', 'resource_type', 'resource', 'remote_addr', 'datetime'], + columns: ['user', 'action', 'resource_type_display', 'resource', 'remote_addr', 'datetime'], columnsMeta: { user: { showOverflowTooltip: true From 2da4e4f7a06b7ea5de312dd5d0abffd1bad6c54f Mon Sep 17 00:00:00 2001 From: Michael Bai Date: Tue, 18 Jan 2022 15:02:24 +0800 Subject: [PATCH 04/11] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E8=B4=A6=E5=8F=B7=E6=9F=A5=E8=AF=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AppAccountListTable/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AppAccountListTable/index.vue b/src/components/AppAccountListTable/index.vue index e8e324b60..c34bf0021 100644 --- a/src/components/AppAccountListTable/index.vue +++ b/src/components/AppAccountListTable/index.vue @@ -135,7 +135,7 @@ export default { mfaVerifyRequired: true }, searchConfig: { - exclude: ['systemuser', 'asset'] + exclude: ['systemuser', 'app'] }, hasSearch: true } From c87412f4c00445d0317f63d54a918c5295bb056f Mon Sep 17 00:00:00 2001 From: Michael Bai Date: Tue, 18 Jan 2022 15:20:03 +0800 Subject: [PATCH 05/11] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=AE=A1?= =?UTF-8?q?=E8=AE=A1=E6=97=A5=E5=BF=97=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=8A=A8=E4=BD=9C=E7=BF=BB=E8=AF=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/audits/OperateLogList.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/audits/OperateLogList.vue b/src/views/audits/OperateLogList.vue index 8a0d73f0e..01a1e937a 100644 --- a/src/views/audits/OperateLogList.vue +++ b/src/views/audits/OperateLogList.vue @@ -17,7 +17,7 @@ export default { return { tableConfig: { url: '/api/v1/audits/operate-logs/', - columns: ['user', 'action', 'resource_type_display', 'resource', 'remote_addr', 'datetime'], + columns: ['user', 'action_display', 'resource_type_display', 'resource', 'remote_addr', 'datetime'], columnsMeta: { user: { showOverflowTooltip: true @@ -35,7 +35,7 @@ export default { remote_addr: { width: '140px' }, - action: { + action_display: { width: '90px' } }, From ff88a0bd42434ac1d4e52042fce4cbcc6d9892de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E6=80=80=E7=A3=8A=E2=80=9D?= <2280131253@qq.com> Date: Tue, 18 Jan 2022 15:47:20 +0800 Subject: [PATCH 06/11] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dtable=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=A1=86=E5=9B=9E=E8=BD=A6=E6=90=9C=E7=B4=A2=E6=97=B6?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=90=9C=E7=B4=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TagSearch/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/TagSearch/index.vue b/src/components/TagSearch/index.vue index 23e97b8d8..01b346110 100644 --- a/src/components/TagSearch/index.vue +++ b/src/components/TagSearch/index.vue @@ -16,7 +16,7 @@ size="small" class="filter-tag" type="info" - :disable-transitions="false" + :disable-transitions="true" @close="handleTagClose(k)" @click="handleTagClick(v,k)" > @@ -206,6 +206,7 @@ export default { return true }, handleConfirm() { + if (!this.filterValue) return if (this.filterValue && !this.filterKey) { this.filterKey = 'search' } From 941f1d855e3cb94489d42198776409ca329cace4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E6=80=80=E7=A3=8A=E2=80=9D?= <2280131253@qq.com> Date: Tue, 18 Jan 2022 17:13:14 +0800 Subject: [PATCH 07/11] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=B5=84?= =?UTF-8?q?=E4=BA=A7=E8=B4=A6=E5=8F=B7=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E6=97=B6=E6=8A=A5=E9=94=99=E6=8F=90=E7=A4=BA=E9=87=8D=E5=A4=8D?= =?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/components/AccountListTable/UpdateSecretInfo.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/AccountListTable/UpdateSecretInfo.vue b/src/components/AccountListTable/UpdateSecretInfo.vue index 6e52ed4a7..a7be3023a 100644 --- a/src/components/AccountListTable/UpdateSecretInfo.vue +++ b/src/components/AccountListTable/UpdateSecretInfo.vue @@ -58,11 +58,12 @@ export default { } if (this.authInfo.private_key !== '') { data.private_key = this.authInfo.private_key - data.passphrase = this.authInfo.passphrase + if (this.authInfo.passphrase) data.passphrase = this.authInfo.passphrase } this.$axios.patch( `/api/v1/assets/accounts/${this.account.id}/`, - data + data, + { disableFlashErrorMsg: true } ).then(res => { this.authInfo = { password: '', private_key: '' } this.$message.success(this.$tc('common.updateSuccessMsg')) From 6489cbe4882f28899074fc63c7570864a19c973d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E6=80=80=E7=A3=8A=E2=80=9D?= <2280131253@qq.com> Date: Tue, 18 Jan 2022 17:53:59 +0800 Subject: [PATCH 08/11] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E5=85=8B=E9=9A=86=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/GenericCreateUpdateForm/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layout/components/GenericCreateUpdateForm/index.vue b/src/layout/components/GenericCreateUpdateForm/index.vue index 19dddfe6a..4a4746faf 100644 --- a/src/layout/components/GenericCreateUpdateForm/index.vue +++ b/src/layout/components/GenericCreateUpdateForm/index.vue @@ -283,8 +283,8 @@ export default { let object = this.object if (!object || Object.keys(object).length === 0) { if (cloneFrom) { - this.$log.debug('Clone from: ', cloneFrom) - const url = `${this.url}${cloneFrom}/` + const [curUrl, query] = this.url.split('?') + const url = `${curUrl}${cloneFrom}/${query ? ('?' + query) : ''}` object = await this.getObjectDetail(url) if (object['name']) { object.name = this.$t('common.cloneFrom') + ' ' + object.name From d5fc939a40c5851e30d073e354bb6108381de9c5 Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Tue, 18 Jan 2022 19:05:22 +0800 Subject: [PATCH 09/11] =?UTF-8?q?fix:=20=E6=94=B9=E5=AF=86=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChangeAuthPlanExecutionTaskList.vue | 5 ++++- .../ChangeAuthPlanExecutionTaskList.vue | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/AppChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue b/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/AppChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue index bc41adef3..166caf94e 100644 --- a/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/AppChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue +++ b/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/AppChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue @@ -22,7 +22,7 @@ export default { tableConfig: { url: `/api/v1/xpack/change-auth-plan/app-plan-execution-subtask/?plan_execution_id=${this.object.id}`, columns: [ - 'app_display', 'system_user_display', 'is_success', 'reason', 'timedelta', 'date_start', 'actions' + 'app_display', 'system_user_display', 'is_success', 'reason_display', 'timedelta', 'date_start', 'actions' ], columnsMeta: { app_display: { @@ -35,6 +35,9 @@ export default { return { row.app_display } } }, + reason_display: { + label: this.$t('xpack.AccountBackupPlan.Reason') + }, system_user_display: { label: this.$t('xpack.ChangeAuthPlan.SystemUser') }, diff --git a/src/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue b/src/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue index d71dfe06e..8dd0e3ec5 100644 --- a/src/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue +++ b/src/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue @@ -22,7 +22,7 @@ export default { tableConfig: { url: `/api/v1/xpack/change-auth-plan/plan-execution-subtask/?plan_execution_id=${this.object.id}`, columns: [ - 'username', 'asset', 'is_success', 'reason', 'timedelta', 'date_start', 'actions' + 'username', 'asset', 'is_success', 'timedelta', 'date_start', 'reason_display', 'actions' ], columnsMeta: { asset: { @@ -42,6 +42,9 @@ export default { return row.timedelta.toFixed(2) + 's' } }, + reason_display: { + label: this.$t('xpack.AccountBackupPlan.Reason') + }, actions: { formatterArgs: { hasDelete: false, From fff2288069ef9d28e7782842e53afd3c90a0464b Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Tue, 18 Jan 2022 19:05:22 +0800 Subject: [PATCH 10/11] =?UTF-8?q?fix:=20=E6=94=B9=E5=AF=86=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChangeAuthPlanExecutionTaskList.vue | 5 ++++- .../ChangeAuthPlanExecutionTaskList.vue | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/AppChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue b/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/AppChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue index bc41adef3..830f42e54 100644 --- a/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/AppChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue +++ b/src/views/accounts/ChangeAuthPlan/AppChangeAuthPlan/ChangeAuthPlanDetail/AppChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue @@ -22,7 +22,7 @@ export default { tableConfig: { url: `/api/v1/xpack/change-auth-plan/app-plan-execution-subtask/?plan_execution_id=${this.object.id}`, columns: [ - 'app_display', 'system_user_display', 'is_success', 'reason', 'timedelta', 'date_start', 'actions' + 'app_display', 'system_user_display', 'is_success', 'timedelta', 'date_start', 'reason_display', 'actions' ], columnsMeta: { app_display: { @@ -35,6 +35,9 @@ export default { return { row.app_display } } }, + reason_display: { + label: this.$t('xpack.AccountBackupPlan.Reason') + }, system_user_display: { label: this.$t('xpack.ChangeAuthPlan.SystemUser') }, diff --git a/src/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue b/src/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue index d71dfe06e..8dd0e3ec5 100644 --- a/src/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue +++ b/src/views/accounts/ChangeAuthPlan/AssetChangeAuthPlan/ChangeAuthPlanDetail/ChangeAuthPlanExecution/ChangeAuthPlanExecutionDetail/ChangeAuthPlanExecutionTaskList.vue @@ -22,7 +22,7 @@ export default { tableConfig: { url: `/api/v1/xpack/change-auth-plan/plan-execution-subtask/?plan_execution_id=${this.object.id}`, columns: [ - 'username', 'asset', 'is_success', 'reason', 'timedelta', 'date_start', 'actions' + 'username', 'asset', 'is_success', 'timedelta', 'date_start', 'reason_display', 'actions' ], columnsMeta: { asset: { @@ -42,6 +42,9 @@ export default { return row.timedelta.toFixed(2) + 's' } }, + reason_display: { + label: this.$t('xpack.AccountBackupPlan.Reason') + }, actions: { formatterArgs: { hasDelete: false, From cd5534c20a5e8f085174149bd2bcc5cc2c66a3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E6=80=80=E7=A3=8A=E2=80=9D?= <2280131253@qq.com> Date: Tue, 18 Jan 2022 19:32:12 +0800 Subject: [PATCH 11/11] =?UTF-8?q?feat:=20=E7=B3=BB=E7=BB=9F=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=B8=8A=E4=BC=A0ssh=E5=8D=8F=E8=AE=AEi18n=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FormFields/UploadKey.vue | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/FormFields/UploadKey.vue b/src/components/FormFields/UploadKey.vue index a90049dbd..3d79269ba 100644 --- a/src/components/FormFields/UploadKey.vue +++ b/src/components/FormFields/UploadKey.vue @@ -1,6 +1,10 @@ @@ -21,12 +25,22 @@ export default { default: () => 'string' } }, + data() { + return { + fileName: '' + } + }, methods: { + onUpLoad() { + this.$refs.upLoadFile.click() + }, onChange(e) { - if (e.target.files.length === 0) { + const upLoadFile = e.target.files + if (upLoadFile.length === 0) { return } const vm = this + this.fileName = upLoadFile[0].name || '' const reader = new FileReader() reader.onload = function() { let result = this.result @@ -36,7 +50,7 @@ export default { vm.$emit('input', result) } reader.readAsText( - e.target.files[0] + upLoadFile[0] ) } }