Commit b44cb4f1 authored by Gongzx's avatar Gongzx
Browse files

修复SSH终端管理问题

parent f690446a
Showing with 6 additions and 6 deletions
+6 -6
......@@ -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) {
......
......@@ -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({
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment