Commit 46f1cb2e authored by Quxl's avatar Quxl

x

parent 3d8b0845
...@@ -118,7 +118,7 @@ public class HttpController { ...@@ -118,7 +118,7 @@ public class HttpController {
@ResponseBody @ResponseBody
@PostMapping("saveShell") @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); THttpItem item = common.queryById(id, THttpItem.class);
JSONObject jsonObject = JSON.parseObject(item.getShell_text()); JSONObject jsonObject = JSON.parseObject(item.getShell_text());
if(jsonObject == null) { if(jsonObject == null) {
...@@ -129,6 +129,7 @@ public class HttpController { ...@@ -129,6 +129,7 @@ public class HttpController {
shellJsonObject.put("hostname", hostname); shellJsonObject.put("hostname", hostname);
shellJsonObject.put("port", port); shellJsonObject.put("port", port);
shellJsonObject.put("username", username); shellJsonObject.put("username", username);
shellJsonObject.put("password", password);
shellJsonObject.put("text", text); shellJsonObject.put("text", text);
jsonObject.put(name, shellJsonObject); jsonObject.put(name, shellJsonObject);
String shellText = jsonObject.toJSONString(); String shellText = jsonObject.toJSONString();
......
...@@ -47,28 +47,28 @@ ...@@ -47,28 +47,28 @@
</div> </div>
<el-dialog title="编辑监控项目" :visible.sync="formVisible"> <el-dialog title="编辑监控项目" :visible.sync="formVisible">
<el-form :model="form"> <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-input v-model="form.item_desc" placeholder="请输入监控名"></el-input>
</el-form-item> </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-input v-model="form.cron_expression" placeholder="Cron表达式 例如:1/5 * * * * ?"></el-input>
</el-form-item> </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-input v-model="form.request_url" placeholder="HTTP URL"></el-input>
</el-form-item> </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-select v-model="form.request_method" placeholder="HTTP METHOD">
<el-option key="GET" value="GET" label="GET"></el-option> <el-option key="GET" value="GET" label="GET"></el-option>
<el-option key="POST" value="POST" label="POST"></el-option> <el-option key="POST" value="POST" label="POST"></el-option>
</el-select> </el-select>
</el-form-item> </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-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>
<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-input v-model="form.response_regex" placeholder="结果校验[正则]"></el-input>
</el-form-item> </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-input type="textarea" :autosize="{minRows:2, maxRows:2}" v-model="form.email" placeholder="EMAIL 逗号隔开"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
......
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