mirror of https://github.com/jumpserver/jumpserver
fix a bug
commit
09d3763a02
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
sphinx-me
|
||||
django==1.6
|
||||
python-ldap
|
||||
paramiko
|
||||
pycrypto
|
||||
ecdsa>=0.11
|
||||
MySQL-python
|
||||
readline
|
||||
django-uuidfield
|
||||
psutil
|
|
@ -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',
|
||||
)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,4 @@
|
|||
<<<<<<< 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
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<<<<<<< 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
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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});
|
||||
|
|
Loading…
Reference in New Issue