diff --git a/public/index.html b/public/index.html
index 5e4975076..929de155d 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2,37 +2,70 @@
-
-
-
-
-
-
+
+
+
+
+
+
<%= webpackConfig.name %>
-
+
+
-
+
+
+
diff --git a/src/main.js b/src/main.js
index 6c4ec2956..979fb912b 100644
--- a/src/main.js
+++ b/src/main.js
@@ -92,6 +92,15 @@ new Vue({
i18n,
router,
store,
+ mounted() {
+ // 移除加载页面
+ const loadingElement = document.getElementById('loading')
+ if (loadingElement) {
+ setTimeout(() => {
+ loadingElement.style.display = 'none'
+ }, 500)
+ }
+ },
render: h => h(App)
})
diff --git a/src/router/pam/automations.js b/src/router/pam/automations.js
index f5988905f..86d386553 100644
--- a/src/router/pam/automations.js
+++ b/src/router/pam/automations.js
@@ -21,8 +21,7 @@ export default [
component: () => import('@/views/accounts/AccountDiscover/index.vue'),
name: 'AccountDiscoverList',
meta: {
- menuTitle: i18n.t('GatherAccounts'),
- title: i18n.t('AccountDiscoverTaskList'),
+ title: i18n.t('DiscoverAccounts'),
// activeMenu: '/console/accounts/automations',
permissions: ['accounts.view_gatheredaccount']
}
diff --git a/src/views/accounts/AccountChangeSecret/AccountChangeDashboard.vue b/src/views/accounts/AccountChangeSecret/AccountChangeDashboard.vue
new file mode 100644
index 000000000..2a445937a
--- /dev/null
+++ b/src/views/accounts/AccountChangeSecret/AccountChangeDashboard.vue
@@ -0,0 +1,13 @@
+
+
+
+ 账号改密汇总
+
+
+
diff --git a/src/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue b/src/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue
index b722d700b..be94114e2 100644
--- a/src/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue
+++ b/src/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue
@@ -24,7 +24,8 @@ export default {
interval: 24,
accounts: [],
secret_type: 'password',
- secret_strategy: 'specific'
+ secret_strategy: 'specific',
+ ssh_key_change_strategy: 'set_jms'
},
url: '/api/v1/accounts/change-secret-automations/',
encryptedFields: ['secret'],
@@ -41,7 +42,8 @@ export default {
],
[this.$t('Automations'), ['params']],
[this.$t('Periodic'), ['is_periodic', 'interval', 'crontab']],
- [this.$t('Other'), ['is_active', 'recipients', 'comment']]
+ [this.$t('Notification'), ['recipients']],
+ [this.$t('Other'), ['is_active', 'comment']]
],
fieldsMeta: {
...getChangeSecretFields(),
diff --git a/src/views/accounts/AccountChangeSecret/fields.js b/src/views/accounts/AccountChangeSecret/fields.js
index 593dfeafc..46f1c4b26 100644
--- a/src/views/accounts/AccountChangeSecret/fields.js
+++ b/src/views/accounts/AccountChangeSecret/fields.js
@@ -1,5 +1,5 @@
import i18n from '@/i18n/i18n'
-import { PasswordRule, TagInput, UpdateToken } from '@/components/Form/FormFields'
+import { PasswordRule, Select2, TagInput, UpdateToken } from '@/components/Form/FormFields'
import { crontab, interval, is_periodic } from '../../accounts/const'
export const getChangeSecretFields = () => {
@@ -49,8 +49,22 @@ export const getChangeSecretFields = () => {
label: i18n.t('PasswordRule'),
hidden: ({ secret_strategy, secret_type }) => (secret_strategy === 'specific' || secret_type !== 'password')
},
- recipients: {
- label: i18n.t('Recipient'),
+ pre_notify: {
+ label: i18n.t('Pre Recipient'),
+ component: Select2,
+ el: {
+ value: [],
+ ajax: {
+ url: '/api/v1/users/users/?fields_size=mini',
+ transformOption: (item) => {
+ return { label: item.name + '(' + item.username + ')', value: item.id }
+ }
+ }
+ }
+ },
+ post_notify: {
+ label: i18n.t('Post Recipient'),
+ component: Select2,
el: {
value: [],
ajax: {
diff --git a/src/views/accounts/AccountChangeSecret/index.vue b/src/views/accounts/AccountChangeSecret/index.vue
index 5a5744141..c780fa518 100644
--- a/src/views/accounts/AccountChangeSecret/index.vue
+++ b/src/views/accounts/AccountChangeSecret/index.vue
@@ -16,10 +16,9 @@ export default {
activeMenu: 'AccountChangeSecretList',
submenu: [
{
- title: this.$t('AccountChangeSecret'),
- name: 'AccountChangeSecretList',
- hidden: () => !this.$hasPerm('accounts.view_changesecretautomation'),
- component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretList.vue')
+ title: this.$t('Overview'),
+ name: 'AccountChangeDashboard',
+ component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeDashboard.vue')
},
{
title: this.$t('ExecutionList'),
@@ -28,6 +27,12 @@ export default {
component: () => import(
'@/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue'
)
+ },
+ {
+ title: this.$t('AccountChangeSecret'),
+ name: 'AccountChangeSecretList',
+ hidden: () => !this.$hasPerm('accounts.view_changesecretautomation'),
+ component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretList.vue')
}
]
}
diff --git a/src/views/accounts/AccountDiscover/TaskCreateUpdate.vue b/src/views/accounts/AccountDiscover/TaskCreateUpdate.vue
index f2027bfd8..a15b5534c 100644
--- a/src/views/accounts/AccountDiscover/TaskCreateUpdate.vue
+++ b/src/views/accounts/AccountDiscover/TaskCreateUpdate.vue
@@ -15,8 +15,9 @@ export default {
return {
fields: [
[this.$t('Basic'), ['name', 'nodes', 'assets']],
+ [this.$t('发现配置'), ['is_sync_account', 'recipients']],
[this.$t('Periodic'), ['is_periodic', 'crontab', 'interval']],
- [this.$t('Other'), ['is_sync_account', 'is_active', 'recipients', 'comment']]
+ [this.$t('Other'), ['is_active', 'comment']]
],
url: '/api/v1/accounts/gather-account-automations/',
hasDetailInMsg: false,
diff --git a/src/views/accounts/Automation/index.vue b/src/views/accounts/Automation/index.vue
index ccfc44fac..69f771c7d 100644
--- a/src/views/accounts/Automation/index.vue
+++ b/src/views/accounts/Automation/index.vue
@@ -38,9 +38,9 @@ export default {
},
{
id: 'gather_account',
- display_name: this.$t('GatherAccounts'),
+ display_name: this.$t('DiscoverAccounts'),
name: 'AccountDiscoverList',
- comment: this.$t('GatherAccountsHelpText'),
+ comment: this.$t('DiscoverAccountsHelpText'),
icon: 'gather-account',
edition: 'enterprise',
tags: ['ansible']