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/i18n/langs/cn.json b/src/i18n/langs/cn.json
index 02a2ba2d0..1a363ca73 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": "消息",
@@ -856,9 +856,12 @@
"Expire": " 过期",
"WeCom": "企业微信",
"DingTalk": "钉钉",
+ "dingTalkTest": "测试",
+ "weComTest": "测试",
"setting": "设置"
},
"tickets": {
+ "PermissionName": "授权规则名称",
"Accept": "同意",
"AssignedMe": "待我审批",
"Assignee": "处理人",
@@ -1136,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 c85042a1d..cd7e931fe 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",
@@ -851,10 +851,13 @@
"Expire": "",
"WeCom": "WeCom",
"DingTalk": "DingTalk",
+ "dingTalkTest": "Test",
+ "weComTest": "Test",
"setting": "Setting"
},
"tickets": {
+ "PermissionName": "Permission name",
"Accept": "Accept",
"AssignedMe": "Assigned me",
"Assignee": "Assignee",
@@ -1130,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/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
}
}
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: {
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(),
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
}
}
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'),
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 }
+ })
+ }
+ }
}
}
}
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'),
diff --git a/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue b/src/views/tickets/RequestAssetPerm/Detail/TicketDetail.vue
index b22e4567e..671569467 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)
@@ -165,14 +169,27 @@ export default {
]
},
assignedCardItems() {
+ const vm = this
return [
+ {
+ key: this.$t('tickets.PermissionName'),
+ 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'),
- 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'),
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 @@
{
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
diff --git a/src/views/xpack/Cloud/Account/AccountCreateUpdate.vue b/src/views/xpack/Cloud/Account/AccountCreateUpdate.vue
index cc4f355b2..32414b596 100644
--- a/src/views/xpack/Cloud/Account/AccountCreateUpdate.vue
+++ b/src/views/xpack/Cloud/Account/AccountCreateUpdate.vue
@@ -40,8 +40,8 @@ export default {
}
}
},
- updateSuccessNextRoute: { name: 'CloudCenter' },
- createSuccessNextRoute: { name: 'CloudCenter' },
+ updateSuccessNextRoute: { name: 'AccountList' },
+ createSuccessNextRoute: { name: 'AccountList' },
getUrl() {
const params = this.$route.params
let url = `/api/v1/xpack/cloud/accounts/`
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 }
+ })
+ }
}
}
}
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/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
+ }
}
}
}
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 1f5e245f2..e35c6ac32 100644
--- a/src/views/xpack/GatheredUser/TaskList.vue
+++ b/src/views/xpack/GatheredUser/TaskList.vue
@@ -4,6 +4,7 @@