Commit bb8852d5 authored by ibuler's avatar ibuler

Modify some style

parent 037d9323
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<td class="text-center">{{ idc.address }}</td> <td class="text-center">{{ idc.address }}</td>
<td class="text-center"> <td class="text-center">
<a href="{% url 'assets:idc-update' pk=idc.id %}" class="btn btn-xs btn-info">{% trans 'Update' %}</a> <a href="{% url 'assets:idc-update' pk=idc.id %}" class="btn btn-xs btn-info">{% trans 'Update' %}</a>
<a onclick="obj_del(this,'{{ idc.name }}','{% url 'assets:idc-delete' idc.id %}')" class="btn btn-xs btn-danger del">{% trans 'Delete' %}</a> <a onclick="objectDelete(this, '{{ idc.name }}', '{% url 'assets:idc-delete' idc.id %}')" class="btn btn-xs btn-danger del">{% trans 'Delete' %}</a>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
......
...@@ -173,7 +173,7 @@ class IDCListView(AdminUserRequiredMixin, ListView): ...@@ -173,7 +173,7 @@ class IDCListView(AdminUserRequiredMixin, ListView):
class IDCCreateView(AdminUserRequiredMixin, CreateView): class IDCCreateView(AdminUserRequiredMixin, CreateView):
model = IDC model = IDC
form_class = IDCForm form_class = IDCForm
template_name = 'assets/idc_create.html' template_name = 'assets/idc_create_update.html'
success_url = reverse_lazy('assets:idc-list') success_url = reverse_lazy('assets:idc-list')
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
...@@ -188,24 +188,26 @@ class IDCCreateView(AdminUserRequiredMixin, CreateView): ...@@ -188,24 +188,26 @@ class IDCCreateView(AdminUserRequiredMixin, CreateView):
class IDCUpdateView(AdminUserRequiredMixin, UpdateView): class IDCUpdateView(AdminUserRequiredMixin, UpdateView):
model = IDC model = IDC
form_class = IDCForm form_class = IDCForm
template_name = 'assets/idc_create.html' template_name = 'assets/idc_create_update.html'
context_object_name = 'IDC' context_object_name = 'idc'
success_url = reverse_lazy('assets:idc-list') success_url = reverse_lazy('assets:idc-list')
def form_valid(self, form): def form_valid(self, form):
IDC = form.save(commit=False) idc = form.save(commit=False)
IDC.save() idc.save()
return super(IDCUpdateView, self).form_valid(form) return super(IDCUpdateView, self).form_valid(form)
class IDCDetailView(AdminUserRequiredMixin, DetailView): class IDCDetailView(AdminUserRequiredMixin, DetailView):
pass pass
class IDCDeleteView(AdminUserRequiredMixin, DeleteView): class IDCDeleteView(AdminUserRequiredMixin, DeleteView):
model = IDC model = IDC
template_name = 'assets/delete_confirm.html' template_name = 'assets/delete_confirm.html'
success_url = reverse_lazy('assets:idc-list') success_url = reverse_lazy('assets:idc-list')
class AdminUserListView(AdminUserRequiredMixin, ListView): class AdminUserListView(AdminUserRequiredMixin, ListView):
model = AdminUser model = AdminUser
paginate_by = settings.CONFIG.DISPLAY_PER_PAGE paginate_by = settings.CONFIG.DISPLAY_PER_PAGE
...@@ -241,7 +243,6 @@ class AdminUserCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateVie ...@@ -241,7 +243,6 @@ class AdminUserCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateVie
form_class = AdminUserForm form_class = AdminUserForm
template_name = 'assets/admin_user_create_update.html' template_name = 'assets/admin_user_create_update.html'
success_url = reverse_lazy('assets:admin-user-list') success_url = reverse_lazy('assets:admin-user-list')
success_message = _('Create admin user <a href="%s">%s</a> successfully.')
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = { context = {
...@@ -252,17 +253,18 @@ class AdminUserCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateVie ...@@ -252,17 +253,18 @@ class AdminUserCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateVie
return super(AdminUserCreateView, self).get_context_data(**kwargs) return super(AdminUserCreateView, self).get_context_data(**kwargs)
def get_success_message(self, cleaned_data): def get_success_message(self, cleaned_data):
return self.success_message % ( success_message = _('Create admin user <a href="%s">%s</a> successfully.' %
reverse_lazy('assets:admin-user-detail', kwargs={'pk': self.object.pk}), (
self.object.name, reverse_lazy('assets:admin-user-detail', kwargs={'pk': self.object.pk}),
) self.object.name,
))
return success_message
class AdminUserUpdateView(AdminUserRequiredMixin, UpdateView): class AdminUserUpdateView(AdminUserRequiredMixin, UpdateView):
model = AdminUser model = AdminUser
form_class = AdminUserForm form_class = AdminUserForm
template_name = 'assets/admin_user_create_update.html' template_name = 'assets/admin_user_create_update.html'
success_message = _('Update admin user <a href="%s">%s</a> successfully.')
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = { context = {
...@@ -340,7 +342,6 @@ class SystemUserCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateVi ...@@ -340,7 +342,6 @@ class SystemUserCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateVi
form_class = SystemUserForm form_class = SystemUserForm
template_name = 'assets/system_user_create_update.html' template_name = 'assets/system_user_create_update.html'
success_url = reverse_lazy('assets:system-user-list') success_url = reverse_lazy('assets:system-user-list')
success_message = _('Create system user <a href="%s">%s</a> successfully.')
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = { context = {
...@@ -351,10 +352,13 @@ class SystemUserCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateVi ...@@ -351,10 +352,13 @@ class SystemUserCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateVi
return super(SystemUserCreateView, self).get_context_data(**kwargs) return super(SystemUserCreateView, self).get_context_data(**kwargs)
def get_success_message(self, cleaned_data): def get_success_message(self, cleaned_data):
return self.success_message % ( success_message = _('Create system user <a href="%s">%s</a> successfully.' %
reverse_lazy('assets:system-user-detail', kwargs={'pk': self.object.pk}), (
self.object.name, reverse_lazy('assets:system-user-detail', kwargs={'pk': self.object.pk}),
) self.object.name,
))
return self.success_message
class SystemUserUpdateView(AdminUserRequiredMixin, UpdateView): class SystemUserUpdateView(AdminUserRequiredMixin, UpdateView):
......
...@@ -8,108 +8,201 @@ msgid "" ...@@ -8,108 +8,201 @@ 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: 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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\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"
"Language: zh_CN\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\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" msgid "Select asset groups"
msgstr "添加到资产组" 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" msgid "Asset"
msgstr "资产" 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" msgid "Select assets"
msgstr "选择资产" msgstr "选择资产"
#: assets/models.py:12 assets/models.py:48 assets/models.py:81 #: assets/forms.py:79 assets/forms.py:134 assets/forms.py:206
#: assets/models.py:103 assets/templates/assets/asset_group_detail.html:63 #: assets/models.py:14 assets/models.py:88 assets/models.py:153
#: assets/templates/assets/asset_group_list.html:12 users/models.py:60 #: assets/models.py:222 assets/templates/assets/admin_user_detail.html:50
#: users/models.py:107 users/templates/users/user_detail.html:69 #: 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 #: users/templates/users/user_list.html:12
msgid "Name" msgid "Name"
msgstr "名称" msgstr "名称"
#: assets/models.py:13 assets/models.py:56 assets/models.py:69 #: assets/forms.py:96 assets/forms.py:161
#: assets/models.py:88 assets/models.py:117 assets/models.py:152 msgid "If also set private key, use that first"
#: assets/models.py:172 users/models.py:122 msgstr "如果设置私钥,则优先使用私钥"
#: users/templates/users/user_detail.html:101
msgid "Created by" #: assets/forms.py:135 assets/forms.py:207 assets/models.py:89
msgstr "创建者" #: assets/models.py:154 assets/templates/assets/admin_user_detail.html:54
#: assets/templates/assets/admin_user_list.html:11
#: assets/models.py:14 assets/models.py:54 assets/models.py:154 #: assets/templates/assets/system_user_detail.html:59
msgid "Date added" #: assets/templates/assets/system_user_list.html:11
msgstr "加入日期" #: perms/templates/perms/asset_permission_user_list.html:67
#: perms/templates/perms/perm_user_asset_list.html:13 users/forms.py:13
#: assets/models.py:15 assets/models.py:57 assets/models.py:71 #: users/models.py:66 users/templates/users/login.html:53
#: assets/models.py:89 assets/models.py:118 assets/models.py:155 #: users/templates/users/user_detail.html:58
#: assets/models.py:174 assets/templates/assets/asset_group_detail.html:75 #: users/templates/users/user_list.html:13
#: assets/templates/assets/asset_group_list.html:14 users/models.py:61 #: users/templates/users/user_update.html:6
#: users/models.py:118 users/templates/users/user_detail.html:113 msgid "Username"
msgid "Comment" msgstr "用户名"
msgstr "备注"
#: assets/models.py:25
#, fuzzy
#| msgid "As default"
msgid "Default"
msgstr "默认使用"
#: assets/models.py:25 #: assets/forms.py:152 perms/templates/perms/perm_user_asset_list.html:16
#, fuzzy #: templates/_nav.html:22
#| msgid "Create asset group" msgid "Asset group"
msgid "Default asset group" msgstr "资产组"
msgstr "创建资产组"
#: assets/models.py:49 #: assets/models.py:15 assets/templates/assets/idc_list.html:12
msgid "Bandwidth" msgid "Bandwidth"
msgstr "带宽" msgstr "带宽"
#: assets/models.py:50 #: assets/models.py:16 assets/templates/assets/idc_list.html:13
msgid "Contact" msgid "Contact"
msgstr "联系人" msgstr "联系人"
#: assets/models.py:51 users/models.py:113 #: assets/models.py:17 assets/templates/assets/idc_list.html:14
#: users/templates/users/user_detail.html:82 #: users/models.py:73 users/templates/users/user_detail.html:67
msgid "Phone" msgid "Phone"
msgstr "手机" msgstr "手机"
#: assets/models.py:52 #: assets/models.py:18 assets/templates/assets/idc_list.html:15
msgid "Address" msgid "Address"
msgstr "地址" msgstr "地址"
#: assets/models.py:53 #: assets/models.py:19
msgid "Network" msgid "Network"
msgstr "网络" 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" msgid "Operator"
msgstr "运营商" 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" msgid "KEY"
msgstr "KEY" msgstr "KEY"
#: assets/models.py:68 assets/models.py:170 #: assets/models.py:58 assets/models.py:321
msgid "VALUE" msgid "VALUE"
msgstr "VALUE" msgstr "VALUE"
#: assets/models.py:82 assets/models.py:104 users/forms.py:13 #: assets/models.py:69 assets/models.py:70
#: users/models.py:106 users/templates/users/login.html:53 msgid "status"
#: users/templates/users/user_detail.html:73 msgstr "状态"
#: users/templates/users/user_list.html:13
#: users/templates/users/user_update.html:6 #: assets/models.py:69
msgid "Username" #, fuzzy
msgstr "用户名" #| 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/login.html:56
#: users/templates/users/reset_password.html:52 #: users/templates/users/reset_password.html:52
#: users/templates/users/user_create.html:8 #: users/templates/users/user_create.html:8
...@@ -119,256 +212,437 @@ msgstr "用户名" ...@@ -119,256 +212,437 @@ msgstr "用户名"
msgid "Password" msgid "Password"
msgstr "密码" msgstr "密码"
#: assets/models.py:84 assets/models.py:107 #: assets/models.py:91 assets/models.py:157
msgid "SSH private key" msgid "SSH private key"
msgstr "ssh密钥" 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" msgid "As default"
msgstr "默认使用" msgstr "默认使用"
#: assets/models.py:86 assets/models.py:111 #: assets/models.py:156 assets/templates/assets/system_user_detail.html:63
msgid "Auto update pass/key"
msgstr "自动更新密码/密钥"
#: assets/models.py:106
msgid "Protocol" msgid "Protocol"
msgstr "协议" msgstr "协议"
#: assets/models.py:108 #: assets/models.py:160
msgid "SSH public key" #: assets/templates/assets/system_user_create_update.html:50
msgstr "ssh公钥" #: assets/templates/assets/system_user_detail.html:67
#: assets/models.py:110
msgid "Auto push" msgid "Auto push"
msgstr "自动推送" 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" msgid "Sudo"
msgstr "Sudo" msgstr "Sudo"
#: assets/models.py:113 #: assets/models.py:163 assets/templates/assets/system_user_detail.html:84
msgid "Shell" msgid "Shell"
msgstr "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" msgid "Home"
msgstr "仪表盘" msgstr "仪表盘"
#: assets/models.py:115 #: assets/models.py:165 assets/templates/assets/system_user_detail.html:96
msgid "Uid" msgid "Uid"
msgstr "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" msgid "IP"
msgstr "IP" msgstr "IP"
#: assets/models.py:129 #: assets/models.py:260
msgid "Other IP" msgid "Other IP"
msgstr "其它IP" msgstr "其它IP"
#: assets/models.py:130 #: assets/models.py:261
msgid "Remote card IP" msgid "Remote card IP"
msgstr "远控卡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" msgid "Hostname"
msgstr "用户名" 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" msgid "Port"
msgstr "端口" msgstr "端口"
#: assets/models.py:133 #: assets/models.py:264
msgid "Asset groups" msgid "Asset groups"
msgstr "用户组" 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" msgid "Admin user"
msgstr "管理用户" msgstr "管理用户"
#: assets/models.py:135 #: assets/models.py:266
msgid "Admin password" msgid "Admin password"
msgstr "管理员密码" msgstr "管理员密码"
#: assets/models.py:137 #: assets/models.py:269
msgid "System User" msgid "System User"
msgstr "系统用户" msgstr "系统用户"
#: assets/models.py:138 templates/_nav.html:23 #: assets/models.py:270 templates/_nav.html:23
msgid "IDC" msgid "IDC"
msgstr "机房" msgstr "机房"
#: assets/models.py:139 #: assets/models.py:271
msgid "Mac address" msgid "Mac address"
msgstr "Mac地址" msgstr "Mac地址"
#: assets/models.py:140 #: assets/models.py:272
msgid "Brand" msgid "Brand"
msgstr "品牌" msgstr "品牌"
#: assets/models.py:141 #: assets/models.py:273
msgid "CPU" msgid "CPU"
msgstr "CPU" msgstr "CPU"
#: assets/models.py:142 #: assets/models.py:274
msgid "Memory" msgid "Memory"
msgstr "内存" msgstr "内存"
#: assets/models.py:143 #: assets/models.py:275
msgid "Disk" msgid "Disk"
msgstr "硬盘" msgstr "硬盘"
#: assets/models.py:144 #: assets/models.py:276
msgid "OS" msgid "OS"
msgstr "操作系统" msgstr "操作系统"
#: assets/models.py:145 #: assets/models.py:277
msgid "Cabinet number" msgid "Cabinet number"
msgstr "机柜编号" msgstr "机柜编号"
#: assets/models.py:146 #: assets/models.py:278
msgid "Cabinet position" msgid "Cabinet position"
msgstr "机柜层号" msgstr "机柜层号"
#: assets/models.py:147 #: assets/models.py:279
msgid "Asset number" msgid "Asset number"
msgstr "资产编号" msgstr "资产编号"
#: assets/models.py:148 #: assets/models.py:280
msgid "Asset status" msgid "Asset status"
msgstr "资产状态" msgstr "资产状态"
#: assets/models.py:149 #: assets/models.py:281
msgid "Asset type" msgid "Asset type"
msgstr "系统类型" msgstr "系统类型"
#: assets/models.py:150 #: assets/models.py:282
msgid "Asset environment" msgid "Asset environment"
msgstr "资产环境" msgstr "资产环境"
#: assets/models.py:151 #: assets/models.py:283
msgid "Serial number" msgid "Serial number"
msgstr "序列号" msgstr "序列号"
#: assets/models.py:153 #: assets/models.py:285 perms/templates/perms/asset_permission_detail.html:84
msgid "Is active" msgid "Is active"
msgstr "是否激活" msgstr "是否激活"
#: assets/templates/assets/asset_group_create.html:16 #: assets/templates/assets/admin_user_create_update.html:16
#: assets/templates/assets/asset_group_list.html:5 assets/views.py:62 #: assets/templates/assets/admin_user_list.html:5
#: assets/views.py:117 #, fuzzy
msgid "Create asset group" #| msgid "Create user"
msgstr "创建资产组" 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/admin_user_create_update.html:53
#: assets/templates/assets/asset_group_detail.html:124 #: assets/templates/assets/admin_user_detail.html:152
#: assets/templates/assets/asset_group_detail.html:132 #: 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.html:70
#: users/templates/users/user_detail.html:162 #: users/templates/users/user_detail.html:147
#: users/templates/users/user_detail.html:170 #: users/templates/users/user_detail.html:155
msgid "Reset" msgid "Reset"
msgstr "重置" 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/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/_user.html:71
#: users/templates/users/forgot_password.html:44 #: users/templates/users/forgot_password.html:44
#: users/templates/users/user_list.html:63 #: users/templates/users/user_list.html:64
msgid "Submit" msgid "Submit"
msgstr "提交" msgstr "提交"
#: assets/templates/assets/admin_user_detail.html:18
#: assets/templates/assets/asset_group_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" msgid "Detail"
msgstr "" 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 #, fuzzy
#| msgid "Asset group list" #| msgid "User assets"
msgid "Asset group assets" msgid "Associate assets"
msgstr "资产组列表" msgstr "用户资产"
#: assets/templates/assets/asset_group_detail.html:28
#: templates/_header_bar.html:8 users/templates/users/user_detail.html:29
msgid "Search"
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 #, fuzzy
#| msgid "Date added" #| msgid "Date added"
msgid "Date create" msgid "Date created"
msgstr "加入日期" 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 #, fuzzy
#| msgid "Created by" #| msgid "Asset group list"
msgid "Create by" msgid "Asset list of "
msgstr "创建者" msgstr "资产组列表"
#: assets/templates/assets/asset_group_detail.html:86 #: assets/templates/assets/admin_user_detail.html:102
#: users/templates/users/user_detail.html:124 #: assets/templates/assets/asset_group_detail.html:90
msgid "Quick modify" #: assets/templates/assets/system_user_asset.html:55
msgstr "快速修改" #, fuzzy
msgid "Alive"
msgstr "激活"
#: assets/templates/assets/asset_group_detail.html:121 #: assets/templates/assets/admin_user_detail.html:125
#: users/templates/users/reset_password.html:45 #: assets/templates/assets/system_user_detail.html:121
#: users/templates/users/user_detail.html:159 users/utils.py:98 #: perms/templates/perms/asset_permission_detail.html:112
msgid "Reset password" msgid "Quick update"
msgstr "重置密码" msgstr ""
#: assets/templates/assets/asset_group_detail.html:129 #: assets/templates/assets/admin_user_detail.html:131
#: users/templates/users/user_detail.html:167 msgid "Get install script"
msgid "Reset ssh key" msgstr ""
msgstr "重置密钥"
#: assets/templates/assets/asset_group_detail.html:143 templates/_nav.html:13 #: assets/templates/assets/admin_user_detail.html:134
#: users/models.py:109 users/templates/users/user_detail.html:181 #: assets/templates/assets/system_user_detail.html:130
#: users/templates/users/user_list.html:15 msgid "Get"
msgid "User group" msgstr ""
msgstr "用户组"
#: assets/templates/assets/asset_group_detail.html:151 users/forms.py:34 #: assets/templates/assets/admin_user_detail.html:140
#: users/forms.py:54 users/templates/users/user_detail.html:189 #: assets/templates/assets/system_user_detail.html:136
msgid "Join user groups" #: perms/templates/perms/asset_permission_detail.html:132
msgstr "添加到用户组" msgid "Retest asset connectivity"
msgstr ""
#: assets/templates/assets/asset_group_detail.html:160 #: assets/templates/assets/admin_user_detail.html:143
#: users/templates/users/user_detail.html:198 #: assets/templates/assets/system_user_detail.html:139
msgid "Join" #: perms/templates/perms/asset_permission_detail.html:135
msgstr "加入" 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/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 #: users/templates/users/user_list.html:16
msgid "Asset num" msgid "Asset num"
msgstr "资产数量" 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/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 #: users/templates/users/user_list.html:44
msgid "Update" msgid "Update"
msgstr "更新" msgstr "更新"
#: assets/templates/assets/admin_user_list.html:37
#: assets/templates/assets/asset_group_list.html:33 #: 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:45
#: users/templates/users/user_list.html:46
msgid "Delete" msgid "Delete"
msgstr "删除" 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 #: 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" msgid "Delete selected"
msgstr "批量删除" msgstr "批量删除"
#: assets/templates/assets/asset_group_list.html:44 #: 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" msgid "Update selected"
msgstr "批量更新" msgstr "批量更新"
#: assets/templates/assets/asset_group_list.html:45 #: 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" msgid "Deactive selected"
msgstr "禁用所选" msgstr "禁用所选"
#: assets/templates/assets/asset_group_list.html:46 #: 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" msgid "Export selected"
msgstr "批量导出" msgstr "批量导出"
...@@ -377,19 +651,417 @@ msgid "Create asset" ...@@ -377,19 +651,417 @@ msgid "Create asset"
msgstr "创建资产" msgstr "创建资产"
#: assets/templates/assets/delete_confirm.html:6 #: assets/templates/assets/delete_confirm.html:6
#: perms/templates/perms/delete_confirm.html:6
#: users/templates/users/user_delete_confirm.html:6 #: users/templates/users/user_delete_confirm.html:6
msgid "Confirm delete" msgid "Confirm delete"
msgstr "确认删除" msgstr "确认删除"
#: assets/views.py:61 assets/views.py:81 assets/views.py:116 #: assets/templates/assets/idc_create_update.html:16
#: templates/_nav.html:18 #, 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" msgid "Assets"
msgstr "资产管理" msgstr "资产管理"
#: assets/views.py:82 #: assets/views.py:81
msgid "Asset group list" msgid "Asset group list"
msgstr "资产组列表" 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 <a href=\"%s\">%s</a> success."
msgid "Create admin user <a href=\"%s\">%s</a> successfully."
msgstr "创建用户 <a href=\"%s\">%s</a> 成功"
#: assets/views.py:319
#, fuzzy
#| msgid "System user"
msgid "System user list"
msgstr "系统"
#: assets/views.py:355
#, fuzzy, python-format
#| msgid "Create user <a href=\"%s\">%s</a> success."
msgid "Create system user <a href=\"%s\">%s</a> successfully."
msgstr "创建用户 <a href=\"%s\">%s</a> 成功"
#: assets/views.py:368
#, fuzzy, python-format
#| msgid "Create user <a href=\"%s\">%s</a> success."
msgid "Update system user <a href=\"%s\">%s</a> successfully."
msgstr "创建用户 <a href=\"%s\">%s</a> 成功"
#: 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 <a href=\"%s\">%s</a> success."
msgid "Create asset permission <a href=\"%s\"> %s </a> successfully."
msgstr "创建用户 <a href=\"%s\">%s</a> 成功"
#: perms/views.py:85
#, fuzzy, python-format
#| msgid "Create user <a href=\"%s\">%s</a> success."
msgid "Update asset permission <a href=\"%s\"> %s </a> successfully."
msgstr "创建用户 <a href=\"%s\">%s</a> 成功"
#: 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 #: templates/_header_bar.html:14
msgid "Welcome to use Jumpserver system" msgid "Welcome to use Jumpserver system"
msgstr "欢迎使用Jumpserver开源跳板机系统" msgstr "欢迎使用Jumpserver开源跳板机系统"
...@@ -407,38 +1079,31 @@ msgstr "注销登录" ...@@ -407,38 +1079,31 @@ msgstr "注销登录"
msgid "Login" msgid "Login"
msgstr "登录" msgstr "登录"
#: templates/_nav.html:9 users/views.py:92 users/views.py:105 #: templates/_modal.html:15
#: users/views.py:145 users/views.py:162 users/views.py:187 users/views.py:200 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" msgid "Users"
msgstr "用户管理" msgstr "用户管理"
#: templates/_nav.html:12 templates/_user_profile.html:14 users/models.py:103 #: templates/_nav.html:13 users/models.py:69
msgid "User" #: users/templates/users/user_detail.html:166
msgstr "用户" #: users/templates/users/user_list.html:15
msgid "User group"
#: templates/_nav.html:22 msgstr "用户组"
msgid "Asset group"
msgstr "资产组"
#: templates/_nav.html:25
msgid "System user"
msgstr "系统"
#: templates/_nav.html:26 #: templates/_nav.html:26
msgid "Label" msgid "Label"
msgstr "标签" msgstr "标签"
#: templates/_nav.html:30
msgid "Perms"
msgstr "权限管理"
#: templates/_nav.html:33 #: templates/_nav.html:33
msgid "Perm" #, fuzzy
msgstr "权限" #| msgid "Asset type"
msgid "Asset permission"
#: templates/_nav.html:36 msgstr "系统类型"
msgid "Create perm"
msgstr "创建权限"
#: templates/_nav.html:42 #: templates/_nav.html:42
msgid "Audits" msgid "Audits"
...@@ -476,53 +1141,93 @@ msgstr "" ...@@ -476,53 +1141,93 @@ msgstr ""
msgid "Captcha" msgid "Captcha"
msgstr "验证码" msgstr "验证码"
#: users/models.py:102 users/models.py:225 #: templates/rest_framework/base.html:128
msgid "Administrator" #, fuzzy
msgstr "管理员" msgid "Filters"
msgstr "过滤"
#: users/models.py:108 users/templates/users/user_detail.html:77 #: users/forms.py:35 users/forms.py:55
msgid "Email" #: users/templates/users/user_detail.html:174
msgstr "邮件" msgid "Join user groups"
msgstr "添加到用户组"
#: users/models.py:110 users/templates/users/user_detail.html:93 #: users/forms.py:74
#: users/templates/users/user_list.html:14 #, fuzzy
msgid "Role" #| msgid "Name"
msgstr "角色" 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" msgid "Avatar"
msgstr "头像" 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" msgid "Wechat"
msgstr "微信" 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" msgid "Enable OTP"
msgstr "二次验证" msgstr "二次验证"
#: users/models.py:116 #: users/models.py:76
msgid "ssh private key" msgid "ssh private key"
msgstr "ssh密钥" msgstr "ssh密钥"
#: users/models.py:117 #: users/models.py:77
msgid "ssh public key" msgid "ssh public key"
msgstr "ssh公钥" msgstr "ssh公钥"
#: users/models.py:121 users/templates/users/user_detail.html:97 #: users/models.py:209
msgid "Date expired"
msgstr "失效日期"
#: users/models.py:228
msgid "Administrator is the super user of system" msgid "Administrator is the super user of system"
msgstr "Administrator是初始的超级管理员" msgstr "Administrator是初始的超级管理员"
#: users/models.py:229 #: users/models.py:210
msgid "System" msgid "System"
msgstr "系统" msgstr "系统"
#: users/templates/users/_user.html:17 users/templates/users/user_list.html:5 #: users/templates/users/_user.html:17 users/templates/users/user_list.html:5
#: users/views.py:105 #: users/views.py:120
msgid "Create user" msgid "Create user"
msgstr "创建用户" msgstr "创建用户"
...@@ -534,6 +1239,38 @@ msgstr "账户" ...@@ -534,6 +1239,38 @@ msgstr "账户"
msgid "Security and Role" msgid "Security and Role"
msgstr "角色安全" 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/forgot_password.html:26
#: users/templates/users/login.html:64 #: users/templates/users/login.html:64
msgid "Forgot password" msgid "Forgot password"
...@@ -547,68 +1284,116 @@ msgstr "输入您的邮箱, 将会发一封重置短信邮件到您的邮箱中" ...@@ -547,68 +1284,116 @@ msgstr "输入您的邮箱, 将会发一封重置短信邮件到您的邮箱中"
msgid "Captcha invalid" msgid "Captcha invalid"
msgstr "验证码错误" 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 #: users/templates/users/reset_password.html:55
msgid "Password again" msgid "Password again"
msgstr "再次输入密码" msgstr "再次输入密码"
#: users/templates/users/reset_password.html:57
msgid "Setting"
msgstr "设置"
#: users/templates/users/user_create.html:12 #: users/templates/users/user_create.html:12
msgid "Reset link will be generated and sent to the user. " msgid "Reset link will be generated and sent to the user. "
msgstr "生成重置密码连接,通过邮件发送给用户" 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" msgid "User detail"
msgstr "用户详情" msgstr "用户详情"
#: users/templates/users/user_detail.html:20 #: users/templates/users/user_detail.html:22
msgid "User assets" msgid "User assets"
msgstr "用户资产" msgstr "用户资产"
#: users/templates/users/user_detail.html:21 #: users/templates/users/user_detail.html:23
msgid "User log" msgid "User log"
msgstr "登录日志" msgstr "登录日志"
#: users/templates/users/user_detail.html:105 #: users/templates/users/user_detail.html:90
msgid "Date joined" msgid "Date joined"
msgstr "创建日期" msgstr "创建日期"
#: users/templates/users/user_detail.html:109 #: users/templates/users/user_detail.html:94
msgid "Last login" msgid "Last login"
msgstr "最后登录" msgstr "最后登录"
#: users/templates/users/user_group_create.html:16 users/views.py:200 #: users/templates/users/user_detail.html:109
msgid "Create user group" msgid "Quick modify"
msgstr "创建用户组" 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 #, fuzzy
msgid "Active" #| msgid "Create account successfully"
msgstr "激活" 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" msgid "Update user"
msgstr "编辑用户" msgstr "编辑用户"
#: users/utils.py:47 #: users/utils.py:48
msgid "Begin to generate ssh private key ..." msgid "Begin to generate ssh private key ..."
msgstr "开始生成ssh密钥" msgstr "开始生成ssh密钥"
#: users/utils.py:59 #: users/utils.py:60
msgid "Finish to generate ssh private key ..." msgid "Finish to generate ssh private key ..."
msgstr "生成ssh密钥成功" msgstr "生成ssh密钥成功"
#: users/utils.py:63 #: users/utils.py:64
msgid "These is error when generate ssh key." msgid "These is error when generate ssh key."
msgstr "创建密钥失败" msgstr "创建密钥失败"
#: users/utils.py:67 #: users/utils.py:68
msgid "Create account successfully" msgid "Create account successfully"
msgstr "创建账户成功" msgstr "创建账户成功"
#: users/utils.py:69 #: users/utils.py:70
#, python-format #, python-format
msgid "" msgid ""
"\n" "\n"
...@@ -619,8 +1404,8 @@ msgid "" ...@@ -619,8 +1404,8 @@ msgid ""
" <a href=\"%(rest_password_url)s?token=%(rest_password_token)s\">click " " <a href=\"%(rest_password_url)s?token=%(rest_password_token)s\">click "
"here to set your password</a>\n" "here to set your password</a>\n"
" </br>\n" " </br>\n"
" This link is valid for 1 hour. After it expires, <a href=" " This link is valid for 1 hour. After it expires, <a href=\"%"
"\"%(forget_password_url)s?email=%(email)s\">request new one</a>\n" "(forget_password_url)s?email=%(email)s\">request new one</a>\n"
"\n" "\n"
" </br>\n" " </br>\n"
" ---\n" " ---\n"
...@@ -649,7 +1434,7 @@ msgstr "" ...@@ -649,7 +1434,7 @@ msgstr ""
" </br>\n" " </br>\n"
" " " "
#: users/utils.py:100 #: users/utils.py:101
#, python-format #, python-format
msgid "" msgid ""
"\n" "\n"
...@@ -661,8 +1446,8 @@ msgid "" ...@@ -661,8 +1446,8 @@ msgid ""
" <a href=\"%(rest_password_url)s?token=%(rest_password_token)s\">Click " " <a href=\"%(rest_password_url)s?token=%(rest_password_token)s\">Click "
"here reset password</a>\n" "here reset password</a>\n"
" </br>\n" " </br>\n"
" This link is valid for 1 hour. After it expires, <a href=" " This link is valid for 1 hour. After it expires, <a href=\"%"
"\"%(forget_password_url)s?email=%(email)s\">request new one<</a>\n" "(forget_password_url)s?email=%(email)s\">request new one<</a>\n"
"\n" "\n"
" </br>\n" " </br>\n"
" ---\n" " ---\n"
...@@ -693,55 +1478,64 @@ msgstr "" ...@@ -693,55 +1478,64 @@ msgstr ""
" </br>\n" " </br>\n"
" " " "
#: users/views.py:62 #: users/views.py:78
msgid "Logout success" msgid "Logout success"
msgstr "退出登录成功" msgstr "退出登录成功"
#: users/views.py:63 #: users/views.py:79
msgid "Logout success, return login page" msgid "Logout success, return login page"
msgstr "退出登录成功,返回到登录页面" msgstr "退出登录成功,返回到登录页面"
#: users/views.py:92 #: users/views.py:107
msgid "User list" msgid "User list"
msgstr "用户列表" msgstr "用户列表"
#: users/views.py:101 #: users/views.py:116
#, python-format #, fuzzy, python-format
msgid "Create user <a href=\"%s\">%s</a> success." #| msgid "Create user <a href=\"%s\">%s</a> success."
msgid "Create user <a href=\"%s\">%s</a> successfully."
msgstr "创建用户 <a href=\"%s\">%s</a> 成功" msgstr "创建用户 <a href=\"%s\">%s</a> 成功"
#: users/views.py:187 #: users/views.py:216
msgid "User group list" msgid "User group list"
msgstr "用户组列表" msgstr "用户组列表"
#: users/views.py:232 #: users/views.py:261
msgid "Email address invalid, input again" msgid "Email address invalid, input again"
msgstr "邮箱地址错误,重新输入" msgstr "邮箱地址错误,重新输入"
#: users/views.py:243 #: users/views.py:272
msgid "Send reset password message" msgid "Send reset password message"
msgstr "发送重置密码邮件" msgstr "发送重置密码邮件"
#: users/views.py:244 #: users/views.py:273
msgid "Send reset password mail success, login your mail box and follow it " msgid "Send reset password mail success, login your mail box and follow it "
msgstr "" msgstr ""
"发送重置邮件成功, 请登录邮箱查看, 按照提示操作 (如果没收到,请等待3-5分钟)" "发送重置邮件成功, 请登录邮箱查看, 按照提示操作 (如果没收到,请等待3-5分钟)"
#: users/views.py:256 #: users/views.py:285
msgid "Reset password success" msgid "Reset password success"
msgstr "重置密码成功" msgstr "重置密码成功"
#: users/views.py:257 #: users/views.py:286
msgid "Reset password success, return to login page" msgid "Reset password success, return to login page"
msgstr "重置密码成功,返回到登录页面" msgstr "重置密码成功,返回到登录页面"
#: users/views.py:273 users/views.py:286 #: users/views.py:302 users/views.py:315
msgid "Token invalid or expired" msgid "Token invalid or expired"
msgstr "Token错误或失效" msgstr "Token错误或失效"
#: users/views.py:282 #: users/views.py:311
msgid "Password not same" msgid "Password not same"
msgstr "密码不一致" msgstr "密码不一致"
#, fuzzy
#~| msgid "Create user <a href=\"%s\">%s</a> success."
#~ msgid "Update admin user <a href=\"%s\">%s</a> successfully."
#~ msgstr "创建用户 <a href=\"%s\">%s</a> 成功"
#~ msgid "Perm"
#~ msgstr "权限"
#~ msgid "Username or password invalid" #~ msgid "Username or password invalid"
#~ msgstr "用户名或密码错误" #~ msgstr "用户名或密码错误"
...@@ -60,7 +60,6 @@ class AssetPermissionCreateView(AdminUserRequiredMixin, SuccessMessageMixin, Cre ...@@ -60,7 +60,6 @@ class AssetPermissionCreateView(AdminUserRequiredMixin, SuccessMessageMixin, Cre
form_class = AssetPermissionForm form_class = AssetPermissionForm
template_name = 'perms/asset_permission_create_update.html' template_name = 'perms/asset_permission_create_update.html'
success_url = reverse_lazy('perms:asset-permission-list') success_url = reverse_lazy('perms:asset-permission-list')
success_message = _('Create asset permission <a href="%s"> %s </a> successfully.')
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = { context = {
...@@ -71,10 +70,12 @@ class AssetPermissionCreateView(AdminUserRequiredMixin, SuccessMessageMixin, Cre ...@@ -71,10 +70,12 @@ class AssetPermissionCreateView(AdminUserRequiredMixin, SuccessMessageMixin, Cre
return super(AssetPermissionCreateView, self).get_context_data(**kwargs) return super(AssetPermissionCreateView, self).get_context_data(**kwargs)
def get_success_message(self, cleaned_data): def get_success_message(self, cleaned_data):
return self.success_message % ( success_message = _('Create asset permission <a href="%s"> %s </a> successfully.' %
reverse_lazy('perms:asset-permission-detail', kwargs={'pk': self.object.pk}), (
self.object.name, reverse_lazy('perms:asset-permission-detail', kwargs={'pk': self.object.pk}),
) self.object.name,
))
return success_message
class AssetPermissionUpdateView(AdminUserRequiredMixin, UpdateView): class AssetPermissionUpdateView(AdminUserRequiredMixin, UpdateView):
......
...@@ -124,33 +124,66 @@ function move_left(from, to, from_o, to_o) { ...@@ -124,33 +124,66 @@ function move_left(from, to, from_o, to_o) {
function selectAll(){ function selectAll(){
// 选择该页面所有option // Select all check box
$('option').each(function(){ $('option').each(function(){
$(this).attr('selected', true); $(this).attr('selected', true);
}); });
} }
// // function getIDall() {
//function move_all(from, to){ // var check_array = [];
// $("#"+from).children().each(function(){ // $(".gradeX input:checked").each(function () {
// $("#"+to).append(this); // 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){ function csrfSafeMethod(method) {
// $('#{0} option'.format(form_array)).each(function(){ // these HTTP methods do not require CSRF protection
// $(this).prop('selected', true) return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
// }) }
//}
function getIDall() { function setAjaxCSRFToken() {
var check_array = []; var csrftoken = getCookie('csrftoken');
$(".gradeX input:checked").each(function () { var sessionid = getCookie('sessionid');
var id = $(this).attr("value");
check_array.push(id); $.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) { function APIUpdateAttr(props) {
...@@ -158,6 +191,7 @@ function APIUpdateAttr(props) { ...@@ -158,6 +191,7 @@ function APIUpdateAttr(props) {
props = props || {}; props = props || {};
success_message = props.success_message || 'Update Successfully!'; success_message = props.success_message || 'Update Successfully!';
fail_message = props.fail_message || 'Error occurred while updating.'; fail_message = props.fail_message || 'Error occurred while updating.';
$.ajax({ $.ajax({
url: props.url, url: props.url,
type: props.method || "PATCH", type: props.method || "PATCH",
......
...@@ -6,62 +6,23 @@ ...@@ -6,62 +6,23 @@
<!-- Custom and plugin javascript --> <!-- Custom and plugin javascript -->
<script src="{% static "js/plugins/toastr/toastr.min.js" %}"></script> <script src="{% static "js/plugins/toastr/toastr.min.js" %}"></script>
<script src="{% static "js/inspinia.js" %}"></script> <script src="{% static "js/inspinia.js" %}"></script>
<script src="{% static "js/jumpserver.js" %}"></script>
<script> <script>
// active menu activeNav();
var url_array = document.location.pathname.split("/"); $(document).ready(function(){
app = url_array[1]; setAjaxCSRFToken();
resource = url_array[2];
if (app == ''){
$('#index').addClass('active')
} else {
$("#"+app).addClass('active');
$('#'+app+' #'+resource).addClass('active');
}
// ajax set cookie
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;
}
var csrftoken = getCookie('csrftoken');
var sessionid = getCookie('sessionid');
function csrfSafeMethod(method) {
// these HTTP methods do not require CSRF protection
return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
}
$.ajaxSetup({
beforeSend: function(xhr, settings) {
if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
xhr.setRequestHeader("X-CSRFToken", csrftoken);
}
}
});
// textarea rows
$('textarea').attr('rows', 5)
// Set textarea rows five
$('textarea').attr('rows', 5);
});
//Sweet Alert for Delete // Sweet Alert for Delete
function obj_del(obj,name,url){ // Todo: Change name to objectDelete(obj, name, url)
function objectDelete(obj, name, url){
swal({ swal({
title: "{% trans 'Are you sure delete ??' %}", title: "{% trans 'Are you sure delete ?' %}",
//text: "You will not be able to recover this imaginary file!", text: "【" + name + "】",
text: "【"+name+"】",
type: "warning", type: "warning",
showCancelButton: true, showCancelButton: true,
cancelButtonText: "{% trans 'Cancel' %}", cancelButtonText: "{% trans 'Cancel' %}",
...@@ -73,16 +34,14 @@ function obj_del(obj,name,url){ ...@@ -73,16 +34,14 @@ function obj_del(obj,name,url){
type : "post", type : "post",
url : url, url : url,
data : { data : {
// idc_id : idc_id
}, },
dataType : "text",
success : function(data) { success : function(data) {
swal("{% trans 'Deleted!' %}", "【"+name+"】"+"{% trans 'has been deleted.' %}", "success"); swal("{% trans 'Deleted!' %}", "【"+name+"】"+"{% trans 'has been deleted.' %}", "success");
$(obj).parent().parent().remove(); $(obj).parent().parent().remove();
}, }
dataType : "text" })
});
}); });
} }
</script> </script>
<script src="{% static "js/jumpserver.js" %}"></script>
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
{% include '_head_css_js.html' %} {% include '_head_css_js.html' %}
{% block custom_head_css_js %} {% endblock %} {% block custom_head_css_js %} {% endblock %}
<link href="{% static "css/jumpserver.css" %}" rel="stylesheet"> <link href="{% static "css/jumpserver.css" %}" rel="stylesheet">
<script src="{% static "js/jumpserver.js" %}"></script>
</head> </head>
<body> <body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment