mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-12-15 00:25:16 +00:00
Compare commits
7 Commits
pr@dev@fea
...
v2.23.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fca15eae7f | ||
|
|
2c63b56f62 | ||
|
|
ea5e56b33e | ||
|
|
e4819ffe11 | ||
|
|
c34302325f | ||
|
|
3b5ee06535 | ||
|
|
8e5edfd179 |
@@ -53,7 +53,15 @@ class AccountSerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
|
||||
return attrs
|
||||
|
||||
def get_protocols(self, v):
|
||||
return v.protocols.replace(' ', ', ')
|
||||
""" protocols 是 queryset 中返回的,Post 创建成功后返回序列化时没有这个字段 """
|
||||
if hasattr(v, 'protocols'):
|
||||
protocols = v.protocols
|
||||
elif hasattr(v, 'asset') and v.asset:
|
||||
protocols = v.asset.protocols
|
||||
else:
|
||||
protocols = ''
|
||||
protocols = protocols.replace(' ', ', ')
|
||||
return protocols
|
||||
|
||||
@classmethod
|
||||
def setup_eager_loading(cls, queryset):
|
||||
|
||||
@@ -153,3 +153,5 @@ ANSIBLE_LOG_DIR = os.path.join(PROJECT_DIR, 'data', 'ansible')
|
||||
REDIS_HOST = CONFIG.REDIS_HOST
|
||||
REDIS_PORT = CONFIG.REDIS_PORT
|
||||
REDIS_PASSWORD = CONFIG.REDIS_PASSWORD
|
||||
|
||||
DJANGO_REDIS_SCAN_ITERSIZE = 1000
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import copy
|
||||
import os
|
||||
|
||||
from importlib import import_module
|
||||
@@ -77,7 +78,7 @@ class CommandStorage(CommonStorageModelMixin, CommonModelMixin):
|
||||
def config(self):
|
||||
config = self.meta
|
||||
config.update({'TYPE': self.type})
|
||||
return config
|
||||
return copy.deepcopy(config)
|
||||
|
||||
@property
|
||||
def valid_config(self):
|
||||
|
||||
@@ -27,7 +27,7 @@ class TicketViewSet(CommonApiMixin, viewsets.ModelViewSet):
|
||||
}
|
||||
filterset_class = TicketFilter
|
||||
search_fields = [
|
||||
'title', 'action', 'type', 'status', 'applicant_display'
|
||||
'title', 'type', 'status', 'applicant_display'
|
||||
]
|
||||
ordering_fields = (
|
||||
'title', 'applicant_display', 'status', 'state', 'action_display',
|
||||
|
||||
@@ -21,7 +21,6 @@ django-celery-beat==2.2.1
|
||||
django-filter==2.4.0
|
||||
django-formtools==2.2
|
||||
django-ranged-response==0.2.0
|
||||
django-redis-cache==2.1.1
|
||||
django-rest-swagger==2.2.0
|
||||
django-simple-captcha==0.5.13
|
||||
django-timezone-field==4.1.0
|
||||
|
||||
Reference in New Issue
Block a user