Browse Source

perf: 修改在线数量

pull/11481/head
ibuler 1 year ago
parent
commit
8d6083bfb2
  1. 2
      apps/terminal/api/session/session.py

2
apps/terminal/api/session/session.py

@ -153,7 +153,7 @@ class SessionViewSet(RecordViewLogMixin, OrgBulkModelViewSet):
if asset is None or account is None:
return Response({'count': None})
queryset = Session.objects.filter(is_finished=True) \
queryset = Session.objects.filter(is_finished=False) \
.filter(asset_id=asset) \
.filter(protocol='rdp') # 当前只统计 rdp 协议的会话
if '(' in account and ')' in account:

Loading…
Cancel
Save