mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-10-22 08:19:04 +00:00
feat: Endpoint 支持标签匹配
feat: Endpoint 支持标签匹配 feat: Endpoint 支持标签匹配 feat: Endpoint 支持标签匹配 feat: Endpoint 添加帮助信息 feat: Endpoint 添加帮助信息
This commit is contained in:
committed by
Jiangjie.Bai
parent
e8363ddff8
commit
05826abf9d
@@ -196,10 +196,14 @@ class Session(OrgModelMixin):
|
||||
def login_from_display(self):
|
||||
return self.get_login_from_display()
|
||||
|
||||
def get_target_ip(self):
|
||||
def get_asset_or_application(self):
|
||||
instance = get_object_or_none(Asset, pk=self.asset_id)
|
||||
if not instance:
|
||||
instance = get_object_or_none(Application, pk=self.asset_id)
|
||||
return instance
|
||||
|
||||
def get_target_ip(self):
|
||||
instance = self.get_asset_or_application()
|
||||
target_ip = instance.get_target_ip() if instance else ''
|
||||
return target_ip
|
||||
|
||||
|
Reference in New Issue
Block a user