Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
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
曲欣亮
sentinel
Commits
2896ed59
Commit
2896ed59
authored
May 22, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
9444e50f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
HttpController.java
src/main/java/com/egolm/sentinel/web/HttpController.java
+1
-2
http.html
src/main/resources/page/http.html
+1
-0
No files found.
src/main/java/com/egolm/sentinel/web/HttpController.java
View file @
2896ed59
...
@@ -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
...
...
src/main/resources/page/http.html
View file @
2896ed59
...
@@ -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
:
'确定'
});
});
...
...
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