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
bcc065eb
Commit
bcc065eb
authored
Apr 07, 2017
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Compat] compat py3 change bootstrap form to bootstrap3
parent
a320b9e0
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
161 additions
and
161 deletions
+161
-161
terminal_modal_accept.html
...cations/templates/applications/terminal_modal_accept.html
+6
-6
terminal_update.html
.../applications/templates/applications/terminal_update.html
+6
-6
_asset_bulk_update_modal.html
apps/assets/templates/assets/_asset_bulk_update_modal.html
+1
-1
_asset_group_bulk_update_modal.html
...sets/templates/assets/_asset_group_bulk_update_modal.html
+1
-1
_system_user.html
apps/assets/templates/assets/_system_user.html
+10
-10
admin_user_create_update.html
apps/assets/templates/assets/admin_user_create_update.html
+7
-7
asset_create.html
apps/assets/templates/assets/asset_create.html
+12
-12
asset_group_create.html
apps/assets/templates/assets/asset_group_create.html
+4
-9
asset_modal_update.html
apps/assets/templates/assets/asset_modal_update.html
+18
-18
asset_update.html
apps/assets/templates/assets/asset_update.html
+17
-17
idc_create_update.html
apps/assets/templates/assets/idc_create_update.html
+8
-8
system_user_update.html
apps/assets/templates/assets/system_user_update.html
+3
-3
utils.py
apps/audits/utils.py
+1
-3
settings.py
apps/jumpserver/settings.py
+11
-1
asset_permission_create_update.html
...perms/templates/perms/asset_permission_create_update.html
+6
-6
_user.html
apps/users/templates/users/_user.html
+9
-9
first_login.html
apps/users/templates/users/first_login.html
+1
-1
first_login_done.html
apps/users/templates/users/first_login_done.html
+1
-1
user_asset_permission.html
apps/users/templates/users/user_asset_permission.html
+1
-1
user_create.html
apps/users/templates/users/user_create.html
+2
-2
user_granted_asset.html
apps/users/templates/users/user_granted_asset.html
+1
-1
user_group_asset_permission.html
apps/users/templates/users/user_group_asset_permission.html
+1
-1
user_group_create_update.html
apps/users/templates/users/user_group_create_update.html
+3
-3
user_group_granted_asset.html
apps/users/templates/users/user_group_granted_asset.html
+1
-1
user_password_update.html
apps/users/templates/users/user_password_update.html
+4
-4
user_profile_update.html
apps/users/templates/users/user_profile_update.html
+6
-6
user_pubkey_update.html
apps/users/templates/users/user_pubkey_update.html
+2
-2
requirements.txt
requirements/requirements.txt
+18
-21
No files found.
apps/applications/templates/applications/terminal_modal_accept.html
View file @
bcc065eb
...
...
@@ -4,15 +4,15 @@
{% block modal_class %}modal-lg{% endblock %}
{% block modal_title%}{% trans "Accept terminal registration" %}{% endblock %}
{% block modal_body %}
{% load bootstrap %}
{% load bootstrap
3
%}
<form
action=
"{% url 'applications:terminal-modal-accept' pk="
99991937
"
%}"
method=
"post"
class=
"form-horizontal"
id=
"form_terminal_accept"
enctype=
"multipart/form-data"
>
{% csrf_token %}
<p
class=
"alert alert-danger"
id=
"modal-error"
style=
"display: none"
></p>
{
{ form.name|bootstrap_horizontal }
}
{
{ form.remote_addr|bootstrap_horizontal }
}
{
{ form.type|bootstrap_horizontal }
}
{
{ form.url|bootstrap_horizontal }
}
{
{ form.comment|bootstrap_horizontal }
}
{
% bootstrap_field form.name layout="horizontal" %
}
{
% bootstrap_field form.remote_addr layout="horizontal" %
}
{
% bootstrap_field form.type layout="horizontal" %
}
{
% bootstrap_field form.url layout="horizontal" %
}
{
% bootstrap_field form.comment layout="horizontal" %
}
</form>
{% endblock %}
...
...
apps/applications/templates/applications/terminal_update.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% 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>
...
...
@@ -31,14 +31,14 @@
<form
method=
"post"
class=
"form-horizontal"
action=
""
enctype=
"multipart/form-data"
>
{% csrf_token %}
<h3>
{% trans 'Info' %}
</h3>
{
{ form.name|bootstrap_horizontal }
}
{
{ form.remote_addr|bootstrap_horizontal }
}
{
{ form.type|bootstrap_horizontal }
}
{
{ form.url|bootstrap_horizontal }
}
{
% bootstrap_field form.name layout="horizontal" %
}
{
% bootstrap_field form.remote_addr layout="horizontal" %
}
{
% bootstrap_field form.type layout="horizontal" %
}
{
% bootstrap_field form.url layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Other' %}
</h3>
{
{ form.comment|bootstrap_horizontal }
}
{
% bootstrap_field form.comment layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-2"
>
...
...
apps/assets/templates/assets/_asset_bulk_update_modal.html
View file @
bcc065eb
...
...
@@ -4,7 +4,7 @@
{% block modal_class %}modal-lg{% endblock %}
{% block modal_title%}{% trans "Update Asset" %}{% endblock %}
{% block modal_body %}
{% load bootstrap %}
{% load bootstrap
3
%}
<p
class=
"text-success text-center"
>
{% trans "Hint: only change the field you want to update." %}
</p>
<div
class=
"ydxbd"
id=
"ydxbd"
style=
"display: block;"
>
<div>
...
...
apps/assets/templates/assets/_asset_group_bulk_update_modal.html
View file @
bcc065eb
...
...
@@ -4,7 +4,7 @@
{% block modal_class %}modal-lg{% endblock %}
{% block modal_title%}{% trans "Update Asset Group" %}{% endblock %}
{% block modal_body %}
{% load bootstrap %}
{% load bootstrap
3
%}
<p
class=
"text-success text-center"
>
{% trans "Hint: only change the field you want to update." %}
</p>
<form
method=
"post"
class=
"form-horizontal"
action=
""
id=
"fm_asset_group_bulk_update"
>
...
...
apps/assets/templates/assets/_system_user.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% 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>
...
...
@@ -40,14 +40,14 @@
</div>
{% endif %}
<h3>
{% trans 'Basic' %}
</h3>
{
{ form.name|bootstrap_horizontal }
}
{
{ form.username|bootstrap_horizontal }
}
{
{ form.protocol|bootstrap_horizontal }
}
{
% bootstrap_field form.name layout="horizontal" %
}
{
% bootstrap_field form.username layout="horizontal" %
}
{
% bootstrap_field form.protocol layout="horizontal" %
}
<h3>
{% trans 'Auth' %}
</h3>
{
{ form.auth_method|bootstrap_horizontal }
}
{
% bootstrap_field form.auth_method layout="horizontal" %
}
{% block auth %}
<div
class=
"password-auth hidden"
>
{
{ form.password|bootstrap_horizontal }
}
{
% bootstrap_field form.password layout="horizontal" %
}
</div>
<div
class=
"public-key-auth"
>
<div
class=
"form-group"
>
...
...
@@ -57,7 +57,7 @@
</div>
</div>
<div>
{
{ form.private_key_file|bootstrap_horizontal }
}
{
% bootstrap_field form.private_key_file layout="horizontal" %
}
</div>
</div>
{% endblock %}
...
...
@@ -68,9 +68,9 @@
</div>
</div>
<h3>
{% trans 'Other' %}
</h3>
{
{ form.sudo|bootstrap_horizontal }
}
{
{ form.shell|bootstrap_horizontal }
}
{
{ form.comment|bootstrap_horizontal }
}
{
% bootstrap_field form.sudo layout="horizontal" %
}
{
% bootstrap_field form.shell layout="horizontal" %
}
{
% bootstrap_field form.comment layout="horizontal" %
}
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-2"
>
<button
class=
"btn btn-white"
type=
"reset"
>
{% trans 'Reset' %}
</button>
...
...
apps/assets/templates/assets/admin_user_create_update.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% 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>
...
...
@@ -34,12 +34,12 @@
{% endif %}
<form
enctype=
"multipart/form-data"
method=
"post"
class=
"form-horizontal"
action=
""
>
{% csrf_token %}
{
{ form.name|bootstrap_horizontal }
}
{
{ form.username|bootstrap_horizontal }
}
{
{ form.password|bootstrap_horizontal }
}
{
{ form.private_key_file|bootstrap_horizontal }
}
{
{ form.assets|bootstrap_horizontal }
}
{
{ form.comment|bootstrap_horizontal }
}
{
% bootstrap_field form.name layout="horizontal" %
}
{
% bootstrap_field form.username layout="horizontal" %
}
{
% bootstrap_field form.password layout="horizontal" %
}
{
% bootstrap_field form.private_key_file layout="horizontal" %
}
{
% bootstrap_field form.assets layout="horizontal" %
}
{
% bootstrap_field form.comment layout="horizontal" %
}
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-2"
>
...
...
apps/assets/templates/assets/asset_create.html
View file @
bcc065eb
{% extends '_base_create_update.html' %}
{% load static %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% load i18n %}
{% block form %}
...
...
@@ -12,26 +12,26 @@
{% endif %}
{% csrf_token %}
<h3>
{% trans 'Basic' %}
</h3>
{
{ form.hostname|bootstrap_horizontal }
}
{
{ form.ip|bootstrap_horizontal }
}
{
{ form.public_ip|bootstrap_horizontal }
}
{
{ form.port|bootstrap_horizontal }
}
{
{ form.type|bootstrap_horizontal }
}
{
{ form.env|bootstrap_horizontal }
}
{
% bootstrap_field form.hostname layout="horizontal" %
}
{
% bootstrap_field form.ip layout="horizontal" %
}
{
% bootstrap_field form.public_ip layout="horizontal" %
}
{
% bootstrap_field form.port layout="horizontal" %
}
{
% bootstrap_field form.type layout="horizontal" %
}
{
% bootstrap_field form.env layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Group' %}
</h3>
{
{ form.idc|bootstrap_horizontal }
}
{
{ form.groups|bootstrap_horizontal }
}
{
% bootstrap_field form.idc layout="horizontal" %
}
{
% bootstrap_field form.groups layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Asset user' %}
</h3>
{
{ form.admin_user|bootstrap_horizontal }
}
{
% bootstrap_field form.admin_user layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Other' %}
</h3>
{
{ form.comment|bootstrap_horizontal }
}
{
{ form.is_active|bootstrap_horizontal }
}
{
% bootstrap_field form.comment layout="horizontal" %
}
{
% bootstrap_field form.is_active layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
...
...
apps/assets/templates/assets/asset_group_create.html
View file @
bcc065eb
...
...
@@ -2,7 +2,6 @@
{% load i18n %}
{% load static %}
{% load bootstrap3 %}
{#{% load bootstrap %}#}
{% 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>
...
...
@@ -35,15 +34,13 @@
<form
id=
"groupForm"
method=
"post"
class=
"form-horizontal"
>
{% csrf_token %}
<h3
class=
"widget-head-color-box"
>
资产组信息
</h3>
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.comment layout="horizontal" %}
{# {{ form.name|bootstrap_horizontal }}#}
{# {{ form.comment|bootstrap_horizontal }}#}
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.comment layout="horizontal" %}
<div
class=
"hr-line-dashed"
></div>
<h3
class=
"widget-head-color-box"
>
用户选择的资产
</h3>
<div
class=
"form-group"
>
<label
class=
"col-sm-
3
control-label"
id=
"asset_on_count"
>
已选({{ assets_count }})
</label>
<div
class=
"col-sm-
8
"
id=
"asset_sed"
>
<label
class=
"col-sm-
2
control-label"
id=
"asset_on_count"
>
已选({{ assets_count }})
</label>
<div
class=
"col-sm-
9
"
id=
"asset_sed"
>
<div
class=
"form-asset-on"
id=
"add_asset"
>
<p
id=
"asset_on_p"
>
{% for asset in assets_on_list %}
...
...
@@ -54,8 +51,6 @@
</div>
</div>
<div
class=
"hr-line-dashed"
></div>
{#
<h3
class=
"widget-head-color-box"
>
资产用户
</h3>
#}
{# {{ form.system_users|bootstrap_horizontal }}#}
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-5"
>
<button
class=
"btn btn-white"
type=
"reset"
>
重置
</button>
...
...
apps/assets/templates/assets/asset_modal_update.html
View file @
bcc065eb
{% extends '_base_create_update.html' %}
{% load static %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% load i18n %}
{% block form %}
<div
style=
"display:none"
id=
"ridd"
>
{
{ form.port|bootstrap_horizontal }
}
{
{ form.type|bootstrap_horizontal }
}
{
{ form.idc|bootstrap_horizontal }
}
{
{ form.groups|bootstrap_horizontal }
}
{
{ form.admin_user|bootstrap_horizontal }
}
{
{ form.system_users|bootstrap_horizontal }
}
{
{ form.brand|bootstrap_horizontal }
}
{
{ form.cpu|bootstrap_horizontal }
}
{
{ form.memory|bootstrap_horizontal }
}
{
{ form.disk|bootstrap_horizontal }
}
{
{ form.os|bootstrap_horizontal }
}
{
{ form.cabinet_no|bootstrap_horizontal }
}
{
{ form.cabinet_pos|bootstrap_horizontal }
}
{
{ form.status|bootstrap_horizontal }
}
{
{ form.env|bootstrap_horizontal }
}
{
{ form.tags|bootstrap_horizontal }
}
{
{ form.comment|bootstrap_horizontal }
}
{
% bootstrap_field form.port layout="horizontal" %
}
{
% bootstrap_field form.type layout="horizontal" %
}
{
% bootstrap_field form.idc layout="horizontal" %
}
{
% bootstrap_field form.groups layout="horizontal" %
}
{
% bootstrap_field form.admin_user layout="horizontal" %
}
{
% bootstrap_field form.system_users layout="horizontal" %
}
{
% bootstrap_field form.brand layout="horizontal" %
}
{
% bootstrap_field form.cpu layout="horizontal" %
}
{
% bootstrap_field form.memory layout="horizontal" %
}
{
% bootstrap_field form.disk layout="horizontal" %
}
{
% bootstrap_field form.os layout="horizontal" %
}
{
% bootstrap_field form.cabinet_no layout="horizontal" %
}
{
% bootstrap_field form.cabinet_pos layout="horizontal" %
}
{
% bootstrap_field form.status layout="horizontal" %
}
{
% bootstrap_field form.env layout="horizontal" %
}
{
% bootstrap_field form.tags layout="horizontal" %
}
{
% bootstrap_field form.comment layout="horizontal" %
}
</div>
<div
class=
"hr-line-dashed"
></div>
<form
action=
""
class=
"form-horizontal"
>
...
...
apps/assets/templates/assets/asset_update.html
View file @
bcc065eb
{% extends '_base_create_update.html' %}
{% load static %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% load i18n %}
{% block custom_head_css_js_create %}
...
...
@@ -17,37 +17,37 @@
{% endif %}
{% csrf_token %}
<h3>
{% trans 'Basic' %}
</h3>
{
{ form.hostname|bootstrap_horizontal }
}
{
{ form.ip|bootstrap_horizontal }
}
{
{ form.public_ip|bootstrap_horizontal }
}
{
{ form.port|bootstrap_horizontal }
}
{
{ form.type|bootstrap_horizontal }
}
{
% bootstrap_field form.hostname layout="horizontal" %
}
{
% bootstrap_field form.ip layout="horizontal" %
}
{
% bootstrap_field form.public_ip layout="horizontal" %
}
{
% bootstrap_field form.port layout="horizontal" %
}
{
% bootstrap_field form.type layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Group' %}
</h3>
{
{ form.idc|bootstrap_horizontal }
}
{
{ form.groups|bootstrap_horizontal }
}
{
% bootstrap_field form.idc layout="horizontal" %
}
{
% bootstrap_field form.groups layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Asset user' %}
</h3>
{
{ form.admin_user|bootstrap_horizontal }
}
{
% bootstrap_field form.admin_user layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Configuration' %}
</h3>
{
{ form.number|bootstrap_horizontal }
}
{
{ form.remote_card_ip|bootstrap_horizontal }
}
{
% bootstrap_field form.number layout="horizontal" %
}
{
% bootstrap_field form.remote_card_ip layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Location' %}
</h3>
{
{ form.cabinet_no|bootstrap_horizontal }
}
{
{ form.cabinet_pos|bootstrap_horizontal }
}
{
% bootstrap_field form.cabinet_no layout="horizontal" %
}
{
% bootstrap_field form.cabinet_pos layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Other' %}
</h3>
{
{ form.status|bootstrap_horizontal }
}
{
{ form.env|bootstrap_horizontal }
}
{
{ form.comment|bootstrap_horizontal }
}
{
{ form.is_active|bootstrap_horizontal }
}
{
% bootstrap_field form.status layout="horizontal" %
}
{
% bootstrap_field form.env layout="horizontal" %
}
{
% bootstrap_field form.comment layout="horizontal" %
}
{
% bootstrap_field form.is_active layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
...
...
apps/assets/templates/assets/idc_create_update.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% 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>
...
...
@@ -34,16 +34,16 @@
<form
id=
"IDCForm"
method=
"post"
class=
"form-horizontal"
>
{% csrf_token %}
<h3
class=
"widget-head-color-box"
>
基本信息
</h3>
{
{ form.name|bootstrap_horizontal }
}
{
{ form.address|bootstrap_horizontal }
}
{
{ form.contact|bootstrap_horizontal }
}
{
{ form.phone|bootstrap_horizontal }
}
{
% bootstrap_field form.name layout="horizontal" %
}
{
% bootstrap_field form.address layout="horizontal" %
}
{
% bootstrap_field form.contact layout="horizontal" %
}
{
% bootstrap_field form.phone layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<h3
class=
"widget-head-color-box"
>
IP段
</h3>
{
{ form.operator|bootstrap_horizontal }
}
{
{ form.intranet|bootstrap_horizontal }
}
{
{ form.extranet|bootstrap_horizontal }
}
{
% bootstrap_field form.operator layout="horizontal" %
}
{
% bootstrap_field form.intranet layout="horizontal" %
}
{
% bootstrap_field form.extranet layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
...
...
apps/assets/templates/assets/system_user_update.html
View file @
bcc065eb
{% extends 'assets/_system_user.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% block auth %}
<div
class=
"password-auth hidden"
>
{
{ form.password|bootstrap_horizontal }
}
{
% bootstrap_field form.password layout="horizontal" %
}
</div>
<div
class=
"public-key-auth"
>
<div>
{
{ form.private_key_file|bootstrap_horizontal }
}
{
% bootstrap_field form.private_key_file layout="horizontal" %
}
</div>
</div>
{% endblock %}
apps/audits/utils.py
View file @
bcc065eb
# ~*~ coding: utf-8 ~*~
#
from
__future__
import
unicode_literals
import
requests
import
ipaddress
...
...
@@ -10,7 +9,7 @@ from .models import LoginLog
def
validate_ip
(
ip
):
try
:
ipaddress
.
ip_address
(
ip
.
decode
(
'utf-8'
)
)
ipaddress
.
ip_address
(
ip
)
return
True
except
ValueError
:
print
(
'valid error'
)
...
...
@@ -35,7 +34,6 @@ def get_ip_city(ip, timeout=10):
url
=
'http://int.dpool.sina.com.cn/iplookup/iplookup.php?ip=
%
s&format=json'
%
ip
try
:
r
=
requests
.
get
(
url
,
timeout
=
timeout
)
print
(
r
)
except
requests
.
Timeout
:
r
=
None
city
=
'Unknown'
...
...
apps/jumpserver/settings.py
View file @
bcc065eb
...
...
@@ -59,7 +59,6 @@ INSTALLED_APPS = [
'common.apps.CommonConfig'
,
'applications.apps.ApplicationsConfig'
,
'rest_framework'
,
'bootstrapform'
,
'bootstrap3'
,
'captcha'
,
'django.contrib.auth'
,
...
...
@@ -334,3 +333,13 @@ CAPTCHA_TEST_MODE = CONFIG.CAPTCHA_TEST_MODE
COMMAND_STORE_BACKEND
=
'audits.backends.command.db'
RECORD_STORE_BACKEND
=
'audits.backends.record.db'
# Django bootstrap3 setting, more see http://django-bootstrap3.readthedocs.io/en/latest/settings.html
BOOTSTRAP3
=
{
'horizontal_label_class'
:
'col-md-2'
,
# Field class to use in horizontal forms
'horizontal_field_class'
:
'col-md-9'
,
# Set placeholder attributes to label if no placeholder is provided
'set_placeholder'
:
True
,
}
\ No newline at end of file
apps/perms/templates/perms/asset_permission_create_update.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% 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>
...
...
@@ -31,15 +31,15 @@
<form
method=
"post"
class=
"form-horizontal"
action=
""
>
{% csrf_token %}
<h3>
{% trans 'Name' %}
</h3>
{
{ form.name|bootstrap_horizontal }
}
{
% bootstrap_field form.name layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'User' %}
</h3>
{
{ form.users|bootstrap_horizontal }
}
{
{ form.user_groups|bootstrap_horizontal }
}
{
% bootstrap_field form.users layout="horizontal" %
}
{
% bootstrap_field form.user_groups layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Asset' %}
</h3>
{{ form.assets|bootstrap_horizontal|safe }}
{
{ form.asset_groups|bootstrap_horizontal }
}
{
% bootstrap_field form.asset_groups layout="horizontal" %
}
{{ form.system_users |bootstrap_horizontal }}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Other' %}
</h3>
...
...
@@ -60,7 +60,7 @@
<span
class=
"help-block "
>
{{ form.date_expired.errors }}
</span>
</div>
</div>
{
{ form.comment|bootstrap_horizontal }
}
{
% bootstrap_field form.comment layout="horizontal" %
}
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-2"
>
...
...
apps/users/templates/users/_user.html
View file @
bcc065eb
{% extends '_base_create_update.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% block form %}
{% if form.non_field_errors %}
<div
class=
"alert alert-danger"
>
...
...
@@ -11,17 +11,17 @@
<form
method=
"post"
class=
"form-horizontal"
action=
""
enctype=
"multipart/form-data"
>
{% csrf_token %}
<h3>
{% trans 'Account' %}
</h3>
{
{ form.username|bootstrap_horizontal }
}
{
{ form.name|bootstrap_horizontal }
}
{
{ form.email|bootstrap_horizontal }
}
{
{ form.groups|bootstrap_horizontal }
}
{
% bootstrap_field form.username layout="horizontal" %
}
{
% bootstrap_field form.name layout="horizontal" %
}
{
% bootstrap_field form.email layout="horizontal" %
}
{
% bootstrap_field form.groups layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
{% block password %} {% endblock %}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Security and Role' %}
</h3>
{
{ form.role|bootstrap_horizontal }
}
{
% bootstrap_field form.role layout="horizontal" %
}
<div
class=
"form-group {% if form.date_expired.errors %} has-error {% endif %}"
id=
"date_5"
>
<label
for=
"{{ form.date_expired.id_for_label }}"
class=
"col-sm-2 control-label"
>
{{ form.date_expired.label }}
</label>
<div
class=
"col-sm-9"
>
...
...
@@ -40,9 +40,9 @@
</div>
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Profile' %}
</h3>
{
{ form.phone|bootstrap_horizontal }
}
{
{ form.wechat|bootstrap_horizontal }
}
{
{ form.comment|bootstrap_horizontal }
}
{
% bootstrap_field form.phone layout="horizontal" %
}
{
% bootstrap_field form.wechat layout="horizontal" %
}
{
% bootstrap_field form.comment layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-2"
>
...
...
apps/users/templates/users/first_login.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% load bootstrap
%}
{% load bootstrap
3 %}
{% block custom_head_css_js %}
...
...
apps/users/templates/users/first_login_done.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% load bootstrap
%}
{% load bootstrap
3 %}
{% block custom_head_css_js %}
...
...
apps/users/templates/users/user_asset_permission.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% load static %}
{% load i18n %}
...
...
apps/users/templates/users/user_create.html
View file @
bcc065eb
{% extends 'users/_user.html' %}
{% load i18n %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% block user_template_title %}{% trans "Create user" %}{% endblock %}
{#{% block username %}#}
{# {
{ form.username|bootstrap_horizontal }
}#}
{# {
% bootstrap_field form.username layout="horizontal" %
}#}
{#{% endblock %}#}
{% block password %}
<h3>
{% trans 'Password' %}
</h3>
...
...
apps/users/templates/users/user_granted_asset.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% load static %}
{% load i18n %}
...
...
apps/users/templates/users/user_group_asset_permission.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% load static %}
{% load i18n %}
...
...
apps/users/templates/users/user_group_create_update.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% 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>
...
...
@@ -23,7 +23,7 @@
{% endif %}
<form
method=
"post"
class=
"form-horizontal"
action=
""
>
{% csrf_token %}
{
{ form.name|bootstrap_horizontal }
}
{
% bootstrap_field form.name layout="horizontal" %
}
<div
class=
"form-group"
>
<label
for=
"users"
class=
"col-sm-2 control-label"
>
{% trans 'Users' %}
</label>
<div
class=
"col-sm-9"
>
...
...
@@ -38,7 +38,7 @@
</select>
</div>
</div>
{
{ form.comment|bootstrap_horizontal }
}
{
% bootstrap_field form.comment layout="horizontal" %
}
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-2"
>
<button
class=
"btn btn-white"
type=
"reset"
>
{% trans 'Cancel' %}
</button>
...
...
apps/users/templates/users/user_group_granted_asset.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% load static %}
{% load i18n %}
...
...
apps/users/templates/users/user_password_update.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% block custom_head_css_js %}
<link
href=
"{% static "
css
/
plugins
/
cropper
/
cropper
.
min
.
css
"
%}"
rel=
"stylesheet"
>
...
...
@@ -48,9 +48,9 @@
<div
class=
"wrapper wrapper-content animated fadeInRight"
>
<form
method=
"post"
class=
"form-horizontal"
action=
""
enctype=
"multipart/form-data"
>
{% csrf_token %}
{
{ form.old_password|bootstrap_horizontal}
}
{
{ form.new_password|bootstrap_horizontal }
}
{
{ form.confirm_password|bootstrap_horizontal }
}
{
% bootstrap_field form.old_password layout="horizontal" %
}
{
% bootstrap_field form.new_password layout="horizontal" %
}
{
% bootstrap_field form.confirm_password layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
...
...
apps/users/templates/users/user_profile_update.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% block custom_head_css_js %}
<link
href=
"{% static "
css
/
plugins
/
cropper
/
cropper
.
min
.
css
"
%}"
rel=
"stylesheet"
>
...
...
@@ -49,14 +49,14 @@
<form
method=
"post"
class=
"form-horizontal"
action=
""
enctype=
"multipart/form-data"
>
{% csrf_token %}
<h3>
{% trans 'Account' %}
</h3>
{
{ form.username|bootstrap_horizontal }
}
{
{ form.name|bootstrap_horizontal }
}
{
{ form.email|bootstrap_horizontal }
}
{
% bootstrap_field form.username layout="horizontal" %
}
{
% bootstrap_field form.name layout="horizontal" %
}
{
% bootstrap_field form.email layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<h3>
{% trans 'Profile' %}
</h3>
{
{ form.phone|bootstrap_horizontal }
}
{
{ form.wechat|bootstrap_horizontal }
}
{
% bootstrap_field form.phone layout="horizontal" %
}
{
% bootstrap_field form.wechat layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-2"
>
...
...
apps/users/templates/users/user_pubkey_update.html
View file @
bcc065eb
{% extends 'base.html' %}
{% load static %}
{% load i18n %}
{% load bootstrap %}
{% load bootstrap
3
%}
{% block custom_head_css_js %}
<link
href=
"{% static "
css
/
plugins
/
cropper
/
cropper
.
min
.
css
"
%}"
rel=
"stylesheet"
>
...
...
@@ -62,7 +62,7 @@
</div>
</div>
<h3>
{% trans 'Update public key' %}
</h3>
{
{ form.public_key|bootstrap_horizontal}
}
{
% bootstrap_field form.public_key layout="horizontal" %
}
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-2"
>
...
...
requirements/requirements.txt
View file @
bcc065eb
Django==1.10
django-bootstrap-form==3.2.1
logging==0.4.9.6
Pillow==4.0.0
djangorestframework==3.5.3
ForgeryPy==0.1
Django
django-bootstrap3
Pillow
djangorestframework
ForgeryPy
openpyxl==2.4.0
celery==3.1.23
paramiko==2.1.1
ansible==2.2.2.0
django-simple-captcha==0.5.2
django-formtools==1.0
sshpubkeys==2.2.0
djangorestframework-bulk==0.2.1
django-redis-cache==1.7.1
requests==2.11.1
itsdangerous==0.24
#python-gssapi==0.6.4
tornado==4.4.2
eventlet==0.20.1
django-filter==1.0.0
passlib==1.7.1
celery
paramiko
ansible
django-simple-captcha
django-formtools
sshpubkeys
djangorestframework-bulk
django-redis-cache
requests
itsdangerous
eventlet
django-filter
passlib
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