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
7a86ba0b
Commit
7a86ba0b
authored
Jan 05, 2015
by
halcyon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产管理页面开始,增加添加资产页面,修改base页面等
parent
ccb4876d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
154 additions
and
8 deletions
+154
-8
urls.py
jasset/urls.py
+9
-0
views.py
jasset/views.py
+15
-1
urls.py
jumpserver/urls.py
+1
-4
base.html
templates/base.html
+1
-1
jadd.html
templates/jasset/jadd.html
+114
-0
jasset.html
templates/jasset/jasset.html
+11
-0
nav.html
templates/nav.html
+3
-2
No files found.
jasset/urls.py
0 → 100644
View file @
7a86ba0b
# coding:utf-8
from
django.conf.urls
import
patterns
,
include
,
url
from
jasset.views
import
*
urlpatterns
=
patterns
(
''
,
url
(
r'^$'
,
index
),
url
(
r'jadd'
,
jadd
),
)
\ No newline at end of file
jasset/views.py
View file @
7a86ba0b
#coding:utf-8
from
django.shortcuts
import
render
from
django.http
import
HttpResponse
from
django.template
import
RequestContext
from
django.shortcuts
import
render_to_response
from
django.http
import
HttpResponseRedirect
# Create your views here.
def
index
(
request
):
return
render_to_response
(
'jasset/jasset.html'
,)
def
jadd
(
request
):
if
request
.
method
==
'POST'
:
pass
return
render_to_response
(
'jasset/jadd.html'
,)
\ No newline at end of file
jumpserver/urls.py
View file @
7a86ba0b
...
...
@@ -3,10 +3,7 @@ from django.contrib import admin
from
jumpserver
import
views
urlpatterns
=
patterns
(
''
,
# Examples:
# url(r'^$', 'jumpserver.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url
(
r'^jasset/'
,
include
(
'jasset.urls'
)),
url
(
r'^admin/'
,
include
(
admin
.
site
.
urls
)),
(
r'^base/$'
,
views
.
base
),
)
templates/base.html
View file @
7a86ba0b
...
...
@@ -21,7 +21,7 @@
<div
class=
"row border-bottom"
>
{% include 'nav_bar_header.html' %}
</div>
{
{ content }
}
{
% block content %}{% endblock %
}
{% include 'footer.html' %}
</div>
</div>
...
...
templates/jasset/jadd.html
0 → 100644
View file @
7a86ba0b
{% extends 'base.html' %}
{% block content %}
<h1>
添加主机
</h1>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<h5>
请在以下填写主机详细信息
</h5>
</div>
<div
class=
"ibox-content"
>
<form
method=
"get"
class=
"form-horizontal"
>
<div
class=
"form-group"
><label
class=
"col-sm-2 control-label"
>
IP地址
</label>
<div
class=
"col-sm-10"
><input
type=
"text"
placeholder=
"192.168.1.1"
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-10"
><input
type=
"text"
placeholder=
"22"
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-10"
>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
checked=
""
value=
"option1"
name=
"a"
onclick=
"show(this)"
>
<i>
LDAP
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
value=
"option2"
name=
"a"
onclick=
"show(this)"
>
<i>
SSH_KEY
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
value=
"option3"
name=
"a"
onclick=
"show(this)"
>
<i>
SSH_PASSWORD
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
value=
"option4"
name=
"a"
onclick=
"show(this)"
>
<i>
JUMPSER_MAP
</i></label></div>
</div>
<div
name=
"a1"
id=
a1
style=
"display:none;"
>
<div
class=
"form-group"
><label
class=
"col-sm-2 col-sm-offset-1 control-label"
>
普通用户名
</label>
<div
class=
"col-sm-8"
><input
type=
"text"
placeholder=
"lilei"
class=
"form-control"
></div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
><label
class=
"col-sm-2 col-sm-offset-1 control-label"
>
普通用户密码
</label>
<div
class=
"col-sm-8"
><input
type=
"password"
placeholder=
"Password"
class=
"form-control"
name=
"password"
></div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
><label
class=
"col-sm-2 col-sm-offset-1 control-label"
>
超管用户名
</label>
<div
class=
"col-sm-8"
><input
type=
"text"
placeholder=
"root"
class=
"form-control"
></div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
><label
class=
"col-sm-2 col-sm-offset-1 control-label"
>
超管用户密码
</label>
<div
class=
"col-sm-8"
><input
type=
"password"
placeholder=
"Password"
class=
"form-control"
name=
"password"
></div>
</div>
</div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
><label
class=
"col-sm-2 control-label"
>
所属IDC
</label>
<div
class=
"col-sm-10"
><input
type=
"text"
placeholder=
"北京联通"
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-10"
><input
type=
"text"
placeholder=
"数据库"
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-10"
>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
checked=
""
value=
"o1"
name=
"b"
>
<i>
激活
</i></label></div>
<div
class=
"radio i-checks"
><label>
<input
type=
"radio"
value=
"o2"
name=
"b"
>
<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-10"
><input
type=
"password"
placeholder=
"Password"
class=
"form-control"
name=
"password"
></div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
><label
class=
"col-sm-2 control-label"
>
备注
</label>
<div
class=
"col-sm-10"
><input
type=
"text"
placeholder=
"hadoop01"
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>
<script>
var
showFlag
=
{};
function
show
(
o
){
showFlag
[
o
.
name
]
=
o
.
value
;
if
(
showFlag
.
a
==
"option4"
){
document
.
getElementById
(
"a1"
).
style
.
display
=
""
;
}
else
{
document
.
getElementById
(
"a1"
).
style
.
display
=
"none"
;
}};
</script>
{% endblock %}
\ No newline at end of file
templates/jasset/jasset.html
0 → 100644
View file @
7a86ba0b
<!DOCTYPE html>
<html>
<head
lang=
"en"
>
<meta
charset=
"UTF-8"
>
<title>
资产管理
</title>
</head>
<body>
<h1>
welocome!
</h1>
</body>
</html>
\ No newline at end of file
templates/nav.html
View file @
7a86ba0b
...
...
@@ -25,7 +25,7 @@
<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=
"/asset/showlist/"
>
查看资产
</a></li>
<li><a
href=
"/
asset/
add/"
>
添加资产
</a></li>
<li><a
href=
"/
jasset/j
add/"
>
添加资产
</a></li>
<li><a
href=
"/idc/showlist/"
>
查看机房
</a></li>
<li><a
href=
"/idc/add/"
>
添加机房
</a></li>
</ul>
...
...
@@ -54,7 +54,8 @@
</ul>
</li>
<li
class=
"special_link"
>
<!--<li class="special_link">-->
<li>
<a
href=
"http://www.jumpserver.org"
target=
"_blank"
><i
class=
"fa fa-database"
></i>
<span
class=
"nav-label"
>
访问官网
</span></a>
</li>
</ul>
...
...
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