perf: 全局组织禁用资产的测试可连接性

This commit is contained in:
wangruidong 2024-04-18 11:38:52 +08:00 committed by w940853815
parent d0a7201683
commit 01e55d7f6e
2 changed files with 4 additions and 2 deletions

View File

@ -356,7 +356,8 @@ export default {
fa: 'fa-handshake-o',
can: ({ selectedRows }) => {
return selectedRows.length > 0 &&
['clickhouse', 'redis', 'website', 'chatgpt'].indexOf(selectedRows[0].asset.type.value) === -1
['clickhouse', 'redis', 'website', 'chatgpt'].indexOf(selectedRows[0].asset.type.value) === -1 &&
!this.$store.getters.currentOrgIsRoot
},
callback: function({ selectedRows }) {
const ids = selectedRows.map(v => {

View File

@ -77,7 +77,8 @@ export default {
attrs: {
type: 'primary',
label: this.$tc('accounts.Test'),
disabled: ['clickhouse', 'redis', 'website', 'chatgpt'].indexOf(this.object.type.value) !== -1
disabled: ['clickhouse', 'redis', 'website', 'chatgpt'].indexOf(this.object.type.value) !== -1 ||
this.$store.getters.currentOrgIsRoot
},
callbacks: Object.freeze({
click: () => {