[Update] 添加更新节点资产硬件信息执行逻辑

This commit is contained in:
Bai 2020-06-08 14:02:59 +08:00
parent a2b88067c3
commit b29a61b792

View File

@ -148,7 +148,19 @@ export default {
},
updateNodeAssetHardwareInfo: function() {
this.hideRMenu()
const currentNode = this.zTree.getSelectedNodes()[0]
if (!currentNode) {
return
}
this.$axios.post(
`/api/v1/assets/nodes/${currentNode.meta.node.id}/tasks/`,
{ 'action': 'refresh' }
).then((res) => {
window.open(`/core/ops/celery/task/${res.task}/log/`, '_blank', 'toolbar=yes, width=900, height=600')
}).catch(error => {
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + error))
})
},
testNodeAssetConnectivity: function() {