Authored by zhaoqi

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

(cherry picked from commit 55700cb9)
... ... @@ -74,12 +74,11 @@ public class HttpUriContants {
public static final String GET_All_USER = "/user/getAllUser";
public static final String GET_USER_BY_NAME = "/user/getUserByName";
public static final String GET_USERS = "/user/getUsers";
public static final String GET_USER_BY_ID = "/user/getUserById";
public static final String GET_USER_BY_ROLE = "/user/getUsersByRole";
public static final String USER_INSERT = "/user/insert";
public static final String USER_UPDATE_PWD = "/user/updatePwd";
public static final String USER_UPDATE = "/user/update";
public static final String USER_DELETE_NAME = "/user/deleteByName";
public static final String USER_DELETE_ID = "/user/deleteById";
public static final String USER_OPERATE = "/user/operate";
... ... @@ -128,8 +127,24 @@ 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/getInitInfo";
public static final String GET_DEGRADE_INFO = "/degrade/getList";
public static final String EDIT_DEGRADE_INFO = "/degrade/change";
public static final String GET_DEGRADE_FUNCTION = "/degrade/getFunction";
/**
* 工单系统
*/
public static final String GET_RELEASEWORKJOBS = "/releaseWork/getReleaseWorkJobs";
public static final String GET_RELEASEWORKJOB_ID = "/releaseWork/getReleaseWorkJob";
public static final String CREATE_RELEASEWORKJOB = "/releaseWork/createReleaseWorkJob";
public static final String GET_HANDLED_JOBS = "/handledWork/getHandledJobs";
public static final String HANDLE_JOB = "/handledWork/dealWorkJob";
public static final String GET_PENDING_JOBS = "/pendingWork/getPendingJobs";
public static final String GET_PENDING_JOB_BYUSER = "/pendingWork/getPendingJobByUser";
public static final String CHECK_RELEASE_ROLE = "/releaseWork/checkRole";
public static final String GET_WORKJOBS = "/works/getWorkJobs";
public static final String GET_WORKJOB_ID = "/works/getWorkJob";
}
... ...
... ... @@ -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>
... ... @@ -147,41 +170,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"){
... ... @@ -216,6 +253,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",
... ... @@ -287,6 +328,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", {
... ... @@ -295,7 +340,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();
... ...