Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -16,7 +18,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcDdosLog;
|
||||
@@ -24,6 +31,7 @@ import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.sun.jna.platform.win32.OaIdl.DATE;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/log/ntc/ntcDdosLogs")
|
||||
@@ -54,7 +62,15 @@ public class DdosLogController extends BaseController{
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_DDOS_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
|
||||
Gson gson = new GsonBuilder().create();
|
||||
GsonBuilder builder = new GsonBuilder();
|
||||
builder.registerTypeAdapter(Date.class, new JsonDeserializer<Date>() {
|
||||
|
||||
public Date deserialize(JsonElement json, java.lang.reflect.Type typeOfT,
|
||||
JsonDeserializationContext context) throws JsonParseException {
|
||||
return new Date(json.getAsJsonPrimitive().getAsLong());
|
||||
}
|
||||
});
|
||||
Gson gson = builder.setDateFormat("yyyy-MM-dd HH:mm:ss").create();
|
||||
//gson泛型支持
|
||||
LogRecvData<NtcDdosLog> fromJson = gson.fromJson(jsonString, new TypeToken<LogRecvData<NtcDdosLog>>(){}.getType());
|
||||
|
||||
|
||||
@@ -1180,33 +1180,33 @@
|
||||
update app_policy_cfg
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
<!-- <if test="cfgDesc != null and cfgDesc != ''" > -->
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="appCode != null">
|
||||
<!-- </if>
|
||||
<if test="appCode != null"> -->
|
||||
APP_CODE = #{appCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="behavCode != null">
|
||||
<!-- </if>
|
||||
<if test="behavCode != null"> -->
|
||||
BEHAV_CODE = #{behavCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="specServiceId != null">
|
||||
<!-- </if>
|
||||
<if test="specServiceId != null"> -->
|
||||
SPEC_SERVICE_ID = #{specServiceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
<!-- </if>
|
||||
<if test="action != null" > -->
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
<!-- </if>
|
||||
<if test="isValid != null" > -->
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
<!-- </if>
|
||||
<if test="isAudit != null" > -->
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<!-- </if> -->
|
||||
<if test="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
@@ -1215,61 +1215,61 @@
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
<!-- <if test="serviceId != null" > -->
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
<!-- </if>
|
||||
<if test="requestId != null" > -->
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
<!-- </if>
|
||||
<if test="compileId != null" > -->
|
||||
compile_id = #{compileId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
<!-- </if>
|
||||
<if test="isAreaEffective != null" > -->
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
<!-- </if>
|
||||
<if test="classify != null and classify != ''" > -->
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
<!-- </if>
|
||||
<if test="attribute != null and attribute != ''" > -->
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
<!-- </if>
|
||||
<if test="lable != null and lable != ''" > -->
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
<!-- </if>
|
||||
<if test="areaEffectiveIds != null" > -->
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
<!-- </if>
|
||||
<if test="functionId != null" > -->
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="ratelimit != null">
|
||||
<!-- </if>
|
||||
<if test="ratelimit != null"> -->
|
||||
RATELIMIT=#{ratelimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null">
|
||||
<!-- </if>
|
||||
<if test="cfgRegionCode != null"> -->
|
||||
CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
<!-- </if>
|
||||
<if test="cfgType != null and cfgType != ''"> -->
|
||||
CFG_TYPE =#{cfgType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion1 != null and userRegion1 != ''">
|
||||
<!-- </if>
|
||||
<if test="userRegion1 != null and userRegion1 != ''"> -->
|
||||
USER_REGION1 =#{userRegion1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion2 != null and userRegion2 != ''">
|
||||
<!-- </if>
|
||||
<if test="userRegion2 != null and userRegion2 != ''"> -->
|
||||
USER_REGION2 =#{userRegion2,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion3 != null and userRegion3 != ''">
|
||||
<!-- </if>
|
||||
<if test="userRegion3 != null and userRegion3 != ''"> -->
|
||||
USER_REGION1 =#{userRegion3,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion4 != null and userRegion4 != ''">
|
||||
<!-- </if>
|
||||
<if test="userRegion4 != null and userRegion4 != ''"> -->
|
||||
USER_REGION1 =#{userRegion4,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userRegion5 != null and userRegion5 != ''">
|
||||
<!-- </if>
|
||||
<if test="userRegion5 != null and userRegion5 != ''"> -->
|
||||
USER_REGION1 =#{userRegion5,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<!-- </if> -->
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
|
||||
@@ -53,6 +53,9 @@ $(function(){
|
||||
if($("[name='behavCode']")&&$("[name='behavCode']").val()!=""){
|
||||
$("input[name$='exprType']").val(1);
|
||||
}
|
||||
if($("input[name='ratelimit']").is(":hidden")){
|
||||
$("input[name='ratelimit']").val("");
|
||||
}
|
||||
/* $("#appCode").val($("#specServiceIdId").val()); */
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
@@ -190,12 +193,14 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="behaviour_type"/></label>
|
||||
<div class="col-md-6" id="behaviour">
|
||||
<select name="behavCode" data-live-search="true" class="selectpicker form-control">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
@@ -53,6 +53,9 @@ $(function(){
|
||||
if($("[name='behavCode']")&&$("[name='behavCode']").val()!=""){
|
||||
$("input[name$='exprType']").val(1);
|
||||
}
|
||||
if($("input[name='ratelimit']").is(":hidden")){
|
||||
$("input[name='ratelimit']").val("");
|
||||
}
|
||||
/* $("#appCode").val($("#specServiceIdId").val()); */
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
|
||||
@@ -235,8 +235,8 @@ $(document).ready(function(){
|
||||
<td>${log.userRegion}</td>
|
||||
|
||||
<td>${log.attackType}</td>
|
||||
<td>${log.attackStartTime}</td>
|
||||
<td>${log.lastAttackTime}</td>
|
||||
<td><fmt:formatDate value="${log.attackStartTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
|
||||
<td><fmt:formatDate value="${log.lastAttackTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
|
||||
<td>${log.attackMaxPps}</td>
|
||||
<td>${log.attackMaxBps}</td>
|
||||
<td>${log.attackTotalPkt}</td>
|
||||
|
||||
Reference in New Issue
Block a user