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
6fbb3874
Commit
6fbb3874
authored
Jan 21, 2016
by
Tad Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix wss support for web_monitor_uri
Https support
parent
d9455e3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
views.py
jlog/views.py
+1
-1
log_online.html
templates/jlog/log_online.html
+6
-1
No files found.
jlog/views.py
View file @
6fbb3874
...
...
@@ -66,7 +66,7 @@ def log_list(request, offset):
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
session_id
=
request
.
session
.
session_key
return
render_to_response
(
'jlog/log_
%
s.html'
%
offset
,
locals
(),
context_instance
=
RequestContext
(
request
))
...
...
templates/jlog/log_online.html
View file @
6fbb3874
...
...
@@ -136,8 +136,13 @@
{
#
})
#
}
{
#
});
#
}
function
init
(
obj
){
var
protocol
=
"ws://"
;
if
(
window
.
location
.
protocol
==
'https:'
)
{
protocol
=
'wss://'
;
}
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
term
=
new
Terminal
({
...
...
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