perf: Translate

This commit is contained in:
feng
2024-07-05 16:36:24 +08:00
parent 5e97600807
commit baeece62d3
6 changed files with 15 additions and 17 deletions

View File

@@ -164,8 +164,8 @@ export default {
},
extraMoreActions: [
{
name: 'BatchRetry',
title: this.$t('BatchRetry'),
name: 'RetrySelected',
title: this.$t('RetrySelected'),
type: 'primary',
fa: 'fa-retweet',
can: ({ selectedRows }) => {

View File

@@ -164,8 +164,8 @@ export default {
},
extraMoreActions: [
{
name: 'BatchRetry',
title: this.$t('BatchRetry'),
name: 'RetrySelected',
title: this.$t('RetrySelected'),
type: 'primary',
fa: 'fa-retweet',
can: ({ selectedRows }) => {

View File

@@ -430,7 +430,7 @@ export default {
}
createJob(data).then(res => {
this.executionInfo.timeCost = 0
this.executionInfo.status = 'running'
this.executionInfo.status = { value: 'running', label: this.$t('Running') }
this.currentTaskId = res.task_id
this.xtermConfig = { taskId: this.currentTaskId, type: 'shortcut_cmd' }
this.setCostTimeInterval()
@@ -451,12 +451,12 @@ export default {
})
},
setBtn() {
if (this.executionInfo.status !== 'running') {
if (this.executionInfo.status.value !== 'running') {
clearInterval(this.executionInfo.cancel)
this.toolbar.left.run.icon = 'fa fa-play'
}
this.toolbar.left.run.isVisible = this.executionInfo.status === 'running'
this.toolbar.left.stop.isVisible = this.executionInfo.status !== 'running'
this.toolbar.left.run.isVisible = this.executionInfo.status.value === 'running'
this.toolbar.left.stop.isVisible = this.executionInfo.status.value !== 'running'
}
}
}

View File

@@ -9,11 +9,11 @@
<span class="status-item">
<span>{{ $tc('Status') }}: </span>
<span
:class="{'status_success':executionInfo.status==='success',
'status_warning':executionInfo.status==='timeout',
'status_danger':executionInfo.status==='failed'
:class="{'status_success':executionInfo.status.value==='success',
'status_warning':executionInfo.status.value==='timeout',
'status_danger':executionInfo.status.value==='failed'
}"
>{{ $tc('' + executionInfo.status) }}</span>
>{{ $tc('' + executionInfo.status.label) }}</span>
</span>
<span class="status-item">
<span>{{ $tc('TimeDelta') }}: </span>
@@ -66,9 +66,7 @@ export default {
executionInfo: {
type: Object,
// eslint-disable-next-line vue/require-valid-default-prop
default: {
status: 'success'
}
default: {}
}
},
data() {

View File

@@ -23,7 +23,7 @@ export default {
tableConfig: {
url: '/api/v1/ops/job-executions/',
columnsExclude: [
'summary', 'parameters'
'summary', 'parameters', 'timedelta'
],
columnsShow: {
min: ['material', 'actions'],

View File

@@ -43,7 +43,7 @@ export default {
hasMoreActions: true,
extraMoreActions: [
{
name: 'BatchApproval',
name: 'ApproveSelected',
title: this.$t('ApproveSelected'),
can: ({ selectedRows }) => { return selectedRows.length > 0 },
callback: function({ selectedRows }) {