[fix]增加系统用户为自动推送时的手动推送全局按钮

This commit is contained in:
OrangeM21
2020-06-23 16:31:21 +08:00
parent de547e6a5a
commit 1d74137144

View File

@@ -105,6 +105,23 @@ export default {
)
}.bind(this)
}
},
{
title: this.$t('assets.PushSystemUserNow'),
attrs: {
type: 'primary',
disabled: !vm.object.auto_push,
label: this.$t('common.Push')
},
callbacks: {
click: function({ row }) {
const theUrl = `/api/v1/assets/system-users/${vm.object.id}/tasks/`
const data = { action: 'push' }
this.$axios.post(theUrl, data).then(resp => {
window.open(`/#/ops/celery/task/${resp.task}/log/`, '', 'width=900,height=600')
})
}.bind(this)
}
}
],
nodeRelationConfig: {