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
09d3763a
Commit
09d3763a
authored
Apr 20, 2015
by
ibuler
Browse files
Options
Browse Files
Download
Plain Diff
fix a bug
parents
412dadce
ea37374e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
215 additions
and
0 deletions
+215
-0
connect.py
connect.py
+4
-0
AddUserAsset.py
docs/AddUserAsset.py
+18
-0
install.py
docs/install.py
+4
-0
requirements.txt
docs/requirements.txt
+11
-0
settings.py
jumpserver/settings.py
+4
-0
log_handler.py
log_handler.py
+4
-0
layer.ext.js
static/js/layer/extend/layer.ext.js
+15
-0
layer.min.js
static/js/layer/layer.min.js
+0
-0
layer.css
static/js/layer/skin/layer.css
+86
-0
layer.ext.css
static/js/layer/skin/layer.ext.css
+48
-0
log_offline.html
templates/jlog/log_offline.html
+13
-0
log_online.html
templates/jlog/log_online.html
+8
-0
No files found.
connect.py
View file @
09d3763a
...
...
@@ -24,7 +24,11 @@ from multiprocessing import Pool
os
.
environ
[
'DJANGO_SETTINGS_MODULE'
]
=
'jumpserver.settings'
<<<<<<<
HEAD
django
.
setup
()
=======
#django.setup()
>>>>>>>
beta
from
juser.models
import
User
from
jlog.models
import
Log
...
...
docs/AddUserAsset.py
View file @
09d3763a
...
...
@@ -7,7 +7,11 @@ import datetime
sys
.
path
.
append
(
'../'
)
os
.
environ
[
'DJANGO_SETTINGS_MODULE'
]
=
'jumpserver.settings'
<<<<<<<
HEAD
django
.
setup
()
=======
#django.setup()
>>>>>>>
beta
from
juser.views
import
db_add_user
,
md5_crypt
,
CRYPTOR
,
db_add_group
...
...
@@ -99,7 +103,11 @@ def test_add_asset():
bis_group_all
=
BisGroup
.
objects
.
all
()
dept_all
=
DEPT
.
objects
.
all
()
for
i
in
range
(
1
,
500
):
<<<<<<<
HEAD
ip
=
'192.168.1.'
+
str
(
i
)
=======
ip
=
'192.168.5.'
+
str
(
i
)
>>>>>>>
beta
asset
=
Asset
(
ip
=
ip
,
port
=
22
,
login_type
=
'L'
,
idc
=
test_idc
,
is_active
=
True
,
comment
=
'test'
)
asset
.
save
()
asset
.
bis_group
=
[
random
.
choice
(
bis_group_all
)
for
i
in
range
(
2
)]
...
...
@@ -128,6 +136,7 @@ def test_add_log():
if
__name__
==
'__main__'
:
#install()
<<<<<<<
HEAD
test_add_dept
()
test_add_group
()
test_add_user
()
...
...
@@ -135,6 +144,15 @@ if __name__ == '__main__':
test_add_asset_group
()
test_add_asset
()
test_add_log
()
=======
#test_add_dept()
#test_add_group()
#test_add_user()
#test_add_idc()
#test_add_asset_group()
test_add_asset
()
#test_add_log()
>>>>>>>
beta
...
...
docs/install.py
View file @
09d3763a
...
...
@@ -7,7 +7,11 @@ import datetime
sys
.
path
.
append
(
'../'
)
os
.
environ
[
'DJANGO_SETTINGS_MODULE'
]
=
'jumpserver.settings'
<<<<<<<
HEAD
django
.
setup
()
=======
#django.setup()
>>>>>>>
beta
from
juser.views
import
db_add_user
,
md5_crypt
,
CRYPTOR
,
db_add_group
...
...
docs/requirements.txt
0 → 100644
View file @
09d3763a
sphinx-me
django==1.6
python-ldap
paramiko
pycrypto
ecdsa>=0.11
MySQL-python
readline
django-uuidfield
psutil
\ No newline at end of file
jumpserver/settings.py
View file @
09d3763a
...
...
@@ -66,7 +66,11 @@ MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware'
,
#'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware'
,
<<<<<<<
HEAD
'django.contrib.auth.middleware.SessionAuthenticationMiddleware'
,
=======
#'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
>>>>>>>
beta
'django.contrib.messages.middleware.MessageMiddleware'
,
'django.middleware.clickjacking.XFrameOptionsMiddleware'
,
)
...
...
log_handler.py
View file @
09d3763a
...
...
@@ -10,7 +10,11 @@ from datetime import datetime
os
.
environ
[
'DJANGO_SETTINGS_MODULE'
]
=
'jumpserver.settings'
import
django
<<<<<<<
HEAD
django
.
setup
()
=======
#django.setup()
>>>>>>>
beta
from
jlog.models
import
Log
...
...
static/js/layer/extend/layer.ext.js
View file @
09d3763a
<<<<<<<
HEAD
/**
@Name: layer拓展类,依赖于layer
...
...
@@ -9,4 +10,17 @@
*/
=======
/**
@Name: layer拓展类,依赖于layer
@Date: 2014.08.13
@Author: 贤心
@Versions:1.8.5-ext
@Api:http://sentsin.com/jquery/layer
@Desc: 本拓展会持续更新
*/
>>>>>>>
beta
layer
.
use
(
"skin/layer.ext.css"
,
function
(){
layer
.
ext
&&
layer
.
ext
()}),
layer
.
prompt
=
function
(
a
,
b
,
c
){
var
d
=
{},
a
=
a
||
{},
e
=
{
area
:[
"auto"
,
"auto"
],
offset
:[
a
.
top
||
""
,
""
],
title
:
a
.
title
||
"信息"
,
dialog
:{
btns
:
2
,
type
:
-
1
,
msg
:
'<input type="'
+
function
(){
return
1
===
a
.
type
?
"password"
:
2
===
a
.
type
?
"file"
:
"text"
}()
+
'" class="xubox_prompt xubox_form" id="xubox_prompt" value="'
+
(
a
.
val
||
""
)
+
'" />'
,
yes
:
function
(
c
){
var
e
=
d
.
prompt
.
val
();
""
===
e
?
d
.
prompt
.
focus
():
e
.
replace
(
/
\s
/g
,
""
).
length
>
(
a
.
length
||
1
e3
)?
layer
.
tips
(
"最多输入"
+
(
a
.
length
||
1
e3
)
+
"个字数"
,
"#xubox_prompt"
,
2
):
b
&&
b
(
e
,
c
,
d
.
prompt
)},
no
:
c
},
success
:
function
(){
d
.
prompt
=
$
(
"#xubox_prompt"
),
d
.
prompt
.
focus
()}};
return
3
===
a
.
type
&&
(
e
.
dialog
.
msg
=
'<textarea class="xubox_prompt xubox_form xubox_formArea" id="xubox_prompt">'
+
(
a
.
val
||
""
)
+
"</textarea>"
),
$
.
layer
(
e
)},
layer
.
tab
=
function
(
a
){
var
a
=
a
||
{},
c
=
a
.
data
||
[],
d
=
{
type
:
1
,
border
:[
0
],
area
:[
"auto"
,
"auto"
],
bgcolor
:
""
,
title
:
!
1
,
shade
:
a
.
shade
,
offset
:
a
.
offset
,
move
:
".xubox_tabmove"
,
closeBtn
:
!
1
,
page
:{
html
:
'<div class="xubox_tab" style="'
+
function
(){
return
a
.
area
=
a
.
area
||
[],
"width:"
+
(
a
.
area
[
0
]
||
"500px"
)
+
"; height:"
+
(
a
.
area
[
1
]
||
"300px"
)
+
'">'
}()
+
'<span class="xubox_tabmove"></span>'
+
'<div class="xubox_tabtit">'
+
function
(){
var
a
=
c
.
length
,
b
=
1
,
d
=
""
;
if
(
a
>
0
)
for
(
d
=
'<span class="xubox_tabnow">'
+
c
[
0
].
title
+
"</span>"
;
a
>
b
;
b
++
)
d
+=
"<span>"
+
c
[
b
].
title
+
"</span>"
;
return
d
}()
+
"</div>"
+
'<ul class="xubox_tab_main">'
+
function
(){
var
a
=
c
.
length
,
b
=
1
,
d
=
""
;
if
(
a
>
0
)
for
(
d
=
'<li class="xubox_tabli xubox_tab_layer">'
+
(
c
[
0
].
content
||
"content未传入"
)
+
"</li>"
;
a
>
b
;
b
++
)
d
+=
'<li class="xubox_tabli">'
+
(
c
[
b
].
content
||
"content未传入"
)
+
"</li>"
;
return
d
}()
+
"</ul>"
+
'<span class="xubox_tabclose" title="关闭">X</span>'
+
"</div>"
},
success
:
function
(
a
){
var
b
=
$
(
".xubox_tabtit"
).
children
(),
c
=
$
(
".xubox_tab_main"
).
children
(),
d
=
$
(
".xubox_tabclose"
);
b
.
on
(
"click"
,
function
(){
var
a
=
$
(
this
),
b
=
a
.
index
();
a
.
addClass
(
"xubox_tabnow"
).
siblings
().
removeClass
(
"xubox_tabnow"
),
c
.
eq
(
b
).
show
().
siblings
().
hide
()}),
d
.
on
(
"click"
,
function
(){
layer
.
close
(
a
.
attr
(
"times"
))})}};
return
$
.
layer
(
d
)},
layer
.
photos
=
function
(
a
){
var
b
,
c
,
d
,
e
,
f
,
g
,
h
,
i
;
if
(
a
=
a
||
{},
b
=
{
imgIndex
:
1
,
end
:
null
,
html
:
$
(
"html"
)},
c
=
$
(
window
),
d
=
a
.
json
,
e
=
a
.
page
,
d
){
if
(
f
=
d
.
data
,
1
!==
d
.
status
)
return
layer
.
msg
(
"未请求到数据"
,
2
,
8
),
void
0
;
if
(
b
.
imgLen
=
f
.
length
,
!
(
f
.
length
>
0
))
return
layer
.
msg
(
"没有任何图片"
,
2
,
8
),
void
0
;
b
.
thissrc
=
f
[
d
.
start
].
src
,
b
.
pid
=
f
[
d
.
start
].
pid
,
b
.
imgsname
=
d
.
title
||
""
,
b
.
name
=
f
[
d
.
start
].
name
,
b
.
imgIndex
=
d
.
start
+
1
}
else
g
=
$
(
e
.
parent
).
find
(
"img"
),
h
=
g
.
eq
(
e
.
start
),
b
.
thissrc
=
h
.
attr
(
"layer-img"
)
||
h
.
attr
(
"src"
),
b
.
pid
=
h
.
attr
(
"pid"
),
b
.
imgLen
=
g
.
length
,
b
.
imgsname
=
e
.
title
||
""
,
b
.
name
=
h
.
attr
(
"alt"
),
b
.
imgIndex
=
e
.
start
+
1
;
return
i
=
{
type
:
1
,
border
:[
0
],
area
:[(
a
.
html
?
915
:
600
)
+
"px"
,
"auto"
],
title
:
!
1
,
shade
:[.
9
,
"#000"
,
!
0
],
shadeClose
:
!
0
,
offset
:[
"25px"
,
""
],
bgcolor
:
""
,
page
:{
html
:
'<div class="xubox_bigimg"><img src="'
+
b
.
thissrc
+
'" alt="'
+
(
b
.
name
||
""
)
+
'" layer-pid="'
+
(
b
.
pid
||
""
)
+
'"><div class="xubox_imgsee">'
+
function
(){
return
b
.
imgLen
>
1
?
'<a href="" class="xubox_iconext xubox_prev"></a><a href="" class="xubox_iconext xubox_next"></a>'
:
""
}()
+
'<div class="xubox_imgbar"><span class="xubox_imgtit"><a href="javascript:;">'
+
b
.
imgsname
+
" </a><em>"
+
b
.
imgIndex
+
"/"
+
b
.
imgLen
+
"</em></span></div></div></div>"
+
function
(){
return
a
.
html
?
'<div class="xubox_intro">'
+
a
.
html
+
"</div>"
:
""
}()},
success
:
function
(
a
){
b
.
bigimg
=
a
.
find
(
".xubox_bigimg"
),
b
.
imgsee
=
b
.
bigimg
.
find
(
".xubox_imgsee"
),
b
.
imgbar
=
b
.
imgsee
.
find
(
".xubox_imgbar"
),
b
.
imgtit
=
b
.
imgbar
.
find
(
".xubox_imgtit"
),
b
.
layero
=
a
;
var
c
=
b
.
imgs
=
b
.
bigimg
.
find
(
"img"
);
clearTimeout
(
b
.
timerr
),
b
.
timerr
=
setTimeout
(
function
(){
$
(
"html"
).
css
(
"overflow"
,
"hidden"
).
attr
(
"layer-full"
,
b
.
index
)},
10
),
c
.
load
(
function
(){
b
.
imgarea
=
[
c
.
outerWidth
(),
c
.
outerHeight
()],
b
.
resize
(
a
)}),
b
.
event
()},
end
:
function
(){
layer
.
closeAll
(),
b
.
end
=!
0
}},
b
.
event
=
function
(){
b
.
bigimg
.
hover
(
function
(){
b
.
imgsee
.
show
()},
function
(){
b
.
imgsee
.
hide
()}),
i
.
imgprev
=
function
(){
b
.
imgIndex
--
,
b
.
imgIndex
<
1
&&
(
b
.
imgIndex
=
b
.
imgLen
),
b
.
tabimg
()},
b
.
bigimg
.
find
(
".xubox_prev"
).
on
(
"click"
,
function
(
a
){
a
.
preventDefault
(),
i
.
imgprev
()}),
i
.
imgnext
=
function
(){
b
.
imgIndex
++
,
b
.
imgIndex
>
b
.
imgLen
&&
(
b
.
imgIndex
=
1
),
b
.
tabimg
()},
b
.
bigimg
.
find
(
".xubox_next"
).
on
(
"click"
,
function
(
a
){
a
.
preventDefault
(),
i
.
imgnext
()}),
$
(
document
).
keyup
(
function
(
a
){
if
(
!
b
.
end
){
var
c
=
a
.
keyCode
;
a
.
preventDefault
(),
37
===
c
?
i
.
imgprev
():
39
===
c
?
i
.
imgnext
():
27
===
c
&&
layer
.
close
(
b
.
index
)}}),
b
.
tabimg
=
function
(){
var
e
,
h
,
i
,
j
,
k
;
b
.
imgs
.
removeAttr
(
"style"
),
d
?(
j
=
f
[
b
.
imgIndex
-
1
],
e
=
j
.
src
,
h
=
j
.
pid
,
i
=
j
.
name
):(
k
=
g
.
eq
(
b
.
imgIndex
-
1
),
e
=
k
.
attr
(
"layer-img"
)
||
k
.
attr
(
"src"
),
h
=
k
.
attr
(
"layer-pid"
)
||
""
,
i
=
k
.
attr
(
"alt"
)
||
""
),
b
.
imgs
.
attr
({
src
:
e
,
"layer-pid"
:
h
,
alt
:
i
}),
b
.
imgtit
.
find
(
"em"
).
text
(
b
.
imgIndex
+
"/"
+
b
.
imgLen
),
b
.
imgsee
.
show
(),
a
.
tab
&&
a
.
tab
({
pid
:
h
,
name
:
i
})}},
b
.
resize
=
function
(
d
){
var
g
,
e
=
{},
f
=
[
c
.
width
(),
c
.
height
()];
e
.
limit
=
f
[
0
]
-
f
[
0
]
/
f
[
1
]
*
(
60
*
f
[
0
]
/
f
[
1
]),
e
.
limit
<
600
&&
(
e
.
limit
=
600
),
g
=
[
e
.
limit
,
f
[
1
]
>
400
?
f
[
1
]
-
50
:
400
],
g
[
0
]
=
a
.
html
?
g
[
0
]:
g
[
0
]
-
300
,
layer
.
area
(
b
.
index
,{
width
:
g
[
0
]
+
(
a
.
html
?
15
:
0
),
height
:
g
[
1
]}),
e
.
flwidth
=
g
[
0
]
-
(
a
.
html
?
300
:
0
),
b
.
imgarea
[
0
]
>
e
.
flwidth
?
b
.
imgs
.
css
({
width
:
e
.
flwidth
}):
b
.
imgs
.
css
({
width
:
b
.
imgarea
[
0
]}),
b
.
imgs
.
outerHeight
()
<
g
[
1
]
&&
b
.
imgs
.
css
({
top
:(
g
[
1
]
-
b
.
imgs
.
outerHeight
())
/
2
}),
b
.
imgs
.
css
({
visibility
:
"visible"
}),
b
.
bigimg
.
css
({
width
:
e
.
flwidth
,
height
:
g
[
1
],
"background-color"
:
a
.
bgcolor
}),
a
.
html
&&
d
.
find
(
".xubox_intro"
).
css
({
height
:
g
[
1
]}),
e
=
null
,
f
=
null
,
g
=
null
},
c
.
on
(
"resize"
,
function
(){
b
.
end
||
(
b
.
timer
&&
clearTimeout
(
b
.
timer
),
b
.
timer
=
setTimeout
(
function
(){
b
.
resize
(
b
.
layero
)},
200
))}),
b
.
index
=
$
.
layer
(
i
),
b
.
index
},
layer
.
photosPage
=
function
(
a
){
var
b
=
{};
b
.
run
=
function
(
b
){
layer
.
photos
({
html
:
a
.
html
,
success
:
a
.
success
,
page
:{
title
:
a
.
title
,
id
:
a
.
id
,
start
:
b
,
parent
:
a
.
parent
}})},
a
=
a
||
{},
$
(
a
.
parent
).
find
(
"img"
).
each
(
function
(
a
){
$
(
this
).
on
(
"click"
,
function
(){
b
.
run
(
a
)})})};
\ No newline at end of file
static/js/layer/layer.min.js
View file @
09d3763a
This diff is collapsed.
Click to expand it.
static/js/layer/skin/layer.css
View file @
09d3763a
<<<<<<<
HEAD
/**
@Name: layer's style
...
...
@@ -81,3 +82,88 @@
=======
/**
@Name: layer's style
@Date: 2012.09.15
@Author: 贤心
@blog: sentsin.com
**/
*
html
{
background-image
:
url(about:blank)
;
background-attachment
:
fixed
;}
/** common **/
.xubox_shade
,
.xubox_layer
{
position
:
fixed
;
_position
:
absolute
;}
.xubox_shade
{
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
_height
:
expression
(
document
.
body
.
offsetHeight
+
"px"
);}
.xubox_layer
{
top
:
150px
;
left
:
50%
;
height
:
auto
;
width
:
310px
;
margin-left
:
-155px
;}
.xubox_border
,
.xubox_title
,
.xubox_title
i
,
.xubox_page
,
.xubox_iframe
,
.xubox_title
em
,
.xubox_close
,
.xubox_msgico
,
.xubox_moves
{
position
:
absolute
;}
.xubox_border
{
border-radius
:
5px
;}
.xubox_title
{
left
:
0
;
top
:
0
;}
.xubox_main
{
position
:
relative
;
height
:
100%
;
_float
:
left
;}
.xubox_page
{
top
:
0
;
left
:
0
;}
.xubox_load
{
background
:
url(default/xubox_loading0.gif)
#fff
center
center
no-repeat
;}
.xubox_loading
{
display
:
block
;
float
:
left
;
text-decoration
:
none
;
color
:
#FFF
;
_float
:
none
;
}
.xulayer_png32
{
background
:
url(default/xubox_ico0.png)
no-repeat
;}
.xubox_moves
{
border
:
3px
solid
#666
;
cursor
:
move
;
background-color
:
rgba
(
255
,
255
,
255
,
.3
);
background-color
:
#fff
\
9
;
filter
:
alpha
(
opacity
=
50
);}
.xubox_msgico
{
width
:
32px
;
height
:
32px
;
top
:
52px
;
left
:
15px
;
background
:
url(default/xubox_ico0.png)
no-repeat
;}
.xubox_text
{
padding-left
:
55px
;
float
:
left
;
line-height
:
25px
;
word-break
:
break-all
;
padding-right
:
20px
;
overflow
:
hidden
;
font-size
:
14px
;}
.xubox_msgtype0
{
background-position
:
-91px
-38px
;}
.xubox_msgtype1
{
background-position
:
-128px
-38px
}
.xubox_msgtype2
{
background-position
:
-163px
-38px
;}
.xubox_msgtype3
{
background-position
:
-91px
-75px
;}
.xubox_msgtype4
{
background-position
:
-163px
-75px
;}
.xubox_msgtype5
{
background-position
:
-163px
-112px
;}
.xubox_msgtype6
{
background-position
:
-163px
-148px
;}
.xubox_msgtype7
{
background-position
:
-128px
-75px
;}
.xubox_msgtype8
{
background-position
:
-91px
-6px
;}
.xubox_msgtype9
{
background-position
:
-129px
-6px
;}
.xubox_msgtype10
{
background-position
:
-163px
-6px
;}
.xubox_msgtype11
{
background-position
:
-206px
-6px
;}
.xubox_msgtype12
{
background-position
:
-206px
-44px
;}
.xubox_msgtype13
{
background-position
:
-206px
-81px
;}
.xubox_msgtype14
{
background-position
:
-206px
-122px
;}
.xubox_msgtype15
{
background-position
:
-206px
-157px
;}
.xubox_loading_0
{
width
:
60px
;
height
:
24px
;
background
:
url(default/xubox_loading0.gif)
no-repeat
;}
.xubox_loading_1
{
width
:
37px
;
height
:
37px
;
background
:
url(default/xubox_loading1.gif)
no-repeat
;}
.xubox_loading_2
,
.xubox_msgtype16
{
width
:
32px
;
height
:
32px
;
background
:
url(default/xubox_loading2.gif)
no-repeat
;}
.xubox_loading_3
{
width
:
126px
;
height
:
22px
;
background
:
url(default/xubox_loading3.gif)
no-repeat
;}
.xubox_setwin
{
position
:
absolute
;
right
:
10px
;
*
right
:
0
;
top
:
10px
;
font-size
:
0
;}
.xubox_setwin
a
{
position
:
relative
;
display
:
inline-block
;
*
display
:
inline
;
*
zoom
:
1
;
vertical-align
:
top
;
width
:
14px
;
height
:
14px
;
margin-left
:
10px
;
font-size
:
12px
;
_overflow
:
hidden
;}
.xubox_setwin
.xubox_min
cite
{
position
:
absolute
;
width
:
14px
;
height
:
2px
;
left
:
0
;
top
:
50%
;
margin-top
:
-1px
;
background-color
:
#919191
;
cursor
:
pointer
;
_overflow
:
hidden
;}
.xubox_setwin
.xubox_min
:hover
cite
{
background-color
:
#2D93CA
;
}
.xubox_setwin
.xubox_max
{
background-position
:
-6px
-189px
;}
.xubox_setwin
.xubox_max
:hover
{
background-position
:
-6px
-206px
;}
.xubox_setwin
.xubox_maxmin
{
background-position
:
-29px
-189px
;}
.xubox_setwin
.xubox_maxmin
:hover
{
background-position
:
-29px
-206px
;}
.xubox_setwin
.xubox_close0
{
width
:
14px
;
height
:
14px
;
background-position
:
-31px
-7px
;
cursor
:
pointer
;}
.xubox_setwin
.xubox_close0
:hover
{
background-position
:
-51px
-7px
;}
.xubox_setwin
.xubox_close1
{
position
:
absolute
;
right
:
-28px
;
top
:
-28px
;
width
:
30px
;
height
:
30px
;
margin-left
:
0
;
background-position
:
-60px
-195px
;
*
right
:
-18px
;
_right
:
-15px
;
_top
:
-23px
;
_width
:
14px
;
_height
:
14px
;
_background-position
:
-31px
-7px
;}
.xubox_setwin
.xubox_close1
:hover
{
background-position
:
-91px
-195px
;
_background-position
:
-51px
-7px
;}
.xubox_title
{
width
:
100%
;
height
:
35px
;
line-height
:
35px
;
border-bottom
:
1px
solid
#D5D5D5
;
background
:
url(default/xubox_title0.png)
#EBEBEB
repeat-x
;
font-size
:
14px
;
color
:
#333
;}
.xubox_title
em
{
height
:
20px
;
line-height
:
20px
;
width
:
60%
;
top
:
7px
;
left
:
10px
;
font-style
:
normal
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;}
.xubox_botton
a
{
position
:
absolute
;
bottom
:
10px
;
left
:
50%
;
background
:
url(default/xubox_ico0.png)
repeat
;
text-decoration
:
none
;
color
:
#FFF
;
font-size
:
14px
;
text-align
:
center
;
font-weight
:
bold
;
overflow
:
hidden
;
}
.xubox_botton
a
:hover
{
text-decoration
:
none
;
color
:
#FFF
;
}
.xubox_botton
.xubox_botton1
{
width
:
79px
;
height
:
32px
;
line-height
:
32px
;
margin-left
:
-39px
;
background-position
:
-6px
-34px
;}
.xubox_botton1
:hover
{
background-position
:
-6px
-72px
;}
.xubox_botton
.xubox_botton2
{
margin-left
:
-76px
;
width
:
71px
;
height
:
29px
;
line-height
:
29px
;
background-position
:
-5px
-114px
;}
.xubox_botton2
:hover
{
background-position
:
-5px
-146px
;}
.xubox_botton
.xubox_botton3
{
width
:
71px
;
height
:
29px
;
line-height
:
29px
;
margin-left
:
10px
;
background-position
:
-81px
-114px
;}
.xubox_botton3
:hover
{
background-position
:
-81px
-146px
;}
.xubox_tips
{
position
:
relative
;
line-height
:
20px
;
min-width
:
12px
;
padding
:
3px
30px
3px
10px
;
font-size
:
12px
;
_float
:
left
;
border-radius
:
3px
;
box-shadow
:
1px
1px
3px
rgba
(
0
,
0
,
0
,
.3
);}
.xubox_tips
i
.layerTipsG
{
position
:
absolute
;
width
:
0
;
height
:
0
;
border-width
:
8px
;
border-color
:
transparent
;
border-style
:
dashed
;
*
overflow
:
hidden
;}
.xubox_tips
i
.layerTipsT
,
.xubox_tips
i
.layerTipsB
{
left
:
5px
;
border-right-style
:
solid
;}
.xubox_tips
i
.layerTipsT
{
bottom
:
-8px
;}
.xubox_tips
i
.layerTipsB
{
top
:
-8px
;}
.xubox_tips
i
.layerTipsR
,
.xubox_tips
i
.layerTipsL
{
top
:
1px
;
border-bottom-style
:
solid
;}
.xubox_tips
i
.layerTipsR
{
left
:
-8px
;}
.xubox_tips
i
.layerTipsL
{
right
:
-8px
;}
>>>>>>>
beta
static/js/layer/skin/layer.ext.css
View file @
09d3763a
<<<<<<<
HEAD
/**
@Name: layer拓展样式
...
...
@@ -43,3 +44,50 @@
.xubox_imgtit
em
{
padding-left
:
10px
;}
=======
/**
@Name: layer拓展样式
@Date: 2012.12.13
@Author: 贤心
@blog: sentsin.com
**/
.xubox_iconext
{
background
:
url(default/icon_ext.png)
no-repeat
;}
/* prompt模式 */
.xubox_layer
.xubox_form
{
width
:
240px
;
height
:
30px
;
line-height
:
30px
;
padding
:
0
5px
;
border
:
1px
solid
#ccc
;
background
:
url(default/textbg.png)
#fff
repeat-x
;
color
:
#333
;}
.xubox_layer
.xubox_formArea
{
width
:
300px
;
height
:
100px
;
line-height
:
20px
;}
/* tab模式 */
.xubox_layer
.xubox_tab
{
position
:
relative
;
background-color
:
#fff
;
box-shadow
:
1px
1px
50px
rgba
(
0
,
0
,
0
,
.4
)}
.xubox_layer
.xubox_tabmove
{
position
:
absolute
;
width
:
600px
;
height
:
30px
;
top
:
0
;
left
:
0
;}
.xubox_layer
.xubox_tabtit
{
display
:
block
;
height
:
34px
;
border-bottom
:
1px
solid
#ccc
;
background-color
:
#eee
;}
.xubox_layer
.xubox_tabtit
span
{
position
:
relative
;
float
:
left
;
width
:
120px
;
height
:
34px
;
line-height
:
34px
;
text-align
:
center
;
cursor
:
default
;}
.xubox_layer
.xubox_tabtit
span
.xubox_tabnow
{
left
:
-1px
;
_top
:
1px
;
height
:
35px
;
border-left
:
1px
solid
#ccc
;
border-right
:
1px
solid
#ccc
;
background-color
:
#fff
;
z-index
:
10
;}
.xubox_layer
.xubox_tab_main
{
line-height
:
24px
;
clear
:
both
;}
.xubox_layer
.xubox_tab_main
.xubox_tabli
{
display
:
none
;}
.xubox_layer
.xubox_tab_main
.xubox_tabli.xubox_tab_layer
{
display
:
block
;}
.xubox_layer
.xubox_tabclose
{
position
:
absolute
;
right
:
10px
;
top
:
5px
;
cursor
:
pointer
;}
/* photo模式 */
.xubox_bigimg
,
.xubox_intro
{
height
:
300px
}
.xubox_bigimg
{
position
:
relative
;
display
:
block
;
width
:
600px
;
text-align
:
center
;
background
:
url(default/xubox_loading1.gif)
center
center
no-repeat
#000
;
overflow
:
hidden
;
}
.xubox_bigimg
img
{
position
:
relative
;
display
:
inline-block
;
visibility
:
hidden
;}
.xubox_intro
{
position
:
absolute
;
right
:
-315px
;
top
:
0
;
width
:
300px
;
background-color
:
#fff
;
overflow-x
:
hidden
;
overflow-y
:
auto
;}
.xubox_imgsee
{
display
:
none
;}
.xubox_prev
,
.xubox_next
{
position
:
absolute
;
top
:
50%
;
width
:
27px
;
_width
:
44px
;
height
:
44px
;
margin-top
:
-22px
;
outline
:
none
;
blr
:
expression
(
this
.
onFocus
=
this
.
blur
());}
.xubox_prev
{
left
:
10px
;
background-position
:
-5px
-5px
;
_background-position
:
-70px
-5px
;}
.xubox_prev
:hover
{
background-position
:
-33px
-5px
;
_background-position
:
-120px
-5px
;}
.xubox_next
{
right
:
10px
;
_right
:
8px
;
background-position
:
-5px
-50px
;
_background-position
:
-70px
-50px
;}
.xubox_next
:hover
{
background-position
:
-33px
-50px
;
_background-position
:
-120px
-50px
;}
.xubox_imgbar
{
position
:
absolute
;
left
:
0
;
bottom
:
0
;
width
:
100%
;
height
:
32px
;
line-height
:
32px
;
background-color
:
rgba
(
0
,
0
,
0
,
.8
);
background-color
:
#000
\
9
;
filter
:
Alpha
(
opacity
=
80
);
color
:
#fff
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
font-size
:
0
;}
.xubox_imgtit
{
/*position:absolute; left:20px;*/
}
.xubox_imgtit
*
{
display
:
inline-block
;
*
display
:
inline
;
*
zoom
:
1
;
vertical-align
:
top
;
font-size
:
12px
;}
.xubox_imgtit
a
{
max-width
:
65%
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
color
:
#fff
;}
.xubox_imgtit
a
:hover
{
color
:
#fff
;
text-decoration
:
underline
;}
.xubox_imgtit
em
{
padding-left
:
10px
;}
>>>>>>>
beta
templates/jlog/log_offline.html
View file @
09d3763a
...
...
@@ -128,6 +128,7 @@
var
div_username
=
' 用户名: '
+
'<span class="text-info">'
+
username
+
''
+
'</span>'
;
var
div_ip
=
' 主机: '
+
'<span class="text-info">'
+
ip
+
'</span>'
;
var
div_time
=
' 开始时间: '
+
'<span class="text-info">'
+
start_time
+
'</span>'
+
' 结束时间: '
+
'<span class="text-info">'
+
end_time
+
'</span'
<<<<<<<
HEAD
var
title
=
'JumpServer命令统计 '
+
div_username
+
div_ip
+
div_time
$
.
ajax
({
url
:
url
,
success
:
function
(
data
){
BootstrapDialog
.
show
({
title
:
title
,
message
:
data
});
...
...
@@ -137,6 +138,18 @@
globalConfig
=
{
SOCKET_HOST
:
"{{ web_socket_host }}"
}
=======
var
title
=
'JumpServer命令统计 '
+
div_username
+
div_ip
+
div_time
;
$
.
ajax
({
url
:
url
,
success
:
function
(
data
){
var
tag
=
$
(
'<div style="height: 500px;overflow: auto;background-color: rgba(0, 0, 0, 0);"></div>'
).
html
(
data
.
replace
(
/
\n
/g
,
"<br />"
));
BootstrapDialog
.
show
({
title
:
title
,
message
:
tag
[
0
]});
}});
return
false
;
});
globalConfig
=
{
SOCKET_HOST
:
"{{ web_socket_host }}"
};
>>>>>>>
beta
function
log_search
(){
$
.
ajax
({
...
...
templates/jlog/log_online.html
View file @
09d3763a
...
...
@@ -136,11 +136,19 @@
BootstrapDialog
.
show
({
message
:
function
(){
var
option
,
exsit_message
;
var
escapeString
=
function
(
html
){
<<<<<<<
HEAD
var
elem
=
document
.
createElement
(
'div'
)
var
txt
=
document
.
createTextNode
(
html
)
elem
.
appendChild
(
txt
)
return
elem
.
innerHTML
;
}
=======
var
elem
=
document
.
createElement
(
'div'
);
var
txt
=
document
.
createTextNode
(
html
);
elem
.
appendChild
(
txt
);
return
elem
.
innerHTML
;
};
>>>>>>>
beta
var
tag
=
$
(
'<div id="log" style="height: 500px;overflow: auto;background-color: rgba(0, 0, 0, 0);"></div>'
);
//告诉服务器端有用户登录
socket
.
emit
(
'login'
,
{
userid
:
message
.
id
,
filename
:
message
.
filename
});
...
...
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