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
46f1cb2e
Commit
46f1cb2e
authored
May 22, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
3d8b0845
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
HttpController.java
src/main/java/com/egolm/sentinel/web/HttpController.java
+2
-1
http.html
src/main/resources/page/http.html
+7
-7
No files found.
src/main/java/com/egolm/sentinel/web/HttpController.java
View file @
46f1cb2e
...
...
@@ -118,7 +118,7 @@ public class HttpController {
@ResponseBody
@PostMapping
(
"saveShell"
)
public
Object
saveShell
(
Integer
id
,
String
name
,
String
hostname
,
Integer
port
,
String
username
,
String
text
)
{
public
Object
saveShell
(
Integer
id
,
String
name
,
String
hostname
,
Integer
port
,
String
username
,
String
password
,
String
text
)
{
THttpItem
item
=
common
.
queryById
(
id
,
THttpItem
.
class
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
item
.
getShell_text
());
if
(
jsonObject
==
null
)
{
...
...
@@ -129,6 +129,7 @@ public class HttpController {
shellJsonObject
.
put
(
"hostname"
,
hostname
);
shellJsonObject
.
put
(
"port"
,
port
);
shellJsonObject
.
put
(
"username"
,
username
);
shellJsonObject
.
put
(
"password"
,
password
);
shellJsonObject
.
put
(
"text"
,
text
);
jsonObject
.
put
(
name
,
shellJsonObject
);
String
shellText
=
jsonObject
.
toJSONString
();
...
...
src/main/resources/page/http.html
View file @
46f1cb2e
...
...
@@ -47,28 +47,28 @@
</div>
<el-dialog
title=
"编辑监控项目"
:visible
.
sync=
"formVisible"
>
<el-form
:model=
"form"
>
<el-form-item
label=
"监控名称"
label-width=
"
120px"
style=
"width:85%
"
>
<el-form-item
label=
"监控名称"
label-width=
"
75px
"
>
<el-input
v-model=
"form.item_desc"
placeholder=
"请输入监控名"
></el-input>
</el-form-item>
<el-form-item
label=
"心跳频率"
label-width=
"
120px"
style=
"width:85%
"
>
<el-form-item
label=
"心跳频率"
label-width=
"
75px
"
>
<el-input
v-model=
"form.cron_expression"
placeholder=
"Cron表达式 例如:1/5 * * * * ?"
></el-input>
</el-form-item>
<el-form-item
label=
"RUL"
label-width=
"
120px"
style=
"width:85%
"
>
<el-form-item
label=
"RUL"
label-width=
"
75px
"
>
<el-input
v-model=
"form.request_url"
placeholder=
"HTTP URL"
></el-input>
</el-form-item>
<el-form-item
label=
"METHOD"
label-width=
"
120px"
style=
"width:85%
"
>
<el-form-item
label=
"METHOD"
label-width=
"
75px
"
>
<el-select
v-model=
"form.request_method"
placeholder=
"HTTP METHOD"
>
<el-option
key=
"GET"
value=
"GET"
label=
"GET"
></el-option>
<el-option
key=
"POST"
value=
"POST"
label=
"POST"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"PARAMS"
label-width=
"
120px"
style=
"width:85%
"
>
<el-form-item
label=
"PARAMS"
label-width=
"
75px
"
>
<el-input
type=
"textarea"
:autosize=
"{minRows:2, maxRows:2}"
v-model=
"form.request_body"
placeholder=
"REQUEST BODY JSON"
></el-input>
</el-form-item>
<el-form-item
label=
"REGEX"
label-width=
"
120px"
style=
"width:85%
"
>
<el-form-item
label=
"REGEX"
label-width=
"
75px
"
>
<el-input
v-model=
"form.response_regex"
placeholder=
"结果校验[正则]"
></el-input>
</el-form-item>
<el-form-item
label=
"EMAIL"
label-width=
"
120px"
style=
"width:85%
"
>
<el-form-item
label=
"EMAIL"
label-width=
"
75px
"
>
<el-input
type=
"textarea"
:autosize=
"{minRows:2, maxRows:2}"
v-model=
"form.email"
placeholder=
"EMAIL 逗号隔开"
></el-input>
</el-form-item>
</el-form>
...
...
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