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
acf508f0
Commit
acf508f0
authored
Jan 11, 2015
by
halcyon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产管理页面基本完成.
parent
94beae52
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
444 additions
and
71 deletions
+444
-71
urls.py
jasset/urls.py
+7
-4
views.py
jasset/views.py
+61
-39
jumpserver.conf
jumpserver.conf
+4
-4
jadd.html
templates/jasset/jadd.html
+23
-11
jadd_group.html
templates/jasset/jadd_group.html
+107
-0
jadd_idc.html
templates/jasset/jadd_idc.html
+107
-0
jlist.html
templates/jasset/jlist.html
+1
-1
jlist_group.html
templates/jasset/jlist_group.html
+60
-0
jlist_idc.html
templates/jasset/jlist_idc.html
+60
-0
nav.html
templates/nav.html
+6
-4
script.html
templates/script.html
+8
-8
No files found.
jasset/urls.py
View file @
acf508f0
...
...
@@ -4,8 +4,10 @@ from jasset.views import *
urlpatterns
=
patterns
(
''
,
url
(
r'^$'
,
index
),
url
(
r'jadd'
,
jadd
),
url
(
r'jlist'
,
jlist
),
url
(
r'jadd_idc'
,
jadd_idc
),
url
(
r'jlist_idc'
,
jlist_idc
),
url
(
r'host_add'
,
jadd_host
),
url
(
r'host_list'
,
jlist_host
),
url
(
r'idc_add'
,
jadd_idc
),
url
(
r'idc_list'
,
jlist_idc
),
url
(
r'group_add'
,
jadd_group
),
url
(
r'group_list'
,
jlist_group
),
)
\ No newline at end of file
jasset/views.py
View file @
acf508f0
...
...
@@ -5,9 +5,9 @@ from django.http import HttpResponse
from
django.template
import
RequestContext
from
django.shortcuts
import
render_to_response
from
django.http
import
HttpResponseRedirect
from
django.core.paginator
import
Paginator
,
EmptyPage
,
PageNotAnInteger
from
django.core.paginator
import
Paginator
,
EmptyPage
from
models
import
IDC
,
Asset
,
Group
from
models
import
IDC
,
Asset
,
Bis
Group
from
connect
import
PyCrypt
,
KEY
...
...
@@ -15,14 +15,12 @@ def index(request):
return
render_to_response
(
'jasset/jasset.html'
,
)
def
jadd
(
request
):
global
j_passwd
def
jadd
_host
(
request
):
header_title
,
path1
,
path2
=
'添加主机 | Add Host'
,
'资产管理'
,
'添加主机'
groups
=
[]
cryptor
=
PyCrypt
(
KEY
)
eidc
=
IDC
.
objects
.
all
()
egroup
=
Group
.
objects
.
all
()
is_actived
=
{
'active'
:
1
,
'no_active'
:
0
}
login_typed
=
{
'LDAP'
:
'L'
,
'SSH_KEY'
:
'S'
,
'PASSWORD'
:
'P'
,
'MAP'
:
'M'
}
egroup
=
BisGroup
.
objects
.
all
()
if
request
.
method
==
'POST'
:
j_ip
=
request
.
POST
.
get
(
'j_ip'
)
...
...
@@ -32,27 +30,26 @@ def jadd(request):
j_group
=
request
.
POST
.
getlist
(
'j_group'
)
j_active
=
request
.
POST
.
get
(
'j_active'
)
j_comment
=
request
.
POST
.
get
(
'j_comment'
)
if
j_type
==
'MAP'
:
j_user
=
request
.
POST
.
get
(
'j_user'
)
j_password
=
cryptor
.
encrypt
(
request
.
POST
.
get
(
'j_password'
))
j_root
=
request
.
POST
.
get
(
'j_root'
)
j_passwd
=
cryptor
.
encrypt
(
request
.
POST
.
get
(
'j_passwd'
))
j_idc
=
IDC
.
objects
.
get
(
name
=
j_idc
)
for
group
in
j_group
:
c
=
Group
.
objects
.
get
(
name
=
group
)
c
=
Bis
Group
.
objects
.
get
(
name
=
group
)
groups
.
append
(
c
)
if
Asset
.
objects
.
filter
(
ip
=
str
(
j_ip
)):
emg
=
u'该IP已存在!'
return
render_to_response
(
'jasset/jadd.html'
,
{
'emg'
:
emg
,
'j_ip'
:
j_ip
}
)
return
render_to_response
(
'jasset/jadd.html'
,
locals
(),
context_instance
=
RequestContext
(
request
)
)
elif
j_type
==
'MAP'
:
if
j_type
==
'MAP'
:
j_user
=
request
.
POST
.
get
(
'j_user'
)
j_password
=
cryptor
.
encrypt
(
request
.
POST
.
get
(
'j_password'
))
j_root
=
request
.
POST
.
get
(
'j_root'
)
j_passwd
=
cryptor
.
encrypt
(
request
.
POST
.
get
(
'j_passwd'
))
a
=
Asset
(
ip
=
j_ip
,
port
=
j_port
,
login_type
=
login_typed
[
j_type
]
,
login_type
=
j_type
,
idc
=
j_idc
,
is_active
=
int
(
is_actived
[
j_active
]
),
is_active
=
int
(
j_active
),
comment
=
j_comment
,
username_common
=
j_user
,
password_common
=
j_password
,
...
...
@@ -61,24 +58,19 @@ def jadd(request):
else
:
a
=
Asset
(
ip
=
j_ip
,
port
=
j_port
,
login_type
=
login_typed
[
j_type
]
,
login_type
=
j_type
,
idc
=
j_idc
,
is_active
=
int
(
is_actived
[
j_active
]
),
is_active
=
int
(
j_active
),
comment
=
j_comment
)
a
.
save
()
a
.
group
=
groups
a
.
bis_
group
=
groups
a
.
save
()
return
render_to_response
(
'jasset/jadd.html'
,
{
'header_title'
:
u'添加主机 | Add Host'
,
'path1'
:
'资产管理'
,
'path2'
:
'添加主机'
,
'eidc'
:
eidc
,
'egroup'
:
egroup
,
}
)
return
render_to_response
(
'jasset/jadd.html'
,
locals
(),
context_instance
=
RequestContext
(
request
))
def
jlist
(
request
):
def
jlist_host
(
request
):
header_title
,
path1
,
path2
=
'查看主机 | List Host'
,
'资产管理'
,
'查看主机'
posts
=
contact_list
=
Asset
.
objects
.
all
()
.
order_by
(
'ip'
)
print
posts
paginator
=
Paginator
(
contact_list
,
5
)
...
...
@@ -92,19 +84,49 @@ def jlist(request):
except
(
EmptyPage
,
InvalidPage
):
contacts
=
paginator
.
page
(
paginator
.
num_pages
)
return
render_to_response
(
'jasset/jlist.html'
,
{
"contacts"
:
contacts
,
'p'
:
paginator
,
'posts'
:
posts
,
'header_title'
:
u'查看主机 | List Host'
,
'path1'
:
'资产管理'
,
'path2'
:
'查看主机'
,
},
context_instance
=
RequestContext
(
request
))
return
render_to_response
(
'jasset/jlist.html'
,
locals
(),
context_instance
=
RequestContext
(
request
))
def
jadd_idc
(
request
):
pass
header_title
,
path1
,
path2
=
'添加IDC | Add IDC'
,
'资产管理'
,
'添加IDC'
if
request
.
method
==
'POST'
:
j_idc
=
request
.
POST
.
get
(
'j_idc'
)
j_comment
=
request
.
POST
.
get
(
'j_comment'
)
print
j_idc
,
j_comment
if
IDC
.
objects
.
filter
(
name
=
j_idc
):
emg
=
u'该IDC已存在!'
return
render_to_response
(
'jasset/jadd_idc.html'
,
{
'emg'
:
emg
,
'j_idc'
:
j_idc
,
'j_comment'
:
j_comment
,},
context_instance
=
RequestContext
(
request
))
else
:
IDC
.
objects
.
create
(
name
=
j_idc
,
comment
=
j_comment
)
return
render_to_response
(
'jasset/jadd_idc.html'
,
locals
(),
context_instance
=
RequestContext
(
request
))
def
jlist_idc
(
request
):
pass
\ No newline at end of file
header_title
,
path1
,
path2
=
'查看IDC | List Host'
,
'资产管理'
,
'查看IDC'
posts
=
IDC
.
objects
.
all
()
.
order_by
(
'id'
)
return
render_to_response
(
'jasset/jlist_idc.html'
,
locals
(),
context_instance
=
RequestContext
(
request
))
def
jadd_group
(
request
):
header_title
,
path1
,
path2
=
'添加业务组 | Add Group'
,
'资产管理'
,
'添加业务组'
if
request
.
method
==
'POST'
:
j_group
=
request
.
POST
.
get
(
'j_group'
)
j_comment
=
request
.
POST
.
get
(
'j_comment'
)
if
BisGroup
.
objects
.
filter
(
name
=
j_group
):
emg
=
u'该业务组已存在!'
return
render_to_response
(
'jasset/jadd_group.html'
,
locals
(),
context_instance
=
RequestContext
(
request
))
else
:
BisGroup
.
objects
.
create
(
name
=
j_group
,
comment
=
j_comment
)
return
render_to_response
(
'jasset/jadd_group.html'
,
locals
(),
context_instance
=
RequestContext
(
request
))
def
jlist_group
(
request
):
header_title
,
path1
,
path2
=
'添加业务组 | Add Group'
,
'资产管理'
,
'查看业务组'
posts
=
BisGroup
.
objects
.
all
()
.
order_by
(
'id'
)
return
render_to_response
(
'jasset/jlist_group.html'
,
locals
(),
context_instance
=
RequestContext
(
request
))
\ No newline at end of file
jumpserver.conf
View file @
acf508f0
...
...
@@ -8,10 +8,10 @@ password = mysql234
database
=
jumpserver
[
ldap
]
host_url
=
ldap
://
1
27
.
0
.
0
.
1
:
389
base_dn
=
dc
=
jumpserver
,
dc
=
org
root_dn
=
cn
=
admin
,
dc
=
jumpserver
,
dc
=
org
root_pw
=
secret234
host_url
=
ldap
://
1
92
.
168
.
8
.
60
:
389
base_dn
=
dc
=
fengxing
,
dc
=
org
root_dn
=
cn
=
admin
,
dc
=
fengxing
,
dc
=
org
root_pw
=
123456
[
web
]
key
=
88
aaaf7ffe3c6c04
...
...
templates/jasset/jadd.html
View file @
acf508f0
...
...
@@ -5,7 +5,13 @@
<div
class=
"row"
>
<div
class=
"col-lg-10"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<div
class=
"text-center"
>
<span>
请选择添加内容:
</span>
<a
href=
"#"
class=
"btn btn-xs btn-primary"
id=
"lightVersion"
>
添加主机
</a>
<a
href=
"#"
class=
"btn btn-xs btn-primary"
id=
"darkVersion"
>
添加IDC
</a>
<a
href=
"#"
class=
"btn btn-xs btn-primary"
id=
"leftVersion"
>
添加业务组
</a>
</div>
<div
id=
"ibox-content"
class=
"ibox-title"
>
<h5>
填写主机基本信息
</h5>
<div
class=
"ibox-tools"
>
<a
class=
"collapse-link"
>
...
...
@@ -37,16 +43,16 @@
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
><label
class=
"col-sm-2 control-label"
>
端口号
</label>
<div
class=
"col-sm-8"
><input
type=
"text"
value=
"{{
s
_port }}"
placeholder=
"22"
name=
"j_port"
class=
"form-control"
></div>
<div
class=
"col-sm-8"
><input
type=
"text"
value=
"{{
j
_port }}"
placeholder=
"22"
name=
"j_port"
class=
"form-control"
></div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
><label
class=
"col-sm-2 control-label"
>
登录方式
</label>
<div
class=
"col-sm-8"
>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
checked=
""
value=
"L
DAP
"
name=
"j_type"
onclick=
"show(this)"
>
<i>
LDAP
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
value=
"S
SH_KEY
"
name=
"j_type"
onclick=
"show(this)"
>
<i>
SSH_KEY
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
value=
"P
ASSWORD
"
name=
"j_type"
onclick=
"show(this)"
>
<i>
PASSWORD
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
value=
"M
AP
"
name=
"j_type"
onclick=
"show(this)"
>
<i>
MAP
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
checked=
""
value=
"L"
name=
"j_type"
onclick=
"show(this)"
>
<i>
LDAP
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
value=
"S"
name=
"j_type"
onclick=
"show(this)"
>
<i>
SSH_KEY
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
value=
"P"
name=
"j_type"
onclick=
"show(this)"
>
<i>
PASSWORD
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
value=
"M"
name=
"j_type"
onclick=
"show(this)"
>
<i>
MAP
</i></label></div>
</div>
<div
name=
"a1"
id=
a1
style=
"display:none;"
>
...
...
@@ -98,14 +104,14 @@
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
><label
class=
"col-sm-2 control-label"
>
是否激活
</label>
<div
class=
"col-sm-8"
>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
checked=
""
value=
"
active
"
name=
"j_active"
>
<i>
激活
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
value=
"
no_active
"
name=
"j_active"
>
<i>
禁用
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
checked=
""
value=
"
1
"
name=
"j_active"
>
<i>
激活
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
value=
"
0
"
name=
"j_active"
>
<i>
禁用
</i></label></div>
</div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
><label
class=
"col-sm-2 control-label"
>
备注
</label>
<div
class=
"col-sm-8"
><input
type=
"text"
placeholder=
"hadoop01"
name=
"j_comment"
class=
"form-control"
></div>
<div
class=
"col-sm-8"
><input
type=
"text"
value=
"{{ j_comment }}"
placeholder=
"hadoop01"
name=
"j_comment"
class=
"form-control"
></div>
</div>
<div
class=
"hr-line-dashed"
></div>
...
...
@@ -123,7 +129,15 @@
</div>
<!-- Peity -->
<script
src=
"static/js/plugins/peity/jquery.peity.min.js"
></script>
<!-- Custom and plugin javascript -->
<script
src=
"static/js/inspinia.js"
></script>
<script
src=
"static/js/plugins/pace/pace.min.js"
></script>
<!-- Peity -->
<script
src=
"static/js/demo/peity-demo.js"
></script>
<script>
var
showFlag
=
{};
...
...
@@ -135,7 +149,6 @@ var showFlag={};
else
{
document
.
getElementById
(
"a1"
).
style
.
display
=
"none"
;
}};
</script>
{% endblock %}
\ No newline at end of file
templates/jasset/jadd_group.html
0 → 100644
View file @
acf508f0
{% extends 'base.html' %}
{% block content %}
{% include 'nav_cat_bar.html' %}
<div
class=
"wrapper wrapper-content animated fadeInRight"
>
<div
class=
"row"
>
<div
class=
"col-lg-10"
>
<div
class=
"ibox float-e-margins"
>
<div
id=
"ibox-content"
class=
"ibox-title"
>
<h5>
填写业务组基本信息
</h5>
<div
class=
"ibox-tools"
>
<a
class=
"collapse-link"
>
<i
class=
"fa fa-chevron-up"
></i>
</a>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
<i
class=
"fa fa-wrench"
></i>
</a>
<ul
class=
"dropdown-menu dropdown-user"
>
<li><a
href=
"#"
>
未启用 1
</a>
</li>
<li><a
href=
"#"
>
未启用 2
</a>
</li>
</ul>
<a
class=
"close-link"
>
<i
class=
"fa fa-times"
></i>
</a>
</div>
</div>
<div
class=
"ibox-content"
>
{% if emg %}
<div
class=
"alert alert-warning text-center"
>
{{ emg }}
</div>
{% endif %}
<form
method=
"post"
class=
"form-horizontal"
>
<div
class=
"form-group"
><label
class=
"col-sm-2 control-label"
>
业务组名
</label>
<div
class=
"col-sm-8"
><input
type=
"text"
value=
"{{ j_ip }}"
placeholder=
"网站"
name=
"j_group"
class=
"form-control"
></div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
><label
class=
"col-sm-2 control-label"
>
备注
</label>
<div
class=
"col-sm-8"
><input
type=
"text"
value=
"{{ s_port }}"
placeholder=
包括web组所有主机
name=
"j_comment"
class=
"form-control"
></div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-5"
>
<button
class=
"btn btn-white"
type=
"submit"
>
重置
</button>
<button
class=
"btn btn-primary"
type=
"submit"
>
提交
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Peity -->
<script
src=
"static/js/plugins/peity/jquery.peity.min.js"
></script>
<!-- Custom and plugin javascript -->
<script
src=
"static/js/inspinia.js"
></script>
<script
src=
"static/js/plugins/pace/pace.min.js"
></script>
<!-- Peity -->
<script
src=
"static/js/demo/peity-demo.js"
></script>
<script>
var
showFlag
=
{};
function
show
(
o
){
showFlag
[
o
.
name
]
=
o
.
value
;
if
(
showFlag
.
j_type
==
"MAP"
){
document
.
getElementById
(
"a1"
).
style
.
display
=
""
;
}
else
{
document
.
getElementById
(
"a1"
).
style
.
display
=
"none"
;
}};
$
(
document
).
ready
(
function
(){
// Local script for demo purpose only
$
(
'#lightVersion'
).
click
(
function
(
event
)
{
event
.
preventDefault
()
$
(
'#ibox-content'
).
removeClass
(
'ibox-content'
);
$
(
'#vertical-timeline'
).
removeClass
(
'dark-timeline'
);
$
(
'#vertical-timeline'
).
addClass
(
'light-timeline'
);
});
$
(
'#darkVersion'
).
click
(
function
(
event
)
{
event
.
preventDefault
()
$
(
'#ibox-content'
).
addClass
(
'ibox-content'
);
$
(
'#vertical-timeline'
).
removeClass
(
'light-timeline'
);
$
(
'#vertical-timeline'
).
addClass
(
'dark-timeline'
);
});
$
(
'#leftVersion'
).
click
(
function
(
event
)
{
event
.
preventDefault
()
$
(
'#vertical-timeline'
).
toggleClass
(
'center-orientation'
);
});
});
</script>
{% endblock %}
\ No newline at end of file
templates/jasset/jadd_idc.html
0 → 100644
View file @
acf508f0
{% extends 'base.html' %}
{% block content %}
{% include 'nav_cat_bar.html' %}
<div
class=
"wrapper wrapper-content animated fadeInRight"
>
<div
class=
"row"
>
<div
class=
"col-lg-10"
>
<div
class=
"ibox float-e-margins"
>
<div
id=
"ibox-content"
class=
"ibox-title"
>
<h5>
填写IDC基本信息
</h5>
<div
class=
"ibox-tools"
>
<a
class=
"collapse-link"
>
<i
class=
"fa fa-chevron-up"
></i>
</a>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
<i
class=
"fa fa-wrench"
></i>
</a>
<ul
class=
"dropdown-menu dropdown-user"
>
<li><a
href=
"#"
>
未启用 1
</a>
</li>
<li><a
href=
"#"
>
未启用 2
</a>
</li>
</ul>
<a
class=
"close-link"
>
<i
class=
"fa fa-times"
></i>
</a>
</div>
</div>
<div
class=
"ibox-content"
>
{% if emg %}
<div
class=
"alert alert-warning text-center"
>
{{ emg }}
</div>
{% endif %}
<form
method=
"post"
class=
"form-horizontal"
>
<div
class=
"form-group"
><label
class=
"col-sm-2 control-label"
>
IDC名
</label>
<div
class=
"col-sm-8"
><input
type=
"text"
value=
"{{ j_ip }}"
placeholder=
"北京联通"
name=
"j_idc"
class=
"form-control"
></div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
><label
class=
"col-sm-2 control-label"
>
备注
</label>
<div
class=
"col-sm-8"
><input
type=
"text"
value=
"{{ s_port }}"
placeholder=
"核心联通机房"
name=
"j_comment"
class=
"form-control"
></div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-5"
>
<button
class=
"btn btn-white"
type=
"submit"
>
重置
</button>
<button
class=
"btn btn-primary"
type=
"submit"
>
提交
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Peity -->
<script
src=
"static/js/plugins/peity/jquery.peity.min.js"
></script>
<!-- Custom and plugin javascript -->
<script
src=
"static/js/inspinia.js"
></script>
<script
src=
"static/js/plugins/pace/pace.min.js"
></script>
<!-- Peity -->
<script
src=
"static/js/demo/peity-demo.js"
></script>
<script>
var
showFlag
=
{};
function
show
(
o
){
showFlag
[
o
.
name
]
=
o
.
value
;
if
(
showFlag
.
j_type
==
"MAP"
){
document
.
getElementById
(
"a1"
).
style
.
display
=
""
;
}
else
{
document
.
getElementById
(
"a1"
).
style
.
display
=
"none"
;
}};
$
(
document
).
ready
(
function
(){
// Local script for demo purpose only
$
(
'#lightVersion'
).
click
(
function
(
event
)
{
event
.
preventDefault
()
$
(
'#ibox-content'
).
removeClass
(
'ibox-content'
);
$
(
'#vertical-timeline'
).
removeClass
(
'dark-timeline'
);
$
(
'#vertical-timeline'
).
addClass
(
'light-timeline'
);
});
$
(
'#darkVersion'
).
click
(
function
(
event
)
{
event
.
preventDefault
()
$
(
'#ibox-content'
).
addClass
(
'ibox-content'
);
$
(
'#vertical-timeline'
).
removeClass
(
'light-timeline'
);
$
(
'#vertical-timeline'
).
addClass
(
'dark-timeline'
);
});
$
(
'#leftVersion'
).
click
(
function
(
event
)
{
event
.
preventDefault
()
$
(
'#vertical-timeline'
).
toggleClass
(
'center-orientation'
);
});
});
</script>
{% endblock %}
\ No newline at end of file
templates/jasset/jlist.html
View file @
acf508f0
...
...
@@ -52,7 +52,7 @@
<td>
{{ post.login_type}}
</td>
<td
class=
"center"
>
{{ post.idc.name }}
</td>
<td
class=
"center"
>
{% for group in post.group.all %}
{% for group in post.
bis_
group.all %}
{{ group }}
{% endfor %}
</td>
...
...
templates/jasset/jlist_group.html
0 → 100644
View file @
acf508f0
{% extends 'base.html' %}
{% block content %}
{% include 'nav_cat_bar.html' %}
<div
class=
"wrapper wrapper-content animated fadeInRight"
>
<div
class=
"row"
>
<div
class=
"col-lg-10"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<h5>
IDC详细信息列表
</h5>
<div
class=
"ibox-tools"
>
<a
class=
"collapse-link"
>
<i
class=
"fa fa-chevron-up"
></i>
</a>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
<i
class=
"fa fa-wrench"
></i>
</a>
<ul
class=
"dropdown-menu dropdown-user"
>
<li><a
href=
"#"
>
未启用 1
</a>
</li>
<li><a
href=
"#"
>
未启用 2
</a>
</li>
</ul>
<a
class=
"close-link"
>
<i
class=
"fa fa-times"
></i>
</a>
</div>
</div>
<div
class=
"ibox-content"
>
<div
class=
""
>
<a
onclick=
"fnClickAddRow();"
href=
"javascript:void(0);"
class=
"btn btn-primary "
>
添加
</a>
</div>
<table
class=
"table table-striped table-bordered table-hover "
id=
"editable"
>
<thead>
<tr>
<th>
ID
</th>
<th>
机房名
</th>
<th>
备注
</th>
</tr>
</thead>
<tbody>
{% for post in posts %}
<tr
class=
"gradeX"
>
<td>
{{ post.id }}
</td>
<td>
{{ post.name }}
</td>
<td>
{{ post.comment }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
templates/jasset/jlist_idc.html
0 → 100644
View file @
acf508f0
{% extends 'base.html' %}
{% block content %}
{% include 'nav_cat_bar.html' %}
<div
class=
"wrapper wrapper-content animated fadeInRight"
>
<div
class=
"row"
>
<div
class=
"col-lg-10"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<h5>
IDC详细信息列表
</h5>
<div
class=
"ibox-tools"
>
<a
class=
"collapse-link"
>
<i
class=
"fa fa-chevron-up"
></i>
</a>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
<i
class=
"fa fa-wrench"
></i>
</a>
<ul
class=
"dropdown-menu dropdown-user"
>
<li><a
href=
"#"
>
未启用 1
</a>
</li>
<li><a
href=
"#"
>
未启用 2
</a>
</li>
</ul>
<a
class=
"close-link"
>
<i
class=
"fa fa-times"
></i>
</a>
</div>
</div>
<div
class=
"ibox-content"
>
<div
class=
""
>
<a
onclick=
"fnClickAddRow();"
href=
"javascript:void(0);"
class=
"btn btn-primary "
>
添加
</a>
</div>
<table
class=
"table table-striped table-bordered table-hover "
id=
"editable"
>
<thead>
<tr>
<th>
ID
</th>
<th>
机房名
</th>
<th>
备注
</th>
</tr>
</thead>
<tbody>
{% for post in posts %}
<tr
class=
"gradeX"
>
<td>
{{ post.id }}
</td>
<td>
{{ post.name }}
</td>
<td>
{{ post.comment }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
templates/nav.html
View file @
acf508f0
...
...
@@ -23,10 +23,12 @@
<li>
<a
href=
"mailbox.html"
><i
class=
"fa fa-cube"
></i>
<span
class=
"nav-label"
>
资产管理
</span><span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<li><a
href=
"/jasset/jlist/"
>
查看资产
</a></li>
<li><a
href=
"/jasset/jadd/"
>
添加资产
</a></li>
<li><a
href=
"/idc/showlist/"
>
查看机房
</a></li>
<li><a
href=
"/idc/add/"
>
添加机房
</a></li>
<li><a
href=
"/jasset/host_list/"
>
查看资产
</a></li>
<li><a
href=
"/jasset/host_add/"
>
添加资产
</a></li>
<li><a
href=
"/jasset/idc_list/"
>
查看机房
</a></li>
<li><a
href=
"/jasset/idc_add/"
>
添加机房
</a></li>
<li><a
href=
"/jasset/group_list/"
>
查看业务组
</a></li>
<li><a
href=
"/jasset/group_add/"
>
添加业务组
</a></li>
</ul>
</li>
<li>
...
...
templates/script.html
View file @
acf508f0
...
...
@@ -17,12 +17,12 @@
<!-- Peity -->
<script
src=
"/static/js/demo/peity-demo.js"
></script>
<
script
>
$
(
document
).
ready
(
function
(){
$
(
'.i-checks'
).
iCheck
({
checkboxClass
:
'icheckbox_square-green'
,
radioClass
:
'iradio_square-green'
,
});
});
<
!--<script>--
>
<!--$(document).ready(function(){-->
<!--$('.i-checks').iCheck({-->
<!--checkboxClass: 'icheckbox_square-green',-->
<!--radioClass: 'iradio_square-green',-->
<!--});-->
<!--});-->
<
/script
>
<
!--</script>--
>
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