mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
perf: Add confirmation dialog before syncing platform protocols
This commit is contained in:
@@ -143,7 +143,20 @@ export default {
|
||||
disabled: !this.canEdit
|
||||
},
|
||||
callbacks: Object.freeze({
|
||||
click: () => {
|
||||
click: async () => {
|
||||
try {
|
||||
await this.$confirm(
|
||||
this.$t('overwriteProtocolsAndPortsMsg'),
|
||||
this.$t('Confirm'),
|
||||
{
|
||||
confirmButtonText: this.$t('Confirm'),
|
||||
cancelButtonText: this.$t('Cancel'),
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
} catch (e) {
|
||||
return
|
||||
}
|
||||
const data = { platform_id: this.object.id }
|
||||
this.$axios.post(
|
||||
'/api/v1/assets/assets/sync-platform-protocols/', data).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user