Authored by qinchao

告警支持只是发生钉钉

... ... @@ -136,4 +136,10 @@ public class TaskModel {
*/
private int dataIntervalTimes;
/**
* 告警途径: 默认 0 :短信+钉钉
* 1 只有钉钉
*/
private String alarmChannel;
}
... ...
... ... @@ -225,6 +225,18 @@
placeholder="告警方式" size="40"/>--%>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"> <span style="color:red">*</span>告警渠道:</label>
<div class="col-sm-8">
<select class="form-control" name="alarmChannel" style="width:300px">
<option value="0"> 短信+钉钉</option>
<option value="1"> 钉钉</option>>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"> <span style="color:red">*</span>数量阀值:</label>
... ... @@ -402,6 +414,7 @@
$("select[name='alarmType']").val(3);
$("input[name='alarmNumFlag']").val("");
$("select[name='isOn']").val(1);
$("select[name='alarmChannel']").val("0");
$("#description").val("");
$("#myModalLabel").text("新增任务");
} else {
... ... @@ -432,6 +445,7 @@
$("select[name='alarmType']").val(taskModel.alarmType);
$("input[name='alarmNumFlag']").val(taskModel.alarmNumFlag);
$("select[name='isOn']").val(taskModel.isOn);
$("select[name='alarmChannel']").val(taskModel.alarmChannel);
$("#description").val(taskModel.description);
//$("#groupName").find("option[value='"+taskModel.alarmGroupId+"']").attr("selected",true);
... ... @@ -500,6 +514,7 @@
var alarmType = $("select[name='alarmType']").val();
var alarmNumFlag = $("input[name='alarmNumFlag']").val();
var isOn = $("select[name='isOn']").val();
var alarmChannel = $("select[name='alarmChannel']").val();
var description = $("#description").val();
var alarmGroupId = $("#groupName").val();
if (fields == null || fields == "") {
... ... @@ -603,6 +618,7 @@
alarmType: alarmType,
alarmNumFlag: alarmNumFlag,
isOn: isOn,
alarmChannel:alarmChannel,
description:description,
alarmGroupId:alarmGroupId,
addSource:0
... ...