Browse Source

Merge branch 'dev' of github.com:jumpserver/jumpserver into dev

pull/4107/head
ibuler 5 years ago
parent
commit
e23bfa0f69
  1. 2
      apps/assets/serializers/system_user.py
  2. 8
      apps/common/drf/parsers/csv.py
  3. BIN
      apps/locale/zh/LC_MESSAGES/django.mo
  4. 9134
      apps/locale/zh/LC_MESSAGES/django.po
  5. BIN
      apps/static/img/authenticator_android.png
  6. 2
      apps/tickets/serializers/ticket.py
  7. 2
      apps/users/templates/users/user_otp_enable_install_app.html

2
apps/assets/serializers/system_user.py

@ -34,7 +34,7 @@ class SystemUserSerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
'priority', 'username_same_with_user',
'auto_push', 'cmd_filters', 'sudo', 'shell', 'comment',
'auto_generate_key', 'sftp_root',
'assets_amount',
'assets_amount', 'date_created', 'created_by'
]
extra_kwargs = {
'password': {"write_only": True},

8
apps/common/drf/parsers/csv.py

@ -58,6 +58,12 @@ class JMSCSVParser(BaseParser):
col = col.replace("", '"').replace("", '"').\
replace("", '"').replace('', '"').replace("'", '"')
col = json.loads(col)
# 字典转换
if isinstance(col, str) and col.find("{") != -1 and col.find("}") != -1:
# 替换中文格式引号
col = col.replace("", '"').replace("", '"'). \
replace("", '"').replace('', '"').replace("'", '"')
col = json.loads(col)
_row.append(col)
return _row
@ -68,7 +74,7 @@ class JMSCSVParser(BaseParser):
"""
_row_data = {}
for k, v in row_data.items():
if isinstance(v, list) \
if isinstance(v, list) or isinstance(v, dict)\
or isinstance(v, str) and k.strip() and v.strip():
_row_data[k] = v
return _row_data

BIN
apps/locale/zh/LC_MESSAGES/django.mo

Binary file not shown.

9134
apps/locale/zh/LC_MESSAGES/django.po

File diff suppressed because it is too large Load Diff

BIN
apps/static/img/authenticator_android.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

2
apps/tickets/serializers/ticket.py

@ -13,7 +13,7 @@ class TicketSerializer(serializers.ModelSerializer):
model = models.Ticket
fields = [
'id', 'user', 'user_display', 'title', 'body',
'assignees', 'assignees_display',
'assignees', 'assignees_display', 'assignee', 'assignee_display',
'status', 'action', 'date_created', 'date_updated',
'type', 'type_display', 'action_display',
]

2
apps/users/templates/users/user_otp_enable_install_app.html

@ -10,7 +10,7 @@
<div class="verify">
<p style="margin: 20px auto;">
<strong style="color: #000000">
{% trans 'Download and install the Google Authenticator application on your phone' %}
{% trans 'Download and install the Google Authenticator application on your phone or applet of WeChat' %}
</strong>
</p>
<div>

Loading…
Cancel
Save