Fixed: Filter SFTP

This commit is contained in:
zhaojisen
2025-03-17 16:34:30 +08:00
committed by ZhaoJiSen
parent 194ea09cab
commit f1a79cc36d
2 changed files with 2 additions and 2 deletions

View File

@@ -205,7 +205,6 @@ export default {
formatter: AccountConnectFormatter,
formatterArgs: {
buttonIcon: 'fa fa-desktop',
titleText: '可选协议',
url: '/api/v1/assets/assets/{id}',
can: () => this.currentUserIsSuperAdmin,
connectUrlTemplate: (row) => `/luna/pam_connect/${row.id}/${row.username}/${row.asset.id}/${row.asset.name}/`,

View File

@@ -127,7 +127,8 @@ export default {
const url = this.formatterArgs.url.replace('{id}', assetId)
const res = await this.$axios.get(url)
if (res) this.protocols = res.protocols
// 暂将 SFTP 过滤
if (res) this.protocols = res.protocols.filter(protocol => protocol.name !== 'sftp')
} catch (e) {
throw new Error(`Error getting protocols: ${e}`)
}