mirror of https://github.com/jumpserver/jumpserver
perf: Windows 默认使用 rdping 测试
parent
e8652af054
commit
443f6d25e8
|
@ -0,0 +1,20 @@
|
||||||
|
# Generated by Django 4.1.10 on 2023-10-11 02:53
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
def change_windows_ping_method(apps, schema_editor):
|
||||||
|
platform_automation_cls = apps.get_model('assets', 'PlatformAutomation')
|
||||||
|
automations = platform_automation_cls.objects.filter(platform__name__in=['Windows', 'Windows2016'])
|
||||||
|
automations.update(ping_method='ping_by_rdp')
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('assets', '0124_auto_20231007_1437'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunPython(change_windows_ping_method)
|
||||||
|
]
|
|
@ -259,7 +259,6 @@ class UserSessionViewSet(CommonApiMixin, viewsets.ModelViewSet):
|
||||||
serializer_class = UserSessionSerializer
|
serializer_class = UserSessionSerializer
|
||||||
filterset_fields = ['id', 'ip', 'city', 'type']
|
filterset_fields = ['id', 'ip', 'city', 'type']
|
||||||
search_fields = ['id', 'ip', 'city']
|
search_fields = ['id', 'ip', 'city']
|
||||||
|
|
||||||
rbac_perms = {
|
rbac_perms = {
|
||||||
'offline': ['users.offline_usersession']
|
'offline': ['users.offline_usersession']
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue