diff --git a/apps/assets/templates/assets/idc_create.html b/apps/assets/templates/assets/idc_create_update.html
similarity index 100%
rename from apps/assets/templates/assets/idc_create.html
rename to apps/assets/templates/assets/idc_create_update.html
diff --git a/apps/assets/templates/assets/idc_list.html b/apps/assets/templates/assets/idc_list.html
index ca8bd157b0dc54beae9c74180fc9e88c2fab1786..3ce6f601b50c1d854fd4dea5c004afb2e3a395df 100644
--- a/apps/assets/templates/assets/idc_list.html
+++ b/apps/assets/templates/assets/idc_list.html
@@ -28,7 +28,7 @@
{{ idc.address }} |
{% trans 'Update' %}
- {% trans 'Delete' %}
+ {% trans 'Delete' %}
|
{% endfor %}
diff --git a/apps/assets/views.py b/apps/assets/views.py
index 5b752d8ec13c8569d2d7d74b920c4086f9d0eca5..c1b6c06adaf26a1add44e5c613bdf0c6c596e348 100644
--- a/apps/assets/views.py
+++ b/apps/assets/views.py
@@ -173,7 +173,7 @@ class IDCListView(AdminUserRequiredMixin, ListView):
class IDCCreateView(AdminUserRequiredMixin, CreateView):
model = IDC
form_class = IDCForm
- template_name = 'assets/idc_create.html'
+ template_name = 'assets/idc_create_update.html'
success_url = reverse_lazy('assets:idc-list')
def get_context_data(self, **kwargs):
@@ -188,24 +188,26 @@ class IDCCreateView(AdminUserRequiredMixin, CreateView):
class IDCUpdateView(AdminUserRequiredMixin, UpdateView):
model = IDC
form_class = IDCForm
- template_name = 'assets/idc_create.html'
- context_object_name = 'IDC'
+ template_name = 'assets/idc_create_update.html'
+ context_object_name = 'idc'
success_url = reverse_lazy('assets:idc-list')
+
def form_valid(self, form):
- IDC = form.save(commit=False)
- IDC.save()
+ idc = form.save(commit=False)
+ idc.save()
return super(IDCUpdateView, self).form_valid(form)
+
class IDCDetailView(AdminUserRequiredMixin, DetailView):
pass
-
class IDCDeleteView(AdminUserRequiredMixin, DeleteView):
model = IDC
template_name = 'assets/delete_confirm.html'
success_url = reverse_lazy('assets:idc-list')
+
class AdminUserListView(AdminUserRequiredMixin, ListView):
model = AdminUser
paginate_by = settings.CONFIG.DISPLAY_PER_PAGE
@@ -241,7 +243,6 @@ class AdminUserCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateVie
form_class = AdminUserForm
template_name = 'assets/admin_user_create_update.html'
success_url = reverse_lazy('assets:admin-user-list')
- success_message = _('Create admin user %s successfully.')
def get_context_data(self, **kwargs):
context = {
@@ -252,17 +253,18 @@ class AdminUserCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateVie
return super(AdminUserCreateView, self).get_context_data(**kwargs)
def get_success_message(self, cleaned_data):
- return self.success_message % (
- reverse_lazy('assets:admin-user-detail', kwargs={'pk': self.object.pk}),
- self.object.name,
- )
+ success_message = _('Create admin user %s successfully.' %
+ (
+ reverse_lazy('assets:admin-user-detail', kwargs={'pk': self.object.pk}),
+ self.object.name,
+ ))
+ return success_message
class AdminUserUpdateView(AdminUserRequiredMixin, UpdateView):
model = AdminUser
form_class = AdminUserForm
template_name = 'assets/admin_user_create_update.html'
- success_message = _('Update admin user %s successfully.')
def get_context_data(self, **kwargs):
context = {
@@ -340,7 +342,6 @@ class SystemUserCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateVi
form_class = SystemUserForm
template_name = 'assets/system_user_create_update.html'
success_url = reverse_lazy('assets:system-user-list')
- success_message = _('Create system user %s successfully.')
def get_context_data(self, **kwargs):
context = {
@@ -351,10 +352,13 @@ class SystemUserCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateVi
return super(SystemUserCreateView, self).get_context_data(**kwargs)
def get_success_message(self, cleaned_data):
- return self.success_message % (
- reverse_lazy('assets:system-user-detail', kwargs={'pk': self.object.pk}),
- self.object.name,
- )
+ success_message = _('Create system user %s successfully.' %
+ (
+ reverse_lazy('assets:system-user-detail', kwargs={'pk': self.object.pk}),
+ self.object.name,
+ ))
+
+ return self.success_message
class SystemUserUpdateView(AdminUserRequiredMixin, UpdateView):
diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo
index 13d91f86f87348001bb9de7653a0df5593b4acdf..58a2c50f2f9ad396716d7dc03399e41e13b34a23 100644
Binary files a/apps/locale/zh/LC_MESSAGES/django.mo and b/apps/locale/zh/LC_MESSAGES/django.mo differ
diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po
index ccb101d78529e08a7db43af8a1eef5d60aa0604e..5d8df1ca51c686079f0885c682e301cabc1b2c4d 100644
--- a/apps/locale/zh/LC_MESSAGES/django.po
+++ b/apps/locale/zh/LC_MESSAGES/django.po
@@ -8,108 +8,201 @@ msgid ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-06 19:12+0800\n"
+"POT-Creation-Date: 2016-09-15 12:13+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler \n"
"Language-Team: Jumpserver team\n"
-"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Language: zh_CN\n"
-#: assets/forms.py:19
+#: assets/forms.py:19 assets/forms.py:156 perms/forms.py:27
+#: perms/templates/perms/asset_permission_asset_list.html:139
msgid "Select asset groups"
msgstr "添加到资产组"
-#: assets/forms.py:25 assets/models.py:171 templates/_nav.html:21
+#: assets/forms.py:26 assets/forms.py:57 assets/forms.py:88
+#: assets/forms.py:146 assets/models.py:322
+#: perms/templates/perms/asset_permission_create_update.html:40
+#: templates/_nav.html:21
msgid "Asset"
msgstr "资产"
-#: assets/forms.py:28
+#: assets/forms.py:29 assets/forms.py:60 assets/forms.py:91
+#: assets/forms.py:149 perms/forms.py:25
msgid "Select assets"
msgstr "选择资产"
-#: assets/models.py:12 assets/models.py:48 assets/models.py:81
-#: assets/models.py:103 assets/templates/assets/asset_group_detail.html:63
-#: assets/templates/assets/asset_group_list.html:12 users/models.py:60
-#: users/models.py:107 users/templates/users/user_detail.html:69
+#: assets/forms.py:79 assets/forms.py:134 assets/forms.py:206
+#: assets/models.py:14 assets/models.py:88 assets/models.py:153
+#: assets/models.py:222 assets/templates/assets/admin_user_detail.html:50
+#: assets/templates/assets/admin_user_list.html:10
+#: assets/templates/assets/asset_group_detail.html:46
+#: assets/templates/assets/asset_group_list.html:12
+#: assets/templates/assets/idc_list.html:10
+#: assets/templates/assets/system_user_asset_group.html:53
+#: assets/templates/assets/system_user_detail.html:55
+#: assets/templates/assets/system_user_list.html:10 perms/models.py:19
+#: perms/templates/perms/asset_permission_create_update.html:33
+#: perms/templates/perms/asset_permission_detail.html:56
+#: perms/templates/perms/asset_permission_list.html:12
+#: perms/templates/perms/asset_permission_user_list.html:66
+#: perms/templates/perms/perm_user_asset_list.html:12 users/models.py:20
+#: users/models.py:67 users/templates/users/user_detail.html:54
#: users/templates/users/user_list.html:12
msgid "Name"
msgstr "名称"
-#: assets/models.py:13 assets/models.py:56 assets/models.py:69
-#: assets/models.py:88 assets/models.py:117 assets/models.py:152
-#: assets/models.py:172 users/models.py:122
-#: users/templates/users/user_detail.html:101
-msgid "Created by"
-msgstr "创建者"
-
-#: assets/models.py:14 assets/models.py:54 assets/models.py:154
-msgid "Date added"
-msgstr "加入日期"
-
-#: assets/models.py:15 assets/models.py:57 assets/models.py:71
-#: assets/models.py:89 assets/models.py:118 assets/models.py:155
-#: assets/models.py:174 assets/templates/assets/asset_group_detail.html:75
-#: assets/templates/assets/asset_group_list.html:14 users/models.py:61
-#: users/models.py:118 users/templates/users/user_detail.html:113
-msgid "Comment"
-msgstr "备注"
-
-#: assets/models.py:25
-#, fuzzy
-#| msgid "As default"
-msgid "Default"
-msgstr "默认使用"
+#: assets/forms.py:96 assets/forms.py:161
+msgid "If also set private key, use that first"
+msgstr "如果设置私钥,则优先使用私钥"
+
+#: assets/forms.py:135 assets/forms.py:207 assets/models.py:89
+#: assets/models.py:154 assets/templates/assets/admin_user_detail.html:54
+#: assets/templates/assets/admin_user_list.html:11
+#: assets/templates/assets/system_user_detail.html:59
+#: assets/templates/assets/system_user_list.html:11
+#: perms/templates/perms/asset_permission_user_list.html:67
+#: perms/templates/perms/perm_user_asset_list.html:13 users/forms.py:13
+#: users/models.py:66 users/templates/users/login.html:53
+#: users/templates/users/user_detail.html:58
+#: users/templates/users/user_list.html:13
+#: users/templates/users/user_update.html:6
+msgid "Username"
+msgstr "用户名"
-#: assets/models.py:25
-#, fuzzy
-#| msgid "Create asset group"
-msgid "Default asset group"
-msgstr "创建资产组"
+#: assets/forms.py:152 perms/templates/perms/perm_user_asset_list.html:16
+#: templates/_nav.html:22
+msgid "Asset group"
+msgstr "资产组"
-#: assets/models.py:49
+#: assets/models.py:15 assets/templates/assets/idc_list.html:12
msgid "Bandwidth"
msgstr "带宽"
-#: assets/models.py:50
+#: assets/models.py:16 assets/templates/assets/idc_list.html:13
msgid "Contact"
msgstr "联系人"
-#: assets/models.py:51 users/models.py:113
-#: users/templates/users/user_detail.html:82
+#: assets/models.py:17 assets/templates/assets/idc_list.html:14
+#: users/models.py:73 users/templates/users/user_detail.html:67
msgid "Phone"
msgstr "手机"
-#: assets/models.py:52
+#: assets/models.py:18 assets/templates/assets/idc_list.html:15
msgid "Address"
msgstr "地址"
-#: assets/models.py:53
+#: assets/models.py:19
msgid "Network"
msgstr "网络"
-#: assets/models.py:55
+#: assets/models.py:20 assets/models.py:225 assets/models.py:286
+msgid "Date added"
+msgstr "加入日期"
+
+#: assets/models.py:21
msgid "Operator"
msgstr "运营商"
-#: assets/models.py:67 assets/models.py:169
+#: assets/models.py:22 assets/models.py:59 assets/models.py:96
+#: assets/models.py:167 assets/models.py:224 assets/models.py:284
+#: assets/models.py:323 assets/templates/assets/admin_user_detail.html:62
+#: assets/templates/assets/asset_group_detail.html:54
+#: assets/templates/assets/system_user_detail.html:105 perms/models.py:28
+#: perms/templates/perms/asset_permission_detail.html:96 users/models.py:82
+#: users/templates/users/user_detail.html:86
+msgid "Created by"
+msgstr "创建者"
+
+#: assets/models.py:23 assets/models.py:61 assets/models.py:94
+#: assets/models.py:168 assets/models.py:226 assets/models.py:287
+#: assets/models.py:325 assets/templates/assets/admin_user_detail.html:66
+#: assets/templates/assets/admin_user_list.html:14
+#: assets/templates/assets/asset_group_detail.html:58
+#: assets/templates/assets/asset_group_list.html:14
+#: assets/templates/assets/system_user_asset_group.html:56
+#: assets/templates/assets/system_user_detail.html:109
+#: assets/templates/assets/system_user_list.html:15 perms/models.py:30
+#: perms/templates/perms/asset_permission_detail.html:100 users/models.py:21
+#: users/models.py:78 users/templates/users/user_detail.html:98
+msgid "Comment"
+msgstr "备注"
+
+#: assets/models.py:57 assets/models.py:320
msgid "KEY"
msgstr "KEY"
-#: assets/models.py:68 assets/models.py:170
+#: assets/models.py:58 assets/models.py:321
msgid "VALUE"
msgstr "VALUE"
-#: assets/models.py:82 assets/models.py:104 users/forms.py:13
-#: users/models.py:106 users/templates/users/login.html:53
-#: users/templates/users/user_detail.html:73
-#: users/templates/users/user_list.html:13
-#: users/templates/users/user_update.html:6
-msgid "Username"
-msgstr "用户名"
+#: assets/models.py:69 assets/models.py:70
+msgid "status"
+msgstr "状态"
+
+#: assets/models.py:69
+#, fuzzy
+#| msgid "Admin user"
+msgid "In use"
+msgstr "管理用户"
+
+#: assets/models.py:70
+#, fuzzy
+#| msgid "Auto push"
+msgid "Out of use"
+msgstr "自动推送"
+
+#: assets/models.py:71 assets/models.py:72 assets/models.py:73
+#: assets/models.py:74 assets/models.py:75 assets/models.py:76
+msgid "type"
+msgstr ""
+
+#: assets/models.py:71
+msgid "Server"
+msgstr ""
+
+#: assets/models.py:72
+msgid "VM"
+msgstr ""
+
+#: assets/models.py:73
+msgid "Switch"
+msgstr ""
+
+#: assets/models.py:74
+#, fuzzy
+#| msgid "Role"
+msgid "Router"
+msgstr "角色"
+
+#: assets/models.py:75
+msgid "Firewall"
+msgstr ""
+
+#: assets/models.py:76
+msgid "Storage"
+msgstr ""
+
+#: assets/models.py:77 assets/models.py:78 assets/models.py:79
+msgid "env"
+msgstr ""
+
+#: assets/models.py:77
+msgid "Production"
+msgstr ""
-#: assets/models.py:83 assets/models.py:105 users/forms.py:15
+#: assets/models.py:78
+msgid "Development"
+msgstr ""
+
+#: assets/models.py:79
+#, fuzzy
+msgid "Setting"
+msgstr "设置"
+
+#: assets/models.py:90 assets/models.py:155 users/forms.py:15
#: users/templates/users/login.html:56
#: users/templates/users/reset_password.html:52
#: users/templates/users/user_create.html:8
@@ -119,256 +212,437 @@ msgstr "用户名"
msgid "Password"
msgstr "密码"
-#: assets/models.py:84 assets/models.py:107
+#: assets/models.py:91 assets/models.py:157
msgid "SSH private key"
msgstr "ssh密钥"
-#: assets/models.py:85 assets/models.py:109
+#: assets/models.py:92 assets/models.py:158
+msgid "SSH public key"
+msgstr "ssh公钥"
+
+#: assets/models.py:93 assets/models.py:159
+#: assets/templates/assets/admin_user_create_update.html:43
+#: assets/templates/assets/system_user_create_update.html:44
+#: assets/templates/assets/system_user_detail.html:75
msgid "As default"
msgstr "默认使用"
-#: assets/models.py:86 assets/models.py:111
-msgid "Auto update pass/key"
-msgstr "自动更新密码/密钥"
-
-#: assets/models.py:106
+#: assets/models.py:156 assets/templates/assets/system_user_detail.html:63
msgid "Protocol"
msgstr "协议"
-#: assets/models.py:108
-msgid "SSH public key"
-msgstr "ssh公钥"
-
-#: assets/models.py:110
+#: assets/models.py:160
+#: assets/templates/assets/system_user_create_update.html:50
+#: assets/templates/assets/system_user_detail.html:67
msgid "Auto push"
msgstr "自动推送"
-#: assets/models.py:112
+#: assets/models.py:161
+msgid "Auto update pass/key"
+msgstr "自动更新密码/密钥"
+
+#: assets/models.py:162 assets/templates/assets/system_user_detail.html:79
msgid "Sudo"
msgstr "Sudo"
-#: assets/models.py:113
+#: assets/models.py:163 assets/templates/assets/system_user_detail.html:84
msgid "Shell"
msgstr "Shell"
-#: assets/models.py:114 templates/_header_bar.html:41 templates/_nav.html:4
+#: assets/models.py:164 assets/templates/assets/system_user_detail.html:90
+#: templates/_header_bar.html:41 templates/_nav.html:4
msgid "Home"
msgstr "仪表盘"
-#: assets/models.py:115
+#: assets/models.py:165 assets/templates/assets/system_user_detail.html:96
msgid "Uid"
msgstr "Uid"
-#: assets/models.py:128
+#: assets/models.py:236
+#, fuzzy
+#| msgid "As default"
+msgid "Default"
+msgstr "默认使用"
+
+#: assets/models.py:236
+#, fuzzy
+#| msgid "Create asset group"
+msgid "Default asset group"
+msgstr "创建资产组"
+
+#: assets/models.py:259 assets/templates/assets/admin_user_detail.html:100
+#: assets/templates/assets/asset_group_detail.html:88
+#: assets/templates/assets/system_user_asset.html:53
+#: perms/templates/perms/asset_permission_asset_list.html:67
msgid "IP"
msgstr "IP"
-#: assets/models.py:129
+#: assets/models.py:260
msgid "Other IP"
msgstr "其它IP"
-#: assets/models.py:130
+#: assets/models.py:261
msgid "Remote card IP"
msgstr "远控卡IP"
-#: assets/models.py:131
+#: assets/models.py:262 assets/templates/assets/admin_user_detail.html:99
+#: assets/templates/assets/asset_group_detail.html:87
+#: assets/templates/assets/system_user_asset.html:52
+#: perms/templates/perms/asset_permission_asset_list.html:66
msgid "Hostname"
msgstr "用户名"
-#: assets/models.py:132
+#: assets/models.py:263 assets/templates/assets/admin_user_detail.html:101
+#: assets/templates/assets/asset_group_detail.html:89
+#: assets/templates/assets/system_user_asset.html:54
+#: perms/templates/perms/asset_permission_asset_list.html:68
msgid "Port"
msgstr "端口"
-#: assets/models.py:133
+#: assets/models.py:264
msgid "Asset groups"
msgstr "用户组"
-#: assets/models.py:134 assets/models.py:136 templates/_nav.html:24
+#: assets/models.py:265 assets/models.py:268 templates/_nav.html:24
msgid "Admin user"
msgstr "管理用户"
-#: assets/models.py:135
+#: assets/models.py:266
msgid "Admin password"
msgstr "管理员密码"
-#: assets/models.py:137
+#: assets/models.py:269
msgid "System User"
msgstr "系统用户"
-#: assets/models.py:138 templates/_nav.html:23
+#: assets/models.py:270 templates/_nav.html:23
msgid "IDC"
msgstr "机房"
-#: assets/models.py:139
+#: assets/models.py:271
msgid "Mac address"
msgstr "Mac地址"
-#: assets/models.py:140
+#: assets/models.py:272
msgid "Brand"
msgstr "品牌"
-#: assets/models.py:141
+#: assets/models.py:273
msgid "CPU"
msgstr "CPU"
-#: assets/models.py:142
+#: assets/models.py:274
msgid "Memory"
msgstr "内存"
-#: assets/models.py:143
+#: assets/models.py:275
msgid "Disk"
msgstr "硬盘"
-#: assets/models.py:144
+#: assets/models.py:276
msgid "OS"
msgstr "操作系统"
-#: assets/models.py:145
+#: assets/models.py:277
msgid "Cabinet number"
msgstr "机柜编号"
-#: assets/models.py:146
+#: assets/models.py:278
msgid "Cabinet position"
msgstr "机柜层号"
-#: assets/models.py:147
+#: assets/models.py:279
msgid "Asset number"
msgstr "资产编号"
-#: assets/models.py:148
+#: assets/models.py:280
msgid "Asset status"
msgstr "资产状态"
-#: assets/models.py:149
+#: assets/models.py:281
msgid "Asset type"
msgstr "系统类型"
-#: assets/models.py:150
+#: assets/models.py:282
msgid "Asset environment"
msgstr "资产环境"
-#: assets/models.py:151
+#: assets/models.py:283
msgid "Serial number"
msgstr "序列号"
-#: assets/models.py:153
+#: assets/models.py:285 perms/templates/perms/asset_permission_detail.html:84
msgid "Is active"
msgstr "是否激活"
-#: assets/templates/assets/asset_group_create.html:16
-#: assets/templates/assets/asset_group_list.html:5 assets/views.py:62
-#: assets/views.py:117
-msgid "Create asset group"
-msgstr "创建资产组"
+#: assets/templates/assets/admin_user_create_update.html:16
+#: assets/templates/assets/admin_user_list.html:5
+#, fuzzy
+#| msgid "Create user"
+msgid "Create admin user"
+msgstr "创建用户"
+
+#: assets/templates/assets/admin_user_create_update.html:35
+#: assets/templates/assets/system_user_create_update.html:36
+#, fuzzy
+#| msgid "Auto update pass/key"
+msgid "Auto generate key"
+msgstr "自动更新密码/密钥"
-#: assets/templates/assets/asset_group_create.html:50
-#: assets/templates/assets/asset_group_detail.html:124
-#: assets/templates/assets/asset_group_detail.html:132
+#: assets/templates/assets/admin_user_create_update.html:53
+#: assets/templates/assets/admin_user_detail.html:152
+#: assets/templates/assets/asset_group_create.html:38
+#: assets/templates/assets/idc_create_update.html:44
+#: assets/templates/assets/system_user_create_update.html:71
+#: assets/templates/assets/system_user_detail.html:148
+#: perms/templates/perms/asset_permission_create_update.html:69
#: users/templates/users/_user.html:70
-#: users/templates/users/user_detail.html:162
-#: users/templates/users/user_detail.html:170
+#: users/templates/users/user_detail.html:147
+#: users/templates/users/user_detail.html:155
msgid "Reset"
msgstr "重置"
-#: assets/templates/assets/asset_group_create.html:51
+#: assets/templates/assets/admin_user_create_update.html:54
+#: assets/templates/assets/asset_group_create.html:39
#: assets/templates/assets/asset_group_list.html:51
+#: assets/templates/assets/idc_create_update.html:45
+#: assets/templates/assets/system_user_create_update.html:72
+#: perms/templates/perms/asset_permission_create_update.html:70
+#: perms/templates/perms/asset_permission_list.html:65
+#: perms/templates/perms/perm_user_asset_list.html:58
#: users/templates/users/_user.html:71
#: users/templates/users/forgot_password.html:44
-#: users/templates/users/user_list.html:63
+#: users/templates/users/user_list.html:64
msgid "Submit"
msgstr "提交"
+#: assets/templates/assets/admin_user_detail.html:18
#: assets/templates/assets/asset_group_detail.html:18
+#: assets/templates/assets/system_user_asset.html:19
+#: assets/templates/assets/system_user_asset_group.html:19
+#: assets/templates/assets/system_user_detail.html:19
+#: perms/templates/perms/asset_permission_asset_list.html:20
+#: perms/templates/perms/asset_permission_detail.html:20
+#: perms/templates/perms/asset_permission_user_list.html:20
msgid "Detail"
msgstr ""
-#: assets/templates/assets/asset_group_detail.html:20
+#: assets/templates/assets/admin_user_detail.html:20
+#: assets/templates/assets/system_user_asset.html:22
+#: assets/templates/assets/system_user_asset_group.html:22
+#: assets/templates/assets/system_user_detail.html:23
#, fuzzy
-#| msgid "Asset group list"
-msgid "Asset group assets"
-msgstr "资产组列表"
-
-#: assets/templates/assets/asset_group_detail.html:28
-#: templates/_header_bar.html:8 users/templates/users/user_detail.html:29
-msgid "Search"
-msgstr "搜索"
+#| msgid "User assets"
+msgid "Associate assets"
+msgstr "用户资产"
-#: assets/templates/assets/asset_group_detail.html:67
+#: assets/templates/assets/admin_user_detail.html:58
+#: assets/templates/assets/asset_group_detail.html:50
+#: assets/templates/assets/system_user_detail.html:101 perms/models.py:29
+#: perms/templates/perms/asset_permission_detail.html:92
#, fuzzy
#| msgid "Date added"
-msgid "Date create"
+msgid "Date created"
msgstr "加入日期"
-#: assets/templates/assets/asset_group_detail.html:71
+#: assets/templates/assets/admin_user_detail.html:76
+#: assets/templates/assets/asset_group_detail.html:68
+#: assets/templates/assets/system_user_asset.html:33
+#: assets/templates/assets/system_user_asset_group.html:34
+#: perms/templates/perms/asset_permission_asset_list.html:47
#, fuzzy
-#| msgid "Created by"
-msgid "Create by"
-msgstr "创建者"
+#| msgid "Asset group list"
+msgid "Asset list of "
+msgstr "资产组列表"
-#: assets/templates/assets/asset_group_detail.html:86
-#: users/templates/users/user_detail.html:124
-msgid "Quick modify"
-msgstr "快速修改"
+#: assets/templates/assets/admin_user_detail.html:102
+#: assets/templates/assets/asset_group_detail.html:90
+#: assets/templates/assets/system_user_asset.html:55
+#, fuzzy
+msgid "Alive"
+msgstr "激活"
-#: assets/templates/assets/asset_group_detail.html:121
-#: users/templates/users/reset_password.html:45
-#: users/templates/users/user_detail.html:159 users/utils.py:98
-msgid "Reset password"
-msgstr "重置密码"
+#: assets/templates/assets/admin_user_detail.html:125
+#: assets/templates/assets/system_user_detail.html:121
+#: perms/templates/perms/asset_permission_detail.html:112
+msgid "Quick update"
+msgstr ""
-#: assets/templates/assets/asset_group_detail.html:129
-#: users/templates/users/user_detail.html:167
-msgid "Reset ssh key"
-msgstr "重置密钥"
+#: assets/templates/assets/admin_user_detail.html:131
+msgid "Get install script"
+msgstr ""
-#: assets/templates/assets/asset_group_detail.html:143 templates/_nav.html:13
-#: users/models.py:109 users/templates/users/user_detail.html:181
-#: users/templates/users/user_list.html:15
-msgid "User group"
-msgstr "用户组"
+#: assets/templates/assets/admin_user_detail.html:134
+#: assets/templates/assets/system_user_detail.html:130
+msgid "Get"
+msgstr ""
-#: assets/templates/assets/asset_group_detail.html:151 users/forms.py:34
-#: users/forms.py:54 users/templates/users/user_detail.html:189
-msgid "Join user groups"
-msgstr "添加到用户组"
+#: assets/templates/assets/admin_user_detail.html:140
+#: assets/templates/assets/system_user_detail.html:136
+#: perms/templates/perms/asset_permission_detail.html:132
+msgid "Retest asset connectivity"
+msgstr ""
-#: assets/templates/assets/asset_group_detail.html:160
-#: users/templates/users/user_detail.html:198
-msgid "Join"
-msgstr "加入"
+#: assets/templates/assets/admin_user_detail.html:143
+#: assets/templates/assets/system_user_detail.html:139
+#: perms/templates/perms/asset_permission_detail.html:135
+msgid "Start"
+msgstr ""
+
+#: assets/templates/assets/admin_user_detail.html:149
+#: assets/templates/assets/system_user_detail.html:145
+#, fuzzy
+#| msgid "ssh private key"
+msgid "Reset private key"
+msgstr "ssh密钥"
+
+#: assets/templates/assets/admin_user_detail.html:163
+msgid "Replace asset admin user with this"
+msgstr ""
+
+#: assets/templates/assets/admin_user_detail.html:171
+#: assets/templates/assets/system_user_asset.html:86
+#, fuzzy
+#| msgid "Select assets"
+msgid "Select asset"
+msgstr "选择资产"
+
+#: assets/templates/assets/admin_user_detail.html:180
+msgid "Replace"
+msgstr ""
+#: assets/templates/assets/admin_user_list.html:9
+#: assets/templates/assets/idc_list.html:9
+#: assets/templates/assets/system_user_list.html:9
+#, fuzzy
+#| msgid "IDC"
+msgid "ID"
+msgstr "机房"
+
+#: assets/templates/assets/admin_user_list.html:12
#: assets/templates/assets/asset_group_list.html:13
+#: assets/templates/assets/idc_list.html:11
+#: assets/templates/assets/system_user_asset_group.html:54
+#: assets/templates/assets/system_user_list.html:12
+#: perms/templates/perms/perm_user_asset_list.html:15
#: users/templates/users/user_list.html:16
msgid "Asset num"
msgstr "资产数量"
+#: assets/templates/assets/admin_user_list.html:13
+msgid "Lost connection"
+msgstr ""
+
+#: assets/templates/assets/admin_user_list.html:33
+#: assets/templates/assets/system_user_list.html:35
+msgid "Script"
+msgstr ""
+
+#: assets/templates/assets/admin_user_list.html:35
+#: assets/templates/assets/system_user_list.html:37
+msgid "Refresh"
+msgstr ""
+
+#: assets/templates/assets/admin_user_list.html:36
#: assets/templates/assets/asset_group_list.html:32
+#: assets/templates/assets/idc_list.html:30
+#: assets/templates/assets/system_user_list.html:38
+#: perms/templates/perms/asset_permission_list.html:46
#: users/templates/users/user_list.html:44
msgid "Update"
msgstr "更新"
+#: assets/templates/assets/admin_user_list.html:37
#: assets/templates/assets/asset_group_list.html:33
+#: assets/templates/assets/idc_list.html:31
+#: assets/templates/assets/system_user_list.html:39
+#: perms/templates/perms/asset_permission_list.html:47
#: users/templates/users/user_list.html:45
+#: users/templates/users/user_list.html:46
msgid "Delete"
msgstr "删除"
+#: assets/templates/assets/asset_group_create.html:16
+#: assets/templates/assets/asset_group_list.html:5 assets/views.py:61
+#: assets/views.py:131
+msgid "Create asset group"
+msgstr "创建资产组"
+
+#: assets/templates/assets/asset_group_detail.html:20
+#, fuzzy
+#| msgid "Asset group"
+msgid "Asset group perm"
+msgstr "资产组"
+
+#: assets/templates/assets/asset_group_detail.html:113
+#, fuzzy
+#| msgid "System user"
+msgid "Associate system user"
+msgstr "系统"
+
+#: assets/templates/assets/asset_group_detail.html:119
+#, fuzzy
+#| msgid "System user"
+msgid "repush system user"
+msgstr "系统"
+
+#: assets/templates/assets/asset_group_detail.html:129
+#, fuzzy
+#| msgid "System user"
+msgid "Select system user"
+msgstr "系统"
+
+#: assets/templates/assets/asset_group_detail.html:138
+msgid "Associate"
+msgstr ""
+
+#: assets/templates/assets/asset_group_detail.html:157
+#, fuzzy
+#| msgid "Asset group"
+msgid "Add asset to this group"
+msgstr "资产组"
+
+#: assets/templates/assets/asset_group_detail.html:165
+#, fuzzy
+#| msgid "Select assets"
+msgid "Select asset user"
+msgstr "选择资产"
+
+#: assets/templates/assets/asset_group_detail.html:174
+#: assets/templates/assets/system_user_asset.html:95
+#: assets/templates/assets/system_user_asset_group.html:96
+#: perms/templates/perms/asset_permission_asset_list.html:120
+#: perms/templates/perms/asset_permission_user_list.html:120
+#, fuzzy
+#| msgid "Address"
+msgid "Add"
+msgstr "地址"
+
#: assets/templates/assets/asset_group_list.html:43
-#: users/templates/users/user_list.html:55
+#: perms/templates/perms/asset_permission_list.html:57
+#: perms/templates/perms/perm_user_asset_list.html:50
+#: users/templates/users/user_list.html:56
msgid "Delete selected"
msgstr "批量删除"
#: assets/templates/assets/asset_group_list.html:44
-#: users/templates/users/user_list.html:56
+#: perms/templates/perms/asset_permission_list.html:58
+#: perms/templates/perms/perm_user_asset_list.html:51
+#: users/templates/users/user_list.html:57
msgid "Update selected"
msgstr "批量更新"
#: assets/templates/assets/asset_group_list.html:45
-#: users/templates/users/user_list.html:57
+#: perms/templates/perms/asset_permission_list.html:59
+#: perms/templates/perms/perm_user_asset_list.html:52
+#: users/templates/users/user_list.html:58
msgid "Deactive selected"
msgstr "禁用所选"
#: assets/templates/assets/asset_group_list.html:46
-#: users/templates/users/user_list.html:58
+#: perms/templates/perms/asset_permission_list.html:60
+#: perms/templates/perms/perm_user_asset_list.html:53
+#: users/templates/users/user_list.html:59
msgid "Export selected"
msgstr "批量导出"
@@ -377,19 +651,417 @@ msgid "Create asset"
msgstr "创建资产"
#: assets/templates/assets/delete_confirm.html:6
+#: perms/templates/perms/delete_confirm.html:6
#: users/templates/users/user_delete_confirm.html:6
msgid "Confirm delete"
msgstr "确认删除"
-#: assets/views.py:61 assets/views.py:81 assets/views.py:116
-#: templates/_nav.html:18
+#: assets/templates/assets/idc_create_update.html:16
+#, fuzzy
+#| msgid "Created by"
+msgid "Create idc"
+msgstr "创建者"
+
+#: assets/templates/assets/idc_list.html:5
+#, fuzzy
+#| msgid "Created by"
+msgid "Create IDC"
+msgstr "创建者"
+
+#: assets/templates/assets/system_user_asset.html:25
+#: assets/templates/assets/system_user_asset_group.html:26
+#: assets/templates/assets/system_user_detail.html:28
+#, fuzzy
+#| msgid "Create asset group"
+msgid "Associate asset groups"
+msgstr "创建资产组"
+
+#: assets/templates/assets/system_user_asset.html:78
+msgid "Add asset to this system user"
+msgstr ""
+
+#: assets/templates/assets/system_user_asset_group.html:55
+msgid "Unavailable num"
+msgstr ""
+
+#: assets/templates/assets/system_user_asset_group.html:79
+#, fuzzy
+#| msgid "Asset group list"
+msgid "Add asset group to this system user"
+msgstr "资产组列表"
+
+#: assets/templates/assets/system_user_asset_group.html:87
+#, fuzzy
+#| msgid "Select asset groups"
+msgid "Select asset group"
+msgstr "添加到资产组"
+
+#: assets/templates/assets/system_user_create_update.html:16
+#: assets/templates/assets/system_user_list.html:5 assets/views.py:349
+#, fuzzy
+#| msgid "Create user"
+msgid "Create system user"
+msgstr "创建用户"
+
+#: assets/templates/assets/system_user_create_update.html:56
+#: assets/templates/assets/system_user_detail.html:71
+#, fuzzy
+#| msgid "Auto update pass/key"
+msgid "Auto update"
+msgstr "自动更新密码/密钥"
+
+#: assets/templates/assets/system_user_detail.html:127
+msgid "Get mannual install script"
+msgstr ""
+
+#: assets/templates/assets/system_user_list.html:13
+#, fuzzy
+#| msgid "Asset group"
+msgid "Asset group num"
+msgstr "资产组"
+
+#: assets/templates/assets/system_user_list.html:14
+msgid "Unavailable"
+msgstr ""
+
+#: assets/views.py:60 assets/views.py:80 assets/views.py:114
+#: assets/views.py:130 assets/views.py:152 assets/views.py:219
+#: assets/views.py:318 assets/views.py:348 assets/views.py:372
+#: assets/views.py:390 templates/_nav.html:18
msgid "Assets"
msgstr "资产管理"
-#: assets/views.py:82
+#: assets/views.py:81
msgid "Asset group list"
msgstr "资产组列表"
+#: assets/views.py:115
+#, fuzzy
+#| msgid "Asset group list"
+msgid "Asset group detail"
+msgstr "资产组列表"
+
+#: assets/views.py:153
+msgid "IDC list"
+msgstr ""
+
+#: assets/views.py:220
+#, fuzzy
+#| msgid "Admin user"
+msgid "Admin user list"
+msgstr "管理用户"
+
+#: assets/views.py:256
+#, fuzzy, python-format
+#| msgid "Create user %s success."
+msgid "Create admin user %s successfully."
+msgstr "创建用户 %s 成功"
+
+#: assets/views.py:319
+#, fuzzy
+#| msgid "System user"
+msgid "System user list"
+msgstr "系统"
+
+#: assets/views.py:355
+#, fuzzy, python-format
+#| msgid "Create user %s success."
+msgid "Create system user %s successfully."
+msgstr "创建用户 %s 成功"
+
+#: assets/views.py:368
+#, fuzzy, python-format
+#| msgid "Create user %s success."
+msgid "Update system user %s successfully."
+msgstr "创建用户 %s 成功"
+
+#: assets/views.py:373
+#, fuzzy
+#| msgid "Update user"
+msgid "Update system user"
+msgstr "编辑用户"
+
+#: assets/views.py:391
+#, fuzzy
+#| msgid "System user"
+msgid "System user detail"
+msgstr "系统"
+
+#: perms/forms.py:21
+#, fuzzy
+#| msgid "Select assets"
+msgid "Select users"
+msgstr "选择资产"
+
+#: perms/forms.py:23 perms/templates/perms/asset_permission_user_list.html:139
+#, fuzzy
+#| msgid "Select asset groups"
+msgid "Select user groups"
+msgstr "添加到资产组"
+
+#: perms/forms.py:29 perms/templates/perms/asset_permission_detail.html:163
+#, fuzzy
+#| msgid "System user"
+msgid "Select system users"
+msgstr "系统"
+
+#: perms/models.py:26
+#: perms/templates/perms/asset_permission_create_update.html:49
+#: perms/templates/perms/perm_user_asset_list.html:18
+#: users/templates/users/user_detail.html:115
+#: users/templates/users/user_list.html:17
+#, fuzzy
+msgid "Active"
+msgstr "激活"
+
+#: perms/models.py:27 perms/templates/perms/asset_permission_detail.html:88
+#: users/models.py:81 users/templates/users/user_detail.html:82
+msgid "Date expired"
+msgstr "失效日期"
+
+#: perms/templates/perms/asset_permission_asset_list.html:24
+#: perms/templates/perms/asset_permission_detail.html:24
+#: perms/templates/perms/asset_permission_user_list.html:24
+#, fuzzy
+#| msgid "Join user groups"
+msgid "Users and user groups"
+msgstr "添加到用户组"
+
+#: perms/templates/perms/asset_permission_asset_list.html:29
+#: perms/templates/perms/asset_permission_detail.html:29
+#: perms/templates/perms/asset_permission_user_list.html:29
+#, fuzzy
+#| msgid "Select asset groups"
+msgid "Assets and asset gruops"
+msgstr "添加到资产组"
+
+#: perms/templates/perms/asset_permission_asset_list.html:69
+#: perms/templates/perms/asset_permission_list.html:18
+#: perms/templates/perms/asset_permission_user_list.html:69
+msgid "Is valid"
+msgstr ""
+
+#: perms/templates/perms/asset_permission_asset_list.html:103
+msgid "Add asset to this permission"
+msgstr ""
+
+#: perms/templates/perms/asset_permission_asset_list.html:111
+#, fuzzy
+#| msgid "Select assets"
+msgid "Select asset "
+msgstr "选择资产"
+
+#: perms/templates/perms/asset_permission_asset_list.html:131
+msgid "Add asset group to this permission"
+msgstr ""
+
+#: perms/templates/perms/asset_permission_asset_list.html:148
+#: perms/templates/perms/asset_permission_detail.html:172
+#: perms/templates/perms/asset_permission_user_list.html:148
+#: users/templates/users/user_detail.html:183
+msgid "Join"
+msgstr "加入"
+
+#: perms/templates/perms/asset_permission_create_update.html:17
+#, fuzzy
+#| msgid "Create asset group"
+msgid "Create asset permission "
+msgstr "创建资产组"
+
+#: perms/templates/perms/asset_permission_create_update.html:36
+#: templates/_nav.html:12 templates/_user_profile.html:14 users/models.py:63
+msgid "User"
+msgstr "用户"
+
+#: perms/templates/perms/asset_permission_create_update.html:45
+#, fuzzy
+#| msgid "Other IP"
+msgid "Other"
+msgstr "其它IP"
+
+#: perms/templates/perms/asset_permission_detail.html:60
+#: perms/templates/perms/asset_permission_list.html:13
+#, fuzzy
+#| msgid "User group"
+msgid "User count"
+msgstr "用户组"
+
+#: perms/templates/perms/asset_permission_detail.html:64
+#: perms/templates/perms/asset_permission_list.html:14
+#, fuzzy
+#| msgid "User group list"
+msgid "User group count"
+msgstr "用户组列表"
+
+#: perms/templates/perms/asset_permission_detail.html:68
+#: perms/templates/perms/asset_permission_list.html:15
+#, fuzzy
+#| msgid "Asset group"
+msgid "Asset count"
+msgstr "资产组"
+
+#: perms/templates/perms/asset_permission_detail.html:72
+#: perms/templates/perms/asset_permission_list.html:16
+#, fuzzy
+#| msgid "Asset group list"
+msgid "Asset group count"
+msgstr "资产组列表"
+
+#: perms/templates/perms/asset_permission_detail.html:76
+#: perms/templates/perms/asset_permission_list.html:17
+#, fuzzy
+#| msgid "System user"
+msgid "System user count"
+msgstr "系统"
+
+#: perms/templates/perms/asset_permission_detail.html:80
+#, fuzzy
+msgid "Action"
+msgstr "激活"
+
+#: perms/templates/perms/asset_permission_detail.html:141
+#, fuzzy
+#| msgid "System user"
+msgid "Repush system user"
+msgstr "系统"
+
+#: perms/templates/perms/asset_permission_detail.html:144
+msgid "Push"
+msgstr ""
+
+#: perms/templates/perms/asset_permission_detail.html:155
+#: perms/templates/perms/perm_user_asset_list.html:17 templates/_nav.html:25
+msgid "System user"
+msgstr "系统"
+
+#: perms/templates/perms/asset_permission_list.html:5
+#, fuzzy
+#| msgid "Create perm"
+msgid "Create permission"
+msgstr "创建权限"
+
+#: perms/templates/perms/asset_permission_user_list.html:47
+#, fuzzy
+#| msgid "User list"
+msgid "User list of "
+msgstr "用户列表"
+
+#: perms/templates/perms/asset_permission_user_list.html:68 users/models.py:68
+#: users/templates/users/user_detail.html:62
+msgid "Email"
+msgstr "邮件"
+
+#: perms/templates/perms/asset_permission_user_list.html:103
+msgid "Add user to asset permission"
+msgstr ""
+
+#: perms/templates/perms/asset_permission_user_list.html:111
+#, fuzzy
+#| msgid "Select assets"
+msgid "Select user"
+msgstr "选择资产"
+
+#: perms/templates/perms/asset_permission_user_list.html:131
+#, fuzzy
+#| msgid "Asset group list"
+msgid "Add user group to asset permission"
+msgstr "资产组列表"
+
+#: perms/templates/perms/perm_user_asset_list.html:5
+#, fuzzy
+#| msgid "Create perm"
+msgid "Create perm "
+msgstr "创建权限"
+
+#: perms/templates/perms/perm_user_asset_list.html:14 users/models.py:70
+#: users/templates/users/user_detail.html:78
+#: users/templates/users/user_list.html:14
+msgid "Role"
+msgstr "角色"
+
+#: perms/templates/perms/perm_user_asset_list.html:39
+msgid "Create perm"
+msgstr "创建权限"
+
+#: perms/templates/perms/perm_user_asset_list.html:40
+msgid "Flush"
+msgstr ""
+
+#: perms/views.py:29 perms/views.py:66 perms/views.py:89 perms/views.py:107
+#: perms/views.py:146 perms/views.py:181 templates/_nav.html:30
+msgid "Perms"
+msgstr "权限管理"
+
+#: perms/views.py:30
+#, fuzzy
+#| msgid "Asset group list"
+msgid "Asset permission list"
+msgstr "资产组列表"
+
+#: perms/views.py:67
+#, fuzzy
+#| msgid "Create asset group"
+msgid "Create asset permission"
+msgstr "创建资产组"
+
+#: perms/views.py:73
+#, fuzzy, python-format
+#| msgid "Create user %s success."
+msgid "Create asset permission %s successfully."
+msgstr "创建用户 %s 成功"
+
+#: perms/views.py:85
+#, fuzzy, python-format
+#| msgid "Create user %s success."
+msgid "Update asset permission %s successfully."
+msgstr "创建用户 %s 成功"
+
+#: perms/views.py:90
+msgid "Update asset permission"
+msgstr ""
+
+#: perms/views.py:108
+#, fuzzy
+#| msgid "Asset environment"
+msgid "Asset permission detail"
+msgstr "资产环境"
+
+#: perms/views.py:147
+#, fuzzy
+#| msgid "Asset group list"
+msgid "Asset permission user list"
+msgstr "资产组列表"
+
+#: perms/views.py:182
+#, fuzzy
+#| msgid "Asset group list"
+msgid "Asset permission asset list"
+msgstr "资产组列表"
+
+#: templates/_foot_js.html:24
+msgid "Are you sure delete ?"
+msgstr ""
+
+#: templates/_foot_js.html:28
+msgid "Cancel"
+msgstr ""
+
+#: templates/_foot_js.html:30
+msgid "Yes, delete it!"
+msgstr ""
+
+#: templates/_foot_js.html:40
+# msgid "Deleted!"
+# msgstr "删除"
+
+#: templates/_foot_js.html:40
+msgid "has been deleted."
+msgstr "已被删除"
+
+#: templates/_header_bar.html:8
+msgid "Search"
+msgstr "搜索"
+
#: templates/_header_bar.html:14
msgid "Welcome to use Jumpserver system"
msgstr "欢迎使用Jumpserver开源跳板机系统"
@@ -407,38 +1079,31 @@ msgstr "注销登录"
msgid "Login"
msgstr "登录"
-#: templates/_nav.html:9 users/views.py:92 users/views.py:105
-#: users/views.py:145 users/views.py:162 users/views.py:187 users/views.py:200
+#: templates/_modal.html:15
+msgid "Close"
+msgstr ""
+
+#: templates/_nav.html:9 users/views.py:107 users/views.py:120
+#: users/views.py:160 users/views.py:191 users/views.py:216 users/views.py:229
+#: users/views.py:345
msgid "Users"
msgstr "用户管理"
-#: templates/_nav.html:12 templates/_user_profile.html:14 users/models.py:103
-msgid "User"
-msgstr "用户"
-
-#: templates/_nav.html:22
-msgid "Asset group"
-msgstr "资产组"
-
-#: templates/_nav.html:25
-msgid "System user"
-msgstr "系统"
+#: templates/_nav.html:13 users/models.py:69
+#: users/templates/users/user_detail.html:166
+#: users/templates/users/user_list.html:15
+msgid "User group"
+msgstr "用户组"
#: templates/_nav.html:26
msgid "Label"
msgstr "标签"
-#: templates/_nav.html:30
-msgid "Perms"
-msgstr "权限管理"
-
#: templates/_nav.html:33
-msgid "Perm"
-msgstr "权限"
-
-#: templates/_nav.html:36
-msgid "Create perm"
-msgstr "创建权限"
+#, fuzzy
+#| msgid "Asset type"
+msgid "Asset permission"
+msgstr "系统类型"
#: templates/_nav.html:42
msgid "Audits"
@@ -476,53 +1141,93 @@ msgstr ""
msgid "Captcha"
msgstr "验证码"
-#: users/models.py:102 users/models.py:225
-msgid "Administrator"
-msgstr "管理员"
+#: templates/rest_framework/base.html:128
+#, fuzzy
+msgid "Filters"
+msgstr "过滤"
-#: users/models.py:108 users/templates/users/user_detail.html:77
-msgid "Email"
-msgstr "邮件"
+#: users/forms.py:35 users/forms.py:55
+#: users/templates/users/user_detail.html:174
+msgid "Join user groups"
+msgstr "添加到用户组"
-#: users/models.py:110 users/templates/users/user_detail.html:93
-#: users/templates/users/user_list.html:14
-msgid "Role"
-msgstr "角色"
+#: users/forms.py:74
+#, fuzzy
+#| msgid "Name"
+msgid "name"
+msgstr "名称"
+
+#: users/forms.py:75
+#, fuzzy
+#| msgid "Avatar"
+msgid "avatar"
+msgstr "头像"
-#: users/models.py:111
+#: users/forms.py:76
+#, fuzzy
+#| msgid "Wechat"
+msgid "wechat"
+msgstr "微信"
+
+#: users/forms.py:77
+#, fuzzy
+#| msgid "Phone"
+msgid "phone"
+msgstr "手机"
+
+#: users/forms.py:78
+#, fuzzy
+#| msgid "Enable OTP"
+msgid "enable otp"
+msgstr "二次验证"
+
+#: users/forms.py:82
+#, fuzzy
+#| msgid "SSH private key"
+msgid "private key"
+msgstr "ssh密钥"
+
+#: users/forms.py:89 users/serializers.py:55
+#, fuzzy
+#| msgid "ssh private key"
+msgid "Not a valid ssh private key."
+msgstr "ssh密钥"
+
+#: users/models.py:62 users/models.py:206
+msgid "Administrator"
+msgstr "管理员"
+
+#: users/models.py:71
msgid "Avatar"
msgstr "头像"
-#: users/models.py:112 users/templates/users/user_detail.html:88
+#: users/models.py:72 users/templates/users/user_detail.html:73
msgid "Wechat"
msgstr "微信"
-#: users/models.py:114 users/templates/users/_user.html:57
+#: users/models.py:74 users/templates/users/_user.html:57
+#: users/templates/users/user_detail.html:129
msgid "Enable OTP"
msgstr "二次验证"
-#: users/models.py:116
+#: users/models.py:76
msgid "ssh private key"
msgstr "ssh密钥"
-#: users/models.py:117
+#: users/models.py:77
msgid "ssh public key"
msgstr "ssh公钥"
-#: users/models.py:121 users/templates/users/user_detail.html:97
-msgid "Date expired"
-msgstr "失效日期"
-
-#: users/models.py:228
+#: users/models.py:209
msgid "Administrator is the super user of system"
msgstr "Administrator是初始的超级管理员"
-#: users/models.py:229
+#: users/models.py:210
msgid "System"
msgstr "系统"
#: users/templates/users/_user.html:17 users/templates/users/user_list.html:5
-#: users/views.py:105
+#: users/views.py:120
msgid "Create user"
msgstr "创建用户"
@@ -534,6 +1239,38 @@ msgstr "账户"
msgid "Security and Role"
msgstr "角色安全"
+#: users/templates/users/_user_reset_pk_modal.html:4
+#, fuzzy
+#| msgid "SSH private key"
+msgid "Reset User SSH Private Key"
+msgstr "ssh密钥"
+
+#: users/templates/users/first_login.html:16 users/views.py:345
+#, fuzzy
+#| msgid "Last login"
+msgid "First Login"
+msgstr "最后登录"
+
+#: users/templates/users/first_login.html:33
+#, fuzzy
+#| msgid "System"
+msgid "Step"
+msgstr "系统"
+
+#: users/templates/users/first_login.html:55
+msgid "first step"
+msgstr ""
+
+#: users/templates/users/first_login.html:56
+msgid "prev step"
+msgstr ""
+
+#: users/templates/users/first_login.html:58
+#, fuzzy
+#| msgid "Submit"
+msgid "submit"
+msgstr "提交"
+
#: users/templates/users/forgot_password.html:26
#: users/templates/users/login.html:64
msgid "Forgot password"
@@ -547,68 +1284,116 @@ msgstr "输入您的邮箱, 将会发一封重置短信邮件到您的邮箱中"
msgid "Captcha invalid"
msgstr "验证码错误"
+#: users/templates/users/reset_password.html:45
+#: users/templates/users/user_detail.html:144 users/utils.py:99
+msgid "Reset password"
+msgstr "重置密码"
+
#: users/templates/users/reset_password.html:55
msgid "Password again"
msgstr "再次输入密码"
-#: users/templates/users/reset_password.html:57
-msgid "Setting"
-msgstr "设置"
-
#: users/templates/users/user_create.html:12
msgid "Reset link will be generated and sent to the user. "
msgstr "生成重置密码连接,通过邮件发送给用户"
-#: users/templates/users/user_detail.html:18 users/views.py:162
+#: users/templates/users/user_detail.html:20 users/views.py:191
msgid "User detail"
msgstr "用户详情"
-#: users/templates/users/user_detail.html:20
+#: users/templates/users/user_detail.html:22
msgid "User assets"
msgstr "用户资产"
-#: users/templates/users/user_detail.html:21
+#: users/templates/users/user_detail.html:23
msgid "User log"
msgstr "登录日志"
-#: users/templates/users/user_detail.html:105
+#: users/templates/users/user_detail.html:90
msgid "Date joined"
msgstr "创建日期"
-#: users/templates/users/user_detail.html:109
+#: users/templates/users/user_detail.html:94
msgid "Last login"
msgstr "最后登录"
-#: users/templates/users/user_group_create.html:16 users/views.py:200
-msgid "Create user group"
-msgstr "创建用户组"
+#: users/templates/users/user_detail.html:109
+msgid "Quick modify"
+msgstr "快速修改"
-#: users/templates/users/user_list.html:17
+#: users/templates/users/user_detail.html:152
+msgid "Reset ssh key"
+msgstr "重置密钥"
+
+#: users/templates/users/user_detail.html:233
+msgid "UserGroup Update Success!"
+msgstr ""
+
+#: users/templates/users/user_detail.html:251
+#: users/templates/users/user_detail.html:257
#, fuzzy
-msgid "Active"
-msgstr "激活"
+#| msgid "Create account successfully"
+msgid "Update Successfully!"
+msgstr "创建账户成功"
-#: users/templates/users/user_update.html:3 users/views.py:145
+#: users/templates/users/user_detail.html:290
+msgid "E-mail sent successfully. An e-mail has been sent to the user\\"
+msgstr ""
+
+#: users/templates/users/user_detail.html:291
+#, fuzzy
+#| msgid "Password"
+msgid "Password-Reset"
+msgstr "密码"
+
+#: users/templates/users/user_detail.html:296
+msgid "Are you sure?"
+msgstr ""
+
+#: users/templates/users/user_detail.html:297
+msgid "This will reset the user\\"
+msgstr ""
+
+#: users/templates/users/user_detail.html:315
+msgid "Successfully updated the SSH private key."
+msgstr ""
+
+#: users/templates/users/user_detail.html:316
+#: users/templates/users/user_detail.html:321
+#, fuzzy
+#| msgid "SSH private key"
+msgid "User SSH Private Key Reset"
+msgstr "ssh密钥"
+
+#: users/templates/users/user_detail.html:319
+msgid "Failed to update the user\\"
+msgstr ""
+
+#: users/templates/users/user_group_create.html:16 users/views.py:229
+msgid "Create user group"
+msgstr "创建用户组"
+
+#: users/templates/users/user_update.html:3 users/views.py:160
msgid "Update user"
msgstr "编辑用户"
-#: users/utils.py:47
+#: users/utils.py:48
msgid "Begin to generate ssh private key ..."
msgstr "开始生成ssh密钥"
-#: users/utils.py:59
+#: users/utils.py:60
msgid "Finish to generate ssh private key ..."
msgstr "生成ssh密钥成功"
-#: users/utils.py:63
+#: users/utils.py:64
msgid "These is error when generate ssh key."
msgstr "创建密钥失败"
-#: users/utils.py:67
+#: users/utils.py:68
msgid "Create account successfully"
msgstr "创建账户成功"
-#: users/utils.py:69
+#: users/utils.py:70
#, python-format
msgid ""
"\n"
@@ -619,8 +1404,8 @@ msgid ""
" click "
"here to set your password\n"
" \n"
-" This link is valid for 1 hour. After it expires, request new one\n"
+" This link is valid for 1 hour. After it expires, request new one\n"
"\n"
" \n"
" ---\n"
@@ -649,7 +1434,7 @@ msgstr ""
" \n"
" "
-#: users/utils.py:100
+#: users/utils.py:101
#, python-format
msgid ""
"\n"
@@ -661,8 +1446,8 @@ msgid ""
" Click "
"here reset password\n"
" \n"
-" This link is valid for 1 hour. After it expires, request new one<\n"
+" This link is valid for 1 hour. After it expires, request new one<\n"
"\n"
" \n"
" ---\n"
@@ -693,55 +1478,64 @@ msgstr ""
" \n"
" "
-#: users/views.py:62
+#: users/views.py:78
msgid "Logout success"
msgstr "退出登录成功"
-#: users/views.py:63
+#: users/views.py:79
msgid "Logout success, return login page"
msgstr "退出登录成功,返回到登录页面"
-#: users/views.py:92
+#: users/views.py:107
msgid "User list"
msgstr "用户列表"
-#: users/views.py:101
-#, python-format
-msgid "Create user %s success."
+#: users/views.py:116
+#, fuzzy, python-format
+#| msgid "Create user %s success."
+msgid "Create user %s successfully."
msgstr "创建用户 %s 成功"
-#: users/views.py:187
+#: users/views.py:216
msgid "User group list"
msgstr "用户组列表"
-#: users/views.py:232
+#: users/views.py:261
msgid "Email address invalid, input again"
msgstr "邮箱地址错误,重新输入"
-#: users/views.py:243
+#: users/views.py:272
msgid "Send reset password message"
msgstr "发送重置密码邮件"
-#: users/views.py:244
+#: users/views.py:273
msgid "Send reset password mail success, login your mail box and follow it "
msgstr ""
"发送重置邮件成功, 请登录邮箱查看, 按照提示操作 (如果没收到,请等待3-5分钟)"
-#: users/views.py:256
+#: users/views.py:285
msgid "Reset password success"
msgstr "重置密码成功"
-#: users/views.py:257
+#: users/views.py:286
msgid "Reset password success, return to login page"
msgstr "重置密码成功,返回到登录页面"
-#: users/views.py:273 users/views.py:286
+#: users/views.py:302 users/views.py:315
msgid "Token invalid or expired"
msgstr "Token错误或失效"
-#: users/views.py:282
+#: users/views.py:311
msgid "Password not same"
msgstr "密码不一致"
+#, fuzzy
+#~| msgid "Create user %s success."
+#~ msgid "Update admin user %s successfully."
+#~ msgstr "创建用户 %s 成功"
+
+#~ msgid "Perm"
+#~ msgstr "权限"
+
#~ msgid "Username or password invalid"
#~ msgstr "用户名或密码错误"
diff --git a/apps/perms/views.py b/apps/perms/views.py
index 1d7ea4e5c5b0f33ea940cf4a5f77f088df32e9b6..e30a94774f59d7e0538b66192567033f18c14096 100644
--- a/apps/perms/views.py
+++ b/apps/perms/views.py
@@ -60,7 +60,6 @@ class AssetPermissionCreateView(AdminUserRequiredMixin, SuccessMessageMixin, Cre
form_class = AssetPermissionForm
template_name = 'perms/asset_permission_create_update.html'
success_url = reverse_lazy('perms:asset-permission-list')
- success_message = _('Create asset permission %s successfully.')
def get_context_data(self, **kwargs):
context = {
@@ -71,10 +70,12 @@ class AssetPermissionCreateView(AdminUserRequiredMixin, SuccessMessageMixin, Cre
return super(AssetPermissionCreateView, self).get_context_data(**kwargs)
def get_success_message(self, cleaned_data):
- return self.success_message % (
- reverse_lazy('perms:asset-permission-detail', kwargs={'pk': self.object.pk}),
- self.object.name,
- )
+ success_message = _('Create asset permission %s successfully.' %
+ (
+ reverse_lazy('perms:asset-permission-detail', kwargs={'pk': self.object.pk}),
+ self.object.name,
+ ))
+ return success_message
class AssetPermissionUpdateView(AdminUserRequiredMixin, UpdateView):
diff --git a/apps/static/js/jumpserver.js b/apps/static/js/jumpserver.js
index 20e62736f77241b97a80a8309286006a4cff11d2..bb815c02a695df0d90e15ebf4717253785bd5362 100644
--- a/apps/static/js/jumpserver.js
+++ b/apps/static/js/jumpserver.js
@@ -124,33 +124,66 @@ function move_left(from, to, from_o, to_o) {
function selectAll(){
- // 选择该页面所有option
+ // Select all check box
$('option').each(function(){
$(this).attr('selected', true);
});
}
-//
-//function move_all(from, to){
-// $("#"+from).children().each(function(){
-// $("#"+to).append(this);
-// });
-//}
+// function getIDall() {
+// var check_array = [];
+// $(".gradeX input:checked").each(function () {
+// var id = $(this).attr("value");
+// check_array.push(id);
+// });
+// return check_array.join(",");
+// }
+
+function getCookie(name) {
+ var cookieValue = null;
+ if (document.cookie && document.cookie !== '') {
+ var cookies = document.cookie.split(';');
+ for (var i = 0; i < cookies.length; i++) {
+ var cookie = jQuery.trim(cookies[i]);
+ // Does this cookie string begin with the name we want?
+ if (cookie.substring(0, name.length + 1) === (name + '=')) {
+ cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+ break;
+ }
+ }
+ }
+ return cookieValue;
+}
-//function commit_select(form_array){
-// $('#{0} option'.format(form_array)).each(function(){
-// $(this).prop('selected', true)
-// })
-//}
+function csrfSafeMethod(method) {
+ // these HTTP methods do not require CSRF protection
+ return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
+}
-function getIDall() {
- var check_array = [];
- $(".gradeX input:checked").each(function () {
- var id = $(this).attr("value");
- check_array.push(id);
+function setAjaxCSRFToken() {
+ var csrftoken = getCookie('csrftoken');
+ var sessionid = getCookie('sessionid');
+
+ $.ajaxSetup({
+ beforeSend: function(xhr, settings) {
+ if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
+ xhr.setRequestHeader("X-CSRFToken", csrftoken);
+ }
+ }
});
- return check_array.join(",");
+}
+
+function activeNav() {
+ var url_array = document.location.pathname.split("/");
+ var app = url_array[1];
+ var resource = url_array[2];
+ if (app == ''){
+ $('#index').addClass('active')
+ } else {
+ $("#" + app).addClass('active');
+ $('#' + app + ' #' + resource).addClass('active');
+ }
}
function APIUpdateAttr(props) {
@@ -158,6 +191,7 @@ function APIUpdateAttr(props) {
props = props || {};
success_message = props.success_message || 'Update Successfully!';
fail_message = props.fail_message || 'Error occurred while updating.';
+
$.ajax({
url: props.url,
type: props.method || "PATCH",
diff --git a/apps/templates/_foot_js.html b/apps/templates/_foot_js.html
index b9ca3b78420426993859e78c67562f37e7cc6711..b6b0851c50532bd93c3fedabae25143221fc05ae 100644
--- a/apps/templates/_foot_js.html
+++ b/apps/templates/_foot_js.html
@@ -6,62 +6,23 @@
+
-
diff --git a/apps/templates/base.html b/apps/templates/base.html
index 1b147f654a380fccebd8a9fdb19369710c472c34..283eac9ba86dac5baa3d039715a2d4c464b151f6 100644
--- a/apps/templates/base.html
+++ b/apps/templates/base.html
@@ -12,7 +12,6 @@
{% include '_head_css_js.html' %}
{% block custom_head_css_js %} {% endblock %}
-