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

perf: 修改在线数量
pull/11483/head
老广 2023-08-31 17:44:25 +08:00 committed by GitHub
commit 56a989bfb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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: