mirror of https://github.com/jumpserver/jumpserver
Merge branch 'dev' of github.com:jumpserver/jumpserver into dev
commit
b334f3c2d9
|
@ -59,7 +59,7 @@ class GatewaySerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
|
||||||
'created_by', 'comment',
|
'created_by', 'comment',
|
||||||
]
|
]
|
||||||
fields_fk = ['domain']
|
fields_fk = ['domain']
|
||||||
fields = fields_small + fields_fk
|
fields = fields_small + fields_fk
|
||||||
extra_kwargs = {
|
extra_kwargs = {
|
||||||
'password': {'write_only': True, 'validators': [NoSpecialChars()]},
|
'password': {'write_only': True, 'validators': [NoSpecialChars()]},
|
||||||
'private_key': {"write_only": True},
|
'private_key': {"write_only": True},
|
||||||
|
@ -78,12 +78,12 @@ class GatewaySerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
|
||||||
|
|
||||||
|
|
||||||
class GatewayWithAuthSerializer(GatewaySerializer):
|
class GatewayWithAuthSerializer(GatewaySerializer):
|
||||||
def get_field_names(self, declared_fields, info):
|
class Meta(GatewaySerializer.Meta):
|
||||||
fields = super().get_field_names(declared_fields, info)
|
extra_kwargs = {
|
||||||
fields.extend(
|
'password': {'write_only': False, 'validators': [NoSpecialChars()]},
|
||||||
['password', 'private_key']
|
'private_key': {"write_only": False},
|
||||||
)
|
'public_key': {"write_only": False},
|
||||||
return fields
|
}
|
||||||
|
|
||||||
|
|
||||||
class DomainWithGatewaySerializer(BulkOrgResourceModelSerializer):
|
class DomainWithGatewaySerializer(BulkOrgResourceModelSerializer):
|
||||||
|
|
|
@ -279,7 +279,7 @@ class Config(dict):
|
||||||
'WINDOWS_SSH_DEFAULT_SHELL': 'cmd',
|
'WINDOWS_SSH_DEFAULT_SHELL': 'cmd',
|
||||||
'FLOWER_URL': "127.0.0.1:5555",
|
'FLOWER_URL': "127.0.0.1:5555",
|
||||||
'DEFAULT_ORG_SHOW_ALL_USERS': True,
|
'DEFAULT_ORG_SHOW_ALL_USERS': True,
|
||||||
'PERIOD_TASK_ENABLE': True,
|
'PERIOD_TASK_ENABLED': True,
|
||||||
'FORCE_SCRIPT_NAME': '',
|
'FORCE_SCRIPT_NAME': '',
|
||||||
'LOGIN_CONFIRM_ENABLE': False,
|
'LOGIN_CONFIRM_ENABLE': False,
|
||||||
'WINDOWS_SKIP_ALL_MANUAL_PASSWORD': False,
|
'WINDOWS_SKIP_ALL_MANUAL_PASSWORD': False,
|
||||||
|
|
Binary file not shown.
|
@ -7,7 +7,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: JumpServer 0.3.3\n"
|
"Project-Id-Version: JumpServer 0.3.3\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-05-20 14:56+0800\n"
|
"POT-Creation-Date: 2021-05-21 11:08+0800\n"
|
||||||
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
|
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
|
||||||
"Last-Translator: ibuler <ibuler@qq.com>\n"
|
"Last-Translator: ibuler <ibuler@qq.com>\n"
|
||||||
"Language-Team: JumpServer team<ibuler@qq.com>\n"
|
"Language-Team: JumpServer team<ibuler@qq.com>\n"
|
||||||
|
@ -184,7 +184,7 @@ msgstr "格式为逗号分隔的字符串, * 表示匹配所有. "
|
||||||
#: users/templates/users/_select_user_modal.html:14
|
#: users/templates/users/_select_user_modal.html:14
|
||||||
#: xpack/plugins/change_auth_plan/models.py:47
|
#: xpack/plugins/change_auth_plan/models.py:47
|
||||||
#: xpack/plugins/change_auth_plan/models.py:278
|
#: xpack/plugins/change_auth_plan/models.py:278
|
||||||
#: xpack/plugins/cloud/serializers.py:71
|
#: xpack/plugins/cloud/serializers.py:65
|
||||||
msgid "Username"
|
msgid "Username"
|
||||||
msgstr "用户名"
|
msgstr "用户名"
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ msgid "Cluster"
|
||||||
msgstr "集群"
|
msgstr "集群"
|
||||||
|
|
||||||
#: applications/serializers/attrs/application_category/db.py:11
|
#: applications/serializers/attrs/application_category/db.py:11
|
||||||
#: ops/models/adhoc.py:146 xpack/plugins/cloud/serializers.py:69
|
#: ops/models/adhoc.py:146 xpack/plugins/cloud/serializers.py:63
|
||||||
msgid "Host"
|
msgid "Host"
|
||||||
msgstr "主机"
|
msgstr "主机"
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ msgstr "主机"
|
||||||
#: applications/serializers/attrs/application_type/oracle.py:11
|
#: applications/serializers/attrs/application_type/oracle.py:11
|
||||||
#: applications/serializers/attrs/application_type/pgsql.py:11
|
#: applications/serializers/attrs/application_type/pgsql.py:11
|
||||||
#: assets/models/asset.py:188 assets/models/domain.py:53
|
#: assets/models/asset.py:188 assets/models/domain.py:53
|
||||||
#: xpack/plugins/cloud/serializers.py:70
|
#: xpack/plugins/cloud/serializers.py:64
|
||||||
msgid "Port"
|
msgid "Port"
|
||||||
msgstr "端口"
|
msgstr "端口"
|
||||||
|
|
||||||
|
@ -325,7 +325,7 @@ msgstr "目标URL"
|
||||||
#: xpack/plugins/change_auth_plan/models.py:68
|
#: xpack/plugins/change_auth_plan/models.py:68
|
||||||
#: xpack/plugins/change_auth_plan/models.py:190
|
#: xpack/plugins/change_auth_plan/models.py:190
|
||||||
#: xpack/plugins/change_auth_plan/models.py:285
|
#: xpack/plugins/change_auth_plan/models.py:285
|
||||||
#: xpack/plugins/cloud/serializers.py:73
|
#: xpack/plugins/cloud/serializers.py:67
|
||||||
msgid "Password"
|
msgid "Password"
|
||||||
msgstr "密码"
|
msgstr "密码"
|
||||||
|
|
||||||
|
@ -407,7 +407,7 @@ msgstr "激活"
|
||||||
|
|
||||||
#: assets/models/asset.py:196 assets/models/cluster.py:19
|
#: assets/models/asset.py:196 assets/models/cluster.py:19
|
||||||
#: assets/models/user.py:66 templates/_nav.html:44
|
#: assets/models/user.py:66 templates/_nav.html:44
|
||||||
#: xpack/plugins/cloud/models.py:92 xpack/plugins/cloud/serializers.py:166
|
#: xpack/plugins/cloud/models.py:92 xpack/plugins/cloud/serializers.py:160
|
||||||
msgid "Admin user"
|
msgid "Admin user"
|
||||||
msgstr "管理用户"
|
msgstr "管理用户"
|
||||||
|
|
||||||
|
@ -678,7 +678,7 @@ msgstr "ssh私钥"
|
||||||
#: users/templates/users/user_asset_permission.html:41
|
#: users/templates/users/user_asset_permission.html:41
|
||||||
#: users/templates/users/user_asset_permission.html:73
|
#: users/templates/users/user_asset_permission.html:73
|
||||||
#: users/templates/users/user_asset_permission.html:158
|
#: users/templates/users/user_asset_permission.html:158
|
||||||
#: xpack/plugins/cloud/models.py:89 xpack/plugins/cloud/serializers.py:167
|
#: xpack/plugins/cloud/models.py:89 xpack/plugins/cloud/serializers.py:161
|
||||||
msgid "Node"
|
msgid "Node"
|
||||||
msgstr "节点"
|
msgstr "节点"
|
||||||
|
|
||||||
|
@ -3999,7 +3999,7 @@ msgid "Security token validation"
|
||||||
msgstr "安全令牌验证"
|
msgstr "安全令牌验证"
|
||||||
|
|
||||||
#: users/templates/users/_base_otp.html:14 xpack/plugins/cloud/models.py:78
|
#: users/templates/users/_base_otp.html:14 xpack/plugins/cloud/models.py:78
|
||||||
#: xpack/plugins/cloud/serializers.py:165
|
#: xpack/plugins/cloud/serializers.py:159
|
||||||
msgid "Account"
|
msgid "Account"
|
||||||
msgstr "账户"
|
msgstr "账户"
|
||||||
|
|
||||||
|
@ -4740,7 +4740,7 @@ msgstr "云服务商"
|
||||||
msgid "Cloud account"
|
msgid "Cloud account"
|
||||||
msgstr "云账号"
|
msgstr "云账号"
|
||||||
|
|
||||||
#: xpack/plugins/cloud/models.py:81 xpack/plugins/cloud/serializers.py:146
|
#: xpack/plugins/cloud/models.py:81 xpack/plugins/cloud/serializers.py:140
|
||||||
msgid "Regions"
|
msgid "Regions"
|
||||||
msgstr "地域"
|
msgstr "地域"
|
||||||
|
|
||||||
|
@ -4748,7 +4748,7 @@ msgstr "地域"
|
||||||
msgid "Hostname strategy"
|
msgid "Hostname strategy"
|
||||||
msgstr "主机名策略"
|
msgstr "主机名策略"
|
||||||
|
|
||||||
#: xpack/plugins/cloud/models.py:95 xpack/plugins/cloud/serializers.py:169
|
#: xpack/plugins/cloud/models.py:95 xpack/plugins/cloud/serializers.py:163
|
||||||
msgid "Always update"
|
msgid "Always update"
|
||||||
msgstr "总是更新"
|
msgstr "总是更新"
|
||||||
|
|
||||||
|
@ -4940,19 +4940,19 @@ msgstr ""
|
||||||
msgid "Subscription ID"
|
msgid "Subscription ID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: xpack/plugins/cloud/serializers.py:55
|
#: xpack/plugins/cloud/serializers.py:49
|
||||||
msgid "{} is required"
|
msgid "This field is required"
|
||||||
msgstr "{} 字段是必填项"
|
msgstr "这个字段是必填项"
|
||||||
|
|
||||||
#: xpack/plugins/cloud/serializers.py:144
|
#: xpack/plugins/cloud/serializers.py:138
|
||||||
msgid "History count"
|
msgid "History count"
|
||||||
msgstr "执行次数"
|
msgstr "执行次数"
|
||||||
|
|
||||||
#: xpack/plugins/cloud/serializers.py:145
|
#: xpack/plugins/cloud/serializers.py:139
|
||||||
msgid "Instance count"
|
msgid "Instance count"
|
||||||
msgstr "实例个数"
|
msgstr "实例个数"
|
||||||
|
|
||||||
#: xpack/plugins/cloud/serializers.py:168
|
#: xpack/plugins/cloud/serializers.py:162
|
||||||
#: xpack/plugins/gathered_user/serializers.py:20
|
#: xpack/plugins/gathered_user/serializers.py:20
|
||||||
msgid "Periodic display"
|
msgid "Periodic display"
|
||||||
msgstr "定时执行"
|
msgstr "定时执行"
|
||||||
|
@ -5045,6 +5045,9 @@ msgstr "旗舰版"
|
||||||
msgid "Community edition"
|
msgid "Community edition"
|
||||||
msgstr "社区版"
|
msgstr "社区版"
|
||||||
|
|
||||||
|
#~ msgid "{} is required"
|
||||||
|
#~ msgstr "{} 字段是必填项"
|
||||||
|
|
||||||
#~ msgid "AppSecret is required"
|
#~ msgid "AppSecret is required"
|
||||||
#~ msgstr "AppSecret 是必须的"
|
#~ msgstr "AppSecret 是必须的"
|
||||||
|
|
||||||
|
|
|
@ -78,12 +78,12 @@ class OrgResourceStatisticsCache(OrgRelatedCache):
|
||||||
return self.org
|
return self.org
|
||||||
|
|
||||||
def compute_users_amount(self):
|
def compute_users_amount(self):
|
||||||
if self.org.is_root():
|
users = User.objects.exclude(role='App')
|
||||||
users_amount = User.objects.exclude(role='App').count()
|
|
||||||
else:
|
if not self.org.is_root():
|
||||||
users_amount = OrganizationMember.objects.values(
|
users = users.filter(m2m_org_members__org_id=self.org.id)
|
||||||
'user_id'
|
|
||||||
).filter(org_id=self.org.id).distinct().count()
|
users_amount = users.values('id').distinct().count()
|
||||||
return users_amount
|
return users_amount
|
||||||
|
|
||||||
def compute_assets_amount(self):
|
def compute_assets_amount(self):
|
||||||
|
|
|
@ -122,7 +122,7 @@ REDIS_PORT: 6379
|
||||||
# USER_LOGIN_SINGLE_MACHINE_ENABLED: False
|
# USER_LOGIN_SINGLE_MACHINE_ENABLED: False
|
||||||
#
|
#
|
||||||
# 启用定时任务
|
# 启用定时任务
|
||||||
# PERIOD_TASK_ENABLE: True
|
# PERIOD_TASK_ENABLED: True
|
||||||
#
|
#
|
||||||
# 启用二次复合认证配置
|
# 启用二次复合认证配置
|
||||||
# LOGIN_CONFIRM_ENABLE: False
|
# LOGIN_CONFIRM_ENABLE: False
|
||||||
|
|
Loading…
Reference in New Issue