mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-11 11:31:59 +00:00
perf: 优化job 页面
This commit is contained in:
parent
608b8b727f
commit
d46e49df2a
@ -713,7 +713,8 @@
|
|||||||
"JobType": "作业类型",
|
"JobType": "作业类型",
|
||||||
"Comment": "备注",
|
"Comment": "备注",
|
||||||
"History": "执行历史",
|
"History": "执行历史",
|
||||||
"UseParameterDefine": "定义参数"
|
"UseParameterDefine": "定义参数",
|
||||||
|
"TaskDispatch": "任务下发成功"
|
||||||
},
|
},
|
||||||
"perms": {
|
"perms": {
|
||||||
"": "",
|
"": "",
|
||||||
|
@ -38,9 +38,9 @@ export default {
|
|||||||
width: '96px',
|
width: '96px',
|
||||||
formatter: (row) => {
|
formatter: (row) => {
|
||||||
if (row.is_finished) {
|
if (row.is_finished) {
|
||||||
return <i Class='fa fa-check text-primary' />
|
return <i Class='fa fa-check text-primary'/>
|
||||||
}
|
}
|
||||||
return <i Class='fa fa-times text-danger' />
|
return <i Class='fa fa-times text-danger'/>
|
||||||
},
|
},
|
||||||
formatterArgs: {
|
formatterArgs: {
|
||||||
width: '14px'
|
width: '14px'
|
||||||
@ -51,12 +51,12 @@ export default {
|
|||||||
width: '96px',
|
width: '96px',
|
||||||
formatter: (row) => {
|
formatter: (row) => {
|
||||||
if (!row.is_finished) {
|
if (!row.is_finished) {
|
||||||
return <i Class='fa fa fa-spinner fa-spin' />
|
return <i Class='fa fa fa-spinner fa-spin'/>
|
||||||
}
|
}
|
||||||
if (row.is_success) {
|
if (row.is_success) {
|
||||||
return <i Class='fa fa-check text-primary' />
|
return <i Class='fa fa-check text-primary'/>
|
||||||
}
|
}
|
||||||
return <i Class='fa fa-times text-danger' />
|
return <i Class='fa fa-times text-danger'/>
|
||||||
},
|
},
|
||||||
formatterArgs: {
|
formatterArgs: {
|
||||||
width: '14px'
|
width: '14px'
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import GenericListPage from '@/layout/components/GenericListPage'
|
import GenericListPage from '@/layout/components/GenericListPage'
|
||||||
import { ActionsFormatter, DateFormatter } from '@/components/TableFormatters'
|
import { ActionsFormatter, DateFormatter } from '@/components/TableFormatters'
|
||||||
import { openTaskPage } from '@/utils/jms'
|
|
||||||
import JobRunDialog from '@/views/ops/Job/JobRunDialog'
|
import JobRunDialog from '@/views/ops/Job/JobRunDialog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -41,7 +40,7 @@ export default {
|
|||||||
if (row.is_periodic) {
|
if (row.is_periodic) {
|
||||||
return <span>{row.type}
|
return <span>{row.type}
|
||||||
<el-tooltip content={this.$t('ops.ThisPeriodic')}>
|
<el-tooltip content={this.$t('ops.ThisPeriodic')}>
|
||||||
<i Class='fa fa-circle-o text-primary' />
|
<i Class='fa fa-circle-o text-primary'/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
@ -119,10 +118,8 @@ export default {
|
|||||||
this.$axios.post('/api/v1/ops/job-executions/', {
|
this.$axios.post('/api/v1/ops/job-executions/', {
|
||||||
job: row.id,
|
job: row.id,
|
||||||
parameters: parameters
|
parameters: parameters
|
||||||
}).then(data => {
|
}).then(() => {
|
||||||
this.$axios.get(`/api/v1/ops/job-executions/${data.id}/`).then(d => {
|
this.$message.success(this.$tc('ops.TaskDispatch'))
|
||||||
openTaskPage(d.task_id)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user