Authored by zhaoqi

降级服务配置页面 新增信息

... ... @@ -127,7 +127,7 @@ public class HttpUriContants {
public static final String TASK__SAVE = "/taskConfigure/saveTaskModel";
public static final String TASK__DELETE = "/taskConfigure/delTaskModel";
public static final String TASK__GET_ID = "/taskConfigure/getTaskModelById";
public static final String GET_DEGRADE_FUNCTION = "/degrade/getFunction";
public static final String GET_DEGRADE_FUNCTION = "/degrade/getInitInfo";
public static final String GET_DEGRADE_INFO = "/degrade/getList";
public static final String EDIT_DEGRADE_INFO = "/degrade/change";
... ...
... ... @@ -23,4 +23,12 @@ public class DegradeInfoReq extends PageRequest {
private String configDesc;
private String functionPointName;
private String level1Page;
private String level2Page;
private String apiName;
private String clientType;
}
... ...
... ... @@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.util.HashMap;
/**
* Created by zhaoqi on 2016/8/29 0029.
*/
... ... @@ -24,7 +26,9 @@ public class DegradeInfoCtrl {
@RequestMapping("/info")
public ModelAndView toDegradeList(Model model) {
BaseResponse degradeFunction = httpClient.defaultPost(HttpUriContants.GET_DEGRADE_FUNCTION,null,BaseResponse.class);
model.addAttribute("functionPoints",degradeFunction.getData());
model.addAttribute("functionPoints",((HashMap)degradeFunction.getData()).get("function"));
model.addAttribute("level1Pages",((HashMap)degradeFunction.getData()).get("level1"));
model.addAttribute("level2Pages",((HashMap)degradeFunction.getData()).get("level2"));
return new ModelAndView("degrade/degradeList");
}
... ...
... ... @@ -57,19 +57,19 @@
<mvc:resources location="/fonts/" mapping="/fonts/**"/>
<mvc:resources location="/script/" mapping="/script/**"/>
<mvc:interceptors>
<!-- 登录验证 -->
<mvc:interceptor>
<mvc:mapping path="/**"/>
<mvc:exclude-mapping path="/hystrix/**"/>
<mvc:exclude-mapping path="/user/**"/>
<mvc:exclude-mapping path="/img/**"/>
<mvc:exclude-mapping path="/css/**"/>
<mvc:exclude-mapping path="/js/**"/>
<mvc:exclude-mapping path="/fonts/**"/>
<mvc:exclude-mapping path="/script/**"/>
<bean class="com.ui.interceptor.AuthInterceptor"/>
</mvc:interceptor>
</mvc:interceptors>
<!--<mvc:interceptors>-->
<!--&lt;!&ndash; 登录验证 &ndash;&gt;-->
<!--<mvc:interceptor>-->
<!--<mvc:mapping path="/**"/>-->
<!--<mvc:exclude-mapping path="/hystrix/**"/>-->
<!--<mvc:exclude-mapping path="/user/**"/>-->
<!--<mvc:exclude-mapping path="/img/**"/>-->
<!--<mvc:exclude-mapping path="/css/**"/>-->
<!--<mvc:exclude-mapping path="/js/**"/>-->
<!--<mvc:exclude-mapping path="/fonts/**"/>-->
<!--<mvc:exclude-mapping path="/script/**"/>-->
<!--<bean class="com.ui.interceptor.AuthInterceptor"/>-->
<!--</mvc:interceptor>-->
<!--</mvc:interceptors>-->
</beans>
\ No newline at end of file
... ...
... ... @@ -14,6 +14,21 @@
<input type="text" class="form-control" id="configName" name="configName" maxlength="80" size="40" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">一级页面:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="level1Page" name="level1Page" maxlength="100" size="40"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">二级页面:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="level2Page" name="level2Page" maxlength="200" size="40"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">配置名称:</label>
<div class="col-sm-8">
... ... @@ -22,15 +37,28 @@
</div>
<div class="form-group">
<label class="col-sm-2 control-label">接口名称:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="apiName" name="apiName" maxlength="100" size="40"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">配置描述:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="configDesc" name="configDesc" maxlength="200" size="40"/>
</div>
</div>
<%--<div class="form-group">--%>
<%--<label class="col-sm-2 control-label">功能点:</label>--%>
<%--<div class="col-sm-8">--%>
<%--<input type="text" class="form-control" id="functionPointName" name="functionPointName" maxlength="80" size="40"/>--%>
<%--</div>--%>
<%--</div>--%>
<div class="form-group">
<label class="col-sm-2 control-label">功能点:</label>
<label class="col-sm-2 control-label">客户端:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="functionPointName" name="functionPointName" maxlength="80" size="40"/>
<input type="text" class="form-control" id="clientType" name="clientType" maxlength="30" size="40"/>
</div>
</div>
<div class="form-group">
... ... @@ -73,5 +101,9 @@ $(function(){
$("#degradeInfoForm #switchOn").val(paramObj.switchOn);
$("#degradeInfoForm #cloudType").val(paramObj.cloudType);
$("#degradeInfoForm #functionPointName").val(paramObj.functionPointName);
$("#degradeInfoForm #level1Page").val(paramObj.level1Page);
$("#degradeInfoForm #level2Page").val(paramObj.level2Page);
$("#degradeInfoForm #apiName").val(paramObj.apiName);
$("#degradeInfoForm #clientType").val(paramObj.clientType);
})
</script>
\ No newline at end of file
... ...
... ... @@ -81,7 +81,7 @@
</div>
<div class="widget-content nopadding">
<div class="widget-title" style="height: 53px;">
<div class="widget-title" style="height: 98px;">
<div>
<div class="form-inline" role="form" id="inBoxQueryDiv"
style=" margin-top: 12px;margin-left: 25px;float: left;">
... ... @@ -90,22 +90,24 @@
<select id="cloudType" name="cloudType" class="form-control">
<option value="zookeeper_aws">aws</option>
<option value="zookeeper_qq">qCloud</option>
<option value="gray_qq">gray</option>
</select>
</div>
<div class="input-group" style="float: left;">
<span class="input-group-addon">配置项:</span>
<input type="text" id="configName" name="configName" class="form-control" placeholder=""/>
</div>
<div class="input-group" style="float: left;">
<span class="input-group-addon">配置名称:</span>
<input type="text" id="configShowName" name="configShowName" class="form-control" placeholder=""/>
<span class="input-group-addon">一级页面:</span>
<select id="level1Page" name="functionPoint" class="form-control">
<option value="">全部</option>
<c:forEach items="${level1Pages }" var="level1Page">
<option value="${level1Page }">${level1Page }</option>
</c:forEach>
</select>
</div>
<div class="input-group" style="float: left;">
<span class="input-group-addon">功能点:</span>
<select id="functionPoint" name="functionPoint" class="form-control">
<span class="input-group-addon">二级页面:</span>
<select id="level2Page" name="functionPoint" class="form-control">
<option value="">全部</option>
<c:forEach items="${functionPoints }" var="functionPoint">
<option value="${functionPoint }">${functionPoint }</option>
<c:forEach items="${level2Pages }" var="level2Page">
<option value="${level2Page }">${level2Page }</option>
</c:forEach>
</select>
</div>
... ... @@ -125,6 +127,27 @@
<option value="N"></option>
</select>
</div>
<div class="input-group" style="float: left;width: 200px;">
<span class="input-group-addon">配置项:</span>
<input type="text" id="configName" name="configName" class="form-control" placeholder=""/>
</div>
<div class="input-group" style="float: left;width: 200px;">
<span class="input-group-addon">配置名称:</span>
<input type="text" id="configShowName" name="configShowName" class="form-control" placeholder=""/>
</div>
<div class="input-group" style="float: left;width: 200px;">
<span class="input-group-addon">接口名称:</span>
<input type="text" id="apiName" name="apiName" class="form-control" placeholder=""/>
</div>
<%--<div class="input-group" style="float: left;width: auto">--%>
<%--<span class="input-group-addon">功能点:</span>--%>
<%--<select id="functionPoint" name="functionPoint" class="form-control">--%>
<%--<option value="">全部</option>--%>
<%--<c:forEach items="${functionPoints }" var="functionPoint">--%>
<%--<option value="${functionPoint }">${functionPoint }</option>--%>
<%--</c:forEach>--%>
<%--</select>--%>
<%--</div>--%>
<button id="searchDegradeInfoBtn" class="btn btn-primary" style="margin-left: 18px;">搜索</button>
</div>
</div>
... ... @@ -151,41 +174,55 @@
loadFilter: function (data) {
return defaultLoadFilter(data);
},
columns: [{
columns: [ {
title: "配置项",
width:"20%",
width:"15%",
align:"left",
field: "configName"
},{
title: "一级页面",
width:"15%",
field: "level1Page"
},{
title: "二级页面",
width:"20%",
field: "level2Page"
}, {
title: "配置名称",
width:"20%",
width:"9%",
field: "configShowName"
},{
title: "接口名称",
width:"9%",
field: "apiName"
}, {
title: "配置描述",
width:"20%",
field: "configDesc"
}, {
title: "功能点",
width:"20%",
field: "functionPointName"
}, {
title: "级别",
width:"5%",
field: "level",
formatter : function(value, rowData, rowIndex) {
if(value == 1){
return "<div style='background-color: #1f41be'><font color='white'>"+"一级"+"</font></div>";
}else if(value == 2){
return "<div style='background-color: #3094be'><font color='white'>"+"二级"+"</font></div>";
}
},
}, {
title: "图片",
width:"5%",
field: "img"
},{
title: "客户端",
width:"8%",
field: "clientType"
},
// {
// title: "功能点",
// width:"10%",
// field: "functionPointName"
// },
{
title: "级别",
width:"4%",
field: "level",
formatter : function(value, rowData, rowIndex) {
if(value == 1){
return "<div style='background-color: #1f41be'><font color='white'>"+"一级"+"</font></div>";
}else if(value == 2){
return "<div style='background-color: #3094be'><font color='white'>"+"二级"+"</font></div>";
}
},
}, {
title: "开关",
width:"10%",
width:"5%",
field: "switchOn",
formatter : function(value, rowData, rowIndex) {
if(value == "Y"){
... ... @@ -220,6 +257,10 @@ function updateDegradeInfo(rowData){
paramObj.switchOn = rowData.switchOn;
paramObj.cloudType = searchCloudType;
paramObj.functionPointName = rowData.functionPointName;
paramObj.level1Page = rowData.level1Page;
paramObj.level2Page = rowData.level2Page;
paramObj.apiName = rowData.apiName;
paramObj.clientType = rowData.clientType;
var dialog0 = $("<div>").appendTo($("body"));
dialog0.dialog({
size : "modal-lg",
... ... @@ -291,6 +332,10 @@ function updateDegradeInfo(rowData){
var configShowName=$("#configShowName").val();
var switchOn= $("#switch").val();
var functionPointName = $("#functionPoint").val();
var level1Page = $("#level1Page").val();
var level2Page = $("#level2Page").val();
var apiName = $("#apiName").val();
var clientType = $("#clientType").val();
searchCloudType = cloudType;
$("#degradeInfoTable").table("load", {
... ... @@ -299,7 +344,11 @@ function updateDegradeInfo(rowData){
'configName': configName ,
'configShowName': configShowName ,
'switchOn' : switchOn,
'functionPointName' : functionPointName
'functionPointName' : functionPointName,
'level1Page' : level1Page,
'level2Page' : level2Page,
'apiName' : apiName,
'clientType' : clientType
});
});
var searchCloudType=$("#cloudType").val();
... ...