[Update] 修改改密计划翻译(执行计划页面)

This commit is contained in:
Bai 2020-05-29 18:42:16 +08:00
parent 49331deaa8
commit 202985a942
5 changed files with 54 additions and 38 deletions

View File

@ -687,6 +687,8 @@
"assetAndNode": "资产或节点",
"Success": "成功",
"ChangeAuthPlan": {
"Asset": "资产",
"Success": "成功",
"AssetAndNode": "资产和节点",
"AssetAmount": "资产数量",
"NodeAmount": "节点数量",

View File

@ -32,11 +32,11 @@ export default {
value: this.object.username
},
{
key: this.$t('xpack.Asset'),
key: this.$t('xpack.ChangeAuthPlan.AssetAmount'),
value: this.object.assets_amount
},
{
key: this.$t('xpack.Node'),
key: this.$t('xpack.ChangeAuthPlan.NodeAmount'),
value: this.object.nodes_amount
},
{

View File

@ -26,54 +26,53 @@ export default {
],
columnsMeta: {
asset: {
label: this.$t('xpack.Asset'),
label: this.$t('xpack.ChangeAuthPlan.Asset'),
formatter: function(row, column, cellValue, index) {
const url = `/assets/assets/${cellValue}`
return <router-link to={ url } >{ row.asset_info.hostname }</router-link>
}
},
is_success: {
label: this.$t('xpack.Success')
label: this.$t('xpack.ChangeAuthPlan.Success')
},
timedelta: {
label: this.$t('xpack.ChangeAuthPlan.TimeDelta'),
formatter: function(row) {
return row.timedelta.toFixed(2) + 's'
}
},
actions: {
prop: 'id',
formatterArgs: {
hasDelete: false,
hasUpdate: false,
extraActions: [
{
name: 'retry',
type: 'info',
title: this.$t('xpack.ChangeAuthPlan.Retry'),
callback: function({ cellValue, tableData }) {
this.$axios.put(
`/api/v1/xpack/change-auth-plan/plan-execution-subtask/${cellValue}/`,
).then(res => {
window.open(`/ops/celery/task/${res.task}/log/`, '_blank', 'toolbar=yes, width=900, height=600')
})
}.bind(this)
}
]
}
}
},
actions: {
formatterArgs: {
hasDelete: false,
hasUpdate: false,
extraActions: [
{
name: 'retry',
type: 'info',
title: this.$t('xpack.ChangeAuthPlan.Retry'),
callback: function({ cellValue, tableData }) {
this.$axios.put(
`/api/v1/xpack/change-auth-plan/plan-execution-subtask/${cellValue}/`,
).then(res => {
window.open(`/core/ops/celery/task/${res.task}/log/`, '_blank', 'toolbar=yes, width=900, height=600')
})
}.bind(this)
}
]
}
}
},
headerActions: {
hasSearch: true,
hasRefresh: true,
hasLeftActions: true,
hasRightActions: true,
hasExport: false,
hasImport: false,
hasRefresh: false,
hasCreate: false,
hasBulkDelete: false,
hasBulkUpdate: false,
hasLeftActions: false,
hasSearch: false,
hasRightActions: false
hasBulkUpdate: false
}
}
}

View File

@ -30,13 +30,17 @@ export default {
label: this.$t('xpack.ChangeAuthPlan.Username')
},
assets_amount: {
label: this.$t('xpack.ChangeAuthPlan.AssetAmount')
label: this.$t('xpack.ChangeAuthPlan.AssetAmount'),
width: '80px'
},
nodes_amount: {
label: this.$t('xpack.ChangeAuthPlan.NodeAmount')
label: this.$t('xpack.ChangeAuthPlan.NodeAmount'),
width: '80px'
},
result_summary: {
label: this.$t('xpack.ChangeAuthPlan.Result'),
width: '80px',
showOverflowTooltip: true,
formatter: function(row) {
const summary = <div>
<span class='text-primary'>{row.result_summary.succeed}</span>/
@ -47,10 +51,13 @@ export default {
}
},
password_strategy_display: {
label: this.$t('xpack.ChangeAuthPlan.PasswordStrategy')
label: this.$t('xpack.ChangeAuthPlan.PasswordStrategy'),
width: '220px',
showOverflowTooltip: true
},
timedelta: {
label: this.$t('xpack.ChangeAuthPlan.TimeDelta'),
width: '80px',
formatter: function(row) {
return row.timedelta.toFixed(2) + 's'
}
@ -85,15 +92,15 @@ export default {
}
},
headerActions: {
hasSearch: true,
hasRefresh: true,
hasRightActions: true,
hasLeftActions: true,
hasExport: false,
hasImport: false,
hasRefresh: false,
hasCreate: false,
hasBulkDelete: false,
hasBulkUpdate: false,
hasLeftActions: false,
hasSearch: false,
hasRightActions: false
hasBulkUpdate: false
}
}
}

View File

@ -59,6 +59,14 @@ export default {
key: this.$t('xpack.ChangeAuthPlan.Username'),
value: this.object.username
},
{
key: this.$t('xpack.ChangeAuthPlan.AssetAmount'),
value: this.object.assets_amount
},
{
key: this.$t('xpack.ChangeAuthPlan.NodeAmount'),
value: this.object.nodes_amount
},
{
key: this.$t('xpack.ChangeAuthPlan.PasswordStrategy'),
value: this.object.password_strategy_display