mirror of
https://github.com/jumpserver/lina.git
synced 2025-06-28 07:57:57 +00:00
perf: optimization
This commit is contained in:
parent
f1f4242ad6
commit
1d16a165a5
@ -76,7 +76,7 @@ export default {
|
|||||||
},
|
},
|
||||||
callbacks: {
|
callbacks: {
|
||||||
change: function(val) {
|
change: function(val) {
|
||||||
this.updateTask({ 'sync_ip_type': val })
|
this.updateTaskData({ 'sync_ip_type': val })
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -89,7 +89,7 @@ export default {
|
|||||||
},
|
},
|
||||||
callbacks: {
|
callbacks: {
|
||||||
change: function(val) {
|
change: function(val) {
|
||||||
this.updateTask({ 'release_assets': val })
|
this.updateTaskData({ 'release_assets': val })
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -204,14 +204,14 @@ export default {
|
|||||||
hasEditPerm() {
|
hasEditPerm() {
|
||||||
return this.$hasPerm('xpack.change_account') && this.$hasPerm('xpack.change_syncinstancetask')
|
return this.$hasPerm('xpack.change_account') && this.$hasPerm('xpack.change_syncinstancetask')
|
||||||
},
|
},
|
||||||
updateTask(data) {
|
updateTaskData(data) {
|
||||||
this.$axios.patch(
|
this.$axios.patch(
|
||||||
`/api/v1/xpack/cloud/sync-instance-tasks/${this.object.task.id}/`,
|
`/api/v1/xpack/cloud/sync-instance-tasks/${this.object.task.id}/`,
|
||||||
data
|
data
|
||||||
).then(res => {
|
).then(res => {
|
||||||
this.$message.success(this.$t('UpdateSuccessMsg'))
|
this.$message.success(this.$tc('UpdateSuccessMsg'))
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$message.error(this.$t('UpdateErrorMsg' + ' ' + err))
|
this.$message.error(this.$tc('UpdateErrorMsg' + ' ' + err))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user