mirror of
https://github.com/jumpserver/lina.git
synced 2025-05-11 17:48:57 +00:00
perf: update copy icon (#4692)
* perf: update change secret overview * fix: Typo in latest_secret_change_failed * Fixed: Fix dialog display order problem * Fixed: Fix: Password field disappears during user update (#4687) * fix: Update resource names and permissions for account backup automation * Fixed: Fix: Password field disappears during user update * Fixed: Account Change Secret Record List * perf: update i18n * perf: update copy icon --------- Co-authored-by: ibuler <ibuler@qq.com> Co-authored-by: w940853815 <940853815@qq.com> Co-authored-by: zhaojisen <1301338853@qq.com>
This commit is contained in:
parent
88a66039ce
commit
a34b2c7074
src
components
Apps/AccountListTable
Form
Table
AutoDataTable
DrawerListTable
TableFormatters
icons/svg
router
utils
views
accounts
AccountBackup
AccountChangeSecret
AccountDiscover
AccountPush
pam/RiskDetect
settings
users/User
@ -129,14 +129,16 @@ export const accountOtherActions = (vm) => [
|
||||
},
|
||||
{
|
||||
name: 'SecretHistory',
|
||||
// 密文历史
|
||||
title: vm.$t('HistoryPassword'),
|
||||
can: () => vm.$hasPerm('accounts.view_accountsecret'),
|
||||
type: 'primary',
|
||||
callback: ({ row }) => {
|
||||
vm.account = row
|
||||
vm.currentAccountColumn = row
|
||||
vm.$nextTick(() => {
|
||||
vm.showPasswordHistoryDialog = true
|
||||
vm.showViewSecretDialog = false
|
||||
vm.secretUrl = `/api/v1/accounts/account-secrets/${row.id}/`
|
||||
setTimeout(() => {
|
||||
vm.showViewSecretDialog = true
|
||||
})
|
||||
}
|
||||
},
|
||||
@ -198,7 +200,7 @@ export const accountQuickFilters = (vm) => [
|
||||
{
|
||||
label: vm.$t('RecentPasswordChangeFailed'),
|
||||
filter: {
|
||||
latest_secret_changed_failed: '1'
|
||||
latest_secret_change_failed: '1'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -112,7 +112,7 @@ export class FormFieldGenerator {
|
||||
let nestedFields = fieldMeta.fields || []
|
||||
const nestedFieldsMeta = fieldMeta.fieldsMeta || {}
|
||||
const nestedFieldsRemoteMeta = fieldRemoteMeta.children || {}
|
||||
if (nestedFields === '__all__') {
|
||||
if (nestedFields.toString() === '__all__') {
|
||||
nestedFields = Object.keys(nestedFieldsRemoteMeta)
|
||||
}
|
||||
for (const name of nestedFields) {
|
||||
|
@ -254,9 +254,11 @@ export default {
|
||||
|
||||
span {
|
||||
max-width: calc(100% - 25px);
|
||||
white-space: nowrap; /* 禁止换行 */
|
||||
text-overflow: ellipsis;
|
||||
//white-space: nowrap; /* 禁止换行 */
|
||||
//text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,8 +23,14 @@
|
||||
<script type="text/jsx">
|
||||
import DataTable from '@/components/Table/DataTable/index.vue'
|
||||
import {
|
||||
ActionsFormatter, ArrayFormatter, ChoicesFormatter, DateFormatter,
|
||||
DetailFormatter, DisplayFormatter, ObjectRelatedFormatter
|
||||
ActionsFormatter,
|
||||
ArrayFormatter,
|
||||
ChoicesFormatter,
|
||||
CopyableFormatter,
|
||||
DateFormatter,
|
||||
DetailFormatter,
|
||||
DisplayFormatter,
|
||||
ObjectRelatedFormatter
|
||||
} from '@/components/Table/TableFormatters'
|
||||
import i18n from '@/i18n/i18n'
|
||||
import { newURL, ObjectLocalStorage, replaceAllUUID, toSentenceCase } from '@/utils/common'
|
||||
@ -131,6 +137,11 @@ export default {
|
||||
},
|
||||
generateColumnByName(name, col) {
|
||||
switch (name) {
|
||||
case 'id':
|
||||
col.width = '290px'
|
||||
col.formatter = CopyableFormatter
|
||||
col.iconPosition = 'left'
|
||||
break
|
||||
case 'name':
|
||||
col.formatter = DetailFormatter
|
||||
col.sortable = 'custom'
|
||||
|
@ -70,6 +70,10 @@ export default {
|
||||
methods: {
|
||||
closeDrawer() {
|
||||
this.iVisible = false
|
||||
// 关闭 Drawer 后,清空所有 params 参数
|
||||
Reflect.ownKeys(this.$route.params).forEach(key => {
|
||||
Reflect.deleteProperty(this.$route.params, key)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -224,6 +224,7 @@ export default {
|
||||
},
|
||||
onUpdate({ row, col }) {
|
||||
this.$route.params.id = row.id
|
||||
this.$route.params.action = 'update'
|
||||
this.$store.dispatch('common/setDrawerActionMeta', {
|
||||
action: 'update', row: row, col: col, id: row.id
|
||||
}).then(() => {
|
||||
|
@ -1,6 +1,7 @@
|
||||
<script>
|
||||
import BaseFormatter from './base.vue'
|
||||
import { copy } from '@/utils/common'
|
||||
|
||||
export default {
|
||||
name: 'CopyableFormatter',
|
||||
extends: BaseFormatter,
|
||||
@ -10,7 +11,8 @@ export default {
|
||||
default() {
|
||||
return {
|
||||
shadow: false,
|
||||
getText: ({ cellValue }) => cellValue
|
||||
getText: ({ cellValue }) => cellValue,
|
||||
iconPosition: 'right'
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -27,6 +29,9 @@ export default {
|
||||
} else {
|
||||
return this.cellValue
|
||||
}
|
||||
},
|
||||
iconPosition() {
|
||||
return this.formatterArgs.iconPosition
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -40,11 +45,18 @@ export default {
|
||||
|
||||
<template>
|
||||
<span class="copyable">
|
||||
{{ iCellValue }} <i class="el-icon-copy-document copy" @click="copy()" />
|
||||
<span :style="{ order: 2 }">{{ iCellValue }}</span>
|
||||
<i :style="{ order: iconPosition === 'left' ? 0 : 3 } " class="el-icon-copy-document copy" @click="copy()" />
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.copyable {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px; /* 元素间距 */
|
||||
}
|
||||
|
||||
.copy {
|
||||
cursor: pointer;
|
||||
|
||||
|
@ -47,7 +47,7 @@ export default {
|
||||
beforeClick: () => {
|
||||
},
|
||||
getTitle({ row, cellValue }) {
|
||||
return cellValue || row.name
|
||||
return cellValue != null ? cellValue : row.name
|
||||
},
|
||||
getDrawerTitle: null,
|
||||
getIcon({ col, row, cellValue }) {
|
||||
|
@ -9,6 +9,7 @@ import AccountShowFormatter from './GrantedAccountShowFormatter.vue'
|
||||
import SecretViewerFormatter from './SecretViewerFormatter.vue'
|
||||
import DialogDetailFormatter from './DialogDetailFormatter.vue'
|
||||
import EditableInputFormatter from './EditableInputFormatter.vue'
|
||||
import CopyableFormatter from './CopyableFormatter.vue'
|
||||
import StatusFormatter from './StatusFormatter.vue'
|
||||
import TagsFormatter from './TagsFormatter.vue'
|
||||
import LabelsFormatter from './LabelsFormatter.vue'
|
||||
@ -44,6 +45,7 @@ export default {
|
||||
SwitchFormatter,
|
||||
PlatformFormatter,
|
||||
AccountInfoFormatter,
|
||||
CopyableFormatter,
|
||||
DiscoverConfirmFormatter,
|
||||
AccountConnectFormatter
|
||||
}
|
||||
@ -62,6 +64,7 @@ export {
|
||||
EditableInputFormatter,
|
||||
StatusFormatter,
|
||||
TagsFormatter,
|
||||
CopyableFormatter,
|
||||
ObjectRelatedFormatter,
|
||||
TwoTabFormatter,
|
||||
ProtocolsFormatter,
|
||||
|
@ -1,28 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="40px" height="36px" viewBox="0 0 40 36" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
<svg width="128px" height="122px" viewBox="0 0 128 122" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<polygon id="路径" fill="#646A73"
|
||||
points="21.8181818 10 21.8181818 26.3636364 18.1818182 26.3636364 18.1818182 10"></polygon>
|
||||
<polygon id="路径" fill-opacity="0.2" fill="#000000"
|
||||
points="21.8181818 10 21.8181818 26.3636364 18.1818182 26.3636364 18.1818182 10"></polygon>
|
||||
<path d="M5.45454545,1.81818182 C5.45454545,0.814027728 6.26857318,0 7.27272727,0 L32.7272727,0 C33.7314268,0 34.5454545,0.814027728 34.5454545,1.81818182 L34.5454545,9.09090909 C34.5454545,10.0950632 33.7314268,10.9090909 32.7272727,10.9090909 L7.27272727,10.9090909 C6.26857318,10.9090909 5.45454545,10.0950632 5.45454545,9.09090909 L5.45454545,1.81818182 Z M9.09090909,3.63636364 L9.09090909,7.27272727 L30.9090909,7.27272727 L30.9090909,3.63636364 L9.09090909,3.63636364 Z"
|
||||
id="形状" fill="#646A73"></path>
|
||||
<path d="M5.45454545,1.81818182 C5.45454545,0.814027728 6.26857318,0 7.27272727,0 L32.7272727,0 C33.7314268,0 34.5454545,0.814027728 34.5454545,1.81818182 L34.5454545,9.09090909 C34.5454545,10.0950632 33.7314268,10.9090909 32.7272727,10.9090909 L7.27272727,10.9090909 C6.26857318,10.9090909 5.45454545,10.0950632 5.45454545,9.09090909 L5.45454545,1.81818182 Z M9.09090909,3.63636364 L9.09090909,7.27272727 L30.9090909,7.27272727 L30.9090909,3.63636364 L9.09090909,3.63636364 Z"
|
||||
id="形状" fill-opacity="0.2" fill="#000000"></path>
|
||||
<path d="M8.93454545,17.1836364 C9.27077193,16.67175 9.84211106,16.3636363 10.4545455,16.3636363 L29.52,16.3636363 C30.1314421,16.3636363 30.7018887,16.6711633 31.0381818,17.1818182 L36.7909091,25.9090909 L33.7545455,27.9090909 L28.5418182,20 L11.4363636,20 L6.24727273,27.9072727 L3.20727273,25.9109091 L8.93454545,17.1836364 Z"
|
||||
id="路径" fill="#646A73"></path>
|
||||
<path d="M8.93454545,17.1836364 C9.27077193,16.67175 9.84211106,16.3636363 10.4545455,16.3636363 L29.52,16.3636363 C30.1314421,16.3636363 30.7018887,16.6711633 31.0381818,17.1818182 L36.7909091,25.9090909 L33.7545455,27.9090909 L28.5418182,20 L11.4363636,20 L6.24727273,27.9072727 L3.20727273,25.9109091 L8.93454545,17.1836364 Z"
|
||||
id="路径" fill-opacity="0.2" fill="#000000"></path>
|
||||
<path d="M0,26.3636364 C0,25.3594823 0.814027728,24.5454545 1.81818182,24.5454545 L9.09090909,24.5454545 C10.0950632,24.5454545 10.9090909,25.3594823 10.9090909,26.3636364 L10.9090909,33.6363636 C10.9090909,34.6405177 10.0950632,35.4545455 9.09090909,35.4545455 L1.81818182,35.4545455 C0.814027728,35.4545455 0,34.6405177 0,33.6363636 L0,26.3636364 Z M3.63636364,28.1818182 L3.63636364,31.8181818 L7.27272727,31.8181818 L7.27272727,28.1818182 L3.63636364,28.1818182 Z"
|
||||
id="形状" fill="#646A73"></path>
|
||||
<path d="M0,26.3636364 C0,25.3594823 0.814027728,24.5454545 1.81818182,24.5454545 L9.09090909,24.5454545 C10.0950632,24.5454545 10.9090909,25.3594823 10.9090909,26.3636364 L10.9090909,33.6363636 C10.9090909,34.6405177 10.0950632,35.4545455 9.09090909,35.4545455 L1.81818182,35.4545455 C0.814027728,35.4545455 0,34.6405177 0,33.6363636 L0,26.3636364 Z M3.63636364,28.1818182 L3.63636364,31.8181818 L7.27272727,31.8181818 L7.27272727,28.1818182 L3.63636364,28.1818182 Z"
|
||||
id="形状" fill-opacity="0.2" fill="#000000"></path>
|
||||
<path d="M14.5454545,26.3636364 C14.5454545,25.3594823 15.3594823,24.5454545 16.3636364,24.5454545 L23.6363636,24.5454545 C24.6405177,24.5454545 25.4545455,25.3594823 25.4545455,26.3636364 L25.4545455,33.6363636 C25.4545455,34.6405177 24.6405177,35.4545455 23.6363636,35.4545455 L16.3636364,35.4545455 C15.3594823,35.4545455 14.5454545,34.6405177 14.5454545,33.6363636 L14.5454545,26.3636364 Z M18.1818182,28.1818182 L18.1818182,31.8181818 L21.8181818,31.8181818 L21.8181818,28.1818182 L18.1818182,28.1818182 Z"
|
||||
id="形状" fill="#646A73"></path>
|
||||
<path d="M14.5454545,26.3636364 C14.5454545,25.3594823 15.3594823,24.5454545 16.3636364,24.5454545 L23.6363636,24.5454545 C24.6405177,24.5454545 25.4545455,25.3594823 25.4545455,26.3636364 L25.4545455,33.6363636 C25.4545455,34.6405177 24.6405177,35.4545455 23.6363636,35.4545455 L16.3636364,35.4545455 C15.3594823,35.4545455 14.5454545,34.6405177 14.5454545,33.6363636 L14.5454545,26.3636364 Z M18.1818182,28.1818182 L18.1818182,31.8181818 L21.8181818,31.8181818 L21.8181818,28.1818182 L18.1818182,28.1818182 Z"
|
||||
id="形状" fill-opacity="0.2" fill="#000000"></path>
|
||||
<path d="M29.0909091,26.3636364 C29.0909091,25.3594823 29.9049368,24.5454545 30.9090909,24.5454545 L38.1818182,24.5454545 C39.1859723,24.5454545 40,25.3594823 40,26.3636364 L40,33.6363636 C40,34.6405177 39.1859723,35.4545455 38.1818182,35.4545455 L30.9090909,35.4545455 C29.9049368,35.4545455 29.0909091,34.6405177 29.0909091,33.6363636 L29.0909091,26.3636364 Z M32.7272727,28.1818182 L32.7272727,31.8181818 L36.3636364,31.8181818 L36.3636364,28.1818182 L32.7272727,28.1818182 Z"
|
||||
id="形状" fill="#646A73"></path>
|
||||
<path d="M29.0909091,26.3636364 C29.0909091,25.3594823 29.9049368,24.5454545 30.9090909,24.5454545 L38.1818182,24.5454545 C39.1859723,24.5454545 40,25.3594823 40,26.3636364 L40,33.6363636 C40,34.6405177 39.1859723,35.4545455 38.1818182,35.4545455 L30.9090909,35.4545455 C29.9049368,35.4545455 29.0909091,34.6405177 29.0909091,33.6363636 L29.0909091,26.3636364 Z M32.7272727,28.1818182 L32.7272727,31.8181818 L36.3636364,31.8181818 L36.3636364,28.1818182 L32.7272727,28.1818182 Z"
|
||||
id="形状" fill-opacity="0.2" fill="#000000"></path>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="编组" fill="#2C2C2C" fill-rule="nonzero">
|
||||
<path d="M19.8,66.9375 L58.2,66.9375 L58.2,78.75 L67.8,78.75 L67.8,66.9375 L106.2,66.9375 L106.2,78.75 L115.8,78.75 L115.8,64.5774609 C115.8,59.3676562 112.356,55.125 108.118,55.125 L67.8,55.125 L67.8,39.375 L75.8,39.375 C79.334,39.375 82.2,35.8484766 82.2,31.5 L82.2,7.875 C82.2,3.52652344 79.334,0 75.8,0 L50.2,0 C46.666,0 43.8,3.52652344 43.8,7.875 L43.8,31.5 C43.8,33.6754688 44.516,35.6442188 45.674,37.0691016 C46.832,38.4939844 48.432,39.375 50.2,39.375 L58.2,39.375 L58.2,55.125 L17.882,55.125 C13.644,55.125 10.2,59.3651953 10.2,64.5774609 L10.2,78.75 L19.8,78.75 L19.8,66.9375 Z M53.4,27.5625 L53.4,11.8125 L72.6,11.8125 L72.6,27.5625 L53.4,27.5625 Z M121.6,82.625 L102.4,82.625 C98.866,82.625 96,86.1515234 96,90.5 L96,114.125 C96,118.473477 98.866,122 102.4,122 L121.6,122 C125.134,122 128,118.473477 128,114.125 L128,90.5 C128,86.1515234 125.134,82.625 121.6,82.625 Z M118.4,110.1875 L105.6,110.1875 L105.6,94.4375 L118.4,94.4375 L118.4,110.1875 Z M73.6,82.625 L54.4,82.625 C50.866,82.625 48,86.1515234 48,90.5 L48,114.125 C48,118.473477 50.866,122 54.4,122 L73.6,122 C77.134,122 80,118.473477 80,114.125 L80,90.5 C80,86.1515234 77.134,82.625 73.6,82.625 Z M70.4,110.1875 L57.6,110.1875 L57.6,94.4375 L70.4,94.4375 L70.4,110.1875 Z M25.6,82.625 L6.4,82.625 C2.866,82.625 0,86.1515234 0,90.5 L0,114.125 C0,118.473477 2.866,122 6.4,122 L25.6,122 C29.134,122 32,118.473477 32,114.125 L32,90.5 C32,86.1515234 29.134,82.625 25.6,82.625 Z M22.4,110.1875 L9.6,110.1875 L9.6,94.4375 L22.4,94.4375 L22.4,110.1875 Z"
|
||||
id="形状"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before (image error) Size: 5.5 KiB After (image error) Size: 1.8 KiB |
@ -66,7 +66,7 @@ export default [
|
||||
name: 'AccountDiscoverTaskExecutionList',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('ExecutionList'),
|
||||
title: i18n.t('ExecutionHistory'),
|
||||
// activeMenu: '/console/accounts/automations',
|
||||
permissions: ['accounts.view_gatheraccountsexecution']
|
||||
}
|
||||
@ -94,81 +94,6 @@ export default [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'account-change-secret',
|
||||
name: 'AccountChangeSecret',
|
||||
component: empty,
|
||||
redirect: {
|
||||
name: 'AccountChangeSecretList'
|
||||
},
|
||||
meta: {
|
||||
title: i18n.t('BaseAccountChangeSecret'),
|
||||
icon: 'change-password',
|
||||
app: 'accounts'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/index.vue'),
|
||||
name: 'AccountChangeSecretList',
|
||||
meta: {
|
||||
menuTitle: i18n.t('ChangeSecret'),
|
||||
title: i18n.t('ChangeSecret'),
|
||||
permissions: ['accounts.view_changesecretautomation']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue'),
|
||||
name: 'AccountChangeSecretCreate',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('AssetChangeSecretCreate'),
|
||||
permissions: ['accounts.add_changesecretautomation']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':id/update',
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue'),
|
||||
name: 'AccountChangeSecretUpdate',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('AssetChangeSecretUpdate'),
|
||||
permissions: ['accounts.change_changesecretautomation']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':id',
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/Detail/index.vue'),
|
||||
name: 'AccountChangeSecretDetail',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('ChangeSecret'),
|
||||
permissions: ['accounts.view_changesecretautomation']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'executions',
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/Executions/AccountChangeSecretExecutionList.vue'),
|
||||
name: 'AccountChangeSecretExecutionList',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('ExecutionList'),
|
||||
permissions: ['accounts.view_changesecretexecution']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'executions/:id',
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/ExecutionDetail/index.vue'),
|
||||
name: 'AccountChangeSecretExecutionDetail',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('ExecutionDetail'),
|
||||
permissions: ['accounts.view_changesecretexecution']
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'account-push',
|
||||
name: 'AccountPush',
|
||||
@ -229,7 +154,7 @@ export default [
|
||||
name: 'AccountPushExecutionList',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('ExecutionList'),
|
||||
title: i18n.t('ExecutionHistory'),
|
||||
permissions: ['accounts.view_pushaccountexecution']
|
||||
}
|
||||
},
|
||||
@ -255,7 +180,7 @@ export default [
|
||||
title: i18n.t('AccountBackup'),
|
||||
app: 'accounts',
|
||||
icon: 'backup',
|
||||
resource: 'accountbackupautomation'
|
||||
resource: 'backupaccountautomation'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
@ -266,7 +191,7 @@ export default [
|
||||
menuTitle: i18n.t('AccountBackup'),
|
||||
title: i18n.t('AccountBackupList'),
|
||||
// activeMenu: '/console/accounts/automations',
|
||||
permissions: ['accounts.view_accountbackupautomation']
|
||||
permissions: ['accounts.view_backupaccountautomation']
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ export default {
|
||||
name: 'AccountAutomation',
|
||||
component: empty,
|
||||
meta: {
|
||||
title: i18n.t('Automation'),
|
||||
title: i18n.tc('Automation'),
|
||||
icon: 'accounts',
|
||||
permissions: []
|
||||
},
|
||||
|
@ -2,6 +2,81 @@ import empty from '@/layout/empty.vue'
|
||||
import i18n from '@/i18n/i18n'
|
||||
|
||||
export default [
|
||||
{
|
||||
path: 'account-change-secret',
|
||||
name: 'AccountChangeSecret',
|
||||
component: empty,
|
||||
redirect: {
|
||||
name: 'AccountChangeSecretList'
|
||||
},
|
||||
meta: {
|
||||
title: i18n.t('BaseAccountChangeSecret'),
|
||||
icon: 'change-password',
|
||||
app: 'accounts'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/index.vue'),
|
||||
name: 'AccountChangeSecretList',
|
||||
meta: {
|
||||
menuTitle: i18n.t('ChangeSecret'),
|
||||
title: i18n.t('ChangeSecret'),
|
||||
permissions: ['accounts.view_changesecretautomation']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue'),
|
||||
name: 'AccountChangeSecretCreate',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('AssetChangeSecretCreate'),
|
||||
permissions: ['accounts.add_changesecretautomation']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':id/update',
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue'),
|
||||
name: 'AccountChangeSecretUpdate',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('AssetChangeSecretUpdate'),
|
||||
permissions: ['accounts.change_changesecretautomation']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':id',
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/Detail/index.vue'),
|
||||
name: 'AccountChangeSecretDetail',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('ChangeSecret'),
|
||||
permissions: ['accounts.view_changesecretautomation']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'executions',
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/Executions/AccountChangeSecretExecutionList.vue'),
|
||||
name: 'AccountChangeSecretExecutionList',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('ExecutionHistory'),
|
||||
permissions: ['accounts.view_changesecretexecution']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'executions/:id',
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/ExecutionDetail/index.vue'),
|
||||
name: 'AccountChangeSecretExecutionDetail',
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('ExecutionDetail'),
|
||||
permissions: ['accounts.view_changesecretexecution']
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'check',
|
||||
name: 'AccountCheck',
|
||||
|
@ -172,7 +172,7 @@ export default {
|
||||
name: 'Execution',
|
||||
component: () => import('@/views/ops/Execution'),
|
||||
meta: {
|
||||
title: i18n.t('ExecutionList'),
|
||||
title: i18n.t('ExecutionHistory'),
|
||||
icon: 'history',
|
||||
permissions: ['ops.view_jobexecution']
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ export const copy = _.throttle(function(value) {
|
||||
inputDom.select()
|
||||
document?.execCommand('copy')
|
||||
message({
|
||||
message: i18n.t('CopySuccess'),
|
||||
message: i18n.t('Copied'),
|
||||
type: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
|
@ -3,12 +3,13 @@
|
||||
:create-drawer="createDrawer"
|
||||
:detail-drawer="detailDrawer"
|
||||
:header-actions="headerActions"
|
||||
:resource="$tc('AccountBackupTask')"
|
||||
:table-config="tableConfig"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ArrayFormatter, DetailFormatter, ActionsFormatter } from '@/components/Table/TableFormatters'
|
||||
import { ActionsFormatter, ArrayFormatter, DetailFormatter } from '@/components/Table/TableFormatters'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
import { GenericListTable } from '@/layout/components'
|
||||
|
||||
@ -26,7 +27,7 @@ export default {
|
||||
url: '/api/v1/accounts/account-backup-plans/',
|
||||
permissions: {
|
||||
app: 'accounts',
|
||||
resource: 'accountbackupautomation'
|
||||
resource: 'backupaccountautomation'
|
||||
},
|
||||
columns: [
|
||||
'name', 'backup_type', 'org_name', 'is_periodic',
|
||||
@ -57,7 +58,7 @@ export default {
|
||||
executed_amount: {
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
can: vm.$hasPerm('accounts.view_accountbackupexecution'),
|
||||
can: vm.$hasPerm('accounts.view_backupaccountexecution'),
|
||||
getRoute({ row }) {
|
||||
return {
|
||||
name: 'AccountBackupList',
|
||||
@ -79,7 +80,7 @@ export default {
|
||||
order: 1,
|
||||
name: 'execute',
|
||||
type: 'primary',
|
||||
can: this.$hasPerm('accounts.add_accountbackupexecution'),
|
||||
can: this.$hasPerm('accounts.add_backupaccountexecution'),
|
||||
callback: function({ row }) {
|
||||
this.$axios.post(
|
||||
`/api/v1/accounts/account-backup-plan-executions/`,
|
||||
|
@ -20,15 +20,15 @@ export default {
|
||||
activeMenu: 'AccountBackupList',
|
||||
submenu: [
|
||||
{
|
||||
title: this.$t('AccountBackup'),
|
||||
title: this.$tc('AccountBackupTask', 2),
|
||||
name: 'AccountBackupList',
|
||||
hidden: !this.$hasPerm('accounts.view_accountbackupautomation'),
|
||||
hidden: !this.$hasPerm('accounts.view_backupaccountautomation'),
|
||||
component: () => import('@/views/accounts/AccountBackup/AccountBackupList.vue')
|
||||
},
|
||||
{
|
||||
title: this.$t('ExecutionList'),
|
||||
title: this.$t('ExecutionHistory'),
|
||||
name: 'AccountBackupExecutionList',
|
||||
hidden: !this.$hasPerm('accounts.view_accountbackupexecution'),
|
||||
hidden: !this.$hasPerm('accounts.view_backupaccountexecution'),
|
||||
component: () => import('@/views/accounts/AccountBackup/Executions/AccountBackupExecutionList.vue')
|
||||
}
|
||||
]
|
||||
|
@ -3,6 +3,7 @@
|
||||
:create-drawer="createDrawer"
|
||||
:detail-drawer="detailDrawer"
|
||||
:header-actions="headerActions"
|
||||
:resource="$tc('AccountChangeSecret')"
|
||||
:table-config="tableConfig"
|
||||
/>
|
||||
</template>
|
||||
|
@ -36,10 +36,9 @@ export default {
|
||||
label: this.$t('Asset'),
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
drawer: true,
|
||||
can: this.$hasPerm('assets.view_asset'),
|
||||
getTitle({ row }) {
|
||||
return row.asset.name
|
||||
},
|
||||
getTitle: ({ row }) => row.asset.name,
|
||||
getRoute({ row }) {
|
||||
return {
|
||||
name: 'AssetDetail',
|
||||
@ -52,10 +51,9 @@ export default {
|
||||
label: this.$t('Username'),
|
||||
formatter: DetailFormatter,
|
||||
formatterArgs: {
|
||||
drawer: true,
|
||||
can: this.$hasPerm('accounts.view_account'),
|
||||
getTitle({ row }) {
|
||||
return row.account.username
|
||||
},
|
||||
getTitle: ({ row }) => row.account.username,
|
||||
getRoute({ row }) {
|
||||
return {
|
||||
name: 'AssetAccountDetail',
|
||||
|
@ -26,12 +26,12 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
logConfig: {
|
||||
title: this.$t('CurrentStatus'),
|
||||
title: this.$t('TaskSummary'),
|
||||
tip: this.$t('CurrentStatus')
|
||||
},
|
||||
sessionConfig: {
|
||||
title: this.$t('ChangeSecretTaskStatus'),
|
||||
tip: this.$t('ChangeSecretTaskStatus')
|
||||
title: this.$t('ExecutionSummary'),
|
||||
tip: this.$t('ChangeSecretExecutionStatus')
|
||||
},
|
||||
data: {
|
||||
total_count_change_secrets: 0,
|
||||
@ -47,19 +47,19 @@ export default {
|
||||
LogItems() {
|
||||
return [
|
||||
{
|
||||
title: this.$t('TaskCount'),
|
||||
title: this.$t('Tasks'),
|
||||
body: {
|
||||
count: this.data.total_count_change_secrets
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('ScheduledTaskCount'),
|
||||
title: this.$t('Periodic'),
|
||||
body: {
|
||||
count: this.data.total_count_periodic_change_secrets
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('AssetsOfNumber'),
|
||||
title: this.$t('Assets'),
|
||||
body: {
|
||||
count: this.data.total_count_change_secret_assets
|
||||
}
|
||||
@ -69,19 +69,19 @@ export default {
|
||||
sessionItems() {
|
||||
return [
|
||||
{
|
||||
title: this.$t('TaskExecutionCount'),
|
||||
title: this.$t('Total'),
|
||||
body: {
|
||||
count: this.data.total_count_change_secret_executions
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('SuccessCount'),
|
||||
title: this.$t('Success'),
|
||||
body: {
|
||||
count: this.data.total_count_success_change_secret_executions
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('FailCount'),
|
||||
title: this.$t('Failed'),
|
||||
body: {
|
||||
count: this.data.total_count_failed_change_secret_executions
|
||||
}
|
||||
@ -116,7 +116,7 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.margin-top-10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="16">
|
||||
<el-col :sm="24" :md="24" class="margin-top-10">
|
||||
<el-col :md="24" :sm="24" class="margin-top-10">
|
||||
<SummaryCountCard :config="logConfig" :items="LogItems" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -22,8 +22,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
logConfig: {
|
||||
title: this.$t('OngoingPwdChange'),
|
||||
tip: this.$t('OngoingPwdChange')
|
||||
title: this.$t('RunningSummary')
|
||||
},
|
||||
data: {
|
||||
total_count_ongoing_change_secret: 0,
|
||||
@ -36,21 +35,21 @@ export default {
|
||||
LogItems() {
|
||||
return [
|
||||
{
|
||||
title: this.$t('TaskExecutionCount'),
|
||||
title: this.$t('Tasks'),
|
||||
body: {
|
||||
route: { name: `LoginLogList` },
|
||||
count: this.data.total_count_ongoing_change_secret
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('AssetsOfNumber'),
|
||||
title: this.$t('Assets'),
|
||||
body: {
|
||||
route: { name: `LoginLogList` },
|
||||
count: this.data.total_count_ongoing_change_secret_assets
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('AccountAmount'),
|
||||
title: this.$t('Accounts'),
|
||||
body: {
|
||||
route: { name: `OperateLogList` },
|
||||
count: this.data.total_count_ongoing_change_secret_accounts
|
||||
@ -82,7 +81,7 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.margin-top-10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
@ -22,13 +22,13 @@ export default {
|
||||
component: () => import('./Overview/index.vue')
|
||||
},
|
||||
{
|
||||
title: this.$t('ChangeSecret'),
|
||||
title: this.$tc('ChangeSecretTask', 2),
|
||||
name: 'AccountChangeSecretList',
|
||||
hidden: () => !this.$hasPerm('accounts.view_changesecretautomation'),
|
||||
component: () => import('./AccountChangeSecretList.vue')
|
||||
},
|
||||
{
|
||||
title: this.$t('ExecutionList'),
|
||||
title: this.$t('ExecutionHistory'),
|
||||
name: 'AccountChangeSecretExecutionList',
|
||||
hidden: () => !this.$hasPerm('accounts.view_changesecretexecution'),
|
||||
component: () => import('@/views/accounts/AccountChangeSecret/Executions/AccountChangeSecretExecutionList.vue')
|
||||
|
@ -3,6 +3,7 @@
|
||||
:create-drawer="createDrawer"
|
||||
:detail-drawer="detailDrawer"
|
||||
:header-actions="headerActions"
|
||||
:resource="$tc('AccountDiscoverTask')"
|
||||
:table-config="tableConfig"
|
||||
/>
|
||||
</template>
|
||||
|
@ -2,7 +2,6 @@
|
||||
<TabPage
|
||||
:active-menu.sync="config.activeMenu"
|
||||
:submenu="config.submenu"
|
||||
:disabled="!hasValidLicense"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@ -27,13 +26,13 @@ export default {
|
||||
component: () => import('@/views/accounts/AccountDiscover/AccountDiscoverList.vue')
|
||||
},
|
||||
{
|
||||
title: this.$t('AccountDiscover'),
|
||||
title: this.$tc('DiscoverAccountTask', 2),
|
||||
name: 'AccountDiscoverTaskList',
|
||||
hidden: !this.$hasPerm('accounts.view_gatheraccountsautomation'),
|
||||
component: () => import('@/views/accounts/AccountDiscover/AccountDiscoverTaskList.vue')
|
||||
},
|
||||
{
|
||||
title: this.$t('ExecutionList'),
|
||||
title: this.$t('ExecutionHistory'),
|
||||
name: 'AccountDiscoverTaskExecutionList',
|
||||
hidden: !this.$hasPerm('accounts.view_gatheraccountsexecution'),
|
||||
component: () => import('@/views/accounts/AccountDiscover/TaskExecutionList.vue')
|
||||
|
@ -16,13 +16,13 @@ export default {
|
||||
activeMenu: 'AccountPushList',
|
||||
submenu: [
|
||||
{
|
||||
title: this.$t('AccountPushList'),
|
||||
title: this.$tc('AccountPushTask', 2),
|
||||
name: 'AccountPushList',
|
||||
hidden: !this.$hasPerm('accounts.view_pushaccountautomation'),
|
||||
component: () => import('@/views/accounts/AccountPush/AccountPushList.vue')
|
||||
},
|
||||
{
|
||||
title: this.$t('ExecutionList'),
|
||||
title: this.$t('ExecutionHistory'),
|
||||
name: 'AccountPushExecutionList',
|
||||
hidden: !this.$hasPerm('accounts.view_pushaccountexecution'),
|
||||
component: () => import('@/views/accounts/AccountPush/AccountPushExecutionList.vue')
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" :disabled="!hasValidLicense" />
|
||||
<TabPage :active-menu.sync="config.activeMenu" :disabled="!hasValidLicense" :submenu="config.submenu" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -29,7 +29,7 @@ export default {
|
||||
component: () => import('./AccountCheckTaskList.vue')
|
||||
},
|
||||
{
|
||||
title: this.$t('ExecutionList'),
|
||||
title: this.$t('ExecutionHistory'),
|
||||
name: 'AccountCheckExecution',
|
||||
hidden: !this.$hasPerm('accounts.view_checkaccountautomation'),
|
||||
component: () => import('./AccountCheckExecutionList.vue')
|
||||
|
@ -7,6 +7,7 @@
|
||||
<script>
|
||||
import IBox from '@/components/IBox'
|
||||
import { GenericCreateUpdateForm } from '@/layout/components'
|
||||
|
||||
export default {
|
||||
name: 'Base',
|
||||
components: {
|
||||
@ -42,6 +43,5 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
@ -39,6 +39,7 @@ export default {
|
||||
'id', 'name', 'type', 'is_default', 'comment', 'actions'
|
||||
],
|
||||
columnsShow: {
|
||||
default: ['name', 'type', 'comment', 'is_default', 'actions'],
|
||||
min: ['name', 'type', 'actions']
|
||||
},
|
||||
columnsMeta: {
|
||||
|
@ -38,7 +38,7 @@ export default {
|
||||
name: 'TaskDetail'
|
||||
},
|
||||
{
|
||||
title: this.$t('ExecutionList'),
|
||||
title: this.$t('ExecutionHistory'),
|
||||
name: 'TaskHistory',
|
||||
hidden: () => !this.$hasPerm('ops.view_celerytaskexecution')
|
||||
}
|
||||
|
@ -67,8 +67,7 @@ export default {
|
||||
if (formValue.update_password) {
|
||||
return true
|
||||
}
|
||||
|
||||
return this.$route.meta.action !== 'update' || formValue.source !== 'local'
|
||||
return formValue.source !== 'local' || this.$route.params.action !== 'update'
|
||||
}
|
||||
},
|
||||
password: {
|
||||
|
Loading…
Reference in New Issue
Block a user