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
da1beef9
Commit
da1beef9
authored
Mar 01, 2015
by
guanghongwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'guanghongwei'
Conflicts: jumpserver/views.py static/js/base.js templates/head_script.html
parents
08410820
32ab6311
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
24 deletions
+12
-24
views.py
jumpserver/views.py
+5
-18
base.js
static/js/base.js
+7
-3
head_script.html
templates/head_script.html
+0
-3
No files found.
jumpserver/views.py
View file @
da1beef9
#coding: utf-8
import
hashlib
<<<<<<<
HEAD
import
ldap
from
ldap
import
modlist
from
Crypto.Cipher
import
AES
from
binascii
import
b2a_hex
,
a2b_hex
from
ConfigParser
import
ConfigParser
import
os
=======
import
datetime
import
json
>>>>>>>
wangyong
from
django.db.models
import
Count
from
django.shortcuts
import
render_to_response
from
django.http
import
HttpResponse
from
django.http
import
HttpResponseRedirect
from
django.template
import
RequestContext
<<<<<<<
HEAD
from
juser.models
import
User
=======
from
django.core.paginator
import
Paginator
,
EmptyPage
,
InvalidPage
from
django.template
import
RequestContext
from
juser.models
import
User
from
jlog.models
import
Log
>>>>>>>
wangyong
from
jasset.models
import
Asset
,
BisGroup
,
IDC
BASE_DIR
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)))
...
...
@@ -45,10 +38,6 @@ def md5_crypt(string):
return
hashlib
.
new
(
"md5"
,
string
)
.
hexdigest
()
<<<<<<<
HEAD
def
base
(
request
):
return
render_to_response
(
'base.html'
,
context_instance
=
RequestContext
(
request
))
=======
def
getDaysByNum
(
num
):
today
=
datetime
.
date
.
today
()
oneday
=
datetime
.
timedelta
(
days
=
1
)
...
...
@@ -61,6 +50,8 @@ def getDaysByNum(num):
li_str
.
reverse
()
t
=
(
li_date
,
li_str
)
return
t
def
base
(
request
):
return
render_to_response
(
'base.html'
,
context_instance
=
RequestContext
(
request
))
def
index
(
request
):
...
...
@@ -91,7 +82,6 @@ def api_user(request):
users
=
Log
.
objects
.
filter
(
is_finished
=
0
)
.
count
()
ret
=
{
'users'
:
users
}
return
HttpResponse
(
json
.
dumps
(
ret
))
>>>>>>>
wangyong
def
skin_config
(
request
):
...
...
@@ -102,9 +92,10 @@ def jasset_group_add(name, comment, jtype):
if
BisGroup
.
objects
.
filter
(
name
=
name
):
emg
=
u'该业务组已存在!'
else
:
<<<<<<<
HEAD
BisGroup
.
objects
.
create
(
name
=
name
,
comment
=
comment
,
type
=
type
)
smg
=
u'业务组
%
s添加成功'
%
name
BisGroup
.
objects
.
create
(
name
=
name
,
comment
=
comment
,
type
=
jtype
)
smg
=
u'业务组
%
s添加成功'
%
name
class
ServerError
(
Exception
):
...
...
@@ -117,10 +108,6 @@ def page_list_return(total, current=1):
return
range
(
min_page
,
max_page
+
1
)
=======
BisGroup
.
objects
.
create
(
name
=
name
,
comment
=
comment
,
type
=
jtype
)
smg
=
u'业务组
%
s添加成功'
%
name
>>>>>>>
wangyong
def
jasset_host_edit
(
j_id
,
j_ip
,
j_idc
,
j_port
,
j_type
,
j_group
,
j_active
,
j_comment
):
...
...
static/js/base.js
View file @
da1beef9
...
...
@@ -59,8 +59,6 @@ function GetTableDataBox() {
return
returnData
;
}
<<<<<<<
HEAD
=======
function
move
(
from
,
to
)
{
$
(
"#"
+
from
+
" option"
).
each
(
function
()
{
if
(
$
(
this
).
prop
(
"selected"
)
==
true
)
{
...
...
@@ -83,7 +81,7 @@ function move_all(from, to) {
$
(
"#"
+
to
).
append
(
this
);
});
}
>>>>>>>
wangyong
function
selectAll
(){
var
checklist
=
document
.
getElementsByName
(
"selected"
);
...
...
@@ -103,3 +101,9 @@ function selectAll(){
}
function
move_all
(
from
,
to
){
$
(
"#"
+
from
).
children
().
each
(
function
(){
$
(
"#"
+
to
).
append
(
this
);
});
}
templates/head_script.html
View file @
da1beef9
<script
src=
"/static/js/jquery-2.1.1.js"
></script>
<script
src=
"/static/js/bootstrap.min.js"
></script>
<script
src=
"/static/js/base.js"
></script>
<
<<<<<<
HEAD
<!-- pop windows -->
<script
src=
"/static/js/jquery.colorbox.js"
></script>
=======
>>>>>>> wangyong
<!-- validator js -->
<script
src=
"/static/js/validator/jquery.validator.js"
></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