Browse Source

Merge pull request #11481 from jumpserver/pr@dev@perf_online_num

perf: 修改在线数量
pull/11483/head
老广 1 year ago committed by GitHub
parent
commit
56a989bfb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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