Commit 2896ed59 authored by Quxl's avatar Quxl

x

parent 9444e50f
...@@ -158,7 +158,7 @@ public class HttpController { ...@@ -158,7 +158,7 @@ public class HttpController {
LinuxConnect connect = new LinuxConnect(hostname, port); LinuxConnect connect = new LinuxConnect(hostname, port);
try { try {
if(connect.login(username, password)) { if(connect.login(username, password)) {
connect.execute(text); return Rjx.jsonOk().setData(connect.execute(text));
} else { } else {
throw new XRException("SSH登陆失败"); throw new XRException("SSH登陆失败");
} }
...@@ -169,7 +169,6 @@ public class HttpController { ...@@ -169,7 +169,6 @@ public class HttpController {
} finally { } finally {
connect.close(); connect.close();
} }
return Rjx.jsonOk();
} }
@PostConstruct @PostConstruct
......
...@@ -268,6 +268,7 @@ ...@@ -268,6 +268,7 @@
var scope = this; var scope = this;
$.post("http/shellExecute", scope.shellForm, function(json) { $.post("http/shellExecute", scope.shellForm, function(json) {
if(json.code == 200) { if(json.code == 200) {
console.log("命令提示", json.data);
scope.$alert('命令执行成功', 'SHELL', { scope.$alert('命令执行成功', 'SHELL', {
confirmButtonText: '确定' confirmButtonText: '确定'
}); });
......
Markdown is supported
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