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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
184 additions
and
104 deletions
+184
-104
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
+0
-0
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
This diff is collapsed.
Click to expand it.
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