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'))
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
}
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]
)
}
}
diff --git a/src/components/TagSearch/index.vue b/src/components/TagSearch/index.vue
index 22fc5abb1..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)"
>
@@ -34,6 +34,7 @@
@blur="focus = false"
@focus="focus = true"
@change="handleConfirm"
+ @keyup.enter.native="handleConfirm"
/>
@@ -205,6 +206,7 @@ export default {
return true
},
handleConfirm() {
+ if (!this.filterValue) return
if (this.filterValue && !this.filterKey) {
this.filterKey = 'search'
}
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
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,
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..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', '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'
}
},
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) => {