Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Jpom
Commits
b44cb4f1
Commit
b44cb4f1
authored
5 years ago
by
Gongzx
Browse files
Options
Download
Email Patches
Plain Diff
修复SSH终端管理问题
parent
f690446a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/server/src/main/java/io/jpom/socket/handler/SshHandler.java
+1
-1
...rver/src/main/java/io/jpom/socket/handler/SshHandler.java
modules/server/src/main/resources/templates/node/ssh/terminal.html
+5
-5
...erver/src/main/resources/templates/node/ssh/terminal.html
with
6 additions
and
6 deletions
+6
-6
modules/server/src/main/java/io/jpom/socket/handler/SshHandler.java
+
1
-
1
View file @
b44cb4f1
...
...
@@ -86,7 +86,7 @@ public class SshHandler extends BaseHandler {
Thread
.
sleep
(
1000
);
//截取当前操作文件父路径
String
fileLocalPath
=
null
;
if
(
fileDirAll
.
lastIndexOf
(
"/"
)
>
-
1
){
if
(
fileDirAll
!=
null
&&
fileDirAll
.
lastIndexOf
(
"/"
)
>
-
1
){
fileLocalPath
=
fileDirAll
.
substring
(
0
,
fileDirAll
.
lastIndexOf
(
"/"
));
}
if
(
fileDirAll
==
null
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/server/src/main/resources/templates/node/ssh/terminal.html
+
5
-
5
View file @
b44cb4f1
...
...
@@ -34,11 +34,7 @@
top
.
location
.
reload
();
}
});
if
(
tail
!==
null
){
var
url
=
getSocketHost
()
+
"
/ssh?userId=[[${session.user.getUserMd5Key()}]]&
"
+
"
sshId=[[${item?.id}]]&nodeId=system&type=ssh&
"
+
"
tail=
"
+
tail
;
}
else
if
(
zip
!==
null
){
if
(
zip
!==
null
){
var
url
=
getSocketHost
()
+
"
/ssh?userId=[[${session.user.getUserMd5Key()}]]&
"
+
"
sshId=[[${item?.id}]]&nodeId=system&type=ssh&
"
+
"
zip=
"
+
zip
;
...
...
@@ -46,6 +42,10 @@
var
url
=
getSocketHost
()
+
"
/ssh?userId=[[${session.user.getUserMd5Key()}]]&
"
+
"
sshId=[[${item?.id}]]&nodeId=system&type=ssh&
"
+
"
gz=
"
+
gz
;
}
else
{
var
url
=
getSocketHost
()
+
"
/ssh?userId=[[${session.user.getUserMd5Key()}]]&
"
+
"
sshId=[[${item?.id}]]&nodeId=system&type=ssh&
"
+
"
tail=
"
+
tail
;
}
var
terminal
=
document
.
getElementById
(
"
#terminal
"
);
term
=
new
window
.
Terminal
({
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help