diff --git a/.env.development b/.env.development index b58761940..3d7d6e496 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,8 @@ -# just a flag +# 全局环境变量 请勿随意改动 ENV = 'development' + + # base api VUE_APP_BASE_API = '' VUE_APP_PUBLIC_PATH = '/ui/' diff --git a/.env.production b/.env.production index a7a908bc1..47e5175bd 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,4 @@ -# just a flag +# 全局环境变量 请勿随意改动 ENV = 'production' # base api diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index 7d002811f..557044698 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -379,7 +379,9 @@ "userCount": "用户数量", "userGroupCount": "用户组数量", "usersAndUserGroups": "用户或用户组", - "": "" + "Inherit": "继承", + "Include": "包含", + "Exclude": "不包含" }, "route": { "AdminUserCreate": "创建管理用户", @@ -691,7 +693,7 @@ "RunUser": "运行用户" }, "users": { - "LoginConfirm": "登录确认人", + "LoginConfirm": "登录复核", "SSHKey": "SSH公钥", "TermsAndConditions": "条款和条件", "IAgree": "我同意", @@ -781,6 +783,7 @@ "Label": "标签", "assetAndNode": "资产或节点", "Success": "成功", + "Execute": "执行", "ChangeAuthPlan": { "Asset": "资产", "Success": "成功", diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 8d9fe78ad..3a18f9ba8 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -376,7 +376,9 @@ "userCount": "User count", "userGroupCount": "User group count", "usersAndUserGroups": "Users and user groups", - "": "" + "Inherit": "Inherit", + "Include": "Include", + "Exclude": "Exclude" }, "route": { "AdminUserCreate": "Admin user create", @@ -674,7 +676,7 @@ "showNodeInfo": "Show node information" }, "users": { - "LoginConfirm": "Login approvers", + "LoginConfirm": "Login confirm", "SSHKey": "SSH Key", "TermsAndConditions": "Terms and conditions", "IAgree": "I agree", @@ -756,6 +758,7 @@ "Admin": "Admin", "AssetCount": "Asset count", "Auditor": "Auditor", + "Execute": "Execute", "ChangeAuthPlan": { "PasswordStrategy": "Password strategy", "HelpText": { diff --git a/src/layout/components/NavBar/Logo.vue b/src/layout/components/NavBar/Logo.vue index 868816095..08bbec43a 100644 --- a/src/layout/components/NavBar/Logo.vue +++ b/src/layout/components/NavBar/Logo.vue @@ -38,7 +38,11 @@ export default { ]), // eslint-disable-next-line vue/return-in-computed-property logoSrc() { - return this.publicSettings.LOGO_URLS.logo_index + if (this.publicSettings.LOGO_URLS.logo_index !== '/static/img/logo_text.png') { + return this.publicSettings.LOGO_URLS.logo_index + } else { + return this.logoText + } } }, created() { diff --git a/src/views/perms/AssetPermission/AssetPermissionList.vue b/src/views/perms/AssetPermission/AssetPermissionList.vue index b05af752a..99b490a0a 100644 --- a/src/views/perms/AssetPermission/AssetPermissionList.vue +++ b/src/views/perms/AssetPermission/AssetPermissionList.vue @@ -24,17 +24,6 @@ export default { url: '/api/v1/perms/asset-permissions/', hasSelection: false, hasTree: true, - tagSearch: [ - { label: this.$t('common.Name'), key: 'name' }, - { label: this.$t('perms.isValid'), key: 'is_valid' }, - { label: this.$t('common.Username'), key: 'username' }, - { label: this.$t('perms.UserGroups'), key: 'user_group' }, - { label: this.$t('perms.IP'), key: 'ip' }, - { label: this.$t('perms.hostName'), key: 'hostname' }, - { label: this.$t('perms.Node'), key: 'node' }, - { label: this.$t('perms.SystemUser'), key: 'system_user' }, - { label: '继承(先占位)', key: 'all=0' } - ], columns: ['name', 'users_amount', 'user_groups_amount', 'assets_amount', 'nodes_amount', 'system_users_amount', 'is_active', 'actions'], columnsMeta: { name: { @@ -101,6 +90,32 @@ export default { name: 'AssetPermissionCreate', query: this.$route.query }, + searchConfig: { + url: '', + options: [ + { label: this.$t('common.Name'), value: 'name' }, + { label: this.$t('perms.isValid'), value: 'is_valid' }, + { label: this.$t('common.Username'), value: 'username' }, + { label: this.$t('perms.UserGroups'), value: 'user_group' }, + { label: this.$t('perms.IP'), value: 'ip' }, + { label: this.$t('perms.hostName'), value: 'hostname' }, + { label: this.$t('perms.Node'), value: 'node' }, + { label: this.$t('perms.SystemUser'), value: 'system_user' }, + { + label: this.$t('perms.Inherit'), value: 'all', + children: [ + { + value: '1', + label: this.$t('perms.Include') + }, + { + value: '0', + label: this.$t('perms.Exclude') + } + ] + } + ] + }, hasRightActions: false, hasBulkDelete: false, hasBulkUpdate: false, diff --git a/src/views/users/User/UserDetail/UserAssetPermissionRules.vue b/src/views/users/User/UserDetail/UserAssetPermissionRules.vue index 5bb85baed..7267dbf3e 100644 --- a/src/views/users/User/UserDetail/UserAssetPermissionRules.vue +++ b/src/views/users/User/UserDetail/UserAssetPermissionRules.vue @@ -81,7 +81,33 @@ export default { headerActions: { hasLeftActions: false, hasExport: false, - hasImport: false + hasImport: false, + searchConfig: { + url: '', + options: [ + { label: this.$t('common.Name'), value: 'name' }, + { label: this.$t('perms.isValid'), value: 'is_valid' }, + { label: this.$t('common.Username'), value: 'username' }, + { label: this.$t('perms.UserGroups'), value: 'user_group' }, + { label: this.$t('perms.IP'), value: 'ip' }, + { label: this.$t('perms.hostName'), value: 'hostname' }, + { label: this.$t('perms.Node'), value: 'node' }, + { label: this.$t('perms.SystemUser'), value: 'system_user' }, + { + label: this.$t('perms.Inherit'), value: 'all', + children: [ + { + value: '1', + label: this.$t('perms.Include') + }, + { + value: '0', + label: this.$t('perms.Exclude') + } + ] + } + ] + } } } } diff --git a/src/views/users/User/UserDetail/UserDatabasePermissionRules.vue b/src/views/users/User/UserDetail/UserDatabasePermissionRules.vue index 393b49ed7..d8f486881 100644 --- a/src/views/users/User/UserDetail/UserDatabasePermissionRules.vue +++ b/src/views/users/User/UserDetail/UserDatabasePermissionRules.vue @@ -49,7 +49,12 @@ export default { headerActions: { hasLeftActions: false, hasImport: false, - hasExport: false + hasExport: false, + searchConfig: { + url: '', + options: [ + ] + } } } } diff --git a/src/views/users/User/UserDetail/UserRemoteAppPermissionRules.vue b/src/views/users/User/UserDetail/UserRemoteAppPermissionRules.vue index bcf7eebcf..71df63176 100644 --- a/src/views/users/User/UserDetail/UserRemoteAppPermissionRules.vue +++ b/src/views/users/User/UserDetail/UserRemoteAppPermissionRules.vue @@ -60,7 +60,10 @@ export default { headerActions: { hasLeftActions: false, hasImport: false, - hasExport: false + hasExport: false, + searchConfig: { + url: '' + } } } } diff --git a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanList.vue b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanList.vue index 36fb1eae0..8c77952eb 100644 --- a/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanList.vue +++ b/src/views/xpack/ChangeAuthPlan/ChangeAuthPlanList.vue @@ -48,7 +48,7 @@ export default { formatterArgs: { extraActions: [ { - title: vm.$t('xpack.ChangeAuthPlan.Execute'), + title: vm.$t('xpack.Execute'), name: 'execute', type: 'info', callback: function(data) { diff --git a/src/views/xpack/Cloud/SyncInstanceTask/SyncInstanceTaskList.vue b/src/views/xpack/Cloud/SyncInstanceTask/SyncInstanceTaskList.vue index 957642bd8..230d1335a 100644 --- a/src/views/xpack/Cloud/SyncInstanceTask/SyncInstanceTaskList.vue +++ b/src/views/xpack/Cloud/SyncInstanceTask/SyncInstanceTaskList.vue @@ -10,6 +10,7 @@ export default { ListTable }, data() { + const vm = this return { tableConfig: { url: '/api/v1/xpack/cloud/sync-instance-tasks/', @@ -22,7 +23,21 @@ export default { formatterArgs: { onUpdate: ({ row }) => { this.$router.push({ name: 'SyncInstanceTaskUpdate', params: { id: row.id }}) - } + }, + extraActions: [ + { + title: vm.$t('xpack.Execute'), + name: 'execute', + type: 'info', + callback: function(data) { + this.$axios.get( + `/api/v1/xpack/cloud/sync-instance-tasks/${data.row.id}/run/` + ).then(res => { + }).catch(res => { + }) + } + } + ] } }, name: { diff --git a/src/views/xpack/GatheredUser/TaskList.vue b/src/views/xpack/GatheredUser/TaskList.vue index a4bc18926..b93dbf286 100644 --- a/src/views/xpack/GatheredUser/TaskList.vue +++ b/src/views/xpack/GatheredUser/TaskList.vue @@ -27,7 +27,7 @@ export default { updateRoute: 'GatherUserTaskUpdate', extraActions: [ { - title: vm.$t('xpack.ChangeAuthPlan.Execute'), + title: vm.$t('xpack.Execute'), name: 'execute', type: 'info', callback: function(data) {