Dev export (#3355)

* [Update] 修复导出资产csv文件为空的问题

* [Update] 修改获取系统用户 API 只返回节点数量
This commit is contained in:
BaiJiangJie
2019-10-18 15:12:17 +08:00
committed by 老广
parent f3dc9b886b
commit e5250294b0
5 changed files with 10 additions and 5 deletions

View File

@@ -26,13 +26,14 @@ class SystemUserSerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
fields = [
'id', 'name', 'username', 'password', 'public_key', 'private_key',
'login_mode', 'login_mode_display', 'priority', 'protocol',
'auto_push', 'cmd_filters', 'sudo', 'shell', 'comment', 'nodes',
'assets_amount', 'auto_generate_key'
'auto_push', 'cmd_filters', 'sudo', 'shell', 'comment',
'assets_amount', 'nodes_amount', 'auto_generate_key'
]
extra_kwargs = {
'password': {"write_only": True},
'public_key': {"write_only": True},
'private_key': {"write_only": True},
'nodes_amount': {'label': _('Node')},
'assets_amount': {'label': _('Asset')},
'login_mode_display': {'label': _('Login mode display')},
'created_by': {'read_only': True},