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
1888c698
Commit
1888c698
authored
Jan 05, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修复一些bug
parent
6518ae8f
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
358 additions
and
247 deletions
+358
-247
api.py
apps/assets/api.py
+10
-12
forms.py
apps/assets/forms.py
+23
-2
asset.py
apps/assets/models/asset.py
+1
-0
cluster.py
apps/assets/models/cluster.py
+1
-0
group.py
apps/assets/models/group.py
+1
-0
user.py
apps/assets/models/user.py
+3
-2
serializers.py
apps/assets/serializers.py
+10
-1
signals_handler.py
apps/assets/signals_handler.py
+3
-3
tasks.py
apps/assets/tasks.py
+12
-3
_system_user.html
apps/assets/templates/assets/_system_user.html
+2
-2
admin_user_assets.html
apps/assets/templates/assets/admin_user_assets.html
+2
-2
admin_user_create_update.html
apps/assets/templates/assets/admin_user_create_update.html
+2
-2
admin_user_list.html
apps/assets/templates/assets/admin_user_list.html
+40
-5
asset_group_detail.html
apps/assets/templates/assets/asset_group_detail.html
+2
-2
cluster_assets.html
apps/assets/templates/assets/cluster_assets.html
+9
-4
cluster_create_update.html
apps/assets/templates/assets/cluster_create_update.html
+6
-7
cluster_detail.html
apps/assets/templates/assets/cluster_detail.html
+2
-2
system_user_asset.html
apps/assets/templates/assets/system_user_asset.html
+2
-2
api_urls.py
apps/assets/urls/api_urls.py
+2
-2
system_user.py
apps/assets/views/system_user.py
+2
-2
django.po
apps/locale/zh/LC_MESSAGES/django.po
+174
-143
adhoc_detail.html
apps/ops/templates/ops/adhoc_detail.html
+2
-2
adhoc_history.html
apps/ops/templates/ops/adhoc_history.html
+2
-2
adhoc_history_detail.html
apps/ops/templates/ops/adhoc_history_detail.html
+2
-2
task_adhoc.html
apps/ops/templates/ops/task_adhoc.html
+2
-2
task_detail.html
apps/ops/templates/ops/task_detail.html
+2
-2
task_history.html
apps/ops/templates/ops/task_history.html
+2
-2
asset_permission_asset.html
apps/perms/templates/perms/asset_permission_asset.html
+2
-2
asset_permission_detail.html
apps/perms/templates/perms/asset_permission_detail.html
+2
-2
asset_permission_user.html
apps/perms/templates/perms/asset_permission_user.html
+2
-2
_base_create_update.html
apps/templates/_base_create_update.html
+2
-2
_base_list.html
apps/templates/_base_list.html
+2
-2
forms.py
apps/terminal/forms.py
+0
-1
session_detail.html
apps/terminal/templates/terminal/session_detail.html
+15
-15
session_list.html
apps/terminal/templates/terminal/session_list.html
+1
-1
terminal_update.html
apps/terminal/templates/terminal/terminal_update.html
+2
-2
user_detail.html
apps/users/templates/users/user_detail.html
+2
-2
user_group_create_update.html
apps/users/templates/users/user_group_create_update.html
+2
-2
user_group_detail.html
apps/users/templates/users/user_group_detail.html
+2
-2
user_group_granted_asset.html
apps/users/templates/users/user_group_granted_asset.html
+2
-2
login.py
apps/users/views/login.py
+1
-0
No files found.
apps/assets/api.py
View file @
1888c698
...
...
@@ -26,7 +26,7 @@ from .hands import IsSuperUser, IsValidUser, IsSuperUserOrAppUser, \
get_user_granted_assets
from
.models
import
AssetGroup
,
Asset
,
Cluster
,
SystemUser
,
AdminUser
from
.
import
serializers
from
.tasks
import
update_asset_hardware_info_manual
,
test_admin_user_connectability_
uti
l
,
\
from
.tasks
import
update_asset_hardware_info_manual
,
test_admin_user_connectability_
manua
l
,
\
test_asset_connectability_manual
,
push_system_user_to_cluster_assets_manual
,
\
test_system_user_connectability_manual
...
...
@@ -52,6 +52,7 @@ class AssetViewSet(IDInFilterMixin, BulkModelViewSet):
cluster_id
=
self
.
request
.
query_params
.
get
(
'cluster_id'
)
asset_group_id
=
self
.
request
.
query_params
.
get
(
'asset_group_id'
)
admin_user_id
=
self
.
request
.
query_params
.
get
(
'admin_user_id'
)
system_user_id
=
self
.
request
.
query_params
.
get
(
'system_user_id'
)
if
cluster_id
:
queryset
=
queryset
.
filter
(
cluster__id
=
cluster_id
)
...
...
@@ -62,6 +63,10 @@ class AssetViewSet(IDInFilterMixin, BulkModelViewSet):
assets_direct
=
[
asset
.
id
for
asset
in
admin_user
.
asset_set
.
all
()]
clusters
=
[
cluster
.
id
for
cluster
in
admin_user
.
cluster_set
.
all
()]
queryset
=
queryset
.
filter
(
Q
(
cluster__id__in
=
clusters
)
|
Q
(
id__in
=
assets_direct
))
if
system_user_id
:
system_user
=
get_object_or_404
(
SystemUser
,
id
=
system_user_id
)
clusters
=
system_user
.
get_clusters
()
queryset
=
queryset
.
filter
(
cluster__in
=
clusters
)
return
queryset
...
...
@@ -99,15 +104,6 @@ class GroupAddAssetsApi(generics.UpdateAPIView):
return
Response
({
'error'
:
serializer
.
errors
},
status
=
400
)
class
ClusterUpdateAssetsApi
(
generics
.
RetrieveUpdateAPIView
):
"""
Cluster update asset member
"""
queryset
=
Cluster
.
objects
.
all
()
serializer_class
=
serializers
.
ClusterUpdateAssetsSerializer
permission_classes
=
(
IsSuperUser
,)
class
ClusterViewSet
(
IDInFilterMixin
,
BulkModelViewSet
):
"""
Cluster api set, for add,delete,update,list,retrieve resource
...
...
@@ -117,7 +113,6 @@ class ClusterViewSet(IDInFilterMixin, BulkModelViewSet):
permission_classes
=
(
IsSuperUser
,)
# TOdo
class
ClusterTestAssetsAliveApi
(
generics
.
RetrieveAPIView
):
"""
Test cluster asset can connect using admin user or not
...
...
@@ -127,6 +122,9 @@ class ClusterTestAssetsAliveApi(generics.RetrieveAPIView):
def
retrieve
(
self
,
request
,
*
args
,
**
kwargs
):
cluster
=
self
.
get_object
()
admin_user
=
cluster
.
admin_user
test_admin_user_connectability_manual
.
delay
(
admin_user
)
return
Response
(
"Task has been send, seen left assets status"
)
class
ClusterAddAssetsApi
(
generics
.
UpdateAPIView
):
...
...
@@ -256,7 +254,7 @@ class AdminUserTestConnectiveApi(generics.RetrieveAPIView):
def
retrieve
(
self
,
request
,
*
args
,
**
kwargs
):
admin_user
=
self
.
get_object
()
test_admin_user_connectability_
uti
l
.
delay
(
admin_user
)
test_admin_user_connectability_
manua
l
.
delay
(
admin_user
)
return
Response
({
"msg"
:
"Task created"
})
...
...
apps/assets/forms.py
View file @
1888c698
...
...
@@ -150,10 +150,19 @@ class AssetGroupForm(forms.ModelForm):
class
ClusterForm
(
forms
.
ModelForm
):
system_users
=
forms
.
ModelMultipleChoiceField
(
queryset
=
SystemUser
.
objects
.
all
(),
widget
=
forms
.
SelectMultiple
(
attrs
=
{
'class'
:
'select2'
,
'data-placeholder'
:
_
(
'Select system users'
)}
),
label
=
_
(
'System users'
),
required
=
False
,
help_text
=
_
(
"Selected system users will be create at cluster assets"
),
)
class
Meta
:
model
=
Cluster
fields
=
[
'name'
,
"bandwidth"
,
"operator"
,
'contact'
,
'admin_user'
,
fields
=
[
'name'
,
"bandwidth"
,
"operator"
,
'contact'
,
'admin_user'
,
'system_users'
,
'phone'
,
'address'
,
'intranet'
,
'extranet'
,
'comment'
]
widgets
=
{
'name'
:
forms
.
TextInput
(
attrs
=
{
'placeholder'
:
_
(
'Name'
)}),
...
...
@@ -162,9 +171,21 @@ class ClusterForm(forms.ModelForm):
}
help_texts
=
{
'name'
:
'* required'
,
'admin_user'
:
'The assets of this cluster will use this admin user as his admin user'
,
'admin_user'
:
_
(
"Cluster level admin user"
)
,
}
def
__init__
(
self
,
*
args
,
**
kwargs
):
if
kwargs
.
get
(
'instance'
,
None
):
initial
=
kwargs
.
get
(
'initial'
,
{})
initial
[
'system_users'
]
=
kwargs
[
'instance'
]
.
systemuser_set
.
all
()
super
()
.
__init__
(
*
args
,
**
kwargs
)
def
save
(
self
,
commit
=
True
):
instance
=
super
()
.
save
(
commit
=
commit
)
system_users
=
self
.
cleaned_data
[
'system_users'
]
instance
.
systemuser_set
.
set
(
system_users
)
return
instance
class
AdminUserForm
(
forms
.
ModelForm
):
# Form field name can not start with `_`, so redefine it,
...
...
apps/assets/models/asset.py
View file @
1888c698
...
...
@@ -158,6 +158,7 @@ class Asset(models.Model):
class
Meta
:
unique_together
=
(
'ip'
,
'port'
)
verbose_name
=
_
(
"Asset"
)
@classmethod
def
generate_fake
(
cls
,
count
=
100
):
...
...
apps/assets/models/cluster.py
View file @
1888c698
...
...
@@ -37,6 +37,7 @@ class Cluster(models.Model):
class
Meta
:
ordering
=
[
'name'
]
verbose_name
=
_
(
"Cluster"
)
@classmethod
def
generate_fake
(
cls
,
count
=
5
):
...
...
apps/assets/models/group.py
View file @
1888c698
...
...
@@ -27,6 +27,7 @@ class AssetGroup(models.Model):
class
Meta
:
ordering
=
[
'name'
]
verbose_name
=
_
(
"Asset group"
)
@classmethod
def
initial
(
cls
):
...
...
apps/assets/models/user.py
View file @
1888c698
...
...
@@ -170,7 +170,6 @@ class AdminUser(AssetUser):
info
=
None
return
info
def
get_related_assets
(
self
):
assets
=
[]
for
cluster
in
self
.
cluster_set
.
all
():
...
...
@@ -184,6 +183,7 @@ class AdminUser(AssetUser):
class
Meta
:
ordering
=
[
'name'
]
verbose_name
=
_
(
"Admin user"
)
@classmethod
def
generate_fake
(
cls
,
count
=
10
):
...
...
@@ -224,7 +224,7 @@ class SystemUser(AssetUser):
def
get_clusters_assets
(
self
):
from
.asset
import
Asset
clusters
=
self
.
cluster
.
all
()
clusters
=
self
.
get_clusters
()
return
Asset
.
objects
.
filter
(
cluster__in
=
clusters
)
def
get_clusters
(
self
):
...
...
@@ -262,6 +262,7 @@ class SystemUser(AssetUser):
class
Meta
:
ordering
=
[
'name'
]
verbose_name
=
_
(
"System user"
)
@classmethod
def
generate_fake
(
cls
,
count
=
10
):
...
...
apps/assets/serializers.py
View file @
1888c698
...
...
@@ -64,6 +64,7 @@ class AdminUserSerializer(serializers.ModelSerializer):
"""
assets_amount
=
serializers
.
SerializerMethodField
()
unreachable_amount
=
serializers
.
SerializerMethodField
()
reachable_amount
=
serializers
.
SerializerMethodField
()
class
Meta
:
model
=
AdminUser
...
...
@@ -75,7 +76,15 @@ class AdminUserSerializer(serializers.ModelSerializer):
if
data
:
return
len
(
data
.
get
(
'dark'
))
else
:
return
'Unknown'
return
0
@staticmethod
def
get_reachable_amount
(
obj
):
data
=
cache
.
get
(
ADMIN_USER_CONN_CACHE_KEY
.
format
(
obj
.
name
))
if
data
:
return
len
(
data
.
get
(
'contacted'
))
else
:
return
0
@staticmethod
def
get_assets_amount
(
obj
):
...
...
apps/assets/signals_handler.py
View file @
1888c698
...
...
@@ -77,7 +77,7 @@ def on_system_user_created_or_updated(sender, instance=None, **kwargs):
@receiver
(
post_init
,
sender
=
Cluster
,
dispatch_uid
=
"my_unique_identifier"
)
def
on_cluster_init
(
sender
,
instance
,
**
kwargs
):
instance
.
__original_assets
=
tuple
(
instance
.
assets
.
values_list
(
'pk'
,
flat
=
True
))
# instance.__origin_system_users = tuple(instance.systemuser_set.all(
))
instance
.
__origin_system_users
=
tuple
(
instance
.
systemuser_set
.
values_list
(
'pk'
,
flat
=
True
))
@receiver
(
post_save
,
sender
=
Cluster
,
dispatch_uid
=
"my_unique_identifier"
)
...
...
@@ -103,11 +103,11 @@ def on_cluster_assets_changed(sender, instance, **kwargs):
push_system_user_util
.
delay
(
system_users
,
assets
,
task_name
)
@receiver
(
post_save
,
sender
=
Cluster
,
dispatch_uid
=
"my_unique_identifier"
)
@receiver
(
post_save
,
sender
=
Cluster
,
dispatch_uid
=
"my_unique_identifier
2
"
)
def
on_cluster_system_user_changed
(
sender
,
instance
,
**
kwargs
):
system_users_origin
=
instance
.
__origin_system_users
system_user_new
=
instance
.
systemuser_set
.
values_list
(
'pk'
,
flat
=
True
)
system_users_added
=
set
(
system_user_new
)
-
s
ystem_users_origin
system_users_added
=
set
(
system_user_new
)
-
s
et
(
system_users_origin
)
if
system_users_added
:
logger
.
debug
(
"Receive cluster change system users signal"
)
system_users
=
[]
...
...
apps/assets/tasks.py
View file @
1888c698
...
...
@@ -211,6 +211,9 @@ def test_asset_connectability_util(asset, task_name=None):
if
task_name
is
None
:
task_name
=
_
(
"Test asset connectability"
)
hosts
=
[
asset
.
hostname
]
if
not
hosts
:
logger
.
info
(
"No hosts, passed"
)
return
{}
tasks
=
const
.
TEST_ADMIN_USER_CONN_TASKS
task
,
created
=
update_or_create_ansible_task
(
task_name
=
task_name
,
hosts
=
hosts
,
tasks
=
tasks
,
pattern
=
'all'
,
...
...
@@ -262,6 +265,9 @@ def test_system_user_connectability_util(system_user, task_name):
assets
=
system_user
.
get_clusters_assets
()
hosts
=
[
asset
.
hostname
for
asset
in
assets
]
tasks
=
const
.
TEST_SYSTEM_USER_CONN_TASKS
if
not
hosts
:
logger
.
info
(
"No hosts, passed"
)
return
{}
task
,
created
=
update_or_create_ansible_task
(
task_name
,
hosts
=
hosts
,
tasks
=
tasks
,
pattern
=
'all'
,
options
=
const
.
TASK_OPTIONS
,
...
...
@@ -274,7 +280,7 @@ def test_system_user_connectability_util(system_user, task_name):
@shared_task
def
test_system_user_connectability_manual
(
system_user
):
task_name
=
"Test system user connectability: {}"
.
format
(
system_user
)
task_name
=
_
(
"Test system user connectability: {}"
)
.
format
(
system_user
)
return
test_system_user_connectability_util
(
system_user
,
task_name
)
...
...
@@ -346,11 +352,14 @@ def push_system_user_util(system_users, assets, task_name):
for
system_user
in
system_users
:
tasks
.
extend
(
get_push_system_user_tasks
(
system_user
))
print
(
"Task: "
,
tasks
)
if
not
tasks
:
return
logger
.
info
(
"Not tasks, passed"
)
return
{}
hosts
=
[
asset
.
hostname
for
asset
in
assets
]
if
not
hosts
:
logger
.
info
(
"Not hosts, passed"
)
return
{}
task
,
created
=
update_or_create_ansible_task
(
task_name
=
task_name
,
hosts
=
hosts
,
tasks
=
tasks
,
pattern
=
'all'
,
options
=
const
.
TASK_OPTIONS
,
run_as_admin
=
True
,
created_by
=
'System'
...
...
apps/assets/templates/assets/_system_user.html
View file @
1888c698
...
...
@@ -3,8 +3,8 @@
{% load static %}
{% load bootstrap3 %}
{% 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 %}
...
...
apps/assets/templates/assets/admin_user_assets.html
View file @
1888c698
...
...
@@ -60,7 +60,7 @@
<th>
{% trans 'IP' %}
</th>
<th>
{% trans 'Port' %}
</th>
<th>
{% trans 'Type' %}
</th>
<th>
{% trans '
Aliv
e' %}
</th>
<th>
{% trans '
Reachabl
e' %}
</th>
</tr>
</thead>
<tbody>
...
...
@@ -144,7 +144,7 @@ $(document).ready(function () {
url
:
the_url
,
error
:
error
,
method
:
'GET'
,
success_message
:
"{% trans
"
Task
has
been
send
,
seen
left
asset
status
"
%}"
success_message
:
"{% trans
'Task has been send, seen left asset status'
%}"
});
})
</script>
...
...
apps/assets/templates/assets/admin_user_create_update.html
View file @
1888c698
...
...
@@ -3,8 +3,8 @@
{% load static %}
{% load bootstrap3 %}
{% 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 %}
...
...
apps/assets/templates/assets/admin_user_list.html
View file @
1888c698
...
...
@@ -21,8 +21,10 @@
</th>
<th
class=
"text-center"
>
{% trans 'Name' %}
</th>
<th
class=
"text-center"
>
{% trans 'Username' %}
</th>
<th
class=
"text-center"
>
{% trans 'Asset num' %}
</th>
<th
class=
"text-center"
>
{% trans 'Asset' %}
</th>
<th
class=
"text-center"
>
{% trans 'Reachable' %}
</th>
<th
class=
"text-center"
>
{% trans 'Unreachable' %}
</th>
<th
class=
"text-center"
>
{% trans 'Ratio' %}
</th>
<th
class=
"text-center"
>
{% trans 'Comment' %}
</th>
<th
class=
"text-center"
>
{% trans 'Action' %}
</th>
</tr>
...
...
@@ -41,17 +43,50 @@ $(document).ready(function(){
{
targets
:
1
,
createdCell
:
function
(
td
,
cellData
,
rowData
)
{
var
detail_btn
=
'<a href="{% url "assets:admin-user-detail" pk=DEFAULT_PK %}">'
+
cellData
+
'</a>'
;
$
(
td
).
html
(
detail_btn
.
replace
(
'{{ DEFAULT_PK }}'
,
rowData
.
id
));
}},
}},
{
targets
:
4
,
createdCell
:
function
(
td
,
cellData
)
{
var
innerHtml
=
""
;
if
(
cellData
!==
0
)
{
innerHtml
=
"<span class='text-navy'>"
+
cellData
+
"</span>"
;
}
else
{
innerHtml
=
"<span>"
+
cellData
+
"</span>"
;
}
$
(
td
).
html
(
'<span href="javascript:void(0);" data-toggle="tooltip" title="'
+
cellData
+
'">'
+
innerHtml
+
'</span>'
);
}},
{
targets
:
5
,
createdCell
:
function
(
td
,
cellData
)
{
var
innerHtml
=
""
;
if
(
cellData
!==
0
)
{
innerHtml
=
"<span class='text-danger'>"
+
cellData
+
"</span>"
;
}
else
{
innerHtml
=
"<span>"
+
cellData
+
"</span>"
;
}
$
(
td
).
html
(
'<span href="javascript:void(0);" data-toggle="tooltip" title="'
+
cellData
+
'">'
+
innerHtml
+
'</span>'
);
}},
{
targets
:
6
,
createdCell
:
function
(
td
,
cellData
,
rowData
)
{
{
#
var
script_btn
=
'<a href="{% url "assets:admin-user-update" pk=DEFAULT_PK %}" class="btn btn-xs btn-primary">{% trans "Script" %}</a>'
.
replace
(
'{{ DEFAULT_PK }}'
,
cellData
);
#
}
var
val
=
0
;
var
innerHtml
=
""
;
var
total
=
rowData
.
assets_amount
;
var
reachable
=
rowData
.
reachable_amount
;
if
(
total
!==
0
)
{
val
=
reachable
/
total
*
100
;
}
if
(
val
===
100
)
{
innerHtml
=
"<span class='text-navy'>"
+
val
+
"% </span>"
;
}
else
{
innerHtml
=
"<span class='text-danger'>"
+
val
+
"% </span>"
;
}
$
(
td
).
html
(
'<span href="javascript:void(0);" data-toggle="tooltip" title="'
+
cellData
+
'">'
+
innerHtml
+
'</span>'
);
}},
{
targets
:
8
,
createdCell
:
function
(
td
,
cellData
,
rowData
)
{
var
update_btn
=
'<a href="{% url "assets:admin-user-update" pk=DEFAULT_PK %}" class="btn btn-xs m-l-xs btn-info">{% trans "Update" %}</a>'
.
replace
(
'{{ DEFAULT_PK }}'
,
cellData
);
var
del_btn
=
'<a class="btn btn-xs btn-danger m-l-xs btn_admin_user_delete" data-uid="{{ DEFAULT_PK }}">{% trans "Delete" %}</a>'
.
replace
(
'{{ DEFAULT_PK }}'
,
cellData
);
{
#
$
(
td
).
html
(
script_btn
+
update_btn
+
del_btn
)
#
}
$
(
td
).
html
(
update_btn
+
del_btn
)
}}],
ajax_url
:
'{% url "api-assets:admin-user-list" %}'
,
columns
:
[{
data
:
function
(){
return
""
}},
{
data
:
"name"
},
{
data
:
"username"
},
{
data
:
"assets_amount"
},
{
data
:
"
unreachable_amount
"
},
{
data
:
"comment"
},
{
data
:
"id"
}]
{
data
:
"
reachable_amount"
},
{
data
:
"unreachable_amount"
},
{
data
:
"id
"
},
{
data
:
"comment"
},
{
data
:
"id"
}]
};
jumpserver
.
initDataTable
(
options
);
})
...
...
apps/assets/templates/assets/asset_group_detail.html
View file @
1888c698
...
...
@@ -3,8 +3,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"
>
...
...
apps/assets/templates/assets/cluster_assets.html
View file @
1888c698
...
...
@@ -3,8 +3,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>
<style
type=
"text/css"
>
</style>
...
...
@@ -94,7 +94,7 @@
<td
colspan=
"2"
>
<select
data-placeholder=
"{% trans 'Select asset' %}"
class=
"select2"
style=
"width: 100%"
multiple=
""
tabindex=
"4"
>
{% for asset in assets_remain %}
<option
value=
"{{ asset.id }}"
id=
"opt_{{ asset.id }}"
>
{{ asset.
ip}}:{{ asset.port
}}
</option>
<option
value=
"{{ asset.id }}"
id=
"opt_{{ asset.id }}"
>
{{ asset.
hostname
}}
</option>
{% endfor %}
</select>
</td>
...
...
@@ -204,7 +204,12 @@ $(document).ready(function () {
addAssets
(
assets_id
);
})
.
on
(
'click'
,
'#btn-test-assets'
,
function
()
{
console
.
log
(
'ok'
);
var
the_url
=
"{% url 'api-assets:cluster-test-connective' pk=cluster.id %}"
;
APIUpdateAttr
({
url
:
the_url
,
method
:
'GET'
,
success_message
:
"{% trans 'Task has been send, seen left assets status' %}"
});
})
</script>
{% endblock %}
apps/assets/templates/assets/cluster_create_update.html
View file @
1888c698
...
...
@@ -3,8 +3,8 @@
{% load static %}
{% load bootstrap3 %}
{% 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"
>
...
...
@@ -40,6 +40,7 @@
<h3
class=
"widget-head-color-box"
>
{% trans 'Settings' %}
</h3>
{% bootstrap_field form.admin_user layout="horizontal" %}
{% bootstrap_field form.system_users layout="horizontal" %}
<div
class=
"hr-line-dashed"
></div>
<h3
class=
"widget-head-color-box"
>
{% trans 'Other' %}
</h3>
...
...
@@ -69,10 +70,7 @@
{% block custom_foot_js %}
<script>
$
(
document
).
ready
(
function
()
{
$
(
'.select2'
).
select2
({
dropdownAutoWidth
:
true
,
width
:
'auto'
});
})
$
(
'.select2'
).
select2
();
});
</script>
{% endblock %}
\ No newline at end of file
apps/assets/templates/assets/cluster_detail.html
View file @
1888c698
...
...
@@ -3,8 +3,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"
>
...
...
apps/assets/templates/assets/system_user_asset.html
View file @
1888c698
...
...
@@ -3,8 +3,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"
>
...
...
apps/assets/urls/api_urls.py
View file @
1888c698
...
...
@@ -27,10 +27,10 @@ urlpatterns = [
url
(
r'^v1/groups/(?P<pk>[0-9a-zA-Z\-]{36})/assets/add/$'
,
api
.
GroupAddAssetsApi
.
as_view
(),
name
=
'group-add-assets'
),
# update the Cluster, and add or delete the assets to the Cluster
url
(
r'^v1/cluster/(?P<pk>[0-9a-zA-Z\-]{36})/assets/$'
,
api
.
ClusterUpdateAssetsApi
.
as_view
(),
name
=
'cluster-update-assets'
),
url
(
r'^v1/cluster/(?P<pk>[0-9a-zA-Z\-]{36})/assets/$'
,
api
.
ClusterAddAssetsApi
.
as_view
(),
name
=
'cluster-add-assets'
),
url
(
r'^v1/cluster/(?P<pk>[0-9a-zA-Z\-]{36})/assets/connective/$'
,
api
.
ClusterTestAssetsAliveApi
.
as_view
(),
name
=
'cluster-test-connective'
),
url
(
r'^v1/admin-user/(?P<pk>[0-9a-zA-Z\-]{36})/clusters/$'
,
api
.
AdminUserAddClustersApi
.
as_view
(),
name
=
'admin-user-add-clusters'
),
url
(
r'^v1/admin-user/(?P<pk>[0-9a-zA-Z\-]{36})/connective/$'
,
...
...
apps/assets/views/system_user.py
View file @
1888c698
...
...
@@ -109,8 +109,8 @@ class SystemUserAssetView(AdminUserRequiredMixin, DetailView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
{
'app'
:
'assets'
,
'action'
:
'System user asset'
,
'app'
:
_
(
'assets'
)
,
'action'
:
_
(
'System user asset'
)
,
}
kwargs
.
update
(
context
)
return
super
()
.
get_context_data
(
**
kwargs
)
apps/locale/zh/LC_MESSAGES/django.po
View file @
1888c698
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-0
2 18:11
+0800\n"
"POT-Creation-Date: 2018-01-0
5 17:27
+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
...
...
@@ -36,7 +36,7 @@ msgstr "主机级别管理用户,如果没有设置则默认使用集群级别
#: assets/forms.py:40 assets/forms.py:68
msgid "You need set a admin user if cluster not have"
msgstr ""
msgstr "
集群没有管理用户,你需要为集群设置管理用户或设置一个主机级别的管理用户
"
#: assets/forms.py:54
msgid "Default using cluster admin user"
...
...
@@ -61,7 +61,9 @@ msgstr "选择资产"
msgid "Port"
msgstr "端口"
#: assets/forms.py:124 assets/templates/assets/asset_group_list.html:16
#: assets/forms.py:124 assets/models/asset.py:161
#: assets/templates/assets/admin_user_list.html:24
#: assets/templates/assets/asset_group_list.html:16
#: assets/templates/assets/system_user_list.html:26 perms/models.py:17
#: perms/templates/perms/asset_permission_create_update.html:40
#: perms/templates/perms/asset_permission_list.html:28 templates/_nav.html:22
...
...
@@ -75,7 +77,22 @@ msgstr "端口"
msgid "Asset"
msgstr "资产"
#: assets/forms.py:159 assets/forms.py:219 assets/forms.py:278
#: assets/forms.py:156 perms/forms.py:40
#: perms/templates/perms/asset_permission_detail.html:144 users/forms.py:243
msgid "Select system users"
msgstr "选择系统用户"
#: assets/forms.py:158
#: assets/templates/assets/_asset_group_bulk_update_modal.html:22
#: assets/templates/assets/cluster_list.html:22
msgid "System users"
msgstr "系统用户"
#: assets/forms.py:160
msgid "Selected system users will be create at cluster assets"
msgstr "选择的系统用户将会在该集群资产上创建"
#: assets/forms.py:168 assets/forms.py:243 assets/forms.py:302
#: assets/models/cluster.py:18 assets/models/group.py:20
#: assets/models/user.py:28 assets/templates/assets/admin_user_detail.html:56
#: assets/templates/assets/admin_user_list.html:22
...
...
@@ -105,18 +122,36 @@ msgid "Name"
msgstr "名称"
#: assets/forms.py:174
msgid "Cluster level admin user"
msgstr "集群级别管理用户"
#: assets/forms.py:195
msgid "Password or private key password"
msgstr "密码或秘钥不合法"
#: assets/forms.py:202 assets/forms.py:260 assets/forms.py:321
#: assets/forms.py:196 assets/models/user.py:30 users/forms.py:16
#: users/forms.py:24 users/templates/users/login.html:56
#: users/templates/users/reset_password.html:52
#: users/templates/users/user_create.html:11
#: users/templates/users/user_password_update.html:40
#: users/templates/users/user_profile_update.html:40
#: users/templates/users/user_pubkey_update.html:40
msgid "Password"
msgstr "密码"
#: assets/forms.py:199 users/models/user.py:46
msgid "Private key"
msgstr "ssh私钥"
#: assets/forms.py:224 assets/forms.py:284 assets/forms.py:345
msgid "Invalid private key"
msgstr "ssh密钥不合法"
#: assets/forms.py:2
12
#: assets/forms.py:2
35
msgid "Password and private key file must be input one"
msgstr "密码和私钥, 必须输入一个"
#: assets/forms.py:2
20 assets/forms.py:279
assets/models/user.py:29
#: assets/forms.py:2
44 assets/forms.py:303
assets/models/user.py:29
#: assets/templates/assets/admin_user_detail.html:60
#: assets/templates/assets/admin_user_list.html:23
#: assets/templates/assets/system_user_detail.html:57
...
...
@@ -132,14 +167,28 @@ msgstr "密码和私钥, 必须输入一个"
msgid "Username"
msgstr "用户名"
#: assets/forms.py:2
67 assets/forms.py:327
#: assets/forms.py:2
91 assets/forms.py:351
msgid "Auth info required, private_key or password"
msgstr "密钥和密码必须填写一个"
#: assets/forms.py:
282
#: assets/forms.py:
306
msgid " Select clusters"
msgstr "选择集群"
#: assets/forms.py:311
msgid "If auto push checked, system user will be create at cluster assets"
msgstr "如果选择了自动推送,系统用户将会创建在集群资产上"
#: assets/forms.py:312
msgid "Auto push system user to asset"
msgstr "自动推送系统用户到资产"
#: assets/forms.py:313
msgid ""
"High level will be using login asset as default, if user was granted more "
"than 2 system user"
msgstr "高优先级的系统用户将会作为默认登录用户"
#: assets/models/asset.py:24
msgid "In use"
msgstr "使用中"
...
...
@@ -216,8 +265,8 @@ msgstr "主机名"
msgid "Asset groups"
msgstr "资产组"
#: assets/models/asset.py:47 assets/models/
user.py:215
#: assets/templates/assets/asset_detail.html:85
#: assets/models/asset.py:47 assets/models/
cluster.py:40
#: assets/
models/user.py:215 assets/
templates/assets/asset_detail.html:85
#: assets/templates/assets/asset_list.html:33 templates/_nav.html:24
msgid "Cluster"
msgstr "集群"
...
...
@@ -239,7 +288,7 @@ msgid "Asset status"
msgstr "资产状态"
#: assets/models/asset.py:54 assets/models/cluster.py:19
#: assets/templates/assets/asset_detail.html:73
#: assets/
models/user.py:186 assets/
templates/assets/asset_detail.html:73
#: assets/templates/assets/cluster_list.html:20 templates/_nav.html:25
msgid "Admin user"
msgstr "管理用户"
...
...
@@ -346,7 +395,7 @@ msgstr "创建日期"
#: assets/models/asset.py:83 assets/models/cluster.py:29
#: assets/models/group.py:23 assets/models/user.py:33
#: assets/templates/assets/admin_user_detail.html:72
#: assets/templates/assets/admin_user_list.html:2
6
#: assets/templates/assets/admin_user_list.html:2
8
#: assets/templates/assets/asset_detail.html:157
#: assets/templates/assets/asset_group_list.html:17
#: assets/templates/assets/cluster_detail.html:97
...
...
@@ -391,7 +440,7 @@ msgstr "外网"
msgid "Operator"
msgstr "运营商"
#: assets/models/cluster.py:36 assets/models/group.py:3
3
#: assets/models/cluster.py:36 assets/models/group.py:3
4
msgid "Default"
msgstr "默认"
...
...
@@ -403,20 +452,15 @@ msgstr "系统"
msgid "Default Cluster"
msgstr "默认Cluster"
#: assets/models/group.py:33
#: assets/models/group.py:30 perms/models.py:18
#: perms/templates/perms/asset_permission_list.html:29 templates/_nav.html:23
msgid "Asset group"
msgstr "资产组"
#: assets/models/group.py:34
msgid "Default asset group"
msgstr "默认资产组"
#: assets/models/user.py:30 users/forms.py:16 users/forms.py:24
#: users/templates/users/login.html:56
#: users/templates/users/reset_password.html:52
#: users/templates/users/user_create.html:11
#: users/templates/users/user_password_update.html:40
#: users/templates/users/user_profile_update.html:40
#: users/templates/users/user_pubkey_update.html:40
msgid "Password"
msgstr "密码"
#: assets/models/user.py:31
msgid "SSH private key"
msgstr "ssh密钥"
...
...
@@ -427,7 +471,7 @@ msgstr "ssh公钥"
#: assets/models/user.py:216
msgid "Priority"
msgstr ""
msgstr "
优先级
"
#: assets/models/user.py:217 assets/templates/assets/system_user_detail.html:61
msgid "Protocol"
...
...
@@ -447,6 +491,19 @@ msgstr "Sudo"
msgid "Shell"
msgstr "Shell"
#: assets/models/user.py:265 perms/models.py:19
#: perms/templates/perms/asset_permission_detail.html:136
#: perms/templates/perms/asset_permission_list.html:30 templates/_nav.html:26
#: terminal/backends/command/models.py:12 terminal/models.py:94
#: terminal/templates/terminal/command_list.html:48
#: terminal/templates/terminal/command_list.html:74
#: terminal/templates/terminal/session_list.html:49
#: terminal/templates/terminal/session_list.html:73
#: users/templates/users/user_granted_asset.html:50
#: users/templates/users/user_group_granted_asset.html:52
msgid "System user"
msgstr "系统用户"
#: assets/models/utils.py:29
#, python-format
msgid "%(value)s is not an even number"
...
...
@@ -477,27 +534,30 @@ msgid "Update assets hardware info period"
msgstr "定期更新资产硬件信息"
#: assets/tasks.py:189
#, python-format
msgid "Test admin user connectability period: {}"
msgstr "定期测试管理用户可以连接性: {}"
#: assets/tasks.py:203
#, python-format
msgid "Test admin user connectability: {}"
msgstr "测试管理用户可连接性: {}"
#: assets/tasks.py:289
#, python-format
#: assets/tasks.py:212
msgid "Test asset connectability"
msgstr "测试资产可连接性"
#: assets/tasks.py:283
msgid "Test system user connectability: {}"
msgstr "测试系统用户可连接性: {}"
#: assets/tasks.py:295
msgid "Test system user connectability period: {}"
msgstr "测试系统用户可连接性: {}"
#: assets/tasks.py:363
#, python-format
#: assets/tasks.py:372
msgid "Push system user to cluster assets: {}"
msgstr "推送系统用户到资产: {}"
#: assets/tasks.py:384
#, python-format
#: assets/tasks.py:393
msgid "Push system user to cluster assets period: {}->{}"
msgstr "定期推送系统用户到资产: {}->{}"
...
...
@@ -529,11 +589,6 @@ msgstr "资产管理"
msgid "Select Asset"
msgstr "选择资产"
#: assets/templates/assets/_asset_group_bulk_update_modal.html:22
#: assets/templates/assets/cluster_list.html:22
msgid "System users"
msgstr "系统用户"
#: assets/templates/assets/_asset_group_bulk_update_modal.html:24
msgid "Select System Users"
msgstr "选择系统用户"
...
...
@@ -593,7 +648,7 @@ msgstr "自动生成秘钥"
#: assets/templates/assets/_system_user.html:65
#: assets/templates/assets/asset_create.html:32
#: assets/templates/assets/asset_update.html:47
#: assets/templates/assets/cluster_create_update.html:4
5
#: assets/templates/assets/cluster_create_update.html:4
6
#: perms/templates/perms/asset_permission_create_update.html:45
#: terminal/templates/terminal/terminal_update.html:40
msgid "Other"
...
...
@@ -604,7 +659,7 @@ msgstr "其它"
#: assets/templates/assets/asset_bulk_update.html:23
#: assets/templates/assets/asset_create.html:40
#: assets/templates/assets/asset_update.html:56
#: assets/templates/assets/cluster_create_update.html:5
3
#: assets/templates/assets/cluster_create_update.html:5
4
#: perms/templates/perms/asset_permission_create_update.html:67
#: terminal/templates/terminal/terminal_update.html:45
#: users/templates/users/_user.html:49
...
...
@@ -623,7 +678,7 @@ msgstr "重置"
#: assets/templates/assets/asset_create.html:41
#: assets/templates/assets/asset_list.html:55
#: assets/templates/assets/asset_update.html:57
#: assets/templates/assets/cluster_create_update.html:5
4
#: assets/templates/assets/cluster_create_update.html:5
5
#: perms/templates/perms/asset_permission_create_update.html:68
#: terminal/templates/terminal/terminal_update.html:46
#: users/templates/users/_user.html:50
...
...
@@ -673,11 +728,13 @@ msgid "Type"
msgstr "类型"
#: assets/templates/assets/admin_user_assets.html:63
#: assets/templates/assets/asset_group_detail.html:49
#: assets/templates/assets/cluster_assets.html:55
#: terminal/templates/terminal/terminal_list.html:35
msgid "Alive"
msgstr "在线"
#: assets/templates/assets/admin_user_list.html:25
#: assets/templates/assets/asset_detail.html:376
#: assets/templates/assets/asset_list.html:38
#: assets/templates/assets/system_user_asset.html:55
#: assets/templates/assets/system_user_list.html:27
msgid "Reachable"
msgstr "可连接"
#: assets/templates/assets/admin_user_assets.html:75
#: assets/templates/assets/cluster_assets.html:68
...
...
@@ -731,18 +788,19 @@ msgstr "使用集群管理用户"
msgid "Confirm"
msgstr "确认"
#: assets/templates/assets/admin_user_list.html:24
#: assets/templates/assets/cluster_list.html:21
#: users/templates/users/_select_user_modal.html:17
msgid "Asset num"
msgstr "资产数量"
#: assets/templates/assets/admin_user_list.html:25
#: assets/templates/assets/admin_user_list.html:26
#: assets/templates/assets/system_user_list.html:28
msgid "Unreachable"
msgstr "不可达"
#: assets/templates/assets/admin_user_list.html:27
#: assets/templates/assets/system_user_list.html:29
#: ops/templates/ops/adhoc_history.html:54
#: ops/templates/ops/task_history.html:57
msgid "Ratio"
msgstr "比例"
#: assets/templates/assets/admin_user_list.html:29
#: assets/templates/assets/asset_group_detail.html:50
#: assets/templates/assets/asset_group_list.html:18
#: assets/templates/assets/asset_list.html:39
...
...
@@ -760,7 +818,7 @@ msgstr "不可达"
msgid "Action"
msgstr "动作"
#: assets/templates/assets/admin_user_list.html:
47
#: assets/templates/assets/admin_user_list.html:
83
#: assets/templates/assets/asset_group_detail.html:172
#: assets/templates/assets/asset_group_list.html:42
#: assets/templates/assets/asset_list.html:95
...
...
@@ -774,7 +832,7 @@ msgstr "动作"
msgid "Update"
msgstr "更新"
#: assets/templates/assets/admin_user_list.html:
48
#: assets/templates/assets/admin_user_list.html:
84
#: assets/templates/assets/asset_group_list.html:43
#: assets/templates/assets/asset_list.html:96
#: assets/templates/assets/cluster_list.html:44
...
...
@@ -852,17 +910,16 @@ msgstr "添加到资产组"
msgid "Update successfully!"
msgstr "更新成功"
#: assets/templates/assets/asset_detail.html:376
#: assets/templates/assets/asset_list.html:38
#: assets/templates/assets/system_user_asset.html:55
#: assets/templates/assets/system_user_list.html:27
msgid "Reachable"
msgstr "可连接"
#: assets/templates/assets/asset_group_detail.html:16
msgid "Group assets"
msgstr "组下资产"
#: assets/templates/assets/asset_group_detail.html:49
#: assets/templates/assets/cluster_assets.html:55
#: terminal/templates/terminal/terminal_list.html:35
msgid "Alive"
msgstr "在线"
#: assets/templates/assets/asset_group_detail.html:62
msgid "Add assets to this group"
msgstr "添加资产到该组"
...
...
@@ -1016,6 +1073,11 @@ msgstr "添加资产到"
msgid "Select asset"
msgstr "选择资产"
#: assets/templates/assets/cluster_assets.html:211
#: assets/templates/assets/system_user_asset.html:162
msgid "Task has been send, seen left assets status"
msgstr "任务已下发,查看左侧资产状态"
#: assets/templates/assets/cluster_create_update.html:41
#: users/templates/users/user_profile.html:20
msgid "Settings"
...
...
@@ -1025,6 +1087,11 @@ msgstr "设置"
msgid "Create Cluster"
msgstr "创建Cluster"
#: assets/templates/assets/cluster_list.html:21
#: users/templates/users/_select_user_modal.html:17
msgid "Asset num"
msgstr "资产数量"
#: assets/templates/assets/cluster_list.html:85
msgid "This will delete the selected cluster"
msgstr "删除选择Cluster"
...
...
@@ -1068,10 +1135,6 @@ msgstr "推送"
msgid "Task has been send, Go to ops task list seen result"
msgstr "任务已下发,查看ops任务列表"
#: assets/templates/assets/system_user_asset.html:162
msgid "Task has been send, seen left assets status"
msgstr "任务已下发,查看左侧资产状态"
#: assets/templates/assets/system_user_detail.html:22
msgid "Attached assets"
msgstr "关联的资产"
...
...
@@ -1092,12 +1155,6 @@ msgstr "集群"
msgid "Add to cluster"
msgstr "添加到集群"
#: assets/templates/assets/system_user_list.html:29
#: ops/templates/ops/adhoc_history.html:54
#: ops/templates/ops/task_history.html:57
msgid "Ratio"
msgstr "比例"
#: assets/templates/assets/system_user_list.html:130
msgid "This will delete the selected System Users !!!"
msgstr "删除选择系统用户"
...
...
@@ -1161,6 +1218,7 @@ msgid "Cluster list"
msgstr "集群列表"
#: assets/views/cluster.py:38 assets/views/cluster.py:65
#: assets/views/system_user.py:112
msgid "assets"
msgstr "资产管理"
...
...
@@ -1197,6 +1255,10 @@ msgstr "更新系统用户"
msgid "System user detail"
msgstr "系统用户详情"
#: assets/views/system_user.py:113
msgid "System user asset"
msgstr "系统用户集群资产"
#: common/mixins.py:29
msgid "is discard"
msgstr ""
...
...
@@ -1475,8 +1537,8 @@ msgstr "选择用户"
#: perms/forms.py:18 perms/models.py:15
#: perms/templates/perms/asset_permission_create_update.html:36
#: perms/templates/perms/asset_permission_list.html:26 templates/_nav.html:12
#: te
mplates/_user_profile.html:14 terminal/backends/command/models.py:10
#: terminal/
models.py:92 terminal/
templates/terminal/command_list.html:32
#: te
rminal/backends/command/models.py:10 terminal/models.py:92
#: terminal/templates/terminal/command_list.html:32
#: terminal/templates/terminal/command_list.html:72
#: terminal/templates/terminal/session_list.html:33
#: terminal/templates/terminal/session_list.html:71 users/models/user.py:31
...
...
@@ -1488,11 +1550,6 @@ msgstr "用户"
msgid "Select user groups"
msgstr "选择用户组"
#: perms/forms.py:40 perms/templates/perms/asset_permission_detail.html:144
#: users/forms.py:243
msgid "Select system users"
msgstr "选择系统用户"
#: perms/forms.py:52
msgid "User or group at least one required"
msgstr "用户和组至少需要选一个"
...
...
@@ -1518,23 +1575,6 @@ msgstr "资产 {}(组 {}) 所在集群 {} 不包含系统用户 [{}] 请检查\n
msgid "User group"
msgstr "用户组"
#: perms/models.py:18 perms/templates/perms/asset_permission_list.html:29
#: templates/_nav.html:23
msgid "Asset group"
msgstr "资产组"
#: perms/models.py:19 perms/templates/perms/asset_permission_detail.html:136
#: perms/templates/perms/asset_permission_list.html:30 templates/_nav.html:26
#: terminal/backends/command/models.py:12 terminal/models.py:94
#: terminal/templates/terminal/command_list.html:48
#: terminal/templates/terminal/command_list.html:74
#: terminal/templates/terminal/session_list.html:49
#: terminal/templates/terminal/session_list.html:73
#: users/templates/users/user_granted_asset.html:50
#: users/templates/users/user_group_granted_asset.html:52
msgid "System user"
msgstr "系统用户"
#: perms/models.py:21 perms/templates/perms/asset_permission_detail.html:86
#: users/models/user.py:50 users/templates/users/user_detail.html:94
#: users/templates/users/user_profile.html:96
...
...
@@ -1676,16 +1716,38 @@ msgstr "欢迎使用Jumpserver开源跳板机系统"
msgid "Help"
msgstr "帮助"
#: templates/_header_bar.html:24 templates/_user_profile.html:29
#: templates/_header_bar.html:33 templates/_nav_user.html:9
#: users/templates/users/_user.html:42
#: users/templates/users/user_password_update.html:37
#: users/templates/users/user_profile.html:17
#: users/templates/users/user_profile_update.html:37
#: users/templates/users/user_profile_update.html:57
#: users/templates/users/user_pubkey_update.html:37 users/views/user.py:323
msgid "Profile"
msgstr "个人信息"
#: templates/_header_bar.html:34
msgid "Profile settings"
msgstr "个人信息设置"
#: templates/_header_bar.html:38
msgid "Admin page"
msgstr "管理页面"
#: templates/_header_bar.html:40
msgid "User page"
msgstr "用户页面"
#: templates/_header_bar.html:43
msgid "Logout"
msgstr "注销登录"
#: templates/_header_bar.html:
28
users/templates/users/login.html:42
#: templates/_header_bar.html:
47
users/templates/users/login.html:42
#: users/templates/users/login.html:61
msgid "Login"
msgstr "登录"
#: templates/_header_bar.html:
41
templates/_nav.html:4
#: templates/_header_bar.html:
60
templates/_nav.html:4
msgid "Dashboard"
msgstr "仪表盘"
...
...
@@ -1767,36 +1829,10 @@ msgstr "离线会话"
msgid "Command"
msgstr "命令"
#: templates/_nav.html:73
msgid "Visit us"
msgstr "访问官网"
#: templates/_nav_user.html:4
msgid "My assets"
msgstr "我的资产"
#: templates/_nav_user.html:9 templates/_user_profile.html:19
#: users/templates/users/_user.html:42
#: users/templates/users/user_password_update.html:37
#: users/templates/users/user_profile.html:17
#: users/templates/users/user_profile_update.html:37
#: users/templates/users/user_profile_update.html:57
#: users/templates/users/user_pubkey_update.html:37 users/views/user.py:323
msgid "Profile"
msgstr "个人信息"
#: templates/_user_profile.html:20
msgid "Profile settings"
msgstr "个人信息设置"
#: templates/_user_profile.html:24
msgid "Admin page"
msgstr "管理页面"
#: templates/_user_profile.html:26
msgid "User page"
msgstr "用户页面"
#: templates/captcha/image.html:3
msgid "Play CAPTCHA as audio file"
msgstr "语言播放验证码"
...
...
@@ -1822,17 +1858,13 @@ msgstr "输出"
msgid "Session"
msgstr "会话"
#: terminal/forms.py:15
msgid "A unique addr of every terminal, user browser can arrive it"
msgstr ""
#: terminal/forms.py:16
msgid "Coco ssh listen port"
msgstr ""
msgstr "
SSH 监听端口
"
#: terminal/forms.py:17
msgid "Coco http/ws listen port"
msgstr ""
msgstr "
Http/Websocket 监听端口
"
#: terminal/models.py:15
msgid "Remote Address"
...
...
@@ -1852,7 +1884,7 @@ msgstr "在线会话"
#: terminal/models.py:69
msgid "CPU Usage"
msgstr ""
msgstr "
CPU使用
"
#: terminal/models.py:70
msgid "Memory Used"
...
...
@@ -1860,11 +1892,11 @@ msgstr "内存使用"
#: terminal/models.py:71
msgid "Connections"
msgstr "连接"
msgstr "连接
数
"
#: terminal/models.py:72
msgid "Threads"
msgstr "线程"
msgstr "线程
数
"
#: terminal/models.py:73
msgid "Boot Time"
...
...
@@ -1884,7 +1916,7 @@ msgstr "参数"
#: terminal/templates/terminal/command_list.html:88
msgid "Goto"
msgstr ""
msgstr "
转到
"
#: terminal/templates/terminal/session_detail.html:17
#: terminal/views/session.py:115
...
...
@@ -2151,10 +2183,6 @@ msgstr "微信"
msgid "Enable OTP"
msgstr "二次验证"
#: users/models/user.py:46
msgid "Private key"
msgstr "ssh私钥"
#: users/models/user.py:47 users/templates/users/user_password_update.html:43
#: users/templates/users/user_profile.html:71
#: users/templates/users/user_profile_update.html:43
...
...
@@ -2311,13 +2339,13 @@ msgstr "已发送邮件到用户邮箱"
msgid ""
"This will reset the user's password. A password-reset email will be sent to "
"the user\\'s mailbox."
msgstr ""
msgstr "
重设密码邮件将会发送到用户邮箱
"
#: users/templates/users/user_detail.html:348
msgid ""
"The reset-ssh-public-key E-mail has been sent successfully. Please inform "
"the user to update his new ssh public key."
msgstr ""
msgstr "
重设秘钥邮件将会发送到用户邮箱
"
#: users/templates/users/user_detail.html:349
#: users/templates/users/user_profile.html:144
...
...
@@ -2573,7 +2601,7 @@ msgstr "编辑用户组"
#: users/views/login.py:54
msgid "Please enable cookies and try again."
msgstr ""
msgstr "
设置你的浏览器支持cookie
"
#: users/views/login.py:83
msgid "Logout success"
...
...
@@ -2653,6 +2681,9 @@ msgstr "密码更新"
msgid "Public key update"
msgstr "秘钥更新"
#~ msgid "Visit us"
#~ msgstr "访问官网"
#~ msgid "Audits"
#~ msgstr "审计中心"
...
...
apps/ops/templates/ops/adhoc_detail.html
View file @
1888c698
...
...
@@ -3,9 +3,9 @@
{% load i18n %}
{% block custom_head_css_js %}
<link
href=
"{% static
"
css
/
plugins
/
select2
/
select2
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static
'css/plugins/select2/select2.min.css'
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
plugins
/
sweetalert
/
sweetalert
.
css
"
%}"
rel=
"stylesheet"
>
<script
src=
"{% static
"
js
/
plugins
/
select2
/
select2
.
full
.
min
.
js
"
%}"
></script>
<script
src=
"{% static
'js/plugins/select2/select2.full.min.js'
%}"
></script>
<script
src=
"{% static "
js
/
plugins
/
sweetalert
/
sweetalert
.
min
.
js
"
%}"
></script>
{% endblock %}
{% block content %}
...
...
apps/ops/templates/ops/adhoc_history.html
View file @
1888c698
...
...
@@ -3,9 +3,9 @@
{% load i18n %}
{% block custom_head_css_js %}
<link
href=
"{% static
"
css
/
plugins
/
select2
/
select2
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static
'css/plugins/select2/select2.min.css'
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
plugins
/
sweetalert
/
sweetalert
.
css
"
%}"
rel=
"stylesheet"
>
<script
src=
"{% static
"
js
/
plugins
/
select2
/
select2
.
full
.
min
.
js
"
%}"
></script>
<script
src=
"{% static
'js/plugins/select2/select2.full.min.js'
%}"
></script>
<script
src=
"{% static "
js
/
plugins
/
sweetalert
/
sweetalert
.
min
.
js
"
%}"
></script>
{% endblock %}
{% block content %}
...
...
apps/ops/templates/ops/adhoc_history_detail.html
View file @
1888c698
...
...
@@ -3,9 +3,9 @@
{% load i18n %}
{% block custom_head_css_js %}
<link
href=
"{% static
"
css
/
plugins
/
select2
/
select2
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static
'css/plugins/select2/select2.min.css'
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
plugins
/
sweetalert
/
sweetalert
.
css
"
%}"
rel=
"stylesheet"
>
<script
src=
"{% static
"
js
/
plugins
/
select2
/
select2
.
full
.
min
.
js
"
%}"
></script>
<script
src=
"{% static
'js/plugins/select2/select2.full.min.js'
%}"
></script>
<script
src=
"{% static "
js
/
plugins
/
sweetalert
/
sweetalert
.
min
.
js
"
%}"
></script>
{% endblock %}
{% block content %}
...
...
apps/ops/templates/ops/task_adhoc.html
View file @
1888c698
...
...
@@ -3,9 +3,9 @@
{% load i18n %}
{% block custom_head_css_js %}
<link
href=
"{% static
"
css
/
plugins
/
select2
/
select2
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static
'css/plugins/select2/select2.min.css'
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
plugins
/
sweetalert
/
sweetalert
.
css
"
%}"
rel=
"stylesheet"
>
<script
src=
"{% static
"
js
/
plugins
/
select2
/
select2
.
full
.
min
.
js
"
%}"
></script>
<script
src=
"{% static
'js/plugins/select2/select2.full.min.js'
%}"
></script>
<script
src=
"{% static "
js
/
plugins
/
sweetalert
/
sweetalert
.
min
.
js
"
%}"
></script>
{% endblock %}
{% block content %}
...
...
apps/ops/templates/ops/task_detail.html
View file @
1888c698
...
...
@@ -3,9 +3,9 @@
{% load i18n %}
{% block custom_head_css_js %}
<link
href=
"{% static
"
css
/
plugins
/
select2
/
select2
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static
'css/plugins/select2/select2.min.css'
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
plugins
/
sweetalert
/
sweetalert
.
css
"
%}"
rel=
"stylesheet"
>
<script
src=
"{% static
"
js
/
plugins
/
select2
/
select2
.
full
.
min
.
js
"
%}"
></script>
<script
src=
"{% static
'js/plugins/select2/select2.full.min.js'
%}"
></script>
<script
src=
"{% static "
js
/
plugins
/
sweetalert
/
sweetalert
.
min
.
js
"
%}"
></script>
{% endblock %}
{% block content %}
...
...
apps/ops/templates/ops/task_history.html
View file @
1888c698
...
...
@@ -3,9 +3,9 @@
{% load i18n %}
{% block custom_head_css_js %}
<link
href=
"{% static
"
css
/
plugins
/
select2
/
select2
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static
'css/plugins/select2/select2.min.css'
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
plugins
/
sweetalert
/
sweetalert
.
css
"
%}"
rel=
"stylesheet"
>
<script
src=
"{% static
"
js
/
plugins
/
select2
/
select2
.
full
.
min
.
js
"
%}"
></script>
<script
src=
"{% static
'js/plugins/select2/select2.full.min.js'
%}"
></script>
<script
src=
"{% static "
js
/
plugins
/
sweetalert
/
sweetalert
.
min
.
js
"
%}"
></script>
{% endblock %}
{% block content %}
...
...
apps/perms/templates/perms/asset_permission_asset.html
View file @
1888c698
...
...
@@ -3,8 +3,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"
>
...
...
apps/perms/templates/perms/asset_permission_detail.html
View file @
1888c698
...
...
@@ -3,8 +3,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 %}
...
...
apps/perms/templates/perms/asset_permission_user.html
View file @
1888c698
...
...
@@ -3,8 +3,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"
>
...
...
apps/templates/_base_create_update.html
View file @
1888c698
...
...
@@ -3,8 +3,8 @@
{% load static %}
{% load bootstrap3 %}
{% 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>
{% block custom_head_css_js_create %} {% endblock %}
{% endblock %}
...
...
apps/templates/_base_list.html
View file @
1888c698
...
...
@@ -3,8 +3,8 @@
{% load i18n %}
{% block custom_head_css_js %}
<link
href=
"{% static "
css
/
plugins
/
datatables
/
datatables
.
min
.
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>
<script
src=
"{% static "
js
/
plugins
/
datatables
/
datatables
.
min
.
js
"
%}"
></script>
{% endblock %}
{% block content %}
...
...
apps/terminal/forms.py
View file @
1888c698
...
...
@@ -12,7 +12,6 @@ class TerminalForm(forms.ModelForm):
model
=
Terminal
fields
=
[
'name'
,
'remote_addr'
,
'ssh_port'
,
'http_port'
,
'comment'
]
help_texts
=
{
'remote_addr'
:
_
(
'A unique addr of every terminal, user browser can arrive it'
),
'ssh_port'
:
_
(
"Coco ssh listen port"
),
'http_port'
:
_
(
"Coco http/ws listen port"
),
}
...
...
apps/terminal/templates/terminal/session_detail.html
View file @
1888c698
...
...
@@ -45,9 +45,9 @@
<thead>
<tr>
<th
data-toggle=
"true"
>
ID
</th>
<th>
Command
</th>
<th>
{% trans 'Command' %}
</th>
<th
data-hide=
"all"
></th>
<th>
Datetime
</th>
<th>
{% trans 'Datetime' %}
</th>
</tr>
</thead>
<tbody>
...
...
@@ -84,24 +84,24 @@
<table
class=
"table"
>
<tbody>
{% if object.is_finished %}
<tr>
<td
class=
"no-borders"
>
{% trans 'Replay session' %}:
</td>
<td
class=
"no-borders"
>
<tr
class=
"no-borders-tr"
>
<td>
{% trans 'Replay session' %}:
</td>
<td>
<span
class=
"pull-right"
>
<button
type=
"button"
class=
"btn btn-primary btn-xs"
id=
"btn_reset_password"
style=
"width: 54px"
>
{% trans 'Go' %}
</button>
<button
type=
"button"
onclick=
"window.open('/luna/replay/{{ object.id }}','luna', 'height=600, width=800, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')"
class=
"btn btn-primary btn-xs"
id=
"btn_reset_password"
style=
"width: 54px"
>
{% trans 'Go' %}
</button>
</span>
</td>
</tr>
{% else %}
<
tr
>
<
td
class=
"no-borders"
>
{% trans 'Monitor session' %}:
</td
>
<
td
class=
"no-borders"
>
<
span
class=
"pull-right"
>
<
button
type=
"button"
class=
"btn btn-primary btn-xs "
style=
"width: 54px"
>
{% trans 'Go' %}
</button
>
<
/span
>
<
/td
>
<
/tr
>
<tr>
<
!--<tr>--
>
<
!--<td class="no-borders" >{% trans 'Monitor session' %}:</td>--
>
<
!--<td class="no-borders" >--
>
<
!--<span class="pull-right">--
>
<
!--<button type="button" class="btn btn-primary btn-xs " style="width: 54px">{% trans 'Go' %}</button>--
>
<
!--</span>--
>
<
!--</td>--
>
<
!--</tr>--
>
<tr
class=
"no-borders-tr"
>
<td>
{% trans 'Terminate session' %}:
</td>
<td>
<span
class=
"pull-right"
>
...
...
apps/terminal/templates/terminal/session_list.html
View file @
1888c698
...
...
@@ -97,7 +97,7 @@
{% if session.is_finished %}
<a
onclick=
"window.open('/luna/replay/{{ session.id }}','luna', 'height=600, width=800, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')"
class=
"btn btn-xs btn-warning btn-replay"
>
{% trans "Replay" %}
</a>
{% else %}
<
a
onclick=
"window.open('/luna/monitor/{{ session.id }}','luna', 'height=600, width=800, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')"
class=
"btn btn-xs btn-warning btn-monitor"
>
{% trans "Monitor" %}
</a
>
<
!--<a onclick="window.open('/luna/monitor/{{ session.id }}','luna', 'height=600, width=800, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=no, status=no')" class="btn btn-xs btn-warning btn-monitor" >{% trans "Monitor" %}</a>--
>
<a
class=
"btn btn-xs btn-danger btn-term"
value=
"{{ session.id }}"
terminal=
"{{ session.terminal.id }}"
>
{% trans "Terminate" %}
</a>
{% endif %}
</td>
...
...
apps/terminal/templates/terminal/terminal_update.html
View file @
1888c698
...
...
@@ -3,8 +3,8 @@
{% load static %}
{% load bootstrap3 %}
{% 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>
<link
href=
"{% static "
css
/
plugins
/
datepicker
/
datepicker3
.
css
"
%}"
rel=
"stylesheet"
>
{% endblock %}
...
...
apps/users/templates/users/user_detail.html
View file @
1888c698
...
...
@@ -3,9 +3,9 @@
{% load i18n %}
{% block custom_head_css_js %}
<link
href=
"{% static
"
css
/
plugins
/
select2
/
select2
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static
'css/plugins/select2/select2.min.css'
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
plugins
/
sweetalert
/
sweetalert
.
css
"
%}"
rel=
"stylesheet"
>
<script
src=
"{% static
"
js
/
plugins
/
select2
/
select2
.
full
.
min
.
js
"
%}"
></script>
<script
src=
"{% static
'js/plugins/select2/select2.full.min.js'
%}"
></script>
<script
src=
"{% static "
js
/
plugins
/
sweetalert
/
sweetalert
.
min
.
js
"
%}"
></script>
{% endblock %}
{% block content %}
...
...
apps/users/templates/users/user_group_create_update.html
View file @
1888c698
...
...
@@ -3,8 +3,8 @@
{% load i18n %}
{% load bootstrap3 %}
{% 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 %}
...
...
apps/users/templates/users/user_group_detail.html
View file @
1888c698
...
...
@@ -3,11 +3,11 @@
{% load i18n %}
{% block custom_head_css_js %}
<link
href=
"{% static
"
css
/
plugins
/
select2
/
select2
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static
'css/plugins/select2/select2.min.css'
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
plugins
/
sweetalert
/
sweetalert
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
plugins
/
datatables
/
datatables
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<link
href=
"{% static "
css
/
plugins
/
awesome-bootstrap-checkbox
/
awesome-bootstrap-checkbox
.
css
"
%}"
rel=
"stylesheet"
>
<script
src=
"{% static
"
js
/
plugins
/
select2
/
select2
.
full
.
min
.
js
"
%}"
></script>
<script
src=
"{% static
'js/plugins/select2/select2.full.min.js'
%}"
></script>
<script
src=
"{% static "
js
/
plugins
/
sweetalert
/
sweetalert
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
js
/
plugins
/
datatables
/
datatables
.
min
.
js
"
%}"
></script>
{% endblock %}
...
...
apps/users/templates/users/user_group_granted_asset.html
View file @
1888c698
...
...
@@ -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"
>
...
...
apps/users/views/login.py
View file @
1888c698
...
...
@@ -82,6 +82,7 @@ class UserLogoutView(TemplateView):
context
=
{
'title'
:
_
(
'Logout success'
),
'messages'
:
_
(
'Logout success, return login page'
),
'interval'
:
1
,
'redirect_url'
:
reverse
(
'users:login'
),
'auto_redirect'
:
True
,
}
...
...
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