Commit 397da7d6 authored by xiaokong1937@gmail.com's avatar xiaokong1937@gmail.com

Merge branch 'master' of code.simcu.com:jumpserver/jumpserver

parents e75d3343 7241f750
......@@ -106,8 +106,8 @@ class Asset(models.Model):
groups = models.ManyToManyField(AssetGroup, null=True, blank=True, verbose_name=_('Asset groups'))
username = models.CharField(max_length=16, null=True, blank=True, verbose_name=_('Admin user'))
password = models.CharField(max_length=256, null=True, blank=True, verbose_name=_("Admin password"))
admin_user = models.ForeignKey(AdminUser, null=True, blank=True, on_delete=models.SET_NULL, verbose_name=_("Admin User"))
sys_user = models.ManyToManyField(SysUser, null=True, blank=True, verbose_name=_("Sys User"))
admin_user = models.ForeignKey(AdminUser, null=True, blank=True, on_delete=models.SET_NULL, verbose_name=_("Admin user"))
sys_user = models.ManyToManyField(SysUser, null=True, blank=True, verbose_name=_("System User"))
idc = models.ForeignKey(IDC, null=True, blank=True, on_delete=models.SET_NULL, verbose_name=_('IDC'))
mac_addr = models.CharField(max_length=20, null=True, blank=True, verbose_name=_("Mac address"))
brand = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('Brand'))
......
......@@ -6,20 +6,18 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-05 12:13+0800\n"
"POT-Creation-Date: 2016-09-05 20:18+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: assets/forms.py:20
#, fuzzy
#| msgid "Join usergroups"
msgid "Join assetgroups"
msgstr "添加到用户组"
......@@ -77,24 +75,22 @@ msgstr "运营商"
#: assets/models.py:40 assets/models.py:142
msgid "KEY"
msgstr ""
msgstr "KEY"
#: assets/models.py:41 assets/models.py:143
msgid "VALUE"
msgstr ""
msgstr "VALUE"
#: assets/models.py:55 assets/models.py:77 users/forms.py:12
#: users/models.py:106 users/templates/users/login.html:58
#: users/models.py:106 users/templates/users/login.html:54
#: users/templates/users/user_detail.html:73
#: users/templates/users/user_edit.html:5
#: users/templates/users/user_list.html:13
#, fuzzy
#| msgid "User"
msgid "Username"
msgstr "用户"
msgstr "用户"
#: assets/models.py:56 assets/models.py:78 users/forms.py:13
#: users/templates/users/login.html:61
#: users/templates/users/login.html:57
#: users/templates/users/reset_password.html:52
#: users/templates/users/user_add.html:8 users/templates/users/user_add.html:10
#: users/templates/users/user_edit.html:12
......@@ -103,40 +99,36 @@ msgid "Password"
msgstr "密码"
#: assets/models.py:57 assets/models.py:80
#, fuzzy
#| msgid "ssh private key"
msgid "SSH private key"
msgstr "ssh密钥"
#: assets/models.py:58 assets/models.py:82
msgid "As default"
msgstr ""
msgstr "默认使用"
#: assets/models.py:59 assets/models.py:84
msgid "Auto update pass/key"
msgstr ""
msgstr "自动更新密码/密钥"
#: assets/models.py:79
msgid "Protocol"
msgstr ""
msgstr "协议"
#: assets/models.py:81
#, fuzzy
#| msgid "ssh public key"
msgid "SSH public key"
msgstr "ssh公钥"
#: assets/models.py:83
msgid "Auto push"
msgstr ""
msgstr "自动推送"
#: assets/models.py:85
msgid "Sudo"
msgstr ""
msgstr "Sudo"
#: assets/models.py:86
msgid "Shell"
msgstr ""
msgstr "Shell"
#: assets/models.py:87 templates/_header_bar.html:35 templates/_nav.html:4
msgid "Home"
......@@ -144,19 +136,19 @@ msgstr "仪表盘"
#: assets/models.py:88
msgid "Uid"
msgstr ""
msgstr "Uid"
#: assets/models.py:101
msgid "IP"
msgstr ""
msgstr "IP"
#: assets/models.py:102
msgid "Other IP"
msgstr ""
msgstr "其它IP"
#: assets/models.py:103
msgid "Remote card IP"
msgstr ""
msgstr "远控卡IP"
#: assets/models.py:104
msgid "Hostname"
......@@ -170,28 +162,14 @@ msgstr "端口"
msgid "Asset groups"
msgstr "用户组"
#: assets/models.py:107
#, fuzzy
#| msgid "Edit user"
#: assets/models.py:107 assets/models.py:109 templates/_nav.html:24
msgid "Admin user"
msgstr "编辑用户"
msgstr "管理用户"
#: assets/models.py:108
msgid "Admin password"
msgstr "管理员密码"
#: assets/models.py:109
#, fuzzy
#| msgid "Edit user"
msgid "Admin User"
msgstr "编辑用户"
#: assets/models.py:110
#, fuzzy
#| msgid "User"
msgid "Sys User"
msgstr "用户"
#: assets/models.py:111 templates/_nav.html:23
msgid "IDC"
msgstr "机房"
......@@ -259,16 +237,12 @@ msgstr "资产"
#: assets/templates/assets/assetgroup_add.html:16
#: assets/templates/assets/assetgroup_list.html:5 assets/views.py:60
#, fuzzy
#| msgid "Create usergroup"
msgid "Create asset group"
msgstr "创建用户组"
msgstr "创建资产组"
#: assets/templates/assets/assetgroup_add.html:37
#, fuzzy
#| msgid "Select usergroups"
msgid "Select asset"
msgstr "选择用户组"
msgstr "选择资产"
#: assets/templates/assets/assetgroup_add.html:49
#: users/templates/users/_user.html:70
......@@ -283,14 +257,12 @@ msgstr "重置"
#: users/templates/users/forget_password.html:44
#: users/templates/users/user_list.html:63
msgid "Submit"
msgstr ""
msgstr "提交"
#: assets/templates/assets/assetgroup_list.html:13
#: users/templates/users/user_list.html:16
#, fuzzy
#| msgid "Asset number"
msgid "Asset num"
msgstr "资产编号"
msgstr "资产数量"
#: assets/templates/assets/assetgroup_list.html:32
#: users/templates/users/user_list.html:44
......@@ -327,18 +299,14 @@ msgid "Assets"
msgstr "资产管理"
#: assets/views.py:75
#, fuzzy
#| msgid "Asset groups"
msgid "Asset group list"
msgstr "用户组"
msgstr "资产组列表"
#: templates/_header_bar.html:8 users/templates/users/user_detail.html:29
msgid "Search"
msgstr "搜索"
#: templates/_header_bar.html:14
#, fuzzy
#| msgid "Welcome use Jumpserver system"
msgid "Welcome to use Jumpserver system"
msgstr "欢迎使用Jumpserver开源跳板机系统"
......@@ -346,8 +314,8 @@ msgstr "欢迎使用Jumpserver开源跳板机系统"
msgid "Help"
msgstr "帮助"
#: templates/_nav.html:9 users/views.py:102 users/views.py:115
#: users/views.py:159 users/views.py:176 users/views.py:201 users/views.py:214
#: templates/_nav.html:9 users/views.py:100 users/views.py:113
#: users/views.py:153 users/views.py:170 users/views.py:195 users/views.py:208
msgid "Users"
msgstr "用户管理"
......@@ -355,27 +323,17 @@ msgstr "用户管理"
msgid "User"
msgstr "用户"
#: templates/_nav.html:13 users/models.py:109
#: users/templates/users/user_detail.html:181
#: users/templates/users/user_list.html:15
msgid "Usergroup"
#: templates/_nav.html:13
msgid "User group"
msgstr "用户组"
#: templates/_nav.html:22
msgid "Assetgroup"
msgstr "用户组"
#: templates/_nav.html:24
#, fuzzy
#| msgid "Asset admin"
msgid "Assetadmin"
msgstr "管理用户"
msgid "Asset group"
msgstr "资产组"
#: templates/_nav.html:25
#, fuzzy
#| msgid "Asset user"
msgid "Assetuser"
msgstr "系统用户"
msgid "System user"
msgstr "系统"
#: templates/_nav.html:26
msgid "Label"
......@@ -429,8 +387,12 @@ msgstr "注销登录"
msgid "Play CAPTCHA as audio file"
msgstr ""
#: templates/captcha/text_field.html:4
msgid "Captcha"
msgstr "验证码"
#: users/forms.py:31 users/forms.py:50
msgid "Join usergroups"
msgid "Join user groups"
msgstr "添加到用户组"
#: users/models.py:102 users/models.py:225
......@@ -441,6 +403,11 @@ msgstr "管理员"
msgid "Email"
msgstr "邮件"
#: users/models.py:109 users/templates/users/user_detail.html:181
#: users/templates/users/user_list.html:15
msgid "Usergroup"
msgstr "用户组"
#: users/models.py:110 users/templates/users/user_detail.html:93
#: users/templates/users/user_list.html:14
msgid "Role"
......@@ -478,16 +445,16 @@ msgstr "Administrator是初始的超级管理员"
msgid "System"
msgstr "系统"
#: users/templates/users/_user.html:18 users/templates/users/user_list.html:5
#: users/views.py:115
#: users/templates/users/_user.html:17 users/templates/users/user_list.html:5
#: users/views.py:113
msgid "Create user"
msgstr "创建用户"
#: users/templates/users/_user.html:34
#: users/templates/users/_user.html:33
msgid "Account"
msgstr "账户"
#: users/templates/users/_user.html:44
#: users/templates/users/_user.html:43
msgid "Security and Role"
msgstr "角色安全"
......@@ -499,20 +466,18 @@ msgstr "忘记密码"
msgid "Input your email, that will send a mail to your"
msgstr "输入您的邮箱, 将会发一封重置短信邮件到您的邮箱中"
#: users/templates/users/login.html:46 users/templates/users/login.html:66
#: users/templates/users/login.html:42 users/templates/users/login.html:62
msgid "Login"
msgstr "登录"
#: users/templates/users/login.html:51
#: users/templates/users/login.html:47
msgid "Captcha invalid"
msgstr "验证码错误"
#: users/templates/users/reset_password.html:45
#: users/templates/users/user_detail.html:159 users/utils.py:98
#, fuzzy
#| msgid "Reset password success"
msgid "Reset password"
msgstr "重置密码成功"
msgstr "重置密码"
#: users/templates/users/reset_password.html:55
msgid "Password again"
......@@ -530,7 +495,7 @@ msgstr "生成重置密码连接,通过邮件发送给用户"
msgid "Confirm delete"
msgstr "确认删除"
#: users/templates/users/user_detail.html:18 users/views.py:176
#: users/templates/users/user_detail.html:18 users/views.py:170
msgid "User detail"
msgstr "用户详情"
......@@ -543,10 +508,8 @@ msgid "User log"
msgstr "登录日志"
#: users/templates/users/user_detail.html:105
#, fuzzy
#| msgid "Date expired"
msgid "Date joined"
msgstr "失效日期"
msgstr "创建日期"
#: users/templates/users/user_detail.html:109
msgid "Last login"
......@@ -569,10 +532,8 @@ msgid "Add"
msgstr "添加"
#: users/templates/users/user_list.html:17
#, fuzzy
#| msgid "Is active"
msgid "Active"
msgstr "是否激活"
msgstr "激活"
#: users/utils.py:47
msgid "Begin to generate ssh private key ..."
......@@ -675,72 +636,69 @@ msgstr ""
" </br>\n"
" "
#: users/views.py:55
#: users/views.py:53
msgid "Username or password invalid"
msgstr "用户名或密码错误"
#: users/views.py:72
#: users/views.py:70
msgid "Logout success"
msgstr "退出登录成功"
#: users/views.py:73
#: users/views.py:71
msgid "Logout success, return login page"
msgstr "退出登录成功,返回到登录页面"
#: users/views.py:102
#: users/views.py:100
msgid "User list"
msgstr "用户列表"
#: users/views.py:111
#: users/views.py:109
#, python-format
msgid "Create user<a href=\"%s\">%s</a> success."
msgstr "创建用户<a href=\"%s\">%s</a> 成功"
#: users/views.py:159
#, fuzzy
#| msgid "Edit user"
#: users/views.py:153
msgid "Edit user"
msgstr "编辑用户"
#: users/views.py:201
#: users/views.py:195
msgid "Usergroup list"
msgstr "用户组列表"
#: users/views.py:214
#: users/views.py:208
msgid "Create usergroup"
msgstr "创建用户组"
#: users/views.py:246
#: users/views.py:240
msgid "Email address invalid, input again"
msgstr "邮箱地址错误,重新输入"
#: users/views.py:257
#: users/views.py:251
msgid "Send reset password message"
msgstr "发送重置密码邮件"
#: users/views.py:258
#: users/views.py:252
msgid "Send reset password mail success, login your mail box and follow it "
msgstr ""
"发送重置邮件成功, 请登录邮箱查看, 按照提示操作 (如果没收到,请等待3-5分钟)"
#: users/views.py:270
#: users/views.py:264
msgid "Reset password success"
msgstr "重置密码成功"
#: users/views.py:271
#: users/views.py:265
msgid "Reset password success, return to login page"
msgstr "重置密码成功,返回到登录页面"
#: users/views.py:287 users/views.py:300
#: users/views.py:281 users/views.py:294
msgid "Token invalid or expired"
msgstr "Token错误或失效"
#: users/views.py:296
#: users/views.py:290
msgid "Password not same"
msgstr "密码不一致"
#~ msgid "Asset user"
#~ msgstr "系统用户"
#~ msgid "Commit"
#~ msgstr "提交"
#, fuzzy
#~| msgid "Asset groups"
#~ msgid "Assetgroup"
#~ msgstr "用户组"
......@@ -15,7 +15,7 @@
$('#index').addClass('active')
} else {
$("#"+s1).addClass('active');
$('#'+s1+' .'+s2).addClass('active');
$('#'+s1+' #'+s2).addClass('active');
}
function getCookie(name) {
......
......@@ -9,30 +9,30 @@
<i class="fa fa-group"></i> <span class="nav-label">{% trans 'Users' %}</span><span class="fa arrow"></span>
</a>
<ul class="nav nav-second-level active">
<li class="user"><a href="{% url 'users:user-list' %}">{% trans 'User' %}</a></li>
<li class="usergroup"><a href="{% url 'users:usergroup-list' %}">{% trans 'Usergroup' %}</a></li>
<li id="user"><a href="{% url 'users:user-list' %}">{% trans 'User' %}</a></li>
<li id="usergroup"><a href="{% url 'users:usergroup-list' %}">{% trans 'User group' %}</a></li>
</ul>
</li>
<li id="">
<li id="assets">
<a>
<i class="fa fa-inbox"></i> <span class="nav-label">{% trans 'Assets' %}</span><span class="fa arrow"></span>
</a>
<ul class="nav nav-second-level">
<li class="{% url 'assets:asset-list' %}"><a href="">{% trans 'Asset' %}</a></li>
<li class=""><a href="{% url 'assets:assetgroup-list' %}">{% trans 'Assetgroup' %}</a></li>
<li class=""><a href="">{% trans 'IDC' %}</a></li>
<li class=""><a href="">{% trans 'Assetadmin' %}</a></li>
<li class=""><a href="">{% trans 'Assetuser' %}</a></li>
<li class=""><a href="">{% trans 'Label' %}</a></li>
<li id="asset"><a href="{% url 'assets:asset-list' %}">{% trans 'Asset' %}</a></li>
<li id="assetgroup"><a href="{% url 'assets:assetgroup-list' %}">{% trans 'Asset group' %}</a></li>
<li id="idc"><a href="">{% trans 'IDC' %}</a></li>
<li id="admin-user"><a href="">{% trans 'Admin user' %}</a></li>
<li id="system-user"><a href="">{% trans 'System user' %}</a></li>
<li id=""><a href="">{% trans 'Label' %}</a></li>
</ul>
</li>
<li id="">
<a href="#"><i class="fa fa-edit"></i> <span class="nav-label">{% trans 'Perms' %}</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li class="sudo">
<li id="sudo">
<a class="sudo" href="">{% trans 'Perm' %}</a>
</li>
<li class="role">
<li id="role">
<a href="">{% trans 'Create perm' %}</a>
</li>
</ul>
......@@ -47,8 +47,8 @@
<i class="fa fa-download"></i> <span class="nav-label">{% trans 'File' %}</span><span class="fa arrow"></span>
</a>
<ul class="nav nav-second-level">
<li class="upload"><a href="">{% trans 'File upload' %}</a></li>
<li class="download"><a href="">{% trans 'File download' %}</a></li>
<li id="upload"><a href="">{% trans 'File upload' %}</a></li>
<li id="download"><a href="">{% trans 'File download' %}</a></li>
</ul>
</li>
<li id="">
......
{% load i18n %}
<div class="row">
<div class="col-sm-6">
<input autocomplete="off" id="{{id}}_1" class="form-control" name="{{name}}_1" type="text" />
<span class="red-fonts" id="captcha-error" style="display: none">验证码错误</span>
<input autocomplete="off" id="{{id}}_1" class="form-control" name="{{name}}_1" placeholder="{% trans 'Captcha' %}" type="text" />
</div>
</div>
</br>
......@@ -32,7 +32,7 @@ class UserAddForm(forms.ModelForm):
}
widgets = {
'groups': forms.SelectMultiple(attrs={'class': 'select2', 'data-placeholder': _('Join usergroups')}),
'groups': forms.SelectMultiple(attrs={'class': 'select2', 'data-placeholder': _('Join user groups')}),
}
......
......@@ -11,6 +11,11 @@
{% include '_head_css_js.html' %}
<link href="{% static "css/jumpserver.css" %}" rel="stylesheet">
<script src="{% static "js/jumpserver.js" %}"></script>
<style>
.captcha {
float: right;
}
</style>
</head>
<body class="gray-bg">
......
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