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
9c939087
Commit
9c939087
authored
Jan 21, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:ibuler/jumpserver
parents
1c2cba64
b69853a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
views.py
jlog/views.py
+1
-1
log_online.html
templates/jlog/log_online.html
+10
-4
No files found.
jlog/views.py
View file @
9c939087
...
@@ -66,7 +66,7 @@ def log_list(request, offset):
...
@@ -66,7 +66,7 @@ def log_list(request, offset):
contact_list
,
p
,
contacts
,
page_range
,
current_page
,
show_first
,
show_end
=
pages
(
posts
,
request
)
contact_list
,
p
,
contacts
,
page_range
,
current_page
,
show_first
,
show_end
=
pages
(
posts
,
request
)
web_monitor_uri
=
'
ws://
%
s/monitor'
%
WEB_SOCKET_HOST
web_monitor_uri
=
'
%
s/monitor'
%
WEB_SOCKET_HOST
web_kill_uri
=
'http://
%
s/kill'
%
WEB_SOCKET_HOST
web_kill_uri
=
'http://
%
s/kill'
%
WEB_SOCKET_HOST
session_id
=
request
.
session
.
session_key
session_id
=
request
.
session
.
session_key
return
render_to_response
(
'jlog/log_
%
s.html'
%
offset
,
locals
(),
context_instance
=
RequestContext
(
request
))
return
render_to_response
(
'jlog/log_
%
s.html'
%
offset
,
locals
(),
context_instance
=
RequestContext
(
request
))
...
...
templates/jlog/log_online.html
View file @
9c939087
...
@@ -136,14 +136,20 @@
...
@@ -136,14 +136,20 @@
{
#
})
#
}
{
#
})
#
}
{
#
});
#
}
{
#
});
#
}
function
init
(
obj
){
function
init
(
obj
){
var
protocol
=
"ws://"
;
if
(
window
.
location
.
protocol
==
'https:'
)
{
protocol
=
'wss://'
;
}
var
file_path
=
obj
.
attr
(
'file_path'
);
var
file_path
=
obj
.
attr
(
'file_path'
);
var
wsUri
=
'{{ web_monitor_uri }}'
;
var
wsUri
=
protocol
+
'{{ web_monitor_uri }}'
;
var
socket
=
new
WebSocket
(
wsUri
+
'?file_path='
+
file_path
);
var
socket
=
new
WebSocket
(
wsUri
+
'?file_path='
+
file_path
);
var
term
=
new
Terminal
({
var
term
=
new
Terminal
({
cols
:
80
,
cols
:
80
,
rows
:
24
,
rows
:
24
,
screenKeys
:
false
screenKeys
:
false
,
handler
:
function
(){
return
false
}
});
});
var
tag
=
$
(
'<div id="term" style="height:500px; overflow: auto;background-color: rgba(0, 0, 0, 0);border: none"></div>'
);
var
tag
=
$
(
'<div id="term" style="height:500px; overflow: auto;background-color: rgba(0, 0, 0, 0);border: none"></div>'
);
...
...
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