fix: 修复资产列表测试按钮添加 auto_info 选项

This commit is contained in:
Bai
2023-02-23 16:15:09 +08:00
parent 6e8c93657e
commit 6621da8639

View File

@@ -139,7 +139,11 @@ export default {
{
name: 'Test',
title: this.$t('common.Test'),
can: this.$hasPerm('assets.test_assetconnectivity') && !this.$store.getters.currentOrgIsRoot,
can: ({ row }) =>
this.$hasPerm('assets.test_assetconnectivity') &&
!this.$store.getters.currentOrgIsRoot &&
row['auto_info'].ansible_enabled &&
row['auto_info'].ping_enabled,
callback: ({ row }) => {
if (row.platform.name === 'Gateway') {
this.GatewayVisible = true