mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-12-16 00:52:41 +00:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68135f3b79 | ||
|
|
eedc2f1b41 | ||
|
|
7ba24293d1 | ||
|
|
f10114c9ed | ||
|
|
cf31cbfb07 | ||
|
|
0edad24d5d | ||
|
|
1f1c1a9157 | ||
|
|
6c9d271ae1 | ||
|
|
6ff852e225 | ||
|
|
baa75dc735 | ||
|
|
8a9f0436b8 | ||
|
|
a9620a3cbe | ||
|
|
769e7dc8a0 | ||
|
|
2a70449411 | ||
|
|
8df720f19e | ||
|
|
dabbb45f6e | ||
|
|
ce24c1c3fd | ||
|
|
3c54c82ce9 |
@@ -182,14 +182,14 @@ class DatesLoginMetricMixin:
|
|||||||
|
|
||||||
def get_dates_login_times_assets(self):
|
def get_dates_login_times_assets(self):
|
||||||
assets = self.sessions_queryset.values("asset") \
|
assets = self.sessions_queryset.values("asset") \
|
||||||
.annotate(total=Count("asset")) \
|
.annotate(total=Count("asset", distinct=True)) \
|
||||||
.annotate(last=Cast(Max("date_start"), output_field=CharField())) \
|
.annotate(last=Cast(Max("date_start"), output_field=CharField())) \
|
||||||
.order_by("-total")
|
.order_by("-total")
|
||||||
return list(assets[:10])
|
return list(assets[:10])
|
||||||
|
|
||||||
def get_dates_login_times_users(self):
|
def get_dates_login_times_users(self):
|
||||||
users = self.sessions_queryset.values("user_id") \
|
users = self.sessions_queryset.values("user_id") \
|
||||||
.annotate(total=Count("user_id")) \
|
.annotate(total=Count("user_id", distinct=True)) \
|
||||||
.annotate(user=Max('user')) \
|
.annotate(user=Max('user')) \
|
||||||
.annotate(last=Cast(Max("date_start"), output_field=CharField())) \
|
.annotate(last=Cast(Max("date_start"), output_field=CharField())) \
|
||||||
.order_by("-total")
|
.order_by("-total")
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ __all__ = ['BASE_DIR', 'PROJECT_DIR', 'VERSION', 'CONFIG']
|
|||||||
|
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
PROJECT_DIR = os.path.dirname(BASE_DIR)
|
PROJECT_DIR = os.path.dirname(BASE_DIR)
|
||||||
VERSION = '2.0.0'
|
VERSION = 'v3.10.4'
|
||||||
CONFIG = ConfigManager.load_user_config()
|
CONFIG = ConfigManager.load_user_config()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "jumpserver"
|
name = "jumpserver"
|
||||||
version = "v3.9"
|
version = "v3.10.4"
|
||||||
description = "广受欢迎的开源堡垒机"
|
description = "广受欢迎的开源堡垒机"
|
||||||
authors = ["ibuler <ibuler@qq.com>"]
|
authors = ["ibuler <ibuler@qq.com>"]
|
||||||
license = "GPLv3"
|
license = "GPLv3"
|
||||||
|
|||||||
Reference in New Issue
Block a user