perf: Translate

This commit is contained in:
feng
2025-02-12 11:43:45 +08:00
committed by feng626
parent 339c1ab227
commit b524848742
13 changed files with 68 additions and 76 deletions

View File

@@ -20,7 +20,7 @@ export default [
component: () => import('@/views/sessions/SessionList/index.vue'),
name: 'AccountSessionList',
meta: {
title: i18n.t('AccountSessions'),
title: i18n.t('SessionList'),
permissions: []
}
}
@@ -45,7 +45,7 @@ export default [
component: () => import('@/views/accounts/AccountActivity/AccountActivityList.vue'),
name: 'AccountActivityList',
meta: {
title: i18n.t('AccountActivity'),
title: i18n.t('Activity'),
permissions: ['audits.view_operatelog']
}
}

View File

@@ -113,7 +113,7 @@ export default [
name: 'AccountChangeSecretList',
meta: {
menuTitle: i18n.t('ChangeSecret'),
title: i18n.t('AccountChangeSecret'),
title: i18n.t('ChangeSecret'),
permissions: ['accounts.view_changesecretautomation']
}
},
@@ -143,7 +143,7 @@ export default [
name: 'AccountChangeSecretDetail',
hidden: true,
meta: {
title: i18n.t('AccountChangeSecret'),
title: i18n.t('ChangeSecret'),
permissions: ['accounts.view_changesecretautomation']
}
},
@@ -296,8 +296,7 @@ export default [
component: () => import('@/views/accounts/AccountBackup/AccountBackupDetail/index.vue'),
name: 'AccountBackupDetail',
meta: {
title: i18n.t('AccountBackupDetail'),
activeMenu: '/console/accounts/automations'
title: i18n.t('AccountBackupDetail')
},
hidden: true
},

View File

@@ -20,18 +20,14 @@ export default {
return {
plan: { name: '', comment: '' },
config: {
url: `/api/v1/accounts/account-backup-plans/`,
url: `/api/v1/accounts/account-backup-plans`,
activeMenu: 'AccountBackupInfo',
submenu: [
{
title: this.$t('Basic'),
name: 'AccountBackupInfo'
}
],
actions: {
detailApiUrl: `/api/v1/accounts/account-backup-plans/`,
deleteSuccessRoute: 'AccountBackupList'
}
]
}
}
}

View File

