mirror of https://github.com/jumpserver/jumpserver
perf: 优化smart匹配数据库端口数量失败时的错误提示信息
parent
cdcfdeefc5
commit
104dd9721b
|
@ -56,10 +56,10 @@ class DBPortManager(object):
|
||||||
self.set_mapper(mapper)
|
self.set_mapper(mapper)
|
||||||
|
|
||||||
def get_port_by_db(self, db):
|
def get_port_by_db(self, db):
|
||||||
# mapper = self.get_mapper()
|
mapper = self.get_mapper()
|
||||||
# for port, db_id in mapper.items():
|
for port, db_id in mapper.items():
|
||||||
# if db_id == str(db.id):
|
if db_id == str(db.id):
|
||||||
# return port
|
return port
|
||||||
error = _(
|
error = _(
|
||||||
'No available port is matched. '
|
'No available port is matched. '
|
||||||
'The number of databases may have exceeded the number of ports '
|
'The number of databases may have exceeded the number of ports '
|
||||||
|
|
Loading…
Reference in New Issue