Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
397da7d6
Commit
397da7d6
authored
Sep 05, 2016
by
xiaokong1937@gmail.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of code.simcu.com:jumpserver/jumpserver
parents
e75d3343
7241f750
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
19 deletions
+24
-19
models.py
apps/assets/models.py
+2
-2
django.mo
apps/locale/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/locale/zh/LC_MESSAGES/django.po
+0
-0
_foot_js.html
apps/templates/_foot_js.html
+1
-1
_nav.html
apps/templates/_nav.html
+13
-13
text_field.html
apps/templates/captcha/text_field.html
+2
-2
forms.py
apps/users/forms.py
+1
-1
login.html
apps/users/templates/users/login.html
+5
-0
No files found.
apps/assets/models.py
View file @
397da7d6
...
...
@@ -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
U
ser"
))
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
u
ser"
))
sys_user
=
models
.
ManyToManyField
(
SysUser
,
null
=
True
,
blank
=
True
,
verbose_name
=
_
(
"Sys
tem
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'
))
...
...
apps/locale/zh/LC_MESSAGES/django.mo
View file @
397da7d6
No preview for this file type
apps/locale/zh/LC_MESSAGES/django.po
View file @
397da7d6
This diff is collapsed.
Click to expand it.
apps/templates/_foot_js.html
View file @
397da7d6
...
...
@@ -15,7 +15,7 @@
$
(
'#index'
).
addClass
(
'active'
)
}
else
{
$
(
"#"
+
s1
).
addClass
(
'active'
);
$
(
'#'
+
s1
+
'
.
'
+
s2
).
addClass
(
'active'
);
$
(
'#'
+
s1
+
'
#
'
+
s2
).
addClass
(
'active'
);
}
function
getCookie
(
name
)
{
...
...
apps/templates/_nav.html
View file @
397da7d6
...
...
@@ -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 'User
group' %}
</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 'Asset
group' %}
</a></li>
<li
class=
"
"
><a
href=
""
>
{% trans 'IDC' %}
</a></li>
<li
class=
""
><a
href=
""
>
{% trans 'Assetadmin
' %}
</a></li>
<li
class=
""
><a
href=
""
>
{% trans 'Asset
user' %}
</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=
""
>
...
...
apps/templates/captcha/text_field.html
View file @
397da7d6
{% 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>
apps/users/forms.py
View file @
397da7d6
...
...
@@ -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'
)}),
}
...
...
apps/users/templates/users/login.html
View file @
397da7d6
...
...
@@ -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"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment