Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
5b93a1a0
Commit
5b93a1a0
authored
Aug 15, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修复单页面bug
parent
00928dd4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
32 deletions
+54
-32
domain.py
apps/assets/forms/domain.py
+4
-0
django.mo
apps/i18n/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/i18n/zh/LC_MESSAGES/django.po
+42
-32
models.py
apps/orgs/models.py
+8
-0
No files found.
apps/assets/forms/domain.py
View file @
5b93a1a0
...
...
@@ -36,6 +36,10 @@ class DomainForm(forms.ModelForm):
class
GatewayForm
(
PasswordAndKeyAuthForm
,
OrgModelForm
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
()
.
__init__
(
*
args
,
**
kwargs
)
password_field
=
self
.
fields
.
get
(
'password'
)
password_field
.
help_text
=
_
(
'Password should not contain special characters'
)
def
save
(
self
,
commit
=
True
):
# Because we define custom field, so we need rewrite :method: `save`
...
...
apps/i18n/zh/LC_MESSAGES/django.mo
View file @
5b93a1a0
No preview for this file type
apps/i18n/zh/LC_MESSAGES/django.po
View file @
5b93a1a0
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-1
3 15:01
+0800\n"
"POT-Creation-Date: 2018-08-1
5 15:14
+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
...
...
@@ -103,7 +103,7 @@ msgid "Port"
msgstr "端口"
#: assets/forms/domain.py:15 assets/forms/label.py:13
#: assets/models/asset.py:23
1
assets/templates/assets/admin_user_list.html:25
#: assets/models/asset.py:23
2
assets/templates/assets/admin_user_list.html:25
#: assets/templates/assets/domain_detail.html:60
#: assets/templates/assets/domain_list.html:23
#: assets/templates/assets/label_list.html:16
...
...
@@ -123,7 +123,11 @@ msgstr "端口"
msgid "Asset"
msgstr "资产"
#: assets/forms/domain.py:55 assets/forms/user.py:79 assets/forms/user.py:139
#: assets/forms/domain.py:42
msgid "Password should not contain special characters"
msgstr "密码不能包含特殊字符"
#: assets/forms/domain.py:59 assets/forms/user.py:79 assets/forms/user.py:139
#: assets/models/base.py:22 assets/models/cluster.py:18
#: assets/models/domain.py:18 assets/models/group.py:20
#: assets/models/label.py:18 assets/templates/assets/admin_user_detail.html:56
...
...
@@ -156,7 +160,7 @@ msgstr "资产"
msgid "Name"
msgstr "名称"
#: assets/forms/domain.py:
56
assets/forms/user.py:80 assets/forms/user.py:140
#: assets/forms/domain.py:
60
assets/forms/user.py:80 assets/forms/user.py:140
#: assets/models/base.py:23 assets/templates/assets/admin_user_detail.html:60
#: assets/templates/assets/admin_user_list.html:24
#: assets/templates/assets/domain_gateway_list.html:60
...
...
@@ -303,42 +307,48 @@ msgstr "CPU数量"
msgid "CPU cores"
msgstr "CPU核数"
#: assets/models/asset.py:104 assets/templates/assets/asset_detail.html:89
#: assets/models/asset.py:103
#, fuzzy
#| msgid "CPU count"
msgid "CPU vcpus"
msgstr "CPU数量"
#: assets/models/asset.py:105 assets/templates/assets/asset_detail.html:89
msgid "Memory"
msgstr "内存"
#: assets/models/asset.py:10
6
#: assets/models/asset.py:10
7
msgid "Disk total"
msgstr "硬盘大小"
#: assets/models/asset.py:10
8
#: assets/models/asset.py:10
9
msgid "Disk info"
msgstr "硬盘信息"
#: assets/models/asset.py:11
1
assets/templates/assets/asset_detail.html:101
#: assets/models/asset.py:11
2
assets/templates/assets/asset_detail.html:101
#: assets/templates/assets/user_asset_list.html:166
msgid "OS"
msgstr "操作系统"
#: assets/models/asset.py:11
3
#: assets/models/asset.py:11
4
msgid "OS version"
msgstr "系统版本"
#: assets/models/asset.py:11
5
#: assets/models/asset.py:11
6
msgid "OS arch"
msgstr "系统架构"
#: assets/models/asset.py:11
7
#: assets/models/asset.py:11
8
msgid "Hostname raw"
msgstr "主机名原始"
#: assets/models/asset.py:12
1
assets/templates/assets/asset_create.html:34
#: assets/models/asset.py:12
2
assets/templates/assets/asset_create.html:34
#: assets/templates/assets/asset_detail.html:220
#: assets/templates/assets/asset_update.html:39 templates/_nav.html:27
msgid "Labels"
msgstr "标签管理"
#: assets/models/asset.py:12
3
assets/models/base.py:30
#: assets/models/asset.py:12
4
assets/models/base.py:30
#: assets/models/cluster.py:28 assets/models/group.py:21
#: assets/templates/assets/admin_user_detail.html:68
#: assets/templates/assets/asset_detail.html:117
...
...
@@ -350,7 +360,7 @@ msgstr "标签管理"
msgid "Created by"
msgstr "创建者"
#: assets/models/asset.py:12
6
assets/models/cluster.py:26
#: assets/models/asset.py:12
7
assets/models/cluster.py:26
#: assets/models/domain.py:21 assets/models/group.py:22
#: assets/models/label.py:24 assets/templates/assets/admin_user_detail.html:64
#: assets/templates/assets/domain_detail.html:68
...
...
@@ -364,7 +374,7 @@ msgstr "创建者"
msgid "Date created"
msgstr "创建日期"
#: assets/models/asset.py:12
8
assets/models/base.py:27
#: assets/models/asset.py:12
9
assets/models/base.py:27
#: assets/models/cluster.py:29 assets/models/domain.py:19
#: assets/models/domain.py:48 assets/models/group.py:23
#: assets/models/label.py:22 assets/templates/assets/admin_user_detail.html:72
...
...
@@ -474,7 +484,7 @@ msgstr "默认资产组"
msgid "User"
msgstr "用户"
#: assets/models/label.py:19 assets/models/node.py:
19
#: assets/models/label.py:19 assets/models/node.py:
20
#: assets/templates/assets/label_list.html:15 common/models.py:27
msgid "Value"
msgstr "值"
...
...
@@ -483,7 +493,7 @@ msgstr "值"
msgid "Category"
msgstr "分类"
#: assets/models/node.py:1
8
#: assets/models/node.py:1
9
msgid "Key"
msgstr ""
...
...
@@ -557,35 +567,35 @@ msgstr "系统用户"
msgid "%(value)s is not an even number"
msgstr "%(value)s is not an even number"
#: assets/tasks.py:9
6 assets/tasks.py:116
#: assets/tasks.py:9
7 assets/tasks.py:117
msgid "更新资产硬件信息"
msgstr ""
#: assets/tasks.py:13
5
#: assets/tasks.py:13
6
msgid "定期更新资产硬件信息"
msgstr ""
#: assets/tasks.py:21
3
#: assets/tasks.py:21
4
msgid "定期测试管理账号可连接性: {}"
msgstr ""
#: assets/tasks.py:22
0
#: assets/tasks.py:22
1
msgid "测试管理行号可连接性: {}"
msgstr ""
#: assets/tasks.py:23
0
#: assets/tasks.py:23
1
msgid "测试资产可连接性"
msgstr ""
#: assets/tasks.py:30
0
#: assets/tasks.py:30
1
msgid "Test system user connectability: {}"
msgstr "测试系统用户可连接性: {}"
#: assets/tasks.py:31
6
#: assets/tasks.py:31
7
msgid "定期测试系统用户可连接性: {}"
msgstr ""
#: assets/tasks.py:40
1
#: assets/tasks.py:40
2
msgid "推送系统用户到入资产: {}"
msgstr ""
...
...
@@ -850,7 +860,7 @@ msgstr "选择节点"
#: assets/templates/assets/admin_user_detail.html:100
#: assets/templates/assets/asset_detail.html:200
#: assets/templates/assets/asset_list.html:63
0
#: assets/templates/assets/asset_list.html:63
1
#: assets/templates/assets/system_user_detail.html:195
#: assets/templates/assets/system_user_list.html:139 templates/_modal.html:22
#: terminal/templates/terminal/session_detail.html:108
...
...
@@ -1052,7 +1062,7 @@ msgstr "重命名成功"
msgid "Rename failed, do not change the root node name"
msgstr "重命名失败,不可以更改根节点名称"
#: assets/templates/assets/asset_list.html:62
5
#: assets/templates/assets/asset_list.html:62
6
#: assets/templates/assets/system_user_list.html:134
#: users/templates/users/user_detail.html:369
#: users/templates/users/user_detail.html:394
...
...
@@ -1063,20 +1073,20 @@ msgstr "重命名失败,不可以更改根节点名称"
msgid "Are you sure?"
msgstr "你确认吗?"
#: assets/templates/assets/asset_list.html:62
6
#: assets/templates/assets/asset_list.html:62
7
msgid "This will delete the selected assets !!!"
msgstr "删除选择资产"
#: assets/templates/assets/asset_list.html:63
4
#: assets/templates/assets/asset_list.html:63
5
msgid "Asset Deleted."
msgstr "已被删除"
#: assets/templates/assets/asset_list.html:63
5
#: assets/templates/assets/asset_list.html:64
0
#: assets/templates/assets/asset_list.html:63
6
#: assets/templates/assets/asset_list.html:64
1
msgid "Asset Delete"
msgstr "删除"
#: assets/templates/assets/asset_list.html:6
39
#: assets/templates/assets/asset_list.html:6
40
msgid "Asset Deleting failed."
msgstr "删除失败"
...
...
apps/orgs/models.py
View file @
5b93a1a0
...
...
@@ -56,6 +56,8 @@ class Organization(models.Model):
from
users.models
import
User
if
self
.
is_default
():
users
=
User
.
objects
.
filter
(
orgs__isnull
=
True
)
elif
not
self
.
is_real
():
users
=
User
.
objects
.
all
()
else
:
users
=
self
.
users
.
all
()
users
=
users
.
exclude
(
role
=
User
.
ROLE_APP
)
...
...
@@ -96,6 +98,12 @@ class Organization(models.Model):
def
root
(
cls
):
return
cls
(
id
=
cls
.
ROOT_ID
,
name
=
'Root'
)
def
is_root
(
self
):
if
self
.
id
is
self
.
ROOT_ID
:
return
True
else
:
return
False
def
is_default
(
self
):
if
self
.
id
is
self
.
DEFAULT_ID
:
return
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment