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
a8bdc377
Commit
a8bdc377
authored
9 years ago
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix group list bug
parent
3260584f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
23 deletions
+23
-23
views.py
juser/views.py
+1
-1
run_websocket.py
run_websocket.py
+22
-21
perm_role_detail.html
templates/jperm/perm_role_detail.html
+0
-1
No files found.
juser/views.py
View file @
a8bdc377
...
...
@@ -63,7 +63,7 @@ def group_list(request):
if
keyword
:
user_group_list
=
user_group_list
.
filter
(
Q
(
name__icontains
=
keyword
)
|
Q
(
comment__icontains
=
keyword
))
if
id
:
if
group_
id
:
user_group_list
=
user_group_list
.
filter
(
id
=
int
(
group_id
))
user_group_list
,
p
,
user_groups
,
page_range
,
current_page
,
show_first
,
show_end
=
pages
(
user_group_list
,
request
)
...
...
This diff is collapsed.
Click to expand it.
run_websocket.py
View file @
a8bdc377
...
...
@@ -116,25 +116,6 @@ def file_monitor(path='.', client=None):
break
class
Application
(
tornado
.
web
.
Application
):
def
__init__
(
self
):
handlers
=
[
(
r'/monitor'
,
MonitorHandler
),
(
r'/terminal'
,
WebTerminalHandler
),
(
r'/kill'
,
WebTerminalKillHandler
),
(
r'/exec'
,
ExecHandler
),
]
setting
=
{
'cookie_secret'
:
'DFksdfsasdfkasdfFKwlwfsdfsa1204mx'
,
'template_path'
:
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'templates'
),
'static_path'
:
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'static'
),
'debug'
:
True
,
}
tornado
.
web
.
Application
.
__init__
(
self
,
handlers
,
**
setting
)
class
MonitorHandler
(
tornado
.
websocket
.
WebSocketHandler
):
clients
=
[]
threads
=
[]
...
...
@@ -415,12 +396,32 @@ class WebTerminalHandler(tornado.websocket.WebSocketHandler):
except
IndexError
:
pass
class
Application
(
tornado
.
web
.
Application
):
def
__init__
(
self
):
handlers
=
[
(
r'/monitor'
,
MonitorHandler
),
(
r'/terminal'
,
WebTerminalHandler
),
(
r'/kill'
,
WebTerminalKillHandler
),
(
r'/exec'
,
ExecHandler
),
]
setting
=
{
'cookie_secret'
:
'DFksdfsasdfkasdfFKwlwfsdfsa1204mx'
,
'template_path'
:
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'templates'
),
'static_path'
:
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'static'
),
'debug'
:
False
,
}
tornado
.
web
.
Application
.
__init__
(
self
,
handlers
,
**
setting
)
if
__name__
==
'__main__'
:
tornado
.
options
.
parse_command_line
()
app
=
Application
()
server
=
tornado
.
httpserver
.
HTTPServer
(
app
)
server
.
bind
(
options
.
port
,
options
.
host
)
#
server.listen(options.port)
server
.
start
(
num_processes
=
1
)
#server.listen(options.port)
server
.
start
(
num_processes
=
1
0
)
print
"Run server on
%
s:
%
s"
%
(
options
.
host
,
options
.
port
)
tornado
.
ioloop
.
IOLoop
.
instance
()
.
start
()
This diff is collapsed.
Click to expand it.
templates/jperm/perm_role_detail.html
View file @
a8bdc377
...
...
@@ -144,7 +144,6 @@
{% endfor %}
</table>
</td>
</tr>
</table>
</div>
...
...
This diff is collapsed.
Click to expand it.
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