mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-28 16:16:41 +00:00
perf: Asset user login notify
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
from datetime import datetime
|
||||
|
||||
from django.utils import timezone
|
||||
from rest_framework import generics
|
||||
from rest_framework.fields import DateTimeField
|
||||
@@ -216,6 +218,7 @@ class InsecureCommandAlertAPI(generics.CreateAPIView):
|
||||
cmd_group_mapper = {str(i.id): i for i in cmd_groups}
|
||||
|
||||
for command in commands:
|
||||
command['_time'] = datetime.fromtimestamp(command['timestamp'])
|
||||
cmd_acl = acl_mapper.get(command['cmd_filter_acl'])
|
||||
command['_cmd_filter_acl'] = cmd_acl
|
||||
cmd_group = cmd_group_mapper.get(command['cmd_group'])
|
||||
|
Reference in New Issue
Block a user