@@ -24,17 +24,30 @@ export default {
tableConfig: {
url: '/api/v1/accounts/account-backup-plan-executions/',
columns: [
'automation', 'trigger',
'automation', 'backup_name', 'trigger',
'date_start', 'date_finished', 'duration', 'actions'
],
columnsShow: {
default: [
'automation', 'trigger',
'automation', 'backup_name', 'trigger',
'date_start', 'date_finished', 'duration', 'actions'
]
},
columnsMeta: {
automation: {
label: this.$t('ID'),
formatter: DetailFormatter,
formatterArgs: {
route: 'AccountBackupExecutionDetail',
getRoute: ({ row }) => ({
name: 'AccountBackupExecutionDetail',
params: { id: row.id }
}),
drawer: true,
can: this.$hasPerm('accounts.view_backupaccountexecution')
}
},
backup_name: {
label: this.$t('DisplayName'),
formatter: DetailFormatter,
formatterArgs: {
@@ -67,15 +80,6 @@ export default {
openTaskPage(row['id'])
}
},
{
name: 'detail',
title: this.$t('Detail'),
type: 'info',
can: this.$hasPerm('accounts.view_backupaccountexecution'),
callback: function({ row }) {
return this.$router.push({ name: 'AccountBackupExecutionDetail', params: { id: row.id }})
}
},
{
name: 'report',
title: this.$t('Report'),

View File

@@ -8,9 +8,9 @@
</template>
<script>
import { GenericListTable } from '@/layout/components'
import { ArrayFormatter, DetailFormatter } from '@/components/Table/TableFormatters'
import { openTaskPage } from '@/utils/jms'
import { GenericListTable } from '@/layout/components'
export default {
name: 'AccountBackupList',
@@ -46,13 +46,7 @@ export default {
name: {
formatter: DetailFormatter,
formatterArgs: {
route: 'AccountBackupDetail',
getRoute: ({ row }) => ({
name: 'AccountBackupDetail',
params: { id: row.id },
query: { type: 'pam' }
}),
drawer: true
route: 'AccountBackupDetail'
}
},
types: {

View File

@@ -28,9 +28,16 @@ export default {
},
columnsMeta: {
automation: {
label: this.$t('ExecutionID'),
formatter: function(row) {
return <span>{row.automation}</span>
label: this.$t('ID'),
formatter: DetailFormatter,
formatterArgs: {
route: 'AccountChangeSecretExecutionDetail',
getRoute: ({ row }) => ({
name: 'AccountChangeSecretExecutionDetail',
params: { id: row.id }
}),
drawer: true,
can: this.$hasPerm('accounts.view_changesecretexecution')
}
},
change_secret_name: {
@@ -81,15 +88,6 @@ export default {
openTaskPage(row['id'])
}
},
{
name: 'detail',
title: this.$t('Detail'),
type: 'info',
can: this.$hasPerm('accounts.view_changesecretexecution'),
callback: function({ row }) {
return this.$router.push({ name: 'AccountChangeSecretExecutionDetail', params: { id: row.id }})
}
},
{
name: 'report',
title: this.$t('Report'),

View File

@@ -22,7 +22,7 @@ export default {
component: () => import('@/views/dashboard/ChangeSecret')
},
{
title: this.$t('AccountChangeSecret'),
title: this.$t('ChangeSecret'),
name: 'AccountChangeSecretList',
hidden: () => !this.$hasPerm('accounts.view_changesecretautomation'),
component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretList.vue')
@@ -36,7 +36,7 @@ export default {
)
},
{
title: this.$t('RecordList'),
title: this.$t('AccountRecord'),
name: 'ChangeSecretRecord',
hidden: () => !this.$hasPerm('accounts.view_changesecretrecord'),
component: () => import(

View File

@@ -35,9 +35,15 @@ export default {
],
columnsMeta: {
automation: {
label: this.$t('TaskID'),
formatter: function(row) {
return <span>{row.automation}</span>
label: this.$t('ID'),
formatter: DetailFormatter,
formatterArgs: {
route: 'AccountDiscoverExecutionDetail',
getRoute: ({ row }) => ({
name: 'AccountDiscoverExecutionDetail',
params: { id: row.id }
}),
drawer: true
}
},
account_gather_name: {
@@ -52,7 +58,8 @@ export default {
}),
drawer: true
},
id: ({ row }) => row.automation
id: ({ row }) => row.automation,
can: this.$hasPerm('accounts.view_gatheraccountsexecution')
},
timedelta: {
label: this.$t('TimeDelta'),
@@ -78,15 +85,6 @@ export default {
openTaskPage(row['id'])
}
},
{
name: 'detail',
title: this.$t('Detail'),
type: 'info',
callback: ({ row }) => {
this.handleDetailCallback(row)
return this.$router.push({ name: 'AccountDiscoverExecutionDetail', params: { id: row.id }})
}
},
{
name: 'report',
title: this.$t('Report'),

View File

@@ -8,12 +8,10 @@
<script>
import { GenericDetailPage } from '@/layout/components'
import TwoCol from '@/layout/components/Page/TwoColPage.vue'
import AccountPushInfo from './AccountPushInfo.vue'
export default {
components: {
TwoCol,
GenericDetailPage,
AccountPushInfo
},
@@ -28,7 +26,7 @@ export default {
{
title: this.$t('Basic'),
name: 'AccountPushInfo',
hidden: () => !this.$hasPerm('accounts.view_changesecretautomation')
hidden: () => !this.$hasPerm('accounts.view_pushaccountautomation')
}
]
}

View File

@@ -1,5 +1,10 @@
<template>
<GenericListTable ref="listTable" :header-actions="headerActions" :table-config="tableConfig" />
<GenericListTable
ref="listTable"
:detail-drawer="detailDrawer"
:header-actions="headerActions"
:table-config="tableConfig"
/>
</template>
<script>
@@ -14,6 +19,7 @@ export default {
},
data() {
return {
detailDrawer: () => import('@/views/accounts/AccountPush/AccountPushExecutionDetail/index.vue'),
tableConfig: {
url: '/api/v1/accounts/push-account-executions',
columns: [
@@ -28,9 +34,16 @@ export default {
},
columnsMeta: {
automation: {
label: this.$t('ExecutionID'),
formatter: function(row) {
return <span>{row.automation}</span>
label: this.$t('ID'),
formatter: DetailFormatter,
formatterArgs: {
route: 'AccountPushExecutionDetail',
getRoute: ({ row }) => ({
name: 'AccountPushExecutionDetail',
params: { id: row.id }
}),
drawer: true,
can: this.$hasPerm('accounts.view_pushaccountexecution')
}
},
push_user_name: {
@@ -81,14 +94,6 @@ export default {
openTaskPage(row['id'])
}
},
{
name: 'detail',
title: this.$t('Detail'),
can: this.$hasPerm('accounts.view_pushaccountexecution'),
callback: function({ row }) {
return this.$router.push({ name: 'AccountPushExecutionDetail', params: { id: row.id }})
}
},
{
name: 'report',
title: this.$t('Report'),

View File

@@ -28,7 +28,7 @@ export default {
component: () => import('@/views/accounts/AccountPush/AccountPushExecutionList.vue')
},
{
title: this.$t('RecordList'),
title: this.$t('AccountRecord'),
name: 'AccountPushRecord',
hidden: () => !this.$hasPerm('accounts.view_pushsecretrecord'),
component: () => import(

View File

@@ -54,7 +54,7 @@ export default {
key: 'privileged'
},
{
label: this.$t('Reset secret'),
label: this.$t('ResetSecret'),
key: 'resetSecret'
},
{

View File

@@ -29,7 +29,7 @@ export default {
component: () => import('./AccountCheckTaskList.vue')
},
{
title: this.$t('Executions'),
title: this.$t('ExecutionList'),
name: 'AccountCheckExecution',
hidden: !this.$hasPerm('accounts.view_checkaccountautomation'),
component: () => import('./AccountCheckExecutionList.vue')