mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 19:35:24 +00:00
perf: 持续优化job 页面
This commit is contained in:
@@ -661,6 +661,9 @@
|
||||
"Weekly": "按周"
|
||||
},
|
||||
"ops": {
|
||||
"OpenCommand": "打开命令",
|
||||
"SaveCommand": "保存命令 ",
|
||||
"Log": "日志",
|
||||
"Execute": "执行",
|
||||
"ID": "ID",
|
||||
"No": "否",
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<script>
|
||||
import { ActionsFormatter } from '@/components/TableFormatters'
|
||||
import { GenericListPage } from '@/layout/components'
|
||||
import { openTaskPage } from '@/utils/jms'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -73,19 +74,19 @@ export default {
|
||||
hasClone: false,
|
||||
extraActions: [
|
||||
{
|
||||
title: this.$t('详情'),
|
||||
title: this.$t('common.Detail'),
|
||||
name: 'detail',
|
||||
can: true,
|
||||
callback: ({ row }) => {
|
||||
// this.$router.push({name: 'JobCreate', query: {type: 'adhoc', id: row.id}})
|
||||
console.log(1)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('日志'),
|
||||
name: 'detail',
|
||||
title: this.$t('ops.output'),
|
||||
name: 'logging',
|
||||
can: true,
|
||||
callback: ({ row }) => {
|
||||
// this.$router.push({name: 'JobCreate', query: {type: 'adhoc', id: row.id}})
|
||||
openTaskPage(row.task_id)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -35,7 +35,7 @@ export default {
|
||||
{
|
||||
type: 'button',
|
||||
icon: 'fa fa-folder-open-o',
|
||||
tip: 'Open Command',
|
||||
tip: this.$t('ops.OpenCommand'),
|
||||
callback: () => {
|
||||
this.openAdhocSelectDialog()
|
||||
}
|
||||
@@ -43,7 +43,7 @@ export default {
|
||||
{
|
||||
type: 'button',
|
||||
icon: 'fa fa-save',
|
||||
tip: 'Save Command',
|
||||
tip: this.$t('ops.SaveCommand'),
|
||||
callback: () => {
|
||||
this.openAdhocSaveDialog()
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ export default {
|
||||
url: '/api/v1/ops/jobs/',
|
||||
fields: [
|
||||
[this.$t('common.Basic'), ['name', 'type', 'instant', 'comment']],
|
||||
[this.$t('common.Task'), ['module', 'args', 'playbook', 'chdir', 'timeout']],
|
||||
[this.$t('common.Task'), ['module', 'args', 'playbook', 'chdir']],
|
||||
[this.$t('ops.Asset'), ['assets', 'runas', 'runas_policy']],
|
||||
[this.$t('ops.Parameter'), ['use_parameter_define', 'parameters_define']],
|
||||
[this.$t('ops.Plan'), ['runAfterSave', 'is_periodic', 'crontab']]
|
||||
[this.$t('ops.Plan'), ['run_after_save', 'is_periodic', 'crontab']]
|
||||
],
|
||||
initial: {
|
||||
type: 'adhoc',
|
||||
@@ -38,7 +38,6 @@ export default {
|
||||
runAfterSave: false,
|
||||
instant: false,
|
||||
parameters_define: '{}',
|
||||
timeout: 60,
|
||||
is_periodic: false,
|
||||
crontab: '0 0 * * *'
|
||||
},
|
||||
@@ -113,8 +112,7 @@ export default {
|
||||
return formValue.type !== 'adhoc'
|
||||
}
|
||||
},
|
||||
runAfterSave: {
|
||||
label: '保存后立即执行',
|
||||
run_after_save: {
|
||||
type: 'checkbox',
|
||||
hidden: (formValue) => {
|
||||
return this.instantTask
|
||||
|
||||
Reference in New Issue
Block a user