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
3b6403b2
Commit
3b6403b2
authored
Jan 01, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改一些翻译
parent
c48531c5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
77 additions
and
100 deletions
+77
-100
forms.py
apps/assets/forms.py
+1
-1
_asset_group_bulk_update_modal.html
...sets/templates/assets/_asset_group_bulk_update_modal.html
+1
-1
user_asset_list.html
apps/assets/templates/assets/user_asset_list.html
+0
-10
admin_user.py
apps/assets/views/admin_user.py
+8
-8
asset.py
apps/assets/views/asset.py
+8
-8
mixins.py
apps/common/mixins.py
+3
-2
django.mo
apps/locale/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/locale/zh/LC_MESSAGES/django.po
+0
-0
task_list.html
apps/ops/templates/ops/task_list.html
+6
-4
views.py
apps/ops/views.py
+13
-13
jumpserver.js
apps/static/js/jumpserver.js
+6
-6
_message.html
apps/templates/_message.html
+3
-1
_nav_user.html
apps/templates/_nav_user.html
+0
-5
command_list.html
apps/terminal/templates/terminal/command_list.html
+5
-3
session_list.html
apps/terminal/templates/terminal/session_list.html
+8
-6
command.py
apps/terminal/views/command.py
+0
-1
session.py
apps/terminal/views/session.py
+0
-1
terminal.py
apps/terminal/views/terminal.py
+1
-1
api.py
apps/users/api.py
+1
-1
user.py
apps/users/models/user.py
+3
-3
login_log_list.html
apps/users/templates/users/login_log_list.html
+6
-4
user_delete_confirm.html
apps/users/templates/users/user_delete_confirm.html
+0
-16
user_granted_asset.html
apps/users/templates/users/user_granted_asset.html
+4
-4
login.py
apps/users/views/login.py
+0
-1
No files found.
apps/assets/forms.py
View file @
3b6403b2
...
...
@@ -171,7 +171,7 @@ class AdminUserForm(forms.ModelForm):
password
=
forms
.
CharField
(
widget
=
forms
.
PasswordInput
,
max_length
=
128
,
strip
=
True
,
required
=
False
,
help_text
=
_
(
'
If also set private key, use that first
'
),
help_text
=
_
(
'
Password or private key password
'
),
)
# Need use upload private key file except paste private key content
private_key_file
=
forms
.
FileField
(
required
=
False
)
...
...
apps/assets/templates/assets/_asset_group_bulk_update_modal.html
View file @
3b6403b2
...
...
@@ -2,7 +2,7 @@
{% load i18n %}
{% block modal_id %}asset_group_bulk_update_modal{% endblock %}
{% block modal_class %}modal-lg{% endblock %}
{% block modal_title%}{% trans "Update asset
s
roup" %}{% endblock %}
{% block modal_title%}{% trans "Update asset
g
roup" %}{% endblock %}
{% block modal_body %}
{% load bootstrap3 %}
<p
class=
"text-success text-center"
>
{% trans "Hint: only change the field you want to update." %}
</p>
...
...
apps/assets/templates/assets/user_asset_list.html
View file @
3b6403b2
...
...
@@ -9,16 +9,6 @@
{% block content_left_head %}{% endblock %}
{% block table_search %}
<div
class=
"html5buttons"
>
<div
class=
"dt-buttons btn-group"
>
<a
class=
"btn btn-default btn_import"
data-toggle=
"modal"
data-target=
"#asset_import_modal"
tabindex=
"0"
>
<span>
{% trans "Import" %}
</span>
</a>
<a
class=
"btn btn-default btn_export"
tabindex=
"0"
>
<span>
{% trans "Export" %}
</span>
</a>
</div>
</div>
{% endblock %}
{% block table_container %}
...
...
apps/assets/views/admin_user.py
View file @
3b6403b2
...
...
@@ -41,8 +41,8 @@ class AdminUserCreateView(AdminUserRequiredMixin,
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'assets'
,
'action'
:
'Create admin user'
'app'
:
_
(
'Assets'
)
,
'action'
:
_
(
'Create admin user'
)
}
kwargs
.
update
(
context
)
return
super
()
.
get_context_data
(
**
kwargs
)
...
...
@@ -64,8 +64,8 @@ class AdminUserUpdateView(AdminUserRequiredMixin, UpdateView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'assets'
,
'action'
:
'Update admin user'
'app'
:
_
(
'Assets'
)
,
'action'
:
_
(
'Update admin user'
),
}
kwargs
.
update
(
context
)
return
super
()
.
get_context_data
(
**
kwargs
)
...
...
@@ -85,8 +85,8 @@ class AdminUserDetailView(AdminUserRequiredMixin, DetailView):
def
get_context_data
(
self
,
**
kwargs
):
cluster_remain
=
Cluster
.
objects
.
exclude
(
admin_user
=
self
.
object
)
context
=
{
'app'
:
'assets'
,
'action'
:
'Admin user detail'
,
'app'
:
_
(
'Assets'
)
,
'action'
:
_
(
'Admin user detail'
)
,
'cluster_remain'
:
cluster_remain
,
}
kwargs
.
update
(
context
)
...
...
@@ -112,8 +112,8 @@ class AdminUserAssetsView(AdminUserRequiredMixin, SingleObjectMixin, ListView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'assets'
,
'action'
:
'Admin user detail'
,
'app'
:
_
(
'Assets'
)
,
'action'
:
_
(
'Admin user detail'
)
,
"total_amount"
:
len
(
self
.
queryset
),
'unreachable_amount'
:
len
([
asset
for
asset
in
self
.
queryset
if
asset
.
is_connective
is
False
])
}
...
...
apps/assets/views/asset.py
View file @
3b6403b2
...
...
@@ -81,8 +81,8 @@ class AssetCreateView(AdminUserRequiredMixin, CreateView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'Assets'
,
'action'
:
'Create asset'
,
'app'
:
_
(
'Assets'
)
,
'action'
:
_
(
'Create asset'
)
,
}
kwargs
.
update
(
context
)
return
super
()
.
get_context_data
(
**
kwargs
)
...
...
@@ -138,8 +138,8 @@ class AssetBulkUpdateView(AdminUserRequiredMixin, ListView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'Assets'
,
'action'
:
'Bulk update asset'
,
'app'
:
_
(
'Assets'
)
,
'action'
:
_
(
'Bulk update asset'
)
,
'form'
:
self
.
form
,
'assets_selected'
:
self
.
id_list
,
}
...
...
@@ -155,8 +155,8 @@ class AssetUpdateView(AdminUserRequiredMixin, UpdateView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'Assets'
,
'action'
:
'Update asset'
,
'app'
:
_
(
'Assets'
)
,
'action'
:
_
(
'Update asset'
)
,
}
kwargs
.
update
(
context
)
return
super
(
AssetUpdateView
,
self
)
.
get_context_data
(
**
kwargs
)
...
...
@@ -176,8 +176,8 @@ class AssetDetailView(DetailView):
def
get_context_data
(
self
,
**
kwargs
):
asset_groups
=
self
.
object
.
groups
.
all
()
context
=
{
'app'
:
'Assets'
,
'action'
:
'Asset detail'
,
'app'
:
_
(
'Assets'
)
,
'action'
:
_
(
'Asset detail'
)
,
'asset_groups_remain'
:
[
asset_group
for
asset_group
in
AssetGroup
.
objects
.
all
()
if
asset_group
not
in
asset_groups
],
'asset_groups'
:
asset_groups
,
...
...
apps/common/mixins.py
View file @
3b6403b2
...
...
@@ -89,6 +89,7 @@ class BulkSerializerMixin(object):
class
DatetimeSearchMixin
:
date_format
=
'
%
Y-
%
m-
%
d'
date_from
=
date_to
=
None
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
...
...
@@ -96,7 +97,7 @@ class DatetimeSearchMixin:
date_to_s
=
self
.
request
.
GET
.
get
(
'date_to'
)
if
date_from_s
:
date_from
=
timezone
.
datetime
.
strptime
(
date_from_s
,
'
%
m/
%
d/
%
Y'
)
date_from
=
timezone
.
datetime
.
strptime
(
date_from_s
,
self
.
date_format
)
self
.
date_from
=
date_from
.
replace
(
tzinfo
=
timezone
.
get_current_timezone
()
)
...
...
@@ -105,7 +106,7 @@ class DatetimeSearchMixin:
if
date_to_s
:
date_to
=
timezone
.
datetime
.
strptime
(
date_to_s
+
' 23:59:59'
,
'
%
m/
%
d/
%
Y
%
H:
%
M:
%
S'
date_to_s
+
' 23:59:59'
,
self
.
date_format
+
'
%
H:
%
M:
%
S'
)
self
.
date_to
=
date_to
.
replace
(
tzinfo
=
timezone
.
get_current_timezone
()
...
...
apps/locale/zh/LC_MESSAGES/django.mo
View file @
3b6403b2
No preview for this file type
apps/locale/zh/LC_MESSAGES/django.po
View file @
3b6403b2
This diff is collapsed.
Click to expand it.
apps/ops/templates/ops/task_list.html
View file @
3b6403b2
...
...
@@ -16,13 +16,13 @@
<div
class=
"form-group"
id=
"date"
>
<div
class=
"input-daterange input-group"
id=
"datepicker"
>
<span
class=
"input-group-addon"
><i
class=
"fa fa-calendar"
></i></span>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_from"
value=
"{{ date_from|date:
"
m
/
d
/
Y
"
}}"
>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_from"
value=
"{{ date_from|date:
'Y-m-d'
}}"
>
<span
class=
"input-group-addon"
>
to
</span>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_to"
value=
"{{ date_to|date:
"
m
/
d
/
Y
"
}}"
>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_to"
value=
"{{ date_to|date:
'Y-m-d'
}}"
>
</div>
</div>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"form-control input-sm"
name=
"keyword"
placeholder=
"{% trans
"
Search
"
%}"
value=
"{{ keyword }}"
>
<input
type=
"text"
class=
"form-control input-sm"
name=
"keyword"
placeholder=
"{% trans
'Search'
%}"
value=
"{{ keyword }}"
>
</div>
<div
class=
"input-group"
>
<div
class=
"input-group-btn"
>
...
...
@@ -94,9 +94,11 @@ $(document).ready(function() {
width
:
'auto'
});
$
(
'#date .input-daterange'
).
datepicker
({
dateFormat
:
'mm/dd/yy'
,
format
:
"yyyy-mm-dd"
,
todayBtn
:
"linked"
,
keyboardNavigation
:
false
,
forceParse
:
false
,
calendarWeeks
:
true
,
autoclose
:
true
});
...
...
apps/ops/views.py
View file @
3b6403b2
...
...
@@ -20,7 +20,6 @@ class TaskListView(DatetimeSearchMixin, ListView):
ordering
=
(
'-date_created'
,)
context_object_name
=
'task_list'
template_name
=
'ops/task_list.html'
date_format
=
'
%
m/
%
d/
%
Y'
keyword
=
''
def
get_queryset
(
self
):
...
...
@@ -39,7 +38,7 @@ class TaskListView(DatetimeSearchMixin, ListView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'Ops'
,
'app'
:
_
(
'Ops'
)
,
'action'
:
_
(
'Task list'
),
'date_from'
:
self
.
date_from
,
'date_to'
:
self
.
date_to
,
...
...
@@ -55,8 +54,8 @@ class TaskDetailView(DetailView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'Ops'
,
'action'
:
'Task detail'
,
'app'
:
_
(
'Ops'
)
,
'action'
:
_
(
'Task detail'
)
,
}
kwargs
.
update
(
context
)
return
super
()
.
get_context_data
(
**
kwargs
)
...
...
@@ -68,8 +67,8 @@ class TaskAdhocView(DetailView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'Ops'
,
'action'
:
'Task versions'
,
'app'
:
_
(
'Ops'
)
,
'action'
:
_
(
'Task versions'
)
,
}
kwargs
.
update
(
context
)
return
super
()
.
get_context_data
(
**
kwargs
)
...
...
@@ -81,8 +80,8 @@ class TaskHistoryView(DetailView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'Ops'
,
'action'
:
'Task run history'
,
'app'
:
_
(
'Ops'
)
,
'action'
:
_
(
'Task run history'
)
,
}
kwargs
.
update
(
context
)
return
super
()
.
get_context_data
(
**
kwargs
)
...
...
@@ -104,7 +103,7 @@ class AdHocDetailView(DetailView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'Ops'
,
'app'
:
_
(
'Ops'
)
,
'action'
:
'Task version detail'
,
}
kwargs
.
update
(
context
)
...
...
@@ -117,8 +116,8 @@ class AdHocHistoryView(DetailView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'Ops'
,
'action'
:
'Version run history'
,
'app'
:
_
(
'Ops'
)
,
'action'
:
_
(
'Version run history'
)
,
}
kwargs
.
update
(
context
)
return
super
()
.
get_context_data
(
**
kwargs
)
...
...
@@ -130,8 +129,8 @@ class AdHocHistoryDetailView(DetailView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'Ops'
,
'action'
:
'Run history detail'
,
'app'
:
_
(
'Ops'
)
,
'action'
:
_
(
'Run history detail'
)
,
}
kwargs
.
update
(
context
)
return
super
()
.
get_context_data
(
**
kwargs
)
\ No newline at end of file
apps/static/js/jumpserver.js
View file @
3b6403b2
...
...
@@ -280,16 +280,16 @@ jumpserver.initDataTable = function (options) {
language
:
{
search
:
"搜索"
,
lengthMenu
:
"每页 _MENU_"
,
info
:
"显示第 _START_
到 _END_; 总共 _TOTAL_
"
,
info
:
"显示第 _START_
至 _END_ 项结果; 总共 _TOTAL_ 项
"
,
infoFiltered
:
""
,
infoEmpty
:
""
,
zeroRecords
:
"没有匹配
记录
"
,
zeroRecords
:
"没有匹配
项
"
,
emptyTable
:
"没有记录"
,
paginate
:
{
first
:
"
第一页
"
,
previous
:
"
上一页
"
,
next
:
"
下一页
"
,
last
:
"
最后
"
first
:
"
«
"
,
previous
:
"
‹
"
,
next
:
"
›
"
,
last
:
"
»
"
}
},
lengthMenu
:
[[
15
,
25
,
50
,
-
1
],
[
15
,
25
,
50
,
"All"
]]
...
...
apps/templates/_message.html
View file @
3b6403b2
...
...
@@ -13,7 +13,9 @@
{% if user.is_authenticated and not user.is_public_key_valid %}
<div
class=
"alert alert-danger help-message"
>
{% url 'users:user-pubkey-update' as user_pubkey_update %}
{% trans 'Your ssh public key not set or expired. Please click
<a
href=
"{{ user_pubkey_update }}"
>
this link
</a>
to update' %}
{% blocktrans %}
Your ssh public key not set or expired. Please click
<a
href=
"{{ user_pubkey_update }}"
>
this link
</a>
to update
{% endblocktrans %}
</div>
{% endif %}
{% endblock %}
...
...
apps/templates/_nav_user.html
View file @
3b6403b2
...
...
@@ -9,11 +9,6 @@
<i
class=
"fa fa-user"
></i>
<span
class=
"nav-label"
>
{% trans 'Profile' %}
</span><span
class=
"label label-info pull-right"
></span>
</a>
</li>
<li
id=
"terminal"
>
<a
href=
"{% url 'terminal:terminal-list' %}"
>
<i
class=
"fa fa-terminal"
></i>
<span
class=
"nav-label"
>
{% trans 'Terminal' %}
</span><span
class=
"label label-info pull-right"
></span>
</a>
</li>
<li
class=
"special_link"
>
<a
href=
"http://www.jumpserver.org"
target=
"_blank"
><i
class=
"fa fa-database"
></i>
<span
class=
"nav-label"
>
访问官网
</span>
...
...
apps/terminal/templates/terminal/command_list.html
View file @
3b6403b2
...
...
@@ -22,9 +22,9 @@
<div
class=
"form-group"
id=
"date"
>
<div
class=
"input-daterange input-group"
id=
"datepicker"
>
<span
class=
"input-group-addon"
><i
class=
"fa fa-calendar"
></i></span>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_from"
value=
"{{ date_from|date:
"
m
/
d
/
Y
"
}}"
>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_from"
value=
"{{ date_from|date:
'Y-m-d'
}}"
>
<span
class=
"input-group-addon"
>
to
</span>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_to"
value=
"{{ date_to|date:
"
m
/
d
/
Y
"
}}"
>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_to"
value=
"{{ date_to|date:
'Y-m-d'
}}"
>
</div>
</div>
<div
class=
"input-group"
>
...
...
@@ -105,9 +105,11 @@
width
:
'auto'
});
$
(
'#date .input-daterange'
).
datepicker
({
dateFormat
:
'mm/dd/yy'
,
format
:
"yyyy-mm-dd"
,
todayBtn
:
"linked"
,
keyboardNavigation
:
false
,
forceParse
:
false
,
calendarWeeks
:
true
,
autoclose
:
true
});
});
...
...
apps/terminal/templates/terminal/session_list.html
View file @
3b6403b2
...
...
@@ -5,8 +5,8 @@
{% load common_tags %}
{% block custom_head_css_js %}
<link
href=
"{% static 'css/plugins/datepicker/datepicker3.css' %}"
rel=
"stylesheet"
>
<link
href=
"{% static
"
css
/
plugins
/
select2
/
select2
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<script
src=
"{% static
"
js
/
plugins
/
select2
/
select2
.
full
.
min
.
js
"
%}"
></script>
<link
href=
"{% static
'css/plugins/select2/select2.min.css'
%}"
rel=
"stylesheet"
>
<script
src=
"{% static
'js/plugins/select2/select2.full.min.js'
%}"
></script>
<style>
#search_btn
{
margin-bottom
:
0
;
...
...
@@ -23,9 +23,9 @@
<div
class=
"form-group"
id=
"date"
>
<div
class=
"input-daterange input-group"
id=
"datepicker"
>
<span
class=
"input-group-addon"
><i
class=
"fa fa-calendar"
></i></span>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_from"
value=
"{{ date_from|date:
"
m
/
d
/
Y
"
}}"
>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_from"
value=
"{{ date_from|date:
'Y-m-d'
}}"
>
<span
class=
"input-group-addon"
>
to
</span>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_to"
value=
"{{ date_to|date:
"
m
/
d
/
Y
"
}}"
>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_to"
value=
"{{ date_to|date:
'Y-m-d'
}}"
>
</div>
</div>
<div
class=
"input-group"
>
...
...
@@ -135,10 +135,12 @@
dropdownAutoWidth
:
true
,
width
:
"auto"
});
$
(
'#date .input-daterange'
).
datepicker
({
dateFormat
:
'mm/dd/yy'
,
$
(
'.input-daterange.input-group'
).
datepicker
({
format
:
"yyyy-mm-dd"
,
todayBtn
:
"linked"
,
keyboardNavigation
:
false
,
forceParse
:
false
,
calendarWeeks
:
true
,
autoclose
:
true
});
}).
on
(
'click'
,
'.btn-term'
,
function
()
{
...
...
apps/terminal/views/command.py
View file @
3b6403b2
...
...
@@ -22,7 +22,6 @@ class CommandListView(DatetimeSearchMixin, ListView):
paginate_by
=
settings
.
CONFIG
.
DISPLAY_PER_PAGE
command
=
user
=
asset
=
system_user
=
""
date_from
=
date_to
=
None
date_format
=
'
%
m/
%
d/
%
Y'
def
get_queryset
(
self
):
self
.
command
=
self
.
request
.
GET
.
get
(
'command'
,
''
)
...
...
apps/terminal/views/session.py
View file @
3b6403b2
...
...
@@ -29,7 +29,6 @@ class SessionListView(AdminUserRequiredMixin, DatetimeSearchMixin, ListView):
paginate_by
=
settings
.
CONFIG
.
DISPLAY_PER_PAGE
user
=
asset
=
system_user
=
''
date_from
=
date_to
=
None
date_format
=
'
%
m/
%
d/
%
Y'
def
get_queryset
(
self
):
self
.
queryset
=
super
()
.
get_queryset
()
...
...
apps/terminal/views/terminal.py
View file @
3b6403b2
...
...
@@ -20,7 +20,7 @@ __all__ = [
]
class
TerminalListView
(
Login
RequiredMixin
,
ListView
):
class
TerminalListView
(
AdminUser
RequiredMixin
,
ListView
):
model
=
Terminal
template_name
=
'terminal/terminal_list.html'
form_class
=
TerminalForm
...
...
apps/users/api.py
View file @
3b6403b2
...
...
@@ -20,7 +20,7 @@ from common.utils import get_logger
logger
=
get_logger
(
__name__
)
class
UserViewSet
(
BulkModelViewSet
):
class
UserViewSet
(
IDInFilterMixin
,
BulkModelViewSet
):
queryset
=
User
.
objects
.
exclude
(
role
=
"App"
)
# queryset = User.objects.all().exclude(role="App").order_by("date_joined")
serializer_class
=
UserSerializer
...
...
apps/users/models/user.py
View file @
3b6403b2
...
...
@@ -27,9 +27,9 @@ class User(AbstractUser):
ROLE_APP
=
'App'
ROLE_CHOICES
=
(
(
ROLE_ADMIN
,
'Administrator'
),
(
ROLE_USER
,
'User'
),
(
ROLE_APP
,
'Application'
)
(
ROLE_ADMIN
,
_
(
'Administrator'
)
),
(
ROLE_USER
,
_
(
'User'
)
),
(
ROLE_APP
,
_
(
'Application'
)
)
)
id
=
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
primary_key
=
True
)
username
=
models
.
CharField
(
max_length
=
128
,
unique
=
True
,
verbose_name
=
_
(
'Username'
))
...
...
apps/users/templates/users/login_log_list.html
View file @
3b6403b2
...
...
@@ -17,10 +17,10 @@
<div
class=
"form-group"
id=
"date"
>
<div
class=
"input-daterange input-group"
id=
"datepicker"
>
<span
class=
"input-group-addon"
><i
class=
"fa fa-calendar"
></i></span>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_from"
value=
"{{ date_from|date:
"
m
/
d
/
Y
"
}}"
>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_from"
value=
"{{ date_from|date:
'Y-m-d'
}}"
>
{#
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_from"
>
#}
<span
class=
"input-group-addon"
>
to
</span>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_to"
value=
"{{ date_to|date:
"
m
/
d
/
Y
"
}}"
>
<input
type=
"text"
class=
"input-sm form-control"
style=
"width: 100px;"
name=
"date_to"
value=
"{{ date_to|date:
'Y-m-d'
}}"
>
</div>
</div>
<div
class=
"input-group"
>
...
...
@@ -32,7 +32,7 @@
</select>
</div>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"form-control input-sm"
name=
"keyword"
placeholder=
"{% trans
"
Search
"
%}"
value=
"{{ keyword }}"
>
<input
type=
"text"
class=
"form-control input-sm"
name=
"keyword"
placeholder=
"{% trans
'Search'
%}"
value=
"{{ keyword }}"
>
</div>
<div
class=
"input-group"
>
<div
class=
"input-group-btn"
>
...
...
@@ -81,9 +81,11 @@
"order"
:
[]
});
$
(
'#date .input-daterange'
).
datepicker
({
dateFormat
:
"mm/dd/yyy"
,
format
:
"yyyy-mm-dd"
,
todayBtn
:
"linked"
,
keyboardNavigation
:
false
,
forceParse
:
false
,
calendarWeeks
:
true
,
autoclose
:
true
});
...
...
apps/users/templates/users/user_delete_confirm.html
deleted
100644 → 0
View file @
c48531c5
{% load i18n %}
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
{% trans 'Confirm delete' %}
</title>
</head>
<body>
<form
action=
""
method=
"post"
>
{% csrf_token %}
<p>
Are you sure you want to delete "{{ object.name }}"?
</p>
<input
type=
"submit"
value=
"Confirm"
/>
</form>
</body>
</html>
\ No newline at end of file
apps/users/templates/users/user_granted_asset.html
View file @
3b6403b2
...
...
@@ -4,8 +4,8 @@
{% load i18n %}
{% block custom_head_css_js %}
<link
href=
"{% static
"
css
/
plugins
/
select2
/
select2
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<script
src=
"{% static
"
js
/
plugins
/
select2
/
select2
.
full
.
min
.
js
"
%}"
></script>
<link
href=
"{% static
'css/plugins/select2/select2.min.css'
%}"
rel=
"stylesheet"
>
<script
src=
"{% static
'js/plugins/select2/select2.full.min.js'
%}"
></script>
{% endblock %}
{% block content %}
<div
class=
"wrapper wrapper-content animated fadeInRight"
>
...
...
@@ -23,7 +23,7 @@
</ul>
</div>
<div
class=
"tab-content"
>
<div
class=
"col-sm-
7
"
style=
"padding-left: 0;"
>
<div
class=
"col-sm-
6
"
style=
"padding-left: 0;"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<span
style=
"float: left"
>
{% trans 'Assets granted of ' %}
<b>
{{ user.name }}
</b></span>
...
...
@@ -56,7 +56,7 @@
</div>
</div>
</div>
<div
class=
"col-sm-
5
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"col-sm-
6
"
style=
"padding-left: 0;padding-right: 0"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<span
style=
"float: left"
>
{% trans 'Asset groups granted of ' %}
<b>
{{ user.name }}
</b></span>
...
...
apps/users/views/login.py
View file @
3b6403b2
...
...
@@ -217,7 +217,6 @@ class LoginLogListView(DatetimeSearchMixin, ListView):
paginate_by
=
settings
.
CONFIG
.
DISPLAY_PER_PAGE
user
=
keyword
=
""
date_to
=
date_from
=
None
date_format
=
'
%
m/
%
d/
%
Y'
def
get_queryset
(
self
):
self
.
user
=
self
.
request
.
GET
.
get
(
'user'
,
''
)
...
...
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