mirror of
https://github.com/jumpserver/lina.git
synced 2025-04-27 11:10:51 +00:00
perf: streamline onUpdate actions in PlayBook and Adhoc components
This commit is contained in:
parent
8ef4b466d7
commit
cce6a5a216
@ -88,9 +88,6 @@ export default {
|
||||
if (!actions.onCreate) {
|
||||
actions.onCreate = this.onCreate
|
||||
}
|
||||
if (!actions.onUpdate) {
|
||||
actions.onUpdate = this.onUpdate
|
||||
}
|
||||
return actions
|
||||
},
|
||||
iTableConfig() {
|
||||
|
@ -89,6 +89,12 @@ export default {
|
||||
hasUpdate: true,
|
||||
canUpdate: this.$hasPerm('ops.change_job') && !this.$store.getters.currentOrgIsRoot,
|
||||
updateRoute: 'JobUpdate',
|
||||
onUpdate: ({ row, col }) => {
|
||||
vm.$router.push({
|
||||
query: { _type: 'adhoc' }
|
||||
})
|
||||
vm.$refs.ListTable.onUpdate({ row, col })
|
||||
},
|
||||
hasDelete: true,
|
||||
canDelete: this.$hasPerm('ops.delete_job'),
|
||||
hasClone: false,
|
||||
|
@ -92,6 +92,12 @@ export default {
|
||||
updateRoute: 'JobUpdate',
|
||||
hasDelete: true,
|
||||
canDelete: this.$hasPerm('ops.delete_job'),
|
||||
onUpdate: ({ row, col }) => {
|
||||
vm.$router.push({
|
||||
query: { _type: 'playbook' }
|
||||
})
|
||||
vm.$refs.ListTable.onUpdate({ row, col })
|
||||
},
|
||||
hasClone: false,
|
||||
extraActions: [
|
||||
{
|
||||
@ -126,12 +132,6 @@ export default {
|
||||
vm.$refs.ListTable.onCreate()
|
||||
}
|
||||
},
|
||||
onUpdate: () => {
|
||||
vm.$router.push({
|
||||
query: { _type: 'playbook' }
|
||||
})
|
||||
vm.$refs.ListTable.onUpdate()
|
||||
},
|
||||
showJobRunDialog: false
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user