pref: 修改数据库连接方式

This commit is contained in:
ibuler 2022-11-28 17:57:33 +08:00
parent d0b9dd457f
commit 742cac1e90

View File

@ -56,11 +56,7 @@ class NativeClient(TextChoices):
xshell = 'xshell', 'Xshell' xshell = 'xshell', 'Xshell'
# Magnus # Magnus
mysql = 'mysql', 'mysql' db_client = 'db_client', _('DB Client')
psql = 'psql', 'psql'
sqlplus = 'sqlplus', 'sqlplus'
redis = 'redis-cli', 'redis-cli'
mongodb = 'mongo', 'mongo'
# Razor # Razor
mstsc = 'mstsc', 'Remote Desktop' mstsc = 'mstsc', 'Remote Desktop'
@ -73,11 +69,11 @@ class NativeClient(TextChoices):
'windows': [cls.putty], 'windows': [cls.putty],
}, },
Protocol.rdp: [cls.mstsc], Protocol.rdp: [cls.mstsc],
Protocol.mysql: [cls.mysql], Protocol.mysql: [cls.db_client],
Protocol.oracle: [cls.sqlplus], Protocol.oracle: [cls.db_client],
Protocol.postgresql: [cls.psql], Protocol.postgresql: [cls.db_client],
Protocol.redis: [cls.redis], Protocol.redis: [cls.db_client],
Protocol.mongodb: [cls.mongodb], Protocol.mongodb: [cls.db_client],
} }
return clients return clients
@ -183,8 +179,8 @@ class TerminalType(TextChoices):
cls.magnus: { cls.magnus: {
'listen': [], 'listen': [],
'support': [ 'support': [
Protocol.mysql, Protocol.postgresql, Protocol.oracle, Protocol.mysql, Protocol.postgresql,
Protocol.mariadb Protocol.oracle, Protocol.mariadb
], ],
'match': 'map' 'match': 'map'
}, },