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
a816a7b1
Commit
a816a7b1
authored
9 years ago
by
liuzheng712
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(webterminal): bug fix test
parent
32519f8e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
webterminal.js
static/js/webterminal.js
+9
-3
No files found.
static/js/webterminal.js
View file @
a816a7b1
...
...
@@ -13,7 +13,7 @@ WSSHClient.prototype._generateEndpoint = function (options) {
var
protocol
=
'ws://'
;
}
var
endpoint
=
protocol
+
document
.
URL
.
match
(
RegExp
(
'//(.*?)/'
))[
1
]
+
'/ws/terminal'
+
document
.
URL
.
match
(
/
(\?
.*
)
/
);
var
endpoint
=
protocol
+
document
.
URL
.
match
(
RegExp
(
'//(.*?)/'
))[
1
]
+
'/ws/terminal'
+
document
.
URL
.
match
(
/
(\?
.*
)
/
);
return
endpoint
;
};
WSSHClient
.
prototype
.
connect
=
function
(
options
)
{
...
...
@@ -55,10 +55,16 @@ WSSHClient.prototype.send = function (data) {
function
openTerminal
(
options
)
{
var
client
=
new
WSSHClient
();
var
term
=
new
Terminal
(
80
,
24
,
function
(
key
)
{
client
.
send
(
key
);
var
term
=
new
Terminal
({
rows
:
rowHeight
,
cols
:
colWidth
,
useStyle
:
true
,
screenKeys
:
true
});
term
.
open
();
term
.
on
(
'data'
,
function
(
data
)
{
client
.
send
(
data
)
});
$
(
'.terminal'
).
detach
().
appendTo
(
'#term'
);
term
.
resize
(
80
,
24
);
term
.
write
(
'Connecting...'
);
...
...
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