diff --git a/src/views/assets/Asset/AssetList/HostList.vue b/src/views/assets/Asset/AssetList/HostList.vue index 732b3e15f..655990a9e 100644 --- a/src/views/assets/Asset/AssetList/HostList.vue +++ b/src/views/assets/Asset/AssetList/HostList.vue @@ -61,7 +61,7 @@ export default { row['auto_config'].ansible_enabled && row['auto_config'].ping_enabled, callback: ({ row }) => { - if (row.platform.name === 'Gateway') { + if (row.platform.name.startsWith('Gateway')) { this.GatewayVisible = true const port = row.protocols.find(item => item.name === 'ssh').port if (!port) { diff --git a/src/views/assets/Asset/AssetList/components/BaseList.vue b/src/views/assets/Asset/AssetList/components/BaseList.vue index c480425d3..368078709 100644 --- a/src/views/assets/Asset/AssetList/components/BaseList.vue +++ b/src/views/assets/Asset/AssetList/components/BaseList.vue @@ -191,7 +191,7 @@ export default { row?.auto_config?.ansible_enabled && row?.auto_config?.ping_enabled, callback: ({ row }) => { - if (row.platform.name === 'Gateway') { + if (row.platform.name.startsWith('Gateway')) { this.GatewayVisible = true const port = row.protocols.find(item => item.name === 'ssh').port if (!port) { diff --git a/src/views/assets/Domain/DomainCreateUpdate.vue b/src/views/assets/Domain/DomainCreateUpdate.vue index 968165145..b1934fd82 100644 --- a/src/views/assets/Domain/DomainCreateUpdate.vue +++ b/src/views/assets/Domain/DomainCreateUpdate.vue @@ -30,7 +30,7 @@ export default { domain_enabled: true }, canSelect: (row) => { - return row.platform?.name !== 'Gateway' + return !row.platform?.name.startsWith('Gateway') } } }, diff --git a/src/views/assets/Domain/DomainDetail/AssetList.vue b/src/views/assets/Domain/DomainDetail/AssetList.vue index 0668c345e..2a2a1a1fe 100644 --- a/src/views/assets/Domain/DomainDetail/AssetList.vue +++ b/src/views/assets/Domain/DomainDetail/AssetList.vue @@ -25,7 +25,7 @@ export default { return { tableConfig: { category: 'all', - url: `/api/v1/assets/assets/?domain=${this.$route.params.id}&exclude_platform=Gateway`, + url: `/api/v1/assets/assets/?domain=${this.$route.params.id}&is_gateway=0`, tableConfig: { columnsMeta: { actions: { diff --git a/src/views/assets/Domain/DomainDetail/GatewayList.vue b/src/views/assets/Domain/DomainDetail/GatewayList.vue index a2f4f5440..baf6b93a7 100644 --- a/src/views/assets/Domain/DomainDetail/GatewayList.vue +++ b/src/views/assets/Domain/DomainDetail/GatewayList.vue @@ -39,7 +39,7 @@ export default { data() { return { tableConfig: { - url: `/api/v1/assets/gateways/?domain=${this.$route.params.id}&platform=Gateway`, + url: `/api/v1/assets/gateways/?domain=${this.$route.params.id}`, columnsExclude: [ 'info', 'spec_info', 'auto_config' ], @@ -174,7 +174,7 @@ export default { name: 'GatewayAdd', title: this.$t('Add'), callback: function() { - this.AddGatewaySetting.AddGatewayDialogVisible = true + this.AddGatewaySetting.addGatewayDialogVisible = true }.bind(this) } ] @@ -183,7 +183,7 @@ export default { cell: '', visible: false, AddGatewaySetting: { - AddGatewayDialogVisible: false + addGatewayDialogVisible: false } } }, diff --git a/src/views/assets/Domain/components/AddAssetDialog.vue b/src/views/assets/Domain/components/AddAssetDialog.vue index 15a894981..a84bf4303 100644 --- a/src/views/assets/Domain/components/AddAssetDialog.vue +++ b/src/views/assets/Domain/components/AddAssetDialog.vue @@ -68,7 +68,7 @@ export default { domain_enabled: true }, canSelect: (row) => { - return row.platform?.name !== 'Gateway' && this.object.assets.map(item => item.id).indexOf(row.id) === -1 + return !row.platform?.name.startsWith('Gateway') && this.object.assets.map(item => item.id).indexOf(row.id) === -1 } } } diff --git a/src/views/assets/Domain/components/AddGatewayDialog.vue b/src/views/assets/Domain/components/AddGatewayDialog.vue index 67cc4890a..b58f14bb7 100644 --- a/src/views/assets/Domain/components/AddGatewayDialog.vue +++ b/src/views/assets/Domain/components/AddGatewayDialog.vue @@ -1,11 +1,11 @@