mirror of https://github.com/jumpserver/jumpserver
fix(connect) input exact ip for connect
modify search strategy if some ip match passpull/207/head
parent
9af809a4f0
commit
c9ff235089
|
@ -500,8 +500,9 @@ class Nav(object):
|
|||
except (ValueError, TypeError):
|
||||
# 匹配 ip, hostname, 备注
|
||||
str_r = str_r.lower()
|
||||
self.search_result = [asset for asset in self.perm_assets if str_r in str(asset.ip).lower()
|
||||
or str_r in str(asset.hostname).lower()
|
||||
self.search_result = [asset for asset in self.perm_assets if str_r == str(asset.ip).lower()] or \
|
||||
[asset for asset in self.perm_assets if str_r in str(asset.ip).lower() \
|
||||
or str_r in str(asset.hostname).lower() \
|
||||
or str_r in str(asset.comment).lower()]
|
||||
else:
|
||||
# 如果没有输入就展现所有
|
||||
|
|
Loading…
Reference in New Issue