|
@@ -41,20 +41,20 @@
|
|
|
<table class="table table-hover table-bordered">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
- <th width="20%" class="text-center">告警名称</th>
|
|
|
- <th width="10%" class="text-center">类型</th>
|
|
|
- <th width="10%" class="text-center">等级</th>
|
|
|
+ <th width="20%" class="text-center">告警事件名称</th>
|
|
|
+ <th width="10%" class="text-center">事件类型</th>
|
|
|
+ <th width="10%" class="text-center">主机等级</th>
|
|
|
<th width="20%" class="text-center">时间</th>
|
|
|
<th class="text-center">告警详情</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
{foreach $warning_list as $k=>$val}
|
|
|
<tr>
|
|
|
- <td><input type="text" class="form-control" name="warning_name[{$val['warning_id']}]" datatype="s" nullmsg="告警名称不能为空!" value="{$val['warning_name']}"></td>
|
|
|
+ <td><input type="text" class="form-control" name="warning_name[{$val['_id']}]" datatype="*" nullmsg="告警名称不能为空!" value="{$val['warning_name']}"></td>
|
|
|
<td class="text-center">{if array_key_exists($val['type'],$warning_type)}<span class="level warning_type{$val['type']}">{$warning_type[$val['type']]}</span>{else}未知类型{/if}</td> <!--失陷事件、脆弱性、残余攻击-->
|
|
|
<td class="text-center">{$warning_level[$val['level']]}</td> <!--已失陷、高可疑、高危、中危、低危-->
|
|
|
<td>{$val['create_time']->toDateTime()|date_format:'%Y-%m-%d %H:%M:%S'}</td>
|
|
|
- <td><textarea class="form-control" rows="2" name="content[{$val['warning_id']}]" datatype="*" nullmsg="告警内容不能为空!">{$val['content']}</textarea></td>
|
|
|
+ <td><textarea class="form-control" rows="2" name="content[{$val['_id']}]" datatype="*" nullmsg="告警内容不能为空!">{$val['content']}</textarea></td>
|
|
|
</tr>
|
|
|
{/foreach}
|
|
|
</table>
|
|
@@ -176,7 +176,13 @@
|
|
|
$("button").removeAttr("disabled");
|
|
|
}
|
|
|
})
|
|
|
- })
|
|
|
+ }).error(function(xhr,errorText,errorType){
|
|
|
+ layer.msg(errorType, {
|
|
|
+ icon:2, time: 3000
|
|
|
+ },function () {
|
|
|
+ parent.layer.close(layer_index);
|
|
|
+ });
|
|
|
+ });
|
|
|
return false;
|
|
|
}
|
|
|
});
|